[gtkmm] Improved StyleContext. Removed Style and RcStyle classes.



commit ee432e21901c8ee7f68f6562c46f9e5e6ef17de7
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Dec 6 12:22:29 2010 +0100

    Improved StyleContext. Removed Style and RcStyle classes.
    
    * gtk/src/rc.[hg|ccg]
    * gtk/src/style.[hg|ccg]: Removed these files because GtkStyle and GtkRcStyle
    are now deprecated in GTK+ 3.
    * gtk/src/styleprovider.[hg|ccg]: Added this class, used by StyleContext,
    though no methods are wrapped yet.
    * gtk/src/iconset.hg: Remove render_icon(), replacing it with
    render_icon_pixbuf(), which uses StyleContext instead of Style.
    * gtk/src/widget.[hg|ccg]: Removed the modify_*() methods, replacing them
    with override_*() methods, which use StyleContext instead of RcStyle and
    Style.

 ChangeLog                 |   15 ++
 gtk/gtkmm.h               |    3 +-
 gtk/src/filelist.am       |    3 +-
 gtk/src/iconset.hg        |   14 +-
 gtk/src/rc.ccg            |  177 ---------------
 gtk/src/rc.hg             |  209 ------------------
 gtk/src/style.ccg         |   98 ---------
 gtk/src/style.hg          |  526 ---------------------------------------------
 gtk/src/stylecontext.hg   |   28 ++-
 gtk/src/styleprovider.ccg |   19 ++
 gtk/src/styleprovider.hg  |   45 ++++
 gtk/src/widget.ccg        |   37 ----
 gtk/src/widget.hg         |  116 +---------
 tools/m4/convert_gtk.m4   |   12 +-
 tools/m4/convert_pango.m4 |    1 +
 15 files changed, 121 insertions(+), 1182 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6489598..d1fa8cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
 2010-12-06  Murray Cumming  <murrayc murrayc com>
 
+	Improved StyleContext. Removed Style and RcStyle classes.
+
+	* gtk/src/rc.[hg|ccg]
+	* gtk/src/style.[hg|ccg]: Removed these files because GtkStyle and GtkRcStyle 
+	are now deprecated in GTK+ 3.
+	* gtk/src/styleprovider.[hg|ccg]: Added this class, used by StyleContext, 
+	though no methods are wrapped yet.
+	* gtk/src/iconset.hg: Remove render_icon(), replacing it with 
+	render_icon_pixbuf(), which uses StyleContext instead of Style.
+	* gtk/src/widget.[hg|ccg]: Removed the modify_*() methods, replacing them 
+	with override_*() methods, which use StyleContext instead of RcStyle and 
+	Style.
+
+2010-12-06  Murray Cumming  <murrayc murrayc com>
+
 	Added Gtk::StyleContext.
 
 	* gtk/src/gtk_enums.defs: Regenerated with enums.pl.
diff --git a/gtk/gtkmm.h b/gtk/gtkmm.h
index 615737e..e389d70 100644
--- a/gtk/gtkmm.h
+++ b/gtk/gtkmm.h
@@ -143,7 +143,6 @@ extern const int gtkmm_micro_version;
 #include <gtkmm/fontselection.h>
 #include <gtkmm/frame.h>
 #include <gtkmm/grid.h>
-//#include <gtkmm/rc.h>
 #include <gtkmm/handlebox.h>
 #include <gtkmm/iconset.h>
 #include <gtkmm/iconfactory.h>
@@ -216,7 +215,7 @@ extern const int gtkmm_micro_version;
 #include <gtkmm/stock.h>
 #include <gtkmm/stockid.h>
 #include <gtkmm/stockitem.h>
-#include <gtkmm/style.h>
+#include <gtkmm/stylecontext.h>
 #include <gtkmm/switch.h>
 #include <gtkmm/table.h>
 #include <gtkmm/tearoffmenuitem.h>
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index 746c344..4e7338d 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -113,7 +113,6 @@ gtkmm_files_any_hg =		\
 	radiomenuitem.hg	\
 	radiotoolbutton.hg	\
 	range.hg		\
-	rc.hg			\
 	recentaction.hg		\
 	recentchooser.hg	\
 	recentchooserdialog.hg	\
