Class NkMouse

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<NkMouse>
org.lwjgl.nuklear.NkMouse
All Implemented Interfaces:
org.lwjgl.system.Pointer

public class NkMouse extends org.lwjgl.system.Struct<NkMouse>

Layout


 struct nk_mouse {
     struct nk_mouse_button buttons[NK_BUTTON_MAX];
     struct nk_vec2 pos;
     struct nk_vec2 down_pos;
     struct nk_vec2 prev;
     struct nk_vec2 delta;
     struct nk_vec2 scroll_delta;
     bool grab;
     bool grabbed;
     bool ungrab;
 }
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An array of NkMouse structs.

    Nested classes/interfaces inherited from class org.lwjgl.system.Struct

    org.lwjgl.system.Struct.StructValidation

    Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

    org.lwjgl.system.Pointer.Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The struct alignment in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct size in bytes.
    static final int
    The struct member offsets.

    Fields inherited from interface org.lwjgl.system.Pointer

    BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    NkMouse(ByteBuffer container)
    Creates a NkMouse instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    buttons(int index)
     
    static NkMouse
    create(long address)
    Returns a new NkMouse instance for the specified memory address.
    create(long address, int capacity)
    Create a NkMouse.Buffer instance at the specified memory.
    static @Nullable NkMouse
    createSafe(long address)
    Like create, but returns null if address is NULL.
    static @Nullable NkMouse.Buffer
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
     
     
    boolean
     
    boolean
     
    nbuttons(long struct)
    Unsafe version of buttons().
    nbuttons(long struct, int index)
    Unsafe version of buttons.
    static NkVec2
    ndelta(long struct)
    Unsafe version of delta().
    static NkVec2
    ndown_pos(long struct)
    Unsafe version of down_pos().
    static boolean
    ngrab(long struct)
    Unsafe version of grab().
    static boolean
    ngrabbed(long struct)
    Unsafe version of grabbed().
    static NkVec2
    npos(long struct)
    Unsafe version of pos().
    static NkVec2
    nprev(long struct)
    Unsafe version of prev().
    static NkVec2
    nscroll_delta(long struct)
    Unsafe version of scroll_delta().
    static boolean
    nungrab(long struct)
    Unsafe version of ungrab().
    pos()
     
     
     
    int
     
    boolean
     

    Methods inherited from class org.lwjgl.system.Struct

    clear, free, isNull, validate, validate

    Methods inherited from class org.lwjgl.system.Pointer.Default

    address, equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • 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()
      Specified by:
      sizeof in class org.lwjgl.system.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().