Package org.lwjgl.system.linux
Class XClientMessageEvent
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.linux.XClientMessageEvent
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,NativeResource
,Pointer
public class XClientMessageEvent extends Struct implements 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. Theformat
member is set to 8, 16, or 32 and specifies whether the data should be viewed as a list of bytes, shorts, or longs. Thedata
member is a union that contains the membersb
,s
, andl
. Theb
,s
, andl
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 thewindow
,message_type
, ordata
members.Member documentation
serial
– # of last request processed by serversend_event
– true if this came from anX11.XSendEvent(long, long, boolean, long, org.lwjgl.system.linux.XEvent)
requestdisplay
–Display
the event was read fromwindow
– window it reported relative to
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 Modifier and Type Class Description static class
XClientMessageEvent.Buffer
An array ofXClientMessageEvent
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
DATA
DATA_B
DATA_L
DATA_S
DISPLAY
FORMAT
MESSAGE_TYPE
SEND_EVENT
SERIALThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
TYPE
WINDOWThe struct member offsets.-
Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor Description XClientMessageEvent(java.nio.ByteBuffer container)
Creates aXClientMessageEvent
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 XClientMessageEvent
calloc()
Returns a newXClientMessageEvent
instance allocated withmemCalloc
.static XClientMessageEvent.Buffer
calloc(int capacity)
Returns a newXClientMessageEvent.Buffer
instance allocated withmemCalloc
.static XClientMessageEvent
callocStack()
Returns a newXClientMessageEvent
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static XClientMessageEvent.Buffer
callocStack(int capacity)
Returns a newXClientMessageEvent.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static XClientMessageEvent.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newXClientMessageEvent.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static XClientMessageEvent
callocStack(MemoryStack stack)
Returns a newXClientMessageEvent
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.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)
java.nio.ByteBuffer
data_b()
Returns aByteBuffer
view of thedata.b
field.byte
data_b(int index)
Returns the value at the specified index of thedata.b
field.XClientMessageEvent
data_b(int index, byte value)
Sets the specified value at the specified index of thedata.b
field.XClientMessageEvent
data_b(java.nio.ByteBuffer value)
Copies the specifiedByteBuffer
to thedata.b
field.CLongBuffer
data_l()
Returns aCLongBuffer
view of thedata.l
field.long
data_l(int index)
Returns the value at the specified index of thedata.l
field.XClientMessageEvent
data_l(int index, long value)
Sets the specified value at the specified index of thedata.l
field.XClientMessageEvent
data_l(CLongBuffer value)
Copies the specifiedCLongBuffer
to thedata.l
field.java.nio.ShortBuffer
data_s()
Returns aShortBuffer
view of thedata.s
field.short
data_s(int index)
Returns the value at the specified index of thedata.s
field.XClientMessageEvent
data_s(int index, short value)
Sets the specified value at the specified index of thedata.s
field.XClientMessageEvent
data_s(java.nio.ShortBuffer value)
Copies the specifiedShortBuffer
to thedata.s
field.long
display()
Returns the value of thedisplay
field.XClientMessageEvent
display(long value)
Sets the specified value to thedisplay
field.int
format()
Returns the value of theformat
field.XClientMessageEvent
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
mallocStack()
Returns a newXClientMessageEvent
instance allocated on the thread-localMemoryStack
.static XClientMessageEvent.Buffer
mallocStack(int capacity)
Returns a newXClientMessageEvent.Buffer
instance allocated on the thread-localMemoryStack
.static XClientMessageEvent.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newXClientMessageEvent.Buffer
instance allocated on the specifiedMemoryStack
.static XClientMessageEvent
mallocStack(MemoryStack stack)
Returns a newXClientMessageEvent
instance allocated on the specifiedMemoryStack
.long
message_type()
Returns the value of themessage_type
field.XClientMessageEvent
message_type(long value)
Sets the specified value to themessage_type
field.static java.nio.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, java.nio.ByteBuffer value)
Unsafe version ofdata_b
.static 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, CLongBuffer value)
Unsafe version ofdata_l
.static java.nio.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, java.nio.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
send_event()
Returns the value of thesend_event
field.XClientMessageEvent
send_event(boolean value)
Sets the specified value to thesend_event
field.long
serial()
Returns the value of theserial
field.XClientMessageEvent
serial(long value)
Sets the specified value to theserial
field.XClientMessageEvent
set(int type, long serial, boolean send_event, long display, long window, long message_type, int format, java.nio.ByteBuffer data_b, java.nio.ShortBuffer data_s, CLongBuffer data_l)
Initializes this struct with the specified values.XClientMessageEvent
set(XClientMessageEvent src)
Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.int
type()
Returns the value of thetype
field.XClientMessageEvent
type(int value)
Sets the specified value to thetype
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.long
window()
Returns the value of thewindow
field.XClientMessageEvent
window(long value)
Sets the specified value to thewindow
field.-
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
-
-
-
Constructor Detail
-
XClientMessageEvent
public XClientMessageEvent(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
Description copied from class:Struct
Returnssizeof(struct)
.
-
type
public int type()
Returns the value of thetype
field.
-
serial
public long serial()
Returns the value of theserial
field.
-
send_event
public boolean send_event()
Returns the value of thesend_event
field.
-
display
public long display()
Returns the value of thedisplay
field.
-
window
public long window()
Returns the value of thewindow
field.
-
message_type
public long message_type()
Returns the value of themessage_type
field.
-
format
public int format()
Returns the value of theformat
field.
-
data_b
public java.nio.ByteBuffer data_b()
Returns aByteBuffer
view of thedata.b
field.
-
data_b
public byte data_b(int index)
Returns the value at the specified index of thedata.b
field.
-
data_s
public java.nio.ShortBuffer data_s()
Returns aShortBuffer
view of thedata.s
field.
-
data_s
public short data_s(int index)
Returns the value at the specified index of thedata.s
field.
-
data_l
public CLongBuffer data_l()
Returns aCLongBuffer
view of thedata.l
field.
-
data_l
public long data_l(int index)
Returns the value at the specified index of thedata.l
field.
-
type
public XClientMessageEvent type(int value)
Sets the specified value to thetype
field.
-
serial
public XClientMessageEvent serial(long value)
Sets the specified value to theserial
field.
-
send_event
public XClientMessageEvent send_event(boolean value)
Sets the specified value to thesend_event
field.
-
display
public XClientMessageEvent display(long value)
Sets the specified value to thedisplay
field.
-
window
public XClientMessageEvent window(long value)
Sets the specified value to thewindow
field.
-
message_type
public XClientMessageEvent message_type(long value)
Sets the specified value to themessage_type
field.
-
format
public XClientMessageEvent format(int value)
Sets the specified value to theformat
field.
-
data_b
public XClientMessageEvent data_b(java.nio.ByteBuffer value)
Copies the specifiedByteBuffer
to thedata.b
field.
-
data_b
public XClientMessageEvent data_b(int index, byte value)
Sets the specified value at the specified index of thedata.b
field.
-
data_s
public XClientMessageEvent data_s(java.nio.ShortBuffer value)
Copies the specifiedShortBuffer
to thedata.s
field.
-
data_s
public XClientMessageEvent data_s(int index, short value)
Sets the specified value at the specified index of thedata.s
field.
-
data_l
public XClientMessageEvent data_l(CLongBuffer value)
Copies the specifiedCLongBuffer
to thedata.l
field.
-
data_l
public XClientMessageEvent data_l(int index, long value)
Sets the specified value at the specified index of thedata.l
field.
-
set
public XClientMessageEvent set(int type, long serial, boolean send_event, long display, long window, long message_type, int format, java.nio.ByteBuffer data_b, java.nio.ShortBuffer data_s, CLongBuffer data_l)
Initializes this struct with the specified values.
-
set
public XClientMessageEvent set(XClientMessageEvent src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static XClientMessageEvent malloc()
Returns a newXClientMessageEvent
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static XClientMessageEvent calloc()
Returns a newXClientMessageEvent
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static XClientMessageEvent create()
Returns a newXClientMessageEvent
instance allocated withBufferUtils
.
-
create
public static XClientMessageEvent create(long address)
Returns a newXClientMessageEvent
instance for the specified memory address.
-
createSafe
@Nullable public static XClientMessageEvent createSafe(long address)
-
malloc
public static XClientMessageEvent.Buffer malloc(int capacity)
Returns a newXClientMessageEvent.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static XClientMessageEvent.Buffer calloc(int capacity)
Returns a newXClientMessageEvent.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static XClientMessageEvent.Buffer create(int capacity)
Returns a newXClientMessageEvent.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static XClientMessageEvent.Buffer create(long address, int capacity)
Create aXClientMessageEvent.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static XClientMessageEvent.Buffer createSafe(long address, int capacity)
-
mallocStack
public static XClientMessageEvent mallocStack()
Returns a newXClientMessageEvent
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static XClientMessageEvent callocStack()
Returns a newXClientMessageEvent
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static XClientMessageEvent mallocStack(MemoryStack stack)
Returns a newXClientMessageEvent
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static XClientMessageEvent callocStack(MemoryStack stack)
Returns a newXClientMessageEvent
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static XClientMessageEvent.Buffer mallocStack(int capacity)
Returns a newXClientMessageEvent.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static XClientMessageEvent.Buffer callocStack(int capacity)
Returns a newXClientMessageEvent.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static XClientMessageEvent.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newXClientMessageEvent.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static XClientMessageEvent.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newXClientMessageEvent.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
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
public static java.nio.ByteBuffer ndata_b(long struct)
Unsafe version ofdata_b()
.
-
ndata_b
public static byte ndata_b(long struct, int index)
Unsafe version ofdata_b
.
-
ndata_s
public static java.nio.ShortBuffer ndata_s(long struct)
Unsafe version ofdata_s()
.
-
ndata_s
public static short ndata_s(long struct, int index)
Unsafe version ofdata_s
.
-
ndata_l
public static 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
public static void ndata_b(long struct, java.nio.ByteBuffer value)
Unsafe version ofdata_b
.
-
ndata_b
public static void ndata_b(long struct, int index, byte value)
Unsafe version ofdata_b
.
-
ndata_s
public static void ndata_s(long struct, java.nio.ShortBuffer value)
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, 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
-
validate
public static void validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-