diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-12-02 22:12:26 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-12-02 22:12:26 +0000 |
| commit | dca0c9f5a308e115ec308cdc8ca7987ff4fc0479 (patch) | |
| tree | 7c757e37e0e053fbbf9f9c26c0f9b3ef6b5964ff /src/rootwindow.hh | |
| parent | 74cb09bb2cc4832463a57743b1495eef24237d2a (diff) | |
add an OBRootWindow class that watches events/properties on root windows
Diffstat (limited to 'src/rootwindow.hh')
| -rw-r--r-- | src/rootwindow.hh | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/rootwindow.hh b/src/rootwindow.hh new file mode 100644 index 00000000..7879244d --- /dev/null +++ b/src/rootwindow.hh @@ -0,0 +1,69 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- +#ifndef __rootwindow_hh +#define __rootwindow_hh + +/*! @file client.hh + @brief The OBClient class maintains the state of a client window by handling + property changes on the window and some client messages +*/ + +extern "C" { +#include <X11/Xlib.h> + +#ifdef SHAPE +#include <X11/extensions/shape.h> +#endif // SHAPE +} + +#include <string> +#include <vector> + +#include "otk/screeninfo.hh" +#include "otk/eventhandler.hh" +#include "otk/property.hh" + +namespace ob { + +//! Maintains the state of a root window's properties. +/*! + OBRootWindow maintains the state of a root window. The state consists of the + hints that the wm sets on the window, such as the number of desktops, + gravity. + <p> + OBRootWindow also manages client messages for the root window. +*/ +class OBRootWindow : public otk::OtkEventHandler { +private: + //! Information about this screen + const otk::ScreenInfo *_info; + + //! The names of all desktops + otk::OBProperty::StringVect _names; + + //! Get desktop names from the + void updateDesktopNames(); + +public: + //! Constructs a new OBRootWindow for a screen + /*! + @param screen The screen whose root window to wrap + */ + OBRootWindow(int screen); + //! Destroys the OBRootWindow object + virtual ~OBRootWindow(); + + virtual void propertyHandler(const XPropertyEvent &e); + + virtual void clientMessageHandler(const XClientMessageEvent &e); + + //! Sets the name of a desktop + /*! + @param i The index of the desktop to set the name for (base 0) + @param name The name to set for the desktop + */ + void setDesktopName(int i, const std::string &name); +}; + +} + +#endif // __client_hh |
