Package org.lwjgl.nuklear
Class NkFont
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct nk_font {
struct nk_font * next;
struct nk_user_font handle;
struct nk_baked_font info;
float scale;
struct nk_font_glyph * glyphs;
struct nk_font_glyph const * fallback;
nk_rune fallback_codepoint;
nk_handle texture;
struct nk_font_config * config;
}-
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 member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.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.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionNkFont(ByteBuffer container) Creates aNkFontinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic NkFontcalloc()Returns a newNkFontinstance allocated withmemCalloc.static NkFont.Buffercalloc(int capacity) Returns a newNkFont.Bufferinstance allocated withmemCalloc.static NkFont.Buffercalloc(int capacity, MemoryStack stack) Returns a newNkFont.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkFontcalloc(MemoryStack stack) Returns a newNkFontinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.@Nullable NkFontConfigconfig()config(@Nullable NkFontConfig value) Sets the address of the specifiedNkFontConfigto theconfigfield.static NkFontcreate()Returns a newNkFontinstance allocated withBufferUtils.static NkFont.Buffercreate(int capacity) Returns a newNkFont.Bufferinstance allocated withBufferUtils.static NkFontcreate(long address) Returns a newNkFontinstance for the specified memory address.static NkFont.Buffercreate(long address, int capacity) Create aNkFont.Bufferinstance at the specified memory.static @Nullable NkFontcreateSafe(long address) static @Nullable NkFont.BuffercreateSafe(long address, int capacity) @Nullable NkFontGlyphfallback()fallback(@Nullable NkFontGlyph value) Sets the address of the specifiedNkFontGlyphto thefallbackfield.intfallback_codepoint(int value) Sets the specified value to thefallback_codepointfield.@Nullable NkFontGlyphglyphs()glyphs(@Nullable NkFontGlyph value) Sets the address of the specifiedNkFontGlyphto theglyphsfield.handle()handle(Consumer<NkUserFont> consumer) Passes thehandlefield to the specifiedConsumer.handle(NkUserFont value) Copies the specifiedNkUserFontto thehandlefield.info()info(Consumer<NkBakedFont> consumer) Passes theinfofield to the specifiedConsumer.info(NkBakedFont value) Copies the specifiedNkBakedFontto theinfofield.static NkFontmalloc()Returns a newNkFontinstance allocated withmemAlloc.static NkFont.Buffermalloc(int capacity) Returns a newNkFont.Bufferinstance allocated withmemAlloc.static NkFont.Buffermalloc(int capacity, MemoryStack stack) Returns a newNkFont.Bufferinstance allocated on the specifiedMemoryStack.static NkFontmalloc(MemoryStack stack) Returns a newNkFontinstance allocated on the specifiedMemoryStack.static @Nullable NkFontConfignconfig(long struct) Unsafe version ofconfig().static voidnconfig(long struct, @Nullable NkFontConfig value) Unsafe version ofconfig.@Nullable NkFontnext()Sets the address of the specifiedNkFontto thenextfield.static @Nullable NkFontGlyphnfallback(long struct) Unsafe version offallback().static voidnfallback(long struct, @Nullable NkFontGlyph value) Unsafe version offallback.static intnfallback_codepoint(long struct) Unsafe version offallback_codepoint().static voidnfallback_codepoint(long struct, int value) Unsafe version offallback_codepoint.static @Nullable NkFontGlyphnglyphs(long struct) Unsafe version ofglyphs().static voidnglyphs(long struct, @Nullable NkFontGlyph value) Unsafe version ofglyphs.static NkUserFontnhandle(long struct) Unsafe version ofhandle().static voidnhandle(long struct, NkUserFont value) Unsafe version ofhandle.static NkBakedFontninfo(long struct) Unsafe version ofinfo().static voidninfo(long struct, NkBakedFont value) Unsafe version ofinfo.static @Nullable NkFontnnext(long struct) Unsafe version ofnext().static voidUnsafe version ofnext.static floatnscale(long struct) Unsafe version ofscale().static voidnscale(long struct, float value) Unsafe version ofscale.static NkHandlentexture(long struct) Unsafe version oftexture().static voidUnsafe version oftexture.floatscale()scale(float value) Sets the specified value to thescalefield.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.intsizeof()Returnssizeof(struct).texture()Passes thetexturefield to the specifiedConsumer.Copies the specifiedNkHandleto thetexturefield.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. -
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 aNkFontinstance 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). -
next
- Returns:
- a
NkFontview of the struct pointed to by thenextfield.
-
handle
- Returns:
- a
NkUserFontview of thehandlefield.
-
info
- Returns:
- a
NkBakedFontview of theinfofield.
-
scale
public float scale()- Returns:
- the value of the
scalefield.
-
glyphs
- Returns:
- a
NkFontGlyphview of the struct pointed to by theglyphsfield.
-
fallback
- Returns:
- a
NkFontGlyphview of the struct pointed to by thefallbackfield.
-
fallback_codepoint
public int fallback_codepoint()- Returns:
- the value of the
fallback_codepointfield.
-
texture
- Returns:
- a
NkHandleview of thetexturefield.
-
config
- Returns:
- a
NkFontConfigview of the struct pointed to by theconfigfield.
-
next
Sets the address of the specifiedNkFontto thenextfield. -
handle
Copies the specifiedNkUserFontto thehandlefield. -
handle
Passes thehandlefield to the specifiedConsumer. -
info
Copies the specifiedNkBakedFontto theinfofield. -
info
Passes theinfofield to the specifiedConsumer. -
scale
Sets the specified value to thescalefield. -
glyphs
Sets the address of the specifiedNkFontGlyphto theglyphsfield. -
fallback
Sets the address of the specifiedNkFontGlyphto thefallbackfield. -
fallback_codepoint
Sets the specified value to thefallback_codepointfield. -
texture
Copies the specifiedNkHandleto thetexturefield. -
texture
Passes thetexturefield to the specifiedConsumer. -
config
Sets the address of the specifiedNkFontConfigto theconfigfield. -
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 newNkFontinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newNkFontinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newNkFontinstance allocated withBufferUtils. -
create
Returns a newNkFontinstance for the specified memory address. -
createSafe
-
malloc
Returns a newNkFont.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newNkFont.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newNkFont.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aNkFont.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newNkFontinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newNkFontinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newNkFont.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newNkFont.Bufferinstance allocated on the specifiedMemoryStackand 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.
-