@@ -140,8 +139,8 @@ gtkmm_files_any_hg =		\
 	statusbar.hg		\
 	statusicon.hg		\
 	stockitem.hg		\
-	style.hg		\
 	stylecontext.hg		\
+	styleprovider.hg		\
 	switch.hg \
 	table.hg		\
 	targetlist.hg		\
diff --git a/gtk/src/iconset.hg b/gtk/src/iconset.hg
index 62316e1..d11749b 100644
--- a/gtk/src/iconset.hg
+++ b/gtk/src/iconset.hg
@@ -19,7 +19,7 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-//#include <gtkmm/style.h>
+#include <gtkmm/stylecontext.h>
 #include <gdkmm/pixbuf.h>
 #include <gtkmm/iconsource.h>
 //#include <gtkmm/widget.h>
@@ -31,10 +31,10 @@ _DEFS(gtkmm,gtk)
 namespace Gtk
 {
 
-class Style;
+class StyleContext;
 class Widget;
 
-//TODO_API: Is _CLASS_BOXEDTYPE the appropriate thing to use here.
+//TODO: Is _CLASS_BOXEDTYPE the appropriate thing to use here.
 //This seems to be reference-counted, not copied.
 
 /** This manages a set of variants of a particular icon 
@@ -50,11 +50,9 @@ public:
 
   _WRAP_METHOD(IconSet copy() const, gtk_icon_set_copy)
 
-  //Note that we use Gtk::StateType here instead of StateType, because there is an Atk::StateType too, and doxygen gets confused.
-  _WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> render_icon(const Glib::RefPtr<Style>& style, TextDirection direction,
-                                          Gtk::StateType state, IconSize size,
-                                          Widget& widget, const Glib::ustring& detail), gtk_icon_set_render_icon)
-
+  _WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> render_icon_pixbuf(const Glib::RefPtr<StyleContext>& context, IconSize size), gtk_icon_set_render_icon_pixbuf)
+  _IGNORE(gtk_icon_set_render_icon) //deprecated.
+  
   _WRAP_METHOD(void add_source(const IconSource& source), gtk_icon_set_add_source)
 
   Glib::ArrayHandle<IconSize> get_sizes() const;
diff --git a/gtk/src/stylecontext.hg b/gtk/src/stylecontext.hg
index 3f45c21..731870c 100644
--- a/gtk/src/stylecontext.hg
+++ b/gtk/src/stylecontext.hg
@@ -19,6 +19,8 @@ _DEFS(gtkmm,gtk)
 _PINCLUDE(glibmm/private/object_p.h)
 _PINCLUDE(gtk/gtk.h)
 
+#include <gtkmm/styleprovider.h>
+#include <gtkmm/border.h>
 #include <gtkmm/enums.h>
 #include <gdkmm/window.h>
 #include <gdkmm/screen.h>
@@ -32,6 +34,12 @@ _PINCLUDE(gtk/gtk.h)
 namespace Gtk
 {
 
+class IconSet;
+
+/** TODO
+ *
+ * @newin{3,0}
+ */
 class StyleContext : public Glib::Object
 {
   _CLASS_GOBJECT(StyleContext, GtkStyleContext, GTK_STYLE_CONTEXT, Glib::Object, GObject)
@@ -42,12 +50,12 @@ public:
   _WRAP_CREATE()
   _IGNORE(gtk_style_context_new)
   
-  _WRAP_METHOD(static void add_provider_for_screen(const Glib::RefPtr<Gdk::Screen>& screen, GtkStyleProvider *provider, guint priority), gtk_style_context_add_provider_for_screen)
-  _WRAP_METHOD(static void remove_provider_for_screen(const Glib::RefPtr<Gdk::Screen>& screen, GtkStyleProvider *provider), gtk_style_context_remove_provider_for_screen)
+  _WRAP_METHOD(static void add_provider_for_screen(const Glib::RefPtr<Gdk::Screen>& screen, const Glib::RefPtr<StyleProvider>& provider, guint priority), gtk_style_context_add_provider_for_screen)
+  _WRAP_METHOD(static void remove_provider_for_screen(const Glib::RefPtr<Gdk::Screen>& screen, const Glib::RefPtr<StyleProvider>& provider), gtk_style_context_remove_provider_for_screen)
 
-  _WRAP_METHOD(void add_provider(GtkStyleProvider *provider, guint priority), gtk_style_context_add_provider)
+  _WRAP_METHOD(void add_provider(const Glib::RefPtr<StyleProvider>& provider, guint priority), gtk_style_context_add_provider)
 
-  _WRAP_METHOD(void remove_provider(GtkStyleProvider *provider), gtk_style_context_remove_provider)
+  _WRAP_METHOD(void remove_provider(const Glib::RefPtr<StyleProvider>& provider), gtk_style_context_remove_provider)
 
   _WRAP_METHOD(void context_save(), gtk_style_context_save)
   _WRAP_METHOD(void context_restore(), gtk_style_context_restore)
@@ -68,10 +76,10 @@ public:
   _WRAP_METHOD(void set_state(StateFlags flags), gtk_style_context_set_state)
   _WRAP_METHOD(StateFlags get_state() const, gtk_style_context_get_state)
 
-  _WRAP_METHOD(bool state_is_running(GtkStateType state, gdouble* progress), gtk_style_context_state_is_running)
+  _WRAP_METHOD(bool state_is_running(StateType state, gdouble* progress), gtk_style_context_state_is_running)
 
-  _WRAP_METHOD(void set_path(GtkWidgetPath   *path), gtk_style_context_set_path)
-  _WRAP_METHOD(const GtkWidgetPath* get_path(), gtk_style_context_get_path)
+  //TODO: _WRAP_METHOD(void set_path(GtkWidgetPath* path), gtk_style_context_set_path)
+  //TODO: _WRAP_METHOD(const GtkWidgetPath* get_path(), gtk_style_context_get_path)
 
   //TODO: _WRAP_METHOD(GList * list_classes (), gtk_style_context_list_classes)
 
@@ -94,10 +102,10 @@ public:
                                            ...), gtk_style_context_get_style)
 */
 
