Package org.lwjgl.system.linux
Class XClientMessageEvent
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XClientMessageEvent>
org.lwjgl.system.linux.XClientMessageEvent
- All Implemented Interfaces:
AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class XClientMessageEvent
extends org.lwjgl.system.Struct<XClientMessageEvent>
implements org.lwjgl.system.NativeResource
Client message event.
The message_type
member is set to an atom that indicates how the data should be interpreted by the receiving client. The format
member is set to 8, 16, or 32 and specifies whether the data should be viewed as a list of bytes, shorts, or longs. The data
member is a
union that contains the members b
, s
, and l
. The b
, s
, and l
members represent data of twenty 8-bit
values, ten 16-bit values, and five 32-bit values. Particular message types might not make use of all these values. The X server places no
interpretation on the values in the window
, message_type
, or data
members.
Layout
struct XClientMessageEvent {
int type;
unsigned long serial()
;
Bool send_event()
;
Display * display()
;
Window window()
;
Atom message_type;
int format;
struct {
char b[20];
short s[10];
long l[5];
} data;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionXClientMessageEvent
(ByteBuffer container) Creates aXClientMessageEvent
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic XClientMessageEvent
calloc()
Returns a newXClientMessageEvent
instance allocated withmemCalloc
.static XClientMessageEvent.Buffer
calloc
(int capacity) Returns a newXClientMessageEvent.Buffer
instance allocated withmemCalloc
.static XClientMessageEvent.Buffer
calloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXClientMessageEvent.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static XClientMessageEvent
calloc
(org.lwjgl.system.MemoryStack stack) Returns a newXClientMessageEvent
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static XClientMessageEvent
Deprecated.static XClientMessageEvent.Buffer
callocStack
(int capacity) Deprecated.static XClientMessageEvent.Buffer
callocStack
(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static XClientMessageEvent
callocStack
(org.lwjgl.system.MemoryStack stack) Deprecated.static XClientMessageEvent
create()
Returns a newXClientMessageEvent
instance allocated withBufferUtils
.static XClientMessageEvent.Buffer
create
(int capacity) Returns a newXClientMessageEvent.Buffer
instance allocated withBufferUtils
.static XClientMessageEvent
create
(long address) Returns a newXClientMessageEvent
instance for the specified memory address.static XClientMessageEvent.Buffer
create
(long address, int capacity) Create aXClientMessageEvent.Buffer
instance at the specified memory.static XClientMessageEvent
createSafe
(long address) static XClientMessageEvent.Buffer
createSafe
(long address, int capacity) data_b()
byte
data_b
(int index) data_b
(int index, byte value) Sets the specified value at the specified index of theb
field.data_b
(ByteBuffer value) Copies the specifiedByteBuffer
to theb
field.org.lwjgl.CLongBuffer
data_l()
long
data_l
(int index) data_l
(int index, long value) Sets the specified value at the specified index of thel
field.data_l
(org.lwjgl.CLongBuffer value) Copies the specifiedCLongBuffer
to thel
field.data_s()
short
data_s
(int index) data_s
(int index, short value) Sets the specified value at the specified index of thes
field.data_s
(ShortBuffer value) Copies the specifiedShortBuffer
to thes
field.long
display()
Display
the event was read fromdisplay
(long value) Sets the specified value to thedisplay()
field.int
format()
format
(int value) Sets the specified value to theformat
field.static XClientMessageEvent
malloc()
Returns a newXClientMessageEvent
instance allocated withmemAlloc
.static XClientMessageEvent.Buffer
malloc
(int capacity) Returns a newXClientMessageEvent.Buffer
instance allocated withmemAlloc
.static XClientMessageEvent.Buffer
malloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXClientMessageEvent.Buffer
instance allocated on the specifiedMemoryStack
.static XClientMessageEvent
malloc
(org.lwjgl.system.MemoryStack stack) Returns a newXClientMessageEvent
instance allocated on the specifiedMemoryStack
.static XClientMessageEvent
Deprecated.static XClientMessageEvent.Buffer
mallocStack
(int capacity) Deprecated.static XClientMessageEvent.Buffer
mallocStack
(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static XClientMessageEvent
mallocStack
(org.lwjgl.system.MemoryStack stack) Deprecated.long
message_type
(long value) Sets the specified value to themessage_type
field.static ByteBuffer
ndata_b
(long struct) Unsafe version ofdata_b()
.static byte
ndata_b
(long struct, int index) Unsafe version ofdata_b
.static void
ndata_b
(long struct, int index, byte value) Unsafe version ofdata_b
.static void
ndata_b
(long struct, ByteBuffer value) Unsafe version ofdata_b
.static org.lwjgl.CLongBuffer
ndata_l
(long struct) Unsafe version ofdata_l()
.static long
ndata_l
(long struct, int index) Unsafe version ofdata_l
.static void
ndata_l
(long struct, int index, long value) Unsafe version ofdata_l
.static void
ndata_l
(long struct, org.lwjgl.CLongBuffer value) Unsafe version ofdata_l
.static ShortBuffer
ndata_s
(long struct) Unsafe version ofdata_s()
.static short
ndata_s
(long struct, int index) Unsafe version ofdata_s
.static void
ndata_s
(long struct, int index, short value) Unsafe version ofdata_s
.static void
ndata_s
(long struct, ShortBuffer value) Unsafe version ofdata_s
.static long
ndisplay
(long struct) Unsafe version ofdisplay()
.static void
ndisplay
(long struct, long value) Unsafe version ofdisplay
.static int
nformat
(long struct) Unsafe version offormat()
.static void
nformat
(long struct, int value) Unsafe version offormat
.static long
nmessage_type
(long struct) Unsafe version ofmessage_type()
.static void
nmessage_type
(long struct, long value) Unsafe version ofmessage_type
.static int
nsend_event
(long struct) Unsafe version ofsend_event()
.static void
nsend_event
(long struct, int value) Unsafe version ofsend_event
.static long
nserial
(long struct) Unsafe version ofserial()
.static void
nserial
(long struct, long value) Unsafe version ofserial
.static int
ntype
(long struct) Unsafe version oftype()
.static void
ntype
(long struct, int value) Unsafe version oftype
.static long
nwindow
(long struct) Unsafe version ofwindow()
.static void
nwindow
(long struct, long value) Unsafe version ofwindow
.boolean
true if this came from anX11.XSendEvent(long, long, boolean, long, org.lwjgl.system.linux.XEvent)
requestsend_event
(boolean value) Sets the specified value to thesend_event()
field.long
serial()
# of last request processed by serverserial
(long value) Sets the specified value to theserial()
field.set
(int type, long serial, boolean send_event, long display, long window, long message_type, int format, ByteBuffer data_b, ShortBuffer data_s, org.lwjgl.CLongBuffer data_l) Initializes this struct with the specified values.set
(XClientMessageEvent src) Copies the specified struct data to this struct.int
sizeof()
int
type()
type
(int value) Sets the specified value to thetype
field.static void
validate
(long struct) Validates pointer members that should not beNULL
.long
window()
window it reported relative towindow
(long value) Sets the specified value to thewindow()
field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
TYPE
public static final int TYPEThe struct member offsets. -
SERIAL
public static final int SERIALThe struct member offsets. -
SEND_EVENT
public static final int SEND_EVENTThe struct member offsets. -
DISPLAY
public static final int DISPLAYThe struct member offsets. -
WINDOW
public static final int WINDOWThe struct member offsets. -
MESSAGE_TYPE
public static final int MESSAGE_TYPEThe struct member offsets. -
FORMAT
public static final int FORMATThe struct member offsets. -
DATA
public static final int DATAThe struct member offsets. -
DATA_B
public static final int DATA_BThe struct member offsets. -
DATA_S
public static final int DATA_SThe struct member offsets. -
DATA_L
public static final int DATA_LThe struct member offsets.
-
-
Constructor Details
-
XClientMessageEvent
Creates aXClientMessageEvent
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 Details
-
sizeof
public int sizeof()- Specified by:
sizeof
in classorg.lwjgl.system.Struct<XClientMessageEvent>
-
type
public int type()- Returns:
- the value of the
type
field.
-
serial
public long serial()# of last request processed by server -
send_event
public boolean send_event()true if this came from anX11.XSendEvent(long, long, boolean, long, org.lwjgl.system.linux.XEvent)
request -
display
public long display()Display
the event was read from -
window
public long window()window it reported relative to -
message_type
public long message_type()- Returns:
- the value of the
message_type
field.
-
format
public int format()- Returns:
- the value of the
format
field.
-
data_b
- Returns:
- a
ByteBuffer
view of thedata.b
field.
-
data_b
public byte data_b(int index) - Returns:
- the value at the specified index of the
data.b
field.
-
data_s
- Returns:
- a
ShortBuffer
view of thedata.s
field.
-
data_s
public short data_s(int index) - Returns:
- the value at the specified index of the
data.s
field.
-
data_l
public org.lwjgl.CLongBuffer data_l()- Returns:
- a
CLongBuffer
view of thedata.l
field.
-
data_l
public long data_l(int index) - Returns:
- the value at the specified index of the
data.l
field.
-
type
Sets the specified value to thetype
field. -
serial
Sets the specified value to theserial()
field. -
send_event
Sets the specified value to thesend_event()
field. -
display
Sets the specified value to thedisplay()
field. -
window
Sets the specified value to thewindow()
field. -
message_type
Sets the specified value to themessage_type
field. -
format
Sets the specified value to theformat
field. -
data_b
Copies the specifiedByteBuffer
to theb
field. -
data_b
Sets the specified value at the specified index of theb
field. -
data_s
Copies the specifiedShortBuffer
to thes
field. -
data_s
Sets the specified value at the specified index of thes
field. -
data_l
Copies the specifiedCLongBuffer
to thel
field. -
data_l
Sets the specified value at the specified index of thel
field. -
set
public XClientMessageEvent set(int type, long serial, boolean send_event, long display, long window, long message_type, int format, ByteBuffer data_b, ShortBuffer data_s, org.lwjgl.CLongBuffer data_l) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newXClientMessageEvent
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newXClientMessageEvent
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newXClientMessageEvent
instance allocated withBufferUtils
. -
create
Returns a newXClientMessageEvent
instance for the specified memory address. -
createSafe
-
malloc
Returns a newXClientMessageEvent.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newXClientMessageEvent.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newXClientMessageEvent.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aXClientMessageEvent.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
@Deprecated public static XClientMessageEvent.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
@Deprecated public static XClientMessageEvent.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newXClientMessageEvent
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newXClientMessageEvent
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newXClientMessageEvent.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newXClientMessageEvent.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
ntype
public static int ntype(long struct) Unsafe version oftype()
. -
nserial
public static long nserial(long struct) Unsafe version ofserial()
. -
nsend_event
public static int nsend_event(long struct) Unsafe version ofsend_event()
. -
ndisplay
public static long ndisplay(long struct) Unsafe version ofdisplay()
. -
nwindow
public static long nwindow(long struct) Unsafe version ofwindow()
. -
nmessage_type
public static long nmessage_type(long struct) Unsafe version ofmessage_type()
. -
nformat
public static int nformat(long struct) Unsafe version offormat()
. -
ndata_b
Unsafe version ofdata_b()
. -
ndata_b
public static byte ndata_b(long struct, int index) Unsafe version ofdata_b
. -
ndata_s
Unsafe version ofdata_s()
. -
ndata_s
public static short ndata_s(long struct, int index) Unsafe version ofdata_s
. -
ndata_l
public static org.lwjgl.CLongBuffer ndata_l(long struct) Unsafe version ofdata_l()
. -
ndata_l
public static long ndata_l(long struct, int index) Unsafe version ofdata_l
. -
ntype
public static void ntype(long struct, int value) Unsafe version oftype
. -
nserial
public static void nserial(long struct, long value) Unsafe version ofserial
. -
nsend_event
public static void nsend_event(long struct, int value) Unsafe version ofsend_event
. -
ndisplay
public static void ndisplay(long struct, long value) Unsafe version ofdisplay
. -
nwindow
public static void nwindow(long struct, long value) Unsafe version ofwindow
. -
nmessage_type
public static void nmessage_type(long struct, long value) Unsafe version ofmessage_type
. -
nformat
public static void nformat(long struct, int value) Unsafe version offormat
. -
ndata_b
Unsafe version ofdata_b
. -
ndata_b
public static void ndata_b(long struct, int index, byte value) Unsafe version ofdata_b
. -
ndata_s
Unsafe version ofdata_s
. -
ndata_s
public static void ndata_s(long struct, int index, short value) Unsafe version ofdata_s
. -
ndata_l
public static void ndata_l(long struct, org.lwjgl.CLongBuffer value) Unsafe version ofdata_l
. -
ndata_l
public static void ndata_l(long struct, int index, long value) Unsafe version ofdata_l
. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-