Package org.lwjgl.system.linux
Class XErrorEvent
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.linux.XErrorEvent
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,NativeResource
,Pointer
public class XErrorEvent extends Struct implements NativeResource
Error event.Member documentation
display
– display the event was read fromresourceid
– resource idserial
– serial number of failed requesterror_code
– error code of failed requestrequest_code
– major op-code of failed requestminor_code
– minor op-code of failed request
Layout
struct XErrorEvent { int type; Display * display; XID resourceid; unsigned long serial; unsigned char error_code; unsigned char request_code; unsigned char minor_code; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XErrorEvent.Buffer
An array ofXErrorEvent
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
DISPLAY
ERROR_CODE
MINOR_CODE
REQUEST_CODE
RESOURCEID
SERIALThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
TYPE
The struct member offsets.-
Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor Description XErrorEvent(java.nio.ByteBuffer container)
Creates aXErrorEvent
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XErrorEvent
calloc()
Returns a newXErrorEvent
instance allocated withmemCalloc
.static XErrorEvent.Buffer
calloc(int capacity)
Returns a newXErrorEvent.Buffer
instance allocated withmemCalloc
.static XErrorEvent
callocStack()
Returns a newXErrorEvent
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static XErrorEvent.Buffer
callocStack(int capacity)
Returns a newXErrorEvent.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static XErrorEvent.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newXErrorEvent.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static XErrorEvent
callocStack(MemoryStack stack)
Returns a newXErrorEvent
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static XErrorEvent
create()
Returns a newXErrorEvent
instance allocated withBufferUtils
.static XErrorEvent.Buffer
create(int capacity)
Returns a newXErrorEvent.Buffer
instance allocated withBufferUtils
.static XErrorEvent
create(long address)
Returns a newXErrorEvent
instance for the specified memory address.static XErrorEvent.Buffer
create(long address, int capacity)
Create aXErrorEvent.Buffer
instance at the specified memory.static XErrorEvent
createSafe(long address)
static XErrorEvent.Buffer
createSafe(long address, int capacity)
long
display()
Returns the value of thedisplay
field.XErrorEvent
display(long value)
Sets the specified value to thedisplay
field.byte
error_code()
Returns the value of theerror_code
field.XErrorEvent
error_code(byte value)
Sets the specified value to theerror_code
field.static XErrorEvent
malloc()
Returns a newXErrorEvent
instance allocated withmemAlloc
.static XErrorEvent.Buffer
malloc(int capacity)
Returns a newXErrorEvent.Buffer
instance allocated withmemAlloc
.static XErrorEvent
mallocStack()
Returns a newXErrorEvent
instance allocated on the thread-localMemoryStack
.static XErrorEvent.Buffer
mallocStack(int capacity)
Returns a newXErrorEvent.Buffer
instance allocated on the thread-localMemoryStack
.static XErrorEvent.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newXErrorEvent.Buffer
instance allocated on the specifiedMemoryStack
.static XErrorEvent
mallocStack(MemoryStack stack)
Returns a newXErrorEvent
instance allocated on the specifiedMemoryStack
.byte
minor_code()
Returns the value of theminor_code
field.XErrorEvent
minor_code(byte value)
Sets the specified value to theminor_code
field.static long
ndisplay(long struct)
Unsafe version ofdisplay()
.static void
ndisplay(long struct, long value)
Unsafe version ofdisplay
.static byte
nerror_code(long struct)
Unsafe version oferror_code()
.static void
nerror_code(long struct, byte value)
Unsafe version oferror_code
.static byte
nminor_code(long struct)
Unsafe version ofminor_code()
.static void
nminor_code(long struct, byte value)
Unsafe version ofminor_code
.static byte
nrequest_code(long struct)
Unsafe version ofrequest_code()
.static void
nrequest_code(long struct, byte value)
Unsafe version ofrequest_code
.static long
nresourceid(long struct)
Unsafe version ofresourceid()
.static void
nresourceid(long struct, long value)
Unsafe version ofresourceid
.static long
nserial(long struct)
Unsafe version ofserial()
.static void
nserial(long struct, long value)
Unsafe version ofserial
.static int
ntype(long struct)
Unsafe version oftype()
.static void
ntype(long struct, int value)
Unsafe version oftype
.byte
request_code()
Returns the value of therequest_code
field.XErrorEvent
request_code(byte value)
Sets the specified value to therequest_code
field.long
resourceid()
Returns the value of theresourceid
field.XErrorEvent
resourceid(long value)
Sets the specified value to theresourceid
field.long
serial()
Returns the value of theserial
field.XErrorEvent
serial(long value)
Sets the specified value to theserial
field.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.XErrorEvent
set(XErrorEvent src)
Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.int
type()
Returns the value of thetype
field.XErrorEvent
type(int value)
Sets the specified value to thetype
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.-
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
-
-
-
Constructor Detail
-
XErrorEvent
public XErrorEvent(java.nio.ByteBuffer container)
Creates aXErrorEvent
instance at the current position of the specifiedByteBuffer
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()
Description copied from class:Struct
Returnssizeof(struct)
.
-
type
public int type()
Returns the value of thetype
field.
-
display
public long display()
Returns the value of thedisplay
field.
-
resourceid
public long resourceid()
Returns the value of theresourceid
field.
-
serial
public long serial()
Returns the value of theserial
field.
-
error_code
public byte error_code()
Returns the value of theerror_code
field.
-
request_code
public byte request_code()
Returns the value of therequest_code
field.
-
minor_code
public byte minor_code()
Returns the value of theminor_code
field.
-
type
public XErrorEvent type(int value)
Sets the specified value to thetype
field.
-
display
public XErrorEvent display(long value)
Sets the specified value to thedisplay
field.
-
resourceid
public XErrorEvent resourceid(long value)
Sets the specified value to theresourceid
field.
-
serial
public XErrorEvent serial(long value)
Sets the specified value to theserial
field.
-
error_code
public XErrorEvent error_code(byte value)
Sets the specified value to theerror_code
field.
-
request_code
public XErrorEvent request_code(byte value)
Sets the specified value to therequest_code
field.
-
minor_code
public XErrorEvent minor_code(byte value)
Sets the specified value to theminor_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 newXErrorEvent
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static XErrorEvent calloc()
Returns a newXErrorEvent
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static XErrorEvent create()
Returns a newXErrorEvent
instance allocated withBufferUtils
.
-
create
public static XErrorEvent create(long address)
Returns a newXErrorEvent
instance for the specified memory address.
-
createSafe
@Nullable public static XErrorEvent createSafe(long address)
-
malloc
public static XErrorEvent.Buffer malloc(int capacity)
Returns a newXErrorEvent.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static XErrorEvent.Buffer calloc(int capacity)
Returns a newXErrorEvent.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static XErrorEvent.Buffer create(int capacity)
Returns a newXErrorEvent.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static XErrorEvent.Buffer create(long address, int capacity)
Create aXErrorEvent.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static XErrorEvent.Buffer createSafe(long address, int capacity)
-
mallocStack
public static XErrorEvent mallocStack()
Returns a newXErrorEvent
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static XErrorEvent callocStack()
Returns a newXErrorEvent
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static XErrorEvent mallocStack(MemoryStack stack)
Returns a newXErrorEvent
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static XErrorEvent callocStack(MemoryStack stack)
Returns a newXErrorEvent
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static XErrorEvent.Buffer mallocStack(int capacity)
Returns a newXErrorEvent.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static XErrorEvent.Buffer callocStack(int capacity)
Returns a newXErrorEvent.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static XErrorEvent.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newXErrorEvent.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static XErrorEvent.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newXErrorEvent.Buffer
instance allocated on the specifiedMemoryStack
and 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()
.
-
ndisplay
public static long ndisplay(long struct)
Unsafe version ofdisplay()
.
-
nresourceid
public static long nresourceid(long struct)
Unsafe version ofresourceid()
.
-
nserial
public static long nserial(long struct)
Unsafe version ofserial()
.
-
nerror_code
public static byte nerror_code(long struct)
Unsafe version oferror_code()
.
-
nrequest_code
public static byte nrequest_code(long struct)
Unsafe version ofrequest_code()
.
-
nminor_code
public static byte nminor_code(long struct)
Unsafe version ofminor_code()
.
-
ntype
public static void ntype(long struct, int value)
Unsafe version oftype
.
-
ndisplay
public static void ndisplay(long struct, long value)
Unsafe version ofdisplay
.
-
nresourceid
public static void nresourceid(long struct, long value)
Unsafe version ofresourceid
.
-
nserial
public static void nserial(long struct, long value)
Unsafe version ofserial
.
-
nerror_code
public static void nerror_code(long struct, byte value)
Unsafe version oferror_code
.
-
nrequest_code
public static void nrequest_code(long struct, byte value)
Unsafe version ofrequest_code
.
-
nminor_code
public static void nminor_code(long struct, byte value)
Unsafe version ofminor_code
.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-