Ryujinx-GtkSharp/generator/InterfaceGen.cs
Mike Kestner 5d67982de9 2002-06-21 Mike Kestner <mkestner@speakeasy.net>
* makefile : remove gdk.imaging from the build
	* gdk.imaging/* : kill
	* generated/BoxedGen.cs : XmlNode namespace handling. Use GenBase.
	* generated/CallbackGen.cs : XmlNode namespace handling.
	* generated/Ctor.cs : construct with libname not ns.
	* generated/EnumGen.cs : XmlNode namespace handling.
	* generated/GenBase.cs : XmlNode namespace handling. Make AppendCustom
	  an instance method so it can use the private fields instead of params.
	* generated/InterfaceGen.cs : XmlNode namespace handling.
	* generated/Method.cs : construct with libname not ns.
	* generated/ObjectGen.cs : XmlNode namespace handling.
	* generated/Parser.cs : Use new XmlNode namespace ctors.
	* generated/Signal.cs : Lose the namespace field.
	* generated/StructBase.cs : derive from ClassBase
	* generated/StructGen.cs : XmlNode namespace handling. Use GenBase.
	* generated/SymbolTable.cs : nuke GetDllName method.
	* generator/gtkapi.xml : Add library name to namespace node.
	* parser/build.pl : refactor for library name param
	* parser/gapi2xml.pl : add libname param handling
	* sample/Makefile.in : build linux on make install, but don't install.

svn path=/trunk/gtk-sharp/; revision=5400
2002-06-21 20:25:43 +00:00

47 lines
985 B
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 ()
{
StreamWriter sw = CreateWriter ();
sw.WriteLine ("\tusing System;");
sw.WriteLine ();
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);
}
sw.WriteLine ("\t}");
CloseWriter (sw);
Statistics.IFaceCount++;
}
}
}