Package org.lwjgl.nuklear
Class NkFont
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct nk_font {
{@link NkFont struct nk_font} * next;
{@link NkUserFont struct nk_user_font} handle;
{@link NkBakedFont struct nk_baked_font} info;
float scale;
{@link NkFontGlyph struct nk_font_glyph} * glyphs;
{@link NkFontGlyph struct nk_font_glyph} const * fallback;
nk_rune fallback_codepoint;
{@link NkHandle nk_handle} texture;
{@link NkFontConfig struct nk_font_config} * config;
}
-
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 size in bytes.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
ConstructorsConstructorDescriptionNkFont
(ByteBuffer container) Creates aNkFont
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic NkFont
calloc()
Returns a newNkFont
instance allocated withmemCalloc
.static NkFont.Buffer
calloc
(int capacity) Returns a newNkFont.Buffer
instance allocated withmemCalloc
.static NkFont.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newNkFont.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkFont
calloc
(MemoryStack stack) Returns a newNkFont
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.@Nullable NkFontConfig
config()
config
(@Nullable NkFontConfig value) Sets the address of the specifiedNkFontConfig
to theconfig
field.static NkFont
create()
Returns a newNkFont
instance allocated withBufferUtils
.static NkFont.Buffer
create
(int capacity) Returns a newNkFont.Buffer
instance allocated withBufferUtils
.static NkFont
create
(long address) Returns a newNkFont
instance for the specified memory address.static NkFont.Buffer
create
(long address, int capacity) Create aNkFont.Buffer
instance at the specified memory.static @Nullable NkFont
createSafe
(long address) static @Nullable NkFont.Buffer
createSafe
(long address, int capacity) @Nullable NkFontGlyph
fallback()
fallback
(@Nullable NkFontGlyph value) Sets the address of the specifiedNkFontGlyph
to thefallback
field.int
fallback_codepoint
(int value) Sets the specified value to thefallback_codepoint
field.@Nullable NkFontGlyph
glyphs()
glyphs
(@Nullable NkFontGlyph value) Sets the address of the specifiedNkFontGlyph
to theglyphs
field.handle()
handle
(Consumer<NkUserFont> consumer) Passes thehandle
field to the specifiedConsumer
.handle
(NkUserFont value) Copies the specifiedNkUserFont
to thehandle
field.info()
info
(Consumer<NkBakedFont> consumer) Passes theinfo
field to the specifiedConsumer
.info
(NkBakedFont value) Copies the specifiedNkBakedFont
to theinfo
field.static NkFont
malloc()
Returns a newNkFont
instance allocated withmemAlloc
.static NkFont.Buffer
malloc
(int capacity) Returns a newNkFont.Buffer
instance allocated withmemAlloc
.static NkFont.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newNkFont.Buffer
instance allocated on the specifiedMemoryStack
.static NkFont
malloc
(MemoryStack stack) Returns a newNkFont
instance allocated on the specifiedMemoryStack
.static @Nullable NkFontConfig
nconfig
(long struct) Unsafe version ofconfig()
.static void
nconfig
(long struct, @Nullable NkFontConfig value) Unsafe version ofconfig
.@Nullable NkFont
next()
Sets the address of the specifiedNkFont
to thenext
field.static @Nullable NkFontGlyph
nfallback
(long struct) Unsafe version offallback()
.static void
nfallback
(long struct, @Nullable NkFontGlyph value) Unsafe version offallback
.static int
nfallback_codepoint
(long struct) Unsafe version offallback_codepoint()
.static void
nfallback_codepoint
(long struct, int value) Unsafe version offallback_codepoint
.static @Nullable NkFontGlyph
nglyphs
(long struct) Unsafe version ofglyphs()
.static void
nglyphs
(long struct, @Nullable NkFontGlyph value) Unsafe version ofglyphs
.static NkUserFont
nhandle
(long struct) Unsafe version ofhandle()
.static void
nhandle
(long struct, NkUserFont value) Unsafe version ofhandle
.static NkBakedFont
ninfo
(long struct) Unsafe version ofinfo()
.static void
ninfo
(long struct, NkBakedFont value) Unsafe version ofinfo
.static @Nullable NkFont
nnext
(long struct) Unsafe version ofnext()
.static void
Unsafe version ofnext
.static float
nscale
(long struct) Unsafe version ofscale()
.static void
nscale
(long struct, float value) Unsafe version ofscale
.static NkHandle
ntexture
(long struct) Unsafe version oftexture()
.static void
Unsafe version oftexture
.float
scale()
scale
(float value) Sets the specified value to thescale
field.set
(@Nullable NkFont next, NkUserFont handle, NkBakedFont info, float scale, @Nullable NkFontGlyph glyphs, @Nullable NkFontGlyph fallback, int fallback_codepoint, NkHandle texture, @Nullable NkFontConfig config) Initializes this struct with the specified values.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.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. -
NEXT
public static final int NEXTThe struct member offsets. -
HANDLE
public static final int HANDLEThe struct member offsets. -
INFO
public static final int INFOThe struct member offsets. -
SCALE
public static final int SCALEThe struct member offsets. -
GLYPHS
public static final int GLYPHSThe struct member offsets. -
FALLBACK
public static final int FALLBACKThe struct member offsets. -
FALLBACK_CODEPOINT
public static final int FALLBACK_CODEPOINTThe struct member offsets. -
TEXTURE
public static final int TEXTUREThe struct member offsets. -
CONFIG
public static final int CONFIGThe struct member offsets.
-
-
Constructor Details
-
NkFont
Creates aNkFont
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)
. -
next
- Returns:
- a
NkFont
view of the struct pointed to by thenext
field.
-
handle
- Returns:
- a
NkUserFont
view of thehandle
field.
-
info
- Returns:
- a
NkBakedFont
view of theinfo
field.
-
scale
public float scale()- Returns:
- the value of the
scale
field.
-
glyphs
- Returns:
- a
NkFontGlyph
view of the struct pointed to by theglyphs
field.
-
fallback
- Returns:
- a
NkFontGlyph
view of the struct pointed to by thefallback
field.
-
fallback_codepoint
public int fallback_codepoint()- Returns:
- the value of the
fallback_codepoint
field.
-
texture
- Returns:
- a
NkHandle
view of thetexture
field.
-
config
- Returns:
- a
NkFontConfig
view of the struct pointed to by theconfig
field.
-
next
Sets the address of the specifiedNkFont
to thenext
field. -
handle
Copies the specifiedNkUserFont
to thehandle
field. -
handle
Passes thehandle
field to the specifiedConsumer
. -
info
Copies the specifiedNkBakedFont
to theinfo
field. -
info
Passes theinfo
field to the specifiedConsumer
. -
scale
Sets the specified value to thescale
field. -
glyphs
Sets the address of the specifiedNkFontGlyph
to theglyphs
field. -
fallback
Sets the address of the specifiedNkFontGlyph
to thefallback
field. -
fallback_codepoint
Sets the specified value to thefallback_codepoint
field. -
texture
Copies the specifiedNkHandle
to thetexture
field. -
texture
Passes thetexture
field to the specifiedConsumer
. -
config
Sets the address of the specifiedNkFontConfig
to theconfig
field. -
set
public NkFont set(@Nullable NkFont next, NkUserFont handle, NkBakedFont info, float scale, @Nullable NkFontGlyph glyphs, @Nullable NkFontGlyph fallback, int fallback_codepoint, NkHandle texture, @Nullable NkFontConfig config) 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 newNkFont
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newNkFont
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newNkFont
instance allocated withBufferUtils
. -
create
Returns a newNkFont
instance for the specified memory address. -
createSafe
-
malloc
Returns a newNkFont.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newNkFont.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newNkFont.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aNkFont.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newNkFont
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newNkFont
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newNkFont.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newNkFont.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nnext
Unsafe version ofnext()
. -
nhandle
Unsafe version ofhandle()
. -
ninfo
Unsafe version ofinfo()
. -
nscale
public static float nscale(long struct) Unsafe version ofscale()
. -
nglyphs
Unsafe version ofglyphs()
. -
nfallback
Unsafe version offallback()
. -
nfallback_codepoint
public static int nfallback_codepoint(long struct) Unsafe version offallback_codepoint()
. -
ntexture
Unsafe version oftexture()
. -
nconfig
Unsafe version ofconfig()
. -
nnext
Unsafe version ofnext
. -
nhandle
Unsafe version ofhandle
. -
ninfo
Unsafe version ofinfo
. -
nscale
public static void nscale(long struct, float value) Unsafe version ofscale
. -
nglyphs
Unsafe version ofglyphs
. -
nfallback
Unsafe version offallback
. -
nfallback_codepoint
public static void nfallback_codepoint(long struct, int value) Unsafe version offallback_codepoint
. -
ntexture
Unsafe version oftexture
. -
nconfig
Unsafe version ofconfig
.
-