X Utilities to assist the X11 classes. More...
#include <X11Util.h>
Public Member Functions | |
| Bool | X11TestColormapAlloc (::XDisplay *display, XColormap colormap, Bool contig, uInt nColors) |
| returns true if nColors can be allocated on the colormap of the display using or not using a contiguous color method. | |
| uInt | X11QueryColorsAvailable (::XDisplay *display, XColormap colormap, Bool contig) |
| returns the number of colors presently available on the passed colormap, and display, possibly using contiguous mapping. | |
| const char * | X11DefaultDisplayName () |
| returns a default display name First, search for the DISPLAY environment Else it returns ":0" | |
| ::XDisplay * | X11DefaultDisplay () |
| returns an opened display on the default name as above | |
| Screen * | X11DefaultScreen () |
| returns a default screen opened on the default display | |
| Visual * | X11BestVisual (Screen *screen, uInt c_class) |
| function returns best visual in given class. | |
| uInt | X11DepthOfVisual (::XDisplay *display, Visual *visual) |
| returns depth of given visual. | |
| Visual * | X11VisualIdToVisual (::XDisplay *display, uInt visualId) |
| maps a visualId to a visual | |
| XVisualInfo | X11VisualInfoFromVisual (::XDisplay *display, Visual *visual) |
| gets XVisualInfo for the given Visual | |
| ostream & | operator<< (ostream &os, const XStandardColormap &mapInfo) |
| print info on a standard colormap | |
| ostream & | operator<< (ostream &os, Visual *visual) |
| print visual information | |
| ostream & | operator<< (ostream &os, Screen *screen) |
| print screen information | |
| Bool | X11InitializeStandardColormap (Screen *screen, Visual *visual, Atom property, XStandardColormap **mapInfo) |
| Initialize a Standard Colormap. | |
| Widget | X11TopLevelWidget (Widget w) |
| Return the widget that is the top-level widget of this widget. | |
| Widget | X11ContainingShell (Widget w) |
| Return the shell widget that contains this widget. | |
X Utilities to assist the X11 classes.
Public interface
nope
Name subject to change
Offload some complex functions to utility library, making it a bit easier to manage the X11 code.
Definition at line 76 of file X11Util.h.
| ostream& casa::X11Util_global_functions_X11_Utility_Functions::operator<< | ( | ostream & | os, | |
| Screen * | screen | |||
| ) |
print screen information
| ostream& casa::X11Util_global_functions_X11_Utility_Functions::operator<< | ( | ostream & | os, | |
| Visual * | visual | |||
| ) |
print visual information
| ostream& casa::X11Util_global_functions_X11_Utility_Functions::operator<< | ( | ostream & | os, | |
| const XStandardColormap & | mapInfo | |||
| ) |
print info on a standard colormap
| Visual* casa::X11Util_global_functions_X11_Utility_Functions::X11BestVisual | ( | Screen * | screen, | |
| uInt | c_class | |||
| ) |
function returns best visual in given class.
Best is determined by largest depth
| Widget casa::X11Util_global_functions_X11_Utility_Functions::X11ContainingShell | ( | Widget | w | ) |
Return the shell widget that contains this widget.
| ::XDisplay* casa::X11Util_global_functions_X11_Utility_Functions::X11DefaultDisplay | ( | ) |
returns an opened display on the default name as above
| const char* casa::X11Util_global_functions_X11_Utility_Functions::X11DefaultDisplayName | ( | ) |
returns a default display name First, search for the DISPLAY environment Else it returns ":0"
| Screen* casa::X11Util_global_functions_X11_Utility_Functions::X11DefaultScreen | ( | ) |
returns a default screen opened on the default display
| uInt casa::X11Util_global_functions_X11_Utility_Functions::X11DepthOfVisual | ( | ::XDisplay * | display, | |
| Visual * | visual | |||
| ) |
returns depth of given visual.
The safest way to get the right depth is to match it with XGetVisualInfo and return its depth
| Bool casa::X11Util_global_functions_X11_Utility_Functions::X11InitializeStandardColormap | ( | Screen * | screen, | |
| Visual * | visual, | |||
| Atom | property, | |||
| XStandardColormap ** | mapInfo | |||
| ) |
Initialize a Standard Colormap.
If the function succeeds, The passed mapInfo structure will be filled with information about the color cube.
| uInt casa::X11Util_global_functions_X11_Utility_Functions::X11QueryColorsAvailable | ( | ::XDisplay * | display, | |
| XColormap | colormap, | |||
| Bool | contig | |||
| ) |
returns the number of colors presently available on the passed colormap, and display, possibly using contiguous mapping.
| Bool casa::X11Util_global_functions_X11_Utility_Functions::X11TestColormapAlloc | ( | ::XDisplay * | display, | |
| XColormap | colormap, | |||
| Bool | contig, | |||
| uInt | nColors | |||
| ) |
returns true if nColors can be allocated on the colormap of the display using or not using a contiguous color method.
| Widget casa::X11Util_global_functions_X11_Utility_Functions::X11TopLevelWidget | ( | Widget | w | ) |
Return the widget that is the top-level widget of this widget.
| Visual* casa::X11Util_global_functions_X11_Utility_Functions::X11VisualIdToVisual | ( | ::XDisplay * | display, | |
| uInt | visualId | |||
| ) |
maps a visualId to a visual
| XVisualInfo casa::X11Util_global_functions_X11_Utility_Functions::X11VisualInfoFromVisual | ( | ::XDisplay * | display, | |
| Visual * | visual | |||
| ) |
gets XVisualInfo for the given Visual
1.6.1