public class XKeyEvent
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
type – the event type. One of:X11.KeyPress | X11.KeyRelease |
serial – # of last request processed by serversend_event – true if this came from an X11.XSendEvent(long, long, boolean, long, org.lwjgl.system.linux.XEvent) requestdisplay – Display the event was read fromwindow – window it reported relative toroot – root window that the event occurred onsubwindow – child windowtime – millisecondsx – pointer x coordinate in event windowy – pointer y coordinate in event windowx_root – x coordinate relative to rooty_root – y coordinate relative to rootstate – key maskkeycode – detailsame_screen – same screen flag
struct XKeyEvent {
int type;
unsigned long serial;
Bool send_event;
Display * display;
Window window;
Window root;
Window subwindow;
Time time;
int x;
int y;
int x_root;
int y_root;
unsigned int state;
unsigned int keycode;
Bool same_screen;
}| Modifier and Type | Class and Description |
|---|---|
static class |
XKeyEvent.Buffer
An array of
XKeyEvent structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
DISPLAY
The struct member offsets.
|
static int |
KEYCODE
The struct member offsets.
|
static int |
ROOT
The struct member offsets.
|
static int |
SAME_SCREEN
The struct member offsets.
|
static int |
SEND_EVENT
The struct member offsets.
|
static int |
SERIAL
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STATE
The struct member offsets.
|
static int |
SUBWINDOW
The struct member offsets.
|
static int |
TIME
The struct member offsets.
|
static int |
TYPE
The struct member offsets.
|
static int |
WINDOW
The struct member offsets.
|
static int |
X
The struct member offsets.
|
static int |
X_ROOT
The struct member offsets.
|
static int |
Y
The struct member offsets.
|
static int |
Y_ROOT
The struct member offsets.
|
| Constructor and Description |
|---|
XKeyEvent(java.nio.ByteBuffer container)
Creates a
XKeyEvent instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static XKeyEvent |
calloc()
Returns a new
XKeyEvent instance allocated with memCalloc. |
static XKeyEvent.Buffer |
calloc(int capacity)
Returns a new
XKeyEvent.Buffer instance allocated with memCalloc. |
static XKeyEvent |
callocStack()
Returns a new
XKeyEvent instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static XKeyEvent.Buffer |
callocStack(int capacity)
Returns a new
XKeyEvent.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static XKeyEvent.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
XKeyEvent.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static XKeyEvent |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
XKeyEvent instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static XKeyEvent |
create()
Returns a new
XKeyEvent instance allocated with BufferUtils. |
static XKeyEvent.Buffer |
create(int capacity)
Returns a new
XKeyEvent.Buffer instance allocated with BufferUtils. |
static XKeyEvent |
create(long address)
Returns a new
XKeyEvent instance for the specified memory address. |
static XKeyEvent.Buffer |
create(long address,
int capacity)
Create a
XKeyEvent.Buffer instance at the specified memory. |
static XKeyEvent |
createSafe(long address)
|
static XKeyEvent.Buffer |
createSafe(long address,
int capacity)
|
long |
display()
Returns the value of the
display field. |
XKeyEvent |
display(long value)
Sets the specified value to the
display field. |
int |
keycode()
Returns the value of the
keycode field. |
XKeyEvent |
keycode(int value)
Sets the specified value to the
keycode field. |
static XKeyEvent |
malloc()
Returns a new
XKeyEvent instance allocated with memAlloc. |
static XKeyEvent.Buffer |
malloc(int capacity)
Returns a new
XKeyEvent.Buffer instance allocated with memAlloc. |
static XKeyEvent |
mallocStack()
Returns a new
XKeyEvent instance allocated on the thread-local MemoryStack. |
static XKeyEvent.Buffer |
mallocStack(int capacity)
Returns a new
XKeyEvent.Buffer instance allocated on the thread-local MemoryStack. |
static XKeyEvent.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
XKeyEvent.Buffer instance allocated on the specified MemoryStack. |
static XKeyEvent |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
XKeyEvent instance allocated on the specified MemoryStack. |
static long |
ndisplay(long struct)
Unsafe version of
display(). |
static void |
ndisplay(long struct,
long value)
Unsafe version of
display. |
static int |
nkeycode(long struct)
Unsafe version of
keycode(). |
static void |
nkeycode(long struct,
int value)
Unsafe version of
keycode. |
static long |
nroot(long struct)
Unsafe version of
root(). |
static void |
nroot(long struct,
long value)
Unsafe version of
root. |
static int |
nsame_screen(long struct)
Unsafe version of
same_screen(). |
static void |
nsame_screen(long struct,
int value)
Unsafe version of
same_screen. |
static int |
nsend_event(long struct)
Unsafe version of
send_event(). |
static void |
nsend_event(long struct,
int value)
Unsafe version of
send_event. |
static long |
nserial(long struct)
Unsafe version of
serial(). |
static void |
nserial(long struct,
long value)
Unsafe version of
serial. |
static int |
nstate(long struct)
Unsafe version of
state(). |
static void |
nstate(long struct,
int value)
Unsafe version of
state. |
static long |
nsubwindow(long struct)
Unsafe version of
subwindow(). |
static void |
nsubwindow(long struct,
long value)
Unsafe version of
subwindow. |
static long |
ntime(long struct)
Unsafe version of
time(). |
static void |
ntime(long struct,
long value)
Unsafe version of
time. |
static int |
ntype(long struct)
Unsafe version of
type(). |
static void |
ntype(long struct,
int value)
Unsafe version of
type. |
static long |
nwindow(long struct)
Unsafe version of
window(). |
static void |
nwindow(long struct,
long value)
Unsafe version of
window. |
static int |
nx_root(long struct)
Unsafe version of
x_root(). |
static void |
nx_root(long struct,
int value)
Unsafe version of
x_root. |
static int |
nx(long struct)
Unsafe version of
x(). |
static void |
nx(long struct,
int value)
Unsafe version of
x. |
static int |
ny_root(long struct)
Unsafe version of
y_root(). |
static void |
ny_root(long struct,
int value)
Unsafe version of
y_root. |
static int |
ny(long struct)
Unsafe version of
y(). |
static void |
ny(long struct,
int value)
Unsafe version of
y. |
long |
root()
Returns the value of the
root field. |
XKeyEvent |
root(long value)
Sets the specified value to the
root field. |
boolean |
same_screen()
Returns the value of the
same_screen field. |
XKeyEvent |
same_screen(boolean value)
Sets the specified value to the
same_screen field. |
boolean |
send_event()
Returns the value of the
send_event field. |
XKeyEvent |
send_event(boolean value)
Sets the specified value to the
send_event field. |
long |
serial()
Returns the value of the
serial field. |
XKeyEvent |
serial(long value)
Sets the specified value to the
serial field. |
XKeyEvent |
set(int type,
long serial,
boolean send_event,
long display,
long window,
long root,
long subwindow,
long time,
int x,
int y,
int x_root,
int y_root,
int state,
int keycode,
boolean same_screen)
Initializes this struct with the specified values.
|
XKeyEvent |
set(XKeyEvent src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
state()
Returns the value of the
state field. |
XKeyEvent |
state(int value)
Sets the specified value to the
state field. |
long |
subwindow()
Returns the value of the
subwindow field. |
XKeyEvent |
subwindow(long value)
Sets the specified value to the
subwindow field. |
long |
time()
Returns the value of the
time field. |
XKeyEvent |
time(long value)
Sets the specified value to the
time field. |
int |
type()
Returns the value of the
type field. |
XKeyEvent |
type(int value)
Sets the specified value to the
type field. |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
long |
window()
Returns the value of the
window field. |
XKeyEvent |
window(long value)
Sets the specified value to the
window field. |
int |
x_root()
Returns the value of the
x_root field. |
XKeyEvent |
x_root(int value)
Sets the specified value to the
x_root field. |
int |
x()
Returns the value of the
x field. |
XKeyEvent |
x(int value)
Sets the specified value to the
x field. |
int |
y_root()
Returns the value of the
y_root field. |
XKeyEvent |
y_root(int value)
Sets the specified value to the
y_root field. |
int |
y()
Returns the value of the
y field. |
XKeyEvent |
y(int value)
Sets the specified value to the
y field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int TYPE
public static final int SERIAL
public static final int SEND_EVENT
public static final int DISPLAY
public static final int WINDOW
public static final int ROOT
public static final int SUBWINDOW
public static final int TIME
public static final int X
public static final int Y
public static final int X_ROOT
public static final int Y_ROOT
public static final int STATE
public static final int KEYCODE
public static final int SAME_SCREEN
public XKeyEvent(java.nio.ByteBuffer container)
XKeyEvent 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int type()
type field.public long serial()
serial field.public boolean send_event()
send_event field.public long display()
display field.public long window()
window field.public long root()
root field.public long subwindow()
subwindow field.public long time()
time field.public int x()
x field.public int y()
y field.public int x_root()
x_root field.public int y_root()
y_root field.public int state()
state field.public int keycode()
keycode field.public boolean same_screen()
same_screen field.public XKeyEvent type(int value)
type field.public XKeyEvent serial(long value)
serial field.public XKeyEvent send_event(boolean value)
send_event field.public XKeyEvent display(long value)
display field.public XKeyEvent window(long value)
window field.public XKeyEvent root(long value)
root field.public XKeyEvent subwindow(long value)
subwindow field.public XKeyEvent time(long value)
time field.public XKeyEvent x(int value)
x field.public XKeyEvent y(int value)
y field.public XKeyEvent x_root(int value)
x_root field.public XKeyEvent y_root(int value)
y_root field.public XKeyEvent state(int value)
state field.public XKeyEvent keycode(int value)
keycode field.public XKeyEvent same_screen(boolean value)
same_screen field.public XKeyEvent set(int type, long serial, boolean send_event, long display, long window, long root, long subwindow, long time, int x, int y, int x_root, int y_root, int state, int keycode, boolean same_screen)
public XKeyEvent set(XKeyEvent src)
src - the source structpublic static XKeyEvent malloc()
XKeyEvent instance allocated with memAlloc. The instance must be explicitly freed.public static XKeyEvent calloc()
XKeyEvent instance allocated with memCalloc. The instance must be explicitly freed.public static XKeyEvent create()
XKeyEvent instance allocated with BufferUtils.public static XKeyEvent create(long address)
XKeyEvent instance for the specified memory address.@Nullable public static XKeyEvent createSafe(long address)
public static XKeyEvent.Buffer malloc(int capacity)
XKeyEvent.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static XKeyEvent.Buffer calloc(int capacity)
XKeyEvent.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static XKeyEvent.Buffer create(int capacity)
XKeyEvent.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static XKeyEvent.Buffer create(long address, int capacity)
XKeyEvent.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static XKeyEvent.Buffer createSafe(long address, int capacity)
public static XKeyEvent mallocStack()
XKeyEvent instance allocated on the thread-local MemoryStack.public static XKeyEvent callocStack()
XKeyEvent instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static XKeyEvent mallocStack(org.lwjgl.system.MemoryStack stack)
XKeyEvent instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static XKeyEvent callocStack(org.lwjgl.system.MemoryStack stack)
XKeyEvent instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static XKeyEvent.Buffer mallocStack(int capacity)
XKeyEvent.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static XKeyEvent.Buffer callocStack(int capacity)
XKeyEvent.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static XKeyEvent.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
XKeyEvent.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static XKeyEvent.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
XKeyEvent.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int ntype(long struct)
type().public static long nserial(long struct)
serial().public static int nsend_event(long struct)
send_event().public static long ndisplay(long struct)
display().public static long nwindow(long struct)
window().public static long nroot(long struct)
root().public static long nsubwindow(long struct)
subwindow().public static long ntime(long struct)
time().public static int nx(long struct)
x().public static int ny(long struct)
y().public static int nx_root(long struct)
x_root().public static int ny_root(long struct)
y_root().public static int nstate(long struct)
state().public static int nkeycode(long struct)
keycode().public static int nsame_screen(long struct)
same_screen().public static void ntype(long struct,
int value)
type.public static void nserial(long struct,
long value)
serial.public static void nsend_event(long struct,
int value)
send_event.public static void ndisplay(long struct,
long value)
display.public static void nwindow(long struct,
long value)
window.public static void nroot(long struct,
long value)
root.public static void nsubwindow(long struct,
long value)
subwindow.public static void ntime(long struct,
long value)
time.public static void nx(long struct,
int value)
x.public static void ny(long struct,
int value)
y.public static void nx_root(long struct,
int value)
x_root.public static void ny_root(long struct,
int value)
y_root.public static void nstate(long struct,
int value)
state.public static void nkeycode(long struct,
int value)
keycode.public static void nsame_screen(long struct,
int value)
same_screen.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.