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
This commit is contained in:
Thomas James Alexander Thurman 2009-01-11 04:48:54 +00:00
parent ad080410a3
commit 77cb0db9c2
3 changed files with 80 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2009-01-10 Thomas Thurman <tthurman@gnome.org>
* src/ui/theme.[ch]: add meta_theme_draw_frame_by_name, which
is needed for the theme editor.
2008-12-26 Thomas Thurman <tthurman@gnome.org> 2008-12-26 Thomas Thurman <tthurman@gnome.org>
* configure.in: Post-release bump to 2.25.144. * configure.in: Post-release bump to 2.25.144.

View File

@ -5084,6 +5084,64 @@ meta_theme_draw_frame (MetaTheme *theme,
mini_icon, icon); mini_icon, 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)
{
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 void
meta_theme_get_frame_borders (MetaTheme *theme, meta_theme_get_frame_borders (MetaTheme *theme,
MetaFrameType type, MetaFrameType type,

View File

@ -1000,6 +1000,23 @@ void meta_theme_draw_frame (MetaTheme *theme,
GdkPixbuf *mini_icon, GdkPixbuf *mini_icon,
GdkPixbuf *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, void meta_theme_get_frame_borders (MetaTheme *theme,
MetaFrameType type, MetaFrameType type,
int text_height, int text_height,