Package org.lwjgl.nuklear
Class NkFontAtlas
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct nk_font_atlas {
void * pixel;
int tex_width;
int tex_height;
{@link NkAllocator struct nk_allocator} permanent;
{@link NkAllocator struct nk_allocator} temporary;
{@link NkRecti struct nk_recti} custom;
{@link NkCursor struct nk_cursor} cursors[7];
int glyph_count;
{@link NkFontGlyph struct nk_font_glyph} * glyphs;
{@link NkFont struct nk_font} * default_font;
{@link NkFont struct nk_font} * fonts;
{@link NkFontConfig struct nk_font_config} * config;
int font_num;
}
-
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 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
ConstructorsConstructorDescriptionNkFontAtlas
(ByteBuffer container) Creates aNkFontAtlas
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic NkFontAtlas
calloc()
Returns a newNkFontAtlas
instance allocated withmemCalloc
.static NkFontAtlas.Buffer
calloc
(int capacity) Returns a newNkFontAtlas.Buffer
instance allocated withmemCalloc
.static NkFontAtlas.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newNkFontAtlas.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkFontAtlas
calloc
(MemoryStack stack) Returns a newNkFontAtlas
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 NkFontAtlas
create()
Returns a newNkFontAtlas
instance allocated withBufferUtils
.static NkFontAtlas.Buffer
create
(int capacity) Returns a newNkFontAtlas.Buffer
instance allocated withBufferUtils
.static NkFontAtlas
create
(long address) Returns a newNkFontAtlas
instance for the specified memory address.static NkFontAtlas.Buffer
create
(long address, int capacity) Create aNkFontAtlas.Buffer
instance at the specified memory.static @Nullable NkFontAtlas
createSafe
(long address) static @Nullable NkFontAtlas.Buffer
createSafe
(long address, int capacity) cursors()
cursors
(int index) Copies the specifiedNkCursor
at the specified index of thecursors
field.cursors
(Consumer<NkCursor.Buffer> consumer) Passes thecursors
field to the specifiedConsumer
.cursors
(NkCursor.Buffer value) Copies the specifiedNkCursor.Buffer
to thecursors
field.custom()
Passes thecustom
field to the specifiedConsumer
.Copies the specifiedNkRecti
to thecustom
field.@Nullable NkFont
default_font
(@Nullable NkFont value) Sets the address of the specifiedNkFont
to thedefault_font
field.int
font_num()
font_num
(int value) Sets the specified value to thefont_num
field.@Nullable NkFont
fonts()
Sets the address of the specifiedNkFont
to thefonts
field.int
glyph_count
(int value) Sets the specified value to theglyph_count
field.@Nullable NkFontGlyph.Buffer
glyphs()
glyphs
(@Nullable NkFontGlyph.Buffer value) Sets the address of the specifiedNkFontGlyph.Buffer
to theglyphs
field.static NkFontAtlas
malloc()
Returns a newNkFontAtlas
instance allocated withmemAlloc
.static NkFontAtlas.Buffer
malloc
(int capacity) Returns a newNkFontAtlas.Buffer
instance allocated withmemAlloc
.static NkFontAtlas.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newNkFontAtlas.Buffer
instance allocated on the specifiedMemoryStack
.static NkFontAtlas
malloc
(MemoryStack stack) Returns a newNkFontAtlas
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
.static NkCursor.Buffer
ncursors
(long struct) Unsafe version ofcursors()
.static NkCursor
ncursors
(long struct, int index) Unsafe version ofcursors
.static void
Unsafe version ofcursors
.static void
ncursors
(long struct, NkCursor.Buffer value) Unsafe version ofcursors
.static NkRecti
ncustom
(long struct) Unsafe version ofcustom()
.static void
Unsafe version ofcustom
.static @Nullable NkFont
ndefault_font
(long struct) Unsafe version ofdefault_font()
.static void
ndefault_font
(long struct, @Nullable NkFont value) Unsafe version ofdefault_font
.static int
nfont_num
(long struct) Unsafe version offont_num()
.static void
nfont_num
(long struct, int value) Unsafe version offont_num
.static @Nullable NkFont
nfonts
(long struct) Unsafe version offonts()
.static void
Unsafe version offonts
.static int
nglyph_count
(long struct) Unsafe version ofglyph_count()
.static void
nglyph_count
(long struct, int value) Sets the specified value to theglyph_count
field of the specifiedstruct
.static @Nullable NkFontGlyph.Buffer
nglyphs
(long struct) Unsafe version ofglyphs()
.static void
nglyphs
(long struct, @Nullable NkFontGlyph.Buffer value) Unsafe version ofglyphs
.static NkAllocator
npermanent
(long struct) Unsafe version ofpermanent()
.static void
npermanent
(long struct, NkAllocator value) Unsafe version ofpermanent
.static @Nullable ByteBuffer
npixel
(long struct) Unsafe version ofpixel
.static void
npixel
(long struct, @Nullable ByteBuffer value) Unsafe version ofpixel
.static NkAllocator
ntemporary
(long struct) Unsafe version oftemporary()
.static void
ntemporary
(long struct, NkAllocator value) Unsafe version oftemporary
.static int
ntex_height
(long struct) Unsafe version oftex_height()
.static void
ntex_height
(long struct, int value) Sets the specified value to thetex_height
field of the specifiedstruct
.static int
ntex_width
(long struct) Unsafe version oftex_width()
.static void
ntex_width
(long struct, int value) Sets the specified value to thetex_width
field of the specifiedstruct
.permanent
(Consumer<NkAllocator> consumer) Passes thepermanent
field to the specifiedConsumer
.permanent
(NkAllocator value) Copies the specifiedNkAllocator
to thepermanent
field.@Nullable ByteBuffer
pixel()
pixel
(@Nullable ByteBuffer value) Sets the address of the specifiedByteBuffer
to thepixel
field.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.int
sizeof()
Returnssizeof(struct)
.temporary
(Consumer<NkAllocator> consumer) Passes thetemporary
field to the specifiedConsumer
.temporary
(NkAllocator value) Copies the specifiedNkAllocator
to thetemporary
field.int
tex_height
(int value) Sets the specified value to thetex_height
field.int
tex_width
(int value) Sets the specified value to thetex_width
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. -
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 aNkFontAtlas
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<NkFontAtlas>
-
pixel
- Returns:
- a
ByteBuffer
view of the data pointed to by thepixel
field.
-
tex_width
public int tex_width()- Returns:
- the value of the
tex_width
field.
-
tex_height
public int tex_height()- Returns:
- the value of the
tex_height
field.
-
permanent
- Returns:
- a
NkAllocator
view of thepermanent
field.
-
temporary
- Returns:
- a
NkAllocator
view of thetemporary
field.
-
custom
- Returns:
- a
NkRecti
view of thecustom
field.
-
cursors
- Returns:
- a
NkCursor
.Buffer view of thecursors
field.
-
cursors
- Returns:
- a
NkCursor
view of the struct at the specified index of thecursors
field.
-
glyph_count
public int glyph_count()- Returns:
- the value of the
glyph_count
field.
-
glyphs
- Returns:
- a
NkFontGlyph.Buffer
view of the struct array pointed to by theglyphs
field.
-
default_font
- Returns:
- a
NkFont
view of the struct pointed to by thedefault_font
field.
-
fonts
- Returns:
- a
NkFont
view of the struct pointed to by thefonts
field.
-
config
- Returns:
- a
NkFontConfig
view of the struct pointed to by theconfig
field.
-
font_num
public int font_num()- Returns:
- the value of the
font_num
field.
-
pixel
Sets the address of the specifiedByteBuffer
to thepixel
field. -
tex_width
Sets the specified value to thetex_width
field. -
tex_height
Sets the specified value to thetex_height
field. -
permanent
Copies the specifiedNkAllocator
to thepermanent
field. -
permanent
Passes thepermanent
field to the specifiedConsumer
. -
temporary
Copies the specifiedNkAllocator
to thetemporary
field. -
temporary
Passes thetemporary
field to the specifiedConsumer
. -
custom
Copies the specifiedNkRecti
to thecustom
field. -
custom
Passes thecustom
field to the specifiedConsumer
. -
cursors
Copies the specifiedNkCursor.Buffer
to thecursors
field. -
cursors
Copies the specifiedNkCursor
at the specified index of thecursors
field. -
cursors
Passes thecursors
field to the specifiedConsumer
. -
cursors
-
glyph_count
Sets the specified value to theglyph_count
field. -
glyphs
Sets the address of the specifiedNkFontGlyph.Buffer
to theglyphs
field. -
default_font
Sets the address of the specifiedNkFont
to thedefault_font
field. -
fonts
Sets the address of the specifiedNkFont
to thefonts
field. -
config
Sets the address of the specifiedNkFontConfig
to theconfig
field. -
font_num
Sets the specified value to thefont_num
field. -
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 newNkFontAtlas
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newNkFontAtlas
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newNkFontAtlas
instance allocated withBufferUtils
. -
create
Returns a newNkFontAtlas
instance for the specified memory address. -
createSafe
-
malloc
Returns a newNkFontAtlas.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newNkFontAtlas.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newNkFontAtlas.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aNkFontAtlas.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newNkFontAtlas
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newNkFontAtlas
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newNkFontAtlas.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newNkFontAtlas.Buffer
instance allocated on the specifiedMemoryStack
and 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_width
field of the specifiedstruct
. -
ntex_height
public static void ntex_height(long struct, int value) Sets the specified value to thetex_height
field 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_count
field 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
.
-