Logo ROOT   6.14/05
Reference Guide
X11Atoms.mm
Go to the documentation of this file.
1 #include "X11Atoms.h"
2 
3 namespace ROOT {
4 namespace MacOSX {
5 namespace X11 {
6 
7 //Predefined atoms.
8 const char *predefinedAtoms[] =
9 {
10  "XA_PRIMARY",
11  "XA_SECONDARY",
12  "XA_ARC",
13  "XA_ATOM",
14  "XA_BITMAP",
15  "XA_CARDINAL",
16  "XA_COLORMAP",
17  "XA_CURSOR",
18  "XA_CUT_BUFFER0",
19  "XA_CUT_BUFFER1",
20  "XA_CUT_BUFFER2",
21  "XA_CUT_BUFFER3",
22  "XA_CUT_BUFFER4",
23  "XA_CUT_BUFFER5",
24  "XA_CUT_BUFFER6",
25  "XA_CUT_BUFFER7",
26  "XA_DRAWABLE",
27  "XA_FONT",
28  "XA_INTEGER",
29  "XA_PIXMAP",
30  "XA_POINT",
31  "XA_RECTANGLE",
32  "XA_RESOURCE_MANAGER",
33  "XA_RGB_COLOR_MAP",
34  "XA_RGB_BEST_MAP",
35  "XA_RGB_BLUE_MAP",
36  "XA_RGB_DEFAULT_MAP",
37  "XA_RGB_GRAY_MAP",
38  "XA_RGB_GREEN_MAP",
39  "XA_RGB_RED_MAP",
40  "XA_STRING",
41  "XA_VISUALID",
42  "XA_WINDOW",
43  "XA_WM_COMMAND",
44  "XA_WM_HINTS",
45  "XA_WM_CLIENT_MACHINE",
46  "XA_WM_ICON_NAME",
47  "XA_WM_ICON_SIZE",
48  "XA_WM_NAME",
49  "XA_WM_NORMAL_HINTS",
50  "XA_WM_SIZE_HINTS",
51  "XA_WM_ZOOM_HINTS",
52  "XA_MIN_SPACE",
53  "XA_NORM_SPACE",
54  "XA_MAX_SPACE",
55  "XA_END_SPACE",
56  "XA_SUPERSCRIPT_X",
57  "XA_SUPERSCRIPT_Y",
58  "XA_SUBSCRIPT_X",
59  "XA_SUBSCRIPT_Y",
60  "XA_UNDERLINE_POSITION",
61  "XA_UNDERLINE_THICKNESS",
62  "XA_STRIKEOUT_ASCENT",
63  "XA_STRIKEOUT_DESCENT",
64  "XA_ITALIC_ANGLE",
65  "XA_X_HEIGHT",
66  "XA_QUAD_WIDTH",
67  "XA_WEIGHT",
68  "XA_POINT_SIZE",
69  "XA_RESOLUTION",
70  "XA_COPYRIGHT",
71  "XA_NOTICE",
72  "XA_FONT_NAME",
73  "XA_FAMILY_NAME",
74  "XA_FULL_NAME",
75  "XA_CAP_HEIGHT",
76  "XA_WM_CLASS",
77  "XA_WM_TRANSIENT_FOR"
78 };
79 
80 const unsigned nPredefined = sizeof predefinedAtoms / sizeof predefinedAtoms[0];
81 
82 //______________________________________________________________________________
83 void InitWithPredefinedAtoms(name_to_atom_map &nameToAtom, std::vector<std::string> &atomNames)
84 {
85  nameToAtom.clear();
86 
87  for (unsigned i = 0; i < nPredefined; ++i)
88  nameToAtom[predefinedAtoms[i]] = i + 1;
89 
90  atomNames.assign(predefinedAtoms, predefinedAtoms + nPredefined);
91 }
92 
93 }//X11
94 }//MacOSX
95 }//ROOT
const unsigned nPredefined
Definition: X11Atoms.mm:80
void InitWithPredefinedAtoms(name_to_atom_map &nameToAtom, std::vector< std::string > &atomNames)
Definition: X11Atoms.mm:83
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
const char * predefinedAtoms[]
Definition: X11Atoms.mm:8
std::map< std::string, Atom_t > name_to_atom_map
Definition: X11Atoms.h:14