2002-01-08 20:05:47 +00:00
|
|
|
// GtkSharp.Generation.InterfaceGen.cs - The Interface Generatable.
|
|
|
|
//
|
|
|
|
// Author: Mike Kestner <mkestner@speakeasy.net>
|
|
|
|
//
|
2002-05-23 23:43:25 +00:00
|
|
|
// (c) 2001-2002 Mike Kestner
|
2002-01-08 20:05:47 +00:00
|
|
|
|
|
|
|
namespace GtkSharp.Generation {
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.IO;
|
|
|
|
using System.Xml;
|
|
|
|
|
2002-05-23 23:43:25 +00:00
|
|
|
public class InterfaceGen : GenBase, IGeneratable {
|
|
|
|
|
|
|
|
public InterfaceGen (string ns, XmlElement elem) : base (ns, elem) {}
|
|
|
|
|
2002-01-08 20:05:47 +00:00
|
|
|
public String MarshalType {
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
}
|
2002-05-23 23:43:25 +00:00
|
|
|
|
2002-01-08 20:05:47 +00:00
|
|
|
public String CallByName (String var_name)
|
|
|
|
{
|
|
|
|
return "";
|
|
|
|
}
|
2002-02-08 23:56:27 +00:00
|
|
|
|
|
|
|
public String FromNative(String var)
|
|
|
|
{
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
2002-05-23 23:43:25 +00:00
|
|
|
public void Generate ()
|
2002-01-08 20:05:47 +00:00
|
|
|
{
|
2002-05-23 23:43:25 +00:00
|
|
|
StreamWriter sw = CreateWriter ();
|
|
|
|
|
2002-01-08 20:05:47 +00:00
|
|
|
sw.WriteLine ("\tusing System;");
|
|
|
|
sw.WriteLine ();
|
2002-05-23 23:43:25 +00:00
|
|
|
|
2002-01-08 20:05:47 +00:00
|
|
|
sw.WriteLine ("\tpublic interface " + Name + " {");
|
|
|
|
sw.WriteLine ();
|
2002-05-23 23:43:25 +00:00
|
|
|
|
|
|
|
foreach (XmlNode node in Elem.ChildNodes) {
|
2002-01-08 20:05:47 +00:00
|
|
|
if (node.Name != "member") {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
//FIXME: Generate the methods.
|
|
|
|
XmlElement member = (XmlElement) node;
|
|
|
|
}
|
2002-05-23 23:43:25 +00:00
|
|
|
|
2002-01-08 20:05:47 +00:00
|
|
|
sw.WriteLine ("\t}");
|
2002-05-23 23:43:25 +00:00
|
|
|
CloseWriter (sw);
|
2002-02-19 03:12:47 +00:00
|
|
|
Statistics.IFaceCount++;
|
2002-01-08 20:05:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|