Package org.lwjgl.nuklear
Class NkContext
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkContext
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class NkContext extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Layout
struct nk_context {
struct nk_input
input;struct nk_style
style;struct nk_buffer
memory;struct nk_clipboard
clip; nk_flags last_widget_state; enum nk_button_behavior button_behavior;struct nk_configuration_stacks
stacks; float delta_time_seconds;struct nk_draw_list
draw_list;nk_handle
userdata;struct nk_text_edit
text_edit;struct nk_command_buffer
overlay; int build; int use_pool;struct nk_pool
pool;struct nk_window
* begin;struct nk_window
* end;struct nk_window
* active;struct nk_window
* current; struct nk_page_element * freelist; unsigned int count; unsigned int seq; }
-
-
Field Summary
Fields Modifier and Type Field Description static int
ACTIVE
The struct member offsets.static int
ALIGNOF
The struct alignment in bytes.static int
BEGIN
BUILD
BUTTON_BEHAVIOR
CLIP
COUNT
CURRENT
DELTA_TIME_SECONDS
DRAW_LIST
END
FREELIST
INPUT
LAST_WIDGET_STATE
MEMORY
OVERLAY
POOL
SEQThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STACKS
STYLE
TEXT_EDIT
USE_POOL
USERDATAThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description NkContext(java.nio.ByteBuffer container)
Creates aNkContext
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
button_behavior()
Returns the value of thebutton_behavior
field.static NkContext
calloc()
Returns a newNkContext
instance allocated withmemCalloc
.static NkContext
callocStack()
Returns a newNkContext
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NkContext
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkContext
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.NkClipboard
clip()
Returns aNkClipboard
view of theclip
field.static NkContext
create()
Returns a newNkContext
instance allocated withBufferUtils
.static NkContext
create(long address)
Returns a newNkContext
instance for the specified memory address.static NkContext
createSafe(long address)
float
delta_time_seconds()
Returns the value of thedelta_time_seconds
field.NkInput
input()
Returns aNkInput
view of theinput
field.int
last_widget_state()
Returns the value of thelast_widget_state
field.static NkContext
malloc()
Returns a newNkContext
instance allocated withmemAlloc
.static NkContext
mallocStack()
Returns a newNkContext
instance allocated on the thread-localMemoryStack
.static NkContext
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkContext
instance allocated on the specifiedMemoryStack
.NkBuffer
memory()
Returns aNkBuffer
view of thememory
field.static NkWindow
nactive(long struct)
static NkWindow
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 NkWindow
ncurrent(long struct)
static float
ndelta_time_seconds(long struct)
Unsafe version ofdelta_time_seconds()
.static NkDrawList
ndraw_list(long struct)
static NkWindow
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()
org.lwjgl.nuklear.NkConfigurationStacks
stacks()
Returns aNkConfigurationStacks
view of thestacks
field.NkStyle
style()
Returns aNkStyle
view of thestyle
field.
-
-
-
Field Detail
-
SIZEOF
The struct size in bytes.
-
ALIGNOF
The struct alignment in bytes.
-
INPUT, STYLE, MEMORY, CLIP, LAST_WIDGET_STATE, BUTTON_BEHAVIOR, STACKS, DELTA_TIME_SECONDS, DRAW_LIST, USERDATA, TEXT_EDIT, OVERLAY, BUILD, USE_POOL, POOL, BEGIN, END, ACTIVE, CURRENT, FREELIST, COUNT, SEQ
The struct member offsets.
-
-
Constructor Detail
-
NkContext
public NkContext(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
clip
public NkClipboard clip()
Returns aNkClipboard
view of theclip
field.
-
last_widget_state
public int last_widget_state()
Returns the value of thelast_widget_state
field.
-
button_behavior
public int button_behavior()
Returns the value of thebutton_behavior
field.
-
stacks
public org.lwjgl.nuklear.NkConfigurationStacks stacks()
Returns aNkConfigurationStacks
view of thestacks
field.
-
delta_time_seconds
public float delta_time_seconds()
Returns the value of thedelta_time_seconds
field.
-
malloc
public static NkContext malloc()
Returns a newNkContext
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static NkContext calloc()
Returns a newNkContext
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static NkContext create()
Returns a newNkContext
instance allocated withBufferUtils
.
-
create
public static NkContext create(long address)
Returns a newNkContext
instance for the specified memory address.
-
createSafe
@Nullable public static NkContext createSafe(long address)
-
mallocStack
public static NkContext mallocStack()
Returns a newNkContext
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static NkContext callocStack()
Returns a newNkContext
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static NkContext mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkContext
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static NkContext callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkContext
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
nclip
public static NkClipboard nclip(long struct)
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
public static NkDrawList ndraw_list(long struct)
-
nuserdata
public static NkHandle nuserdata(long struct)
-
ntext_edit
public static NkTextEdit ntext_edit(long struct)
-
noverlay
public static NkCommandBuffer noverlay(long struct)
-
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
@Nullable public static NkWindow nbegin(long struct)
-
nend
@Nullable public static NkWindow nend(long struct)
-
nactive
@Nullable public static NkWindow nactive(long struct)
-
ncurrent
@Nullable public static NkWindow ncurrent(long struct)
-
nfreelist
public static long nfreelist(long struct)
-
ncount
public static int ncount(long struct)
-
nseq
public static int nseq(long struct)
-
-