2.2.3. Screen Information Macros

The following lists the C language macros, their corresponding function equivalents that are for other language bindings, and what data they both can return. These macros or functions all take a pointer to the appropriate screen structure.

BlackPixelOfScreen

BlackPixelOfScreen(screen)

unsigned long XBlackPixelOfScreen(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return the black pixel value of the specified screen.

WhitePixelOfScreen

WhitePixelOfScreen(screen)

unsigned long XWhitePixelOfScreen(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return the white pixel value of the specified screen.

CellsOfScreen

CellsOfScreen(screen)

int XCellsOfScreen(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return the number of colormap cells in the default colormap of the specified screen.

DefaultColormapOfScreen

DefaultColormapOfScreen(screen)

Colormap XDefaultColormapOfScreen(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return the default colormap of the specified screen.

DefaultDepthOfScreen

DefaultDepthOfScreen(screen)

int XDefaultDepthOfScreen(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return the depth of the root window.

DefaultGCOfScreen

DefaultGCOfScreen(screen)

GC XDefaultGCOfScreen(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return a default graphics context (GC) of the specified screen, which has the same depth as the root window of the screen. The GC must never be freed.

DefaultVisualOfScreen

DefaultVisualOfScreen(screen)

Visual *XDefaultVisualOfScreen(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return the default visual of the specified screen. For information on visual types, see "Visual Types".

DoesBackingStore

DoesBackingStore(screen)

int XDoesBackingStore(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return a value indicating whether the screen supports backing stores. The value returned can be one of WhenMapped, NotUseful, or Always (see "Backing Store Attribute").

DoesSaveUnders

DoesSaveUnders(screen)

Bool XDoesSaveUnders(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return a Boolean value indicating whether the screen supports save unders. If True, the screen supports save unders. If False, the screen does not support save unders (see "Save Under Flag").

DisplayOfScreen

DisplayOfScreen(screen)

Display *XDisplayOfScreen(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return the display of the specified screen.

ScreenNumberOfScreen

.FD 0 int XScreenNumberOfScreen(screen) Screen *screen; .FN .IP screen 1i Specifies the appropriate Screen structure.

The XScreenNumberOfScreen() function returns the screen index number of the specified screen.

EventMaskOfScreen

EventMaskOfScreen(screen)

long XEventMaskOfScreen(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return the event mask of the root window for the specified screen at connection setup time.

WidthOfScreen

WidthOfScreen(screen)

int XWidthOfScreen(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return the width of the specified screen in pixels.

HeightOfScreen

HeightOfScreen(screen)

int XHeightOfScreen(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return the height of the specified screen in pixels.

WidthMMOfScreen

WidthMMOfScreen(screen)

int XWidthMMOfScreen(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return the width of the specified screen in millimeters.

HeightMMOfScreen

HeightMMOfScreen(screen)

int XHeightMMOfScreen(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return the height of the specified screen in millimeters.

MaxCmapsOfScreen

MaxCmapsOfScreen(screen)

int XMaxCmapsOfScreen(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return the maximum number of installed colormaps supported by the specified screen (see "Managing Installed Colormaps").

MinCmapsOfScreen

MinCmapsOfScreen(screen)

int XMinCmapsOfScreen(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return the minimum number of installed colormaps supported by the specified screen (see "Managing Installed Colormaps").

PlanesOfScreen

PlanesOfScreen(screen)

int XPlanesOfScreen(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return the depth of the root window.

RootWindowOfScreen

RootWindowOfScreen(screen)

Window XRootWindowOfScreen(screen)
      Screen *screen;
screen Specifies the appropriate Screen structure.

Both return the root window of the specified screen.

Next: Generating a NoOperation Protocol Request

Christophe Tronche, [email protected]