From 5bfbaa5ffec34c13939f81a5a65ab6b90720ecbf Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sun, 3 Jun 2007 16:06:33 +0000 Subject: [PATCH] add some nonworking code to use obrender --- configure | 11 +++++++++++ rspanel.c | 20 ++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/configure b/configure index 5cd8921..2128d98 100755 --- a/configure +++ b/configure @@ -50,6 +50,17 @@ else echo no fi +#echo -n "checking for ObRender..." +#obrender=no +#if pkg-config --atleast-version 3.3.995 obrender-3.0; then +# echo yes +# LDFLAGS="$LDFLAGS `pkg-config --libs obrender-3.0`" +# CFLAGS="$CFLAGS -DOBRENDER `pkg-config --cflags obrender-3.0`" +# obrender=yes +#else +# echo no +#fi + echo -n "checking for Linux... " if test "`uname`" = "Linux"; then CFLAGS="$CFLAGS -DNOSTDLIB -nostdlib" diff --git a/rspanel.c b/rspanel.c index 8d04743..31786b9 100644 --- a/rspanel.c +++ b/rspanel.c @@ -59,6 +59,12 @@ int WINWIDTH = 827; #include #endif +#ifdef OBRENDER +#warning wtf +#include +#include +#endif + #include "rspanel.h" Window rspanelwin; @@ -567,6 +573,19 @@ void draw_box(int x, int width) draw_line(x + 3, 2, x + 3, WINHEIGHT - 3); } +#ifdef OBRENDER +void gui_draw_task(task *tk) +{ + RrInstance *inst = RrInstanceNew(dd, scr_screen); + RrTheme *theme = RrThemeNew(inst, "Mikachu", TRUE, NULL, NULL, NULL, NULL, NULL); + RrAppearance *a = RrAppearanceCopy(theme->osd_hilite_label); + a->texture[0].type = RR_TEXTURE_TEXT; + a->texture[0].data.text.string = tk->name; + RrPaint(a, tb.win, WINWIDTH, WINHEIGHT); + + RrInstanceFree(inst); +} +#else void gui_draw_task(task * tk) { int x = tk->pos_x; @@ -686,6 +705,7 @@ void gui_draw_task(task * tk) x + TEXTPAD, (WINHEIGHT - ICONHEIGHT) / 2); XSetClipMask(dd, fore_gc, None); } +#endif void draw_dot(int x, int y) { -- 2.39.2