зеркало из https://github.com/mono/mail-archives.git
137 строки
4.3 KiB
HTML
137 строки
4.3 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Gtk-sharp-list] Changes to gapi_generator to support gtkmozembed
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:crichton%40gimp.org">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
|
|
<LINK REL="Previous" HREF="000940.html">
|
|
<LINK REL="Next" HREF="000946.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Gtk-sharp-list] Changes to gapi_generator to support gtkmozembed
|
|
</H1>
|
|
<B>Mark Crichton
|
|
</B>
|
|
<A HREF="mailto:crichton%40gimp.org"
|
|
TITLE="[Gtk-sharp-list] Changes to gapi_generator to support gtkmozembed">crichton@gimp.org
|
|
</A><BR>
|
|
<I>Thu, 13 Feb 2003 12:53:14 -0500</I>
|
|
<P><UL>
|
|
<LI> Previous message: <A HREF="000940.html">[Gtk-sharp-list] Correct Link on Website
|
|
</A></li>
|
|
<LI> Next message: <A HREF="000946.html">[Gtk-sharp-list] Changes to gapi_generator to support
|
|
gtkmozembed
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#937">[ date ]</a>
|
|
<a href="thread.html#937">[ thread ]</a>
|
|
<a href="subject.html#937">[ subject ]</a>
|
|
<a href="author.html#937">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>--uZ3hkaAS1mZxFaxD
|
|
Content-Type: multipart/mixed; boundary="45Z9DzgjV8m4Oswq"
|
|
Content-Disposition: inline
|
|
|
|
|
|
--45Z9DzgjV8m4Oswq
|
|
Content-Type: text/plain; charset=us-ascii
|
|
Content-Disposition: inline
|
|
|
|
* Mike Kestner (<A HREF="mailto:mkestner@speakeasy.net">mkestner@speakeasy.net</A>) [030114 22:21]:
|
|
><i> I recall approving the SignalHandler changes, and I don't think we ever
|
|
</I>><i> saw the parser patch.
|
|
</I>
|
|
Ugly patch attached. Warning, may cause fits of madness, but it works
|
|
in the case where you have added types to enums.
|
|
|
|
Mark
|
|
|
|
|
|
--45Z9DzgjV8m4Oswq
|
|
Content-Type: text/plain; charset=us-ascii
|
|
Content-Disposition: attachment; filename="parser.diff"
|
|
Content-Transfer-Encoding: quoted-printable
|
|
|
|
diff -u -r1.15 EnumGen.cs
|
|
--- generator/EnumGen.cs 5 Jan 2003 23:51:37 -0000 1.15
|
|
+++ generator/EnumGen.cs 13 Feb 2003 17:38:41 -0000
|
|
@@ -61,9 +61,35 @@
|
|
if (Elem.GetAttribute("type") =3D=3D "flags") =0D
|
|
sw.WriteLine ("\t[Flags]");=0D
|
|
=0D
|
|
+ // Ok, this is obscene. We need to go through the enums first=0D
|
|
+ // to find "large" values. If we find some, we need to change=0D
|
|
+ // the base type of the enum.=0D
|
|
+=0D
|
|
+ string enum_type =3D null;=0D
|
|
+=0D
|
|
+ foreach (XmlNode node in Elem.ChildNodes) {=0D
|
|
+ if (!(node is XmlElement) || node.Name !=3D "member") {=0D
|
|
+ continue;=0D
|
|
+ }=0D
|
|
+=0D
|
|
+ XmlElement member =3D (XmlElement) node;=0D
|
|
+=0D
|
|
+ if (member.HasAttribute("value")) {=0D
|
|
+ string value =3D member.GetAttribute("value");=0D
|
|
+ if (value.EndsWith("U")) {=0D
|
|
+ enum_type =3D "uint";=0D
|
|
+ member.SetAttribute("value", value.TrimEnd('U'));=0D
|
|
+ }=0D
|
|
+ }=0D
|
|
+ }=0D
|
|
+=0D
|
|
sw.WriteLine ("#region Autogenerated code");=0D
|
|
- =0D
|
|
- sw.WriteLine ("\tpublic enum " + Name + " {");=0D
|
|
+ =0D
|
|
+ if (enum_type !=3D null)=0D
|
|
+ sw.WriteLine ("\tpublic enum " + Name + " : " + enum_type + " {");=0D
|
|
+ else=0D
|
|
+ sw.WriteLine ("\tpublic enum " + Name + " {");=0D
|
|
+=0D
|
|
sw.WriteLine ();=0D
|
|
=0D
|
|
foreach (XmlNode node in Elem.ChildNodes) {=0D
|
|
|
|
--45Z9DzgjV8m4Oswq--
|
|
|
|
--uZ3hkaAS1mZxFaxD
|
|
Content-Type: application/pgp-signature
|
|
Content-Disposition: inline
|
|
|
|
-----BEGIN PGP SIGNATURE-----
|
|
Version: GnuPG v1.2.1 (SunOS)
|
|
|
|
iD8DBQE+S9uJOfj2Ja/u/oARAjgVAKC7AVIcVq1xbDWqkxTB1uCaQa9ltQCgritV
|
|
83/EbSV8kW2wViJ/rwa6fnQ=
|
|
=vz2u
|
|
-----END PGP SIGNATURE-----
|
|
|
|
--uZ3hkaAS1mZxFaxD--
|
|
|
|
</PRE>
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI> Previous message: <A HREF="000940.html">[Gtk-sharp-list] Correct Link on Website
|
|
</A></li>
|
|
<LI> Next message: <A HREF="000946.html">[Gtk-sharp-list] Changes to gapi_generator to support
|
|
gtkmozembed
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#937">[ date ]</a>
|
|
<a href="thread.html#937">[ thread ]</a>
|
|
<a href="subject.html#937">[ subject ]</a>
|
|
<a href="author.html#937">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
</body></html>
|