-  _WRAP_METHOD(GtkIconSet* lookup_icon_set(const Glib::ustring& stock_id), gtk_style_context_lookup_icon_set)
+  _WRAP_METHOD(IconSet lookup_icon_set(const Glib::ustring& stock_id), gtk_style_context_lookup_icon_set)
 
 /* TODO: Move this to Iconset?
-  _WRAP_METHOD(GdkPixbuf  * gtk_icon_set_render_icon_pixbuf   (GtkIconSet      *icon_set,
+  _WRAP_METHOD(GdkPixbuf  * gtk_icon_set_render_icon_pixbuf   (const IconSet& con_set,
                                                 GtkStyleContext *context,
                                                 GtkIconSize      size), gtk_icon_set_render_icon_pixbuf)
 */
@@ -115,7 +123,7 @@ public:
 
   _WRAP_METHOD(bool lookup_color(const Glib::ustring& color_name, Gdk::RGBA& color), gtk_style_context_lookup_color)
 
-  _WRAP_METHOD(void notify_state_change(const Glib::RefPtr<Gdk::Window>& window, gpointer region_id, GtkStateType state, bool state_value), gtk_style_context_notify_state_change)
+  _WRAP_METHOD(void notify_state_change(const Glib::RefPtr<Gdk::Window>& window, gpointer region_id, StateType state, bool state_value), gtk_style_context_notify_state_change)
   _WRAP_METHOD(void push_animatable_region(gpointer region_id), gtk_style_context_push_animatable_region)
   _WRAP_METHOD(void pop_animatable_region(), gtk_style_context_pop_animatable_region)
 
