X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fimage.hh;h=ed99e12492b896f776a1f273a4903c6c25dca0c3;hb=cb71b2fb09a3dcecf57be801c6b5ecb683abb764;hp=85ad287d19930dd1538b7c2160fc526e8c08f571;hpb=85c41a1aec90b8daefc425596ea34b6f9d0e643c;p=chaz%2Fopenbox diff --git a/otk/image.hh b/otk/image.hh index 85ad287d..ed99e124 100644 --- a/otk/image.hh +++ b/otk/image.hh @@ -9,12 +9,15 @@ extern "C" { #include -#include "timer.hh" -#include "basedisplay.hh" #include "color.hh" +#include "screeninfo.hh" +#include "timer.hh" + +namespace otk { class BImageControl; class BTexture; +class ScreenInfo; class BImage { private: @@ -63,7 +66,7 @@ public: }; -class BImageControl : public TimeoutHandler { +class BImageControl { public: struct CachedImage { Pixmap pixmap; @@ -72,17 +75,16 @@ public: unsigned long pixel1, pixel2, texture; }; - BImageControl(BaseDisplay *dpy, const ScreenInfo *scrn, + BImageControl(OBTimerQueueManager *timermanager, + const ScreenInfo *scrn, bool _dither= False, int _cpc = 4, unsigned long cache_timeout = 300000l, unsigned long cmax = 200l); virtual ~BImageControl(void); - inline BaseDisplay *getBaseDisplay(void) const { return basedisplay; } - inline bool doDither(void) { return dither; } - inline const ScreenInfo *getScreenInfo(void) { return screeninfo; } + inline const ScreenInfo* getScreenInfo() const { return screeninfo; } inline Window getDrawable(void) const { return window; } @@ -110,13 +112,12 @@ public: void setDither(bool d) { dither = d; } void setColorsPerChannel(int cpc); - virtual void timeout(void); + static void timeout(BImageControl *t); private: bool dither; - BaseDisplay *basedisplay; const ScreenInfo *screeninfo; - BTimer *timer; + OBTimer *timer; Colormap colormap; @@ -139,6 +140,7 @@ private: const BColor &c1, const BColor &c2); }; +} #endif // __Image_hh