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.NativeResourceLayout
struct nk_context {struct nk_inputinput;struct nk_stylestyle;struct nk_buffermemory;struct nk_clipboardclip; nk_flags last_widget_state; enum nk_button_behavior button_behavior;struct nk_configuration_stacksstacks; float delta_time_seconds;struct nk_draw_listdraw_list;nk_handleuserdata;struct nk_text_edittext_edit;struct nk_command_bufferoverlay; int build; int use_pool;struct nk_poolpool;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 intACTIVEThe struct member offsets.static intALIGNOFThe struct alignment in bytes.static intBEGIN
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 intSIZEOFThe struct size in bytes.static intSTACKS
STYLE
TEXT_EDIT
USE_POOL
USERDATAThe struct member offsets.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intbutton_behavior()Returns the value of thebutton_behaviorfield.static NkContextcalloc()Returns a newNkContextinstance allocated withmemCalloc.static NkContextcallocStack()Returns a newNkContextinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkContextcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkContextinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.NkClipboardclip()Returns aNkClipboardview of theclipfield.NkContextclip(java.util.function.Consumer<NkClipboard> consumer)Passes theclipfield to the specifiedConsumer.static NkContextcreate()Returns a newNkContextinstance allocated withBufferUtils.static NkContextcreate(long address)Returns a newNkContextinstance for the specified memory address.static NkContextcreateSafe(long address)floatdelta_time_seconds()Returns the value of thedelta_time_secondsfield.NkInputinput()Returns aNkInputview of theinputfield.intlast_widget_state()Returns the value of thelast_widget_statefield.static NkContextmalloc()Returns a newNkContextinstance allocated withmemAlloc.static NkContextmallocStack()Returns a newNkContextinstance allocated on the thread-localMemoryStack.static NkContextmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkContextinstance allocated on the specifiedMemoryStack.NkBuffermemory()Returns aNkBufferview of thememoryfield.static NkWindownactive(long struct)static NkWindownbegin(long struct)static intnbuild(long struct)static intnbutton_behavior(long struct)Unsafe version ofbutton_behavior().static NkClipboardnclip(long struct)Unsafe version ofclip().static intncount(long struct)static NkWindowncurrent(long struct)static floatndelta_time_seconds(long struct)Unsafe version ofdelta_time_seconds().static NkDrawListndraw_list(long struct)static NkWindownend(long struct)static longnfreelist(long struct)static NkInputninput(long struct)Unsafe version ofinput().static intnlast_widget_state(long struct)Unsafe version oflast_widget_state().static NkBuffernmemory(long struct)Unsafe version ofmemory().static NkCommandBuffernoverlay(long struct)static org.lwjgl.nuklear.NkPoolnpool(long struct)static intnseq(long struct)static org.lwjgl.nuklear.NkConfigurationStacksnstacks(long struct)Unsafe version ofstacks().static NkStylenstyle(long struct)Unsafe version ofstyle().static org.lwjgl.nuklear.NkTextEditntext_edit(long struct)static intnuse_pool(long struct)static NkHandlenuserdata(long struct)intsizeof()org.lwjgl.nuklear.NkConfigurationStacksstacks()Returns aNkConfigurationStacksview of thestacksfield.NkStylestyle()Returns aNkStyleview of thestylefield.NkContextstyle(java.util.function.Consumer<NkStyle> consumer)Passes thestylefield to the specifiedConsumer.
-
-
-
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 aNkContextinstance 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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
style
public NkContext style(java.util.function.Consumer<NkStyle> consumer)
Passes thestylefield to the specifiedConsumer.
-
clip
public NkClipboard clip()
Returns aNkClipboardview of theclipfield.
-
clip
public NkContext clip(java.util.function.Consumer<NkClipboard> consumer)
Passes theclipfield to the specifiedConsumer.
-
last_widget_state
public int last_widget_state()
Returns the value of thelast_widget_statefield.
-
button_behavior
public int button_behavior()
Returns the value of thebutton_behaviorfield.
-
stacks
public org.lwjgl.nuklear.NkConfigurationStacks stacks()
Returns aNkConfigurationStacksview of thestacksfield.
-
delta_time_seconds
public float delta_time_seconds()
Returns the value of thedelta_time_secondsfield.
-
malloc
public static NkContext malloc()
Returns a newNkContextinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NkContext calloc()
Returns a newNkContextinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NkContext create()
Returns a newNkContextinstance allocated withBufferUtils.
-
create
public static NkContext create(long address)
Returns a newNkContextinstance for the specified memory address.
-
createSafe
@Nullable public static NkContext createSafe(long address)
-
mallocStack
public static NkContext mallocStack()
Returns a newNkContextinstance allocated on the thread-localMemoryStack.
-
callocStack
public static NkContext callocStack()
Returns a newNkContextinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static NkContext mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkContextinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static NkContext callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkContextinstance allocated on the specifiedMemoryStackand 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 org.lwjgl.nuklear.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)
-
-