XSolarisCheckColormapEquivalence(3Xmu) XLIB FUNCTIONS
NAME
XSolarisCheckColormapEquivalence - determines if two visuals are
colormap equivalent
SYNOPSIS
#include <X11/Xmu/XmuSolaris.h>
Bool XSolarisCheckColormapEquivalence(
Display *
display,
int
screen,
Visual *
visual1,
Visual *
visual2);
ARGUMENTS
display Specifies the connection to the X server.
screen An integer specifying the screen on which the visuals are
to be searched.
visual1 Specifies the first visual type supported on the screen.
If the visual type is not one supported by the screen, a
BadMatch error results.
visual2 Specifies the second visual type supported on the screen.
If the visual type is not one supported by the screen, a
BadMatch error results.
DESCRIPTION
This function returns True if the two Visuals are Colormap
Equivalent, otherwise it returns False.
Colormap Equivalence is a minor relaxation of the X protocol
supported by the
Xsun(1) X server on Solaris 10 and earlier releases.
Two Visuals are Colormap Equivalent if it is possible to use a
Colormap created with one of the Visuals as the Colormap of a Window
in the other Visual. This is useful on a system that supports Visuals
that differ only in their OpenGL (GLX) Attributes.
For example, to avoid colormap flashing, when creating a window with
a Visual that is in the same depth as the RootWindow, use the Default
Colormap. In standard X, this is only possible if the Visual is the
DefaultVisual. With Colormap Equivalence the requirement is relaxed.
To use this function, an application should link with libXmu.
EXAMPLES
You may be able to avoid creating a new colormap by using the
following code:
if (!XSolarisCheckColormapEquivalence(dpy, screen, vi->visual, DefaultVisual(dpy, screen)) { attributes.colormap = XCreateColormap(dpy, root, vi->visual, AllocNone); valuemask = CWColormap; } window = XCreateWindow(dpy, root, 0, 0, 500, 500, 0, vi->depth, CopyFromParent, vi->visual, valuemask, &attributes);SEE ALSO
XCreateWindow(3X11),
glXGetConfig(3gl).
X Version 11 29 Aug 2011
XSolarisCheckColormapEquivalence(3Xmu)