]> icculus.org git repositories - dana/openbox.git/blob - otk/screeninfo.hh
signed ints instead of unsigned ints again. less pain. pain bad.
[dana/openbox.git] / otk / screeninfo.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef   __screeninfo_hh
3 #define   __screeninfo_hh
4
5 #include "size.hh"
6 #include "rect.hh"
7
8 extern "C" {
9 #include <X11/Xlib.h>
10 }
11
12 #include <string>
13 #include <vector>
14
15 namespace otk {
16
17 class ScreenInfo {
18 private:
19   Visual *_visual;
20   Window _root_window;
21   Colormap _colormap;
22
23   int _depth;
24   int _screen;
25   std::string _display_string;
26   Size _size;
27 #ifdef XINERAMA
28   std::vector<Rect> _xinerama_areas;
29   bool _xinerama_active;
30 #endif
31
32 public:
33   ScreenInfo(int num);
34
35   inline Visual *visual() const { return _visual; }
36   inline Window rootWindow() const { return _root_window; }
37   inline Colormap colormap() const { return _colormap; }
38   inline int depth() const { return _depth; }
39   inline int screen() const { return _screen; }
40   inline const Size& size() const { return _size; }
41   inline const std::string& displayString() const { return _display_string; }
42 #ifdef XINERAMA
43   inline const std::vector<Rect> &xineramaAreas() const
44     { return _xinerama_areas; }
45   inline bool isXineramaActive() const { return _xinerama_active; }
46 #endif
47 };
48
49 }
50
51 #endif // __screeninfo_hh