1XGetVisualInfo(3)               XLIB FUNCTIONS               XGetVisualInfo(3)
2
3
4

NAME

6       XGetVisualInfo,  XMatchVisualInfo,  XVisualIDFromVisual,  XVisualInfo -
7       obtain visual information and visual structure
8

SYNTAX

10       XVisualInfo *XGetVisualInfo(Display *display, long vinfo_mask, XVisual‐
11              Info *vinfo_template, int *nitems_return);
12
13       Status  XMatchVisualInfo(Display  *display,  int screen, int depth, int
14              class, XVisualInfo *vinfo_return);
15
16       VisualID XVisualIDFromVisual(Visual *visual);
17

ARGUMENTS

19       class     Specifies the class of the screen.
20
21       depth     Specifies the depth of the screen.
22
23       display   Specifies the connection to the X server.
24
25       nitems_return
26                 Returns the number of matching visual structures.
27
28       screen    Specifies the screen.
29
30       visual    Specifies the visual type.
31
32       vinfo_mask
33                 Specifies the visual mask value.
34
35       vinfo_return
36                 Returns the matched visual information.
37
38       vinfo_template
39                 Specifies the visual attributes that are to be used in match‐
40                 ing the visual structures.
41

DESCRIPTION

43       The  XGetVisualInfo  function  returns a list of visual structures that
44       have attributes equal to the attributes  specified  by  vinfo_template.
45       If  no  visual  structures  match  the  template  using  the  specified
46       vinfo_mask, XGetVisualInfo returns a NULL.  To free the  data  returned
47       by this function, use XFree.
48
49       The XMatchVisualInfo function returns the visual information for a vis‐
50       ual that matches the specified depth and class for a  screen.   Because
51       multiple  visuals  that  match the specified depth and class can exist,
52       the exact visual chosen is undefined.  If a visual is found,  XMatchVi‐
53       sualInfo   returns  nonzero  and  the  information  on  the  visual  to
54       vinfo_return.  Otherwise, when a visual is not found,  XMatchVisualInfo
55       returns zero.
56
57       The  XVisualIDFromVisual  function returns the visual ID for the speci‐
58       fied visual type.
59

STRUCTURES

61       The XVisualInfo structure contains:
62
63       /* Visual information mask bits */
64
65       #define   VisualNoMask                0x0
66
67       #define   VisualIDMask                0x1
68       #define   VisualScreenMask            0x2
69       #define   VisualDepthMask             0x4
70       #define   VisualClassMask             0x8
71       #define   VisualRedMaskMask           0x10
72       #define   VisualGreenMaskMask         0x20
73       #define   VisualBlueMaskMask          0x40
74       #define   VisualColormapSizeMask      0x80
75       #define   VisualBitsPerRGBMask        0x100
76       #define   VisualAllMask               0x1FF
77       /* Values */
78
79       typedef struct {
80               Visual *visual;
81               VisualID visualid;
82               int screen;
83               int depth;
84               int class;
85               unsigned long red_mask;
86               unsigned long green_mask;
87               unsigned long blue_mask;
88               int colormap_size;
89               int bits_per_rgb;
90       } XVisualInfo;
91

SEE ALSO

93       XFree(3)
94       Xlib - C Language X Interface
95
96
97
98X Version 11                     libX11 1.6.12               XGetVisualInfo(3)
Impressum