Package org.lwjgl.nuklear
Class NkMouseButton
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkMouseButton
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class NkMouseButton extends org.lwjgl.system.StructLayout
struct nk_mouse_button { int down; unsigned int clicked;struct nk_vec2clicked_pos; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNkMouseButton.BufferAn array ofNkMouseButtonstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCLICKED
CLICKED_POS
DOWNThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description NkMouseButton(java.nio.ByteBuffer container)Creates aNkMouseButtoninstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intclicked()Returns the value of theclickedfield.NkVec2clicked_pos()Returns aNkVec2view of theclicked_posfield.NkMouseButtonclicked_pos(java.util.function.Consumer<NkVec2> consumer)Passes theclicked_posfield to the specifiedConsumer.static NkMouseButtoncreate(long address)Returns a newNkMouseButtoninstance for the specified memory address.static NkMouseButton.Buffercreate(long address, int capacity)Create aNkMouseButton.Bufferinstance at the specified memory.static NkMouseButtoncreateSafe(long address)static NkMouseButton.BuffercreateSafe(long address, int capacity)intdown()Returns the value of thedownfield.static intnclicked(long struct)Unsafe version ofclicked().static NkVec2nclicked_pos(long struct)Unsafe version ofclicked_pos().static intndown(long struct)Unsafe version ofdown().intsizeof()
-
-
-
Constructor Detail
-
NkMouseButton
public NkMouseButton(java.nio.ByteBuffer container)
Creates aNkMouseButtoninstance 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
-
down
public int down()
Returns the value of thedownfield.
-
clicked
public int clicked()
Returns the value of theclickedfield.
-
clicked_pos
public NkMouseButton clicked_pos(java.util.function.Consumer<NkVec2> consumer)
Passes theclicked_posfield to the specifiedConsumer.
-
create
public static NkMouseButton create(long address)
Returns a newNkMouseButtoninstance for the specified memory address.
-
createSafe
@Nullable public static NkMouseButton createSafe(long address)
-
create
public static NkMouseButton.Buffer create(long address, int capacity)
Create aNkMouseButton.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static NkMouseButton.Buffer createSafe(long address, int capacity)
-
ndown
public static int ndown(long struct)
Unsafe version ofdown().
-
nclicked
public static int nclicked(long struct)
Unsafe version ofclicked().
-
nclicked_pos
public static NkVec2 nclicked_pos(long struct)
Unsafe version ofclicked_pos().
-
-