diff --git a/gtk/src/styleprovider.ccg b/gtk/src/styleprovider.ccg
new file mode 100644
index 0000000..caed378
--- /dev/null
+++ b/gtk/src/styleprovider.ccg
@@ -0,0 +1,19 @@
+/* Copyright (C) 2010 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+ 
+#include <gtk/gtk.h>
+
diff --git a/gtk/src/styleprovider.hg b/gtk/src/styleprovider.hg
new file mode 100644
index 0000000..213d436
--- /dev/null
+++ b/gtk/src/styleprovider.hg
@@ -0,0 +1,45 @@
+/* Copyright (C) 2010 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/interface.h>
+#include <gtkmm/enums.h>
+_DEFS(gtkmm,gtk)
+_PINCLUDE(glibmm/private/interface_p.h)
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+typedef struct _GtkStyleProviderIface GtkStyleProviderIface;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+namespace Gtk
+{
+
+/** TODO
+ *
+ * @newin{3,0}
+ */
+class StyleProvider : public Glib::Interface
+{
+  _CLASS_INTERFACE(StyleProvider, GtkStyleProvider, GTK_STYLE_PROVIDER, GtkStyleProviderIface)
+
+public:
+  //TODO
+};
+
+} // namespace Gtk
diff --git a/gtk/src/widget.ccg b/gtk/src/widget.ccg
index 03c4c09..bf19f94 100644
--- a/gtk/src/widget.ccg
+++ b/gtk/src/widget.ccg
@@ -223,43 +223,6 @@ void Widget::class_path(Glib::ustring& path_arg, Glib::ustring& path_reversed)
   path_reversed.assign(rpath_ptr.get(), rpath_ptr.get() + path_length);
 }
 
-void Widget::modify_bg_pixmap(StateType state, const Glib::ustring& pixmap_name)
-{
-  const Glib::RefPtr<RcStyle> modifier_style = get_modifier_style();
-  modifier_style->set_bg_pixmap_name(state, pixmap_name);
-  modify_style(modifier_style);
-}
-
-void Widget::unset_fg(StateType state)
-{
-  gtk_widget_modify_fg(gobj(), static_cast<GtkStateType>(int(state)), 0);
-}
-
-void Widget::unset_bg(StateType state)
-{
-  gtk_widget_modify_bg(gobj(), static_cast<GtkStateType>(int(state)), 0);
-}
-
-void Widget::unset_text(StateType state)
-{
-  gtk_widget_modify_text(gobj(), static_cast<GtkStateType>(int(state)), 0);
-}
-
-void Widget::unset_base(StateType state)
-{
-  gtk_widget_modify_base(gobj(), static_cast<GtkStateType>(int(state)), 0);
-}
-
-void Widget::unset_font()
-{
-  gtk_widget_modify_font(gobj(), 0);
-}
-
-void Widget::unset_cursor()
-{
-  gtk_widget_modify_cursor(gobj(), 0, 0);
-}
-
 Allocation Widget::get_allocation() const
 {
   Allocation allocation;
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index a3a6f27..22d65f3 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -346,112 +346,19 @@ public:
 					       int src_x, int src_y,
 					       int& dest_x, int& dest_y), gtk_widget_translate_coordinates)
 
-/* STYLE */
-  _WRAP_METHOD(bool has_rc_style() const, gtk_widget_has_rc_style)
-  _WRAP_METHOD(void set_style(const Glib::RefPtr<Style>& style), gtk_widget_set_style)
-  void unset_style();
-
-  _WRAP_METHOD(void ensure_style(), gtk_widget_ensure_style)
-  _WRAP_METHOD(Glib::RefPtr<Style> get_style(), gtk_widget_get_style, refreturn)
-  _WRAP_METHOD(Glib::RefPtr<const Style> get_style() const, gtk_widget_get_style, refreturn, constversion)
-  _WRAP_METHOD(void modify_style(const Glib::RefPtr<RcStyle>& style), gtk_widget_modify_style)
-  _WRAP_METHOD(Glib::RefPtr<RcStyle> get_modifier_style(), gtk_widget_get_modifier_style, refreturn)
-  _WRAP_METHOD(Glib::RefPtr<const RcStyle> get_modifier_style() const, gtk_widget_get_modifier_style, refreturn, constversion)
-
-  // we need custom documentation because modify_* can take a NULL pointer
-  // (which we wrap with unset_*)
-  /** Sets the foreground color for a widget in a particular state.
-   * All other style values are left untouched. See also modify_style() and
-   * unset_fg().
-   *
-   * @param state The state for which to set the foreground color.
-   * @param color The color to assign (does not need to be allocated).
-   */
-  _WRAP_METHOD(void modify_fg(StateType state, const Gdk::Color& color), gtk_widget_modify_fg)
-
-
-  /** Sets the background color for a widget in a particular state.
-   * All other style values are left untouched. See also modify_style() and
-   * unset_bg().
-   *
-   * @param state The state for which to set the background color.
-   * @param color The color to assign (does not need to be allocated).
-   */
-  _WRAP_METHOD(void modify_bg(StateType state, const Gdk::Color& color), gtk_widget_modify_bg)
+  _IGNORE(gtk_widget_set_style, gtk_widget_get_style, gtk_widget_has_rc_style, gtk_widget_ensure_style,
+    gtk_widget_modify_style, gtk_widget_get_modifier_style, gtk_widget_get_default_style) //deprecated broadly in favour of StyleContext.;
 
