Package org.lwjgl.nuklear
Class NkMouse
- All Implemented Interfaces:
Pointer
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;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionNkMouse(ByteBuffer container) Creates aNkMouseinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionbuttons()buttons(int index) static NkMousecreate(long address) Returns a newNkMouseinstance for the specified memory address.static NkMouse.Buffercreate(long address, int capacity) Create aNkMouse.Bufferinstance at the specified memory.static @Nullable NkMousecreateSafe(long address) static @Nullable NkMouse.BuffercreateSafe(long address, int capacity) delta()down_pos()booleangrab()booleangrabbed()static NkMouseButton.Buffernbuttons(long struct) Unsafe version ofbuttons().static NkMouseButtonnbuttons(long struct, int index) Unsafe version ofbuttons.static NkVec2ndelta(long struct) Unsafe version ofdelta().static NkVec2ndown_pos(long struct) Unsafe version ofdown_pos().static booleanngrab(long struct) Unsafe version ofgrab().static booleanngrabbed(long struct) Unsafe version ofgrabbed().static NkVec2npos(long struct) Unsafe version ofpos().static NkVec2nprev(long struct) Unsafe version ofprev().static NkVec2nscroll_delta(long struct) Unsafe version ofscroll_delta().static booleannungrab(long struct) Unsafe version ofungrab().pos()prev()intsizeof()Returnssizeof(struct).booleanungrab()Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
BUTTONS
public static final int BUTTONSThe struct member offsets. -
POS
public static final int POSThe struct member offsets. -
DOWN_POS
public static final int DOWN_POSThe struct member offsets. -
PREV
public static final int PREVThe struct member offsets. -
DELTA
public static final int DELTAThe struct member offsets. -
SCROLL_DELTA
public static final int SCROLL_DELTAThe struct member offsets. -
GRAB
public static final int GRABThe struct member offsets. -
GRABBED
public static final int GRABBEDThe struct member offsets. -
UNGRAB
public static final int UNGRABThe struct member offsets.
-
-
Constructor Details
-
NkMouse
Creates aNkMouseinstance at the current position of the specifiedByteBuffercontainer. 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:StructReturnssizeof(struct). -
buttons
- Returns:
- a
NkMouseButton.Buffer view of thebuttonsfield.
-
buttons
- Returns:
- a
NkMouseButtonview of the struct at the specified index of thebuttonsfield.
-
pos
- Returns:
- a
NkVec2view of theposfield.
-
down_pos
- Returns:
- a
NkVec2view of thedown_posfield.
-
prev
- Returns:
- a
NkVec2view of theprevfield.
-
delta
- Returns:
- a
NkVec2view of thedeltafield.
-
scroll_delta
- Returns:
- a
NkVec2view of thescroll_deltafield.
-
grab
public boolean grab()- Returns:
- the value of the
grabfield.
-
grabbed
public boolean grabbed()- Returns:
- the value of the
grabbedfield.
-
ungrab
public boolean ungrab()- Returns:
- the value of the
ungrabfield.
-
create
Returns a newNkMouseinstance for the specified memory address. -
createSafe
-
create
Create aNkMouse.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
nbuttons
Unsafe version ofbuttons(). -
nbuttons
Unsafe version ofbuttons. -
npos
Unsafe version ofpos(). -
ndown_pos
Unsafe version ofdown_pos(). -
nprev
Unsafe version ofprev(). -
ndelta
Unsafe version ofdelta(). -
nscroll_delta
Unsafe version ofscroll_delta(). -
ngrab
public static boolean ngrab(long struct) Unsafe version ofgrab(). -
ngrabbed
public static boolean ngrabbed(long struct) Unsafe version ofgrabbed(). -
nungrab
public static boolean nungrab(long struct) Unsafe version ofungrab().
-