Package org.lwjgl.nuklear
Class NkUserFont
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct nk_user_font {
{@link NkHandle nk_handle} userdata;
float height;
{@link NkTextWidthCallbackI nk_text_width_f} width;
{@link NkQueryFontGlyphCallbackI nk_query_font_glyph_f} query;
{@link NkHandle nk_handle} texture;
}
-
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 size in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The 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 aNkUserFont
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic NkUserFont
calloc()
Returns a newNkUserFont
instance allocated withmemCalloc
.static NkUserFont.Buffer
calloc
(int capacity) Returns a newNkUserFont.Buffer
instance allocated withmemCalloc
.static NkUserFont.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newNkUserFont.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkUserFont
calloc
(MemoryStack stack) Returns a newNkUserFont
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkUserFont
Deprecated.static NkUserFont.Buffer
callocStack
(int capacity) Deprecated.static NkUserFont.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static NkUserFont
callocStack
(MemoryStack stack) Deprecated.static NkUserFont
create()
Returns a newNkUserFont
instance allocated withBufferUtils
.static NkUserFont.Buffer
create
(int capacity) Returns a newNkUserFont.Buffer
instance allocated withBufferUtils
.static NkUserFont
create
(long address) Returns a newNkUserFont
instance for the specified memory address.static NkUserFont.Buffer
create
(long address, int capacity) Create aNkUserFont.Buffer
instance at the specified memory.static @Nullable NkUserFont
createSafe
(long address) static @Nullable NkUserFont.Buffer
createSafe
(long address, int capacity) float
height()
height
(float value) Sets the specified value to theheight
field.static NkUserFont
malloc()
Returns a newNkUserFont
instance allocated withmemAlloc
.static NkUserFont.Buffer
malloc
(int capacity) Returns a newNkUserFont.Buffer
instance allocated withmemAlloc
.static NkUserFont.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newNkUserFont.Buffer
instance allocated on the specifiedMemoryStack
.static NkUserFont
malloc
(MemoryStack stack) Returns a newNkUserFont
instance allocated on the specifiedMemoryStack
.static NkUserFont
Deprecated.static NkUserFont.Buffer
mallocStack
(int capacity) Deprecated.static NkUserFont.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static NkUserFont
mallocStack
(MemoryStack stack) Deprecated.static float
nheight
(long struct) Unsafe version ofheight()
.static void
nheight
(long struct, float value) Unsafe version ofheight
.static @Nullable NkQueryFontGlyphCallback
nquery
(long struct) Unsafe version ofquery()
.static void
nquery
(long struct, @Nullable NkQueryFontGlyphCallbackI value) Unsafe version ofquery
.static NkHandle
ntexture
(long struct) Unsafe version oftexture()
.static void
Unsafe version oftexture
.static NkHandle
nuserdata
(long struct) Unsafe version ofuserdata()
.static void
Unsafe version ofuserdata
.static @Nullable NkTextWidthCallback
nwidth
(long struct) Unsafe version ofwidth()
.static void
nwidth
(long struct, @Nullable NkTextWidthCallbackI value) Unsafe version ofwidth
.@Nullable NkQueryFontGlyphCallback
query()
query
(@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.int
sizeof()
Returnssizeof(struct)
.texture()
Passes thetexture
field to the specifiedConsumer
.Copies the specifiedNkHandle
to thetexture
field.userdata()
Passes theuserdata
field to the specifiedConsumer
.Copies the specifiedNkHandle
to theuserdata
field.@Nullable NkTextWidthCallback
width()
width
(@Nullable NkTextWidthCallbackI value) Sets the specified value to thewidth
field.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. -
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 aNkUserFont
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)
.- Specified by:
sizeof
in classStruct<NkUserFont>
-
userdata
- Returns:
- a
NkHandle
view of theuserdata
field.
-
height
public float height()- Returns:
- the value of the
height
field.
-
width
- Returns:
- the value of the
width
field.
-
query
- Returns:
- the value of the
query
field.
-
texture
- Returns:
- a
NkHandle
view of thetexture
field.
-
userdata
Copies the specifiedNkHandle
to 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
Copies the specifiedNkHandle
to thetexture
field. -
texture
Passes thetexture
field 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 newNkUserFont
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newNkUserFont
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newNkUserFont
instance allocated withBufferUtils
. -
create
Returns a newNkUserFont
instance for the specified memory address. -
createSafe
-
malloc
Returns a newNkUserFont.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newNkUserFont.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newNkUserFont.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aNkUserFont.Buffer
instance 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.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newNkUserFont
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newNkUserFont
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newNkUserFont.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newNkUserFont.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-