Package org.lwjgl.nuklear
Class NkFontAtlas
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct nk_font_atlas {
void * pixel;
int tex_width;
int tex_height;
struct nk_allocator permanent;
struct nk_allocator temporary;
struct nk_recti custom;
struct nk_cursor cursors[7];
int glyph_count;
struct nk_font_glyph * glyphs;
struct nk_font * default_font;
struct nk_font * fonts;
struct nk_font_config * config;
int font_num;
}-
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 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
ConstructorsConstructorDescriptionNkFontAtlas(ByteBuffer container) Creates aNkFontAtlasinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic NkFontAtlascalloc()Returns a newNkFontAtlasinstance allocated withmemCalloc.static NkFontAtlas.Buffercalloc(int capacity) Returns a newNkFontAtlas.Bufferinstance allocated withmemCalloc.static NkFontAtlas.Buffercalloc(int capacity, MemoryStack stack) Returns a newNkFontAtlas.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkFontAtlascalloc(MemoryStack stack) Returns a newNkFontAtlasinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.@Nullable NkFontConfigconfig()config(@Nullable NkFontConfig value) Sets the address of the specifiedNkFontConfigto theconfigfield.static NkFontAtlascreate()Returns a newNkFontAtlasinstance allocated withBufferUtils.static NkFontAtlas.Buffercreate(int capacity) Returns a newNkFontAtlas.Bufferinstance allocated withBufferUtils.static NkFontAtlascreate(long address) Returns a newNkFontAtlasinstance for the specified memory address.static NkFontAtlas.Buffercreate(long address, int capacity) Create aNkFontAtlas.Bufferinstance at the specified memory.static @Nullable NkFontAtlascreateSafe(long address) static @Nullable NkFontAtlas.BuffercreateSafe(long address, int capacity) cursors()cursors(int index) Copies the specifiedNkCursorat the specified index of thecursorsfield.cursors(Consumer<NkCursor.Buffer> consumer) Passes thecursorsfield to the specifiedConsumer.cursors(NkCursor.Buffer value) Copies the specifiedNkCursor.Bufferto thecursorsfield.custom()Passes thecustomfield to the specifiedConsumer.Copies the specifiedNkRectito thecustomfield.@Nullable NkFontdefault_font(@Nullable NkFont value) Sets the address of the specifiedNkFontto thedefault_fontfield.intfont_num()font_num(int value) Sets the specified value to thefont_numfield.@Nullable NkFontfonts()Sets the address of the specifiedNkFontto thefontsfield.intglyph_count(int value) Sets the specified value to theglyph_countfield.@Nullable NkFontGlyph.Bufferglyphs()glyphs(@Nullable NkFontGlyph.Buffer value) Sets the address of the specifiedNkFontGlyph.Bufferto theglyphsfield.static NkFontAtlasmalloc()Returns a newNkFontAtlasinstance allocated withmemAlloc.static NkFontAtlas.Buffermalloc(int capacity) Returns a newNkFontAtlas.Bufferinstance allocated withmemAlloc.static NkFontAtlas.Buffermalloc(int capacity, MemoryStack stack) Returns a newNkFontAtlas.Bufferinstance allocated on the specifiedMemoryStack.static NkFontAtlasmalloc(MemoryStack stack) Returns a newNkFontAtlasinstance allocated on the specifiedMemoryStack.static @Nullable NkFontConfignconfig(long struct) Unsafe version ofconfig().static voidnconfig(long struct, @Nullable NkFontConfig value) Unsafe version ofconfig.static NkCursor.Bufferncursors(long struct) Unsafe version ofcursors().static NkCursorncursors(long struct, int index) Unsafe version ofcursors.static voidUnsafe version ofcursors.static voidncursors(long struct, NkCursor.Buffer value) Unsafe version ofcursors.static NkRectincustom(long struct) Unsafe version ofcustom().static voidUnsafe version ofcustom.static @Nullable NkFontndefault_font(long struct) Unsafe version ofdefault_font().static voidndefault_font(long struct, @Nullable NkFont value) Unsafe version ofdefault_font.static intnfont_num(long struct) Unsafe version offont_num().static voidnfont_num(long struct, int value) Unsafe version offont_num.static @Nullable NkFontnfonts(long struct) Unsafe version offonts().static voidUnsafe version offonts.static intnglyph_count(long struct) Unsafe version ofglyph_count().static voidnglyph_count(long struct, int value) Sets the specified value to theglyph_countfield of the specifiedstruct.static @Nullable NkFontGlyph.Buffernglyphs(long struct) Unsafe version ofglyphs().static voidnglyphs(long struct, @Nullable NkFontGlyph.Buffer value) Unsafe version ofglyphs.static NkAllocatornpermanent(long struct) Unsafe version ofpermanent().static voidnpermanent(long struct, NkAllocator value) Unsafe version ofpermanent.static @Nullable ByteBuffernpixel(long struct) Unsafe version ofpixel.static voidnpixel(long struct, @Nullable ByteBuffer value) Unsafe version ofpixel.static NkAllocatorntemporary(long struct) Unsafe version oftemporary().static voidntemporary(long struct, NkAllocator value) Unsafe version oftemporary.static intntex_height(long struct) Unsafe version oftex_height().static voidntex_height(long struct, int value) Sets the specified value to thetex_heightfield of the specifiedstruct.static intntex_width(long struct) Unsafe version oftex_width().static voidntex_width(long struct, int value) Sets the specified value to thetex_widthfield of the specifiedstruct.permanent(Consumer<NkAllocator> consumer) Passes thepermanentfield to the specifiedConsumer.permanent(NkAllocator value) Copies the specifiedNkAllocatorto thepermanentfield.@Nullable ByteBufferpixel()pixel(@Nullable ByteBuffer value) Sets the address of the specifiedByteBufferto thepixelfield.set(@Nullable ByteBuffer pixel, int tex_width, int tex_height, NkAllocator permanent, NkAllocator temporary, NkRecti custom, NkCursor.Buffer cursors, int glyph_count, @Nullable NkFontGlyph.Buffer glyphs, @Nullable NkFont default_font, @Nullable NkFont fonts, @Nullable NkFontConfig config, int font_num) Initializes this struct with the specified values.set(NkFontAtlas src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).temporary(Consumer<NkAllocator> consumer) Passes thetemporaryfield to the specifiedConsumer.temporary(NkAllocator value) Copies the specifiedNkAllocatorto thetemporaryfield.inttex_height(int value) Sets the specified value to thetex_heightfield.inttex_width(int value) Sets the specified value to thetex_widthfield.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. -
PIXEL
public static final int PIXELThe struct member offsets. -
TEX_WIDTH
public static final int TEX_WIDTHThe struct member offsets. -
TEX_HEIGHT
public static final int TEX_HEIGHTThe struct member offsets. -
PERMANENT
public static final int PERMANENTThe struct member offsets. -
TEMPORARY
public static final int TEMPORARYThe struct member offsets. -
CUSTOM
public static final int CUSTOMThe struct member offsets. -
CURSORS
public static final int CURSORSThe struct member offsets. -
GLYPH_COUNT
public static final int GLYPH_COUNTThe struct member offsets. -
GLYPHS
public static final int GLYPHSThe struct member offsets. -
DEFAULT_FONT
public static final int DEFAULT_FONTThe struct member offsets. -
FONTS
public static final int FONTSThe struct member offsets. -
CONFIG
public static final int CONFIGThe struct member offsets. -
FONT_NUM
public static final int FONT_NUMThe struct member offsets.
-
-
Constructor Details
-
NkFontAtlas
Creates aNkFontAtlasinstance 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<NkFontAtlas>
-
pixel
- Returns:
- a
ByteBufferview of the data pointed to by thepixelfield.
-
tex_width
public int tex_width()- Returns:
- the value of the
tex_widthfield.
-
tex_height
public int tex_height()- Returns:
- the value of the
tex_heightfield.
-
permanent
- Returns:
- a
NkAllocatorview of thepermanentfield.
-
temporary
- Returns:
- a
NkAllocatorview of thetemporaryfield.
-
custom
- Returns:
- a
NkRectiview of thecustomfield.
-
cursors
- Returns:
- a
NkCursor.Buffer view of thecursorsfield.
-
cursors
- Returns:
- a
NkCursorview of the struct at the specified index of thecursorsfield.
-
glyph_count
public int glyph_count()- Returns:
- the value of the
glyph_countfield.
-
glyphs
- Returns:
- a
NkFontGlyph.Bufferview of the struct array pointed to by theglyphsfield.
-
default_font
- Returns:
- a
NkFontview of the struct pointed to by thedefault_fontfield.
-
fonts
- Returns:
- a
NkFontview of the struct pointed to by thefontsfield.
-
config
- Returns:
- a
NkFontConfigview of the struct pointed to by theconfigfield.
-
font_num
public int font_num()- Returns:
- the value of the
font_numfield.
-
pixel
Sets the address of the specifiedByteBufferto thepixelfield. -
tex_width
Sets the specified value to thetex_widthfield. -
tex_height
Sets the specified value to thetex_heightfield. -
permanent
Copies the specifiedNkAllocatorto thepermanentfield. -
permanent
Passes thepermanentfield to the specifiedConsumer. -
temporary
Copies the specifiedNkAllocatorto thetemporaryfield. -
temporary
Passes thetemporaryfield to the specifiedConsumer. -
custom
Copies the specifiedNkRectito thecustomfield. -
custom
Passes thecustomfield to the specifiedConsumer. -
cursors
Copies the specifiedNkCursor.Bufferto thecursorsfield. -
cursors
Copies the specifiedNkCursorat the specified index of thecursorsfield. -
cursors
Passes thecursorsfield to the specifiedConsumer. -
cursors
-
glyph_count
Sets the specified value to theglyph_countfield. -
glyphs
Sets the address of the specifiedNkFontGlyph.Bufferto theglyphsfield. -
default_font
Sets the address of the specifiedNkFontto thedefault_fontfield. -
fonts
Sets the address of the specifiedNkFontto thefontsfield. -
config
Sets the address of the specifiedNkFontConfigto theconfigfield. -
font_num
Sets the specified value to thefont_numfield. -
set
public NkFontAtlas set(@Nullable ByteBuffer pixel, int tex_width, int tex_height, NkAllocator permanent, NkAllocator temporary, NkRecti custom, NkCursor.Buffer cursors, int glyph_count, @Nullable NkFontGlyph.Buffer glyphs, @Nullable NkFont default_font, @Nullable NkFont fonts, @Nullable NkFontConfig config, int font_num) 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 newNkFontAtlasinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newNkFontAtlasinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newNkFontAtlasinstance allocated withBufferUtils. -
create
Returns a newNkFontAtlasinstance for the specified memory address. -
createSafe
-
malloc
Returns a newNkFontAtlas.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newNkFontAtlas.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newNkFontAtlas.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aNkFontAtlas.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newNkFontAtlasinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newNkFontAtlasinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newNkFontAtlas.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newNkFontAtlas.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
npixel
Unsafe version ofpixel. -
ntex_width
public static int ntex_width(long struct) Unsafe version oftex_width(). -
ntex_height
public static int ntex_height(long struct) Unsafe version oftex_height(). -
npermanent
Unsafe version ofpermanent(). -
ntemporary
Unsafe version oftemporary(). -
ncustom
Unsafe version ofcustom(). -
ncursors
Unsafe version ofcursors(). -
ncursors
Unsafe version ofcursors. -
nglyph_count
public static int nglyph_count(long struct) Unsafe version ofglyph_count(). -
nglyphs
Unsafe version ofglyphs(). -
ndefault_font
Unsafe version ofdefault_font(). -
nfonts
Unsafe version offonts(). -
nconfig
Unsafe version ofconfig(). -
nfont_num
public static int nfont_num(long struct) Unsafe version offont_num(). -
npixel
Unsafe version ofpixel. -
ntex_width
public static void ntex_width(long struct, int value) Sets the specified value to thetex_widthfield of the specifiedstruct. -
ntex_height
public static void ntex_height(long struct, int value) Sets the specified value to thetex_heightfield of the specifiedstruct. -
npermanent
Unsafe version ofpermanent. -
ntemporary
Unsafe version oftemporary. -
ncustom
Unsafe version ofcustom. -
ncursors
Unsafe version ofcursors. -
ncursors
Unsafe version ofcursors. -
nglyph_count
public static void nglyph_count(long struct, int value) Sets the specified value to theglyph_countfield of the specifiedstruct. -
nglyphs
Unsafe version ofglyphs. -
ndefault_font
Unsafe version ofdefault_font. -
nfonts
Unsafe version offonts. -
nconfig
Unsafe version ofconfig. -
nfont_num
public static void nfont_num(long struct, int value) Unsafe version offont_num.
-