Class XErrorEvent

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class XErrorEvent
    extends org.lwjgl.system.Struct
    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 Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • TYPE, DISPLAY, RESOURCEID, SERIAL, ERROR_CODE, REQUEST_CODE, MINOR_CODE

        The struct member offsets.
    • Constructor Detail

      • XErrorEvent

        public XErrorEvent​(java.nio.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 Detail

      • sizeof

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

        public XErrorEvent serial​(long value)
        Sets the specified value to the serial() 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​(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,
                                                     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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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