Class XVisualInfo

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

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

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • VISUAL, VISUALID, SCREEN, DEPTH, CLASS, RED_MASK, GREEN_MASK, BLUE_MASK, COLORMAP_SIZE, BITS_PER_RGB

        The struct member offsets.
    • Constructor Detail

      • XVisualInfo

        public XVisualInfo​(java.nio.ByteBuffer container)
        Creates a XVisualInfo 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 sizeof(struct).
        Specified by:
        sizeof in class Struct
      • visual

        public Visual visual()
        Returns a Visual view of the struct pointed to by the visual field.
      • visualid

        public long visualid()
        Returns the value of the visualid field.
      • screen

        public int screen()
        Returns the value of the screen field.
      • depth

        public int depth()
        Returns the value of the depth 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.
      • colormap_size

        public int colormap_size()
        Returns the value of the colormap_size field.
      • bits_per_rgb

        public int bits_per_rgb()
        Returns the value of the bits_per_rgb field.
      • visual

        public XVisualInfo visual​(Visual value)
        Sets the address of the specified Visual to the visual field.
      • visualid

        public XVisualInfo visualid​(long value)
        Sets the specified value to the visualid field.
      • screen

        public XVisualInfo screen​(int value)
        Sets the specified value to the screen field.
      • depth

        public XVisualInfo depth​(int value)
        Sets the specified value to the depth field.
      • class$

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

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

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

        public XVisualInfo blue_mask​(long value)
        Sets the specified value to the blue_mask field.
      • colormap_size

        public XVisualInfo colormap_size​(int value)
        Sets the specified value to the colormap_size field.
      • bits_per_rgb

        public XVisualInfo bits_per_rgb​(int value)
        Sets the specified value to the bits_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.
      • set

        public XVisualInfo set​(XVisualInfo src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • create

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

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

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

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

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

        public static XVisualInfo callocStack​(MemoryStack stack)
        Returns a new XVisualInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

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

        public static XVisualInfo.Buffer callocStack​(int capacity,
                                                     MemoryStack stack)
        Returns a new XVisualInfo.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
      • nvisual

        public static Visual nvisual​(long struct)
        Unsafe version of visual().
      • nvisualid

        public static long nvisualid​(long struct)
        Unsafe version of visualid().
      • nscreen

        public static int nscreen​(long struct)
        Unsafe version of screen().
      • ndepth

        public static int ndepth​(long struct)
        Unsafe version of depth().
      • 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().
      • ncolormap_size

        public static int ncolormap_size​(long struct)
        Unsafe version of colormap_size().
      • nbits_per_rgb

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

        public static void nvisual​(long struct,
                                   Visual value)
        Unsafe version of visual.
      • nvisualid

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

        public static void nscreen​(long struct,
                                   int value)
        Unsafe version of screen.
      • ndepth

        public static void ndepth​(long struct,
                                  int value)
        Unsafe version of depth.
      • 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.
      • ncolormap_size

        public static void ncolormap_size​(long struct,
                                          int value)
        Unsafe version of colormap_size.
      • nbits_per_rgb

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

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate
      • validate

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array