| XGetVisualInfo(3) | Library Functions Manual | XGetVisualInfo(3) | 
XVisualInfo *XGetVisualInfo(Display *display, long vinfo_mask, XVisualInfo *vinfo_template, int * nitems_return);
Status XMatchVisualInfo(Display *display, int screen, int depth, int class, XVisualInfo *vinfo_return);
VisualID XVisualIDFromVisual(Visual *visual);
The XMatchVisualInfo function returns the visual information for a visual that matches the specified depth and class for a screen. Because multiple visuals that match the specified depth and class can exist, the exact visual chosen is undefined. If a visual is found, XMatchVisualInfo returns nonzero and the information on the visual to vinfo_return. Otherwise, when a visual is not found, XMatchVisualInfo returns zero.
The XVisualIDFromVisual function returns the visual ID for the specified visual type.
/* Visual information mask bits */
| #define | .el VisualNoMask | 0x0 | 
| #define | .el VisualIDMask | 0x1 | 
| #define | .el VisualScreenMask | 0x2 | 
| #define | .el VisualDepthMask | 0x4 | 
| #define | .el VisualClassMask | 0x8 | 
| #define | .el VisualRedMaskMask | 0x10 | 
| #define | .el VisualGreenMaskMask | 0x20 | 
| #define | .el VisualBlueMaskMask | 0x40 | 
| #define | .el VisualColormapSizeMask | 0x80 | 
| #define | .el VisualBitsPerRGBMask | 0x100 | 
| #define | .el VisualAllMask | 0x1FF | 
typedef struct {
        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;
} XVisualInfo;
| X Version 11 | XLIB FUNCTIONS |