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