X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FBaseDisplay.h;h=cf1a7ae6a44788ca3a4ef5f770785a13152089b9;hb=1b1efab489353734f0047f97fe5fef7f96d0ee68;hp=38f12ada8c6c9bd1352ce32b603f26a7857518cd;hpb=72af8cea6a0573f7d2c004102cd04f1a1ad88798;p=chaz%2Fopenbox diff --git a/src/BaseDisplay.h b/src/BaseDisplay.h index 38f12ada..cf1a7ae6 100644 --- a/src/BaseDisplay.h +++ b/src/BaseDisplay.h @@ -30,8 +30,11 @@ class BaseDisplay; class ScreenInfo; -#include "LinkedList.h" #include "Timer.h" +#include "Geometry.h" +#include "Util.h" +#include +#include #define AttribShaded (1l << 0) #define AttribMaxHoriz (1l << 1) @@ -126,8 +129,12 @@ private: Bool _startup, _shutdown; Display *display; - LinkedList *screenInfoList; - LinkedList *timerList; + + typedef std::vector ScreenInfoList; + ScreenInfoList screenInfoList; + + typedef std::list TimerList; + TimerList timerList; char *display_name, *application_name; int number_of_screens, server_grabs, colors_per_channel; @@ -142,7 +149,7 @@ protected: public: - BaseDisplay(char *, char * = 0); + BaseDisplay(const char *, char * = 0); virtual ~BaseDisplay(void); inline const Atom &getWMChangeStateAtom(void) const @@ -269,8 +276,10 @@ public: #endif // NEWWMSPEC - inline ScreenInfo *getScreenInfo(int s) - { return (ScreenInfo *) screenInfoList->find(s); } + inline ScreenInfo *getScreenInfo(unsigned int s) { + ASSERT(s < screenInfoList.size()); + return screenInfoList[s]; + } inline const Bool &hasShapeExtensions(void) const { return shape.extensions; } @@ -334,7 +343,7 @@ private: Colormap colormap; int depth, screen_number; - unsigned int width, height; + Size m_size; public: @@ -349,8 +358,9 @@ public: inline const int &getDepth(void) const { return depth; } inline const int &getScreenNumber(void) const { return screen_number; } - inline const unsigned int &getWidth(void) const { return width; } - inline const unsigned int &getHeight(void) const { return height; } +// inline const unsigned int &getWidth(void) const { return width; } +// inline const unsigned int &getHeight(void) const { return height; } + inline const Size &size() const { return m_size; } };