Package org.lwjgl.nuklear
Class NkUserFont
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct nk_user_font {
nk_handle userdata;
float height;
nk_text_width_f width;
nk_query_font_glyph_f query;
nk_handle texture;
}-
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.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionNkUserFont(ByteBuffer container) Creates aNkUserFontinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic NkUserFontcalloc()Returns a newNkUserFontinstance allocated withmemCalloc.static NkUserFont.Buffercalloc(int capacity) Returns a newNkUserFont.Bufferinstance allocated withmemCalloc.static NkUserFont.Buffercalloc(int capacity, MemoryStack stack) Returns a newNkUserFont.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkUserFontcalloc(MemoryStack stack) Returns a newNkUserFontinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkUserFontcreate()Returns a newNkUserFontinstance allocated withBufferUtils.static NkUserFont.Buffercreate(int capacity) Returns a newNkUserFont.Bufferinstance allocated withBufferUtils.static NkUserFontcreate(long address) Returns a newNkUserFontinstance for the specified memory address.static NkUserFont.Buffercreate(long address, int capacity) Create aNkUserFont.Bufferinstance at the specified memory.static @Nullable NkUserFontcreateSafe(long address) static @Nullable NkUserFont.BuffercreateSafe(long address, int capacity) floatheight()height(float value) Sets the specified value to theheightfield.static NkUserFontmalloc()Returns a newNkUserFontinstance allocated withmemAlloc.static NkUserFont.Buffermalloc(int capacity) Returns a newNkUserFont.Bufferinstance allocated withmemAlloc.static NkUserFont.Buffermalloc(int capacity, MemoryStack stack) Returns a newNkUserFont.Bufferinstance allocated on the specifiedMemoryStack.static NkUserFontmalloc(MemoryStack stack) Returns a newNkUserFontinstance allocated on the specifiedMemoryStack.static floatnheight(long struct) Unsafe version ofheight().static voidnheight(long struct, float value) Unsafe version ofheight.static @Nullable NkQueryFontGlyphCallbacknquery(long struct) Unsafe version ofquery().static voidnquery(long struct, @Nullable NkQueryFontGlyphCallbackI value) Unsafe version ofquery.static NkHandlentexture(long struct) Unsafe version oftexture().static voidUnsafe version oftexture.static NkHandlenuserdata(long struct) Unsafe version ofuserdata().static voidUnsafe version ofuserdata.static @Nullable NkTextWidthCallbacknwidth(long struct) Unsafe version ofwidth().static voidnwidth(long struct, @Nullable NkTextWidthCallbackI value) Unsafe version ofwidth.@Nullable NkQueryFontGlyphCallbackquery()query(@Nullable NkQueryFontGlyphCallbackI value) Sets the specified value to thequeryfield.set(NkHandle userdata, float height, NkTextWidthCallbackI width, NkQueryFontGlyphCallbackI query, NkHandle texture) Initializes this struct with the specified values.set(NkUserFont src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).texture()Passes thetexturefield to the specifiedConsumer.Copies the specifiedNkHandleto thetexturefield.userdata()Passes theuserdatafield to the specifiedConsumer.Copies the specifiedNkHandleto theuserdatafield.@Nullable NkTextWidthCallbackwidth()width(@Nullable NkTextWidthCallbackI value) Sets the specified value to thewidthfield.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. -
USERDATA
public static final int USERDATAThe struct member offsets. -
HEIGHT
public static final int HEIGHTThe struct member offsets. -
WIDTH
public static final int WIDTHThe struct member offsets. -
QUERY
public static final int QUERYThe struct member offsets. -
TEXTURE
public static final int TEXTUREThe struct member offsets.
-
-
Constructor Details
-
NkUserFont
Creates aNkUserFontinstance 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<NkUserFont>
-
userdata
- Returns:
- a
NkHandleview of theuserdatafield.
-
height
public float height()- Returns:
- the value of the
heightfield.
-
width
- Returns:
- the value of the
widthfield.
-
query
- Returns:
- the value of the
queryfield.
-
texture
- Returns:
- a
NkHandleview of thetexturefield.
-
userdata
Copies the specifiedNkHandleto theuserdatafield. -
userdata
Passes theuserdatafield to the specifiedConsumer. -
height
Sets the specified value to theheightfield. -
width
Sets the specified value to thewidthfield. -
query
Sets the specified value to thequeryfield. -
texture
Copies the specifiedNkHandleto thetexturefield. -
texture
Passes thetexturefield to the specifiedConsumer. -
set
public NkUserFont set(NkHandle userdata, float height, NkTextWidthCallbackI width, NkQueryFontGlyphCallbackI query, NkHandle texture) 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 newNkUserFontinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newNkUserFontinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newNkUserFontinstance allocated withBufferUtils. -
create
Returns a newNkUserFontinstance for the specified memory address. -
createSafe
-
malloc
Returns a newNkUserFont.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newNkUserFont.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newNkUserFont.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aNkUserFont.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newNkUserFontinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newNkUserFontinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newNkUserFont.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newNkUserFont.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nuserdata
Unsafe version ofuserdata(). -
nheight
public static float nheight(long struct) Unsafe version ofheight(). -
nwidth
Unsafe version ofwidth(). -
nquery
Unsafe version ofquery(). -
ntexture
Unsafe version oftexture(). -
nuserdata
Unsafe version ofuserdata. -
nheight
public static void nheight(long struct, float value) Unsafe version ofheight. -
nwidth
Unsafe version ofwidth. -
nquery
Unsafe version ofquery. -
ntexture
Unsafe version oftexture.
-