Package org.lwjgl.system.linux
Class XVisualInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.linux.XVisualInfo
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class XVisualInfo extends Struct
Information used by the visual utility routines to find desired visual type from the many visuals a display may support.Layout
struct XVisualInfo { Visual * visual; VisualID visualid; int screen; int depth; int class; unsigned long red_mask; unsigned long green_mask; unsigned long blue_mask; int colormap_size; int bits_per_rgb; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
XVisualInfo.Buffer
An array ofXVisualInfo
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description XVisualInfo(java.nio.ByteBuffer container)
Creates aXVisualInfo
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
bits_per_rgb()
Returns the value of thebits_per_rgb
field.XVisualInfo
bits_per_rgb(int value)
Sets the specified value to thebits_per_rgb
field.long
blue_mask()
Returns the value of theblue_mask
field.XVisualInfo
blue_mask(long value)
Sets the specified value to theblue_mask
field.static XVisualInfo
calloc()
Returns a newXVisualInfo
instance allocated withmemCalloc
.static XVisualInfo.Buffer
calloc(int capacity)
Returns a newXVisualInfo.Buffer
instance allocated withmemCalloc
.static XVisualInfo
callocStack()
Returns a newXVisualInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static XVisualInfo.Buffer
callocStack(int capacity)
Returns a newXVisualInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static XVisualInfo.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newXVisualInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static XVisualInfo
callocStack(MemoryStack stack)
Returns a newXVisualInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
class$()
Returns the value of theclass$
field.XVisualInfo
class$(int value)
Sets the specified value to theclass
field.int
colormap_size()
Returns the value of thecolormap_size
field.XVisualInfo
colormap_size(int value)
Sets the specified value to thecolormap_size
field.static XVisualInfo
create()
Returns a newXVisualInfo
instance allocated withBufferUtils
.static XVisualInfo.Buffer
create(int capacity)
Returns a newXVisualInfo.Buffer
instance allocated withBufferUtils
.static XVisualInfo
create(long address)
static XVisualInfo.Buffer
create(long address, int capacity)
Create aXVisualInfo.Buffer
instance at the specified memory.int
depth()
Returns the value of thedepth
field.XVisualInfo
depth(int value)
Sets the specified value to thedepth
field.long
green_mask()
Returns the value of thegreen_mask
field.XVisualInfo
green_mask(long value)
Sets the specified value to thegreen_mask
field.static XVisualInfo
malloc()
Returns a newXVisualInfo
instance allocated withmemAlloc
.static XVisualInfo.Buffer
malloc(int capacity)
Returns a newXVisualInfo.Buffer
instance allocated withmemAlloc
.static XVisualInfo
mallocStack()
Returns a newXVisualInfo
instance allocated on the thread-localMemoryStack
.static XVisualInfo.Buffer
mallocStack(int capacity)
Returns a newXVisualInfo.Buffer
instance allocated on the thread-localMemoryStack
.static XVisualInfo.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newXVisualInfo.Buffer
instance allocated on the specifiedMemoryStack
.static XVisualInfo
mallocStack(MemoryStack stack)
Returns a newXVisualInfo
instance allocated on the specifiedMemoryStack
.XVisualInfo
nset(long struct)
Unsafe version ofset
.long
red_mask()
Returns the value of thered_mask
field.XVisualInfo
red_mask(long value)
Sets the specified value to thered_mask
field.int
screen()
Returns the value of thescreen
field.XVisualInfo
screen(int value)
Sets the specified value to thescreen
field.XVisualInfo
set(Visual visual, long visualid, int screen, int depth, int class$, long red_mask, long green_mask, long blue_mask, int colormap_size, int bits_per_rgb)
Initializes this struct with the specified values.XVisualInfo
set(XVisualInfo src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
CallsXVisualInfo.validate(long)
for each struct contained in the specified struct array.Visual
visual()
Returns aVisual
view of the struct pointed to by thevisual
field.XVisualInfo
visual(Visual value)
Sets the address of the specifiedVisual
to thevisual
field.long
visualid()
Returns the value of thevisualid
field.XVisualInfo
visualid(long value)
Sets the specified value to thevisualid
field.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
XVisualInfo
public XVisualInfo(java.nio.ByteBuffer container)
Creates aXVisualInfo
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
Returns thesizeof(struct)
.
-
visualid
public long visualid()
Returns the value of thevisualid
field.
-
screen
public int screen()
Returns the value of thescreen
field.
-
depth
public int depth()
Returns the value of thedepth
field.
-
class$
public int class$()
Returns the value of theclass$
field.
-
red_mask
public long red_mask()
Returns the value of thered_mask
field.
-
green_mask
public long green_mask()
Returns the value of thegreen_mask
field.
-
blue_mask
public long blue_mask()
Returns the value of theblue_mask
field.
-
colormap_size
public int colormap_size()
Returns the value of thecolormap_size
field.
-
bits_per_rgb
public int bits_per_rgb()
Returns the value of thebits_per_rgb
field.
-
visual
public XVisualInfo visual(Visual value)
Sets the address of the specifiedVisual
to thevisual
field.
-
visualid
public XVisualInfo visualid(long value)
Sets the specified value to thevisualid
field.
-
screen
public XVisualInfo screen(int value)
Sets the specified value to thescreen
field.
-
depth
public XVisualInfo depth(int value)
Sets the specified value to thedepth
field.
-
class$
public XVisualInfo class$(int value)
Sets the specified value to theclass
field.
-
red_mask
public XVisualInfo red_mask(long value)
Sets the specified value to thered_mask
field.
-
green_mask
public XVisualInfo green_mask(long value)
Sets the specified value to thegreen_mask
field.
-
blue_mask
public XVisualInfo blue_mask(long value)
Sets the specified value to theblue_mask
field.
-
colormap_size
public XVisualInfo colormap_size(int value)
Sets the specified value to thecolormap_size
field.
-
bits_per_rgb
public XVisualInfo bits_per_rgb(int value)
Sets the specified value to thebits_per_rgb
field.
-
set
public XVisualInfo set(Visual visual, long visualid, int screen, int depth, int class$, long red_mask, long green_mask, long blue_mask, int colormap_size, int bits_per_rgb)
Initializes this struct with the specified values.
-
nset
public XVisualInfo nset(long struct)
Unsafe version ofset
.
-
set
public XVisualInfo set(XVisualInfo src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static XVisualInfo malloc()
Returns a newXVisualInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static XVisualInfo calloc()
Returns a newXVisualInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static XVisualInfo create()
Returns a newXVisualInfo
instance allocated withBufferUtils
.
-
create
public static XVisualInfo create(long address)
-
malloc
public static XVisualInfo.Buffer malloc(int capacity)
Returns a newXVisualInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static XVisualInfo.Buffer calloc(int capacity)
Returns a newXVisualInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static XVisualInfo.Buffer create(int capacity)
Returns a newXVisualInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static XVisualInfo.Buffer create(long address, int capacity)
Create aXVisualInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static XVisualInfo mallocStack()
Returns a newXVisualInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static XVisualInfo callocStack()
Returns a newXVisualInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static XVisualInfo mallocStack(MemoryStack stack)
Returns a newXVisualInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static XVisualInfo callocStack(MemoryStack stack)
Returns a newXVisualInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static XVisualInfo.Buffer mallocStack(int capacity)
Returns a newXVisualInfo.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static XVisualInfo.Buffer callocStack(int capacity)
Returns a newXVisualInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static XVisualInfo.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newXVisualInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static XVisualInfo.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newXVisualInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
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)
CallsXVisualInfo.validate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-