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