X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fsurface.hh;h=18733517aaefc52a10fdb493fea5a7081f41e87e;hb=96a949ec1f2be9da216e4d228992d1ce6855a6d4;hp=b027f7961f24346ce0d7933f3e1564af73d8466c;hpb=e3eeac5b6eee29009f3417f309a261d43fd39d27;p=chaz%2Fopenbox diff --git a/otk/surface.hh b/otk/surface.hh index b027f796..18733517 100644 --- a/otk/surface.hh +++ b/otk/surface.hh @@ -7,28 +7,43 @@ 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 _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; };