X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fsurface.hh;h=7a202491f188392b5e0f5d7e354bf2ea6f6febb2;hb=c735d49979a995d59f1095d6048766f35e337497;hp=c21a65f30bf53795538391f5356a777edb081703;hpb=0ba441fe8f379ec506000f7fa29f867cb6bc0d51;p=chaz%2Fopenbox diff --git a/otk/surface.hh b/otk/surface.hh index c21a65f3..7a202491 100644 --- a/otk/surface.hh +++ b/otk/surface.hh @@ -2,8 +2,9 @@ #ifndef __surface_hh #define __surface_hh -#include "point.hh" +#include "size.hh" #include "truerendercontrol.hh" +#include "pseudorendercontrol.hh" extern "C" { #include @@ -14,35 +15,36 @@ extern "C" { namespace otk { class ScreenInfo; +class RenderColor; class Surface { int _screen; - Point _size; - Pixmap _pm; + Size _size; + 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 Size &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 const Size& size() const { return _size; } + + 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; }; }