]> Dogcows Code - chaz/openbox/blob - src/rootwindow.hh
moving a window is possible once again
[chaz/openbox] / src / rootwindow.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __rootwindow_hh
3 #define __rootwindow_hh
4
5 /*! @file rootwindow.hh
6 @brief The OBClient class maintains the state of a client window by handling
7 property changes on the window and some client messages
8 */
9
10 extern "C" {
11 #include <X11/Xlib.h>
12
13 #ifdef SHAPE
14 #include <X11/extensions/shape.h>
15 #endif // SHAPE
16 }
17
18 #include <string>
19 #include <vector>
20
21 #include "widget.hh"
22 #include "otk/screeninfo.hh"
23 #include "otk/eventhandler.hh"
24 #include "otk/property.hh"
25
26 namespace ob {
27
28 //! Maintains the state of a root window's properties.
29 /*!
30 OBRootWindow maintains the state of a root window. The state consists of the
31 hints that the wm sets on the window, such as the number of desktops,
32 gravity.
33 <p>
34 OBRootWindow also manages client messages for the root window.
35 */
36 class OBRootWindow : public otk::OtkEventHandler, public OBWidget {
37 private:
38 //! Information about this screen
39 const otk::ScreenInfo *_info;
40
41 //! The names of all desktops
42 otk::OBProperty::StringVect _names;
43
44 //! Get desktop names from the
45 void updateDesktopNames();
46
47 public:
48 //! Constructs a new OBRootWindow for a screen
49 /*!
50 @param screen The screen whose root window to wrap
51 */
52 OBRootWindow(int screen);
53 //! Destroys the OBRootWindow object
54 virtual ~OBRootWindow();
55
56 //! Sets the name of a desktop
57 /*!
58 @param i The index of the desktop to set the name for (base 0)
59 @param name The name to set for the desktop
60 */
61 void setDesktopName(int i, const std::string &name);
62
63 virtual void propertyHandler(const XPropertyEvent &e);
64 virtual void clientMessageHandler(const XClientMessageEvent &e);
65 virtual void mapRequestHandler(const XMapRequestEvent &);
66 };
67
68 }
69
70 #endif // __client_hh
This page took 0.034674 seconds and 4 git commands to generate.