Package org.lwjgl.nuklear
Class NkFontConfig
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct nk_font_config {
{@link NkFontConfig struct nk_font_config} * next;
void * ttf_blob;
nk_size ttf_size;
unsigned char ttf_data_owned_by_atlas;
unsigned char merge_mode;
unsigned char pixel_snap;
unsigned char oversample_v;
unsigned char oversample_h;
unsigned char padding[3];
float size;
enum nk_font_coord_type coord_type;
{@link NkVec2 struct nk_vec2} spacing;
nk_rune const * range;
{@link NkBakedFont struct nk_baked_font} * font;
nk_rune fallback_glyph;
{@link NkFontConfig struct nk_font_config} * n;
{@link NkFontConfig struct nk_font_config} * p;
}
-
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 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.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
ConstructorsConstructorDescriptionNkFontConfig
(ByteBuffer container) Creates aNkFontConfig
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic NkFontConfig
calloc()
Returns a newNkFontConfig
instance allocated withmemCalloc
.static NkFontConfig.Buffer
calloc
(int capacity) Returns a newNkFontConfig.Buffer
instance allocated withmemCalloc
.static NkFontConfig.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newNkFontConfig.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkFontConfig
calloc
(MemoryStack stack) Returns a newNkFontConfig
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
coord_type
(int value) Sets the specified value to thecoord_type
field.static NkFontConfig
create()
Returns a newNkFontConfig
instance allocated withBufferUtils
.static NkFontConfig.Buffer
create
(int capacity) Returns a newNkFontConfig.Buffer
instance allocated withBufferUtils
.static NkFontConfig
create
(long address) Returns a newNkFontConfig
instance for the specified memory address.static NkFontConfig.Buffer
create
(long address, int capacity) Create aNkFontConfig.Buffer
instance at the specified memory.static @Nullable NkFontConfig
createSafe
(long address) static @Nullable NkFontConfig.Buffer
createSafe
(long address, int capacity) int
fallback_glyph
(int value) Sets the specified value to thefallback_glyph
field.@Nullable NkBakedFont
font()
font
(@Nullable NkBakedFont value) Sets the address of the specifiedNkBakedFont
to thefont
field.static NkFontConfig
malloc()
Returns a newNkFontConfig
instance allocated withmemAlloc
.static NkFontConfig.Buffer
malloc
(int capacity) Returns a newNkFontConfig.Buffer
instance allocated withmemAlloc
.static NkFontConfig.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newNkFontConfig.Buffer
instance allocated on the specifiedMemoryStack
.static NkFontConfig
malloc
(MemoryStack stack) Returns a newNkFontConfig
instance allocated on the specifiedMemoryStack
.boolean
merge_mode
(boolean value) Sets the specified value to themerge_mode
field.@Nullable NkFontConfig
n()
n
(@Nullable NkFontConfig value) Sets the address of the specifiedNkFontConfig
to then
field.static int
ncoord_type
(long struct) Unsafe version ofcoord_type()
.static void
ncoord_type
(long struct, int value) Unsafe version ofcoord_type
.@Nullable NkFontConfig
next()
next
(@Nullable NkFontConfig value) Sets the address of the specifiedNkFontConfig
to thenext
field.static int
nfallback_glyph
(long struct) Unsafe version offallback_glyph()
.static void
nfallback_glyph
(long struct, int value) Unsafe version offallback_glyph
.static @Nullable NkBakedFont
nfont
(long struct) Unsafe version offont()
.static void
nfont
(long struct, @Nullable NkBakedFont value) Unsafe version offont
.static boolean
nmerge_mode
(long struct) Unsafe version ofmerge_mode()
.static void
nmerge_mode
(long struct, boolean value) Unsafe version ofmerge_mode
.static @Nullable NkFontConfig
nn
(long struct) Unsafe version ofn()
.static void
nn
(long struct, @Nullable NkFontConfig value) Unsafe version ofn
.static @Nullable NkFontConfig
nnext
(long struct) Unsafe version ofnext()
.static void
nnext
(long struct, @Nullable NkFontConfig value) Unsafe version ofnext
.static boolean
noversample_h
(long struct) Unsafe version ofoversample_h()
.static void
noversample_h
(long struct, boolean value) Unsafe version ofoversample_h
.static boolean
noversample_v
(long struct) Unsafe version ofoversample_v()
.static void
noversample_v
(long struct, boolean value) Unsafe version ofoversample_v
.static @Nullable NkFontConfig
np
(long struct) Unsafe version ofp()
.static void
np
(long struct, @Nullable NkFontConfig value) Unsafe version ofp
.static ByteBuffer
npadding
(long struct) Unsafe version ofpadding()
.static byte
npadding
(long struct, int index) Unsafe version ofpadding
.static void
npadding
(long struct, int index, byte value) Unsafe version ofpadding
.static void
npadding
(long struct, ByteBuffer value) Unsafe version ofpadding
.static boolean
npixel_snap
(long struct) Unsafe version ofpixel_snap()
.static void
npixel_snap
(long struct, boolean value) Unsafe version ofpixel_snap
.static @Nullable IntBuffer
nrange
(long struct, int capacity) Unsafe version ofrange
.static void
Unsafe version ofrange
.static float
nsize
(long struct) Unsafe version ofsize()
.static void
nsize
(long struct, float value) Unsafe version ofsize
.static NkVec2
nspacing
(long struct) Unsafe version ofspacing()
.static void
Unsafe version ofspacing
.static @Nullable ByteBuffer
nttf_blob
(long struct) Unsafe version ofttf_blob
.static void
nttf_blob
(long struct, @Nullable ByteBuffer value) Unsafe version ofttf_blob
.static boolean
nttf_data_owned_by_atlas
(long struct) Unsafe version ofttf_data_owned_by_atlas()
.static void
nttf_data_owned_by_atlas
(long struct, boolean value) Unsafe version ofttf_data_owned_by_atlas
.static long
nttf_size
(long struct) Unsafe version ofttf_size()
.static void
nttf_size
(long struct, long value) Sets the specified value to thettf_size
field of the specifiedstruct
.boolean
oversample_h
(boolean value) Sets the specified value to theoversample_h
field.boolean
oversample_v
(boolean value) Sets the specified value to theoversample_v
field.@Nullable NkFontConfig
p()
p
(@Nullable NkFontConfig value) Sets the address of the specifiedNkFontConfig
to thep
field.padding()
byte
padding
(int index) padding
(int index, byte value) Sets the specified value at the specified index of thepadding
field.padding
(ByteBuffer value) Copies the specifiedByteBuffer
to thepadding
field.boolean
pixel_snap
(boolean value) Sets the specified value to thepixel_snap
field.@Nullable IntBuffer
range
(int capacity) Sets the address of the specifiedIntBuffer
to therange
field.set
(@Nullable NkFontConfig next, @Nullable ByteBuffer ttf_blob, long ttf_size, boolean ttf_data_owned_by_atlas, boolean merge_mode, boolean pixel_snap, boolean oversample_v, boolean oversample_h, ByteBuffer padding, float size, int coord_type, NkVec2 spacing, @Nullable IntBuffer range, @Nullable NkBakedFont font, int fallback_glyph, @Nullable NkFontConfig n, @Nullable NkFontConfig p) Initializes this struct with the specified values.set
(NkFontConfig src) Copies the specified struct data to this struct.float
size()
size
(float value) Sets the specified value to thesize
field.int
sizeof()
Returnssizeof(struct)
.spacing()
Passes thespacing
field to the specifiedConsumer
.Copies the specifiedNkVec2
to thespacing
field.@Nullable ByteBuffer
ttf_blob()
ttf_blob
(@Nullable ByteBuffer value) Sets the address of the specifiedByteBuffer
to thettf_blob
field.boolean
ttf_data_owned_by_atlas
(boolean value) Sets the specified value to thettf_data_owned_by_atlas
field.long
ttf_size()
ttf_size
(long value) Sets the specified value to thettf_size
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. -
TTF_BLOB
public static final int TTF_BLOBThe struct member offsets. -
TTF_SIZE
public static final int TTF_SIZEThe struct member offsets. -
TTF_DATA_OWNED_BY_ATLAS
public static final int TTF_DATA_OWNED_BY_ATLASThe struct member offsets. -
MERGE_MODE
public static final int MERGE_MODEThe struct member offsets. -
PIXEL_SNAP
public static final int PIXEL_SNAPThe struct member offsets. -
OVERSAMPLE_V
public static final int OVERSAMPLE_VThe struct member offsets. -
OVERSAMPLE_H
public static final int OVERSAMPLE_HThe struct member offsets. -
PADDING
public static final int PADDINGThe struct member offsets. -
SIZE
public static final int SIZEThe struct member offsets. -
COORD_TYPE
public static final int COORD_TYPEThe struct member offsets. -
SPACING
public static final int SPACINGThe struct member offsets. -
RANGE
public static final int RANGEThe struct member offsets. -
FONT
public static final int FONTThe struct member offsets. -
FALLBACK_GLYPH
public static final int FALLBACK_GLYPHThe struct member offsets. -
N
public static final int NThe struct member offsets. -
P
public static final int PThe struct member offsets.
-
-
Constructor Details
-
NkFontConfig
Creates aNkFontConfig
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<NkFontConfig>
-
next
- Returns:
- a
NkFontConfig
view of the struct pointed to by thenext
field.
-
ttf_blob
- Returns:
- a
ByteBuffer
view of the data pointed to by thettf_blob
field.
-
ttf_size
public long ttf_size()- Returns:
- the value of the
ttf_size
field.
-
ttf_data_owned_by_atlas
public boolean ttf_data_owned_by_atlas()- Returns:
- the value of the
ttf_data_owned_by_atlas
field.
-
merge_mode
public boolean merge_mode()- Returns:
- the value of the
merge_mode
field.
-
pixel_snap
public boolean pixel_snap()- Returns:
- the value of the
pixel_snap
field.
-
oversample_v
public boolean oversample_v()- Returns:
- the value of the
oversample_v
field.
-
oversample_h
public boolean oversample_h()- Returns:
- the value of the
oversample_h
field.
-
padding
- Returns:
- a
ByteBuffer
view of thepadding
field.
-
padding
public byte padding(int index) - Returns:
- the value at the specified index of the
padding
field.
-
size
public float size()- Returns:
- the value of the
size
field.
-
coord_type
public int coord_type()- Returns:
- the value of the
coord_type
field.
-
spacing
- Returns:
- a
NkVec2
view of thespacing
field.
-
range
- Returns:
- a
IntBuffer
view of the data pointed to by therange
field.
-
font
- Returns:
- a
NkBakedFont
view of the struct pointed to by thefont
field.
-
fallback_glyph
public int fallback_glyph()- Returns:
- the value of the
fallback_glyph
field.
-
n
- Returns:
- a
NkFontConfig
view of the struct pointed to by then
field.
-
p
- Returns:
- a
NkFontConfig
view of the struct pointed to by thep
field.
-
next
Sets the address of the specifiedNkFontConfig
to thenext
field. -
ttf_blob
Sets the address of the specifiedByteBuffer
to thettf_blob
field. -
ttf_size
Sets the specified value to thettf_size
field. -
ttf_data_owned_by_atlas
Sets the specified value to thettf_data_owned_by_atlas
field. -
merge_mode
Sets the specified value to themerge_mode
field. -
pixel_snap
Sets the specified value to thepixel_snap
field. -
oversample_v
Sets the specified value to theoversample_v
field. -
oversample_h
Sets the specified value to theoversample_h
field. -
padding
Copies the specifiedByteBuffer
to thepadding
field. -
padding
Sets the specified value at the specified index of thepadding
field. -
size
Sets the specified value to thesize
field. -
coord_type
Sets the specified value to thecoord_type
field. -
spacing
Copies the specifiedNkVec2
to thespacing
field. -
spacing
Passes thespacing
field to the specifiedConsumer
. -
range
Sets the address of the specifiedIntBuffer
to therange
field. -
font
Sets the address of the specifiedNkBakedFont
to thefont
field. -
fallback_glyph
Sets the specified value to thefallback_glyph
field. -
n
Sets the address of the specifiedNkFontConfig
to then
field. -
p
Sets the address of the specifiedNkFontConfig
to thep
field. -
set
public NkFontConfig set(@Nullable NkFontConfig next, @Nullable ByteBuffer ttf_blob, long ttf_size, boolean ttf_data_owned_by_atlas, boolean merge_mode, boolean pixel_snap, boolean oversample_v, boolean oversample_h, ByteBuffer padding, float size, int coord_type, NkVec2 spacing, @Nullable IntBuffer range, @Nullable NkBakedFont font, int fallback_glyph, @Nullable NkFontConfig n, @Nullable NkFontConfig p) 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 newNkFontConfig
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newNkFontConfig
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newNkFontConfig
instance allocated withBufferUtils
. -
create
Returns a newNkFontConfig
instance for the specified memory address. -
createSafe
-
malloc
Returns a newNkFontConfig.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newNkFontConfig.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newNkFontConfig.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aNkFontConfig.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newNkFontConfig
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newNkFontConfig
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newNkFontConfig.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newNkFontConfig.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()
. -
nttf_blob
Unsafe version ofttf_blob
. -
nttf_size
public static long nttf_size(long struct) Unsafe version ofttf_size()
. -
nttf_data_owned_by_atlas
public static boolean nttf_data_owned_by_atlas(long struct) Unsafe version ofttf_data_owned_by_atlas()
. -
nmerge_mode
public static boolean nmerge_mode(long struct) Unsafe version ofmerge_mode()
. -
npixel_snap
public static boolean npixel_snap(long struct) Unsafe version ofpixel_snap()
. -
noversample_v
public static boolean noversample_v(long struct) Unsafe version ofoversample_v()
. -
noversample_h
public static boolean noversample_h(long struct) Unsafe version ofoversample_h()
. -
npadding
Unsafe version ofpadding()
. -
npadding
public static byte npadding(long struct, int index) Unsafe version ofpadding
. -
nsize
public static float nsize(long struct) Unsafe version ofsize()
. -
ncoord_type
public static int ncoord_type(long struct) Unsafe version ofcoord_type()
. -
nspacing
Unsafe version ofspacing()
. -
nrange
Unsafe version ofrange
. -
nfont
Unsafe version offont()
. -
nfallback_glyph
public static int nfallback_glyph(long struct) Unsafe version offallback_glyph()
. -
nn
Unsafe version ofn()
. -
np
Unsafe version ofp()
. -
nnext
Unsafe version ofnext
. -
nttf_blob
Unsafe version ofttf_blob
. -
nttf_size
public static void nttf_size(long struct, long value) Sets the specified value to thettf_size
field of the specifiedstruct
. -
nttf_data_owned_by_atlas
public static void nttf_data_owned_by_atlas(long struct, boolean value) Unsafe version ofttf_data_owned_by_atlas
. -
nmerge_mode
public static void nmerge_mode(long struct, boolean value) Unsafe version ofmerge_mode
. -
npixel_snap
public static void npixel_snap(long struct, boolean value) Unsafe version ofpixel_snap
. -
noversample_v
public static void noversample_v(long struct, boolean value) Unsafe version ofoversample_v
. -
noversample_h
public static void noversample_h(long struct, boolean value) Unsafe version ofoversample_h
. -
npadding
Unsafe version ofpadding
. -
npadding
public static void npadding(long struct, int index, byte value) Unsafe version ofpadding
. -
nsize
public static void nsize(long struct, float value) Unsafe version ofsize
. -
ncoord_type
public static void ncoord_type(long struct, int value) Unsafe version ofcoord_type
. -
nspacing
Unsafe version ofspacing
. -
nrange
Unsafe version ofrange
. -
nfont
Unsafe version offont
. -
nfallback_glyph
public static void nfallback_glyph(long struct, int value) Unsafe version offallback_glyph
. -
nn
Unsafe version ofn
. -
np
Unsafe version ofp
.
-