public class XMotionEvent
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
type – the event type. Must be:X11.MotionNotify |
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 or button maskis_hint – detailsame_screen – same screen flag
struct XMotionEvent {
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;
char is_hint;
Bool same_screen;
}| Modifier and Type | Class and Description |
|---|---|
static class |
XMotionEvent.Buffer
An array of
XMotionEvent structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
DISPLAY
The struct member offsets.
|
static int |
IS_HINT
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 |
|---|
XMotionEvent(java.nio.ByteBuffer container)
Creates a
XMotionEvent instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static XMotionEvent |
calloc()
Returns a new
XMotionEvent instance allocated with memCalloc. |
static XMotionEvent.Buffer |
calloc(int capacity)
Returns a new
XMotionEvent.Buffer instance allocated with memCalloc. |
static XMotionEvent |
callocStack()
Returns a new
XMotionEvent instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static XMotionEvent.Buffer |
callocStack(int capacity)
Returns a new
XMotionEvent.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static XMotionEvent.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
XMotionEvent.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static XMotionEvent |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
XMotionEvent instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static XMotionEvent |
create()
Returns a new
XMotionEvent instance allocated with BufferUtils. |
static XMotionEvent.Buffer |
create(int capacity)
Returns a new
XMotionEvent.Buffer instance allocated with BufferUtils. |
static XMotionEvent |
create(long address)
Returns a new
XMotionEvent instance for the specified memory address. |
static XMotionEvent.Buffer |
create(long address,
int capacity)
Create a
XMotionEvent.Buffer instance at the specified memory. |
static XMotionEvent |
createSafe(long address)
|
static XMotionEvent.Buffer |
createSafe(long address,
int capacity)
|
long |
display()
Returns the value of the
display field. |
XMotionEvent |
display(long value)
Sets the specified value to the
display field. |
byte |
is_hint()
Returns the value of the
is_hint field. |
XMotionEvent |
is_hint(byte value)
Sets the specified value to the
is_hint field. |
static XMotionEvent |
malloc()
Returns a new
XMotionEvent instance allocated with memAlloc. |
static XMotionEvent.Buffer |
malloc(int capacity)
Returns a new
XMotionEvent.Buffer instance allocated with memAlloc. |
static XMotionEvent |
mallocStack()
Returns a new
XMotionEvent instance allocated on the thread-local MemoryStack. |
static XMotionEvent.Buffer |
mallocStack(int capacity)
Returns a new
XMotionEvent.Buffer instance allocated on the thread-local MemoryStack. |
static XMotionEvent.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
XMotionEvent.Buffer instance allocated on the specified MemoryStack. |
static XMotionEvent |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
XMotionEvent 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 byte |
nis_hint(long struct)
Unsafe version of
is_hint(). |
static void |
nis_hint(long struct,
byte value)
Unsafe version of
is_hint. |
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. |
XMotionEvent |
root(long value)
Sets the specified value to the
root field. |
boolean |
same_screen()
Returns the value of the
same_screen field. |
XMotionEvent |
same_screen(boolean value)
Sets the specified value to the
same_screen field. |
boolean |
send_event()
Returns the value of the
send_event field. |
XMotionEvent |
send_event(boolean value)
Sets the specified value to the
send_event field. |
long |
serial()
Returns the value of the
serial field. |
XMotionEvent |
serial(long value)
Sets the specified value to the
serial field. |
XMotionEvent |
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,
byte is_hint,
boolean same_screen)
Initializes this struct with the specified values.
|
XMotionEvent |
set(XMotionEvent src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
state()
Returns the value of the
state field. |
XMotionEvent |
state(int value)
Sets the specified value to the
state field. |
long |
subwindow()
Returns the value of the
subwindow field. |
XMotionEvent |
subwindow(long value)
Sets the specified value to the
subwindow field. |
long |
time()
Returns the value of the
time field. |
XMotionEvent |
time(long value)
Sets the specified value to the
time field. |
int |
type()
Returns the value of the
type field. |
XMotionEvent |
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. |
XMotionEvent |
window(long value)
Sets the specified value to the
window field. |
int |
x_root()
Returns the value of the
x_root field. |
XMotionEvent |
x_root(int value)
Sets the specified value to the
x_root field. |
int |
x()
Returns the value of the
x field. |
XMotionEvent |
x(int value)
Sets the specified value to the
x field. |
int |
y_root()
Returns the value of the
y_root field. |
XMotionEvent |
y_root(int value)
Sets the specified value to the
y_root field. |
int |
y()
Returns the value of the
y field. |
XMotionEvent |
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 IS_HINT
public static final int SAME_SCREEN
public XMotionEvent(java.nio.ByteBuffer container)
XMotionEvent 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 byte is_hint()
is_hint field.public boolean same_screen()
same_screen field.public XMotionEvent type(int value)
type field.public XMotionEvent serial(long value)
serial field.public XMotionEvent send_event(boolean value)
send_event field.public XMotionEvent display(long value)
display field.public XMotionEvent window(long value)
window field.public XMotionEvent root(long value)
root field.public XMotionEvent subwindow(long value)
subwindow field.public XMotionEvent time(long value)
time field.public XMotionEvent x(int value)
x field.public XMotionEvent y(int value)
y field.public XMotionEvent x_root(int value)
x_root field.public XMotionEvent y_root(int value)
y_root field.public XMotionEvent state(int value)
state field.public XMotionEvent is_hint(byte value)
is_hint field.public XMotionEvent same_screen(boolean value)
same_screen field.public XMotionEvent 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, byte is_hint, boolean same_screen)
public XMotionEvent set(XMotionEvent src)
src - the source structpublic static XMotionEvent malloc()
XMotionEvent instance allocated with memAlloc. The instance must be explicitly freed.public static XMotionEvent calloc()
XMotionEvent instance allocated with memCalloc. The instance must be explicitly freed.public static XMotionEvent create()
XMotionEvent instance allocated with BufferUtils.public static XMotionEvent create(long address)
XMotionEvent instance for the specified memory address.@Nullable public static XMotionEvent createSafe(long address)
public static XMotionEvent.Buffer malloc(int capacity)
XMotionEvent.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static XMotionEvent.Buffer calloc(int capacity)
XMotionEvent.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static XMotionEvent.Buffer create(int capacity)
XMotionEvent.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static XMotionEvent.Buffer create(long address, int capacity)
XMotionEvent.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static XMotionEvent.Buffer createSafe(long address, int capacity)
public static XMotionEvent mallocStack()
XMotionEvent instance allocated on the thread-local MemoryStack.public static XMotionEvent callocStack()
XMotionEvent instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static XMotionEvent mallocStack(org.lwjgl.system.MemoryStack stack)
XMotionEvent instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static XMotionEvent callocStack(org.lwjgl.system.MemoryStack stack)
XMotionEvent instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static XMotionEvent.Buffer mallocStack(int capacity)
XMotionEvent.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static XMotionEvent.Buffer callocStack(int capacity)
XMotionEvent.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static XMotionEvent.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
XMotionEvent.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static XMotionEvent.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
XMotionEvent.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 byte nis_hint(long struct)
is_hint().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 nis_hint(long struct,
byte value)
is_hint.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.