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.StructLayout
struct nk_mouse {struct nk_mouse_buttonbuttons[NK_BUTTON_MAX];struct nk_vec2pos;struct nk_vec2prev;struct nk_vec2delta;struct nk_vec2scroll_delta; bool grab; bool grabbed; bool ungrab; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNkMouse.BufferAn array ofNkMousestructs.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NkMouseButton.Bufferbuttons()Returns aNkMouseButton.Buffer view of thebuttonsfield.NkMouseButtonbuttons(int index)Returns aNkMouseButtonview of the struct at the specified index of thebuttonsfield.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 NkMousecreateSafe(long address)static NkMouse.BuffercreateSafe(long address, int capacity)NkVec2delta()Returns aNkVec2view of thedeltafield.NkMousedelta(java.util.function.Consumer<NkVec2> consumer)Passes thedeltafield to the specifiedConsumer.booleangrab()Returns the value of thegrabfield.booleangrabbed()Returns the value of thegrabbedfield.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 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().NkVec2pos()Returns aNkVec2view of theposfield.NkMousepos(java.util.function.Consumer<NkVec2> consumer)Passes theposfield to the specifiedConsumer.NkVec2prev()Returns aNkVec2view of theprevfield.NkMouseprev(java.util.function.Consumer<NkVec2> consumer)Passes theprevfield to the specifiedConsumer.NkVec2scroll_delta()Returns aNkVec2view of thescroll_deltafield.NkMousescroll_delta(java.util.function.Consumer<NkVec2> consumer)Passes thescroll_deltafield to the specifiedConsumer.intsizeof()booleanungrab()Returns the value of theungrabfield.
-
-
-
Constructor Detail
-
NkMouse
public NkMouse(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
buttons
public NkMouseButton.Buffer buttons()
Returns aNkMouseButton.Buffer view of thebuttonsfield.
-
buttons
public NkMouseButton buttons(int index)
Returns aNkMouseButtonview of the struct at the specified index of thebuttonsfield.
-
pos
public NkMouse pos(java.util.function.Consumer<NkVec2> consumer)
Passes theposfield to the specifiedConsumer.
-
prev
public NkMouse prev(java.util.function.Consumer<NkVec2> consumer)
Passes theprevfield to the specifiedConsumer.
-
delta
public NkMouse delta(java.util.function.Consumer<NkVec2> consumer)
Passes thedeltafield to the specifiedConsumer.
-
scroll_delta
public NkMouse scroll_delta(java.util.function.Consumer<NkVec2> consumer)
Passes thescroll_deltafield to the specifiedConsumer.
-
grab
public boolean grab()
Returns the value of thegrabfield.
-
grabbed
public boolean grabbed()
Returns the value of thegrabbedfield.
-
ungrab
public boolean ungrab()
Returns the value of theungrabfield.
-
create
public static NkMouse create(long address)
Returns a newNkMouseinstance 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.Bufferinstance 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().
-
-