casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
casa::X11Util_global_functions_X11_Utility_Functions Struct Reference

X Utilities to assist the X11 classes. More...

#include <X11Util.h>

Public Member Functions

Bool X11TestColormapAlloc (::XDisplay *display, XColormap colormap, casacore::Bool contig, casacore::uInt nColors)
 returns true if nColors can be allocated on the colormap of the display using or not using a contiguous color method. More...
 
uInt X11QueryColorsAvailable (::XDisplay *display, XColormap colormap, casacore::Bool contig)
 returns the number of colors presently available on the passed colormap, and display, possibly using contiguous mapping. More...
 
const char * X11DefaultDisplayName ()
 returns a default display name First, search for the DISPLAY environment Else it returns ":0" More...
 
::XDisplay * X11DefaultDisplay ()
 returns an opened display on the default name as above More...
 
Screen * X11DefaultScreen ()
 returns a default screen opened on the default display More...
 
Visual * X11BestVisual (Screen *screen, casacore::uInt c_class)
 function returns best visual in given class. More...
 
uInt X11DepthOfVisual (::XDisplay *display, Visual *visual)
 returns depth of given visual. More...
 
Visual * X11VisualIdToVisual (::XDisplay *display, casacore::uInt visualId)
 maps a visualId to a visual More...
 
XVisualInfo X11VisualInfoFromVisual (::XDisplay *display, Visual *visual)
 gets XVisualInfo for the given Visual More...
 
ostream & operator<< (ostream &os, const XStandardColormap &mapInfo)
 print info on a standard colormap More...
 
ostream & operator<< (ostream &os, Visual *visual)
 print visual information More...
 
ostream & operator<< (ostream &os, Screen *screen)
 print screen information More...
 
Bool X11InitializeStandardColormap (Screen *screen, Visual *visual, Atom property, XStandardColormap **mapInfo)
 Initialize a Standard Colormap. More...
 
Widget X11TopLevelWidget (Widget w)
 Return the widget that is the top-level widget of this widget. More...
 
Widget X11ContainingShell (Widget w)
 Return the shell widget that contains this widget. More...
 

Detailed Description

X Utilities to assist the X11 classes.

Intended use:

Public interface

nope

Prerequisite

Etymology

Name subject to change

Synopsis

Motivation

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.

Member Function Documentation

ostream& casa::X11Util_global_functions_X11_Utility_Functions::operator<< ( ostream &  os,
const XStandardColormap &  mapInfo 
)

print info on a standard colormap

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,
Screen *  screen 
)

print screen information

Visual* casa::X11Util_global_functions_X11_Utility_Functions::X11BestVisual ( Screen *  screen,
casacore::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,
casacore::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,
casacore::Bool  contig,
casacore::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,
casacore::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


The documentation for this struct was generated from the following file: