sgiXnmbxGetExtendedVisualInfo(3X)
sgiXnmbxGetExtendedVisualInfo, sgiXnmbxMatchExtendedVisualInfo, sgiXnmbxGetVisualCapabilities - obtain NMBX extended visual information
As shipped in IRIX 6.5.19. Unchanged since IRIX 6.5.
NAME sgiXnmbxGetExtendedVisualInfo, sgiXnmbxMatchExtendedVisualInfo, sgiXnmbxGetVisualCapabilities - obtain NMBX extended visual information SYNTAX #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/extensions/sgiXnmbx.h> XVisualInfo* sgiXnmbxGetExtendedVisualInfo(dpy, vinfoMask, vinfoTemplate, nitems, nCriterion, criterion) Display *dpy; long vinfoMask; XVisualInfo *vinfoTemplate; int *nitems; int nCriterion; sgiXnmbxCapability *criterion; Status sgiXnmbxMatchExtendedVisualInfo(dpy, screen, depth, class, nCriterion, criterion, vinfo_return) Display *dpy; int screen; int depth; int class; int nCriterion; sgiXnmbxCapability *criterion; XVisualInfo *vinfo_return; sgiXnmbxCapability* sgiXnmbxGetVisualCapabilities(dpy, visual, nCapabilities) Display *dpy; Visual *visual; int *nCapabilities; ARGUMENTS dpy Specifies the connection to the X server. vinfoMask Specifies the visual mask value. vinfoTemplate Specifies the core visual attributes that are to be used in matching the visual structures. nitems Returns the number of matching visual structures. nCriterion Specifies the number of extended capability match criteria. criterion Specifies an array of extended capability match criteria. to use in selecting visuals. screen Specifies the screen. depth Specifies the depth of the screen. class Specifies the visual type. vinfo_return Returns the matched visual information. visual Specifies the visual. nCapabilities Returns the number of capabilities for the visual. DESCRIPTION sgiXnmbxGetExtendedVisualInfo works like XGetVisualInfo but also supports queries involving NMBX extended visual capabilities. Two additional parameters nCriterion and criterion allow match criteria to be specified. criterion is of type sgiXnmbxCapability which is a structure: typedef struct { Atom atom; unsigned long value; int matchCriterion; } sgiXnmbxCapability; The atom field should be filled in with the atom value for the interned string naming the capability descriptor. If the atom field is None, the criterion is ignored. The matchCriterion field is an enumerated value: #define sgiNMBX_Equal 0 #define sgiNMBX_NotEqual 1 #define sgiNMBX_Greater 2 #define sgiNMBX_GreaterOrEqual 3 #define sgiNMBX_Less 4 #define sgiNMBX_LessOrEqual 5 #define sgiNMBX_Present 6 #define sgiNMBX_NotPresent 7 The value field specifies a value to be used according to the match criterion. sgiNMBX_Present and sgiNMBX_NotPresent ignore the value and only test existence or non-existence of the capability descriptor (independet of value). If the call is unsuccessful or no matching visuals are found, NULL will be returned. Otherwise, sgiXnmbxGetExtendedVisualInfo will return a list of visuals and update nitems to reflect the number of visuals returned. Each visual on the list will match the template and meet all extended capability match criteria specified. sgiXnmbxGetExtendedVisualInfo may be used independent of whether the NMBX extension is present or not. When the extension is not present, it is assumed none of the server visual have any NMBX capability descriptors. The memory returned by sgiXnmbxGetExtendedVisualInfo should be freed when no longer needed with XFree. sgiXnmbxMatchExtendedVisualInfo works like XMatchVisualInfo but takes two additional parameters nCriterion and criterion which allow match criteria to be specified. The match criteria operate like in sgiXnmbxGetExtendedVisualInfo. sgiXnmbxGetVisualCapabilities queries the NMBX extended visual capabilities of the specified visual. If the call is unsuccessful or the visual has no NMBX capability descriptors, NULL will be returned. Otherwise, nCapabilities reflects the number of elements in an array of type sgiXnmbxCapability returned. The client is expected to un-intern the returned atoms to determine the names of the returned capabilities. The returned matchCriterion fields will always be set to sgiNMBX_Equal. sgiXnmbxGetVisualCapabilities may be used indepednet of whether the NMBX extension is present or not. When the extension is not present, it is assumed none of the server visual have any NMBX capability descriptors so NULL is always returned. The memory returned by sgiXnmbxGetVisualCapabilities should be freed when no longer needed with XFree. EXAMPLE The following example shows how to use sgiXnmbxGetExtendedVisualInfo to find all the visual able to perform NMBX double buffering and able to use OpenGL rendering which are PseudoColor on the default screen: Display *dpy; XVisualInfo template; sgiXnmbxCapability cap[2]; int nVisuals; Atom double_buffer_atom, opengl_atom; XVisualInfo *visuals; /* intern atoms */ double_buffer_atom = XInternAtom(dpy, "MAX_DISPLAY_BUFFERS", 1); opengl_atom = XInternAtom(dpy, "OPENGL_CAPABLE", 1); /* set up match criteria */ cap[0].atom = double_buffer_atom; cap[0].value = 2; cap[0].matchCriterion = sgiNMBX_GreaterOrEqual; cap[1].atom = opengl_atom; cap[1].matchCriterion = sgiNMBX_Present; /* setup standard visual info template */ template.screen = DefaultScreen(dpy); template.class = PseudoColor; visuals = sgiXnmbxGetExtendedVisualInfo(dpy, VisualScreenMask| VisualClassMask, &template, &nVisuals, 2, cap); SEE ALSO XGetVisualInfo(3X)