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;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • TYPE

      public static final int TYPE
      The struct member offsets.
    • SERIAL

      public static final int SERIAL
      The struct member offsets.
    • SEND_EVENT

      public static final int SEND_EVENT
      The struct member offsets.
    • DISPLAY

      public static final int DISPLAY
      The struct member offsets.
    • WINDOW

      public static final int WINDOW
      The struct member offsets.
    • MESSAGE_TYPE

      public static final int MESSAGE_TYPE
      The struct member offsets.
    • FORMAT

      public static final int FORMAT
      The struct member offsets.
    • DATA

      public static final int DATA
      The struct member offsets.
    • DATA_B

      public static final int DATA_B
      The struct member offsets.
    • DATA_S

      public static final int DATA_S
      The struct member offsets.
    • DATA_L

      public static final int DATA_L
      The struct member offsets.
  • Constructor Details

    • XClientMessageEvent

      public XClientMessageEvent(ByteBuffer container)
      Creates a XClientMessageEvent 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.

  • Method Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.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()
    • 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

      public ByteBuffer data_b()
      Returns:
      a ByteBuffer view of the data.b field.
    • data_b

      public byte data_b(int index)
      Returns:
      the value at the specified index of the data.b field.
    • data_s

      public ShortBuffer data_s()
      Returns:
      a ShortBuffer view of the data.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 the data.l field.
    • data_l

      public long data_l(int index)
      Returns:
      the value at the specified index of the data.l field.
    • type

      public XClientMessageEvent type(int value)
      Sets the specified value to the type field.
    • serial

      public XClientMessageEvent serial(long value)
      Sets the specified value to the serial() field.
    • send_event

      public XClientMessageEvent send_event(boolean value)
      Sets the specified value to the send_event() field.
    • display

      public XClientMessageEvent display(long value)
      Sets the specified value to the display() field.
    • window

      public XClientMessageEvent window(long value)
      Sets the specified value to the window() field.
    • message_type

      public XClientMessageEvent message_type(long value)
      Sets the specified value to the message_type field.
    • format

      public XClientMessageEvent format(int value)
      Sets the specified value to the format field.
    • data_b

      public XClientMessageEvent data_b(ByteBuffer value)
      Copies the specified ByteBuffer to the b field.
    • data_b

      public XClientMessageEvent data_b(int index, byte value)
      Sets the specified value at the specified index of the b field.
    • data_s

      public XClientMessageEvent data_s(ShortBuffer value)
      Copies the specified ShortBuffer to the s field.
    • data_s

      public XClientMessageEvent data_s(int index, short value)
      Sets the specified value at the specified index of the s field.
    • data_l

      public XClientMessageEvent data_l(org.lwjgl.CLongBuffer value)
      Copies the specified CLongBuffer to the l field.
    • data_l

      public XClientMessageEvent data_l(int index, long value)
      Sets the specified value at the specified index of the l 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

      public static XClientMessageEvent malloc()
      Returns a new XClientMessageEvent instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static XClientMessageEvent calloc()
      Returns a new XClientMessageEvent instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static XClientMessageEvent create()
      Returns a new XClientMessageEvent instance allocated with BufferUtils.
    • create

      public static XClientMessageEvent create(long address)
      Returns a new XClientMessageEvent instance for the specified memory address.
    • createSafe

      @Nullable public static XClientMessageEvent createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static XClientMessageEvent.Buffer malloc(int capacity)
      Returns a new XClientMessageEvent.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static XClientMessageEvent.Buffer calloc(int capacity)
      Returns a new XClientMessageEvent.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static XClientMessageEvent.Buffer create(int capacity)
      Returns a new XClientMessageEvent.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static XClientMessageEvent.Buffer create(long address, int capacity)
      Create a XClientMessageEvent.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      @Nullable public static XClientMessageEvent.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static XClientMessageEvent mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static XClientMessageEvent callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static XClientMessageEvent mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static XClientMessageEvent callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static XClientMessageEvent.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static XClientMessageEvent.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(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. Use malloc(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. Use calloc(int, MemoryStack) instead.
    • malloc

      public static XClientMessageEvent malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new XClientMessageEvent instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static XClientMessageEvent calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new XClientMessageEvent instance allocated on the specified MemoryStack and 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 new XClientMessageEvent.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static XClientMessageEvent.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XClientMessageEvent.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • ntype

      public static int ntype(long struct)
      Unsafe version of type().
    • nserial

      public static long nserial(long struct)
      Unsafe version of serial().
    • nsend_event

      public static int nsend_event(long struct)
      Unsafe version of send_event().
    • ndisplay

      public static long ndisplay(long struct)
      Unsafe version of display().
    • nwindow

      public static long nwindow(long struct)
      Unsafe version of window().
    • nmessage_type

      public static long nmessage_type(long struct)
      Unsafe version of message_type().
    • nformat

      public static int nformat(long struct)
      Unsafe version of format().
    • ndata_b

      public static ByteBuffer ndata_b(long struct)
      Unsafe version of data_b().
    • ndata_b

      public static byte ndata_b(long struct, int index)
      Unsafe version of data_b.
    • ndata_s

      public static ShortBuffer ndata_s(long struct)
      Unsafe version of data_s().
    • ndata_s

      public static short ndata_s(long struct, int index)
      Unsafe version of data_s.
    • ndata_l

      public static org.lwjgl.CLongBuffer ndata_l(long struct)
      Unsafe version of data_l().
    • ndata_l

      public static long ndata_l(long struct, int index)
      Unsafe version of data_l.
    • ntype

      public static void ntype(long struct, int value)
      Unsafe version of type.
    • nserial

      public static void nserial(long struct, long value)
      Unsafe version of serial.
    • nsend_event

      public static void nsend_event(long struct, int value)
      Unsafe version of send_event.
    • ndisplay

      public static void ndisplay(long struct, long value)
      Unsafe version of display.
    • nwindow

      public static void nwindow(long struct, long value)
      Unsafe version of window.
    • nmessage_type

      public static void nmessage_type(long struct, long value)
      Unsafe version of message_type.
    • nformat

      public static void nformat(long struct, int value)
      Unsafe version of format.
    • ndata_b

      public static void ndata_b(long struct, ByteBuffer value)
      Unsafe version of data_b.
    • ndata_b

      public static void ndata_b(long struct, int index, byte value)
      Unsafe version of data_b.
    • ndata_s

      public static void ndata_s(long struct, ShortBuffer value)
      Unsafe version of data_s.
    • ndata_s

      public static void ndata_s(long struct, int index, short value)
      Unsafe version of data_s.
    • ndata_l

      public static void ndata_l(long struct, org.lwjgl.CLongBuffer value)
      Unsafe version of data_l.
    • ndata_l

      public static void ndata_l(long struct, int index, long value)
      Unsafe version of data_l.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate