summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas James Alexander Thurman <tthurman@src.gnome.org>2009-01-11 04:48:54 +0000
committerThomas James Alexander Thurman <tthurman@src.gnome.org>2009-01-11 04:48:54 +0000
commit77cb0db9c2702f077284178cf28dddc39add1410 (patch)
tree1f102fd5f444e30142c6ee0827cf519846feb571 /src
parentad080410a3cd65bcefc4a7465d54176d7beacfda (diff)
downloadmetacity-77cb0db9c2702f077284178cf28dddc39add1410.tar.gz
add meta_theme_draw_frame_by_name, which is needed for the theme editor.
* src/ui/theme.[ch]: add meta_theme_draw_frame_by_name, which is needed for the theme editor. svn path=/trunk/; revision=4074
Diffstat (limited to 'src')
-rw-r--r--src/ui/theme.c58
-rw-r--r--src/ui/theme.h17
2 files changed, 75 insertions, 0 deletions
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 6343fd41..1d822c82 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -5085,6 +5085,64 @@ meta_theme_draw_frame (MetaTheme *theme,
}
void
+meta_theme_draw_frame_by_name (MetaTheme *theme,
+ GtkWidget *widget,
+ GdkDrawable *drawable,
+ const GdkRectangle *clip,
+ int x_offset,
+ int y_offset,
+ const gchar *style_name,
+ MetaFrameFlags flags,
+ int client_width,
+ int client_height,
+ PangoLayout *title_layout,
+ int text_height,
+ const MetaButtonLayout *button_layout,
+ MetaButtonState button_states[META_BUTTON_TYPE_LAST],
+ GdkPixbuf *mini_icon,
+ GdkPixbuf *icon)
+{
+ MetaFrameGeometry fgeom;
+ MetaFrameStyle *style;
+
+ style = meta_theme_lookup_style (theme, style_name);
+
+ /* Parser is not supposed to allow this currently */
+ if (style == NULL)
+ return;
+
+ meta_frame_layout_calc_geometry (style->layout,
+ text_height,
+ flags,
+ client_width, client_height,
+ button_layout,
+ &fgeom,
+ theme);
+
+ meta_frame_style_draw (style,
+ widget,
+ drawable,
+ x_offset, y_offset,
+ clip,
+ &fgeom,
+ client_width, client_height,
+ title_layout,
+ text_height,
+ button_states,
+ mini_icon, icon);
+}
+
+
+
+
+
+
+
+
+
+
+
+void
meta_theme_get_frame_borders (MetaTheme *theme,
MetaFrameType type,
int text_height,
diff --git a/src/ui/theme.h b/src/ui/theme.h
index 2fc1283f..737f30a8 100644
--- a/src/ui/theme.h
+++ b/src/ui/theme.h
@@ -1000,6 +1000,23 @@ void meta_theme_draw_frame (MetaTheme *theme,
GdkPixbuf *mini_icon,
GdkPixbuf *icon);
+void meta_theme_draw_frame_by_name (MetaTheme *theme,
+ GtkWidget *widget,
+ GdkDrawable *drawable,
+ const GdkRectangle *clip,
+ int x_offset,
+ int y_offset,
+ const gchar *style_name,
+ MetaFrameFlags flags,
+ int client_width,
+ int client_height,
+ PangoLayout *title_layout,
+ int text_height,
+ const MetaButtonLayout *button_layout,
+ MetaButtonState button_states[META_BUTTON_TYPE_LAST],
+ GdkPixbuf *mini_icon,
+ GdkPixbuf *icon);
+
void meta_theme_get_frame_borders (MetaTheme *theme,
MetaFrameType type,
int text_height,