2004-12-01 Todd Berman <tberman@off.net>
* generator/StructGen.cs: Check to see if a GType is going to be generated. If not, generate a GType.Pointer. This fixes bug #70017. * glib/TypeConverter.cs: Remove the .IsValueType check, as those now have GType properties. * gda/Gda.metadata: Change GdaValue.GType to GdaValue.GdaType. * doc/en/Gda/Value.xml: Regenerated to reflect new API. svn path=/trunk/gtk-sharp/; revision=36912
This commit is contained in:
parent
e03eb3f68d
commit
6d9785c7f7
5 changed files with 39 additions and 18 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2004-12-01 Todd Berman <tberman@off.net>
|
||||||
|
|
||||||
|
* generator/StructGen.cs: Check to see if a GType is going to be
|
||||||
|
generated. If not, generate a GType.Pointer. This fixes bug
|
||||||
|
#70017.
|
||||||
|
* glib/TypeConverter.cs: Remove the .IsValueType check, as those
|
||||||
|
now have GType properties.
|
||||||
|
* gda/Gda.metadata: Change GdaValue.GType to GdaValue.GdaType.
|
||||||
|
* doc/en/Gda/Value.xml: Regenerated to reflect new API.
|
||||||
|
|
||||||
2004-11-30 Dan Winship <danw@novell.com>
|
2004-11-30 Dan Winship <danw@novell.com>
|
||||||
|
|
||||||
* sample/GtkDemo/DemoImages.cs: Fix some crashers discovered while
|
* sample/GtkDemo/DemoImages.cs: Fix some crashers discovered while
|
||||||
|
|
|
@ -696,19 +696,6 @@
|
||||||
<remarks>To be added</remarks>
|
<remarks>To be added</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
<Member MemberName="GType">
|
|
||||||
<MemberSignature Language="C#" Value="public Gda.ValueType GType { get; };" />
|
|
||||||
<MemberType>Property</MemberType>
|
|
||||||
<ReturnValue>
|
|
||||||
<ReturnType>Gda.ValueType</ReturnType>
|
|
||||||
</ReturnValue>
|
|
||||||
<Parameters />
|
|
||||||
<Docs>
|
|
||||||
<summary>To be added</summary>
|
|
||||||
<returns>a <see cref="T:Gda.ValueType" /></returns>
|
|
||||||
<remarks>To be added</remarks>
|
|
||||||
</Docs>
|
|
||||||
</Member>
|
|
||||||
<Member MemberName="Numeric">
|
<Member MemberName="Numeric">
|
||||||
<MemberSignature Language="C#" Value="public Gda.Numeric Numeric { set; get; };" />
|
<MemberSignature Language="C#" Value="public Gda.Numeric Numeric { set; get; };" />
|
||||||
<MemberType>Property</MemberType>
|
<MemberType>Property</MemberType>
|
||||||
|
@ -1209,5 +1196,18 @@
|
||||||
<remarks>To be added</remarks>
|
<remarks>To be added</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
<Member MemberName="GdaType">
|
||||||
|
<MemberSignature Language="C#" Value="public Gda.ValueType GdaType { get; };" />
|
||||||
|
<MemberType>Property</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>Gda.ValueType</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters />
|
||||||
|
<Docs>
|
||||||
|
<summary>To be added</summary>
|
||||||
|
<returns>a <see cref="T:Gda.ValueType" /></returns>
|
||||||
|
<remarks>To be added</remarks>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
</Members>
|
</Members>
|
||||||
</Type>
|
</Type>
|
||||||
|
|
|
@ -16,5 +16,6 @@
|
||||||
<attr path="//struct[@cname='GdaCommand']" name="opaque">1</attr>
|
<attr path="//struct[@cname='GdaCommand']" name="opaque">1</attr>
|
||||||
<attr path="//struct[@cname='GdaFieldAttributes']" name="opaque">1</attr>
|
<attr path="//struct[@cname='GdaFieldAttributes']" name="opaque">1</attr>
|
||||||
<attr path="//struct[@cname='GdaParameter']" name="opaque">1</attr>
|
<attr path="//struct[@cname='GdaParameter']" name="opaque">1</attr>
|
||||||
|
<attr path="/api/namespace/struct[@cname='GdaValue']/method[@cname='gda_value_get_type']" name="name">GetGdaType</attr>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|
||||||
|
|
|
@ -37,9 +37,21 @@ namespace GtkSharp.Generation {
|
||||||
|
|
||||||
public override void Generate (GenerationInfo gen_info)
|
public override void Generate (GenerationInfo gen_info)
|
||||||
{
|
{
|
||||||
|
StreamWriter sw = gen_info.Writer = gen_info.OpenStream (Name);
|
||||||
base.Generate (gen_info);
|
base.Generate (gen_info);
|
||||||
|
if (GetMethod ("GetType") == null && GetMethod ("GetGType") == null) {
|
||||||
|
sw.WriteLine ("\t\tprivate static GLib.GType GType {");
|
||||||
|
sw.WriteLine ("\t\t\tget { return GLib.GType.Pointer; }");
|
||||||
|
sw.WriteLine ("\t\t}");
|
||||||
|
}
|
||||||
|
sw.WriteLine ("#endregion");
|
||||||
|
AppendCustom (sw, gen_info.CustomDir);
|
||||||
|
sw.WriteLine ("\t}");
|
||||||
|
sw.WriteLine ("}");
|
||||||
|
sw.Close ();
|
||||||
|
gen_info.Writer = null;
|
||||||
Statistics.StructCount++;
|
Statistics.StructCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,13 +46,11 @@ namespace GLib {
|
||||||
return GType.UInt;
|
return GType.UInt;
|
||||||
if (type.IsSubclassOf (typeof (GLib.Object)))
|
if (type.IsSubclassOf (typeof (GLib.Object)))
|
||||||
return GType.Object;
|
return GType.Object;
|
||||||
PropertyInfo pi = type.GetProperty ("GType", BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy);
|
PropertyInfo pi = type.GetProperty ("GType", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy);
|
||||||
if (pi != null)
|
if (pi != null)
|
||||||
return (GType) pi.GetValue (null, null);
|
return (GType) pi.GetValue (null, null);
|
||||||
if (type.IsSubclassOf (typeof (GLib.Opaque)))
|
if (type.IsSubclassOf (typeof (GLib.Opaque)))
|
||||||
return GType.Pointer;
|
return GType.Pointer;
|
||||||
if (type.IsValueType)
|
|
||||||
return GType.Pointer;
|
|
||||||
|
|
||||||
return ManagedValue.GType;
|
return ManagedValue.GType;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue