Top Description Fields Constructors Methods
org.lwjgl.nuklear

public Class NkContext

extends Struct<NkContext>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Annotations
@NativeType:struct nk_context
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

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

Modifier and TypeField and Description
public static final int
ACTIVE

The struct member offsets.

public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
BEGIN

The struct member offsets.

public static final int
BUILD

The struct member offsets.

public static final int
BUTTON_BEHAVIOR

The struct member offsets.

public static final int
CLIP

The struct member offsets.

public static final int
COUNT

The struct member offsets.

public static final int
CURRENT

The struct member offsets.

public static final int
DELTA_TIME_SECONDS

The struct member offsets.

public static final int
DRAW_LIST

The struct member offsets.

public static final int
END

The struct member offsets.

public static final int
FREELIST

The struct member offsets.

public static final int
INPUT

The struct member offsets.

public static final int
LAST_WIDGET_STATE

The struct member offsets.

public static final int
MEMORY

The struct member offsets.

public static final int
OVERLAY

The struct member offsets.

public static final int
POOL

The struct member offsets.

public static final int
SEQ

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
STACKS

The struct member offsets.

public static final int
STYLE

The struct member offsets.

public static final int
TEXT_EDIT

The struct member offsets.

public static final int
USE_POOL

The struct member offsets.

public static final int
USERDATA

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
NkContext(long address, ByteBuffer container)

public
NkContext(ByteBuffer container)

Creates a NkContext instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the value of the button_behavior field.
button_behavior
()

public static NkContext
calloc()

Returns a new NkContext instance allocated with memCalloc.

public static NkContext
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new NkContext instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static NkContext
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static NkContext
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public NkClipboard

Returns:

a NkClipboard view of the clip field.
clip
()

protected NkContext
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static NkContext
create()

Returns a new NkContext instance allocated with BufferUtils.

public static NkContext
create(long address)

Returns a new NkContext instance for the specified memory address.

public static NkContext
createSafe(long address)

Like create, but returns null if address is NULL.

public float

Returns:

the value of the delta_time_seconds field.
delta_time_seconds
()

public NkInput

Returns:

a NkInput view of the input field.
input
()

public int

Returns:

the value of the last_widget_state field.
last_widget_state
()

public static NkContext
malloc()

Returns a new NkContext instance allocated with memAlloc.

public static NkContext
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new NkContext instance allocated on the specified MemoryStack.

public static NkContext
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static NkContext
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public NkBuffer

Returns:

a NkBuffer view of the memory field.
memory
()

public static NkWindow
nactive(long struct)

public static NkWindow
nbegin(long struct)

public static int
nbuild(long struct)

public static int
nbutton_behavior(long struct)

Unsafe version of button_behavior.

public static NkClipboard
nclip(long struct)

Unsafe version of clip.

public static int
ncount(long struct)

public static NkWindow
ncurrent(long struct)

public static float
ndelta_time_seconds(long struct)

Unsafe version of delta_time_seconds.

public static NkDrawList
ndraw_list(long struct)

public static NkWindow
nend(long struct)

public static long
nfreelist(long struct)

public static NkInput
ninput(long struct)

Unsafe version of input.

public static int
nlast_widget_state(long struct)

Unsafe version of last_widget_state.

public static NkBuffer
nmemory(long struct)

Unsafe version of memory.

public static NkCommandBuffer
noverlay(long struct)

public static NkPool
npool(long struct)

public static int
nseq(long struct)

public static NkConfigurationStacks
nstacks(long struct)

Unsafe version of stacks.

public static NkStyle
nstyle(long struct)

Unsafe version of style.

public static NkTextEdit
ntext_edit(long struct)

public static int
nuse_pool(long struct)

public static NkHandle
nuserdata(long struct)

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public NkConfigurationStacks

Returns:

a NkConfigurationStacks view of the stacks field.
stacks
()

public NkStyle

Returns:

a NkStyle view of the style field.
style
()

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ACTIVEback to summary
public static final int ACTIVE

The struct member offsets.

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

BEGINback to summary
public static final int BEGIN

The struct member offsets.

BUILDback to summary
public static final int BUILD

The struct member offsets.

BUTTON_BEHAVIORback to summary
public static final int BUTTON_BEHAVIOR

The struct member offsets.

CLIPback to summary
public static final int CLIP

The struct member offsets.

COUNTback to summary
public static final int COUNT

The struct member offsets.

CURRENTback to summary
public static final int CURRENT

The struct member offsets.

DELTA_TIME_SECONDSback to summary
public static final int DELTA_TIME_SECONDS

The struct member offsets.

DRAW_LISTback to summary
public static final int DRAW_LIST

The struct member offsets.

ENDback to summary
public static final int END

The struct member offsets.

FREELISTback to summary
public static final int FREELIST

The struct member offsets.

