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 vinfo_re‐
54       turn.  Otherwise, when a visual is not found, XMatchVisualInfo  returns
55       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
66
67       #de‐    VisualNoMask                0x0
68       fine
69       #de‐    VisualIDMask                0x1
70       fine
71       #de‐    VisualScreenMask            0x2
72       fine
73       #de‐    VisualDepthMask             0x4
74       fine
75       #de‐    VisualClassMask             0x8
76       fine
77       #de‐    VisualRedMaskMask           0x10
78       fine
79       #de‐    VisualGreenMaskMask         0x20
80       fine
81       #de‐    VisualBlueMaskMask          0x40
82       fine
83       #de‐    VisualColormapSizeMask      0x80
84       fine
85       #de‐    VisualBitsPerRGBMask        0x100
86       fine
87       #de‐    VisualAllMask               0x1FF
88       fine
89       /* Values */
90
91       typedef struct {
92               Visual *visual;
93               VisualID visualid;
94               int screen;
95               int depth;
96               int class;
97               unsigned long red_mask;
98               unsigned long green_mask;
99               unsigned long blue_mask;
100               int colormap_size;
101               int bits_per_rgb;
102       } XVisualInfo;
103

SEE ALSO

105       XFree(3)
106       Xlib - C Language X Interface
107
108
109
110X Version 11                     libX11 1.7.0                XGetVisualInfo(3)
Impressum