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 classXVisualInfo.BufferAn array ofXVisualInfostructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe 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 aXVisualInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description intbits_per_rgb()Returns the value of thebits_per_rgbfield.XVisualInfobits_per_rgb(int value)Sets the specified value to thebits_per_rgbfield.longblue_mask()Returns the value of theblue_maskfield.XVisualInfoblue_mask(long value)Sets the specified value to theblue_maskfield.static XVisualInfocalloc()Returns a newXVisualInfoinstance allocated withmemCalloc.static XVisualInfo.Buffercalloc(int capacity)Returns a newXVisualInfo.Bufferinstance allocated withmemCalloc.static XVisualInfocallocStack()Returns a newXVisualInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static XVisualInfo.BuffercallocStack(int capacity)Returns a newXVisualInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static XVisualInfo.BuffercallocStack(int capacity, MemoryStack stack)Returns a newXVisualInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XVisualInfocallocStack(MemoryStack stack)Returns a newXVisualInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intclass$()Returns the value of theclass$field.XVisualInfoclass$(int value)Sets the specified value to theclassfield.intcolormap_size()Returns the value of thecolormap_sizefield.XVisualInfocolormap_size(int value)Sets the specified value to thecolormap_sizefield.static XVisualInfocreate()Returns a newXVisualInfoinstance allocated withBufferUtils.static XVisualInfo.Buffercreate(int capacity)Returns a newXVisualInfo.Bufferinstance allocated withBufferUtils.static XVisualInfocreate(long address)static XVisualInfo.Buffercreate(long address, int capacity)Create aXVisualInfo.Bufferinstance at the specified memory.intdepth()Returns the value of thedepthfield.XVisualInfodepth(int value)Sets the specified value to thedepthfield.longgreen_mask()Returns the value of thegreen_maskfield.XVisualInfogreen_mask(long value)Sets the specified value to thegreen_maskfield.static XVisualInfomalloc()Returns a newXVisualInfoinstance allocated withmemAlloc.static XVisualInfo.Buffermalloc(int capacity)Returns a newXVisualInfo.Bufferinstance allocated withmemAlloc.static XVisualInfomallocStack()Returns a newXVisualInfoinstance allocated on the thread-localMemoryStack.static XVisualInfo.BuffermallocStack(int capacity)Returns a newXVisualInfo.Bufferinstance allocated on the thread-localMemoryStack.static XVisualInfo.BuffermallocStack(int capacity, MemoryStack stack)Returns a newXVisualInfo.Bufferinstance allocated on the specifiedMemoryStack.static XVisualInfomallocStack(MemoryStack stack)Returns a newXVisualInfoinstance allocated on the specifiedMemoryStack.XVisualInfonset(long struct)Unsafe version ofset.longred_mask()Returns the value of thered_maskfield.XVisualInfored_mask(long value)Sets the specified value to thered_maskfield.intscreen()Returns the value of thescreenfield.XVisualInfoscreen(int value)Sets the specified value to thescreenfield.XVisualInfoset(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.XVisualInfoset(XVisualInfo src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)CallsXVisualInfo.validate(long)for each struct contained in the specified struct array.Visualvisual()Returns aVisualview of the struct pointed to by thevisualfield.XVisualInfovisual(Visual value)Sets the address of the specifiedVisualto thevisualfield.longvisualid()Returns the value of thevisualidfield.XVisualInfovisualid(long value)Sets the specified value to thevisualidfield.-
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 aXVisualInfoinstance at the current position of the specifiedByteBuffercontainer. 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:StructReturns thesizeof(struct).
-
visualid
public long visualid()
Returns the value of thevisualidfield.
-
screen
public int screen()
Returns the value of thescreenfield.
-
depth
public int depth()
Returns the value of thedepthfield.
-
class$
public int class$()
Returns the value of theclass$field.
-
red_mask
public long red_mask()
Returns the value of thered_maskfield.
-
green_mask
public long green_mask()
Returns the value of thegreen_maskfield.
-
blue_mask
public long blue_mask()
Returns the value of theblue_maskfield.
-
colormap_size
public int colormap_size()
Returns the value of thecolormap_sizefield.
-
bits_per_rgb
public int bits_per_rgb()
Returns the value of thebits_per_rgbfield.
-
visual
public XVisualInfo visual(Visual value)
Sets the address of the specifiedVisualto thevisualfield.
-
visualid
public XVisualInfo visualid(long value)
Sets the specified value to thevisualidfield.
-
screen
public XVisualInfo screen(int value)
Sets the specified value to thescreenfield.
-
depth
public XVisualInfo depth(int value)
Sets the specified value to thedepthfield.
-
class$
public XVisualInfo class$(int value)
Sets the specified value to theclassfield.
-
red_mask
public XVisualInfo red_mask(long value)
Sets the specified value to thered_maskfield.
-
green_mask
public XVisualInfo green_mask(long value)
Sets the specified value to thegreen_maskfield.
-
blue_mask
public XVisualInfo blue_mask(long value)
Sets the specified value to theblue_maskfield.
-
colormap_size
public XVisualInfo colormap_size(int value)
Sets the specified value to thecolormap_sizefield.
-
bits_per_rgb
public XVisualInfo bits_per_rgb(int value)
Sets the specified value to thebits_per_rgbfield.
-
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 newXVisualInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XVisualInfo calloc()
Returns a newXVisualInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XVisualInfo create()
Returns a newXVisualInfoinstance allocated withBufferUtils.
-
create
public static XVisualInfo create(long address)
-
malloc
public static XVisualInfo.Buffer malloc(int capacity)
Returns a newXVisualInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XVisualInfo.Buffer calloc(int capacity)
Returns a newXVisualInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XVisualInfo.Buffer create(int capacity)
Returns a newXVisualInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XVisualInfo.Buffer create(long address, int capacity)
Create aXVisualInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static XVisualInfo mallocStack()
Returns a newXVisualInfoinstance allocated on the thread-localMemoryStack.
-
callocStack
public static XVisualInfo callocStack()
Returns a newXVisualInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static XVisualInfo mallocStack(MemoryStack stack)
Returns a newXVisualInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static XVisualInfo callocStack(MemoryStack stack)
Returns a newXVisualInfoinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static XVisualInfo.Buffer callocStack(int capacity)
Returns a newXVisualInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static XVisualInfo.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newXVisualInfo.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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
-
-