]> Dogcows Code - chaz/openbox/blobdiff - otk/surface.hh
highlight the popup
[chaz/openbox] / otk / surface.hh
index b027f7961f24346ce0d7933f3e1564af73d8466c..7a202491f188392b5e0f5d7e354bf2ea6f6febb2 100644 (file)
@@ -2,34 +2,49 @@
 #ifndef __surface_hh
 #define __surface_hh
 
-#include "point.hh"
+#include "size.hh"
 #include "truerendercontrol.hh"
+#include "pseudorendercontrol.hh"
 
 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 {
-  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(); }
-  virtual Pixmap pixmap() const { return _pm; } // TEMP
+  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;
 };
 
 }
This page took 0.023768 seconds and 4 git commands to generate.