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,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XClientMessageEvent extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceClient message event.The
message_typemember is set to an atom that indicates how the data should be interpreted by the receiving client. Theformatmember is set to 8, 16, or 32 and specifies whether the data should be viewed as a list of bytes, shorts, or longs. Thedatamember is a union that contains the membersb,s, andl. Theb,s, andlmembers 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, ordatamembers.Layout
struct XClientMessageEvent { int type; unsigned longserial(); Boolsend_event(); Display *display(); Windowwindow(); 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 classXClientMessageEvent.BufferAn array ofXClientMessageEventstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intDATA
DATA_B
DATA_L
DATA_S
DISPLAY
FORMAT
MESSAGE_TYPE
SEND_EVENT
SERIALThe struct member offsets.static intSIZEOFThe struct size in bytes.static intTYPE
WINDOWThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description XClientMessageEvent(java.nio.ByteBuffer container)Creates aXClientMessageEventinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static XClientMessageEventcalloc()Returns a newXClientMessageEventinstance allocated withmemCalloc.static XClientMessageEvent.Buffercalloc(int capacity)Returns a newXClientMessageEvent.Bufferinstance allocated withmemCalloc.static XClientMessageEvent.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXClientMessageEvent.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XClientMessageEventcalloc(org.lwjgl.system.MemoryStack stack)Returns a newXClientMessageEventinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XClientMessageEventcallocStack()Deprecated.static XClientMessageEvent.BuffercallocStack(int capacity)Deprecated.static XClientMessageEvent.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static XClientMessageEventcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static XClientMessageEventcreate()Returns a newXClientMessageEventinstance allocated withBufferUtils.static XClientMessageEvent.Buffercreate(int capacity)Returns a newXClientMessageEvent.Bufferinstance allocated withBufferUtils.static XClientMessageEventcreate(long address)Returns a newXClientMessageEventinstance for the specified memory address.static XClientMessageEvent.Buffercreate(long address, int capacity)Create aXClientMessageEvent.Bufferinstance at the specified memory.static XClientMessageEventcreateSafe(long address)static XClientMessageEvent.BuffercreateSafe(long address, int capacity)java.nio.ByteBufferdata_b()bytedata_b(int index)XClientMessageEventdata_b(int index, byte value)Sets the specified value at the specified index of thebfield.XClientMessageEventdata_b(java.nio.ByteBuffer value)Copies the specifiedByteBufferto thebfield.org.lwjgl.CLongBufferdata_l()longdata_l(int index)XClientMessageEventdata_l(int index, long value)Sets the specified value at the specified index of thelfield.XClientMessageEventdata_l(org.lwjgl.CLongBuffer value)Copies the specifiedCLongBufferto thelfield.java.nio.ShortBufferdata_s()shortdata_s(int index)XClientMessageEventdata_s(int index, short value)Sets the specified value at the specified index of thesfield.XClientMessageEventdata_s(java.nio.ShortBuffer value)Copies the specifiedShortBufferto thesfield.longdisplay()Displaythe event was read fromXClientMessageEventdisplay(long value)Sets the specified value to thedisplay()field.intformat()XClientMessageEventformat(int value)Sets the specified value to theformatfield.static XClientMessageEventmalloc()Returns a newXClientMessageEventinstance allocated withmemAlloc.static XClientMessageEvent.Buffermalloc(int capacity)Returns a newXClientMessageEvent.Bufferinstance allocated withmemAlloc.static XClientMessageEvent.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXClientMessageEvent.Bufferinstance allocated on the specifiedMemoryStack.static XClientMessageEventmalloc(org.lwjgl.system.MemoryStack stack)Returns a newXClientMessageEventinstance allocated on the specifiedMemoryStack.static XClientMessageEventmallocStack()Deprecated.static XClientMessageEvent.BuffermallocStack(int capacity)Deprecated.static XClientMessageEvent.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static XClientMessageEventmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.longmessage_type()XClientMessageEventmessage_type(long value)Sets the specified value to themessage_typefield.static java.nio.ByteBufferndata_b(long struct)Unsafe version ofdata_b().static bytendata_b(long struct, int index)Unsafe version ofdata_b.static voidndata_b(long struct, int index, byte value)Unsafe version ofdata_b.static voidndata_b(long struct, java.nio.ByteBuffer value)Unsafe version ofdata_b.static org.lwjgl.CLongBufferndata_l(long struct)Unsafe version ofdata_l().static longndata_l(long struct, int index)Unsafe version ofdata_l.static voidndata_l(long struct, int index, long value)Unsafe version ofdata_l.static voidndata_l(long struct, org.lwjgl.CLongBuffer value)Unsafe version ofdata_l.static java.nio.ShortBufferndata_s(long struct)Unsafe version ofdata_s().static shortndata_s(long struct, int index)Unsafe version ofdata_s.static voidndata_s(long struct, int index, short value)Unsafe version ofdata_s.static voidndata_s(long struct, java.nio.ShortBuffer value)Unsafe version ofdata_s.static longndisplay(long struct)Unsafe version ofdisplay().static voidndisplay(long struct, long value)Unsafe version ofdisplay.static intnformat(long struct)Unsafe version offormat().static voidnformat(long struct, int value)Unsafe version offormat.static longnmessage_type(long struct)Unsafe version ofmessage_type().static voidnmessage_type(long struct, long value)Unsafe version ofmessage_type.static intnsend_event(long struct)Unsafe version ofsend_event().static voidnsend_event(long struct, int value)Unsafe version ofsend_event.static longnserial(long struct)Unsafe version ofserial().static voidnserial(long struct, long value)Unsafe version ofserial.static intntype(long struct)Unsafe version oftype().static voidntype(long struct, int value)Unsafe version oftype.static longnwindow(long struct)Unsafe version ofwindow().static voidnwindow(long struct, long value)Unsafe version ofwindow.booleansend_event()true if this came from anX11.XSendEvent(long, long, boolean, long, org.lwjgl.system.linux.XEvent)requestXClientMessageEventsend_event(boolean value)Sets the specified value to thesend_event()field.longserial()# of last request processed by serverXClientMessageEventserial(long value)Sets the specified value to theserial()field.XClientMessageEventset(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, org.lwjgl.CLongBuffer data_l)Initializes this struct with the specified values.XClientMessageEventset(XClientMessageEvent src)Copies the specified struct data to this struct.intsizeof()inttype()XClientMessageEventtype(int value)Sets the specified value to thetypefield.static voidvalidate(long struct)Validates pointer members that should not beNULL.longwindow()window it reported relative toXClientMessageEventwindow(long value)Sets the specified value to thewindow()field.
-
-
-
Constructor Detail
-
XClientMessageEvent
public XClientMessageEvent(java.nio.ByteBuffer container)
Creates aXClientMessageEventinstance at the current position of the specifiedByteBuffercontainer. 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()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
type
public int type()
- Returns:
- the value of the
typefield.
-
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()
Displaythe 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_typefield.
-
format
public int format()
- Returns:
- the value of the
formatfield.
-
data_b
public java.nio.ByteBuffer data_b()
- Returns:
- a
ByteBufferview of thedata.bfield.
-
data_b
public byte data_b(int index)
- Returns:
- the value at the specified index of the
data.bfield.
-
data_s
public java.nio.ShortBuffer data_s()
- Returns:
- a
ShortBufferview of thedata.sfield.
-
data_s
public short data_s(int index)
- Returns:
- the value at the specified index of the
data.sfield.
-
data_l
public org.lwjgl.CLongBuffer data_l()
- Returns:
- a
CLongBufferview of thedata.lfield.
-
data_l
public long data_l(int index)
- Returns:
- the value at the specified index of the
data.lfield.
-
type
public XClientMessageEvent type(int value)
Sets the specified value to thetypefield.
-
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_typefield.
-
format
public XClientMessageEvent format(int value)
Sets the specified value to theformatfield.
-
data_b
public XClientMessageEvent data_b(java.nio.ByteBuffer value)
Copies the specifiedByteBufferto thebfield.
-
data_b
public XClientMessageEvent data_b(int index, byte value)
Sets the specified value at the specified index of thebfield.
-
data_s
public XClientMessageEvent data_s(java.nio.ShortBuffer value)
Copies the specifiedShortBufferto thesfield.
-
data_s
public XClientMessageEvent data_s(int index, short value)
Sets the specified value at the specified index of thesfield.
-
data_l
public XClientMessageEvent data_l(org.lwjgl.CLongBuffer value)
Copies the specifiedCLongBufferto thelfield.
-
data_l
public XClientMessageEvent data_l(int index, long value)
Sets the specified value at the specified index of thelfield.
-
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, org.lwjgl.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 newXClientMessageEventinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XClientMessageEvent calloc()
Returns a newXClientMessageEventinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XClientMessageEvent create()
Returns a newXClientMessageEventinstance allocated withBufferUtils.
-
create
public static XClientMessageEvent create(long address)
Returns a newXClientMessageEventinstance for the specified memory address.
-
createSafe
@Nullable public static XClientMessageEvent createSafe(long address)
-
malloc
public static XClientMessageEvent.Buffer malloc(int capacity)
Returns a newXClientMessageEvent.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XClientMessageEvent.Buffer calloc(int capacity)
Returns a newXClientMessageEvent.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XClientMessageEvent.Buffer create(int capacity)
Returns a newXClientMessageEvent.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XClientMessageEvent.Buffer create(long address, int capacity)
Create aXClientMessageEvent.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XClientMessageEvent.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static XClientMessageEvent mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static XClientMessageEvent callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static XClientMessageEvent mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static XClientMessageEvent callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static XClientMessageEvent.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static XClientMessageEvent.Buffer callocStack(int capacity)
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
public static XClientMessageEvent malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXClientMessageEventinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XClientMessageEvent calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXClientMessageEventinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XClientMessageEvent.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXClientMessageEvent.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XClientMessageEvent.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXClientMessageEvent.Bufferinstance allocated on the specifiedMemoryStackand 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 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
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, 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
-
-