Class NkMouse

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.

        The struct member offsets.
    • Constructor Detail

      • NkMouse

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

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • 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.
      • 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 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.
        address - the memory address
        capacity - the buffer capacity
      • createSafe

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

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

        public static NkVec2 npos​(long struct)
        Unsafe version of 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().