timer.lo
timerqueuemanager.lo
truerendercontrol.lo
+pseudorendercontrol.lo
util.lo
widget.lo
ustring.lo
lib_LTLIBRARIES=libotk.la
libotk_la_SOURCES=rendercontrol.cc truerendercontrol.cc surface.cc \
- renderstyle.cc rendercolor.cc \
+ renderstyle.cc rendercolor.cc pseudorendercontrol.cc \
display.cc font.cc \
property.cc rect.cc screeninfo.cc \
timer.cc \
--- /dev/null
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
+
+#ifdef HAVE_CONFIG_H
+# include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include "pseudorendercontrol.hh"
+#include "display.hh"
+#include "screeninfo.hh"
+#include "surface.hh"
+#include "rendertexture.hh"
+
+extern "C" {
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif // HAVE_STDLIB_H
+
+#include "../src/gettext.h"
+#define _(str) gettext(str)
+}
+
+namespace otk {
+
+PseudoRenderControl::PseudoRenderControl(int screen)
+ : RenderControl(screen)
+{
+ const ScreenInfo *info = display->screenInfo(_screen);
+
+ printf("Initializing PseudoColor RenderControl\n");
+
+}
+
+PseudoRenderControl::~PseudoRenderControl()
+{
+ printf("Destroying PseudoColor RenderControl\n");
+
+
+}
+
+void PseudoRenderControl::drawGradientBackground(
+ Surface &sf, const RenderTexture &texture) const
+{
+}
+
+void PseudoRenderControl::drawBackground(Surface& sf,
+ const RenderTexture &texture) const
+{
+ assert(_screen == sf._screen);
+ assert(_screen == texture.color().screen());
+
+ if (texture.gradient() == RenderTexture::Solid) {
+ drawSolidBackground(sf, texture);
+ } else {
+ drawGradientBackground(sf, texture);
+ }
+}
+
+}
--- /dev/null
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
+#ifndef __pseudorendercontrol_hh
+#define __pseudorendercontrol_hh
+
+#include "rendercontrol.hh"
+
+extern "C" {
+
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#else
+# ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+# endif
+#endif
+
+}
+
+#include <vector>
+
+namespace otk {
+
+class PseudoRenderControl : public RenderControl {
+private:
+
+ virtual void drawGradientBackground(Surface &sf,
+ const RenderTexture &texture) const;
+
+public:
+ PseudoRenderControl(int screen);
+ virtual ~PseudoRenderControl();
+
+ virtual void drawBackground(Surface& sf, const RenderTexture &texture) const;
+};
+
+}
+
+#endif // __pseudorendercontrol_hh
#include "rendercontrol.hh"
#include "truerendercontrol.hh"
+#include "pseudorendercontrol.hh"
#include "rendertexture.hh"
#include "rendercolor.hh"
#include "display.hh"
return new TrueRenderControl(screen);
case PseudoColor:
case StaticColor:
-// return new PseudoRenderControl(screen);
+ return new PseudoRenderControl(screen);
case GrayScale:
case StaticGray:
// return new GrayRenderControl(screen);
#include "point.hh"
#include "truerendercontrol.hh"
+#include "pseudorendercontrol.hh"
extern "C" {
#include <X11/Xlib.h>
// to it. Noone else needs them tho, so they are private.
friend class RenderControl;
friend class TrueRenderControl;
+ friend class PseudoRenderControl;
};
}
int _green_offset;
int _blue_offset;
-public:
- TrueRenderControl(int screen);
- virtual ~TrueRenderControl();
-
- virtual void drawBackground(Surface& sf, const RenderTexture &texture) const;
- virtual void drawGradientBackground(Surface &sf,
- const RenderTexture &texture) const;
-
inline void highlight(pixel32 *x, pixel32 *y, bool raised) const;
void reduceDepth(XImage *im, pixel32 *data) const;
void verticalGradient(Surface &sf, const RenderTexture &texture,
pixel32 *data) const;
void crossDiagonalGradient(Surface &sf, const RenderTexture &texture,
pixel32 *data) const;
+ virtual void drawGradientBackground(Surface &sf,
+ const RenderTexture &texture) const;
+
+public:
+ TrueRenderControl(int screen);
+ virtual ~TrueRenderControl();
+
+ virtual void drawBackground(Surface& sf, const RenderTexture &texture) const;
};
}