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