gtkmm r990 - in trunk: . gtk/src



Author: arminb
Date: Fri Apr 11 18:51:33 2008
New Revision: 990
URL: http://svn.gnome.org/viewvc/gtkmm?rev=990&view=rev

Log:
2008-04-11  Armin Burgmeier  <armin openismus com>

	* gtk/src/recentinfo.ccg:
	* gtk/src/recentinfo.hg: Added a specialization for
	Glib::Value<Glib::RefPtr<Gtk::RecentInfo> > so that
	Glib::RefPtr<Gtk::RecentInfo> can be used with Glib::Value<> and
	Gtk::TreeModelColumn<>.


Modified:
   trunk/ChangeLog
   trunk/gtk/src/recentinfo.ccg
   trunk/gtk/src/recentinfo.hg

Modified: trunk/gtk/src/recentinfo.ccg
==============================================================================
--- trunk/gtk/src/recentinfo.ccg	(original)
+++ trunk/gtk/src/recentinfo.ccg	Fri Apr 11 18:51:33 2008
@@ -49,3 +49,23 @@
 }
 
 } // namespace Gtk
+
+namespace Glib
+{
+
+GType Value<RefPtr<Gtk::RecentInfo> >::value_type()
+{
+  return gtk_recent_info_get_type();
+}
+
+void Value<RefPtr<Gtk::RecentInfo> >::set(const CppType& data)
+{
+  set_boxed(data->gobj());
+}
+
+Value<RefPtr<Gtk::RecentInfo> >::CppType Value<RefPtr<Gtk::RecentInfo> >::get() const
+{
+  return Glib::wrap(static_cast<CType>(get_boxed()), true);
+}
+
+} // namespace Glib

Modified: trunk/gtk/src/recentinfo.hg
==============================================================================
--- trunk/gtk/src/recentinfo.hg	(original)
+++ trunk/gtk/src/recentinfo.hg	Fri Apr 11 18:51:33 2008
@@ -110,3 +110,24 @@
   { return !lhs.equal(rhs); }
 
 } // namespace Gtk
+
+namespace Glib
+{
+
+// This is needed so Glib::RefPtr<Gtk::RecentInfo> can be used with
+// Glib::Value and Gtk::TreeModelColumn:
+template<>
+class Value<Glib::RefPtr<Gtk::RecentInfo> >: public ValueBase_Boxed
+{
+public:
+  typedef Glib::RefPtr<Gtk::RecentInfo> CppType;
+  typedef GtkRecentInfo* CType;
+
+  static GType value_type();
+
+  void set(const CppType& data);
+  CppType get() const;
+};
+
+} // namespace Glib
+



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