Package org.lwjgl.util.freetype
Class FT_Generic
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct FT_Generic {
void * data;
{@link FT_Generic_FinalizerI FT_Generic_Finalizer} finalizer;
}-
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 size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionFT_Generic(ByteBuffer container) Creates aFT_Genericinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic FT_Genericcalloc()Returns a newFT_Genericinstance allocated withmemCalloc.static FT_Generic.Buffercalloc(int capacity) Returns a newFT_Generic.Bufferinstance allocated withmemCalloc.static FT_Generic.Buffercalloc(int capacity, MemoryStack stack) Returns a newFT_Generic.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static FT_Genericcalloc(MemoryStack stack) Returns a newFT_Genericinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static FT_Genericcreate()Returns a newFT_Genericinstance allocated withBufferUtils.static FT_Generic.Buffercreate(int capacity) Returns a newFT_Generic.Bufferinstance allocated withBufferUtils.static FT_Genericcreate(long address) Returns a newFT_Genericinstance for the specified memory address.static FT_Generic.Buffercreate(long address, int capacity) Create aFT_Generic.Bufferinstance at the specified memory.static @Nullable FT_GenericcreateSafe(long address) static @Nullable FT_Generic.BuffercreateSafe(long address, int capacity) longdata()data(long value) Sets the specified value to thedatafield.finalizer(FT_Generic_FinalizerI value) Sets the specified value to thefinalizerfield.static FT_Genericmalloc()Returns a newFT_Genericinstance allocated withmemAlloc.static FT_Generic.Buffermalloc(int capacity) Returns a newFT_Generic.Bufferinstance allocated withmemAlloc.static FT_Generic.Buffermalloc(int capacity, MemoryStack stack) Returns a newFT_Generic.Bufferinstance allocated on the specifiedMemoryStack.static FT_Genericmalloc(MemoryStack stack) Returns a newFT_Genericinstance allocated on the specifiedMemoryStack.static longndata(long struct) Unsafe version ofdata().static voidndata(long struct, long value) Unsafe version ofdata.static FT_Generic_Finalizernfinalizer(long struct) Unsafe version offinalizer().static voidnfinalizer(long struct, FT_Generic_FinalizerI value) Unsafe version offinalizer.set(long data, FT_Generic_FinalizerI finalizer) Initializes this struct with the specified values.set(FT_Generic src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).static voidvalidate(long struct) Validates pointer members that should not beNULL.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. -
DATA
public static final int DATAThe struct member offsets. -
FINALIZER
public static final int FINALIZERThe struct member offsets.
-
-
Constructor Details
-
FT_Generic
Creates aFT_Genericinstance 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).- Specified by:
sizeofin classStruct<FT_Generic>
-
data
public long data()- Returns:
- the value of the
datafield.
-
finalizer
- Returns:
- the value of the
finalizerfield.
-
data
Sets the specified value to thedatafield. -
finalizer
Sets the specified value to thefinalizerfield. -
set
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_Genericinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newFT_Genericinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newFT_Genericinstance allocated withBufferUtils. -
create
Returns a newFT_Genericinstance for the specified memory address. -
createSafe
-
malloc
Returns a newFT_Generic.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newFT_Generic.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newFT_Generic.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aFT_Generic.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newFT_Genericinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newFT_Genericinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newFT_Generic.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newFT_Generic.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ndata
public static long ndata(long struct) Unsafe version ofdata(). -
nfinalizer
Unsafe version offinalizer(). -
ndata
public static void ndata(long struct, long value) Unsafe version ofdata. -
nfinalizer
Unsafe version offinalizer. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-