XMatchVisualInfo()XMatchVisualInfo()NameXMatchVisualInfo – obtain the visual information that matches the
desired depth and class.
Synopsis
Status XMatchVisualInfo(display, screen, depth, class, vinfo_return)
Display *display;
int screen;
int depth;
int class;
XVisualInfo *vinfo_return;
Arguments
display Specifies a connection to an X server; returned from XOpenDis‐
play().
screen Specifies the screen.
depth Specifies the desired depth of the visual.
class Specifies the desired class of the visual, such as PseudoColor
or TrueColor.
vinfo_return
Returns the matched visual information.
Returns
Zero on failure, non-zero on success.
DescriptionXMatchVisualInfo() returns the visual information for a visual sup‐
ported on the screen that matches the specified depth and class.
Because multiple visuals that match the specified depth and class may
be supported, the exact visual chosen is undefined.
If a visual is found, this function returns a non-zero value and the
information on the visual is returned to vinfo_return. If a visual is
not found, it returns zero.
For more information on visuals, see Volume One, Chapter 7, Color.
Structures
typedef struct {
Visual *visual;
VisualID visualid;
int screen;
unsigned int depth;
int class;
unsigned long red_mask;
unsigned long green_mask;
unsigned long blue_mask;
int colormap_size;
int bits_per_rgb;
} XVisualInfo;
See AlsoXDefaultVisual(), XGetVisualInfo().
Xlib - Visuals XMatchVisualInfo()