]> Dogcows Code - chaz/openbox/blobdiff - otk/rendercontrol.cc
remove quotes from comment
[chaz/openbox] / otk / rendercontrol.cc
index 189bbd6e00514a3d2fd242adcf9c7595ff54b8eb..aae6c76bfa3a01f02b3c82f06c3f15f74de8c6e3 100644 (file)
@@ -6,11 +6,12 @@
 
 #include "rendercontrol.hh"
 #include "truerendercontrol.hh"
+#include "pseudorendercontrol.hh"
 #include "rendertexture.hh"
+#include "rendercolor.hh"
 #include "display.hh"
 #include "screeninfo.hh"
 #include "surface.hh"
-#include "color.hh"
 #include "font.hh"
 #include "ustring.hh"
 
@@ -19,7 +20,7 @@ extern "C" {
 #  include <stdlib.h>
 #endif // HAVE_STDLIB_H
 
-#include "gettext.h"
+#include "../src/gettext.h"
 #define _(str) gettext(str)
 }
 
@@ -34,10 +35,10 @@ RenderControl *RenderControl::getRenderControl(int screen)
     return new TrueRenderControl(screen);
   case PseudoColor:
   case StaticColor:
-//    return new PseudoRenderControl(screen);
+    return new PseudoRenderControl(screen);
   case GrayScale:
   case StaticGray:
-//    return new GrayRenderControl(screen);
+    return new PseudoRenderControl(screen);
   default:
     printf(_("RenderControl: Unsupported visual %d specified. Aborting.\n"),
           vclass);
@@ -60,8 +61,16 @@ RenderControl::~RenderControl()
 
 }
 
+void RenderControl::drawRoot(const RenderColor &color) const
+{
+  Window root = display->screenInfo(_screen)->rootWindow();
+  XSetWindowBackground(**display, root, color.pixel());
+  XClearWindow(**display, root);
+}
+
 void RenderControl::drawString(Surface& sf, const Font &font, int x, int y,
-                              const Color &color, const ustring &string) const
+                              const RenderColor &color,
+                               const ustring &string) const
 {
   assert(sf._screen == _screen);
   XftDraw *d = sf._xftdraw;
@@ -98,7 +107,6 @@ void RenderControl::drawString(Surface& sf, const Font &font, int x, int y,
   else
     XftDrawString8(d, &c, font._xftfont, x, font._xftfont->ascent + y,
                    (FcChar8*)string.c_str(), string.bytes());
-
   return;
 }
 
This page took 0.022612 seconds and 4 git commands to generate.