Ryujinx-GtkSharp/generator/InterfaceGen.cs
Kristian Rietveld 27862c71c3 2002-10-08 Kristian Rietveld <kris@gtk.org>
(So Miguel told me just to go ahead and commit -kris)

        * gtk/TreeSelection.custom: new file, defines a working
        GetSelected method (GetSelected is a bit tricky function).

        * generator/InterfaceGen.cs (Generate): also call AppendCustom

        * sources/Gtk.metadata: hide the autogenerated
        Gtk.TreeSelection.GetSelected method.

svn path=/trunk/gtk-sharp/; revision=8071
2002-10-08 19:14:14 +00:00

56 lines
1.2 KiB
C#

// GtkSharp.Generation.InterfaceGen.cs - The Interface Generatable.
//
// Author: Mike Kestner <mkestner@speakeasy.net>
//
// (c) 2001-2002 Mike Kestner
namespace GtkSharp.Generation {
using System;
using System.IO;
using System.Xml;
public class InterfaceGen : ClassBase, IGeneratable {
public InterfaceGen (XmlElement ns, XmlElement elem) : base (ns, elem) {}
public void Generate ()
{
if (!DoGenerate)
return;
StreamWriter sw = CreateWriter ();
sw.WriteLine ("\tusing System;");
sw.WriteLine ();
sw.WriteLine("\t\t/// <summary> " + Name + " Interface</summary>");
sw.WriteLine("\t\t/// <remarks>");
sw.WriteLine("\t\t/// </remarks>");
sw.WriteLine ("\tpublic interface " + Name + " : GLib.IWrapper {");
sw.WriteLine ();
foreach (Signal sig in sigs.Values) {
if (sig.Validate ())
sig.GenerateDecl (sw);
}
foreach (Method method in methods.Values) {
if (IgnoreMethod (method))
continue;
if (method.Validate ())
method.GenerateDecl (sw);
}
AppendCustom (sw);
sw.WriteLine ("\t}");
CloseWriter (sw);
Statistics.IFaceCount++;
}
}
}