Package org.lwjgl.nuklear
Class NkFontConfig
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct nk_font_config {
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;
struct nk_vec2 spacing;
nk_rune const * range;
struct nk_baked_font * font;
nk_rune fallback_glyph;
struct nk_font_config * n;
struct nk_font_config * p;
}-
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 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.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
ConstructorsConstructorDescriptionNkFontConfig(ByteBuffer container) Creates aNkFontConfiginstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic NkFontConfigcalloc()Returns a newNkFontConfiginstance allocated withmemCalloc.static NkFontConfig.Buffercalloc(int capacity) Returns a newNkFontConfig.Bufferinstance allocated withmemCalloc.static NkFontConfig.Buffercalloc(int capacity, MemoryStack stack) Returns a newNkFontConfig.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkFontConfigcalloc(MemoryStack stack) Returns a newNkFontConfiginstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intcoord_type(int value) Sets the specified value to thecoord_typefield.static NkFontConfigcreate()Returns a newNkFontConfiginstance allocated withBufferUtils.static NkFontConfig.Buffercreate(int capacity) Returns a newNkFontConfig.Bufferinstance allocated withBufferUtils.static NkFontConfigcreate(long address) Returns a newNkFontConfiginstance for the specified memory address.static NkFontConfig.Buffercreate(long address, int capacity) Create aNkFontConfig.Bufferinstance at the specified memory.static @Nullable NkFontConfigcreateSafe(long address) static @Nullable NkFontConfig.BuffercreateSafe(long address, int capacity) intfallback_glyph(int value) Sets the specified value to thefallback_glyphfield.@Nullable NkBakedFontfont()font(@Nullable NkBakedFont value) Sets the address of the specifiedNkBakedFontto thefontfield.static NkFontConfigmalloc()Returns a newNkFontConfiginstance allocated withmemAlloc.static NkFontConfig.Buffermalloc(int capacity) Returns a newNkFontConfig.Bufferinstance allocated withmemAlloc.static NkFontConfig.Buffermalloc(int capacity, MemoryStack stack) Returns a newNkFontConfig.Bufferinstance allocated on the specifiedMemoryStack.static NkFontConfigmalloc(MemoryStack stack) Returns a newNkFontConfiginstance allocated on the specifiedMemoryStack.booleanmerge_mode(boolean value) Sets the specified value to themerge_modefield.@Nullable NkFontConfign()n(@Nullable NkFontConfig value) Sets the address of the specifiedNkFontConfigto thenfield.static intncoord_type(long struct) Unsafe version ofcoord_type().static voidncoord_type(long struct, int value) Unsafe version ofcoord_type.@Nullable NkFontConfignext()next(@Nullable NkFontConfig value) Sets the address of the specifiedNkFontConfigto thenextfield.static intnfallback_glyph(long struct) Unsafe version offallback_glyph().static voidnfallback_glyph(long struct, int value) Unsafe version offallback_glyph.static @Nullable NkBakedFontnfont(long struct) Unsafe version offont().static voidnfont(long struct, @Nullable NkBakedFont value) Unsafe version offont.static booleannmerge_mode(long struct) Unsafe version ofmerge_mode().static voidnmerge_mode(long struct, boolean value) Unsafe version ofmerge_mode.static @Nullable NkFontConfignn(long struct) Unsafe version ofn().static voidnn(long struct, @Nullable NkFontConfig value) Unsafe version ofn.static @Nullable NkFontConfignnext(long struct) Unsafe version ofnext().static voidnnext(long struct, @Nullable NkFontConfig value) Unsafe version ofnext.static booleannoversample_h(long struct) Unsafe version ofoversample_h().static voidnoversample_h(long struct, boolean value) Unsafe version ofoversample_h.static booleannoversample_v(long struct) Unsafe version ofoversample_v().static voidnoversample_v(long struct, boolean value) Unsafe version ofoversample_v.static @Nullable NkFontConfignp(long struct) Unsafe version ofp().static voidnp(long struct, @Nullable NkFontConfig value) Unsafe version ofp.static ByteBuffernpadding(long struct) Unsafe version ofpadding().static bytenpadding(long struct, int index) Unsafe version ofpadding.static voidnpadding(long struct, int index, byte value) Unsafe version ofpadding.static voidnpadding(long struct, ByteBuffer value) Unsafe version ofpadding.static booleannpixel_snap(long struct) Unsafe version ofpixel_snap().static voidnpixel_snap(long struct, boolean value) Unsafe version ofpixel_snap.static @Nullable IntBuffernrange(long struct, int capacity) Unsafe version ofrange.static voidUnsafe version ofrange.static floatnsize(long struct) Unsafe version ofsize().static voidnsize(long struct, float value) Unsafe version ofsize.static NkVec2nspacing(long struct) Unsafe version ofspacing().static voidUnsafe version ofspacing.static @Nullable ByteBuffernttf_blob(long struct) Unsafe version ofttf_blob.static voidnttf_blob(long struct, @Nullable ByteBuffer value) Unsafe version ofttf_blob.static booleannttf_data_owned_by_atlas(long struct) Unsafe version ofttf_data_owned_by_atlas().static voidnttf_data_owned_by_atlas(long struct, boolean value) Unsafe version ofttf_data_owned_by_atlas.static longnttf_size(long struct) Unsafe version ofttf_size().static voidnttf_size(long struct, long value) Sets the specified value to thettf_sizefield of the specifiedstruct.booleanoversample_h(boolean value) Sets the specified value to theoversample_hfield.booleanoversample_v(boolean value) Sets the specified value to theoversample_vfield.@Nullable NkFontConfigp()p(@Nullable NkFontConfig value) Sets the address of the specifiedNkFontConfigto thepfield.padding()bytepadding(int index) padding(int index, byte value) Sets the specified value at the specified index of thepaddingfield.padding(ByteBuffer value) Copies the specifiedByteBufferto thepaddingfield.booleanpixel_snap(boolean value) Sets the specified value to thepixel_snapfield.@Nullable IntBufferrange(int capacity) Sets the address of the specifiedIntBufferto therangefield.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.floatsize()size(float value) Sets the specified value to thesizefield.intsizeof()Returnssizeof(struct).spacing()Passes thespacingfield to the specifiedConsumer.Copies the specifiedNkVec2to thespacingfield.@Nullable ByteBufferttf_blob()ttf_blob(@Nullable ByteBuffer value) Sets the address of the specifiedByteBufferto thettf_blobfield.booleanttf_data_owned_by_atlas(boolean value) Sets the specified value to thettf_data_owned_by_atlasfield.longttf_size()ttf_size(long value) Sets the specified value to thettf_sizefield.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. -
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 aNkFontConfiginstance 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<NkFontConfig>
-
next
- Returns:
- a
NkFontConfigview of the struct pointed to by thenextfield.
-
ttf_blob
- Returns:
- a
ByteBufferview of the data pointed to by thettf_blobfield.
-
ttf_size
public long ttf_size()- Returns:
- the value of the
ttf_sizefield.
-
ttf_data_owned_by_atlas
public boolean ttf_data_owned_by_atlas()- Returns:
- the value of the
ttf_data_owned_by_atlasfield.
-
merge_mode
public boolean merge_mode()- Returns:
- the value of the
merge_modefield.
-
pixel_snap
public boolean pixel_snap()- Returns:
- the value of the
pixel_snapfield.
-
oversample_v
public boolean oversample_v()- Returns:
- the value of the
oversample_vfield.
-
oversample_h
public boolean oversample_h()- Returns:
- the value of the
oversample_hfield.
-
padding
- Returns:
- a
ByteBufferview of thepaddingfield.
-
padding
public byte padding(int index) - Returns:
- the value at the specified index of the
paddingfield.
-
size
public float size()- Returns:
- the value of the
sizefield.
-
coord_type
public int coord_type()- Returns:
- the value of the
coord_typefield.
-
spacing
- Returns:
- a
NkVec2view of thespacingfield.
-
range
- Returns:
- a
IntBufferview of the data pointed to by therangefield.
-
font
- Returns:
- a
NkBakedFontview of the struct pointed to by thefontfield.
-
fallback_glyph
public int fallback_glyph()- Returns:
- the value of the
fallback_glyphfield.
-
n
- Returns:
- a
NkFontConfigview of the struct pointed to by thenfield.
-
p
- Returns:
- a
NkFontConfigview of the struct pointed to by thepfield.
-
next
Sets the address of the specifiedNkFontConfigto thenextfield. -
ttf_blob
Sets the address of the specifiedByteBufferto thettf_blobfield. -
ttf_size
Sets the specified value to thettf_sizefield. -
ttf_data_owned_by_atlas
Sets the specified value to thettf_data_owned_by_atlasfield. -
merge_mode
Sets the specified value to themerge_modefield. -
pixel_snap
Sets the specified value to thepixel_snapfield. -
oversample_v
Sets the specified value to theoversample_vfield. -
oversample_h
Sets the specified value to theoversample_hfield. -
padding
Copies the specifiedByteBufferto thepaddingfield. -
padding
Sets the specified value at the specified index of thepaddingfield. -
size
Sets the specified value to thesizefield. -
coord_type
Sets the specified value to thecoord_typefield. -
spacing
Copies the specifiedNkVec2to thespacingfield. -
spacing
Passes thespacingfield to the specifiedConsumer. -
range
Sets the address of the specifiedIntBufferto therangefield. -
font
Sets the address of the specifiedNkBakedFontto thefontfield. -
fallback_glyph
Sets the specified value to thefallback_glyphfield. -
n
Sets the address of the specifiedNkFontConfigto thenfield. -
p
Sets the address of the specifiedNkFontConfigto thepfield. -
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 newNkFontConfiginstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newNkFontConfiginstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newNkFontConfiginstance allocated withBufferUtils. -
create
Returns a newNkFontConfiginstance for the specified memory address. -
createSafe
-
malloc
Returns a newNkFontConfig.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newNkFontConfig.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newNkFontConfig.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aNkFontConfig.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newNkFontConfiginstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newNkFontConfiginstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newNkFontConfig.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newNkFontConfig.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(). -
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_sizefield 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.
-