diff options
author | fluxgen <fluxgen> | 2002-02-17 18:47:45 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-02-17 18:47:45 (GMT) |
commit | b8c9d50d7dc51097d6c100f6b8cffd371b7be33e (patch) | |
tree | 3379e8d02c79f5b31b830f73e6ac10e1f423ab41 /src | |
parent | f6749fb6cd6519eb8800c046db0dfdebeac84404 (diff) | |
download | fluxbox_pavel-b8c9d50d7dc51097d6c100f6b8cffd371b7be33e.zip fluxbox_pavel-b8c9d50d7dc51097d6c100f6b8cffd371b7be33e.tar.bz2 |
include guard, gnome functions and some net wm function prototypes
Diffstat (limited to 'src')
-rw-r--r-- | src/Window.hh | 99 |
1 files changed, 78 insertions, 21 deletions
diff --git a/src/Window.hh b/src/Window.hh index bbb736e..584d187 100644 --- a/src/Window.hh +++ b/src/Window.hh | |||
@@ -22,10 +22,10 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Window.hh,v 1.9 2002/02/16 11:26:22 fluxgen Exp $ | 25 | // $Id: Window.hh,v 1.10 2002/02/17 18:47:45 fluxgen Exp $ |
26 | 26 | ||
27 | #ifndef _WINDOW_HH_ | 27 | #ifndef WINDOW_HH |
28 | #define _WINDOW_HH_ | 28 | #define WINDOW_HH |
29 | 29 | ||
30 | #include <X11/Xlib.h> | 30 | #include <X11/Xlib.h> |
31 | #include <X11/Xutil.h> | 31 | #include <X11/Xutil.h> |
@@ -34,23 +34,14 @@ | |||
34 | # include <X11/extensions/shape.h> | 34 | # include <X11/extensions/shape.h> |
35 | #endif // SHAPE | 35 | #endif // SHAPE |
36 | 36 | ||
37 | // forward declaration | ||
38 | class FluxboxWindow; | ||
39 | class Tab; | ||
40 | |||
41 | #include "fluxbox.hh" | ||
42 | |||
43 | #include <vector> | ||
44 | #include <string> | ||
45 | #ifndef _BASEDISPLAY_HH_ | ||
46 | #include "BaseDisplay.hh" | 37 | #include "BaseDisplay.hh" |
47 | #endif | ||
48 | #ifndef _TIMER_HH_ | ||
49 | #include "Timer.hh" | 38 | #include "Timer.hh" |
50 | #endif | ||
51 | #ifndef _WINDOWMENU_HH_ | ||
52 | #include "Windowmenu.hh" | 39 | #include "Windowmenu.hh" |
53 | #endif | 40 | |
41 | #include <vector> | ||
42 | #include <string> | ||
43 | |||
44 | |||
54 | 45 | ||
55 | #define MwmHintsFunctions (1l << 0) | 46 | #define MwmHintsFunctions (1l << 0) |
56 | #define MwmHintsDecorations (1l << 1) | 47 | #define MwmHintsDecorations (1l << 1) |
@@ -81,11 +72,52 @@ class Tab; | |||
81 | 72 | ||
82 | 73 | ||
83 | #define PropMwmHintsElements 3 | 74 | #define PropMwmHintsElements 3 |
75 | class Tab; | ||
84 | 76 | ||
85 | class FluxboxWindow : public TimeoutHandler { | 77 | class FluxboxWindow : public TimeoutHandler { |
86 | public: | 78 | public: |
87 | enum Error{NOERROR=0, XGETWINDOWATTRIB, CANTFINDSCREEN}; | 79 | enum Error{NOERROR=0, XGETWINDOWATTRIB, CANTFINDSCREEN}; |
88 | FluxboxWindow(Window, BScreen * = (BScreen *) 0); | 80 | #ifdef GNOME |
81 | enum GnomeLayer { | ||
82 | WIN_LAYER_DESKTOP = 0, | ||
83 | WIN_LAYER_BELOW = 2, | ||
84 | WIN_LAYER_NORMAL = 4, | ||
85 | WIN_LAYER_ONTOP = 6, | ||
86 | WIN_LAYER_DOCK = 8, | ||
87 | WIN_LAYER_ABOVE_DOCK = 10, | ||
88 | WIN_LAYER_MENU = 12 | ||
89 | }; | ||
90 | |||
91 | enum GnomeState { | ||
92 | WIN_STATE_STICKY = (1<<0), // everyone knows sticky | ||
93 | WIN_STATE_MINIMIZED = (1<<1), // Reserved - definition is unclear | ||
94 | WIN_STATE_MAXIMIZED_VERT = (1<<2), // window in maximized V state | ||
95 | WIN_STATE_MAXIMIZED_HORIZ = (1<<3), // window in maximized H state | ||
96 | WIN_STATE_HIDDEN = (1<<4), // not on taskbar but window visible | ||
97 | WIN_STATE_SHADED = (1<<5), // shaded (MacOS / Afterstep style) | ||
98 | WIN_STATE_HID_WORKSPACE = (1<<6), // not on current desktop | ||
99 | WIN_STATE_HID_TRANSIENT = (1<<7), // owner of transient is hidden | ||
100 | WIN_STATE_FIXED_POSITION = (1<<8), // window is fixed in position even | ||
101 | WIN_STATE_ARRANGE_IGNORE = (1<<9) // ignore for auto arranging | ||
102 | }; | ||
103 | |||
104 | enum GnomeHints { | ||
105 | WIN_HINTS_SKIP_FOCUS = (1<<0), // "alt-tab" skips this win | ||
106 | WIN_HINTS_SKIP_WINLIST = (1<<1), // do not show in window list | ||
107 | WIN_HINTS_SKIP_TASKBAR = (1<<2), // do not show on taskbar | ||
108 | WIN_HINTS_GROUP_TRANSIENT = (1<<3), //Reserved - definition is unclear | ||
109 | WIN_HINTS_FOCUS_ON_CLICK = (1<<4) // app only accepts focus if clicked | ||
110 | }; | ||
111 | #endif | ||
112 | |||
113 | enum WinLayer { | ||
114 | LAYER_BOTTOM = 0x01, | ||
115 | LAYER_BELOW = 0x02, | ||
116 | LAYER_NORMAL = 0x04, | ||
117 | LAYER_TOP = 0x08 | ||
118 | }; | ||
119 | |||
120 | FluxboxWindow(Window, BScreen * = 0); | ||
89 | virtual ~FluxboxWindow(void); | 121 | virtual ~FluxboxWindow(void); |
90 | 122 | ||
91 | inline const bool isTransient(void) const | 123 | inline const bool isTransient(void) const |
@@ -178,7 +210,10 @@ public: | |||
178 | typedef struct MwmHints { | 210 | typedef struct MwmHints { |
179 | unsigned long flags, functions, decorations; | 211 | unsigned long flags, functions, decorations; |
180 | } MwmHints; | 212 | } MwmHints; |
181 | 213 | #ifdef GNOME | |
214 | void setGnomeState(int state); | ||
215 | inline int getGnomeHints() const { return gnome_hints; } | ||
216 | #endif | ||
182 | private: | 217 | private: |
183 | BImageControl *image_ctrl; | 218 | BImageControl *image_ctrl; |
184 | 219 | ||
@@ -210,6 +245,7 @@ private: | |||
210 | 245 | ||
211 | MwmHints *mwm_hint; | 246 | MwmHints *mwm_hint; |
212 | BaseDisplay::BlackboxHints *blackbox_hint; | 247 | BaseDisplay::BlackboxHints *blackbox_hint; |
248 | |||
213 | } client; | 249 | } client; |
214 | 250 | ||
215 | struct _decorations { | 251 | struct _decorations { |
@@ -264,10 +300,31 @@ private: | |||
264 | void grabButtons(); | 300 | void grabButtons(); |
265 | 301 | ||
266 | void createButton(int type, ButtonEventProc, ButtonEventProc, ButtonDrawProc); | 302 | void createButton(int type, ButtonEventProc, ButtonEventProc, ButtonDrawProc); |
303 | |||
267 | #ifdef GNOME | 304 | #ifdef GNOME |
305 | |||
268 | void updateGnomeAtoms(); | 306 | void updateGnomeAtoms(); |
269 | long getGnomeWindowState(); | 307 | void updateGnomeStateAtom(); |
270 | #endif | 308 | void updateGnomeHintsAtom(); |
309 | void updateGnomeLayerAtom(); | ||
310 | void updateGnomeWorkspaceAtom(); | ||
311 | |||
312 | int getGnomeWindowState(); | ||
313 | bool handleGnomePropertyNotify(Atom atom); | ||
314 | int getGnomeLayer(); | ||
315 | void loadGnomeAtoms(); | ||
316 | void loadGnomeStateAtom(); | ||
317 | void loadGnomeHintsAtom(); | ||
318 | int gnome_hints; | ||
319 | #endif //GNOME | ||
320 | |||
321 | #ifdef NEWWMSPEC | ||
322 | |||
323 | void updateNETWMAtoms(); | ||
324 | void handleNETWMProperyNotify(Atom atom); | ||
325 | int getNETWMWindowState(); | ||
326 | |||
327 | #endif //NEWWMSPEC | ||
271 | 328 | ||
272 | Window findTitleButton(int type); | 329 | Window findTitleButton(int type); |
273 | protected: | 330 | protected: |