Package org.lwjgl.nuklear
Class NkContext
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct nk_context {
{@link NkInput struct nk_input} input;
{@link NkStyle struct nk_style} style;
{@link NkBuffer struct nk_buffer} memory;
{@link NkClipboard struct nk_clipboard} clip;
nk_flags last_widget_state;
enum nk_button_behavior button_behavior;
{@link NkConfigurationStacks struct nk_configuration_stacks} stacks;
float delta_time_seconds;
{@link NkDrawList struct nk_draw_list} draw_list;
{@link NkHandle nk_handle} userdata;
{@link NkTextEdit struct nk_text_edit} text_edit;
{@link NkCommandBuffer struct nk_command_buffer} overlay;
int build;
int use_pool;
{@link NkPool struct nk_pool} pool;
nk_window * begin;
nk_window * end;
nk_window * active;
nk_window * current;
struct nk_page_element * freelist;
unsigned int count;
unsigned int seq;
}
-
Nested Class Summary
Nested 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 member offsets.static 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 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.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
ConstructorsConstructorDescriptionNkContext
(ByteBuffer container) Creates aNkContext
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionint
static NkContext
calloc()
Returns a newNkContext
instance allocated withmemCalloc
.static NkContext
calloc
(MemoryStack stack) Returns a newNkContext
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkContext
Deprecated.static NkContext
callocStack
(MemoryStack stack) Deprecated.clip()
static NkContext
create()
Returns a newNkContext
instance allocated withBufferUtils
.static NkContext
create
(long address) Returns a newNkContext
instance for the specified memory address.static @Nullable NkContext
createSafe
(long address) float
input()
int
static NkContext
malloc()
Returns a newNkContext
instance allocated withmemAlloc
.static NkContext
malloc
(MemoryStack stack) Returns a newNkContext
instance allocated on the specifiedMemoryStack
.static NkContext
Deprecated.static NkContext
mallocStack
(MemoryStack stack) Deprecated.memory()
static long
nactive
(long struct) static long
nbegin
(long struct) static int
nbuild
(long struct) static int
nbutton_behavior
(long struct) Unsafe version ofbutton_behavior()
.static NkClipboard
nclip
(long struct) Unsafe version ofclip()
.static int
ncount
(long struct) static long
ncurrent
(long struct) static float
ndelta_time_seconds
(long struct) Unsafe version ofdelta_time_seconds()
.static NkDrawList
ndraw_list
(long struct) static long
nend
(long struct) static long
nfreelist
(long struct) static NkInput
ninput
(long struct) Unsafe version ofinput()
.static int
nlast_widget_state
(long struct) Unsafe version oflast_widget_state()
.static NkBuffer
nmemory
(long struct) Unsafe version ofmemory()
.static NkCommandBuffer
noverlay
(long struct) static org.lwjgl.nuklear.NkPool
npool
(long struct) static int
nseq
(long struct) static org.lwjgl.nuklear.NkConfigurationStacks
nstacks
(long struct) Unsafe version ofstacks()
.static NkStyle
nstyle
(long struct) Unsafe version ofstyle()
.static NkTextEdit
ntext_edit
(long struct) static int
nuse_pool
(long struct) static NkHandle
nuserdata
(long struct) int
sizeof()
Returnssizeof(struct)
.org.lwjgl.nuklear.NkConfigurationStacks
stacks()
style()
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. -
INPUT
public static final int INPUTThe struct member offsets. -
STYLE
public static final int STYLEThe struct member offsets. -
MEMORY
public static final int MEMORYThe struct member offsets. -
CLIP
public static final int CLIPThe struct member offsets. -
LAST_WIDGET_STATE
public static final int LAST_WIDGET_STATEThe struct member offsets. -
BUTTON_BEHAVIOR
public static final int BUTTON_BEHAVIORThe struct member offsets. -
STACKS
public static final int STACKSThe struct member offsets. -
DELTA_TIME_SECONDS
public static final int DELTA_TIME_SECONDSThe struct member offsets. -
DRAW_LIST
public static final int DRAW_LISTThe struct member offsets. -
USERDATA
public static final int USERDATAThe struct member offsets. -
TEXT_EDIT
public static final int TEXT_EDITThe struct member offsets. -
OVERLAY
public static final int OVERLAYThe struct member offsets. -
BUILD
public static final int BUILDThe struct member offsets. -
USE_POOL
public static final int USE_POOLThe struct member offsets. -
POOL
public static final int POOLThe struct member offsets. -
BEGIN
public static final int BEGINThe struct member offsets. -
END
public static final int ENDThe struct member offsets. -
ACTIVE
public static final int ACTIVEThe struct member offsets. -
CURRENT
public static final int CURRENTThe struct member offsets. -
FREELIST
public static final int FREELISTThe struct member offsets. -
COUNT
public static final int COUNTThe struct member offsets. -
SEQ
public static final int SEQThe struct member offsets.
-
-
Constructor Details
-
NkContext
Creates aNkContext
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)
. -
input
- Returns:
- a
NkInput
view of theinput
field.
-
style
- Returns:
- a
NkStyle
view of thestyle
field.
-
memory
- Returns:
- a
NkBuffer
view of thememory
field.
-
clip
- Returns:
- a
NkClipboard
view of theclip
field.
-
last_widget_state
public int last_widget_state()- Returns:
- the value of the
last_widget_state
field.
-
button_behavior
public int button_behavior()- Returns:
- the value of the
button_behavior
field.
-
stacks
public org.lwjgl.nuklear.NkConfigurationStacks stacks()- Returns:
- a
NkConfigurationStacks
view of thestacks
field.
-
delta_time_seconds
public float delta_time_seconds()- Returns:
- the value of the
delta_time_seconds
field.
-
malloc
Returns a newNkContext
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newNkContext
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newNkContext
instance allocated withBufferUtils
. -
create
Returns a newNkContext
instance for the specified memory address. -
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
malloc
Returns a newNkContext
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newNkContext
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
ninput
Unsafe version ofinput()
. -
nstyle
Unsafe version ofstyle()
. -
nmemory
Unsafe version ofmemory()
. -
nclip
Unsafe version ofclip()
. -
nlast_widget_state
public static int nlast_widget_state(long struct) Unsafe version oflast_widget_state()
. -
nbutton_behavior
public static int nbutton_behavior(long struct) Unsafe version ofbutton_behavior()
. -
nstacks
public static org.lwjgl.nuklear.NkConfigurationStacks nstacks(long struct) Unsafe version ofstacks()
. -
ndelta_time_seconds
public static float ndelta_time_seconds(long struct) Unsafe version ofdelta_time_seconds()
. -
ndraw_list
-
nuserdata
-
ntext_edit
-
noverlay
-
nbuild
public static int nbuild(long struct) -
nuse_pool
public static int nuse_pool(long struct) -
npool
public static org.lwjgl.nuklear.NkPool npool(long struct) -
nbegin
public static long nbegin(long struct) -
nend
public static long nend(long struct) -
nactive
public static long nactive(long struct) -
ncurrent
public static long ncurrent(long struct) -
nfreelist
public static long nfreelist(long struct) -
ncount
public static int ncount(long struct) -
nseq
public static int nseq(long struct)
-