Class NkMouse

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • BUTTONS, POS, PREV, DELTA, SCROLL_DELTA, GRAB, GRABBED, UNGRAB

        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.
      • pos

        public NkMouse pos​(java.util.function.Consumer<NkVec2> consumer)
        Passes the pos field to the specified Consumer.
      • prev

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

        public NkMouse prev​(java.util.function.Consumer<NkVec2> consumer)
        Passes the prev field to the specified Consumer.
      • delta

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

        public NkMouse delta​(java.util.function.Consumer<NkVec2> consumer)
        Passes the delta field to the specified Consumer.
      • scroll_delta

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

        public NkMouse scroll_delta​(java.util.function.Consumer<NkVec2> consumer)
        Passes the scroll_delta field to the specified Consumer.
      • 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

        @Nullable
        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.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        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().