summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2010-12-09 21:03:26 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2010-12-09 21:03:26 +0800
commit436013c17fefb1555585337098ac1618da5e212d (patch)
treeb0efd23305dbe1a170ba5425eca9e07f00497fb6 /src
parent313de06d8a052568cbf838d8c212cd7942637fed (diff)
downloadunity-window-decorator-436013c17fefb1555585337098ac1618da5e212d.tar.gz
unity-window-decorator-436013c17fefb1555585337098ac1618da5e212d.tar.bz2
Add theme_get_shadow method. Currently doesn't do much
Diffstat (limited to 'src')
-rw-r--r--src/gtk-window-decorator.c5
-rw-r--r--src/gtk-window-decorator.h12
-rw-r--r--src/metacity.c6
3 files changed, 23 insertions, 0 deletions
diff --git a/src/gtk-window-decorator.c b/src/gtk-window-decorator.c
index 32c5382..070b99d 100644
--- a/src/gtk-window-decorator.c
+++ b/src/gtk-window-decorator.c
@@ -247,6 +247,7 @@ main (int argc, char *argv[])
}
else if (strcmp (argv[i], "--metacity-theme") == 0)
{
+ fprintf (stderr, "specified metacity theme\n");
if (argc > ++i)
meta_theme = argv[i];
cmdline_options |= CMDLINE_THEME;
@@ -280,18 +281,22 @@ main (int argc, char *argv[])
theme_update_border_extents = update_border_extents;
theme_get_event_window_position = get_event_window_position;
theme_get_button_position = get_button_position;
+ theme_get_shadow = NULL;
#ifdef USE_METACITY
if (meta_theme)
{
+ fprintf (stderr, "found meta theme\n");
meta_theme_set_current (meta_theme, TRUE);
if (meta_theme_get_current ())
{
+ fprintf (stderr, "setting to meta\n");
theme_draw_window_decoration = meta_draw_window_decoration;
theme_calc_decoration_size = meta_calc_decoration_size;
theme_update_border_extents = meta_update_border_extents;
theme_get_event_window_position = meta_get_event_window_position;
theme_get_button_position = meta_get_button_position;
+ theme_get_shadow = meta_get_shadow;
}
}
#endif
diff --git a/src/gtk-window-decorator.h b/src/gtk-window-decorator.h
index 57f1f28..7945e7a 100644
--- a/src/gtk-window-decorator.h
+++ b/src/gtk-window-decorator.h
@@ -161,6 +161,11 @@ GCONF_DIR "/mouse_wheel_action"
#define SHADOW_COLOR_GREEN 0x0000
#define SHADOW_COLOR_BLUE 0x0000
+#define SHADOW_TYPE_ACTIVE_NORMAL 1
+#define SHADOW_TYPE_ACTIVE_MAX 2
+#define SHADOW_TYPE_INACTIVE_NORMAL 3
+#define SHADOW_TYPE_INACTIVE_MAX 4
+
#define META_OPACITY 0.75
#define META_SHADE_OPACITY TRUE
#define META_ACTIVE_OPACITY 1.0
@@ -415,6 +420,9 @@ gboolean (*theme_get_button_position) (decor_t *d,
gint *w,
gint *h);
+decor_shadow_t * (*theme_get_shadow) (decor_t *d,
+ gint shadow_type);
+
extern char *program_name;
extern GtkWidget *style_window_rgba;
@@ -710,6 +718,10 @@ meta_update_border_extents (gint text_height);
void
meta_update_button_layout (const char *value);
+
+decor_shadow_t *
+meta_get_shadow (decor_t *, gint shadow_type);
+
#endif
/* switcher.c */
diff --git a/src/metacity.c b/src/metacity.c
index 26935b7..851379e 100644
--- a/src/metacity.c
+++ b/src/metacity.c
@@ -1588,4 +1588,10 @@ meta_update_border_extents (gint text_height)
max_titlebar_height = top_height - _max_win_extents.top;
}
+decor_shadow_t *
+meta_get_shadow (decor_t *d, gint shadow_type)
+{
+ return NULL;
+}
+
#endif