Class Visual

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<Visual>
org.lwjgl.system.linux.Visual
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class Visual extends org.lwjgl.system.Struct<Visual> 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 
    An array of Visual structs.

    Nested classes/interfaces inherited from class org.lwjgl.system.Struct

    org.lwjgl.system.Struct.StructValidation

    Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

    org.lwjgl.system.Pointer.Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The struct alignment in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct size in bytes.
    static final int
    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
    Visual(ByteBuffer container)
    Creates a Visual instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    bits_per_rgb(int value)
    Sets the specified value to the bits_per_rgb field.
    long
     
    blue_mask(long value)
    Sets the specified value to the blue_mask field.
    static Visual
    Returns a new Visual instance allocated with memCalloc.
    calloc(int capacity)
    Returns a new Visual.Buffer instance allocated with memCalloc.
    calloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new Visual.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static Visual
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new Visual instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static Visual
    Deprecated.
    callocStack(int capacity)
    Deprecated.
    callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
    Deprecated.
    static Visual
    callocStack(org.lwjgl.system.MemoryStack stack)
    Deprecated.
    int
     
    class$(int value)
    Sets the specified value to the class field.
    static Visual
    Returns a new Visual instance allocated with BufferUtils.
    create(int capacity)
    Returns a new Visual.Buffer instance allocated with BufferUtils.
    static Visual
    create(long address)
    Returns a new Visual instance for the specified memory address.
    create(long address, int capacity)
    Create a Visual.Buffer instance at the specified memory.
    static Visual
    createSafe(long address)
    Like create, but returns null if address is NULL.
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    long
     
    ext_data(long value)
    Sets the specified value to the ext_data field.
    long
     
    green_mask(long value)
    Sets the specified value to the green_mask field.
    static Visual
    Returns a new Visual instance allocated with memAlloc.
    malloc(int capacity)
    Returns a new Visual.Buffer instance allocated with memAlloc.
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new Visual.Buffer instance allocated on the specified MemoryStack.
    static Visual
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new Visual instance allocated on the specified MemoryStack.
    static Visual
    Deprecated.
    mallocStack(int capacity)
    Deprecated.
    mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
    Deprecated.
    static Visual
    mallocStack(org.lwjgl.system.MemoryStack stack)
    Deprecated.
    int
     
    map_entries(int value)
    Sets the specified value to the map_entries field.
    static int
    nbits_per_rgb(long struct)
    Unsafe version of bits_per_rgb().
    static void
    nbits_per_rgb(long struct, int value)
    Unsafe version of bits_per_rgb.
    static long
    nblue_mask(long struct)
    Unsafe version of blue_mask().
    static void
    nblue_mask(long struct, long value)
    Unsafe version of blue_mask.
    static int
    nclass$(long struct)
    Unsafe version of class$().
    static void
    nclass$(long struct, int value)
    Unsafe version of class$.
    static long
    next_data(long struct)
    Unsafe version of ext_data().
    static void
    next_data(long struct, long value)
    Unsafe version of ext_data.
    static long
    ngreen_mask(long struct)
    Unsafe version of green_mask().
    static void
    ngreen_mask(long struct, long value)
    Unsafe version of green_mask.
    static int
    nmap_entries(long struct)
    Unsafe version of map_entries().
    static void
    nmap_entries(long struct, int value)
    Unsafe version of map_entries.
    static long
    nred_mask(long struct)
    Unsafe version of red_mask().
    static void
    nred_mask(long struct, long value)
    Unsafe version of red_mask.
    static long
    nvisualid(long struct)
    Unsafe version of visualid().
    static void
    nvisualid(long struct, long value)
    Unsafe version of visualid.
    long
     
    red_mask(long value)
    Sets the specified value to the red_mask field.
    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(Visual src)
    Copies the specified struct data to this struct.
    int
     
    long
     
    visualid(long value)
    Sets the specified value to the visualid field.

    Methods inherited from class org.lwjgl.system.Struct

    clear, free, isNull, validate

    Methods inherited from class org.lwjgl.system.Pointer.Default

    address, equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.lwjgl.system.NativeResource

    close, free
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • EXT_DATA

      public static final int EXT_DATA
      The struct member offsets.
    • VISUALID

      public static final int VISUALID
      The struct member offsets.
    • CLASS

      public static final int CLASS
      The struct member offsets.
    • RED_MASK

      public static final int RED_MASK
      The struct member offsets.
    • GREEN_MASK

      public static final int GREEN_MASK
      The struct member offsets.
    • BLUE_MASK

      public static final int BLUE_MASK
      The struct member offsets.
    • BITS_PER_RGB

      public static final int BITS_PER_RGB
      The struct member offsets.
    • MAP_ENTRIES

      public static final int MAP_ENTRIES
      The struct member offsets.
  • Constructor Details

    • Visual

      public Visual(ByteBuffer container)
      Creates a Visual 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 Details

    • sizeof

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

      public Visual visualid(long value)
      Sets the specified value to the visualid field.
    • class$

      public Visual class$(int value)
      Sets the specified value to the class field.
    • red_mask

      public Visual red_mask(long value)
      Sets the specified value to the red_mask field.
    • green_mask

      public Visual green_mask(long value)
      Sets the specified value to the green_mask field.
    • blue_mask

      public Visual blue_mask(long value)
      Sets the specified value to the blue_mask field.
    • bits_per_rgb

      public Visual bits_per_rgb(int value)
      Sets the specified value to the bits_per_rgb field.
    • map_entries

      public Visual map_entries(int value)
      Sets the specified value to the map_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 new Visual instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static Visual calloc()
      Returns a new Visual instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static Visual create()
      Returns a new Visual instance allocated with BufferUtils.
    • create

      public static Visual create(long address)
      Returns a new Visual instance for the specified memory address.
    • createSafe

      @Nullable public static Visual createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static Visual.Buffer malloc(int capacity)
      Returns a new Visual.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static Visual.Buffer calloc(int capacity)
      Returns a new Visual.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static Visual.Buffer create(int capacity)
      Returns a new Visual.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static Visual.Buffer create(long address, int capacity)
      Create a Visual.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      @Nullable public static Visual.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static Visual mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static Visual callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static Visual mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static Visual callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static Visual.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static Visual.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(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. Use malloc(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. Use calloc(int, MemoryStack) instead.
    • malloc

      public static Visual malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new Visual instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static Visual calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new Visual instance allocated on the specified MemoryStack 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 new Visual.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static Visual.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new Visual.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • next_data

      public static long next_data(long struct)
      Unsafe version of ext_data().
    • nvisualid

      public static long nvisualid(long struct)
      Unsafe version of visualid().
    • nclass$

      public static int nclass$(long struct)
      Unsafe version of class$().
    • nred_mask

      public static long nred_mask(long struct)
      Unsafe version of red_mask().
    • ngreen_mask

      public static long ngreen_mask(long struct)
      Unsafe version of green_mask().
    • nblue_mask

      public static long nblue_mask(long struct)
      Unsafe version of blue_mask().
    • nbits_per_rgb

      public static int nbits_per_rgb(long struct)
      Unsafe version of bits_per_rgb().
    • nmap_entries

      public static int nmap_entries(long struct)
      Unsafe version of map_entries().
    • next_data

      public static void next_data(long struct, long value)
      Unsafe version of ext_data.
    • nvisualid

      public static void nvisualid(long struct, long value)
      Unsafe version of visualid.
    • nclass$

      public static void nclass$(long struct, int value)
      Unsafe version of class$.
    • nred_mask

      public static void nred_mask(long struct, long value)
      Unsafe version of red_mask.
    • ngreen_mask

      public static void ngreen_mask(long struct, long value)
      Unsafe version of green_mask.
    • nblue_mask

      public static void nblue_mask(long struct, long value)
      Unsafe version of blue_mask.
    • nbits_per_rgb

      public static void nbits_per_rgb(long struct, int value)
      Unsafe version of bits_per_rgb.
    • nmap_entries

      public static void nmap_entries(long struct, int value)
      Unsafe version of map_entries.