Class XClientMessageEvent

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XClientMessageEvent extends Struct<XClientMessageEvent> implements NativeResource

 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()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<XClientMessageEvent>
    • type

      public int type()
      Returns:
      the value of the type field.
    • serial

      public long serial()
      Returns:
      the value of the serial field.
    • send_event

      public boolean send_event()
      Returns:
      the value of the send_event field.
    • display

      public long display()
      Returns:
      the value of the display field.
    • window

      public long window()
      Returns:
      the value of the window field.
    • 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 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(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, 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

      public static @Nullable 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

      public static @Nullable 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(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

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

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

      public static XClientMessageEvent malloc(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(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, 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, 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 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, 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