Top Description Inners Fields Constructors Methods
org.lwjgl.nuklear

public Class NkMouse

extends Struct<NkMouse>
Class Inheritance
Annotations
@NativeType:struct nk_mouse
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

Layout


struct nk_mouse {
    struct nk_mouse_button buttons[NK_BUTTON_MAX];
    struct nk_vec2 pos;
    struct nk_vec2 down_pos;
    struct nk_vec2 prev;
    struct nk_vec2 delta;
    struct nk_vec2 scroll_delta;
    bool grab;
    bool grabbed;
    bool ungrab;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
NkMouse.Buffer

An array of NkMouse structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
BUTTONS

The struct member offsets.

public static final int
DELTA

The struct member offsets.

public static final int
DOWN_POS

The struct member offsets.

public static final int
GRAB

The struct member offsets.

public static final int
GRABBED

The struct member offsets.

public static final int
POS

The struct member offsets.

public static final int
PREV

The struct member offsets.

public static final int
SCROLL_DELTA

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
UNGRAB

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
NkMouse(long address, ByteBuffer container)

public
NkMouse(ByteBuffer container)

Creates a NkMouse instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public NkMouseButton.Buffer

Returns:

a NkMouseButton.Buffer view of the buttons field.
buttons
()

public NkMouseButton

Returns:

a NkMouseButton view of the struct at the specified index of the buttons field.
buttons
(int index)

protected NkMouse
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static NkMouse
create(long address)

Returns a new NkMouse instance for the specified memory address.

public static NkMouse.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a NkMouse.Buffer instance at the specified memory.

public static NkMouse
createSafe(long address)

Like create, but returns null if address is NULL.

public static NkMouse.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public NkVec2

Returns:

a NkVec2 view of the delta field.
delta
()

public NkVec2

Returns:

a NkVec2 view of the down_pos field.
down_pos
()

public boolean

Returns:

the value of the grab field.
grab
()

public boolean

Returns:

the value of the grabbed field.
grabbed
()

public static NkMouseButton.Buffer
nbuttons(long struct)

Unsafe version of buttons.

public static NkMouseButton
nbuttons(long struct, int index)

Unsafe version of buttons.

public static NkVec2
ndelta(long struct)

Unsafe version of delta.

public static NkVec2
ndown_pos(long struct)

Unsafe version of down_pos.

public static boolean
ngrab(long struct)

Unsafe version of grab.

public static boolean
ngrabbed(long struct)

Unsafe version of grabbed.

public static NkVec2
npos(long struct)

Unsafe version of pos.

public static NkVec2
nprev(long struct)

Unsafe version of prev.

public static NkVec2
nscroll_delta(long struct)

Unsafe version of scroll_delta.

public static boolean
nungrab(long struct)

Unsafe version of ungrab.

public NkVec2

Returns:

a NkVec2 view of the pos field.
pos
()

public NkVec2

Returns:

a NkVec2 view of the prev field.
prev
()

public NkVec2

Returns:

a NkVec2 view of the scroll_delta field.
scroll_delta
()

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public boolean

Returns:

the value of the ungrab field.
ungrab
()

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

BUTTONSback to summary
public static final int BUTTONS

The struct member offsets.

DELTAback to summary
public static final int DELTA

The struct member offsets.

DOWN_POSback to summary
public static final int DOWN_POS

The struct member offsets.

GRABback to summary
public static final int GRAB

The struct member offsets.

GRABBEDback to summary
public static final int GRABBED

The struct member offsets.

POSback to summary
public static final int POS

The struct member offsets.

PREVback to summary
public static final int PREV

The struct member offsets.

SCROLL_DELTAback to summary
public static final int SCROLL_DELTA

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

UNGRABback to summary
public static final int UNGRAB

The struct member offsets.

Constructor Detail

NkMouseback to summary
protected NkMouse(long address, ByteBuffer container)
NkMouseback to summary
public NkMouse(ByteBuffer container)

Creates a NkMouse instance at the current position of the specified ByteBuffer 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

buttonsback to summary
public NkMouseButton.Buffer buttons()
Returns:NkMouseButton.Buffer

a NkMouseButton.Buffer view of the buttons field.

Annotations
@NativeType:struct nk_mouse_button[NK_BUTTON_MAX]
buttonsback to summary
public NkMouseButton buttons(int index)
Returns:NkMouseButton

a NkMouseButton view of the struct at the specified index of the buttons field.

Annotations
@NativeType:struct nk_mouse_button
createback to summary
protected NkMouse create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static NkMouse create(long address)

Returns a new NkMouse instance for the specified memory address.

createback to summary
public static NkMouse.Buffer create(long address, int capacity)

Create a NkMouse.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static NkMouse createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static NkMouse.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
deltaback to summary
public NkVec2 delta()
Returns:NkVec2

a NkVec2 view of the delta field.

Annotations
@NativeType:struct nk_vec2
down_posback to summary
public NkVec2 down_pos()
Returns:NkVec2

a NkVec2 view of the down_pos field.

Annotations
@NativeType:struct nk_vec2
grabback to summary
public boolean grab()
Returns:boolean

the value of the grab field.

Annotations
@NativeType:bool
grabbedback to summary
public boolean grabbed()
Returns:boolean

the value of the grabbed field.

Annotations
@NativeType:bool
nbuttonsback to summary
public static NkMouseButton.Buffer nbuttons(long struct)

Unsafe version of buttons.

nbuttonsback to summary
public static NkMouseButton nbuttons(long struct, int index)

Unsafe version of buttons.

ndeltaback to summary
public static NkVec2 ndelta(long struct)

Unsafe version of delta.

ndown_posback to summary
public static NkVec2 ndown_pos(long struct)

Unsafe version of down_pos.

ngrabback to summary
public static boolean ngrab(long struct)

Unsafe version of grab.

ngrabbedback to summary
public static boolean ngrabbed(long struct)

Unsafe version of grabbed.

nposback to summary
public static NkVec2 npos(long struct)

Unsafe version of pos.

nprevback to summary
public static NkVec2 nprev(long struct)

Unsafe version of prev.

nscroll_deltaback to summary
public static NkVec2 nscroll_delta(long struct)

Unsafe version of scroll_delta.

nungrabback to summary
public static boolean nungrab(long struct)

Unsafe version of ungrab.

posback to summary
public NkVec2 pos()
Returns:NkVec2

a NkVec2 view of the pos field.

Annotations
@NativeType:struct nk_vec2
prevback to summary
public NkVec2 prev()
Returns:NkVec2

a NkVec2 view of the prev field.

Annotations
@NativeType:struct nk_vec2
scroll_deltaback to summary
public NkVec2 scroll_delta()
Returns:NkVec2

a NkVec2 view of the scroll_delta field.

Annotations
@NativeType:struct nk_vec2
sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
ungrabback to summary
public boolean ungrab()
Returns:boolean

the value of the ungrab field.

Annotations
@NativeType:bool
org.lwjgl.nuklear back to summary

public Class NkMouse.Buffer

extends StructBuffer<NkMouse, NkMouse.Buffer>
Class Inheritance

An array of NkMouse structs.

Field Summary

Modifier and TypeField and Description
private static final NkMouse

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new NkMouse.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public NkMouseButton.Buffer

Returns:

a NkMouseButton.Buffer view of the buttons field.
buttons
()

public NkMouseButton

Returns:

a NkMouseButton view of the struct at the specified index of the buttons field.
buttons
(int index)

public NkVec2

Returns:

a NkVec2 view of the delta field.
delta
()

public NkVec2

Returns:

a NkVec2 view of the down_pos field.
down_pos
()

protected NkMouse
public boolean

Returns:

the value of the grab field.
grab
()

public boolean

Returns:

the value of the grabbed field.
grabbed
()

public NkVec2

Returns:

a NkVec2 view of the pos field.
pos
()

public NkVec2

Returns:

a NkVec2 view of the prev field.
prev
()

public NkVec2

Returns:

a NkVec2 view of the scroll_delta field.
scroll_delta
()

protected NkMouse.Buffer
public boolean

Returns:

the value of the ungrab field.
ungrab
()

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final NkMouse ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new NkMouse.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by NkMouse#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

buttonsback to summary
public NkMouseButton.Buffer buttons()
Returns:NkMouseButton.Buffer

a NkMouseButton.Buffer view of the buttons field.

Annotations
@NativeType:struct nk_mouse_button[NK_BUTTON_MAX]
buttonsback to summary
public NkMouseButton buttons(int index)
Returns:NkMouseButton

a NkMouseButton view of the struct at the specified index of the buttons field.

Annotations
@NativeType:struct nk_mouse_button
deltaback to summary
public NkVec2 delta()
Returns:NkVec2

a NkVec2 view of the delta field.

Annotations
@NativeType:struct nk_vec2
down_posback to summary
public NkVec2 down_pos()
Returns:NkVec2

a NkVec2 view of the down_pos field.

Annotations
@NativeType:struct nk_vec2
getElementFactoryback to summary
protected NkMouse getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
grabback to summary
public boolean grab()
Returns:boolean

the value of the grab field.

Annotations
@NativeType:bool
grabbedback to summary
public boolean grabbed()
Returns:boolean

the value of the grabbed field.

Annotations
@NativeType:bool
posback to summary
public NkVec2 pos()
Returns:NkVec2

a NkVec2 view of the pos field.

Annotations
@NativeType:struct nk_vec2
prevback to summary
public NkVec2 prev()
Returns:NkVec2

a NkVec2 view of the prev field.

Annotations
@NativeType:struct nk_vec2
scroll_deltaback to summary
public NkVec2 scroll_delta()
Returns:NkVec2

a NkVec2 view of the scroll_delta field.

Annotations
@NativeType:struct nk_vec2
selfback to summary
protected NkMouse.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
ungrabback to summary
public boolean ungrab()
Returns:boolean

the value of the ungrab field.

Annotations
@NativeType:bool