diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-11-03 10:07:16 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-11-03 10:07:16 +0000 |
| commit | fa8cefef63feb1d559c40db3cf9407e5bd1ac4df (patch) | |
| tree | c5f4e1d4229fe39d1c13526a32a52d555ccf3494 /otk/screeninfo.hh | |
| parent | fcfb532d30f4f0cee5192376145867ec1eada8ad (diff) | |
add an OBDisplay class and the old ScreenInfo class to the toolkit.
wrap the toolkit in the 'otk' namespace
it compiles. broke the timer cache tho.
Diffstat (limited to 'otk/screeninfo.hh')
| -rw-r--r-- | otk/screeninfo.hh | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/otk/screeninfo.hh b/otk/screeninfo.hh new file mode 100644 index 00000000..5cb2f798 --- /dev/null +++ b/otk/screeninfo.hh @@ -0,0 +1,52 @@ +// -*- mode: C++; indent-tabs-mode: nil; -*- +#ifndef __screeninfo_hh +#define __screeninfo_hh + +#include "util.hh" + +extern "C" { +#include <X11/Xlib.h> +} + +#include <string> + +namespace otk { + +class ScreenInfo { +private: + Visual *visual; + Window root_window; + Colormap colormap; + + int depth; + unsigned int screen_number; + std::string display_string; + Rect rect; +#ifdef XINERAMA + RectList xinerama_areas; + bool xinerama_active; +#endif + +public: + ScreenInfo(unsigned int num); + + inline Visual *getVisual(void) const { return visual; } + inline Window getRootWindow(void) const { return root_window; } + inline Colormap getColormap(void) const { return colormap; } + inline int getDepth(void) const { return depth; } + inline unsigned int getScreenNumber(void) const + { return screen_number; } + inline const Rect& getRect(void) const { return rect; } + inline unsigned int getWidth(void) const { return rect.width(); } + inline unsigned int getHeight(void) const { return rect.height(); } + inline const std::string& displayString(void) const + { return display_string; } +#ifdef XINERAMA + inline const RectList &getXineramaAreas(void) const { return xinerama_areas; } + inline bool isXineramaActive(void) const { return xinerama_active; } +#endif +}; + +} + +#endif // __screeninfo_hh |
