]> Dogcows Code - chaz/openbox/commitdiff
starting to make render's interface
authorDana Jansens <danakj@orodu.net>
Sat, 18 Jan 2003 04:31:16 +0000 (04:31 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 18 Jan 2003 04:31:16 +0000 (04:31 +0000)
otk/rendercontrol.cc
otk/rendercontrol.hh
otk/rendertest.cc
otk/rendertexture.hh [new file with mode: 0644]
otk/truerendercontrol.cc
otk/truerendercontrol.hh

index 1dd5704df54a14b8797e446dd7c4ec84ca4be7a9..479de3d91c09c4bffd697cd5a9522d2b97420651 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "rendercontrol.hh"
 #include "truerendercontrol.hh"
+#include "rendertexture.hh"
 #include "display.hh"
 #include "screeninfo.hh"
 
index 14c0e92c97afb0d165400e4632da4c38725917a9..c619597fcd250b0141a80c6f9683d37af6221043 100644 (file)
@@ -11,6 +11,7 @@ namespace otk {
 
 class ScreenInfo;
 class Surface;
+class RenderTexture;
 
 class RenderControl {
 protected:
@@ -66,7 +67,8 @@ public:
 
   static RenderControl *getRenderControl(int screen);
 
-  virtual void render(Surface *sf) = 0;
+  virtual void drawBackground(Surface *sf,
+                             const RenderTexture &texture) const = 0;
 };
 
 }
index 2cf63f371f8a619b25a2fe3ca11e9471954d607e..b485d357add99e39e00fe4515094680802123f5f 100644 (file)
@@ -1,5 +1,6 @@
 #include "otk.hh"
 #include "rendercontrol.hh"
+#include "rendertexture.hh"
 
 #include <stdio.h>
 #include <X11/Xlib.h>
@@ -15,7 +16,9 @@ int main(int argc, char **argv)
   
   otk::RenderControl *rc = otk::RenderControl::getRenderControl(0);
 
-  rc->render(&foo);
+  otk::RenderTexture tex;
+  
+  rc->drawBackground(&foo, tex);
   XSetWindowBackgroundPixmap(**otk::display, foo.window(), foo.pixmap());
   XClearWindow(**otk::display, foo.window());
   
diff --git a/otk/rendertexture.hh b/otk/rendertexture.hh
new file mode 100644 (file)
index 0000000..68f935d
--- /dev/null
@@ -0,0 +1,12 @@
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
+#ifndef __rendertexture_hh
+#define __rendertexture_hh
+
+namespace otk {
+
+class RenderTexture {
+};
+
+}
+
+#endif // __rendertexture_hh
index 95a0a41650ca56e4d0bda2dd12f098e948d9d718..e23b2ef60380f6d1f484021614e940aac5f959f7 100644 (file)
@@ -102,7 +102,8 @@ static inline void renderPixel(XImage *im, unsigned char *dp,
   }
 }
 
-void TrueRenderControl::render(Surface *sf)
+void TrueRenderControl::drawBackground(Surface *sf,
+                                      const RenderTexture &texture) const
 {
   assert(sf);
   
index 4012a008532e8aed3db3c5efe4f14c2612f36329..af057be8473f4fb1c86753f37fa3c6249557d9f7 100644 (file)
@@ -17,7 +17,7 @@ public:
   TrueRenderControl(const ScreenInfo *screen);
   virtual ~TrueRenderControl();
 
-  virtual void render(Surface *sf);
+  virtual void drawBackground(Surface *sf, const RenderTexture &texture) const;
 };
 
 }
This page took 0.027753 seconds and 4 git commands to generate.