merge the C branch into HEAD
[mikachu/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   int _screen;
20   std::string _display_string;
21   Size _size;
22   std::vector<Rect> _xinerama_areas;
23   bool _xinerama_active;
24
25 public:
26   ScreenInfo(int num);
27
28   inline Visual *visual() const { return _visual; }
29   inline Window rootWindow() const { return _root_window; }
30   inline Colormap colormap() const { return _colormap; }
31   inline int depth() const { return _depth; }
32   inline int screen() const { return _screen; }
33   inline const Size& size() const { return _size; }
34   inline const std::string& displayString() const { return _display_string; }
35   inline const std::vector<Rect> &xineramaAreas() const
36     { return _xinerama_areas; }
37   inline bool isXineramaActive() const { return _xinerama_active; }
38 };
39
40 }
41
42 #endif // __screeninfo_hh