Class NkEditState

All Implemented Interfaces:
Pointer

public class NkEditState extends Struct<NkEditState>

Layout


 struct nk_edit_state {
     nk_hash name;
     unsigned int seq;
     unsigned int old;
     int active;
     int prev;
     int cursor;
     int sel_start;
     int sel_end;
     struct nk_scroll scrollbar;
     unsigned char mode;
     bool single_line;
 }
  • Field Details

    • SIZEOF

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

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

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

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

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

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

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

      public static final int CURSOR
      The struct member offsets.
    • SEL_START

      public static final int SEL_START
      The struct member offsets.
    • SEL_END

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

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

      public static final int MODE
      The struct member offsets.
    • SINGLE_LINE

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

    • NkEditState

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

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

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

      public int old()
      Returns:
      the value of the old field.
    • active

      public int active()
      Returns:
      the value of the active field.
    • prev

      public int prev()
      Returns:
      the value of the prev field.
    • cursor

      public int cursor()
      Returns:
      the value of the cursor field.
    • sel_start

      public int sel_start()
      Returns:
      the value of the sel_start field.
    • sel_end

      public int sel_end()
      Returns:
      the value of the sel_end field.
    • scrollbar

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

      public byte mode()
      Returns:
      the value of the mode field.
    • single_line

      public boolean single_line()
      Returns:
      the value of the single_line field.
    • create

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

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

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

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

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

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

      public static int nold(long struct)
      Unsafe version of old().
    • nactive

      public static int nactive(long struct)
      Unsafe version of active().
    • nprev

      public static int nprev(long struct)
      Unsafe version of prev().
    • ncursor

      public static int ncursor(long struct)
      Unsafe version of cursor().
    • nsel_start

      public static int nsel_start(long struct)
      Unsafe version of sel_start().
    • nsel_end

      public static int nsel_end(long struct)
      Unsafe version of sel_end().
    • nscrollbar

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

      public static byte nmode(long struct)
      Unsafe version of mode().
    • nsingle_line

      public static boolean nsingle_line(long struct)
      Unsafe version of single_line().