samples: Track API changes (I- interface prefixes)

This includes changes to fix the build.
This commit is contained in:
Andres G. Aragoneses 2013-04-01 23:55:17 +01:00 committed by Bertrand Lorentz
parent 2e56a23e9f
commit 99e4257a9f
10 changed files with 20 additions and 19 deletions

View File

@ -3,6 +3,7 @@ using Gtk;
using System;
class CustomScrollableWidgetTest {
public static int Main (string[] args)
{
Gtk.Application.Init ();
@ -53,7 +54,7 @@ class DerivedScrollableWidget<T> : CustomScrollableWidget<T>
{ }
}
class CustomScrollableWidget<T> : CustomBase, ScrollableImplementor {
class CustomScrollableWidget<T> : CustomBase, IScrollableImplementor {
private int num_rows = 20;
private string label;
private Pango.Layout layout;

View File

@ -162,7 +162,7 @@ namespace GtkDemo
private void RemoveItem (object o, EventArgs args)
{
TreeIter iter;
TreeModel model;
ITreeModel model;
if (treeView.Selection.GetSelected (out model, out iter)) {
int position = store.GetPath (iter).Indices[0];

View File

@ -38,7 +38,7 @@ namespace GtkDemo
Destroy ();
}
TreeModel CreateCompletionModel ()
ITreeModel CreateCompletionModel ()
{
ListStore store = new ListStore (typeof (string));

View File

@ -222,7 +222,7 @@ namespace GtkDemo
private void TreeChanged (object o, EventArgs args)
{
TreeIter iter;
TreeModel model;
ITreeModel model;
if (treeView.Selection.GetSelected (out model, out iter)) {
Type type = (Type) model.GetValue (iter, 1);

View File

@ -118,7 +118,7 @@ namespace GtkDemo
{
TreeSelection selection = (TreeSelection)o;
TreeIter iter;
TreeModel model;
ITreeModel model;
if (selection.GetSelected (out model, out iter)) {
string id = (string) model.GetValue (iter, (int)Column.Id);

View File

@ -32,13 +32,13 @@ namespace GtkSamples {
}
}
private static void CellDataA (Gtk.TreeViewColumn tree_column, Gtk.CellRenderer cell, Gtk.TreeModel tree_model, Gtk.TreeIter iter)
private static void CellDataA (Gtk.TreeViewColumn tree_column, Gtk.CellRenderer cell, Gtk.ITreeModel 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.TreeModel tree_model, Gtk.TreeIter iter)
private static void CellDataB (Gtk.TreeViewColumn tree_column, Gtk.CellRenderer cell, Gtk.ITreeModel tree_model, Gtk.TreeIter iter)
{
Pair val = (Pair) store.GetValue (iter, 0);
((CellRendererText) cell).Text = val.b;

View File

@ -57,7 +57,7 @@ namespace GtkSamples {
}
public class MyTreeModel : GLib.Object, TreeModelImplementor {
public class MyTreeModel : GLib.Object, ITreeModelImplementor {
Assembly[] assemblies;

View File

@ -16,14 +16,14 @@ namespace TestGio
Console.WriteLine ("Default Handler for {0}: {1}", args[0], AppInfoAdapter.GetDefaultForType (args[0], false).Name);
Console.WriteLine();
Console.WriteLine("List of all {0} handlers", args[0]);
foreach (AppInfo appinfo in AppInfoAdapter.GetAllForType (args[0]))
foreach (IAppInfo appinfo in AppInfoAdapter.GetAllForType (args[0]))
Console.WriteLine ("\t{0}: {1} {2}", appinfo.Name, appinfo.Executable, appinfo.Description);
AppInfo app_info = AppInfoAdapter.GetDefaultForType ("image/jpeg", false);
IAppInfo app_info = AppInfoAdapter.GetDefaultForType ("image/jpeg", false);
Console.WriteLine ("{0}:\t{1}", app_info.Name, app_info.Description);
Console.WriteLine ("All installed AppInfos:");
foreach (AppInfo appinfo in AppInfoAdapter.GetAll ())
Console.WriteLine ("All installed IAppInfos:");
foreach (IAppInfo appinfo in AppInfoAdapter.GetAll ())
Console.WriteLine ("\t{0}: {1} ", appinfo.Name, appinfo.Executable);
}
}

View File

@ -10,20 +10,20 @@ namespace TestGio
GLib.GType.Init ();
VolumeMonitor monitor = VolumeMonitor.Default;
Console.WriteLine ("Volumes:");
foreach (Volume v in monitor.Volumes)
foreach (IVolume v in monitor.Volumes)
Console.WriteLine ("\t{0}", v.Name);
Console.WriteLine ("\nMounts:");
foreach (Mount m in monitor.Mounts) {
foreach (IMount m in monitor.Mounts) {
Console.WriteLine ("\tName:{0}, UUID:{1}, root:{2}, CanUnmount: {3}", m.Name, m.Uuid, m.Root, m.CanUnmount);
Volume v = m.Volume;
IVolume v = m.Volume;
if (v != null)
Console.WriteLine ("\t\tVolume:{0}", v.Name);
Drive d = m.Drive;
IDrive d = m.Drive;
if (d != null)
Console.WriteLine ("\t\tDrive:{0}", d.Name);
}
Console.WriteLine ("\nConnectedDrives:");
foreach (Drive d in monitor.ConnectedDrives)
foreach (IDrive d in monitor.ConnectedDrives)
Console.WriteLine ("\t{0}, HasVolumes:{1}", d.Name, d.HasVolumes);
}
}

View File

@ -35,7 +35,7 @@ using GLib;
public class TestMount
{
static GLib.File file;
static GLib.IFile file;
static Gtk.MountOperation operation;
static void Main ()
@ -59,7 +59,7 @@ public class TestMount
file.MountEnclosingVolume (0, operation, null, new GLib.AsyncReadyCallback (HandleMountFinished));
}
static void HandleMountFinished (GLib.Object sender, GLib.AsyncResult result)
static void HandleMountFinished (GLib.Object sender, GLib.IAsyncResult result)
{
System.Console.WriteLine ("handle mount finished");
if (file.MountEnclosingVolumeFinish (result))