-  // TODO: Document this, and perhaps add unset_bg_pixmap
-  void modify_bg_pixmap(StateType state, const Glib::ustring& pixmap_name);
 
-  /** Sets the text color for a widget in a particular state.
-   * All other style values are left untouched. The text color is the
-   * foreground color used along with the base color (see modify_base() ) for
-   * widgets such as Gtk::Entry and Gtk::TextView. See also modify_style() and
-   * unset_text().
-   *
-   * @param state The state for which to set the text color.
-   * @param color The color to assign (does not need to be allocated).
-   */
-  _WRAP_METHOD(void modify_text(StateType state, const Gdk::Color& color), gtk_widget_modify_text)
-
-  /** Sets the base color for a widget in a particular state.
-   * All other style values are left untouched. The base color is the
-   * background color used along with the text color (see modify_text() ) for
-   * widgets such as Gtk::Entry and Gtk::TextView. See also modify_style() and
-   * unset_base().
-   *
-   * @param state The state for which to set the text color.
-   * @param color The color to assign (does not need to be allocated).
-   */
-  _WRAP_METHOD(void modify_base(StateType state, const Gdk::Color& color), gtk_widget_modify_base)
-
-  /** Sets the cursor color to use in a widget, overriding the
-   * cursor_color and secondary_cursor_color
-   * style properties. All other style values are left untouched.
-   * See also modify_style().
-   * See also unset_cursor().
-   *
-   * @param primary the color to use for primary cursor (does not need to be allocated).
-   * @param secondary the color to use for secondary cursor (does not need to be allocated).
-   *
-   * @newin{2,12}
-   */
-  _WRAP_METHOD(void modify_cursor(const Gdk::Color& primary, const Gdk::Color& secondary), gtk_widget_modify_cursor)
-
-  /// See modify_cursor().
-  void unset_cursor();
-
-  /** Sets the font to use for a widget.
-   * All other style values are left untouched. See also modify_style() and
-   * unset_font().
-   */
-  _WRAP_METHOD(void modify_font(const Pango::FontDescription& font_desc), gtk_widget_modify_font)
-
-  _WRAP_METHOD(void modify_symbolic_color(const Glib::ustring& name, const Gdk::Color& color), gtk_widget_modify_symbolic_color)
-
-  /** Undo the effect of previous calls to modify_fg() for a particular state.
-   * All other style values are left untouched. See also modify_style().
-   */
-  void unset_fg(StateType state);
-
-  /** Undo the effect of previous calls to modify_bg() for a particular state.
-   * All other style values are left untouched. See also modify_style().
-   */
-  void unset_bg(StateType state);
-
-  /** Undo the effect of previous calls to modify_text() for a particular state.
-   * All other style values are left untouched. See also modify_style().
-   */
-  void unset_text(StateType state);
-
-  /** Undo the effect of previous calls to modify_base() for a particular state.
-   * All other style values are left untouched. See also modify_style().
-   */
-  void unset_base(StateType state);
-
-  /** Undo the effect of previous calls to modify_font() for a particular state.
-   * All other style values are left untouched. See also modify_style().
-   */
-  void unset_font();
+//TODO: Add unset_*() methods?
+  _WRAP_METHOD(void override_color(StateFlags state, const Gdk::RGBA& color), gtk_widget_override_color)
+  _WRAP_METHOD(void override_background_color(StateFlags state ,const Gdk::RGBA& color), gtk_widget_override_background_color)
+  _WRAP_METHOD(void override_font(const Pango::FontDescription& font_desc), gtk_widget_override_font)
+  _WRAP_METHOD(void override_symbolic_color(const Glib::ustring& name, const Gdk::RGBA& color), gtk_widget_override_symbolic_color)
+  _WRAP_METHOD(void override_cursor(const Gdk::RGBA& cursor, const Gdk::RGBA& secondary_cursor), gtk_widget_override_cursor)
+                                                   
+  _IGNORE(gtk_widget_modify_fg, gtk_widget_modify_bg, gtk_widget_modify_font, gtk_widget_modify_text,
+     gtk_widget_modify_base, gtk_widget_modify_cursor, gtk_widget_modify_symbolic_color) //deprecated 
 
   //The parameter name is "the_property_name" to avoid a warning because there is a method with the "property_name" name.
   template <class PropertyType>
