From c312fb739cf93a45edf973b49441de8384ae83d2 Mon Sep 17 00:00:00 2001 From: Bertrand Lorentz Date: Sat, 3 Nov 2012 17:50:05 +0100 Subject: [PATCH] gtk: Move interface declaration from fix-up to custom code As we now use partial classes for custom code, we can put additional interface implementation declaration in the custom code, instead of adding it through a fix-up. Side-note: I thought about moving to IEnumerable, but ListStore is a list of objects anyway, and Container is an array of Widgets, so there wouldn't be much benefit from type safety. --- gtk/Container.cs | 2 +- gtk/Gtk.metadata | 2 -- gtk/ListStore.cs | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/gtk/Container.cs b/gtk/Container.cs index 120c4c20f..28ca2514c 100644 --- a/gtk/Container.cs +++ b/gtk/Container.cs @@ -24,7 +24,7 @@ namespace Gtk { using System.Collections; using System.Runtime.InteropServices; - public partial class Container { + public partial class Container : IEnumerable { [DllImport("gtksharpglue-3")] static extern void gtksharp_container_child_get_property (IntPtr container, IntPtr child, IntPtr property, ref GLib.Value value); diff --git a/gtk/Gtk.metadata b/gtk/Gtk.metadata index 0f438ca8b..d046074a5 100644 --- a/gtk/Gtk.metadata +++ b/gtk/Gtk.metadata @@ -312,7 +312,6 @@ SetTearoffTitle PoppedDown PoppedUp - 1 1 1 @@ -432,7 +431,6 @@ 1 1 1 - 1 1 out diff --git a/gtk/ListStore.cs b/gtk/ListStore.cs index 757ebe6c9..8e60f504d 100644 --- a/gtk/ListStore.cs +++ b/gtk/ListStore.cs @@ -24,7 +24,7 @@ namespace Gtk { using System.Collections; using System.Runtime.InteropServices; - public partial class ListStore { + public partial class ListStore : IEnumerable { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent);