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.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic 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
ConstructorsConstructorDescriptionNkMouse
(ByteBuffer container) Creates aNkMouse
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionbuttons()
buttons
(int index) static NkMouse
create
(long address) Returns a newNkMouse
instance for the specified memory address.static NkMouse.Buffer
create
(long address, int capacity) Create aNkMouse.Buffer
instance at the specified memory.static @Nullable NkMouse
createSafe
(long address) static @Nullable NkMouse.Buffer
createSafe
(long address, int capacity) delta()
down_pos()
boolean
grab()
boolean
grabbed()
static NkMouseButton.Buffer
nbuttons
(long struct) Unsafe version ofbuttons()
.static NkMouseButton
nbuttons
(long struct, int index) Unsafe version ofbuttons
.static NkVec2
ndelta
(long struct) Unsafe version ofdelta()
.static NkVec2
ndown_pos
(long struct) Unsafe version ofdown_pos()
.static boolean
ngrab
(long struct) Unsafe version ofgrab()
.static boolean
ngrabbed
(long struct) Unsafe version ofgrabbed()
.static NkVec2
npos
(long struct) Unsafe version ofpos()
.static NkVec2
nprev
(long struct) Unsafe version ofprev()
.static NkVec2
nscroll_delta
(long struct) Unsafe version ofscroll_delta()
.static boolean
nungrab
(long struct) Unsafe version ofungrab()
.pos()
prev()
int
sizeof()
Returnssizeof(struct)
.boolean
ungrab()
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 aNkMouse
instance at the current position of the specifiedByteBuffer
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
Returnssizeof(struct)
. -
buttons
- Returns:
- a
NkMouseButton
.Buffer view of thebuttons
field.
-
buttons
- Returns:
- a
NkMouseButton
view of the struct at the specified index of thebuttons
field.
-
pos
- Returns:
- a
NkVec2
view of thepos
field.
-
down_pos
- Returns:
- a
NkVec2
view of thedown_pos
field.
-
prev
- Returns:
- a
NkVec2
view of theprev
field.
-
delta
- Returns:
- a
NkVec2
view of thedelta
field.
-
scroll_delta
- Returns:
- a
NkVec2
view of thescroll_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
Returns a newNkMouse
instance for the specified memory address. -
createSafe
-
create
Create aNkMouse.Buffer
instance 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()
.
-