00001
00002 #ifndef __screeninfo_hh
00003 #define __screeninfo_hh
00004
00005 #include "rect.hh"
00006
00007 extern "C" {
00008 #include <X11/Xlib.h>
00009 }
00010
00011 #include <string>
00012
00013 namespace otk {
00014
00015 class ScreenInfo {
00016 private:
00017 Visual *_visual;
00018 Window _root_window;
00019 Colormap _colormap;
00020
00021 int _depth;
00022 unsigned int _screen;
00023 std::string _display_string;
00024 Rect _rect;
00025 #ifdef XINERAMA
00026 RectList _xinerama_areas;
00027 bool _xinerama_active;
00028 #endif
00029
00030 public:
00031 ScreenInfo(unsigned int num);
00032
00033 inline Visual *visual() const { return _visual; }
00034 inline Window rootWindow() const { return _root_window; }
00035 inline Colormap colormap() const { return _colormap; }
00036 inline int depth() const { return _depth; }
00037 inline unsigned int screen() const { return _screen; }
00038 inline const Rect& rect() const { return _rect; }
00039 inline unsigned int width() const { return _rect.width(); }
00040 inline unsigned int height() const { return _rect.height(); }
00041 inline const std::string& displayString() const { return _display_string; }
00042 #ifdef XINERAMA
00043 inline const RectList &xineramaAreas() const { return _xinerama_areas; }
00044 inline bool isXineramaActive() const { return _xinerama_active; }
00045 #endif
00046 };
00047
00048 }
00049
00050 #endif // __screeninfo_hh