Class NkMouse

All Implemented Interfaces:
Pointer

public class NkMouse extends Struct<NkMouse>

 struct nk_mouse {
     {@link NkMouseButton struct nk_mouse_button} buttons[NK_BUTTON_MAX];
     {@link NkVec2 struct nk_vec2} pos;
     {@link NkVec2 struct nk_vec2} down_pos;
     {@link NkVec2 struct nk_vec2} prev;
     {@link NkVec2 struct nk_vec2} delta;
     {@link NkVec2 struct nk_vec2} scroll_delta;
     bool grab;
     bool grabbed;
     bool ungrab;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int BUTTONS
      The struct member offsets.
    • POS

      public static final int POS
      The struct member offsets.
    • DOWN_POS

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

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

      public static final int DELTA
      The struct member offsets.
    • SCROLL_DELTA

      public static final int SCROLL_DELTA
      The struct member offsets.
    • GRAB

      public static final int GRAB
      The struct member offsets.
    • GRABBED

      public static final int GRABBED
      The struct member offsets.
    • UNGRAB

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

    • NkMouse

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

      public NkMouseButton.Buffer buttons()
      Returns:
      a NkMouseButton.Buffer view of the buttons field.
    • buttons

      public NkMouseButton buttons(int index)
      Returns:
      a NkMouseButton view of the struct at the specified index of the buttons field.
    • pos

      public NkVec2 pos()
      Returns:
      a NkVec2 view of the pos field.
    • down_pos

      public NkVec2 down_pos()
      Returns:
      a NkVec2 view of the down_pos field.
    • prev

      public NkVec2 prev()
      Returns:
      a NkVec2 view of the prev field.
    • delta

      public NkVec2 delta()
      Returns:
      a NkVec2 view of the delta field.
    • scroll_delta

      public NkVec2 scroll_delta()
      Returns:
      a NkVec2 view of the scroll_delta field.
    • grab

      public boolean grab()
      Returns:
      the value of the grab field.
    • grabbed

      public boolean grabbed()
      Returns:
      the value of the grabbed field.
    • ungrab

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

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

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

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

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

      public static NkMouseButton.Buffer nbuttons(long struct)
      Unsafe version of buttons().
    • nbuttons

      public static NkMouseButton nbuttons(long struct, int index)
      Unsafe version of buttons.
    • npos

      public static NkVec2 npos(long struct)
      Unsafe version of pos().
    • ndown_pos

      public static NkVec2 ndown_pos(long struct)
      Unsafe version of down_pos().
    • nprev

      public static NkVec2 nprev(long struct)
      Unsafe version of prev().
    • ndelta

      public static NkVec2 ndelta(long struct)
      Unsafe version of delta().
    • nscroll_delta

      public static NkVec2 nscroll_delta(long struct)
      Unsafe version of scroll_delta().
    • ngrab

      public static boolean ngrab(long struct)
      Unsafe version of grab().
    • ngrabbed

      public static boolean ngrabbed(long struct)
      Unsafe version of grabbed().
    • nungrab

      public static boolean nungrab(long struct)
      Unsafe version of ungrab().