Package org.lwjgl.nuklear
Class NkKeyboard
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkKeyboard
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class NkKeyboard extends org.lwjgl.system.Struct
Layout
struct nk_keyboard {
struct nk_key
keys[NK_KEY_MAX]; char text[NK_INPUT_MAX]; int text_len; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NkKeyboard.Buffer
An array ofNkKeyboard
structs.
-
Constructor Summary
Constructors Constructor Description NkKeyboard(java.nio.ByteBuffer container)
Creates aNkKeyboard
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NkKeyboard
create(long address)
Returns a newNkKeyboard
instance for the specified memory address.static NkKeyboard.Buffer
create(long address, int capacity)
Create aNkKeyboard.Buffer
instance at the specified memory.static NkKeyboard
createSafe(long address)
static NkKeyboard.Buffer
createSafe(long address, int capacity)
NkKey.Buffer
keys()
Returns aNkKey
.Buffer view of thekeys
field.NkKey
keys(int index)
Returns aNkKey
view of the struct at the specified index of thekeys
field.static NkKey.Buffer
nkeys(long struct)
Unsafe version ofkeys()
.static NkKey
nkeys(long struct, int index)
Unsafe version ofkeys
.static java.nio.ByteBuffer
ntext(long struct)
Unsafe version oftext()
.static byte
ntext(long struct, int index)
Unsafe version oftext
.static int
ntext_len(long struct)
Unsafe version oftext_len()
.int
sizeof()
java.nio.ByteBuffer
text()
Returns aByteBuffer
view of thetext
field.byte
text(int index)
Returns the value at the specified index of thetext
field.int
text_len()
Returns the value of thetext_len
field.
-
-
-
Constructor Detail
-
NkKeyboard
public NkKeyboard(java.nio.ByteBuffer container)
Creates aNkKeyboard
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
-
keys
public NkKey.Buffer keys()
Returns aNkKey
.Buffer view of thekeys
field.
-
keys
public NkKey keys(int index)
Returns aNkKey
view of the struct at the specified index of thekeys
field.
-
text
public java.nio.ByteBuffer text()
Returns aByteBuffer
view of thetext
field.
-
text
public byte text(int index)
Returns the value at the specified index of thetext
field.
-
text_len
public int text_len()
Returns the value of thetext_len
field.
-
create
public static NkKeyboard create(long address)
Returns a newNkKeyboard
instance for the specified memory address.
-
createSafe
@Nullable public static NkKeyboard createSafe(long address)
-
create
public static NkKeyboard.Buffer create(long address, int capacity)
Create aNkKeyboard.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static NkKeyboard.Buffer createSafe(long address, int capacity)
-
nkeys
public static NkKey.Buffer nkeys(long struct)
Unsafe version ofkeys()
.
-
ntext
public static java.nio.ByteBuffer ntext(long struct)
Unsafe version oftext()
.
-
ntext
public static byte ntext(long struct, int index)
Unsafe version oftext
.
-
ntext_len
public static int ntext_len(long struct)
Unsafe version oftext_len()
.
-
-