all repos — openbox @ 02066c5d0b09ae49aa1f9b7193fb16f1ac7f6a37

openbox fork - make it a bit more like ryudo

starting to make render's interface
Dana Jansens danakj@orodu.net
commit

02066c5d0b09ae49aa1f9b7193fb16f1ac7f6a37

parent

e3eeac5b6eee29009f3417f309a261d43fd39d27

M otk/rendercontrol.ccotk/rendercontrol.cc

@@ -6,6 +6,7 @@ #endif // HAVE_CONFIG_H

#include "rendercontrol.hh" #include "truerendercontrol.hh" +#include "rendertexture.hh" #include "display.hh" #include "screeninfo.hh"
M otk/rendercontrol.hhotk/rendercontrol.hh

@@ -11,6 +11,7 @@ namespace otk {

class ScreenInfo; class Surface; +class RenderTexture; class RenderControl { protected:

@@ -66,7 +67,8 @@ virtual ~RenderControl();

static RenderControl *getRenderControl(int screen); - virtual void render(Surface *sf) = 0; + virtual void drawBackground(Surface *sf, + const RenderTexture &texture) const = 0; }; }
M otk/rendertest.ccotk/rendertest.cc

@@ -1,5 +1,6 @@

#include "otk.hh" #include "rendercontrol.hh" +#include "rendertexture.hh" #include <stdio.h> #include <X11/Xlib.h>

@@ -15,7 +16,9 @@ foo.show();

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());
A otk/rendertexture.hh

@@ -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
M otk/truerendercontrol.ccotk/truerendercontrol.cc

@@ -102,7 +102,8 @@ assert(false); // wtf?

} } -void TrueRenderControl::render(Surface *sf) +void TrueRenderControl::drawBackground(Surface *sf, + const RenderTexture &texture) const { assert(sf);
M otk/truerendercontrol.hhotk/truerendercontrol.hh

@@ -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; }; }