@@ -475,7 +382,6 @@ public:
 
 /* DEFAULTS */
 
-  _WRAP_METHOD(static Glib::RefPtr<Style> get_default_style(), gtk_widget_get_default_style, refreturn)
   _WRAP_METHOD(static Glib::RefPtr<Gdk::Visual> get_default_visual(), gtk_widget_get_default_visual, refreturn)
 
 /* Directionality of Text */
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index d8e8231..8536275 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -204,14 +204,10 @@ _CONVERSION(`GtkWindow*',`const Window*',__RP2P)
 _CONVERSION(`GtkToolItem*',`const ToolItem*',__RP2P)
 
 # Style:
-_CONVERSION(`GtkStyle*',`Glib::RefPtr<Style>',`Glib::wrap($3)')
-_CONVERSION(`GtkStyle*',`Glib::RefPtr<const Style>',`Glib::wrap($3)')
-_CONVERSION(`const Glib::RefPtr<Style>&',`GtkStyle*',__CONVERT_REFPTR_TO_P)
-_CONVERSION(`Glib::RefPtr<Style>',`GtkStyle*',__CONVERT_REFPTR_TO_P)
-_CONVERSION(`GtkRcStyle*',`Glib::RefPtr<RcStyle>',`Glib::wrap($3)')
-_CONVERSION(`GtkRcStyle*',`Glib::RefPtr<const RcStyle>',`Glib::wrap($3)')
-_CONVERSION(`const Glib::RefPtr<RcStyle>&',`GtkRcStyle*',__CONVERT_REFPTR_TO_P)
-_CONVERSION(`Glib::RefPtr<RcStyle>',`GtkRcStyle*',__CONVERT_REFPTR_TO_P)
+_CONVERSION(`GtkStyleContext*',`Glib::RefPtr<StyleContext>',`Glib::wrap($3)')
+_CONVERSION(`const Glib::RefPtr<StyleContext>&',`GtkStyleContext*',__CONVERT_REFPTR_TO_P)
+_CONVERSION(`GtkStyleProvider*',`Glib::RefPtr<StyleProvider>',`Glib::wrap($3)')
+_CONVERSION(`const Glib::RefPtr<StyleProvider>&',`GtkStyleProvider*',__CONVERT_REFPTR_TO_P)
 
 # AccelGroup:
 _CONVERSION(`GtkAccelGroup*',`Glib::RefPtr<AccelGroup>',`Glib::wrap($3)')
diff --git a/tools/m4/convert_pango.m4 b/tools/m4/convert_pango.m4
index 1b6db57..cf122bc 100644
--- a/tools/m4/convert_pango.m4
+++ b/tools/m4/convert_pango.m4
@@ -61,6 +61,7 @@ _CONVERSION(`const PangoFontDescription*',`FontDescription',`FontDescription(con
 _CONVERSION(`Pango::FontDescription&',`PangoFontDescription*',`($3).gobj()')
 _CONVERSION(`FontDescription&',`PangoFontDescription*',`($3).gobj()')
 _CONVERSION(`const FontDescription&',`const PangoFontDescription*',`($3).gobj()')
+_CONVERSION(`const Pango::FontDescription&',`const PangoFontDescription*',`($3).gobj()')
 _CONVERSION(`const Pango::FontDescription&',`PangoFontDescription*',`const_cast<PangoFontDescription*>(`($3).gobj()')')
 _CONVERSION(`const FontDescription&',`PangoFontDescription*',`const_cast<PangoFontDescription*>(`($3).gobj()')')
 



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