X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fscreeninfo.hh;h=93e835facb1cb601bccf728a1fbfb890f7466056;hb=e9a7fc91bc4485a7fc3f9542dbba86b8d3823c7d;hp=3bb5605f3b64c2e6745a44af05315ee66aeebbc6;hpb=37e56007680a6664967e0e71ac52981654def6a6;p=chaz%2Fopenbox diff --git a/otk/screeninfo.hh b/otk/screeninfo.hh index 3bb5605f..93e835fa 100644 --- a/otk/screeninfo.hh +++ b/otk/screeninfo.hh @@ -1,7 +1,8 @@ -// -*- mode: C++; indent-tabs-mode: nil; -*- +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- #ifndef __screeninfo_hh #define __screeninfo_hh +#include "size.hh" #include "rect.hh" extern "C" { @@ -9,42 +10,31 @@ extern "C" { } #include +#include 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 + int _screen; + std::string _display_string; + Size _size; + std::vector _xinerama_areas; + bool _xinerama_active; 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 + ScreenInfo(int num); + + inline Visual *visual() const { return _visual; } + inline Window rootWindow() const { return _root_window; } + inline Colormap colormap() const { return _colormap; } + inline int depth() const { return _depth; } + inline int screen() const { return _screen; } + inline const Size& size() const { return _size; } + inline const std::string& displayString() const { return _display_string; } + inline const std::vector &xineramaAreas() const + { return _xinerama_areas; } + inline bool isXineramaActive() const { return _xinerama_active; } }; }