]> Dogcows Code - chaz/openbox/blobdiff - otk/surface.hh
use otk objects in the ob scripts by importing otk
[chaz/openbox] / otk / surface.hh
index 0c64c6f5b3eed1ab8f2229ca4f1f8807a5f1e1e4..18733517aaefc52a10fdb493fea5a7081f41e87e 100644 (file)
@@ -7,27 +7,43 @@
 
 extern "C" {
 #include <X11/Xlib.h>
+#define _XFT_NO_COMPAT_ // no Xft 1 API
+#include <X11/Xft/Xft.h>
 }
 
 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;
 };
 
This page took 0.023312 seconds and 4 git commands to generate.