]> Dogcows Code - chaz/openbox/blob - otk/screeninfo.hh
manage and unmanage windows in OBScreen
[chaz/openbox] / otk / screeninfo.hh
1 // -*- mode: C++; indent-tabs-mode: nil; -*-
2 #ifndef __screeninfo_hh
3 #define __screeninfo_hh
4
5 #include "rect.hh"
6
7 extern "C" {
8 #include <X11/Xlib.h>
9 }
10
11 #include <string>
12
13 namespace otk {
14
15 class ScreenInfo {
16 private:
17 Visual *visual;
18 Window root_window;
19 Colormap colormap;
20
21 int depth;
22 unsigned int screen_number;
23 std::string display_string;
24 Rect rect;
25 #ifdef XINERAMA
26 RectList xinerama_areas;
27 bool xinerama_active;
28 #endif
29
30 public:
31 ScreenInfo(unsigned int num);
32
33 inline Visual *getVisual(void) const { return visual; }
34 inline Window getRootWindow(void) const { return root_window; }
35 inline Colormap getColormap(void) const { return colormap; }
36 inline int getDepth(void) const { return depth; }
37 inline unsigned int getScreenNumber(void) const
38 { return screen_number; }
39 inline const Rect& getRect(void) const { return rect; }
40 inline unsigned int getWidth(void) const { return rect.width(); }
41 inline unsigned int getHeight(void) const { return rect.height(); }
42 inline const std::string& displayString(void) const
43 { return display_string; }
44 #ifdef XINERAMA
45 inline const RectList &getXineramaAreas(void) const { return xinerama_areas; }
46 inline bool isXineramaActive(void) const { return xinerama_active; }
47 #endif
48 };
49
50 }
51
52 #endif // __screeninfo_hh
This page took 0.036883 seconds and 4 git commands to generate.