Package org.lwjgl.nuklear
Class NkMouse
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkMouse
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class NkMouse extends org.lwjgl.system.Struct
Layout
struct nk_mouse {
struct nk_mouse_button
buttons[NK_BUTTON_MAX];struct nk_vec2
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
NkMouse.Buffer
An array ofNkMouse
structs.
-
Constructor Summary
Constructors Constructor Description NkMouse(java.nio.ByteBuffer container)
Creates aNkMouse
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NkMouseButton.Buffer
buttons()
Returns aNkMouseButton
.Buffer view of thebuttons
field.NkMouseButton
buttons(int index)
Returns aNkMouseButton
view of the struct at the specified index of thebuttons
field.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 NkMouse
createSafe(long address)
static NkMouse.Buffer
createSafe(long address, int capacity)
NkVec2
delta()
Returns aNkVec2
view of thedelta
field.boolean
grab()
Returns the value of thegrab
field.boolean
grabbed()
Returns the value of thegrabbed
field.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 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()
.NkVec2
pos()
Returns aNkVec2
view of thepos
field.NkVec2
prev()
Returns aNkVec2
view of theprev
field.NkVec2
scroll_delta()
Returns aNkVec2
view of thescroll_delta
field.int
sizeof()
boolean
ungrab()
Returns the value of theungrab
field.
-
-
-
Constructor Detail
-
NkMouse
public NkMouse(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
buttons
public NkMouseButton.Buffer buttons()
Returns aNkMouseButton
.Buffer view of thebuttons
field.
-
buttons
public NkMouseButton buttons(int index)
Returns aNkMouseButton
view of the struct at the specified index of thebuttons
field.
-
grab
public boolean grab()
Returns the value of thegrab
field.
-
grabbed
public boolean grabbed()
Returns the value of thegrabbed
field.
-
ungrab
public boolean ungrab()
Returns the value of theungrab
field.
-
create
public static NkMouse create(long address)
Returns a newNkMouse
instance for the specified memory address.
-
createSafe
@Nullable public static NkMouse createSafe(long address)
-
create
public static NkMouse.Buffer create(long address, int capacity)
Create aNkMouse.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static NkMouse.Buffer createSafe(long address, int capacity)
-
nbuttons
public static NkMouseButton.Buffer nbuttons(long struct)
Unsafe version ofbuttons()
.
-
nbuttons
public static NkMouseButton nbuttons(long struct, int index)
Unsafe version ofbuttons
.
-
nscroll_delta
public static NkVec2 nscroll_delta(long struct)
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()
.
-
-