Class NkPropertyState

All Implemented Interfaces:
Pointer

public class NkPropertyState extends Struct<NkPropertyState>

 struct nk_property_state {
     int active;
     int prev;
     char buffer[NK_MAX_NUMBER_BUFFER];
     int length;
     int cursor;
     int select_start;
     int select_end;
     nk_hash name;
     unsigned int seq;
     unsigned int old;
     int state;
 }
  • Field Details

    • SIZEOF

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

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

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

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

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

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

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

      public static final int SELECT_START
      The struct member offsets.
    • SELECT_END

      public static final int SELECT_END
      The struct member offsets.
    • 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.
    • STATE

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

    • NkPropertyState

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

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

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

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

      public byte buffer(int index)
      Returns:
      the value at the specified index of the buffer field.
    • length

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

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

      public int select_start()
      Returns:
      the value of the select_start field.
    • select_end

      public int select_end()
      Returns:
      the value of the select_end field.
    • 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.
    • state

      public int state()
      Returns:
      the value of the state field.
    • create

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

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

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

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

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

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

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

      public static byte nbuffer(long struct, int index)
      Unsafe version of buffer.
    • nlength

      public static int nlength(long struct)
      Unsafe version of length().
    • ncursor

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

      public static int nselect_start(long struct)
      Unsafe version of select_start().
    • nselect_end

      public static int nselect_end(long struct)
      Unsafe version of select_end().
    • 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().
    • nstate

      public static int nstate(long struct)
      Unsafe version of state().