Class XErrorEvent

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XErrorEvent>
org.lwjgl.system.linux.XErrorEvent
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class XErrorEvent extends org.lwjgl.system.Struct<XErrorEvent> implements org.lwjgl.system.NativeResource
Error event.

Layout


 struct XErrorEvent {
     int type;
     Display * display();
     XID resourceid();
     unsigned long serial();
     unsigned char error_code();
     unsigned char request_code();
     unsigned char minor_code();
 }
  • 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.
    • DISPLAY

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

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

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

      public static final int ERROR_CODE
      The struct member offsets.
    • REQUEST_CODE

      public static final int REQUEST_CODE
      The struct member offsets.
    • MINOR_CODE

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

    • XErrorEvent

      public XErrorEvent(ByteBuffer container)
      Creates a XErrorEvent 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<XErrorEvent>
    • type

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

      public long display()
      display the event was read from
    • resourceid

      public long resourceid()
      resource id
    • serial

      public long serial()
      serial number of failed request
    • error_code

      public byte error_code()
      error code of failed request
    • request_code

      public byte request_code()
      major op-code of failed request
    • minor_code

      public byte minor_code()
      minor op-code of failed request
    • type

      public XErrorEvent type(int value)
      Sets the specified value to the type field.
    • display

      public XErrorEvent display(long value)
      Sets the specified value to the display() field.
    • resourceid

      public XErrorEvent resourceid(long value)
      Sets the specified value to the resourceid() field.
    • serial

      public XErrorEvent serial(long value)
      Sets the specified value to the serial() field.
    • error_code

      public XErrorEvent error_code(byte value)
      Sets the specified value to the error_code() field.
    • request_code

      public XErrorEvent request_code(byte value)
      Sets the specified value to the request_code() field.
    • minor_code

      public XErrorEvent minor_code(byte value)
      Sets the specified value to the minor_code() field.
    • set

      public XErrorEvent set(int type, long display, long resourceid, long serial, byte error_code, byte request_code, byte minor_code)
      Initializes this struct with the specified values.
    • set

      public XErrorEvent set(XErrorEvent src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static XErrorEvent.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 XErrorEvent.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 XErrorEvent malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new XErrorEvent instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static XErrorEvent calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new XErrorEvent instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

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

      public static XErrorEvent.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XErrorEvent.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().
    • ndisplay

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

      public static long nresourceid(long struct)
      Unsafe version of resourceid().
    • nserial

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

      public static byte nerror_code(long struct)
      Unsafe version of error_code().
    • nrequest_code

      public static byte nrequest_code(long struct)
      Unsafe version of request_code().
    • nminor_code

      public static byte nminor_code(long struct)
      Unsafe version of minor_code().
    • ntype

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

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

      public static void nresourceid(long struct, long value)
      Unsafe version of resourceid.
    • nserial

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

      public static void nerror_code(long struct, byte value)
      Unsafe version of error_code.
    • nrequest_code

      public static void nrequest_code(long struct, byte value)
      Unsafe version of request_code.
    • nminor_code

      public static void nminor_code(long struct, byte value)
      Unsafe version of minor_code.
    • validate

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