2007-10-24 Mike Kestner <mkestner@novell.com>
* generator/InterfaceGen.cs: generate an Implementor prop on the adapters to obtain the underlying object. svn path=/trunk/gtk-sharp/; revision=88124
This commit is contained in:
parent
2a7b706c5a
commit
6fa5d61269
2 changed files with 11 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-10-24 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* generator/InterfaceGen.cs: generate an Implementor prop on the
|
||||
adapters to obtain the underlying object.
|
||||
|
||||
2007-10-22 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* configure.in.in: add a win64 check and a compiler define for
|
||||
|
|
|
@ -198,16 +198,12 @@ namespace GtkSharp.Generation {
|
|||
sw.WriteLine ();
|
||||
}
|
||||
|
||||
void GenerateCastOperators (StreamWriter sw)
|
||||
void GenerateImplementorProp (StreamWriter sw)
|
||||
{
|
||||
sw.WriteLine ("\t\tpublic static implicit operator {0}Adapter ({0}Implementor implementor)", Name);
|
||||
sw.WriteLine ("\t\t{");
|
||||
sw.WriteLine ("\t\t\treturn new {0}Adapter (implementor);", Name);
|
||||
sw.WriteLine ("\t\t}");
|
||||
sw.WriteLine ();
|
||||
sw.WriteLine ("\t\tpublic static implicit operator {0}Implementor ({0}Adapter adapter)", Name);
|
||||
sw.WriteLine ("\t\t{");
|
||||
sw.WriteLine ("\t\t\treturn adapter.implementor;");
|
||||
sw.WriteLine ("\t\tpublic " + Name + "Implementor Implementor {");
|
||||
sw.WriteLine ("\t\t\tget {");
|
||||
sw.WriteLine ("\t\t\t\treturn implementor;");
|
||||
sw.WriteLine ("\t\t\t}");
|
||||
sw.WriteLine ("\t\t}");
|
||||
sw.WriteLine ();
|
||||
}
|
||||
|
@ -233,6 +229,7 @@ namespace GtkSharp.Generation {
|
|||
GenerateGType (sw);
|
||||
GenerateHandleProp (sw);
|
||||
GenerateGetObject (sw);
|
||||
GenerateImplementorProp (sw);
|
||||
|
||||
GenProperties (gen_info, null);
|
||||
|
||||
|
|
Loading…
Reference in a new issue