From 2e56a23e9f5a70716208eda4569ec59e4dc9423c Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Mon, 1 Apr 2013 23:54:41 +0100 Subject: [PATCH] gtk: Track API changes (I- interface prefixes) This includes changes to fix the build, and changes to custom code that gets added to the generated code. I.e. TreeModel now becomes ITreeModel --- gtk/CellRenderer.cs | 4 ++-- gtk/{CellLayout.cs => ICellLayout.cs} | 2 +- gtk/{TreeModel.cs => ITreeModel.cs} | 2 +- gtk/Makefile.am | 4 ++-- gtk/NodeStore.cs | 6 +++--- gtk/TreeEnumerator.cs | 6 +++--- gtk/gtk.csproj | 6 +++--- 7 files changed, 15 insertions(+), 15 deletions(-) rename gtk/{CellLayout.cs => ICellLayout.cs} (95%) rename gtk/{TreeModel.cs => ITreeModel.cs} (97%) diff --git a/gtk/CellRenderer.cs b/gtk/CellRenderer.cs index 0914a1928..70c51588e 100644 --- a/gtk/CellRenderer.cs +++ b/gtk/CellRenderer.cs @@ -31,12 +31,12 @@ namespace Gtk { [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_cell_renderer_start_editing (IntPtr handle, IntPtr evnt, IntPtr widget, IntPtr path, ref Gdk.Rectangle bg_area, ref Gdk.Rectangle cell_area, int flags); - public CellEditable StartEditing (Widget widget, Gdk.Event evnt, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, CellRendererState flags) + public ICellEditable StartEditing (Widget widget, Gdk.Event evnt, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, CellRendererState flags) { IntPtr native = GLib.Marshaller.StringToPtrGStrdup (path); IntPtr raw_ret = gtk_cell_renderer_start_editing (Handle, evnt.Handle, widget.Handle, native, ref background_area, ref cell_area, (int) flags); GLib.Marshaller.Free (native); - Gtk.CellEditable ret = (Gtk.CellEditable) GLib.Object.GetObject(raw_ret); + var ret = (ICellEditable) GLib.Object.GetObject (raw_ret); return ret; } diff --git a/gtk/CellLayout.cs b/gtk/ICellLayout.cs similarity index 95% rename from gtk/CellLayout.cs rename to gtk/ICellLayout.cs index d419d8f59..a639a2cf8 100644 --- a/gtk/CellLayout.cs +++ b/gtk/ICellLayout.cs @@ -22,7 +22,7 @@ namespace Gtk { using System; - public partial interface CellLayout { + public partial interface ICellLayout { void SetAttributes (CellRenderer renderer, object[] attrs); diff --git a/gtk/TreeModel.cs b/gtk/ITreeModel.cs similarity index 97% rename from gtk/TreeModel.cs rename to gtk/ITreeModel.cs index fdeb93a08..17d27adcc 100644 --- a/gtk/TreeModel.cs +++ b/gtk/ITreeModel.cs @@ -22,7 +22,7 @@ namespace Gtk { using System; - public partial interface TreeModel { + public partial interface ITreeModel { /// IterChildren Method /// To be completed diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 5db750b22..cb858dd62 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -24,7 +24,6 @@ sources = \ Button.cs \ Calendar.cs \ CellAreaBox.cs \ - CellLayout.cs \ CellLayoutAdapter.cs \ CellRenderer.cs \ CellView.cs \ @@ -44,6 +43,7 @@ sources = \ Global.cs \ HBox.cs \ HScale.cs \ + ICellLayout.cs \ IconFactory.cs \ IconSet.cs \ IconTheme.cs \ @@ -51,6 +51,7 @@ sources = \ Image.cs \ ImageMenuItem.cs \ Init.cs \ + ITreeModel.cs \ ITreeNode.cs \ Key.cs \ Label.cs \ @@ -98,7 +99,6 @@ sources = \ TreeEnumerator.cs \ TreeIter.cs \ TreeMenu.cs \ - TreeModel.cs \ TreeModelAdapter.cs \ TreeModelFilter.cs \ TreeModelSort.cs \ diff --git a/gtk/NodeStore.cs b/gtk/NodeStore.cs index db249191d..e6e7479a7 100644 --- a/gtk/NodeStore.cs +++ b/gtk/NodeStore.cs @@ -81,7 +81,7 @@ namespace Gtk { return implementor.GetEnumerator (); } - internal class NodeStoreImplementor : GLib.Object, TreeModelImplementor, IEnumerable { + internal class NodeStoreImplementor : GLib.Object, ITreeModelImplementor, IEnumerable { TreeModelAdapter model_adapter; GLib.GType[] ctypes; MemberInfo [] getters; @@ -239,8 +239,8 @@ namespace Gtk { return gch.Target as ITreeNode; } - void TreeModelImplementor.RefNode (Gtk.TreeIter iter) { } - void TreeModelImplementor.UnrefNode (Gtk.TreeIter iter) { } + void ITreeModelImplementor.RefNode (Gtk.TreeIter iter) { } + void ITreeModelImplementor.UnrefNode (Gtk.TreeIter iter) { } #endregion public bool GetIter (out TreeIter iter, TreePath path) diff --git a/gtk/TreeEnumerator.cs b/gtk/TreeEnumerator.cs index ce07841bf..9bbc5501d 100644 --- a/gtk/TreeEnumerator.cs +++ b/gtk/TreeEnumerator.cs @@ -1,4 +1,4 @@ -// TreeEnumerator.cs - .NET-style Enumerator for TreeModel classes +// TreeEnumerator.cs - .NET-style Enumerator for ITreeModel classes // // Author: Eric Butler // @@ -27,11 +27,11 @@ namespace Gtk internal class TreeEnumerator : IEnumerator { private Gtk.TreeIter iter; - private Gtk.TreeModel model; + private Gtk.ITreeModel model; private bool reset = true; private bool changed = false; - public TreeEnumerator (TreeModel model) + public TreeEnumerator (ITreeModel model) { this.model = model; diff --git a/gtk/gtk.csproj b/gtk/gtk.csproj index bf5bf788f..497e90ae8 100644 --- a/gtk/gtk.csproj +++ b/gtk/gtk.csproj @@ -48,7 +48,7 @@ - + @@ -121,7 +121,7 @@ - + @@ -950,4 +950,4 @@ gdk - \ No newline at end of file +