samples: Track API changes (I- interface prefixes)
This includes changes to fix the build.
This commit is contained in:
parent
2e56a23e9f
commit
99e4257a9f
10 changed files with 20 additions and 19 deletions
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace GtkDemo
|
|||
Destroy ();
|
||||
}
|
||||
|
||||
TreeModel CreateCompletionModel ()
|
||||
ITreeModel CreateCompletionModel ()
|
||||
{
|
||||
ListStore store = new ListStore (typeof (string));
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace GtkSamples {
|
|||
|
||||
}
|
||||
|
||||
public class MyTreeModel : GLib.Object, TreeModelImplementor {
|
||||
public class MyTreeModel : GLib.Object, ITreeModelImplementor {
|
||||
|
||||
Assembly[] assemblies;
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue