metacity r4074 - in trunk: . src/ui



Author: tthurman
Date: Sun Jan 11 04:48:54 2009
New Revision: 4074
URL: http://svn.gnome.org/viewvc/metacity?rev=4074&view=rev

Log:
	* src/ui/theme.[ch]: add meta_theme_draw_frame_by_name, which
          is needed for the theme editor.



Modified:
   trunk/ChangeLog
   trunk/src/ui/theme.c
   trunk/src/ui/theme.h

Modified: trunk/src/ui/theme.c
==============================================================================
--- trunk/src/ui/theme.c	(original)
+++ trunk/src/ui/theme.c	Sun Jan 11 04:48:54 2009
@@ -5085,6 +5085,64 @@
 }
 
 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,

Modified: trunk/src/ui/theme.h
==============================================================================
--- trunk/src/ui/theme.h	(original)
+++ trunk/src/ui/theme.h	Sun Jan 11 04:48:54 2009
@@ -1000,6 +1000,23 @@
                             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,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]