NAME
XGetVisualInfo — find the visual information structures that match the specified template.
SYNOPSIS
XVisualInfo ∗XGetVisualInfo(display, vinfo_mask,
vinfo_template, nitems_return) Display ∗display; long vinfo_mask; XVisualInfo ∗vinfo_template; int ∗nitems_return;
ARGUMENTS
displaySpecifies a connection to an X server; returned from XOpenDisplay().
vinfo_mask
Specifies the visual mask value. Indicates which elements in template are to be matched.
vinfo_template
Specifies the visual attributes that are to be used in matching the visual structures.
nitems_return
Returns the number of matching visual structures.
RETURNS
The visual information structure.
DESCRIPTION
XGetVisualInfo() returns a list of visual structures that describe visuals supported by the server and that match the attributes specified by the vinfo_template argument. If no visual structures match the template fields specified in Vinfo_mask, XGetVisualInfo() returns a NULL. To free the data returned by this function, use XFree().
For more information, 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;
/∗ The symbols for the vinfo_mask argument are: ∗/
#define VisualNoMask 0x0 #define VisualIDMask 0x1 #define VisualScreenMask 0x2 #define VisualDepthMask 0x4 #define VisualClassMask 0x8 #define VisualRedMaskMask 0x10 #define VisualGreenMaskMask 0x20 #define VisualBlueMaskMask 0x40 #define VisualColormapSizeMask 0x80 #define VisualBitsPerRGBMask 0x100 #define VisualAllMask 0x1FF
SEE ALSO
XDefaultVisual(), XVisualIDFromVisual(), XMatchVisualInfo(), XListDepths().
Xlib Reference Manual