Package org.lwjgl.nuklear
Class NkUserFont
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<NkUserFont>
org.lwjgl.nuklear.NkUserFont
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class NkUserFont
extends org.lwjgl.system.Struct<NkUserFont>
implements org.lwjgl.system.NativeResource
Layout
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
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.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, org.lwjgl.system.MemoryStack stack) Returns a newNkUserFont.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkUserFontcalloc(org.lwjgl.system.MemoryStack stack) Returns a newNkUserFontinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkUserFontDeprecated.static NkUserFont.BuffercallocStack(int capacity) Deprecated.static NkUserFont.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static NkUserFontcallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.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()max height of the fontheight(float value) Sets the specified value to theheight()field.static NkUserFontmalloc()Returns a newNkUserFontinstance allocated withmemAlloc.static NkUserFont.Buffermalloc(int capacity) Returns a newNkUserFont.Bufferinstance allocated withmemAlloc.static NkUserFont.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newNkUserFont.Bufferinstance allocated on the specifiedMemoryStack.static NkUserFontmalloc(org.lwjgl.system.MemoryStack stack) Returns a newNkUserFontinstance allocated on the specifiedMemoryStack.static NkUserFontDeprecated.static NkUserFont.BuffermallocStack(int capacity) Deprecated.static NkUserFont.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static NkUserFontmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.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()font glyph callback to query drawing infoquery(@Nullable NkQueryFontGlyphCallbackI value) Sets the specified value to thequery()field.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()texture()texture handle to the used font atlas or textureuserdata()user provided font handlePasses theuserdata()field to the specifiedConsumer.Copies the specifiedNkHandleto theuserdata()field.@Nullable NkTextWidthCallbackwidth()font string width in pixel callbackwidth(@Nullable NkTextWidthCallbackI value) Sets the specified value to thewidth()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods 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()- Specified by:
sizeofin classorg.lwjgl.system.Struct<NkUserFont>
-
userdata
user provided font handle -
height
public float height()max height of the font -
width
font string width in pixel callback -
query
font glyph callback to query drawing info -
texture
texture handle to the used font atlas or texture -
userdata
Copies the specifiedNkHandleto theuserdata()field. -
userdata
Passes theuserdata()field to the specifiedConsumer. -
height
Sets the specified value to theheight()field. -
width
Sets the specified value to thewidth()field. -
query
Sets the specified value to thequery()field. -
texture
-
texture
-
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
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static NkUserFont.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static NkUserFont.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
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.
-