Class Visual

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer


    public class Visual
    extends Struct
    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;
    }
    • Field Detail

      • SIZEOF

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

      • Visual

        public Visual(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns the sizeof(struct).
        Specified by:
        sizeof in class 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 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.
      • nset

        public Visual nset(long struct)
        Unsafe version of set.
      • 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(long address)
        Returns a new Visual instance for the specified memory address or null if the 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(long address,
                                           int capacity)
        Create a Visual.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • mallocStack

        public static Visual mallocStack()
        Returns a new Visual instance allocated on the thread-local MemoryStack.
      • callocStack

        public static Visual callocStack()
        Returns a new Visual instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static Visual mallocStack(MemoryStack stack)
        Returns a new Visual instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static Visual callocStack(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
      • mallocStack

        public static Visual.Buffer mallocStack(int capacity)
        Returns a new Visual.Buffer instance allocated on the thread-local MemoryStack.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static Visual.Buffer callocStack(int capacity)
        Returns a new Visual.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

        public static Visual.Buffer mallocStack(int capacity,
                                                MemoryStack stack)
        Returns a new Visual.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • callocStack

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