diff options
author | fluxgen <fluxgen> | 2002-03-18 15:23:08 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-03-18 15:23:08 (GMT) |
commit | 1e761e6b71e5ebb530633fce2a4cb0293e453fce (patch) | |
tree | 0f0cdc2ce122c90acbd84c1e45fa5132366e43a5 /src/FbAtoms.hh | |
parent | 87f58f891c02cc1f692248f96c27b518691d5011 (diff) | |
download | fluxbox-1e761e6b71e5ebb530633fce2a4cb0293e453fce.zip fluxbox-1e761e6b71e5ebb530633fce2a4cb0293e453fce.tar.bz2 |
first
Diffstat (limited to 'src/FbAtoms.hh')
-rw-r--r-- | src/FbAtoms.hh | 173 |
1 files changed, 173 insertions, 0 deletions
diff --git a/src/FbAtoms.hh b/src/FbAtoms.hh new file mode 100644 index 0000000..a45376d --- /dev/null +++ b/src/FbAtoms.hh | |||
@@ -0,0 +1,173 @@ | |||
1 | // FbAtom.hh | ||
2 | // Copyright (c) 2002 Henrik Kinnunen (fluxgen@linuxmail.org) | ||
3 | // | ||
4 | // Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | // copy of this software and associated documentation files (the "Software"), | ||
6 | // to deal in the Software without restriction, including without limitation | ||
7 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | // and/or sell copies of the Software, and to permit persons to whom the | ||
9 | // Software is furnished to do so, subject to the following conditions: | ||
10 | // | ||
11 | // The above copyright notice and this permission notice shall be included in | ||
12 | // all copies or substantial portions of the Software. | ||
13 | // | ||
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
20 | // DEALINGS IN THE SOFTWARE. | ||
21 | |||
22 | // $Id: FbAtoms.hh,v 1.1 2002/03/18 15:23:08 fluxgen Exp $ | ||
23 | #include <X11/Xlib.h> | ||
24 | #include <X11/Xatom.h> | ||
25 | class FbAtoms | ||
26 | { | ||
27 | public: | ||
28 | explicit FbAtoms(Display *display); | ||
29 | virtual ~FbAtoms(); | ||
30 | void initAtoms(Display *display); | ||
31 | #ifdef GNOME | ||
32 | inline Atom &getGnomeProtAtom() { return gnome_wm_prot; } | ||
33 | inline Atom &getGnomeClientListAtom() { return gnome_wm_win_client_list; } | ||
34 | inline Atom &getGnomeSupportingWMCheckAtom() { return gnome_wm_supporting_wm_check; } | ||
35 | inline Atom &getGnomeWorkspaceAtom() { return gnome_wm_win_workspace; } | ||
36 | inline Atom &getGnomeWorkspaceCountAtom() { return gnome_wm_win_workspace_count; } | ||
37 | inline Atom &getGnomeWorkspaceNamesAtom() { return gnome_wm_win_workspace_names; } | ||
38 | inline Atom &getGnomeStateAtom() { return gnome_wm_win_state; } | ||
39 | inline Atom &getGnomeHintsAtom() { return gnome_wm_win_hints; } | ||
40 | inline Atom &getGnomeLayerAtom() { return gnome_wm_win_layer; } | ||
41 | #endif //GNOME | ||
42 | |||
43 | inline const Atom &getWMChangeStateAtom(void) const { return xa_wm_change_state; } | ||
44 | inline const Atom &getWMStateAtom(void) const { return xa_wm_state; } | ||
45 | inline const Atom &getWMDeleteAtom(void) const { return xa_wm_delete_window; } | ||
46 | inline const Atom &getWMProtocolsAtom(void) const { return xa_wm_protocols; } | ||
47 | inline const Atom &getWMTakeFocusAtom(void) const { return xa_wm_take_focus; } | ||
48 | inline const Atom &getWMColormapAtom(void) const { return xa_wm_colormap_windows; } | ||
49 | inline const Atom &getMotifWMHintsAtom(void) const { return motif_wm_hints; } | ||
50 | |||
51 | // this atom is for normal app->WM hints about decorations, stacking, | ||
52 | // starting workspace etc... | ||
53 | inline const Atom &getFluxboxHintsAtom(void) const { return blackbox_hints;} | ||
54 | |||
55 | // these atoms are for normal app->WM interaction beyond the scope of the | ||
56 | // ICCCM... | ||
57 | inline const Atom &getFluxboxAttributesAtom(void) const { return blackbox_attributes; } | ||
58 | inline const Atom &getFluxboxChangeAttributesAtom(void) const { return blackbox_change_attributes; } | ||
59 | |||
60 | // these atoms are for window->WM interaction, with more control and | ||
61 | // information on window "structure"... common examples are | ||
62 | // notifying apps when windows are raised/lowered... when the user changes | ||
63 | // workspaces... i.e. "pager talk" | ||
64 | inline const Atom &getFluxboxStructureMessagesAtom(void) const{ return blackbox_structure_messages; } | ||
65 | |||
66 | // *Notify* portions of the NETStructureMessages protocol | ||
67 | inline const Atom &getFluxboxNotifyStartupAtom(void) const { return blackbox_notify_startup; } | ||
68 | inline const Atom &getFluxboxNotifyWindowAddAtom(void) const { return blackbox_notify_window_add; } | ||
69 | inline const Atom &getFluxboxNotifyWindowDelAtom(void) const { return blackbox_notify_window_del; } | ||
70 | inline const Atom &getFluxboxNotifyWindowFocusAtom(void) const { return blackbox_notify_window_focus; } | ||
71 | inline const Atom &getFluxboxNotifyCurrentWorkspaceAtom(void) const { return blackbox_notify_current_workspace; } | ||
72 | inline const Atom &getFluxboxNotifyWorkspaceCountAtom(void) const { return blackbox_notify_workspace_count; } | ||
73 | inline const Atom &getFluxboxNotifyWindowRaiseAtom(void) const { return blackbox_notify_window_raise; } | ||
74 | inline const Atom &getFluxboxNotifyWindowLowerAtom(void) const { return blackbox_notify_window_lower; } | ||
75 | |||
76 | // atoms to change that request changes to the desktop environment during | ||
77 | // runtime... these messages can be sent by any client... as the sending | ||
78 | // client window id is not included in the ClientMessage event... | ||
79 | inline const Atom &getFluxboxChangeWorkspaceAtom(void) const { return blackbox_change_workspace; } | ||
80 | inline const Atom &getFluxboxChangeWindowFocusAtom(void) const { return blackbox_change_window_focus; } | ||
81 | inline const Atom &getFluxboxCycleWindowFocusAtom(void) const { return blackbox_cycle_window_focus; } | ||
82 | |||
83 | #ifdef NEWWMSPEC | ||
84 | |||
85 | // root window properties | ||
86 | inline const Atom &getNETSupportedAtom(void) const { return net_supported; } | ||
87 | inline const Atom &getNETClientListAtom(void) const { return net_client_list; } | ||
88 | inline const Atom &getNETClientListStackingAtom(void) const { return net_client_list_stacking; } | ||
89 | inline const Atom &getNETNumberOfDesktopsAtom(void) const { return net_number_of_desktops; } | ||
90 | inline const Atom &getNETDesktopGeometryAtom(void) const { return net_desktop_geometry; } | ||
91 | inline const Atom &getNETDesktopViewportAtom(void) const { return net_desktop_viewport; } | ||
92 | inline const Atom &getNETCurrentDesktopAtom(void) const { return net_current_desktop; } | ||
93 | inline const Atom &getNETDesktopNamesAtom(void) const { return net_desktop_names; } | ||
94 | inline const Atom &getNETActiveWindowAtom(void) const { return net_active_window; } | ||
95 | inline const Atom &getNETWorkareaAtom(void) const { return net_workarea; } | ||
96 | inline const Atom &getNETSupportingWMCheckAtom(void) const { return net_supporting_wm_check; } | ||
97 | inline const Atom &getNETVirtualRootsAtom(void) const { return net_virtual_roots; } | ||
98 | |||
99 | // root window messages | ||
100 | inline const Atom &getNETCloseWindowAtom(void) const { return net_close_window; } | ||
101 | inline const Atom &getNETWMMoveResizeAtom(void) const { return net_wm_moveresize; } | ||
102 | |||
103 | // application window properties | ||
104 | inline const Atom &getNETPropertiesAtom(void) const { return net_properties; } | ||
105 | inline const Atom &getNETWMNameAtom(void) const { return net_wm_name; } | ||
106 | inline const Atom &getNETWMDesktopAtom(void) const { return net_wm_desktop; } | ||
107 | inline const Atom &getNETWMWindowTypeAtom(void) const { return net_wm_window_type; } | ||
108 | inline const Atom &getNETWMStateAtom(void) const { return net_wm_state; } | ||
109 | inline const Atom &getNETWMStrutAtom(void) const { return net_wm_strut; } | ||
110 | inline const Atom &getNETWMIconGeometryAtom(void) const { return net_wm_icon_geometry; } | ||
111 | inline const Atom &getNETWMIconAtom(void) const { return net_wm_icon; } | ||
112 | inline const Atom &getNETWMPidAtom(void) const { return net_wm_pid; } | ||
113 | inline const Atom &getNETWMHandledIconsAtom(void) const { return net_wm_handled_icons; } | ||
114 | |||
115 | // application protocols | ||
116 | inline const Atom &getNETWMPingAtom(void) const { return net_wm_ping; } | ||
117 | |||
118 | #endif // NEWWMSPEC | ||
119 | |||
120 | private: | ||
121 | // NETAttributes | ||
122 | Atom blackbox_attributes, blackbox_change_attributes, blackbox_hints; | ||
123 | |||
124 | // NETStructureMessages | ||
125 | Atom blackbox_structure_messages, blackbox_notify_startup, | ||
126 | blackbox_notify_window_add, blackbox_notify_window_del, | ||
127 | blackbox_notify_window_focus, blackbox_notify_current_workspace, | ||
128 | blackbox_notify_workspace_count, blackbox_notify_window_raise, | ||
129 | blackbox_notify_window_lower; | ||
130 | |||
131 | // message_types for client -> wm messages | ||
132 | Atom blackbox_change_workspace, blackbox_change_window_focus, | ||
133 | blackbox_cycle_window_focus; | ||
134 | |||
135 | #ifdef NEWWMSPEC | ||
136 | |||
137 | // root window properties | ||
138 | Atom net_supported, net_client_list, net_client_list_stacking, | ||
139 | net_number_of_desktops, net_desktop_geometry, net_desktop_viewport, | ||
140 | net_current_desktop, net_desktop_names, net_active_window, net_workarea, | ||
141 | net_supporting_wm_check, net_virtual_roots; | ||
142 | |||
143 | // root window messages | ||
144 | Atom net_close_window, net_wm_moveresize; | ||
145 | |||
146 | // application window properties | ||
147 | Atom net_properties, net_wm_name, net_wm_desktop, net_wm_window_type, | ||
148 | net_wm_state, net_wm_strut, net_wm_icon_geometry, net_wm_icon, net_wm_pid, | ||
149 | net_wm_handled_icons; | ||
150 | |||
151 | |||
152 | // application protocols | ||
153 | Atom net_wm_ping; | ||
154 | |||
155 | #endif // NEWWMSPEC | ||
156 | |||
157 | #ifdef GNOME | ||
158 | // union { | ||
159 | Atom gnome_wm_win_layer, gnome_wm_win_state, gnome_wm_win_hints, | ||
160 | gnome_wm_win_app_state, gnome_wm_win_expanded_size, | ||
161 | gnome_wm_win_icons, gnome_wm_win_workspace, | ||
162 | gnome_wm_win_workspace_count, gnome_wm_win_workspace_names, | ||
163 | gnome_wm_win_client_list; | ||
164 | // Atom gnome_atom_list[10]; | ||
165 | // }; | ||
166 | Atom gnome_wm_prot; | ||
167 | Atom gnome_wm_supporting_wm_check; | ||
168 | #endif // GNOME | ||
169 | Atom xa_wm_colormap_windows, xa_wm_protocols, xa_wm_state, | ||
170 | xa_wm_delete_window, xa_wm_take_focus, xa_wm_change_state, | ||
171 | motif_wm_hints; | ||
172 | bool m_init; | ||
173 | }; | ||