diff --git a/ChangeLog b/ChangeLog index e6988774d..dc98cb878 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-11-16 Mike Kestner + + * generator/Parameters: handle array+len param pairs. + * gtk/Gtk.metadata : unhide DestDefaults and mark targets param of + drag_dest_set as array. + * gtk/gtk-api.xml : regenerate + 2003-11-14 Mike Kestner * gtk/Gtk.metadata : fully qualify attr paths diff --git a/generator/Parameters.cs b/generator/Parameters.cs index 45797d54f..58f7874d8 100644 --- a/generator/Parameters.cs +++ b/generator/Parameters.cs @@ -60,6 +60,26 @@ namespace GtkSharp.Generation { } } + public bool IsCount { + get { + + if (Name.StartsWith("n_")) + switch (CSType) { + case "int": + case "uint": + case "long": + case "ulong": + case "short": + case "ushort": + return true; + default: + return false; + } + else + return false; + } + } + public bool IsLength { get { @@ -255,6 +275,12 @@ namespace GtkSharp.Generation { string m_type = this [i].MarshalType; string name = this [i].Name; + if (i > 0 && this [i - 1].IsArray && this [i].IsCount) { + call_string += ", " + (cs_type != "int" ? "(" + cs_type + ") " : "") + this [i - 1].Name + ".Length"; + import_sig += ", " + m_type + " " + name; + continue; + } + if (i > 0 && this [i - 1].IsString && this [i].IsLength) { call_string += ", " + (cs_type != "int" ? "(" + cs_type + ") " : "") + this [i - 1].Name + ".Length"; import_sig += ", " + m_type + " " + name; diff --git a/gtk/Gtk.metadata b/gtk/Gtk.metadata index 79a53c2c9..3640a91a4 100644 --- a/gtk/Gtk.metadata +++ b/gtk/Gtk.metadata @@ -12,10 +12,10 @@ 1 ref GdkModifierType + 1 1 StockManager 1 - 1 1 1 1 diff --git a/gtk/gtk-api.xml b/gtk/gtk-api.xml index 99422fd78..51fa207c6 100644 --- a/gtk/gtk-api.xml +++ b/gtk/gtk-api.xml @@ -105,7 +105,7 @@ -