Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XVisualIDFromVisual(3X) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XFree(3X)




XGetVisualInfo(3X) XGetVisualInfo(3X)
NAME XGetVisualInfo, XMatchVisualInfo, XVisualIDFromVisual - get visual information and manipulate the XVisualInfo structure SYNOPSIS XVisualInfo *XGetVisualInfo (display, vinfo-mask, vinfo-template, nitems-return) Display *display; long vinfo-mask; XVisualInfo *vinfo-template; int *nitems-return Status XMatchVisualInfo (display, screen, depth, class, vinfo-return) Display *display; int screen; int depth; int class; XVisualInfo *vinfo-return VisualID XVisualIDFromVisual (visual) Visual *visual; DESCRIPTION The XGetVisualInfo function returns a list of visual struc- tures that match the attributes specified by vinfo-template. If no visual structures match vinfo-template using the specified vinfo-mask, XGetVisualInfo returns a null. To free the data returned by XGetVisualInfo, use XFree. The XMatchVisualInfo function obtains the visual information that matches the specified depth and class of the screen. Because multiple visuals that match the specified depth and class can exist, the exact visual chosen is undefined. If a visual is found, XMatchVisualInfo returns nonzero and the information on the visual is available in vinfo-return. Otherwise, when a visual is not found, XMatchVisualInfo re- turns zero. The XVisualIDFromVisual function returns the visual ID for the specified visual type. November, 1990 1



XGetVisualInfo(3X) XGetVisualInfo(3X)
Arguments These functions accept the following arguments: class Specifies the class of the screen. depth Specifies the depth of the screen. display Specifies the connection to the X server. nitems-return Returns the number of matching visual structures. screen Specifies the screen. vinfo-mask Specifies the visual mask value. vinfo-return Returns the matching visual information. vinfo-template Specifies the visual attributes that are to be used in matching the visual structures. visual Specifies the visual type. Structures The XVisualInfo structure is defined as follows. /* Visual information mask bits */ #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 /* Values */ 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; 2 November, 1990



XGetVisualInfo(3X) XGetVisualInfo(3X)
int bits_per_rgb; } XVisualInfo; SEE ALSO XFree(3X)
Xlib - C Language Interface
November, 1990 3

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026