Package org.lwjgl.util.freetype
Class FT_Stream
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct FT_StreamRec {
unsigned char * base;
unsigned long size;
unsigned long pos;
{@link FT_StreamDesc FT_StreamDesc} descriptor;
{@link FT_StreamDesc FT_StreamDesc} pathname;
{@link FT_Stream_IoFuncI FT_Stream_IoFunc} read;
{@link FT_Stream_CloseFuncI FT_Stream_CloseFunc} close;
FT_Memory memory;
unsigned char * cursor;
unsigned char * limit;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionFT_Stream(ByteBuffer container) Creates aFT_Streaminstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescription@Nullable ByteBufferbase()base(@Nullable ByteBuffer value) Sets the address of the specifiedByteBufferto thebasefield.static FT_Streamcalloc()Returns a newFT_Streaminstance allocated withmemCalloc.static FT_Stream.Buffercalloc(int capacity) Returns a newFT_Stream.Bufferinstance allocated withmemCalloc.static FT_Stream.Buffercalloc(int capacity, MemoryStack stack) Returns a newFT_Stream.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static FT_Streamcalloc(MemoryStack stack) Returns a newFT_Streaminstance allocated on the specifiedMemoryStackand initializes all its bits to zero.@Nullable FT_Stream_CloseFuncclose$()close$(@Nullable FT_Stream_CloseFuncI value) Sets the specified value to theclosefield.static FT_Streamcreate()Returns a newFT_Streaminstance allocated withBufferUtils.static FT_Stream.Buffercreate(int capacity) Returns a newFT_Stream.Bufferinstance allocated withBufferUtils.static FT_Streamcreate(long address) Returns a newFT_Streaminstance for the specified memory address.static FT_Stream.Buffercreate(long address, int capacity) Create aFT_Stream.Bufferinstance at the specified memory.static @Nullable FT_StreamcreateSafe(long address) static @Nullable FT_Stream.BuffercreateSafe(long address, int capacity) descriptor(Consumer<FT_StreamDesc> consumer) Passes thedescriptorfield to the specifiedConsumer.descriptor(FT_StreamDesc value) Copies the specifiedFT_StreamDescto thedescriptorfield.static FT_Streammalloc()Returns a newFT_Streaminstance allocated withmemAlloc.static FT_Stream.Buffermalloc(int capacity) Returns a newFT_Stream.Bufferinstance allocated withmemAlloc.static FT_Stream.Buffermalloc(int capacity, MemoryStack stack) Returns a newFT_Stream.Bufferinstance allocated on the specifiedMemoryStack.static FT_Streammalloc(MemoryStack stack) Returns a newFT_Streaminstance allocated on the specifiedMemoryStack.static @Nullable ByteBuffernbase(long struct) Unsafe version ofbase.static voidnbase(long struct, @Nullable ByteBuffer value) Unsafe version ofbase.static @Nullable FT_Stream_CloseFuncnclose$(long struct) Unsafe version ofclose$().static voidnclose$(long struct, @Nullable FT_Stream_CloseFuncI value) Unsafe version ofclose$.static @Nullable ByteBufferncursor(long struct, int capacity) static voidncursor(long struct, @Nullable ByteBuffer value) static FT_StreamDescndescriptor(long struct) Unsafe version ofdescriptor().static voidndescriptor(long struct, FT_StreamDesc value) Unsafe version ofdescriptor.static @Nullable ByteBuffernlimit$(long struct, int capacity) static voidnlimit$(long struct, @Nullable ByteBuffer value) static @Nullable FT_Memorynmemory(long struct) static voidstatic FT_StreamDescnpathname(long struct) Unsafe version ofpathname().static voidnpathname(long struct, FT_StreamDesc value) Unsafe version ofpathname.static longnpos(long struct) Unsafe version ofpos().static voidnpos(long struct, long value) Unsafe version ofpos.static @Nullable FT_Stream_IoFuncnread(long struct) Unsafe version ofread().static voidnread(long struct, @Nullable FT_Stream_IoFuncI value) Unsafe version ofread.static longnsize(long struct) Unsafe version ofsize().static voidnsize(long struct, long value) Sets the specified value to thesizefield of the specifiedstruct.pathname()pathname(Consumer<FT_StreamDesc> consumer) Passes thepathnamefield to the specifiedConsumer.pathname(FT_StreamDesc value) Copies the specifiedFT_StreamDescto thepathnamefield.longpos()pos(long value) Sets the specified value to theposfield.@Nullable FT_Stream_IoFuncread()read(@Nullable FT_Stream_IoFuncI value) Sets the specified value to thereadfield.set(@Nullable ByteBuffer base, long size, long pos, FT_StreamDesc descriptor, FT_StreamDesc pathname, @Nullable FT_Stream_IoFuncI read, @Nullable FT_Stream_CloseFuncI close$) Initializes this struct with the specified values.Copies the specified struct data to this struct.longsize()size(long value) Sets the specified value to thesizefield.intsizeof()Returnssizeof(struct).Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
BASE
public static final int BASEThe struct member offsets. -
SIZE
public static final int SIZEThe struct member offsets. -
POS
public static final int POSThe struct member offsets. -
DESCRIPTOR
public static final int DESCRIPTORThe struct member offsets. -
PATHNAME
public static final int PATHNAMEThe struct member offsets. -
READ
public static final int READThe struct member offsets. -
CLOSE
public static final int CLOSEThe struct member offsets. -
MEMORY
public static final int MEMORYThe struct member offsets. -
CURSOR
public static final int CURSORThe struct member offsets. -
LIMIT
public static final int LIMITThe struct member offsets.
-
-
Constructor Details
-
FT_Stream
Creates aFT_Streaminstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct). -
base
- Returns:
- a
ByteBufferview of the data pointed to by thebasefield.
-
size
public long size()- Returns:
- the value of the
sizefield.
-
pos
public long pos()- Returns:
- the value of the
posfield.
-
descriptor
- Returns:
- a
FT_StreamDescview of thedescriptorfield.
-
pathname
- Returns:
- a
FT_StreamDescview of thepathnamefield.
-
read
- Returns:
- the value of the
readfield.
-
close$
- Returns:
- the value of the
closefield.
-
base
Sets the address of the specifiedByteBufferto thebasefield. -
size
Sets the specified value to thesizefield. -
pos
Sets the specified value to theposfield. -
descriptor
Copies the specifiedFT_StreamDescto thedescriptorfield. -
descriptor
Passes thedescriptorfield to the specifiedConsumer. -
pathname
Copies the specifiedFT_StreamDescto thepathnamefield. -
pathname
Passes thepathnamefield to the specifiedConsumer. -
read
Sets the specified value to thereadfield. -
close$
Sets the specified value to theclosefield. -
set
public FT_Stream set(@Nullable ByteBuffer base, long size, long pos, FT_StreamDesc descriptor, FT_StreamDesc pathname, @Nullable FT_Stream_IoFuncI read, @Nullable FT_Stream_CloseFuncI close$) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newFT_Streaminstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newFT_Streaminstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newFT_Streaminstance allocated withBufferUtils. -
create
Returns a newFT_Streaminstance for the specified memory address. -
createSafe
-
malloc
Returns a newFT_Stream.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newFT_Stream.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newFT_Stream.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aFT_Stream.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newFT_Streaminstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newFT_Streaminstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newFT_Stream.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newFT_Stream.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nbase
Unsafe version ofbase. -
nsize
public static long nsize(long struct) Unsafe version ofsize(). -
npos
public static long npos(long struct) Unsafe version ofpos(). -
ndescriptor
Unsafe version ofdescriptor(). -
npathname
Unsafe version ofpathname(). -
nread
Unsafe version ofread(). -
nclose$
Unsafe version ofclose$(). -
nmemory
-
ncursor
-
nlimit$
-
nbase
Unsafe version ofbase. -
nsize
public static void nsize(long struct, long value) Sets the specified value to thesizefield of the specifiedstruct. -
npos
public static void npos(long struct, long value) Unsafe version ofpos. -
ndescriptor
Unsafe version ofdescriptor. -
npathname
Unsafe version ofpathname. -
nread
Unsafe version ofread. -
nclose$
Unsafe version ofclose$. -
nmemory
-
ncursor
-
nlimit$
-