Package org.lwjgl.system.linux
Class Visual
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.linux.Visual
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class Visual extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Visual structure; contains information about colormapping possible.Layout
struct Visual { void * ext_data; VisualID visualid; int class; unsigned long red_mask; unsigned long green_mask; unsigned long blue_mask; int bits_per_rgb; int map_entries; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Visual.Buffer
An array ofVisual
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
BITS_PER_RGB
BLUE_MASK
CLASS
EXT_DATA
GREEN_MASK
MAP_ENTRIES
RED_MASKThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
VISUALID
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description Visual(java.nio.ByteBuffer container)
Creates aVisual
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
bits_per_rgb()
Visual
bits_per_rgb(int value)
Sets the specified value to thebits_per_rgb
field.long
blue_mask()
Visual
blue_mask(long value)
Sets the specified value to theblue_mask
field.static Visual
calloc()
Returns a newVisual
instance allocated withmemCalloc
.static Visual.Buffer
calloc(int capacity)
Returns a newVisual.Buffer
instance allocated withmemCalloc
.static Visual.Buffer
calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVisual.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static Visual
calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVisual
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static Visual
callocStack()
Deprecated.static Visual.Buffer
callocStack(int capacity)
Deprecated.static Visual.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static Visual
callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.int
class$()
Visual
class$(int value)
Sets the specified value to theclass
field.static Visual
create()
Returns a newVisual
instance allocated withBufferUtils
.static Visual.Buffer
create(int capacity)
Returns a newVisual.Buffer
instance allocated withBufferUtils
.static Visual
create(long address)
Returns a newVisual
instance for the specified memory address.static Visual.Buffer
create(long address, int capacity)
Create aVisual.Buffer
instance at the specified memory.static Visual
createSafe(long address)
static Visual.Buffer
createSafe(long address, int capacity)
long
ext_data()
Visual
ext_data(long value)
Sets the specified value to theext_data
field.long
green_mask()
Visual
green_mask(long value)
Sets the specified value to thegreen_mask
field.static Visual
malloc()
Returns a newVisual
instance allocated withmemAlloc
.static Visual.Buffer
malloc(int capacity)
Returns a newVisual.Buffer
instance allocated withmemAlloc
.static Visual.Buffer
malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVisual.Buffer
instance allocated on the specifiedMemoryStack
.static Visual
malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVisual
instance allocated on the specifiedMemoryStack
.static Visual
mallocStack()
Deprecated.static Visual.Buffer
mallocStack(int capacity)
Deprecated.static Visual.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static Visual
mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.int
map_entries()
Visual
map_entries(int value)
Sets the specified value to themap_entries
field.static int
nbits_per_rgb(long struct)
Unsafe version ofbits_per_rgb()
.static void
nbits_per_rgb(long struct, int value)
Unsafe version ofbits_per_rgb
.static long
nblue_mask(long struct)
Unsafe version ofblue_mask()
.static void
nblue_mask(long struct, long value)
Unsafe version ofblue_mask
.static int
nclass$(long struct)
Unsafe version ofclass$()
.static void
nclass$(long struct, int value)
Unsafe version ofclass$
.static long
next_data(long struct)
Unsafe version ofext_data()
.static void
next_data(long struct, long value)
Unsafe version ofext_data
.static long
ngreen_mask(long struct)
Unsafe version ofgreen_mask()
.static void
ngreen_mask(long struct, long value)
Unsafe version ofgreen_mask
.static int
nmap_entries(long struct)
Unsafe version ofmap_entries()
.static void
nmap_entries(long struct, int value)
Unsafe version ofmap_entries
.static long
nred_mask(long struct)
Unsafe version ofred_mask()
.static void
nred_mask(long struct, long value)
Unsafe version ofred_mask
.static long
nvisualid(long struct)
Unsafe version ofvisualid()
.static void
nvisualid(long struct, long value)
Unsafe version ofvisualid
.long
red_mask()
Visual
red_mask(long value)
Sets the specified value to thered_mask
field.Visual
set(long ext_data, long visualid, int class$, long red_mask, long green_mask, long blue_mask, int bits_per_rgb, int map_entries)
Initializes this struct with the specified values.Visual
set(Visual src)
Copies the specified struct data to this struct.int
sizeof()
long
visualid()
Visual
visualid(long value)
Sets the specified value to thevisualid
field.
-
-
-
Constructor Detail
-
Visual
public Visual(java.nio.ByteBuffer container)
Creates aVisual
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()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
ext_data
public long ext_data()
- Returns:
- the value of the
ext_data
field.
-
visualid
public long visualid()
- Returns:
- the value of the
visualid
field.
-
class$
public int class$()
- Returns:
- the value of the
class
field.
-
red_mask
public long red_mask()
- Returns:
- the value of the
red_mask
field.
-
green_mask
public long green_mask()
- Returns:
- the value of the
green_mask
field.
-
blue_mask
public long blue_mask()
- Returns:
- the value of the
blue_mask
field.
-
bits_per_rgb
public int bits_per_rgb()
- Returns:
- the value of the
bits_per_rgb
field.
-
map_entries
public int map_entries()
- Returns:
- the value of the
map_entries
field.
-
ext_data
public Visual ext_data(long value)
Sets the specified value to theext_data
field.
-
visualid
public Visual visualid(long value)
Sets the specified value to thevisualid
field.
-
class$
public Visual class$(int value)
Sets the specified value to theclass
field.
-
red_mask
public Visual red_mask(long value)
Sets the specified value to thered_mask
field.
-
green_mask
public Visual green_mask(long value)
Sets the specified value to thegreen_mask
field.
-
blue_mask
public Visual blue_mask(long value)
Sets the specified value to theblue_mask
field.
-
bits_per_rgb
public Visual bits_per_rgb(int value)
Sets the specified value to thebits_per_rgb
field.
-
map_entries
public Visual map_entries(int value)
Sets the specified value to themap_entries
field.
-
set
public Visual set(long ext_data, long visualid, int class$, long red_mask, long green_mask, long blue_mask, int bits_per_rgb, int map_entries)
Initializes this struct with the specified values.
-
set
public Visual set(Visual src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static Visual malloc()
Returns a newVisual
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static Visual calloc()
Returns a newVisual
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static Visual create()
Returns a newVisual
instance allocated withBufferUtils
.
-
create
public static Visual create(long address)
Returns a newVisual
instance for the specified memory address.
-
createSafe
@Nullable public static Visual createSafe(long address)
-
malloc
public static Visual.Buffer malloc(int capacity)
Returns a newVisual.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static Visual.Buffer calloc(int capacity)
Returns a newVisual.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static Visual.Buffer create(int capacity)
Returns a newVisual.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static Visual.Buffer create(long address, int capacity)
Create aVisual.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static Visual.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static Visual mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static Visual callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static Visual mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static Visual callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static Visual.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead.
-
callocStack
@Deprecated public static Visual.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead.
-
mallocStack
@Deprecated public static Visual.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead.
-
callocStack
@Deprecated public static Visual.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead.
-
malloc
public static Visual malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVisual
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
public static Visual calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVisual
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
public static Visual.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVisual.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
calloc
public static Visual.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVisual.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
next_data
public static long next_data(long struct)
Unsafe version ofext_data()
.
-
nvisualid
public static long nvisualid(long struct)
Unsafe version ofvisualid()
.
-
nclass$
public static int nclass$(long struct)
Unsafe version ofclass$()
.
-
nred_mask
public static long nred_mask(long struct)
Unsafe version ofred_mask()
.
-
ngreen_mask
public static long ngreen_mask(long struct)
Unsafe version ofgreen_mask()
.
-
nblue_mask
public static long nblue_mask(long struct)
Unsafe version ofblue_mask()
.
-
nbits_per_rgb
public static int nbits_per_rgb(long struct)
Unsafe version ofbits_per_rgb()
.
-
nmap_entries
public static int nmap_entries(long struct)
Unsafe version ofmap_entries()
.
-
next_data
public static void next_data(long struct, long value)
Unsafe version ofext_data
.
-
nvisualid
public static void nvisualid(long struct, long value)
Unsafe version ofvisualid
.
-
nclass$
public static void nclass$(long struct, int value)
Unsafe version ofclass$
.
-
nred_mask
public static void nred_mask(long struct, long value)
Unsafe version ofred_mask
.
-
ngreen_mask
public static void ngreen_mask(long struct, long value)
Unsafe version ofgreen_mask
.
-
nblue_mask
public static void nblue_mask(long struct, long value)
Unsafe version ofblue_mask
.
-
nbits_per_rgb
public static void nbits_per_rgb(long struct, int value)
Unsafe version ofbits_per_rgb
.
-
nmap_entries
public static void nmap_entries(long struct, int value)
Unsafe version ofmap_entries
.
-
-