Class NkContext

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class NkContext extends Struct<NkContext> implements NativeResource

 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;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • INPUT

      public static final int INPUT
      The struct member offsets.
    • STYLE

      public static final int STYLE
      The struct member offsets.
    • MEMORY

      public static final int MEMORY
      The struct member offsets.
    • CLIP

      public static final int CLIP
      The struct member offsets.
    • LAST_WIDGET_STATE

      public static final int LAST_WIDGET_STATE
      The struct member offsets.
    • BUTTON_BEHAVIOR

      public static final int BUTTON_BEHAVIOR
      The struct member offsets.
    • STACKS

      public static final int STACKS
      The struct member offsets.
    • DELTA_TIME_SECONDS

      public static final int DELTA_TIME_SECONDS
      The struct member offsets.
    • DRAW_LIST

      public static final int DRAW_LIST
      The struct member offsets.
    • USERDATA

      public static final int USERDATA
      The struct member offsets.
    • TEXT_EDIT

      public static final int TEXT_EDIT
      The struct member offsets.
    • OVERLAY

      public static final int OVERLAY
      The struct member offsets.
    • BUILD

      public static final int BUILD
      The struct member offsets.
    • USE_POOL

      public static final int USE_POOL
      The struct member offsets.
    • POOL

      public static final int POOL
      The struct member offsets.
    • BEGIN

      public static final int BEGIN
      The struct member offsets.
    • END

      public static final int END
      The struct member offsets.
    • ACTIVE

      public static final int ACTIVE
      The struct member offsets.
    • CURRENT

      public static final int CURRENT
      The struct member offsets.
    • FREELIST

      public static final int FREELIST
      The struct member offsets.
    • COUNT

      public static final int COUNT
      The struct member offsets.
    • SEQ

      public static final int SEQ
      The struct member offsets.
  • Constructor Details

    • NkContext

      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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<NkContext>
    • input

      public NkInput input()
      Returns:
      a NkInput view of the input field.
    • style

      public NkStyle style()
      Returns:
      a NkStyle view of the style field.
    • memory

      public NkBuffer memory()
      Returns:
      a NkBuffer view of the memory field.
    • clip

      public NkClipboard clip()
      Returns:
      a NkClipboard view of the clip 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 the stacks field.
    • delta_time_seconds

      public float delta_time_seconds()
      Returns:
      the value of the delta_time_seconds field.
    • malloc

      public static NkContext malloc()
      Returns a new NkContext instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static NkContext calloc()
      Returns a new NkContext instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static NkContext create()
      Returns a new NkContext instance allocated with BufferUtils.
    • create

      public static NkContext create(long address)
      Returns a new NkContext instance for the specified memory address.
    • createSafe

      public static @Nullable NkContext createSafe(long address)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static NkContext mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static NkContext callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static NkContext mallocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static NkContext callocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • malloc

      public static NkContext malloc(MemoryStack stack)
      Returns a new NkContext instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      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 - the stack from which to allocate
    • ninput

      public static NkInput ninput(long struct)
      Unsafe version of input().
    • nstyle

      public static NkStyle nstyle(long struct)
      Unsafe version of style().
    • nmemory

      public static NkBuffer nmemory(long struct)
      Unsafe version of memory().
    • nclip

      public static NkClipboard nclip(long struct)
      Unsafe version of clip().
    • nlast_widget_state

      public static int nlast_widget_state(long struct)
      Unsafe version of last_widget_state().
    • nbutton_behavior

      public static int nbutton_behavior(long struct)
      Unsafe version of button_behavior().
    • nstacks

      public static org.lwjgl.nuklear.NkConfigurationStacks nstacks(long struct)
      Unsafe version of stacks().
    • ndelta_time_seconds

      public static float ndelta_time_seconds(long struct)
      Unsafe version of delta_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

      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)