X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fsurface.hh;h=112bb39233f74ba30b50403b69239357e910c8f8;hb=6e2f3f9f8a2b4b83648c9c8b9993d321b3f60a79;hp=53738128a2d8b06328f43e48eea56d7cd50450a5;hpb=9b6e5f9cf49df78be25720f9c4b33a733b856c9b;p=chaz%2Fopenbox diff --git a/otk/surface.hh b/otk/surface.hh index 53738128..112bb392 100644 --- a/otk/surface.hh +++ b/otk/surface.hh @@ -4,6 +4,7 @@ #include "point.hh" #include "truerendercontrol.hh" +#include "pseudorendercontrol.hh" extern "C" { #include @@ -14,36 +15,38 @@ extern "C" { namespace otk { class ScreenInfo; +class RenderColor; class Surface { int _screen; Point _size; - XImage *_im; - Pixmap _pm; + Pixmap _pixmap; XftDraw *_xftdraw; +protected: void createObjects(); void destroyObjects(); - -protected: - Surface(int screen); - Surface(int screen, const Point &size); - - virtual void setSize(int w, int h); + void setPixmap(XImage *image); + void setPixmap(const RenderColor &color); + public: + Surface(int screen, const Point &size); virtual ~Surface(); inline int screen(void) const { return _screen; } + virtual const Point& size() const { return _size; } virtual int width() const { return _size.x(); } virtual int height() const { return _size.y(); } - virtual Pixmap pixmap() const { return _pm; } // TEMP + + virtual Pixmap pixmap() const { return _pixmap; } // The RenderControl classes use the internal objects in this class to render // to it. Noone else needs them tho, so they are private. friend class RenderControl; friend class TrueRenderControl; + friend class PseudoRenderControl; }; }