X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fsurface.hh;h=18733517aaefc52a10fdb493fea5a7081f41e87e;hb=5face4c6f35172761367f63ac0b6eaf62d84e532;hp=7289b14aaebac8bd7a1c13bc987b51f8dd298eed;hpb=2005c344bdb4b59611972bc37e194d2e14cdf911;p=chaz%2Fopenbox diff --git a/otk/surface.hh b/otk/surface.hh index 7289b14a..18733517 100644 --- a/otk/surface.hh +++ b/otk/surface.hh @@ -3,29 +3,48 @@ #define __surface_hh #include "point.hh" +#include "truerendercontrol.hh" extern "C" { #include +#define _XFT_NO_COMPAT_ // no Xft 1 API +#include } namespace otk { +class ScreenInfo; +class RenderColor; + class Surface { + int _screen; Point _size; - Pixmap _pm; + Pixmap _pixmap; + XftDraw *_xftdraw; protected: - Surface(); - Surface(const Point &size); - - virtual void setSize(int w, int h); + void createObjects(); + void destroyObjects(); + 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 _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; }; }