summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/color.c24
-rw-r--r--render/font.c6
-rw-r--r--render/image.c26
-rw-r--r--render/obrender-4.0.pc.in (renamed from render/obrender-3.0.pc.in)6
-rw-r--r--render/render.h2
-rw-r--r--render/theme.c189
-rw-r--r--render/theme.h22
-rw-r--r--render/version.h.in15
8 files changed, 218 insertions, 72 deletions
diff --git a/render/color.c b/render/color.c
index 41fcc710..5e3f2169 100644
--- a/render/color.c
+++ b/render/color.c
@@ -143,6 +143,28 @@ void RrReduceDepth(const RrInstance *inst, RrPixel32 *data, XImage *im)
}
} else im->data = (gchar*) data;
break;
+ case 24:
+ {
+ /* reverse the ordering, shifting left 16bit should be the first byte
+ out of three, etc */
+ const guint roff = (16 - RrRedOffset(inst)) / 8;
+ const guint goff = (16 - RrGreenOffset(inst)) / 8;
+ const guint boff = (16 - RrBlueOffset(inst)) / 8;
+ gint outx;
+ for (y = 0; y < im->height; y++) {
+ for (x = 0, outx = 0; x < im->width; x++, outx += 3) {
+ r = (data[x] >> RrDefaultRedOffset) & 0xFF;
+ g = (data[x] >> RrDefaultGreenOffset) & 0xFF;
+ b = (data[x] >> RrDefaultBlueOffset) & 0xFF;
+ p8[outx+roff] = r;
+ p8[outx+goff] = g;
+ p8[outx+boff] = b;
+ }
+ data += im->width;
+ p8 += im->bytes_per_line;
+ }
+ break;
+ }
case 16:
for (y = 0; y < im->height; y++) {
for (x = 0; x < im->width; x++) {
@@ -191,7 +213,7 @@ void RrReduceDepth(const RrInstance *inst, RrPixel32 *data, XImage *im)
}
break;
default:
- g_error("Your bit depth is currently unhandled\n");
+ g_error("This image bit depth (%i) is currently unhandled", im->bits_per_pixel);
}
}
diff --git a/render/font.c b/render/font.c
index 583c9f7d..cde0d030 100644
--- a/render/font.c
+++ b/render/font.c
@@ -217,7 +217,7 @@ static inline int font_calculate_baseline(RrFont *f, gint height)
void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area)
{
- gint x,y,w,h;
+ gint x,y,w;
XftColor c;
gint mw;
PangoRectangle rect;
@@ -240,7 +240,7 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area)
w = area->width;
if (t->flow) w = MAX(w, t->maxwidth);
w -= 4;
- h = area->height;
+ /* h = area->height; */
if (t->flow)
ell = PANGO_ELLIPSIZE_NONE;
@@ -258,6 +258,8 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area)
case RR_ELLIPSIZE_END:
ell = PANGO_ELLIPSIZE_END;
break;
+ default:
+ g_assert_not_reached();
}
}
diff --git a/render/image.c b/render/image.c
index 48012d42..924504fd 100644
--- a/render/image.c
+++ b/render/image.c
@@ -75,10 +75,10 @@ static void AddPicture(RrImage *self, RrImagePic ***list, gint *len,
/*
#ifdef DEBUG
- g_message("Adding %s picture to the cache:\n "
- "Image 0x%x, w %d h %d Hash %u",
- (*list == self->original ? "ORIGINAL" : "RESIZED"),
- (guint)self, pic->width, pic->height, RrImagePicHash(pic));
+ g_debug("Adding %s picture to the cache:\n "
+ "Image 0x%lx, w %d h %d Hash %u",
+ (*list == self->original ? "ORIGINAL" : "RESIZED"),
+ (gulong)self, pic->width, pic->height, RrImagePicHash(pic));
#endif
*/
}
@@ -92,11 +92,11 @@ static void RemovePicture(RrImage *self, RrImagePic ***list,
/*
#ifdef DEBUG
- g_message("Removing %s picture from the cache:\n "
- "Image 0x%x, w %d h %d Hash %u",
- (*list == self->original ? "ORIGINAL" : "RESIZED"),
- (guint)self, (*list)[i]->width, (*list)[i]->height,
- RrImagePicHash((*list)[i]));
+ g_debug("Removing %s picture from the cache:\n "
+ "Image 0x%lx, w %d h %d Hash %u",
+ (*list == self->original ? "ORIGINAL" : "RESIZED"),
+ (gulong)self, (*list)[i]->width, (*list)[i]->height,
+ RrImagePicHash((*list)[i]));
#endif
*/
@@ -335,8 +335,8 @@ void RrImageUnref(RrImage *self)
if (self && --self->ref == 0) {
/*
#ifdef DEBUG
- g_message("Refcount to 0, removing ALL pictures from the cache:\n "
- "Image 0x%x", (guint)self);
+ g_debug("Refcount to 0, removing ALL pictures from the cache:\n "
+ "Image 0x%lx", (gulong)self);
#endif
*/
while (self->n_original > 0)
@@ -360,8 +360,8 @@ void RrImageAddPicture(RrImage *self, RrPixel32 *data, gint w, gint h)
if (self->original[i]->width == w && self->original[i]->height == h) {
/*
#ifdef DEBUG
- g_message("Found duplicate ORIGINAL image:\n "
- "Image 0x%x, w %d h %d", (guint)self, w, h);
+ g_debug("Found duplicate ORIGINAL image:\n "
+ "Image 0x%lx, w %d h %d", (gulong)self, w, h);
#endif
*/
return;
diff --git a/render/obrender-3.0.pc.in b/render/obrender-4.0.pc.in
index ebb17ef3..539606a4 100644
--- a/render/obrender-3.0.pc.in
+++ b/render/obrender-4.0.pc.in
@@ -8,7 +8,7 @@ xlibs=@X_LIBS@
Name: ObRender
Description: Openbox Render Library
-Version: @VERSION@
-Requires: obparser-3.0 glib-2.0 xft pangoxft
+Version: @RR_VERSION@
+Requires: obt-4.0 glib-2.0 xft pangoxft
Libs: -L${libdir} -lobrender ${xlibs}
-Cflags: -I${includedir}/openbox/@OB_VERSION@ ${xcflags}
+Cflags: -I${includedir}/openbox/@RR_VERSION@ ${xcflags}
diff --git a/render/render.h b/render/render.h
index f7bc5041..706843e3 100644
--- a/render/render.h
+++ b/render/render.h
@@ -22,7 +22,7 @@
#define __render_h
#include "geom.h"
-#include "version.h"
+#include "render/version.h"
#include <X11/Xlib.h> /* some platforms dont include this as needed for Xft */
#include <pango/pangoxft.h>
diff --git a/render/theme.c b/render/theme.c
index aa9cb3f9..6c136bf5 100644
--- a/render/theme.c
+++ b/render/theme.c
@@ -23,7 +23,7 @@
#include "mask.h"
#include "theme.h"
#include "icon.h"
-#include "parser/parse.h"
+#include "obt/paths.h"
#include <X11/Xlib.h>
#include <X11/Xresource.h>
@@ -67,7 +67,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
gboolean allow_fallback,
RrFont *active_window_font, RrFont *inactive_window_font,
RrFont *menu_title_font, RrFont *menu_item_font,
- RrFont *osd_font)
+ RrFont *active_osd_font, RrFont *inactive_osd_font)
{
XrmDatabase db = NULL;
RrJustify winjust, mtitlejust;
@@ -142,10 +142,11 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
theme->a_menu_bullet_selected = RrAppearanceNew(inst, 1);
theme->a_clear = RrAppearanceNew(inst, 0);
theme->a_clear_tex = RrAppearanceNew(inst, 1);
- theme->osd_hilite_bg = RrAppearanceNew(inst, 0);
+ theme->osd_bg = RrAppearanceNew(inst, 0);
theme->osd_hilite_label = RrAppearanceNew(inst, 1);
- theme->osd_hilite_fg = RrAppearanceNew(inst, 0);
- theme->osd_unhilite_fg = RrAppearanceNew(inst, 0);
+ theme->osd_hilite_bg = RrAppearanceNew(inst, 0);
+ theme->osd_unhilite_label = RrAppearanceNew(inst, 1);
+ theme->osd_unhilite_bg = RrAppearanceNew(inst, 0);
/* load the font stuff */
theme->win_font_focused = get_font(active_window_font,
@@ -173,7 +174,8 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
theme->menu_font = get_font(menu_item_font, &default_font, inst);
- theme->osd_font = get_font(osd_font, &default_font, inst);
+ theme->osd_font_hilite = get_font(active_osd_font, &default_font, inst);
+ theme->osd_font_unhilite = get_font(inactive_osd_font, &default_font,inst);
/* load direct dimensions */
if ((!read_int(db, "menu.overlap.x", &theme->menu_overlap_x) &&
@@ -283,15 +285,26 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
"window.active.label.text.color",
&theme->title_focused_color))
theme->title_focused_color = RrColorNew(inst, 0x0, 0x0, 0x0);
- if (!read_color(db, inst, "osd.label.text.color", &theme->osd_color))
- theme->osd_color = RrColorNew(inst,
- theme->title_focused_color->r,
- theme->title_focused_color->g,
- theme->title_focused_color->b);
+ if (!read_color(db, inst, "osd.active.label.text.color",
+ &theme->osd_text_active_color) &&
+ !read_color(db, inst, "osd.label.text.color",
+ &theme->osd_text_active_color))
+ theme->osd_text_active_color =
+ RrColorNew(inst,
+ theme->title_focused_color->r,
+ theme->title_focused_color->g,
+ theme->title_focused_color->b);
if (!read_color(db, inst,
"window.inactive.label.text.color",
&theme->title_unfocused_color))
theme->title_unfocused_color = RrColorNew(inst, 0xff, 0xff, 0xff);
+ if (!read_color(db, inst, "osd.inactive.label.text.color",
+ &theme->osd_text_inactive_color))
+ theme->osd_text_inactive_color =
+ RrColorNew(inst,
+ theme->title_unfocused_color->r,
+ theme->title_unfocused_color->g,
+ theme->title_unfocused_color->b);
if (!read_color(db, inst,
"window.active.button.unpressed.image.color",
&theme->titlebut_focused_unpressed_color))
@@ -559,6 +572,16 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
theme->menu_bullet_mask = RrPixmapMaskNew(inst, 4, 7, (gchar*)data);
}
+ /* up and down arrows */
+ {
+ guchar data[] = { 0xfe, 0x00, 0x7c, 0x00, 0x38, 0x00, 0x10, 0x00 };
+ theme->down_arrow_mask = RrPixmapMaskNew(inst, 9, 4, (gchar*)data);
+ }
+ {
+ guchar data[] = { 0x10, 0x00, 0x38, 0x00, 0x7c, 0x00, 0xfe, 0x00 };
+ theme->up_arrow_mask = RrPixmapMaskNew(inst, 9, 4, (gchar*)data);
+ }
+
/* setup the default window icon */
theme->def_win_icon = read_c_image(OB_DEFAULT_ICON_WIDTH,
OB_DEFAULT_ICON_HEIGHT,
@@ -615,32 +638,39 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
RrAppearanceCopy(theme->a_menu_selected);
/* read appearances for non-decorations (on-screen-display) */
- if (!read_appearance(db, inst, "osd.bg", theme->osd_hilite_bg, FALSE)) {
- RrAppearanceFree(theme->osd_hilite_bg);
- theme->osd_hilite_bg = RrAppearanceCopy(theme->a_focused_title);
+ if (!read_appearance(db, inst, "osd.bg", theme->osd_bg, FALSE)) {
+ RrAppearanceFree(theme->osd_bg);
+ theme->osd_bg = RrAppearanceCopy(theme->a_focused_title);
}
- if (!read_appearance(db, inst, "osd.label.bg",
+ if (!read_appearance(db, inst, "osd.active.label.bg",
+ theme->osd_hilite_label, TRUE) &&
+ !read_appearance(db, inst, "osd.label.bg",
theme->osd_hilite_label, TRUE)) {
RrAppearanceFree(theme->osd_hilite_label);
theme->osd_hilite_label = RrAppearanceCopy(theme->a_focused_label);
}
+ if (!read_appearance(db, inst, "osd.inactive.label.bg",
+ theme->osd_unhilite_label, TRUE)) {
+ RrAppearanceFree(theme->osd_unhilite_label);
+ theme->osd_unhilite_label = RrAppearanceCopy(theme->a_unfocused_label);
+ }
/* osd_hilite_fg can't be parentrel */
if (!read_appearance(db, inst, "osd.hilight.bg",
- theme->osd_hilite_fg, FALSE)) {
- RrAppearanceFree(theme->osd_hilite_fg);
+ theme->osd_hilite_bg, FALSE)) {
+ RrAppearanceFree(theme->osd_hilite_bg);
if (theme->a_focused_label->surface.grad != RR_SURFACE_PARENTREL)
- theme->osd_hilite_fg = RrAppearanceCopy(theme->a_focused_label);
+ theme->osd_hilite_bg = RrAppearanceCopy(theme->a_focused_label);
else
- theme->osd_hilite_fg = RrAppearanceCopy(theme->a_focused_title);
+ theme->osd_hilite_bg = RrAppearanceCopy(theme->a_focused_title);
}
/* osd_unhilite_fg can't be parentrel either */
if (!read_appearance(db, inst, "osd.unhilight.bg",
- theme->osd_unhilite_fg, FALSE)) {
- RrAppearanceFree(theme->osd_unhilite_fg);
+ theme->osd_unhilite_bg, FALSE)) {
+ RrAppearanceFree(theme->osd_unhilite_bg);
if (theme->a_unfocused_label->surface.grad != RR_SURFACE_PARENTREL)
- theme->osd_unhilite_fg=RrAppearanceCopy(theme->a_unfocused_label);
+ theme->osd_unhilite_bg=RrAppearanceCopy(theme->a_unfocused_label);
else
- theme->osd_unhilite_fg=RrAppearanceCopy(theme->a_unfocused_title);
+ theme->osd_unhilite_bg=RrAppearanceCopy(theme->a_unfocused_title);
}
/* read buttons textures */
@@ -897,10 +927,21 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
theme->osd_hilite_label->texture[0].type = RR_TEXTURE_TEXT;
theme->osd_hilite_label->texture[0].data.text.justify = RR_JUSTIFY_LEFT;
- theme->osd_hilite_label->texture[0].data.text.font = theme->osd_font;
- theme->osd_hilite_label->texture[0].data.text.color = theme->osd_color;
-
- if (read_string(db, "osd.label.text.font", &str)) {
+ theme->osd_hilite_label->texture[0].data.text.font =
+ theme->osd_font_hilite;
+ theme->osd_hilite_label->texture[0].data.text.color =
+ theme->osd_text_active_color;
+
+ theme->osd_unhilite_label->texture[0].type = RR_TEXTURE_TEXT;
+ theme->osd_unhilite_label->texture[0].data.text.justify = RR_JUSTIFY_LEFT;
+ theme->osd_unhilite_label->texture[0].data.text.font =
+ theme->osd_font_unhilite;
+ theme->osd_unhilite_label->texture[0].data.text.color =
+ theme->osd_text_inactive_color;
+
+ if (read_string(db, "osd.active.label.text.font", &str) ||
+ read_string(db, "osd.label.text.font", &str))
+ {
char *p;
gint i = 0;
gint j;
@@ -909,8 +950,6 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
i = parse_inline_number(p + strlen("shadowoffset="));
else
i = 1;
- theme->a_focused_label->texture[0].data.text.shadow_offset_x = i;
- theme->a_focused_label->texture[0].data.text.shadow_offset_y = i;
theme->osd_hilite_label->texture[0].data.text.shadow_offset_x = i;
theme->osd_hilite_label->texture[0].data.text.shadow_offset_y = i;
}
@@ -920,11 +959,11 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
j = (i > 0 ? 0 : 255);
i = ABS(i*255/100);
- theme->osd_shadow_color = RrColorNew(inst, j, j, j);
- theme->osd_shadow_alpha = i;
+ theme->osd_text_active_shadow_color = RrColorNew(inst, j, j, j);
+ theme->osd_text_active_shadow_alpha = i;
} else {
- theme->osd_shadow_color = RrColorNew(inst, 0, 0, 0);
- theme->osd_shadow_alpha = 50;
+ theme->osd_text_active_shadow_color = RrColorNew(inst, 0, 0, 0);
+ theme->osd_text_active_shadow_alpha = 50;
}
} else {
/* inherit the font settings from the focused label */
@@ -933,20 +972,69 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
theme->osd_hilite_label->texture[0].data.text.shadow_offset_y =
theme->a_focused_label->texture[0].data.text.shadow_offset_y;
if (theme->title_focused_shadow_color)
- theme->osd_shadow_color =
+ theme->osd_text_active_shadow_color =
RrColorNew(inst,
theme->title_focused_shadow_color->r,
theme->title_focused_shadow_color->g,
theme->title_focused_shadow_color->b);
else
- theme->osd_shadow_color = RrColorNew(inst, 0, 0, 0);
- theme->osd_shadow_alpha = theme->title_focused_shadow_alpha;
+ theme->osd_text_active_shadow_color = RrColorNew(inst, 0, 0, 0);
+ theme->osd_text_active_shadow_alpha =
+ theme->title_focused_shadow_alpha;
}
theme->osd_hilite_label->texture[0].data.text.shadow_color =
- theme->osd_shadow_color;
+ theme->osd_text_active_shadow_color;
theme->osd_hilite_label->texture[0].data.text.shadow_alpha =
- theme->osd_shadow_alpha;
+ theme->osd_text_active_shadow_alpha;
+
+ if (read_string(db, "osd.inactive.label.text.font", &str))
+ {
+ char *p;
+ gint i = 0;
+ gint j;
+ if (strstr(str, "shadow=y")) {
+ if ((p = strstr(str, "shadowoffset=")))
+ i = parse_inline_number(p + strlen("shadowoffset="));
+ else
+ i = 1;
+ theme->osd_unhilite_label->texture[0].data.text.shadow_offset_x=i;
+ theme->osd_unhilite_label->texture[0].data.text.shadow_offset_y=i;
+ }
+ if ((p = strstr(str, "shadowtint=")))
+ {
+ i = parse_inline_number(p + strlen("shadowtint="));
+ j = (i > 0 ? 0 : 255);
+ i = ABS(i*255/100);
+
+ theme->osd_text_inactive_shadow_color = RrColorNew(inst, j, j, j);
+ theme->osd_text_inactive_shadow_alpha = i;
+ } else {
+ theme->osd_text_inactive_shadow_color = RrColorNew(inst, 0, 0, 0);
+ theme->osd_text_inactive_shadow_alpha = 50;
+ }
+ } else {
+ /* inherit the font settings from the focused label */
+ theme->osd_unhilite_label->texture[0].data.text.shadow_offset_x =
+ theme->a_unfocused_label->texture[0].data.text.shadow_offset_x;
+ theme->osd_unhilite_label->texture[0].data.text.shadow_offset_y =
+ theme->a_unfocused_label->texture[0].data.text.shadow_offset_y;
+ if (theme->title_unfocused_shadow_color)
+ theme->osd_text_inactive_shadow_color =
+ RrColorNew(inst,
+ theme->title_unfocused_shadow_color->r,
+ theme->title_unfocused_shadow_color->g,
+ theme->title_unfocused_shadow_color->b);
+ else
+ theme->osd_text_inactive_shadow_color = RrColorNew(inst, 0, 0, 0);
+ theme->osd_text_inactive_shadow_alpha =
+ theme->title_unfocused_shadow_alpha;
+ }
+
+ theme->osd_unhilite_label->texture[0].data.text.shadow_color =
+ theme->osd_text_inactive_shadow_color;
+ theme->osd_unhilite_label->texture[0].data.text.shadow_alpha =
+ theme->osd_text_inactive_shadow_alpha;
theme->a_unfocused_label->texture[0].type = RR_TEXTURE_TEXT;
theme->a_unfocused_label->texture[0].data.text.justify = winjust;
@@ -1430,8 +1518,10 @@ void RrThemeFree(RrTheme *theme)
RrColorFree(theme->menu_disabled_selected_color);
RrColorFree(theme->title_focused_shadow_color);
RrColorFree(theme->title_unfocused_shadow_color);
- RrColorFree(theme->osd_color);
- RrColorFree(theme->osd_shadow_color);
+ RrColorFree(theme->osd_text_active_color);
+ RrColorFree(theme->osd_text_inactive_color);
+ RrColorFree(theme->osd_text_active_shadow_color);
+ RrColorFree(theme->osd_text_inactive_shadow_color);
RrColorFree(theme->menu_title_shadow_color);
RrColorFree(theme->menu_text_normal_shadow_color);
RrColorFree(theme->menu_text_selected_shadow_color);
@@ -1470,12 +1560,15 @@ void RrThemeFree(RrTheme *theme)
RrPixmapMaskFree(theme->close_hover_mask);
RrPixmapMaskFree(theme->close_pressed_mask);
RrPixmapMaskFree(theme->menu_bullet_mask);
+ RrPixmapMaskFree(theme->down_arrow_mask);
+ RrPixmapMaskFree(theme->up_arrow_mask);
RrFontClose(theme->win_font_focused);
RrFontClose(theme->win_font_unfocused);
RrFontClose(theme->menu_title_font);
RrFontClose(theme->menu_font);
- RrFontClose(theme->osd_font);
+ RrFontClose(theme->osd_font_hilite);
+ RrFontClose(theme->osd_font_unhilite);
RrAppearanceFree(theme->a_disabled_focused_max);
RrAppearanceFree(theme->a_disabled_unfocused_max);
@@ -1559,10 +1652,11 @@ void RrThemeFree(RrTheme *theme)
RrAppearanceFree(theme->a_menu_bullet_selected);
RrAppearanceFree(theme->a_clear);
RrAppearanceFree(theme->a_clear_tex);
+ RrAppearanceFree(theme->osd_bg);
RrAppearanceFree(theme->osd_hilite_bg);
- RrAppearanceFree(theme->osd_hilite_fg);
RrAppearanceFree(theme->osd_hilite_label);
- RrAppearanceFree(theme->osd_unhilite_fg);
+ RrAppearanceFree(theme->osd_unhilite_bg);
+ RrAppearanceFree(theme->osd_unhilite_label);
g_free(theme);
}
@@ -1580,6 +1674,10 @@ static XrmDatabase loaddb(const gchar *name, gchar **path)
*path = g_path_get_dirname(s);
g_free(s);
} else {
+ ObtPaths *p;
+
+ p = obt_paths_new();
+
/* XXX backwards compatibility, remove me sometime later */
s = g_build_filename(g_get_home_dir(), ".themes", name,
"openbox-3", "themerc", NULL);
@@ -1587,8 +1685,7 @@ static XrmDatabase loaddb(const gchar *name, gchar **path)
*path = g_path_get_dirname(s);
g_free(s);
- for (it = parse_xdg_data_dir_paths(); !db && it;
- it = g_slist_next(it))
+ for (it = obt_paths_data_dirs(p); !db && it; it = g_slist_next(it))
{
s = g_build_filename(it->data, "themes", name,
"openbox-3", "themerc", NULL);
@@ -1596,6 +1693,8 @@ static XrmDatabase loaddb(const gchar *name, gchar **path)
*path = g_path_get_dirname(s);
g_free(s);
}
+
+ obt_paths_unref(p);
}
if (db == NULL) {
diff --git a/render/theme.h b/render/theme.h
index a14dac29..3f9063e6 100644
--- a/render/theme.h
+++ b/render/theme.h
@@ -34,7 +34,8 @@ struct _RrTheme {
RrFont *win_font_unfocused;
RrFont *menu_title_font;
RrFont *menu_font;
- RrFont *osd_font;
+ RrFont *osd_font_hilite;
+ RrFont *osd_font_unhilite;
/* style settings - geometry */
gint paddingx;
@@ -96,9 +97,12 @@ struct _RrTheme {
gchar title_focused_shadow_alpha;
RrColor *title_unfocused_shadow_color;
gchar title_unfocused_shadow_alpha;
- RrColor *osd_color;
- RrColor *osd_shadow_color;
- gchar osd_shadow_alpha;
+ RrColor *osd_text_active_color;
+ RrColor *osd_text_inactive_color;
+ RrColor *osd_text_active_shadow_color;
+ RrColor *osd_text_inactive_shadow_color;
+ gchar osd_text_active_shadow_alpha;
+ gchar osd_text_inactive_shadow_alpha;
RrColor *menu_title_shadow_color;
gchar menu_title_shadow_alpha;
RrColor *menu_text_normal_shadow_color;
@@ -151,6 +155,9 @@ struct _RrTheme {
RrPixmapMask *menu_toggle_mask; /* menu boolean */
#endif
+ RrPixmapMask *down_arrow_mask;
+ RrPixmapMask *up_arrow_mask;
+
/* global appearances */
RrAppearance *a_disabled_focused_max;
RrAppearance *a_disabled_unfocused_max;
@@ -236,10 +243,11 @@ struct _RrTheme {
RrAppearance *a_clear; /* clear with no texture */
RrAppearance *a_clear_tex; /* clear with a texture */
+ RrAppearance *osd_bg; /* can never be parent relative */
RrAppearance *osd_hilite_bg; /* can never be parent relative */
- RrAppearance *osd_hilite_fg; /* can never be parent relative */
RrAppearance *osd_hilite_label; /* can be parent relative */
- RrAppearance *osd_unhilite_fg; /* can never be parent relative */
+ RrAppearance *osd_unhilite_bg; /* can never be parent relative */
+ RrAppearance *osd_unhilite_label; /* can be parent relative */
gchar *name;
};
@@ -250,7 +258,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *theme,
gboolean allow_fallback,
RrFont *active_window_font, RrFont *inactive_window_font,
RrFont *menu_title_font, RrFont *menu_item_font,
- RrFont *osd_font);
+ RrFont *active_osd_font, RrFont *inactive_osd_font);
void RrThemeFree(RrTheme *theme);
G_END_DECLS
diff --git a/render/version.h.in b/render/version.h.in
new file mode 100644
index 00000000..0ff30b57
--- /dev/null
+++ b/render/version.h.in
@@ -0,0 +1,15 @@
+#ifndef rr__version_h
+#define rr__version_h
+
+#define RR_MAJOR_VERSION @RR_MAJOR_VERSION@
+#define RR_MINOR_VERSION @RR_MINOR_VERSION@
+#define RR_MICRO_VERSION @RR_MICRO_VERSION@
+#define RR_VERSION RR_MAJOR_VERSION.RR_MINOR_VERSION.RR_MICRO_VERSION
+
+#define RR_CHECK_VERSION(major,minor,micro) \
+ (RR_MAJOR_VERSION > (major) || \
+ (RR_MAJOR_VERSION == (major) && RR_MINOR_VERSION > (minor)) || \
+ (RR_MAJOR_VERSION == (major) && RR_MINOR_VERSION == (minor) && \
+ RR_MICRO_VERSION >= (micro)))
+
+#endif