Ryujinx-GtkSharp/generator/OpaqueGen.cs

103 lines
2.6 KiB
C#
Raw Normal View History

// GtkSharp.Generation.OpaqueGen.cs - The Opaque Generatable.
2002-07-25 Rachel Hestilow <hestilow@ximian.com> [about 60% of the marshalling patch that I lost. The rest to come tomorrow.] * generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase, delete large chunks duplicated from ClassBase. * generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn. * generator/ClassBase.cs: Move ctor stuff here. Add a CallByName overload with no parameters for the "self" reference. * generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType, FromNativeReturn. * generator/Method.cs: Use container_type.MarshalType, CallByName, and SymbolTable.FromNativeReturn when generating call and import sigs. * generator/OpaqueGen.cs: Added. * generator/Property.cs: Handle boxed and opaques differently. * generator/SymbolTable.cs: Update for the opaque stuff and the new Return methods. Also change GetClassGen to simply call the as operator. * glib/Boxed.cs: Update for struct usage -- this is now a wrapper for the purposes of using with Value. * glib/Opaque.cs: Added. New base class for opaque structs. * glue/textiter.c, gtk/TextIter.custom: Remove. * gnome/Program.cs: Update for new struct marshalling. * parser/Metadata.pm: Use our own getChildrenByTagName. * parser/README: Update for new requirements (was out of sync with build.pl) * parser/gapi2xml.pl: Hide struct like const in field elements. * parser/gapi_pp.pl: Handle embedded union fields (poorly). * sample/test/TestColorSelection.cs: Comment out null color tests for now. svn path=/trunk/gtk-sharp/; revision=6186
2002-07-26 08:08:52 +02:00
//
// Author: Mike Kestner <mkestner@speakeasy.net>
//
// Copyright (c) 2001-2003 Mike Kestner
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the GNU General Public
// License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
2002-07-25 Rachel Hestilow <hestilow@ximian.com> [about 60% of the marshalling patch that I lost. The rest to come tomorrow.] * generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase, delete large chunks duplicated from ClassBase. * generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn. * generator/ClassBase.cs: Move ctor stuff here. Add a CallByName overload with no parameters for the "self" reference. * generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType, FromNativeReturn. * generator/Method.cs: Use container_type.MarshalType, CallByName, and SymbolTable.FromNativeReturn when generating call and import sigs. * generator/OpaqueGen.cs: Added. * generator/Property.cs: Handle boxed and opaques differently. * generator/SymbolTable.cs: Update for the opaque stuff and the new Return methods. Also change GetClassGen to simply call the as operator. * glib/Boxed.cs: Update for struct usage -- this is now a wrapper for the purposes of using with Value. * glib/Opaque.cs: Added. New base class for opaque structs. * glue/textiter.c, gtk/TextIter.custom: Remove. * gnome/Program.cs: Update for new struct marshalling. * parser/Metadata.pm: Use our own getChildrenByTagName. * parser/README: Update for new requirements (was out of sync with build.pl) * parser/gapi2xml.pl: Hide struct like const in field elements. * parser/gapi_pp.pl: Handle embedded union fields (poorly). * sample/test/TestColorSelection.cs: Comment out null color tests for now. svn path=/trunk/gtk-sharp/; revision=6186
2002-07-26 08:08:52 +02:00
namespace GtkSharp.Generation {
using System;
using System.Collections;
using System.IO;
using System.Xml;
public class OpaqueGen : ClassBase, IGeneratable {
public OpaqueGen (XmlElement ns, XmlElement elem) : base (ns, elem)
{
}
public override string FromNative(string var)
2002-07-25 Rachel Hestilow <hestilow@ximian.com> [about 60% of the marshalling patch that I lost. The rest to come tomorrow.] * generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase, delete large chunks duplicated from ClassBase. * generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn. * generator/ClassBase.cs: Move ctor stuff here. Add a CallByName overload with no parameters for the "self" reference. * generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType, FromNativeReturn. * generator/Method.cs: Use container_type.MarshalType, CallByName, and SymbolTable.FromNativeReturn when generating call and import sigs. * generator/OpaqueGen.cs: Added. * generator/Property.cs: Handle boxed and opaques differently. * generator/SymbolTable.cs: Update for the opaque stuff and the new Return methods. Also change GetClassGen to simply call the as operator. * glib/Boxed.cs: Update for struct usage -- this is now a wrapper for the purposes of using with Value. * glib/Opaque.cs: Added. New base class for opaque structs. * glue/textiter.c, gtk/TextIter.custom: Remove. * gnome/Program.cs: Update for new struct marshalling. * parser/Metadata.pm: Use our own getChildrenByTagName. * parser/README: Update for new requirements (was out of sync with build.pl) * parser/gapi2xml.pl: Hide struct like const in field elements. * parser/gapi_pp.pl: Handle embedded union fields (poorly). * sample/test/TestColorSelection.cs: Comment out null color tests for now. svn path=/trunk/gtk-sharp/; revision=6186
2002-07-26 08:08:52 +02:00
{
return "new " + QualifiedName + "(" + var + ")";
2002-07-25 Rachel Hestilow <hestilow@ximian.com> [about 60% of the marshalling patch that I lost. The rest to come tomorrow.] * generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase, delete large chunks duplicated from ClassBase. * generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn. * generator/ClassBase.cs: Move ctor stuff here. Add a CallByName overload with no parameters for the "self" reference. * generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType, FromNativeReturn. * generator/Method.cs: Use container_type.MarshalType, CallByName, and SymbolTable.FromNativeReturn when generating call and import sigs. * generator/OpaqueGen.cs: Added. * generator/Property.cs: Handle boxed and opaques differently. * generator/SymbolTable.cs: Update for the opaque stuff and the new Return methods. Also change GetClassGen to simply call the as operator. * glib/Boxed.cs: Update for struct usage -- this is now a wrapper for the purposes of using with Value. * glib/Opaque.cs: Added. New base class for opaque structs. * glue/textiter.c, gtk/TextIter.custom: Remove. * gnome/Program.cs: Update for new struct marshalling. * parser/Metadata.pm: Use our own getChildrenByTagName. * parser/README: Update for new requirements (was out of sync with build.pl) * parser/gapi2xml.pl: Hide struct like const in field elements. * parser/gapi_pp.pl: Handle embedded union fields (poorly). * sample/test/TestColorSelection.cs: Comment out null color tests for now. svn path=/trunk/gtk-sharp/; revision=6186
2002-07-26 08:08:52 +02:00
}
public override string FromNativeReturn(string var)
2002-07-25 Rachel Hestilow <hestilow@ximian.com> [about 60% of the marshalling patch that I lost. The rest to come tomorrow.] * generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase, delete large chunks duplicated from ClassBase. * generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn. * generator/ClassBase.cs: Move ctor stuff here. Add a CallByName overload with no parameters for the "self" reference. * generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType, FromNativeReturn. * generator/Method.cs: Use container_type.MarshalType, CallByName, and SymbolTable.FromNativeReturn when generating call and import sigs. * generator/OpaqueGen.cs: Added. * generator/Property.cs: Handle boxed and opaques differently. * generator/SymbolTable.cs: Update for the opaque stuff and the new Return methods. Also change GetClassGen to simply call the as operator. * glib/Boxed.cs: Update for struct usage -- this is now a wrapper for the purposes of using with Value. * glib/Opaque.cs: Added. New base class for opaque structs. * glue/textiter.c, gtk/TextIter.custom: Remove. * gnome/Program.cs: Update for new struct marshalling. * parser/Metadata.pm: Use our own getChildrenByTagName. * parser/README: Update for new requirements (was out of sync with build.pl) * parser/gapi2xml.pl: Hide struct like const in field elements. * parser/gapi_pp.pl: Handle embedded union fields (poorly). * sample/test/TestColorSelection.cs: Comment out null color tests for now. svn path=/trunk/gtk-sharp/; revision=6186
2002-07-26 08:08:52 +02:00
{
return FromNative (var);
}
public void Generate ()
{
2003-10-05 02:20:17 +02:00
GenerationInfo gen_info = new GenerationInfo (NSElem);
Generate (gen_info);
}
public void Generate (GenerationInfo gen_info)
{
StreamWriter sw = gen_info.Writer = gen_info.OpenStream (Name);
2002-07-25 Rachel Hestilow <hestilow@ximian.com> [about 60% of the marshalling patch that I lost. The rest to come tomorrow.] * generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase, delete large chunks duplicated from ClassBase. * generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn. * generator/ClassBase.cs: Move ctor stuff here. Add a CallByName overload with no parameters for the "self" reference. * generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType, FromNativeReturn. * generator/Method.cs: Use container_type.MarshalType, CallByName, and SymbolTable.FromNativeReturn when generating call and import sigs. * generator/OpaqueGen.cs: Added. * generator/Property.cs: Handle boxed and opaques differently. * generator/SymbolTable.cs: Update for the opaque stuff and the new Return methods. Also change GetClassGen to simply call the as operator. * glib/Boxed.cs: Update for struct usage -- this is now a wrapper for the purposes of using with Value. * glib/Opaque.cs: Added. New base class for opaque structs. * glue/textiter.c, gtk/TextIter.custom: Remove. * gnome/Program.cs: Update for new struct marshalling. * parser/Metadata.pm: Use our own getChildrenByTagName. * parser/README: Update for new requirements (was out of sync with build.pl) * parser/gapi2xml.pl: Hide struct like const in field elements. * parser/gapi_pp.pl: Handle embedded union fields (poorly). * sample/test/TestColorSelection.cs: Comment out null color tests for now. svn path=/trunk/gtk-sharp/; revision=6186
2002-07-26 08:08:52 +02:00
2003-10-05 02:20:17 +02:00
sw.WriteLine ("namespace " + NS + " {");
sw.WriteLine ();
sw.WriteLine ("\tusing System;");
2002-07-25 Rachel Hestilow <hestilow@ximian.com> [about 60% of the marshalling patch that I lost. The rest to come tomorrow.] * generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase, delete large chunks duplicated from ClassBase. * generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn. * generator/ClassBase.cs: Move ctor stuff here. Add a CallByName overload with no parameters for the "self" reference. * generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType, FromNativeReturn. * generator/Method.cs: Use container_type.MarshalType, CallByName, and SymbolTable.FromNativeReturn when generating call and import sigs. * generator/OpaqueGen.cs: Added. * generator/Property.cs: Handle boxed and opaques differently. * generator/SymbolTable.cs: Update for the opaque stuff and the new Return methods. Also change GetClassGen to simply call the as operator. * glib/Boxed.cs: Update for struct usage -- this is now a wrapper for the purposes of using with Value. * glib/Opaque.cs: Added. New base class for opaque structs. * glue/textiter.c, gtk/TextIter.custom: Remove. * gnome/Program.cs: Update for new struct marshalling. * parser/Metadata.pm: Use our own getChildrenByTagName. * parser/README: Update for new requirements (was out of sync with build.pl) * parser/gapi2xml.pl: Hide struct like const in field elements. * parser/gapi_pp.pl: Handle embedded union fields (poorly). * sample/test/TestColorSelection.cs: Comment out null color tests for now. svn path=/trunk/gtk-sharp/; revision=6186
2002-07-26 08:08:52 +02:00
sw.WriteLine ("\tusing System.Collections;");
sw.WriteLine ("\tusing System.Runtime.InteropServices;");
sw.WriteLine ();
sw.WriteLine ("#region Autogenerated code");
2002-07-25 Rachel Hestilow <hestilow@ximian.com> [about 60% of the marshalling patch that I lost. The rest to come tomorrow.] * generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase, delete large chunks duplicated from ClassBase. * generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn. * generator/ClassBase.cs: Move ctor stuff here. Add a CallByName overload with no parameters for the "self" reference. * generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType, FromNativeReturn. * generator/Method.cs: Use container_type.MarshalType, CallByName, and SymbolTable.FromNativeReturn when generating call and import sigs. * generator/OpaqueGen.cs: Added. * generator/Property.cs: Handle boxed and opaques differently. * generator/SymbolTable.cs: Update for the opaque stuff and the new Return methods. Also change GetClassGen to simply call the as operator. * glib/Boxed.cs: Update for struct usage -- this is now a wrapper for the purposes of using with Value. * glib/Opaque.cs: Added. New base class for opaque structs. * glue/textiter.c, gtk/TextIter.custom: Remove. * gnome/Program.cs: Update for new struct marshalling. * parser/Metadata.pm: Use our own getChildrenByTagName. * parser/README: Update for new requirements (was out of sync with build.pl) * parser/gapi2xml.pl: Hide struct like const in field elements. * parser/gapi_pp.pl: Handle embedded union fields (poorly). * sample/test/TestColorSelection.cs: Comment out null color tests for now. svn path=/trunk/gtk-sharp/; revision=6186
2002-07-26 08:08:52 +02:00
sw.Write ("\tpublic class {0} : GLib.Opaque", Name);
sw.WriteLine (" {");
sw.WriteLine ();
2003-10-05 02:20:17 +02:00
GenMethods (gen_info, null, null);
GenCtors (gen_info);
sw.WriteLine ("#endregion");
2002-07-25 Rachel Hestilow <hestilow@ximian.com> [about 60% of the marshalling patch that I lost. The rest to come tomorrow.] * generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase, delete large chunks duplicated from ClassBase. * generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn. * generator/ClassBase.cs: Move ctor stuff here. Add a CallByName overload with no parameters for the "self" reference. * generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType, FromNativeReturn. * generator/Method.cs: Use container_type.MarshalType, CallByName, and SymbolTable.FromNativeReturn when generating call and import sigs. * generator/OpaqueGen.cs: Added. * generator/Property.cs: Handle boxed and opaques differently. * generator/SymbolTable.cs: Update for the opaque stuff and the new Return methods. Also change GetClassGen to simply call the as operator. * glib/Boxed.cs: Update for struct usage -- this is now a wrapper for the purposes of using with Value. * glib/Opaque.cs: Added. New base class for opaque structs. * glue/textiter.c, gtk/TextIter.custom: Remove. * gnome/Program.cs: Update for new struct marshalling. * parser/Metadata.pm: Use our own getChildrenByTagName. * parser/README: Update for new requirements (was out of sync with build.pl) * parser/gapi2xml.pl: Hide struct like const in field elements. * parser/gapi_pp.pl: Handle embedded union fields (poorly). * sample/test/TestColorSelection.cs: Comment out null color tests for now. svn path=/trunk/gtk-sharp/; revision=6186
2002-07-26 08:08:52 +02:00
2003-10-05 02:20:17 +02:00
AppendCustom(sw, gen_info.CustomDir);
2002-07-25 Rachel Hestilow <hestilow@ximian.com> [about 60% of the marshalling patch that I lost. The rest to come tomorrow.] * generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase, delete large chunks duplicated from ClassBase. * generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn. * generator/ClassBase.cs: Move ctor stuff here. Add a CallByName overload with no parameters for the "self" reference. * generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType, FromNativeReturn. * generator/Method.cs: Use container_type.MarshalType, CallByName, and SymbolTable.FromNativeReturn when generating call and import sigs. * generator/OpaqueGen.cs: Added. * generator/Property.cs: Handle boxed and opaques differently. * generator/SymbolTable.cs: Update for the opaque stuff and the new Return methods. Also change GetClassGen to simply call the as operator. * glib/Boxed.cs: Update for struct usage -- this is now a wrapper for the purposes of using with Value. * glib/Opaque.cs: Added. New base class for opaque structs. * glue/textiter.c, gtk/TextIter.custom: Remove. * gnome/Program.cs: Update for new struct marshalling. * parser/Metadata.pm: Use our own getChildrenByTagName. * parser/README: Update for new requirements (was out of sync with build.pl) * parser/gapi2xml.pl: Hide struct like const in field elements. * parser/gapi_pp.pl: Handle embedded union fields (poorly). * sample/test/TestColorSelection.cs: Comment out null color tests for now. svn path=/trunk/gtk-sharp/; revision=6186
2002-07-26 08:08:52 +02:00
sw.WriteLine ("\t}");
2003-10-05 02:20:17 +02:00
sw.WriteLine ("}");
2002-07-25 Rachel Hestilow <hestilow@ximian.com> [about 60% of the marshalling patch that I lost. The rest to come tomorrow.] * generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase, delete large chunks duplicated from ClassBase. * generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn. * generator/ClassBase.cs: Move ctor stuff here. Add a CallByName overload with no parameters for the "self" reference. * generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType, FromNativeReturn. * generator/Method.cs: Use container_type.MarshalType, CallByName, and SymbolTable.FromNativeReturn when generating call and import sigs. * generator/OpaqueGen.cs: Added. * generator/Property.cs: Handle boxed and opaques differently. * generator/SymbolTable.cs: Update for the opaque stuff and the new Return methods. Also change GetClassGen to simply call the as operator. * glib/Boxed.cs: Update for struct usage -- this is now a wrapper for the purposes of using with Value. * glib/Opaque.cs: Added. New base class for opaque structs. * glue/textiter.c, gtk/TextIter.custom: Remove. * gnome/Program.cs: Update for new struct marshalling. * parser/Metadata.pm: Use our own getChildrenByTagName. * parser/README: Update for new requirements (was out of sync with build.pl) * parser/gapi2xml.pl: Hide struct like const in field elements. * parser/gapi_pp.pl: Handle embedded union fields (poorly). * sample/test/TestColorSelection.cs: Comment out null color tests for now. svn path=/trunk/gtk-sharp/; revision=6186
2002-07-26 08:08:52 +02:00
2003-10-05 02:20:17 +02:00
sw.Close ();
gen_info.Writer = null;
2002-07-25 Rachel Hestilow <hestilow@ximian.com> [about 60% of the marshalling patch that I lost. The rest to come tomorrow.] * generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase, delete large chunks duplicated from ClassBase. * generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn. * generator/ClassBase.cs: Move ctor stuff here. Add a CallByName overload with no parameters for the "self" reference. * generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType, FromNativeReturn. * generator/Method.cs: Use container_type.MarshalType, CallByName, and SymbolTable.FromNativeReturn when generating call and import sigs. * generator/OpaqueGen.cs: Added. * generator/Property.cs: Handle boxed and opaques differently. * generator/SymbolTable.cs: Update for the opaque stuff and the new Return methods. Also change GetClassGen to simply call the as operator. * glib/Boxed.cs: Update for struct usage -- this is now a wrapper for the purposes of using with Value. * glib/Opaque.cs: Added. New base class for opaque structs. * glue/textiter.c, gtk/TextIter.custom: Remove. * gnome/Program.cs: Update for new struct marshalling. * parser/Metadata.pm: Use our own getChildrenByTagName. * parser/README: Update for new requirements (was out of sync with build.pl) * parser/gapi2xml.pl: Hide struct like const in field elements. * parser/gapi_pp.pl: Handle embedded union fields (poorly). * sample/test/TestColorSelection.cs: Comment out null color tests for now. svn path=/trunk/gtk-sharp/; revision=6186
2002-07-26 08:08:52 +02:00
Statistics.OpaqueCount++;
}
private bool Validate ()
{
if (methods != null)
foreach (Method method in methods.Values)
if (!method.Validate()) {
Console.WriteLine ("in Opaque" + QualifiedName);
return false;
}
return true;
}
2003-10-05 02:20:17 +02:00
protected override void GenCtors (GenerationInfo gen_info)
2002-07-25 Rachel Hestilow <hestilow@ximian.com> [about 60% of the marshalling patch that I lost. The rest to come tomorrow.] * generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase, delete large chunks duplicated from ClassBase. * generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn. * generator/ClassBase.cs: Move ctor stuff here. Add a CallByName overload with no parameters for the "self" reference. * generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType, FromNativeReturn. * generator/Method.cs: Use container_type.MarshalType, CallByName, and SymbolTable.FromNativeReturn when generating call and import sigs. * generator/OpaqueGen.cs: Added. * generator/Property.cs: Handle boxed and opaques differently. * generator/SymbolTable.cs: Update for the opaque stuff and the new Return methods. Also change GetClassGen to simply call the as operator. * glib/Boxed.cs: Update for struct usage -- this is now a wrapper for the purposes of using with Value. * glib/Opaque.cs: Added. New base class for opaque structs. * glue/textiter.c, gtk/TextIter.custom: Remove. * gnome/Program.cs: Update for new struct marshalling. * parser/Metadata.pm: Use our own getChildrenByTagName. * parser/README: Update for new requirements (was out of sync with build.pl) * parser/gapi2xml.pl: Hide struct like const in field elements. * parser/gapi_pp.pl: Handle embedded union fields (poorly). * sample/test/TestColorSelection.cs: Comment out null color tests for now. svn path=/trunk/gtk-sharp/; revision=6186
2002-07-26 08:08:52 +02:00
{
2003-10-05 02:20:17 +02:00
gen_info.Writer.WriteLine("\t\tpublic " + Name + "(IntPtr raw) : base(raw) {}");
gen_info.Writer.WriteLine();
2002-07-25 Rachel Hestilow <hestilow@ximian.com> [about 60% of the marshalling patch that I lost. The rest to come tomorrow.] * generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase, delete large chunks duplicated from ClassBase. * generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn. * generator/ClassBase.cs: Move ctor stuff here. Add a CallByName overload with no parameters for the "self" reference. * generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType, FromNativeReturn. * generator/Method.cs: Use container_type.MarshalType, CallByName, and SymbolTable.FromNativeReturn when generating call and import sigs. * generator/OpaqueGen.cs: Added. * generator/Property.cs: Handle boxed and opaques differently. * generator/SymbolTable.cs: Update for the opaque stuff and the new Return methods. Also change GetClassGen to simply call the as operator. * glib/Boxed.cs: Update for struct usage -- this is now a wrapper for the purposes of using with Value. * glib/Opaque.cs: Added. New base class for opaque structs. * glue/textiter.c, gtk/TextIter.custom: Remove. * gnome/Program.cs: Update for new struct marshalling. * parser/Metadata.pm: Use our own getChildrenByTagName. * parser/README: Update for new requirements (was out of sync with build.pl) * parser/gapi2xml.pl: Hide struct like const in field elements. * parser/gapi_pp.pl: Handle embedded union fields (poorly). * sample/test/TestColorSelection.cs: Comment out null color tests for now. svn path=/trunk/gtk-sharp/; revision=6186
2002-07-26 08:08:52 +02:00
2003-10-05 02:20:17 +02:00
base.GenCtors (gen_info);
2002-07-25 Rachel Hestilow <hestilow@ximian.com> [about 60% of the marshalling patch that I lost. The rest to come tomorrow.] * generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase, delete large chunks duplicated from ClassBase. * generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn. * generator/ClassBase.cs: Move ctor stuff here. Add a CallByName overload with no parameters for the "self" reference. * generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType, FromNativeReturn. * generator/Method.cs: Use container_type.MarshalType, CallByName, and SymbolTable.FromNativeReturn when generating call and import sigs. * generator/OpaqueGen.cs: Added. * generator/Property.cs: Handle boxed and opaques differently. * generator/SymbolTable.cs: Update for the opaque stuff and the new Return methods. Also change GetClassGen to simply call the as operator. * glib/Boxed.cs: Update for struct usage -- this is now a wrapper for the purposes of using with Value. * glib/Opaque.cs: Added. New base class for opaque structs. * glue/textiter.c, gtk/TextIter.custom: Remove. * gnome/Program.cs: Update for new struct marshalling. * parser/Metadata.pm: Use our own getChildrenByTagName. * parser/README: Update for new requirements (was out of sync with build.pl) * parser/gapi2xml.pl: Hide struct like const in field elements. * parser/gapi_pp.pl: Handle embedded union fields (poorly). * sample/test/TestColorSelection.cs: Comment out null color tests for now. svn path=/trunk/gtk-sharp/; revision=6186
2002-07-26 08:08:52 +02:00
}
}
}