Package org.lwjgl.nuklear
Class NkContext
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
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;
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.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct member offsets.static 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 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.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
ConstructorsConstructorDescriptionNkContext(ByteBuffer container) Creates aNkContextinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintstatic NkContextcalloc()Returns a newNkContextinstance allocated withmemCalloc.static NkContextcalloc(MemoryStack stack) Returns a newNkContextinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.clip()static NkContextcreate()Returns a newNkContextinstance allocated withBufferUtils.static NkContextcreate(long address) Returns a newNkContextinstance for the specified memory address.static @Nullable NkContextcreateSafe(long address) floatinput()intstatic NkContextmalloc()Returns a newNkContextinstance allocated withmemAlloc.static NkContextmalloc(MemoryStack stack) Returns a newNkContextinstance allocated on the specifiedMemoryStack.memory()static longnactive(long struct) static longnbegin(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 longncurrent(long struct) static floatndelta_time_seconds(long struct) Unsafe version ofdelta_time_seconds().static NkDrawListndraw_list(long struct) static longnend(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 NkTextEditntext_edit(long struct) static intnuse_pool(long struct) static NkHandlenuserdata(long struct) intsizeof()Returnssizeof(struct).org.lwjgl.nuklear.NkConfigurationStacksstacks()style()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. -
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 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct). -
input
- Returns:
- a
NkInputview of theinputfield.
-
style
- Returns:
- a
NkStyleview of thestylefield.
-
memory
- Returns:
- a
NkBufferview of thememoryfield.
-
clip
- Returns:
- a
NkClipboardview of theclipfield.
-
last_widget_state
public int last_widget_state()- Returns:
- the value of the
last_widget_statefield.
-
button_behavior
public int button_behavior()- Returns:
- the value of the
button_behaviorfield.
-
stacks
public org.lwjgl.nuklear.NkConfigurationStacks stacks()- Returns:
- a
NkConfigurationStacksview of thestacksfield.
-
delta_time_seconds
public float delta_time_seconds()- Returns:
- the value of the
delta_time_secondsfield.
-
malloc
Returns a newNkContextinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newNkContextinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newNkContextinstance allocated withBufferUtils. -
create
Returns a newNkContextinstance for the specified memory address. -
createSafe
-
malloc
Returns a newNkContextinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newNkContextinstance allocated on the specifiedMemoryStackand 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)
-