X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fimage.hh;h=da489323af7e7d1112511d9dbf70d965b0a0a89e;hb=5a139f7263e33b499836f5df9ac37400e02c32f9;hp=ac5794b5fb5298c84f3d7cb3aafb8a7d67651ebc;hpb=373de009f7e98b0c6f3a78f31c1e5c120cd722ed;p=chaz%2Fopenbox diff --git a/otk/image.hh b/otk/image.hh index ac5794b5..da489323 100644 --- a/otk/image.hh +++ b/otk/image.hh @@ -11,7 +11,7 @@ extern "C" { #include "color.hh" #include "screeninfo.hh" -#include "src/timer.hh" +#include "timer.hh" namespace otk { @@ -66,16 +66,19 @@ public: }; -class BImageControl : public ob::TimeoutHandler { +class BImageControl { public: +#ifndef SWIG struct CachedImage { Pixmap pixmap; unsigned int count, width, height; unsigned long pixel1, pixel2, texture; }; +#endif - BImageControl(const ScreenInfo *scrn, + BImageControl(otk::OBTimerQueueManager *timermanager, + const otk::ScreenInfo *scrn, bool _dither= False, int _cpc = 4, unsigned long cache_timeout = 300000l, unsigned long cmax = 200l); @@ -87,7 +90,7 @@ public: inline Window getDrawable(void) const { return window; } - inline Visual *getVisual(void) { return screeninfo->getVisual(); } + inline Visual *getVisual(void) { return screeninfo->visual(); } inline int getBitsPerPixel(void) const { return bits_per_pixel; } inline int getDepth(void) const { return screen_depth; } @@ -97,7 +100,7 @@ public: unsigned long getSqrt(unsigned int x); Pixmap renderImage(unsigned int width, unsigned int height, - const BTexture &texture); + const otk::BTexture &texture); void installRootColormap(void); void removeImage(Pixmap pixmap); @@ -111,12 +114,12 @@ public: void setDither(bool d) { dither = d; } void setColorsPerChannel(int cpc); - virtual void timeout(void); + static void timeout(BImageControl *t); private: bool dither; const ScreenInfo *screeninfo; - ob::OBTimer *timer; + OBTimer *timer; Colormap colormap;