Class NkWindow

All Implemented Interfaces:
Pointer

public class NkWindow extends Struct<NkWindow>

 struct nk_window {
     unsigned int seq;
     nk_hash name;
     char name_string[NK_WINDOW_MAX_NAME];
     nk_flags flags;
     {@link NkRect struct nk_rect} bounds;
     {@link NkScroll struct nk_scroll} scrollbar;
     {@link NkCommandBuffer struct nk_command_buffer} buffer;
     {@link NkPanel struct nk_panel} * layout;
     float scrollbar_hiding_timer;
     {@link NkPropertyState struct nk_property_state} property;
     {@link NkPopupState struct nk_popup_state} popup;
     {@link NkEditState struct nk_edit_state} edit;
     unsigned int scrolled;
     nk_bool widgets_disabled;
     struct nk_table * tables;
     unsigned int table_count;
     {@link NkWindow struct nk_window} * next;
     {@link NkWindow struct nk_window} * prev;
     {@link NkWindow struct nk_window} * parent;
 }
  • Field Details

    • SIZEOF

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

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

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

      public static final int NAME
      The struct member offsets.
    • NAME_STRING

      public static final int NAME_STRING
      The struct member offsets.
    • FLAGS

      public static final int FLAGS
      The struct member offsets.
    • BOUNDS

      public static final int BOUNDS
      The struct member offsets.
    • SCROLLBAR

      public static final int SCROLLBAR
      The struct member offsets.
    • BUFFER

      public static final int BUFFER
      The struct member offsets.
    • LAYOUT

      public static final int LAYOUT
      The struct member offsets.
    • SCROLLBAR_HIDING_TIMER

      public static final int SCROLLBAR_HIDING_TIMER
      The struct member offsets.
    • PROPERTY

      public static final int PROPERTY
      The struct member offsets.
    • EDIT

      public static final int EDIT
      The struct member offsets.
    • SCROLLED

      public static final int SCROLLED
      The struct member offsets.
    • WIDGETS_DISABLED

      public static final int WIDGETS_DISABLED
      The struct member offsets.
    • TABLES

      public static final int TABLES
      The struct member offsets.
    • TABLE_COUNT

      public static final int TABLE_COUNT
      The struct member offsets.
    • NEXT

      public static final int NEXT
      The struct member offsets.
    • PREV

      public static final int PREV
      The struct member offsets.
    • PARENT

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

    • NkWindow

      public NkWindow(ByteBuffer container)
      Creates a NkWindow 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<NkWindow>
    • seq

      public int seq()
      Returns:
      the value of the seq field.
    • name

      public int name()
      Returns:
      the value of the name field.
    • name_string

      public ByteBuffer name_string()
      Returns:
      a ByteBuffer view of the name_string field.
    • name_stringString

      public String name_stringString()
      Returns:
      the null-terminated string stored in the name_string field.
    • flags

      public int flags()
      Returns:
      the value of the flags field.
    • bounds

      public NkRect bounds()
      Returns:
      a NkRect view of the bounds field.
    • scrollbar

      public NkScroll scrollbar()
      Returns:
      a NkScroll view of the scrollbar field.
    • buffer

      public NkCommandBuffer buffer()
      Returns:
      a NkCommandBuffer view of the buffer field.
    • layout

      public NkPanel layout()
      Returns:
      a NkPanel view of the struct pointed to by the layout field.
    • scrollbar_hiding_timer

      public float scrollbar_hiding_timer()
      Returns:
      the value of the scrollbar_hiding_timer field.
    • property

      public NkPropertyState property()
      Returns:
      a NkPropertyState view of the property field.
    • popup

      public NkPopupState popup()
      Returns:
      a NkPopupState view of the popup field.
    • edit

      public NkEditState edit()
      Returns:
      a NkEditState view of the edit field.
    • scrolled

      public int scrolled()
      Returns:
      the value of the scrolled field.
    • widgets_disabled

      public boolean widgets_disabled()
      Returns:
      the value of the widgets_disabled field.
    • tables

      public long tables()
      Returns:
      the value of the tables field.
    • table_count

      public int table_count()
      Returns:
      the value of the table_count field.
    • next

      public NkWindow next()
      Returns:
      a NkWindow view of the struct pointed to by the next field.
    • prev

      public NkWindow prev()
      Returns:
      a NkWindow view of the struct pointed to by the prev field.
    • parent

      public NkWindow parent()
      Returns:
      a NkWindow view of the struct pointed to by the parent field.
    • create

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

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

      public static NkWindow.Buffer create(long address, int capacity)
      Create a NkWindow.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable NkWindow.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • nseq

      public static int nseq(long struct)
      Unsafe version of seq().
    • nname

      public static int nname(long struct)
      Unsafe version of name().
    • nname_string

      public static ByteBuffer nname_string(long struct)
      Unsafe version of name_string().
    • nname_stringString

      public static String nname_stringString(long struct)
      Unsafe version of name_stringString().
    • nflags

      public static int nflags(long struct)
      Unsafe version of flags().
    • nbounds

      public static NkRect nbounds(long struct)
      Unsafe version of bounds().
    • nscrollbar

      public static NkScroll nscrollbar(long struct)
      Unsafe version of scrollbar().
    • nbuffer

      public static NkCommandBuffer nbuffer(long struct)
      Unsafe version of buffer().
    • nlayout

      public static NkPanel nlayout(long struct)
      Unsafe version of layout().
    • nscrollbar_hiding_timer

      public static float nscrollbar_hiding_timer(long struct)
      Unsafe version of scrollbar_hiding_timer().
    • nproperty

      public static NkPropertyState nproperty(long struct)
      Unsafe version of property().
    • npopup

      public static NkPopupState npopup(long struct)
      Unsafe version of popup().
    • nedit

      public static NkEditState nedit(long struct)
      Unsafe version of edit().
    • nscrolled

      public static int nscrolled(long struct)
      Unsafe version of scrolled().
    • nwidgets_disabled

      public static boolean nwidgets_disabled(long struct)
      Unsafe version of widgets_disabled().
    • ntables

      public static long ntables(long struct)
      Unsafe version of tables().
    • ntable_count

      public static int ntable_count(long struct)
      Unsafe version of table_count().
    • nnext

      public static NkWindow nnext(long struct)
      Unsafe version of next().
    • nprev

      public static NkWindow nprev(long struct)
      Unsafe version of prev().
    • nparent

      public static NkWindow nparent(long struct)
      Unsafe version of parent().