X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fsurface.hh;h=7a202491f188392b5e0f5d7e354bf2ea6f6febb2;hb=1e46a39dc305fe92b0c0eca1e60e76fded3e5214;hp=0c64c6f5b3eed1ab8f2229ca4f1f8807a5f1e1e4;hpb=9f705c02b9c412c053fc12a2ebdc5cebe83400c8;p=chaz%2Fopenbox diff --git a/otk/surface.hh b/otk/surface.hh index 0c64c6f5..7a202491 100644 --- a/otk/surface.hh +++ b/otk/surface.hh @@ -2,33 +2,49 @@ #ifndef __surface_hh #define __surface_hh -#include "point.hh" +#include "size.hh" #include "truerendercontrol.hh" +#include "pseudorendercontrol.hh" extern "C" { #include +#define _XFT_NO_COMPAT_ // no Xft 1 API +#include } namespace otk { +class ScreenInfo; +class RenderColor; + class Surface { - Point _size; - Pixmap _pm; + int _screen; + Size _size; + 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 Size &size); virtual ~Surface(); - virtual const Point& size() const { return _size; } - virtual int width() const { return _size.x(); } - virtual int height() const { return _size.y(); } + inline int screen(void) const { return _screen; } + + 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; }; }