From c5e694fcff2c693300b894710064816454194c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20G=2E=20Aragoneses?= Date: Tue, 5 Aug 2014 17:56:03 +0200 Subject: [PATCH 1/3] generator: Overhaul GInterface type naming approach In the past, for the GInterface Foo we used to have: a) FooAdapter: the helper class to use GInterface implementations. b) Foo: the interface with the methods from native side. c) FooImplementor: the interface to inherit from .NET classes. Learning about these special suffixes "Adapter" and "Implementor" was a bit cumbersome and not very API-consumer friendly. Some months ago we modified gtk-sharp's generator to follow the "I" prefix convention for .NET interfaces, which leaves us as: a) FooAdapter. b) IFoo. c) IFooImplementor. This is good because now the name "Foo" is free, so we can rename "FooAdapter" to "Foo", and there's one less thing to learn (so this is one of the things this commit achieves). The next step is, then, getting rid of the "Implementor" suffix, how? Simply switching the way this is exposed, as: b) IFoo -> IFooBase c) IFooImplementor -> IFoo This way, if one wants to create a .NET class that implements the GInterface Foo, she simply needs to inherit from "IFoo". And when consuming, from .NET, native classes that implement the Foo GInterface, the interface they will implement will be IFooBase instead of IFoo (but there's no need to learn this because by using the API you will simply be exposed to it). Reviewed-by: Stephan Sundermann --- generator/InterfaceGen.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generator/InterfaceGen.cs b/generator/InterfaceGen.cs index e29c3c407..98e597611 100644 --- a/generator/InterfaceGen.cs +++ b/generator/InterfaceGen.cs @@ -63,7 +63,7 @@ public bool IsConsumeOnly { public string AdapterName { get { - return base.Name + "Adapter"; + return base.Name; } } @@ -75,13 +75,13 @@ public string QualifiedAdapterName { public string ImplementorName { get { - return Name + "Implementor"; + return "I" + base.Name; } } public override string Name { get { - return "I" + base.Name; + return "I" + base.Name + "Base"; } } From ba46da286e9bc03a86081f585dfcc4fb90be0480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20G=2E=20Aragoneses?= Date: Tue, 5 Aug 2014 18:04:23 +0200 Subject: [PATCH 2/3] atk,gio,gtk,sample: Track API changes from previous commit We also rename "Implementor" property of adapters to the slightly more convoluted "VirtualImplementor", but the reason is that Atk.Implementor.Implementor wouldn't be a valid property because its name would match with the class name. --- atk/SelectionAdapter.cs | 2 +- atk/TextAdapter.cs | 2 +- generator/InterfaceGen.cs | 2 +- gio/AppInfoAdapter.cs | 7 +++---- gio/FileAdapter.cs | 2 +- gio/FileFactory.cs | 16 ++++++++-------- gio/GioStream.cs | 12 ++++++------ gio/IFile.cs | 2 +- gtk/CellLayoutAdapter.cs | 2 +- gtk/ITreeModel.cs | 2 +- gtk/NodeStore.cs | 14 +++++++------- gtk/TreeEnumerator.cs | 4 ++-- gtk/TreeModelAdapter.cs | 2 +- sample/CustomScrollableWidget.cs | 2 +- sample/GtkDemo/DemoEditableCells.cs | 2 +- sample/GtkDemo/DemoEntryCompletion.cs | 2 +- sample/GtkDemo/DemoMain.cs | 2 +- sample/GtkDemo/DemoStockBrowser.cs | 2 +- sample/ManagedTreeViewDemo.cs | 4 ++-- sample/TreeModelDemo.cs | 4 ++-- sample/gio/AppInfo.cs | 8 ++++---- sample/gio/Volume.cs | 10 +++++----- sample/gtk-gio/MountOperation.cs | 4 ++-- 23 files changed, 54 insertions(+), 55 deletions(-) diff --git a/atk/SelectionAdapter.cs b/atk/SelectionAdapter.cs index b5dfebd6a..246fb8c37 100644 --- a/atk/SelectionAdapter.cs +++ b/atk/SelectionAdapter.cs @@ -22,7 +22,7 @@ // Boston, MA 02111-1307, USA. namespace Atk { - public partial class SelectionAdapter { + public partial class Selection { public void EmitSelectionChanged () { diff --git a/atk/TextAdapter.cs b/atk/TextAdapter.cs index 5a1ae79aa..c29749bd2 100644 --- a/atk/TextAdapter.cs +++ b/atk/TextAdapter.cs @@ -22,7 +22,7 @@ // Boston, MA 02111-1307, USA. namespace Atk { - public partial class TextAdapter { + public partial class Text { public void EmitTextChanged (TextChangedDetail detail, int position, int length) { diff --git a/generator/InterfaceGen.cs b/generator/InterfaceGen.cs index 98e597611..2858bcea9 100644 --- a/generator/InterfaceGen.cs +++ b/generator/InterfaceGen.cs @@ -258,7 +258,7 @@ void GenerateGetObject (StreamWriter sw) void GenerateImplementorProp (StreamWriter sw) { - sw.WriteLine ("\t\tpublic " + ImplementorName + " Implementor {"); + sw.WriteLine ("\t\tpublic " + ImplementorName + " VirtualImplementor {"); sw.WriteLine ("\t\t\tget {"); sw.WriteLine ("\t\t\t\treturn implementor as {0};", ImplementorName); sw.WriteLine ("\t\t\t}"); diff --git a/gio/AppInfoAdapter.cs b/gio/AppInfoAdapter.cs index 13d57b6b8..20753436c 100644 --- a/gio/AppInfoAdapter.cs +++ b/gio/AppInfoAdapter.cs @@ -22,14 +22,13 @@ namespace GLib { using System; using System.Runtime.InteropServices; - public partial class AppInfoAdapter { + public partial class AppInfo { [DllImport ("libgio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_app_info_get_all(); - public static GLib.IAppInfo[] GetAll () { + public static GLib.IAppInfoBase[] GetAll () { IntPtr raw_ret = g_app_info_get_all(); - GLib.IAppInfo[] ret = (GLib.IAppInfo[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof (GLib.List), true, false, typeof (GLib.IAppInfo)); - return ret; + return (GLib.IAppInfoBase[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof (GLib.List), true, false, typeof (GLib.IAppInfoBase)); } } } diff --git a/gio/FileAdapter.cs b/gio/FileAdapter.cs index 3efec2234..509a8a0c3 100644 --- a/gio/FileAdapter.cs +++ b/gio/FileAdapter.cs @@ -22,7 +22,7 @@ namespace GLib { using System; using System.Runtime.InteropServices; - public partial class FileAdapter { + public partial class File { public override string ToString () { return Uri.ToString (); diff --git a/gio/FileFactory.cs b/gio/FileFactory.cs index bc0bb2127..ef219bf8a 100644 --- a/gio/FileFactory.cs +++ b/gio/FileFactory.cs @@ -30,30 +30,30 @@ public class FileFactory [DllImport ("libgio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr g_file_new_for_uri (string uri); - public static IFile NewForUri (string uri) + public static IFileBase NewForUri (string uri) { - return GLib.FileAdapter.GetObject (g_file_new_for_uri (uri), false) as IFile; + return GLib.File.GetObject (g_file_new_for_uri (uri), false) as IFileBase; } - public static IFile NewForUri (Uri uri) + public static IFileBase NewForUri (Uri uri) { - return GLib.FileAdapter.GetObject (g_file_new_for_uri (uri.ToString ()), false) as IFile; + return GLib.File.GetObject (g_file_new_for_uri (uri.ToString ()), false) as IFileBase; } [DllImport ("libgio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr g_file_new_for_path (string path); - public static IFile NewForPath (string path) + public static IFileBase NewForPath (string path) { - return GLib.FileAdapter.GetObject (g_file_new_for_path (path), false) as IFile; + return GLib.File.GetObject (g_file_new_for_path (path), false) as IFileBase; } [DllImport ("libgio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr g_file_new_for_commandline_arg (string arg); - public static IFile NewFromCommandlineArg (string arg) + public static IFileBase NewFromCommandlineArg (string arg) { - return GLib.FileAdapter.GetObject (g_file_new_for_commandline_arg (arg), false) as IFile; + return GLib.File.GetObject (g_file_new_for_commandline_arg (arg), false) as IFileBase; } } } diff --git a/gio/GioStream.cs b/gio/GioStream.cs index b27ee946f..4e59e6323 100644 --- a/gio/GioStream.cs +++ b/gio/GioStream.cs @@ -53,14 +53,14 @@ public GioStream (InputStream stream) { this.stream = stream; can_read = true; - can_seek = stream is ISeekable && (stream as ISeekable).CanSeek; + can_seek = stream is ISeekableBase && (stream as ISeekableBase).CanSeek; } public GioStream (OutputStream stream) { this.stream = stream; can_write = true; - can_seek = stream is ISeekable && (stream as ISeekable).CanSeek; + can_seek = stream is ISeekableBase && (stream as ISeekableBase).CanSeek; } public GioStream (IOStream stream) @@ -68,7 +68,7 @@ public GioStream (IOStream stream) this.stream = stream; can_read = true; can_write = true; - can_seek = stream is ISeekable && (stream as ISeekable).CanSeek; + can_seek = stream is ISeekableBase && (stream as ISeekableBase).CanSeek; } public override bool CanSeek { @@ -112,7 +112,7 @@ public override long Position { throw new NotSupportedException ("This stream doesn't support seeking"); if (is_disposed) throw new ObjectDisposedException ("The stream is closed"); - return (stream as ISeekable).Position; + return (stream as ISeekableBase).Position; } set { Seek (value, System.IO.SeekOrigin.Begin); @@ -195,7 +195,7 @@ public override long Seek (long offset, System.IO.SeekOrigin origin) throw new NotSupportedException ("This stream doesn't support seeking"); if (is_disposed) throw new ObjectDisposedException ("The stream is closed"); - var seekable = stream as ISeekable; + var seekable = stream as ISeekableBase; SeekType seek_type; switch (origin) { @@ -219,7 +219,7 @@ public override void SetLength (long value) if (!CanSeek || !CanWrite) throw new NotSupportedException ("This stream doesn't support seeking"); - var seekable = stream as ISeekable; + var seekable = stream as ISeekableBase; if (!seekable.CanTruncate ()) throw new NotSupportedException ("This stream doesn't support truncating"); diff --git a/gio/IFile.cs b/gio/IFile.cs index 344c9e4ad..201ced302 100644 --- a/gio/IFile.cs +++ b/gio/IFile.cs @@ -19,7 +19,7 @@ // Boston, MA 02111-1307, USA. namespace GLib { - public partial interface IFile : GLib.IWrapper { + public partial interface IFileBase : GLib.IWrapper { bool Exists { get; diff --git a/gtk/CellLayoutAdapter.cs b/gtk/CellLayoutAdapter.cs index c2b42e913..3cb01c6b2 100644 --- a/gtk/CellLayoutAdapter.cs +++ b/gtk/CellLayoutAdapter.cs @@ -22,7 +22,7 @@ namespace Gtk { using System; - public partial class CellLayoutAdapter { + public partial class CellLayout { public void SetAttributes (CellRenderer cell, params object[] attrs) { diff --git a/gtk/ITreeModel.cs b/gtk/ITreeModel.cs index 17d27adcc..0582969f4 100644 --- a/gtk/ITreeModel.cs +++ b/gtk/ITreeModel.cs @@ -22,7 +22,7 @@ namespace Gtk { using System; - public partial interface ITreeModel { + public partial interface ITreeModelBase { /// IterChildren Method /// To be completed diff --git a/gtk/NodeStore.cs b/gtk/NodeStore.cs index e6e7479a7..32761b6ed 100644 --- a/gtk/NodeStore.cs +++ b/gtk/NodeStore.cs @@ -37,8 +37,8 @@ public NodeStore (Type node_type) implementor = new NodeStoreImplementor (node_type); } - internal TreeModelAdapter Adapter { - get { return new TreeModelAdapter (implementor); } + internal TreeModel Adapter { + get { return new TreeModel (implementor); } } internal TreeIter GetIter (ITreeNode node) @@ -81,8 +81,8 @@ public IEnumerator GetEnumerator () return implementor.GetEnumerator (); } - internal class NodeStoreImplementor : GLib.Object, ITreeModelImplementor, IEnumerable { - TreeModelAdapter model_adapter; + internal class NodeStoreImplementor : GLib.Object, ITreeModel, IEnumerable { + TreeModel model_adapter; GLib.GType[] ctypes; MemberInfo [] getters; int n_cols; @@ -99,7 +99,7 @@ public NodeStoreImplementor (Type node_type) ScanType (node_type); - model_adapter = new Gtk.TreeModelAdapter (this); + model_adapter = new Gtk.TreeModel (this); } void ScanType (Type type) @@ -239,8 +239,8 @@ public ITreeNode GetNode (TreeIter iter) return gch.Target as ITreeNode; } - void ITreeModelImplementor.RefNode (Gtk.TreeIter iter) { } - void ITreeModelImplementor.UnrefNode (Gtk.TreeIter iter) { } + void ITreeModel.RefNode (Gtk.TreeIter iter) { } + void ITreeModel.UnrefNode (Gtk.TreeIter iter) { } #endregion public bool GetIter (out TreeIter iter, TreePath path) diff --git a/gtk/TreeEnumerator.cs b/gtk/TreeEnumerator.cs index 9bbc5501d..d7edaa572 100644 --- a/gtk/TreeEnumerator.cs +++ b/gtk/TreeEnumerator.cs @@ -27,11 +27,11 @@ namespace Gtk internal class TreeEnumerator : IEnumerator { private Gtk.TreeIter iter; - private Gtk.ITreeModel model; + private Gtk.ITreeModelBase model; private bool reset = true; private bool changed = false; - public TreeEnumerator (ITreeModel model) + public TreeEnumerator (ITreeModelBase model) { this.model = model; diff --git a/gtk/TreeModelAdapter.cs b/gtk/TreeModelAdapter.cs index 3a17f344e..ce4eac1e6 100644 --- a/gtk/TreeModelAdapter.cs +++ b/gtk/TreeModelAdapter.cs @@ -23,7 +23,7 @@ namespace Gtk { using System; using System.Runtime.InteropServices; - public partial class TreeModelAdapter { + public partial class TreeModel { [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); diff --git a/sample/CustomScrollableWidget.cs b/sample/CustomScrollableWidget.cs index a06e03c18..960477d27 100644 --- a/sample/CustomScrollableWidget.cs +++ b/sample/CustomScrollableWidget.cs @@ -54,7 +54,7 @@ public DerivedScrollableWidget (string label) : base (label) { } } -class CustomScrollableWidget : CustomBase, IScrollableImplementor { +class CustomScrollableWidget : CustomBase, IScrollable { private int num_rows = 20; private string label; private Pango.Layout layout; diff --git a/sample/GtkDemo/DemoEditableCells.cs b/sample/GtkDemo/DemoEditableCells.cs index 35173da7b..8e5ae2ce1 100644 --- a/sample/GtkDemo/DemoEditableCells.cs +++ b/sample/GtkDemo/DemoEditableCells.cs @@ -162,7 +162,7 @@ private void AddItem (object o, EventArgs args) private void RemoveItem (object o, EventArgs args) { TreeIter iter; - ITreeModel model; + ITreeModelBase model; if (treeView.Selection.GetSelected (out model, out iter)) { int position = store.GetPath (iter).Indices[0]; diff --git a/sample/GtkDemo/DemoEntryCompletion.cs b/sample/GtkDemo/DemoEntryCompletion.cs index b44d4235e..457202080 100644 --- a/sample/GtkDemo/DemoEntryCompletion.cs +++ b/sample/GtkDemo/DemoEntryCompletion.cs @@ -38,7 +38,7 @@ public DemoEntryCompletion () : base ("Demo Entry Completion", null, DialogFlags Destroy (); } - ITreeModel CreateCompletionModel () + ITreeModelBase CreateCompletionModel () { ListStore store = new ListStore (typeof (string)); diff --git a/sample/GtkDemo/DemoMain.cs b/sample/GtkDemo/DemoMain.cs index 82fb4a3e8..2131773ca 100644 --- a/sample/GtkDemo/DemoMain.cs +++ b/sample/GtkDemo/DemoMain.cs @@ -222,7 +222,7 @@ private TreeStore FillTree () private void TreeChanged (object o, EventArgs args) { TreeIter iter; - ITreeModel model; + ITreeModelBase model; if (treeView.Selection.GetSelected (out model, out iter)) { Type type = (Type) model.GetValue (iter, 1); diff --git a/sample/GtkDemo/DemoStockBrowser.cs b/sample/GtkDemo/DemoStockBrowser.cs index c857dac66..25a37fd3c 100644 --- a/sample/GtkDemo/DemoStockBrowser.cs +++ b/sample/GtkDemo/DemoStockBrowser.cs @@ -118,7 +118,7 @@ void SelectionChanged (object o, EventArgs args) { TreeSelection selection = (TreeSelection)o; TreeIter iter; - ITreeModel model; + ITreeModelBase model; if (selection.GetSelected (out model, out iter)) { string id = (string) model.GetValue (iter, (int)Column.Id); diff --git a/sample/ManagedTreeViewDemo.cs b/sample/ManagedTreeViewDemo.cs index a5024d876..7e1bf9bca 100644 --- a/sample/ManagedTreeViewDemo.cs +++ b/sample/ManagedTreeViewDemo.cs @@ -32,13 +32,13 @@ private static void PopulateStore () } } - private static void CellDataA (Gtk.TreeViewColumn tree_column, Gtk.CellRenderer cell, Gtk.ITreeModel tree_model, Gtk.TreeIter iter) + private static void CellDataA (Gtk.TreeViewColumn tree_column, Gtk.CellRenderer cell, Gtk.ITreeModelBase tree_model, Gtk.TreeIter iter) { Pair val = (Pair) store.GetValue (iter, 0); ((CellRendererText) cell).Text = val.a; } - private static void CellDataB (Gtk.TreeViewColumn tree_column, Gtk.CellRenderer cell, Gtk.ITreeModel tree_model, Gtk.TreeIter iter) + private static void CellDataB (Gtk.TreeViewColumn tree_column, Gtk.CellRenderer cell, Gtk.ITreeModelBase tree_model, Gtk.TreeIter iter) { Pair val = (Pair) store.GetValue (iter, 0); ((CellRendererText) cell).Text = val.b; diff --git a/sample/TreeModelDemo.cs b/sample/TreeModelDemo.cs index 419ec9add..0bd754c51 100644 --- a/sample/TreeModelDemo.cs +++ b/sample/TreeModelDemo.cs @@ -32,7 +32,7 @@ public TreeModelDemo () : base ("TreeModel demo") { DefaultSize = new Gdk.Size (640,480); ScrolledWindow sw = new ScrolledWindow (); - TreeView view = new TreeView (new TreeModelAdapter (new MyTreeModel ())); + TreeView view = new TreeView (new TreeModel (new MyTreeModel ())); view.HeadersVisible = true; view.AppendColumn ("Name", new CellRendererText (), "text", 0); view.AppendColumn ("Type", new CellRendererText (), "text", 1); @@ -57,7 +57,7 @@ public static void Main (string[] args) } - public class MyTreeModel : GLib.Object, ITreeModelImplementor { + public class MyTreeModel : GLib.Object, ITreeModel { Assembly[] assemblies; diff --git a/sample/gio/AppInfo.cs b/sample/gio/AppInfo.cs index 2da8b41d7..16002d01f 100644 --- a/sample/gio/AppInfo.cs +++ b/sample/gio/AppInfo.cs @@ -13,17 +13,17 @@ static void Main (string[] args) } GLib.GType.Init (); // Gtk.Application.Init (); - Console.WriteLine ("Default Handler for {0}: {1}", args[0], AppInfoAdapter.GetDefaultForType (args[0], false).Name); + Console.WriteLine ("Default Handler for {0}: {1}", args[0], AppInfo.GetDefaultForType (args[0], false).Name); Console.WriteLine(); Console.WriteLine("List of all {0} handlers", args[0]); - foreach (IAppInfo appinfo in AppInfoAdapter.GetAllForType (args[0])) + foreach (IAppInfoBase appinfo in AppInfo.GetAllForType (args[0])) Console.WriteLine ("\t{0}: {1} {2}", appinfo.Name, appinfo.Executable, appinfo.Description); - IAppInfo app_info = AppInfoAdapter.GetDefaultForType ("image/jpeg", false); + IAppInfoBase app_info = AppInfo.GetDefaultForType ("image/jpeg", false); Console.WriteLine ("{0}:\t{1}", app_info.Name, app_info.Description); Console.WriteLine ("All installed IAppInfos:"); - foreach (IAppInfo appinfo in AppInfoAdapter.GetAll ()) + foreach (IAppInfoBase appinfo in AppInfo.GetAll ()) Console.WriteLine ("\t{0}: {1} ", appinfo.Name, appinfo.Executable); } } diff --git a/sample/gio/Volume.cs b/sample/gio/Volume.cs index 315bfdec2..8728e8d26 100644 --- a/sample/gio/Volume.cs +++ b/sample/gio/Volume.cs @@ -10,20 +10,20 @@ static void Main (string[] args) GLib.GType.Init (); VolumeMonitor monitor = VolumeMonitor.Default; Console.WriteLine ("Volumes:"); - foreach (IVolume v in monitor.Volumes) + foreach (IVolumeBase v in monitor.Volumes) Console.WriteLine ("\t{0}", v.Name); Console.WriteLine ("\nMounts:"); - foreach (IMount m in monitor.Mounts) { + foreach (IMountBase m in monitor.Mounts) { Console.WriteLine ("\tName:{0}, UUID:{1}, root:{2}, CanUnmount: {3}", m.Name, m.Uuid, m.Root, m.CanUnmount); - IVolume v = m.Volume; + IVolumeBase v = m.Volume; if (v != null) Console.WriteLine ("\t\tVolume:{0}", v.Name); - IDrive d = m.Drive; + IDriveBase d = m.Drive; if (d != null) Console.WriteLine ("\t\tDrive:{0}", d.Name); } Console.WriteLine ("\nConnectedDrives:"); - foreach (IDrive d in monitor.ConnectedDrives) + foreach (IDriveBase d in monitor.ConnectedDrives) Console.WriteLine ("\t{0}, HasVolumes:{1}", d.Name, d.HasVolumes); } } diff --git a/sample/gtk-gio/MountOperation.cs b/sample/gtk-gio/MountOperation.cs index f21416ee9..d558d76ce 100644 --- a/sample/gtk-gio/MountOperation.cs +++ b/sample/gtk-gio/MountOperation.cs @@ -35,7 +35,7 @@ public class TestMount { - static GLib.IFile file; + static GLib.IFileBase file; static Gtk.MountOperation operation; static void Main () @@ -59,7 +59,7 @@ static void HandleButtonClicked (object sender, EventArgs args) file.MountEnclosingVolume (0, operation, null, new GLib.AsyncReadyCallback (HandleMountFinished)); } - static void HandleMountFinished (GLib.Object sender, GLib.IAsyncResult result) + static void HandleMountFinished (GLib.Object sender, GLib.IAsyncResultBase result) { System.Console.WriteLine ("handle mount finished"); if (file.MountEnclosingVolumeFinish (result)) From 98fb7fe464a8fd37c2f8933ea06de1dffcc5170c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20G=2E=20Aragoneses?= Date: Tue, 5 Aug 2014 18:05:29 +0200 Subject: [PATCH 3/3] atk,gio,gtk: Rename file names to reflect type names --- atk/Makefile.am | 4 ++-- atk/{SelectionAdapter.cs => Selection.cs} | 2 +- atk/{TextAdapter.cs => Text.cs} | 2 +- gio/{AppInfoAdapter.cs => AppInfo.cs} | 2 +- gio/{FileAdapter.cs => File.cs} | 10 +++++----- gio/{IFile.cs => IFileBase.cs} | 4 ++-- gio/Makefile.am | 6 +++--- gtk/{CellLayoutAdapter.cs => CellLayout.cs} | 0 gtk/Makefile.am | 4 ++-- gtk/{TreeModelAdapter.cs => TreeModel.cs} | 2 +- 10 files changed, 18 insertions(+), 18 deletions(-) rename atk/{SelectionAdapter.cs => Selection.cs} (99%) rename atk/{TextAdapter.cs => Text.cs} (99%) rename gio/{AppInfoAdapter.cs => AppInfo.cs} (99%) rename gio/{FileAdapter.cs => File.cs} (99%) rename gio/{IFile.cs => IFileBase.cs} (99%) rename gtk/{CellLayoutAdapter.cs => CellLayout.cs} (100%) rename gtk/{TreeModelAdapter.cs => TreeModel.cs} (99%) diff --git a/atk/Makefile.am b/atk/Makefile.am index 4ddccdcf2..0e286229d 100644 --- a/atk/Makefile.am +++ b/atk/Makefile.am @@ -12,8 +12,8 @@ sources = \ Hyperlink.cs \ Misc.cs \ Object.cs \ - SelectionAdapter.cs \ - TextAdapter.cs \ + Selection.cs \ + Text.cs \ TextChangedDetail.cs \ Util.cs diff --git a/atk/SelectionAdapter.cs b/atk/Selection.cs similarity index 99% rename from atk/SelectionAdapter.cs rename to atk/Selection.cs index 246fb8c37..32b934b8e 100644 --- a/atk/SelectionAdapter.cs +++ b/atk/Selection.cs @@ -8,7 +8,7 @@ // // // This program is free software; you can redistribute it and/or -// modify it under the terms of version 2 of the Lesser GNU General +// modify it under the terms of version 2 of the Lesser GNU General // Public License as published by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, diff --git a/atk/TextAdapter.cs b/atk/Text.cs similarity index 99% rename from atk/TextAdapter.cs rename to atk/Text.cs index c29749bd2..236311e46 100644 --- a/atk/TextAdapter.cs +++ b/atk/Text.cs @@ -8,7 +8,7 @@ // // // This program is free software; you can redistribute it and/or -// modify it under the terms of version 2 of the Lesser GNU General +// modify it under the terms of version 2 of the Lesser GNU General // Public License as published by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, diff --git a/gio/AppInfoAdapter.cs b/gio/AppInfo.cs similarity index 99% rename from gio/AppInfoAdapter.cs rename to gio/AppInfo.cs index 20753436c..87bb50179 100644 --- a/gio/AppInfoAdapter.cs +++ b/gio/AppInfo.cs @@ -21,7 +21,7 @@ namespace GLib { using System; using System.Runtime.InteropServices; - + public partial class AppInfo { [DllImport ("libgio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_app_info_get_all(); diff --git a/gio/FileAdapter.cs b/gio/File.cs similarity index 99% rename from gio/FileAdapter.cs rename to gio/File.cs index 509a8a0c3..8b17ec69b 100644 --- a/gio/FileAdapter.cs +++ b/gio/File.cs @@ -21,25 +21,25 @@ namespace GLib { using System; using System.Runtime.InteropServices; - + public partial class File { public override string ToString () { return Uri.ToString (); } - + public bool Exists { get { return QueryExists (null); } } - + public bool Delete () { return Delete (null); } - + [DllImport ("libgio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_file_get_uri(IntPtr raw); - + public System.Uri Uri { get { IntPtr raw_ret = g_file_get_uri(Handle); diff --git a/gio/IFile.cs b/gio/IFileBase.cs similarity index 99% rename from gio/IFile.cs rename to gio/IFileBase.cs index 201ced302..7c095242d 100644 --- a/gio/IFile.cs +++ b/gio/IFileBase.cs @@ -24,12 +24,12 @@ bool Exists { get; } - + System.Uri Uri { get; } - + bool Delete(); } } diff --git a/gio/Makefile.am b/gio/Makefile.am index 86e5be4a9..93d6f729a 100644 --- a/gio/Makefile.am +++ b/gio/Makefile.am @@ -12,12 +12,12 @@ glue_includes = gio/gio.h POLICY_VERSIONS= sources = \ - AppInfoAdapter.cs \ - FileAdapter.cs \ + AppInfo.cs \ + File.cs \ FileEnumerator.cs \ FileFactory.cs \ GioStream.cs \ - IFile.cs + IFileBase.cs add_dist = gio-sharp-3.0.pc.in diff --git a/gtk/CellLayoutAdapter.cs b/gtk/CellLayout.cs similarity index 100% rename from gtk/CellLayoutAdapter.cs rename to gtk/CellLayout.cs diff --git a/gtk/Makefile.am b/gtk/Makefile.am index cb858dd62..1d336ec31 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -24,7 +24,7 @@ sources = \ Button.cs \ Calendar.cs \ CellAreaBox.cs \ - CellLayoutAdapter.cs \ + CellLayout.cs \ CellRenderer.cs \ CellView.cs \ CheckMenuItem.cs \ @@ -99,7 +99,7 @@ sources = \ TreeEnumerator.cs \ TreeIter.cs \ TreeMenu.cs \ - TreeModelAdapter.cs \ + TreeModel.cs \ TreeModelFilter.cs \ TreeModelSort.cs \ TreeNode.cs \ diff --git a/gtk/TreeModelAdapter.cs b/gtk/TreeModel.cs similarity index 99% rename from gtk/TreeModelAdapter.cs rename to gtk/TreeModel.cs index ce4eac1e6..07b50d856 100644 --- a/gtk/TreeModelAdapter.cs +++ b/gtk/TreeModel.cs @@ -70,7 +70,7 @@ public void SetValue (Gtk.TreeIter iter, int column, float value) { public void SetValue (Gtk.TreeIter iter, int column, uint value) { throw new NotImplementedException (); } - + public void SetValue (Gtk.TreeIter iter, int column, object value) { throw new NotImplementedException (); }