Class NkContext

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<NkContext>
org.lwjgl.nuklear.NkContext
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class NkContext extends org.lwjgl.system.Struct<NkContext> 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;
     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

    org.lwjgl.system.Struct.StructValidation

    Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

    org.lwjgl.system.Pointer.Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The struct member offsets.
    static final int
    The struct alignment in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct size in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.

    Fields inherited from interface org.lwjgl.system.Pointer

    BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    NkContext(ByteBuffer container)
    Creates a NkContext instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    static NkContext
    Returns a new NkContext instance allocated with memCalloc.
    static NkContext
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new NkContext instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static NkContext
    Deprecated.
    static NkContext
    callocStack(org.lwjgl.system.MemoryStack stack)
    Deprecated.
     
    static NkContext
    Returns a new NkContext instance allocated with BufferUtils.
    static NkContext
    create(long address)
    Returns a new NkContext instance for the specified memory address.
    static @Nullable NkContext
    createSafe(long address)
    Like create, but returns null if address is NULL.
    float
     
     
    int
     
    static NkContext
    Returns a new NkContext instance allocated with memAlloc.
    static NkContext
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new NkContext instance allocated on the specified MemoryStack.
    static NkContext
    Deprecated.
    static NkContext
    mallocStack(org.lwjgl.system.MemoryStack stack)
    Deprecated.
     
    static long
    nactive(long struct)
     
    static long
    nbegin(long struct)
     
    static int
    nbuild(long struct)
     
    static int
    nbutton_behavior(long struct)
    Unsafe version of button_behavior().
    nclip(long struct)
    Unsafe version of clip().
    static int
    ncount(long struct)
     
    static long
    ncurrent(long struct)
     
    static float
    ndelta_time_seconds(long struct)
    Unsafe version of delta_time_seconds().
    static NkDrawList
    ndraw_list(long struct)
     
    static long
    nend(long struct)
     
    static long
    nfreelist(long struct)
     
    static NkInput
    ninput(long struct)
    Unsafe version of input().
    static int
    nlast_widget_state(long struct)
    Unsafe version of last_widget_state().
    static NkBuffer
    nmemory(long struct)
    Unsafe version of memory().
    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 of stacks().
    static NkStyle
    nstyle(long struct)
    Unsafe version of style().
    static NkTextEdit
    ntext_edit(long struct)
     
    static int
    nuse_pool(long struct)
     
    static NkHandle
    nuserdata(long struct)
     
    int
     
    org.lwjgl.nuklear.NkConfigurationStacks
     
     

    Methods inherited from class org.lwjgl.system.Struct

    clear, free, isNull, validate, validate

    Methods inherited from class org.lwjgl.system.Pointer.Default

    address, equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.lwjgl.system.NativeResource

    close, free
  • 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()
      Specified by:
      sizeof in class org.lwjgl.system.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(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

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

      public static NkContext malloc(org.lwjgl.system.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(org.lwjgl.system.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)