2003-10-07 Mike Kestner <mkestner@ximian.com>

* api/gtk-api.xml : regenerated
	* generator/Method.cs : gen new_flag automatically if set
	* sources/Gtk.metadata : mark new_flag on Gtk.Bin.GetChild

svn path=/trunk/gtk-sharp/; revision=18736
This commit is contained in:
Mike Kestner 2003-10-08 02:56:44 +00:00
parent c9580f2355
commit f716fb7003
4 changed files with 13 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2003-10-07 Mike Kestner <mkestner@ximian.com>
* api/gtk-api.xml : regenerated
* generator/Method.cs : gen new_flag automatically if set
* sources/Gtk.metadata : mark new_flag on Gtk.Bin.GetChild
2003-10-07 Mike Kestner <mkestner@ximian.com>
* generator/ObjectGen.cs (Generate): check sigs.Count in addition

View File

@ -1513,7 +1513,7 @@
</object>
<object name="Bin" cname="GtkBin" parent="GtkContainer">
<field cname="child" type="GtkWidget*"/>
<method name="GetChild" cname="gtk_bin_get_child">
<method name="GetChild" cname="gtk_bin_get_child" new_flag="1">
<return-type type="GtkWidget*"/>
</method>
<method name="GetType" cname="gtk_bin_get_type" shared="true">

View File

@ -168,7 +168,7 @@ namespace GtkSharp.Generation {
else
safety = "";
is_get = ((parms != null && ((parms.IsAccessor && s_ret == "void") || (parms.Count == 0 && s_ret != "void")) || (parms == null && s_ret != "void")) && Name.Length > 3 && Name.Substring(0, 3) == "Get");
is_get = (((parms != null && ((parms.IsAccessor && s_ret == "void") || (parms.Count == 0 && s_ret != "void"))) || (parms == null && s_ret != "void")) && Name.Length > 3 && Name.Substring(0, 3) == "Get");
is_set = ((parms != null && (parms.IsAccessor || (parms.Count == 1 && s_ret == "void"))) && (Name.Length > 3 && Name.Substring(0, 3) == "Set"));
if (parms != null) {
@ -224,7 +224,7 @@ namespace GtkSharp.Generation {
else if (elem.HasAttribute("new_flag") || (container_type != null && (dup = container_type.GetMethodRecursively (Name)) != null) || (implementor != null && (dup = implementor.GetMethodRecursively (Name)) != null)) {
if (dup != null && dup.parms != null)
dup.parms.CreateSignature (false);
if (dup != null && ((dup.parms != null && dup.parms.Signature == parms.Signature) || (dup.parms == null && parms == null)))
if (elem.HasAttribute("new_flag") || (dup != null && ((dup.parms != null && dup.parms.Signature == parms.Signature) || (dup.parms == null && parms == null))))
sw.Write("new ");
}
@ -297,7 +297,7 @@ namespace GtkSharp.Generation {
/* we are generated by the get Method, if there is one */
if (is_set || is_get)
{
if (container_type.GetPropertyRecursively (Name.Substring (3)) != null)
if (!elem.HasAttribute("new_flag") && container_type.GetPropertyRecursively (Name.Substring (3)) != null)
return;
comp = GetComplement ();
if (comp != null && comp.Validate () && is_set && parms.AccessorReturnType == comp.s_ret)

View File

@ -1692,6 +1692,9 @@
</data>
</rule>
<rule>
<class name="GtkBin">
<method>GetChild</method>
</class>
<class name="GtkMenu">
<method>SetScreen</method>
</class>