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.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The 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_Stream
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescription@Nullable ByteBuffer
base()
base
(@Nullable ByteBuffer value) Sets the address of the specifiedByteBuffer
to thebase
field.static FT_Stream
calloc()
Returns a newFT_Stream
instance allocated withmemCalloc
.static FT_Stream.Buffer
calloc
(int capacity) Returns a newFT_Stream.Buffer
instance allocated withmemCalloc
.static FT_Stream.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newFT_Stream.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static FT_Stream
calloc
(MemoryStack stack) Returns a newFT_Stream
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.@Nullable FT_Stream_CloseFunc
close$()
close$
(@Nullable FT_Stream_CloseFuncI value) Sets the specified value to theclose
field.static FT_Stream
create()
Returns a newFT_Stream
instance allocated withBufferUtils
.static FT_Stream.Buffer
create
(int capacity) Returns a newFT_Stream.Buffer
instance allocated withBufferUtils
.static FT_Stream
create
(long address) Returns a newFT_Stream
instance for the specified memory address.static FT_Stream.Buffer
create
(long address, int capacity) Create aFT_Stream.Buffer
instance at the specified memory.static @Nullable FT_Stream
createSafe
(long address) static @Nullable FT_Stream.Buffer
createSafe
(long address, int capacity) descriptor
(Consumer<FT_StreamDesc> consumer) Passes thedescriptor
field to the specifiedConsumer
.descriptor
(FT_StreamDesc value) Copies the specifiedFT_StreamDesc
to thedescriptor
field.static FT_Stream
malloc()
Returns a newFT_Stream
instance allocated withmemAlloc
.static FT_Stream.Buffer
malloc
(int capacity) Returns a newFT_Stream.Buffer
instance allocated withmemAlloc
.static FT_Stream.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newFT_Stream.Buffer
instance allocated on the specifiedMemoryStack
.static FT_Stream
malloc
(MemoryStack stack) Returns a newFT_Stream
instance allocated on the specifiedMemoryStack
.static @Nullable ByteBuffer
nbase
(long struct) Unsafe version ofbase
.static void
nbase
(long struct, @Nullable ByteBuffer value) Unsafe version ofbase
.static @Nullable FT_Stream_CloseFunc
nclose$
(long struct) Unsafe version ofclose$()
.static void
nclose$
(long struct, @Nullable FT_Stream_CloseFuncI value) Unsafe version ofclose$
.static @Nullable ByteBuffer
ncursor
(long struct, int capacity) static void
ncursor
(long struct, @Nullable ByteBuffer value) static FT_StreamDesc
ndescriptor
(long struct) Unsafe version ofdescriptor()
.static void
ndescriptor
(long struct, FT_StreamDesc value) Unsafe version ofdescriptor
.static @Nullable ByteBuffer
nlimit$
(long struct, int capacity) static void
nlimit$
(long struct, @Nullable ByteBuffer value) static @Nullable FT_Memory
nmemory
(long struct) static void
static FT_StreamDesc
npathname
(long struct) Unsafe version ofpathname()
.static void
npathname
(long struct, FT_StreamDesc value) Unsafe version ofpathname
.static long
npos
(long struct) Unsafe version ofpos()
.static void
npos
(long struct, long value) Unsafe version ofpos
.static @Nullable FT_Stream_IoFunc
nread
(long struct) Unsafe version ofread()
.static void
nread
(long struct, @Nullable FT_Stream_IoFuncI value) Unsafe version ofread
.static long
nsize
(long struct) Unsafe version ofsize()
.static void
nsize
(long struct, long value) Sets the specified value to thesize
field of the specifiedstruct
.pathname()
pathname
(Consumer<FT_StreamDesc> consumer) Passes thepathname
field to the specifiedConsumer
.pathname
(FT_StreamDesc value) Copies the specifiedFT_StreamDesc
to thepathname
field.long
pos()
pos
(long value) Sets the specified value to thepos
field.@Nullable FT_Stream_IoFunc
read()
read
(@Nullable FT_Stream_IoFuncI value) Sets the specified value to theread
field.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.long
size()
size
(long value) Sets the specified value to thesize
field.int
sizeof()
Returnssizeof(struct)
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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_Stream
instance at the current position of the specifiedByteBuffer
container. 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:Struct
Returnssizeof(struct)
. -
base
- Returns:
- a
ByteBuffer
view of the data pointed to by thebase
field.
-
size
public long size()- Returns:
- the value of the
size
field.
-
pos
public long pos()- Returns:
- the value of the
pos
field.
-
descriptor
- Returns:
- a
FT_StreamDesc
view of thedescriptor
field.
-
pathname
- Returns:
- a
FT_StreamDesc
view of thepathname
field.
-
read
- Returns:
- the value of the
read
field.
-
close$
- Returns:
- the value of the
close
field.
-
base
Sets the address of the specifiedByteBuffer
to thebase
field. -
size
Sets the specified value to thesize
field. -
pos
Sets the specified value to thepos
field. -
descriptor
Copies the specifiedFT_StreamDesc
to thedescriptor
field. -
descriptor
Passes thedescriptor
field to the specifiedConsumer
. -
pathname
Copies the specifiedFT_StreamDesc
to thepathname
field. -
pathname
Passes thepathname
field to the specifiedConsumer
. -
read
Sets the specified value to theread
field. -
close$
Sets the specified value to theclose
field. -
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_Stream
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newFT_Stream
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newFT_Stream
instance allocated withBufferUtils
. -
create
Returns a newFT_Stream
instance for the specified memory address. -
createSafe
-
malloc
Returns a newFT_Stream.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newFT_Stream.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newFT_Stream.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aFT_Stream.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newFT_Stream
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newFT_Stream
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newFT_Stream.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newFT_Stream.Buffer
instance allocated on the specifiedMemoryStack
and 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 thesize
field 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$
-