INPUTback to summary
public static final int INPUT

The struct member offsets.

LAST_WIDGET_STATEback to summary
public static final int LAST_WIDGET_STATE

The struct member offsets.

MEMORYback to summary
public static final int MEMORY

The struct member offsets.

OVERLAYback to summary
public static final int OVERLAY

The struct member offsets.

POOLback to summary
public static final int POOL

The struct member offsets.

SEQback to summary
public static final int SEQ

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

STACKSback to summary
public static final int STACKS

The struct member offsets.

STYLEback to summary
public static final int STYLE

The struct member offsets.

TEXT_EDITback to summary
public static final int TEXT_EDIT

The struct member offsets.

USE_POOLback to summary
public static final int USE_POOL

The struct member offsets.

USERDATAback to summary
public static final int USERDATA

The struct member offsets.

Constructor Detail

NkContextback to summary
protected NkContext(long address, ByteBuffer container)
NkContextback to summary
public NkContext(ByteBuffer container)

Creates a NkContext instance at the current position of the specified ByteBuffer 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

button_behaviorback to summary
public int button_behavior()
Returns:int

the value of the button_behavior field.

Annotations
@NativeType:enum nk_button_behavior
callocback to summary
public static NkContext calloc()

Returns a new NkContext instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static NkContext calloc(MemoryStack stack)

Returns a new NkContext instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocStackback to summary
public static NkContext callocStack()

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static NkContext callocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
clipback to summary
public NkClipboard clip()
Returns:NkClipboard

a NkClipboard view of the clip field.

Annotations
@NativeType:struct nk_clipboard
createback to summary
protected NkContext create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static NkContext create()

Returns a new NkContext instance allocated with BufferUtils.

createback to summary
public static NkContext create(long address)

Returns a new NkContext instance for the specified memory address.

createSafeback to summary
public static NkContext createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
delta_time_secondsback to summary
public float delta_time_seconds()
Returns:float

the value of the delta_time_seconds field.

inputback to summary
public NkInput input()
Returns:NkInput

a NkInput view of the input field.

Annotations
@NativeType:struct nk_input
last_widget_stateback to summary
public int last_widget_state()
Returns:int

the value of the last_widget_state field.

Annotations
@NativeType:nk_flags
mallocback to summary
public static NkContext malloc()

Returns a new NkContext instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static NkContext malloc(MemoryStack stack)

Returns a new NkContext instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocStackback to summary
public static NkContext mallocStack()

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static NkContext mallocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
memoryback to summary
public NkBuffer memory()
Returns:NkBuffer

a NkBuffer view of the memory field.

Annotations
@NativeType:struct nk_buffer
nactiveback to summary
public static NkWindow nactive(long struct)
Annotations
@Nullable
nbeginback to summary
public static NkWindow nbegin(long struct)
Annotations
@Nullable
nbuildback to summary
public static int nbuild(long struct)
nbutton_behaviorback to summary
public static int nbutton_behavior(long struct)

Unsafe version of button_behavior.

nclipback to summary
public static NkClipboard nclip(long struct)

Unsafe version of clip.

ncountback to summary
public static int ncount(long struct)
ncurrentback to summary
public static NkWindow ncurrent(long struct)
Annotations
@Nullable
ndelta_time_secondsback to summary
public static float ndelta_time_seconds(long struct)

Unsafe version of delta_time_seconds.

ndraw_listback to summary
public static NkDrawList ndraw_list(long struct)
nendback to summary
public static NkWindow nend(long struct)
Annotations
@Nullable
nfreelistback to summary
public static long nfreelist(long struct)
ninputback to summary
public static NkInput ninput(long struct)

Unsafe version of input.

nlast_widget_stateback to summary
public static int nlast_widget_state(long struct)

Unsafe version of last_widget_state.

nmemoryback to summary
public static NkBuffer nmemory(long struct)

Unsafe version of memory.

noverlayback to summary
public static NkCommandBuffer noverlay(long struct)
npoolback to summary
public static NkPool npool(long struct)
nseqback to summary
public static int nseq(long struct)
nstacksback to summary
public static NkConfigurationStacks nstacks(long struct)

Unsafe version of stacks.

nstyleback to summary
public static NkStyle nstyle(long struct)

Unsafe version of style.

ntext_editback to summary
public static NkTextEdit ntext_edit(long struct)
nuse_poolback to summary
public static int nuse_pool(long struct)
nuserdataback to summary
public static NkHandle nuserdata(long struct)
sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
stacksback to summary
public NkConfigurationStacks stacks()
Returns:NkConfigurationStacks

a NkConfigurationStacks view of the stacks field.

Annotations
@NativeType:struct nk_configuration_stacks
styleback to summary
public NkStyle style()
Returns:NkStyle

a NkStyle view of the style field.

Annotations
@NativeType:struct nk_style