Class NkPropertyState

  • All Implemented Interfaces:
    Pointer

    public class NkPropertyState
    extends Struct

    Layout

    
     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 Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • ACTIVE, PREV, BUFFER, LENGTH, CURSOR, SELECT_START, SELECT_END, NAME, SEQ, OLD, STATE

        The struct member offsets.
    • Constructor Detail

      • NkPropertyState

        public NkPropertyState​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • active

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

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

        public java.nio.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.
      • createSafe

        @Nullable
        public static 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

        @Nullable
        public static 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 java.nio.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().