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

* generator/Parameters.cs : treat interface out params like objects.
	* gtk/gtk-api.xml : regenerated
	* gtk/Gtk.metadata : mark TreeSelection.GetSelected params out.
	* gtk/TreeSelection.custom : emptied since it's now generated.
	* sources/Gtk.metadata : kill hide of TreeSelection.GetSelected.
	[fixes #49858]

svn path=/trunk/gtk-sharp/; revision=19229
This commit is contained in:
Mike Kestner 2003-10-20 21:27:38 +00:00
parent 8eeccbb55c
commit 5eadb9b87c
6 changed files with 19 additions and 31 deletions

View file

@ -1,3 +1,12 @@
2003-10-20 Mike Kestner <mkestner@ximian.com>
* generator/Parameters.cs : treat interface out params like objects.
* gtk/gtk-api.xml : regenerated
* gtk/Gtk.metadata : mark TreeSelection.GetSelected params out.
* gtk/TreeSelection.custom : emptied since it's now generated.
* sources/Gtk.metadata : kill hide of TreeSelection.GetSelected.
[fixes #49858]
2003-10-20 Mike Kestner <mkestner@ximian.com>
* atk/atk-api.xml : regenerated

View file

@ -309,7 +309,7 @@ namespace GtkSharp.Generation {
if (table.IsEnum (type))
call_parm = name + "_as_int";
else if (table.IsObject (type) || table.IsOpaque (type) || cs_type == "GLib.Value") {
else if (table.IsObject (type) || table.IsInterface (type) || table.IsOpaque (type) || cs_type == "GLib.Value") {
call_parm = this [i].PassAs + " " + call_parm.Replace (".Handle", "_handle");
import_sig += this [i].PassAs + " ";
}
@ -361,7 +361,7 @@ namespace GtkSharp.Generation {
sw.WriteLine(indent + "\t\t\t" + name + " = new " + p.CSType + "();");
}
if ((is_get || p.PassAs == "out") && (gen is ObjectGen || gen is OpaqueGen || p.CSType == "GLib.Value"))
if ((is_get || p.PassAs == "out") && (gen is ObjectGen || gen is InterfaceGen || gen is OpaqueGen || p.CSType == "GLib.Value"))
sw.WriteLine(indent + "\t\t\tIntPtr " + name + "_handle;");
if (p.PassAs == "out" && gen is EnumGen)
@ -392,12 +392,12 @@ namespace GtkSharp.Generation {
}
IGeneratable gen = p.Generatable;
if (ref_owned_needed && gen is ObjectGen && p.PassAs == "out") {
if (ref_owned_needed && (gen is ObjectGen || gen is InterfaceGen) && p.PassAs == "out") {
ref_owned_needed = false;
sw.WriteLine(indent + "\t\t\tbool ref_owned = false;");
}
if (p.PassAs == "out" && (gen is ObjectGen || gen is OpaqueGen || p.CSType == "GLib.Value"))
if (p.PassAs == "out" && (gen is ObjectGen || gen is InterfaceGen || gen is OpaqueGen || p.CSType == "GLib.Value"))
sw.WriteLine(indent + "\t\t\t" + p.Name + " = " + gen.FromNativeReturn (p.Name + "_handle") + ";");
}
}

View file

@ -43,6 +43,7 @@
<attr path="//object[@cname='GtkToggleButton']/constructor[@cname='gtk_toggle_button_new_with_mnemonic']" name="preferred">1</attr>
<attr path="//object[@cname='GtkTreeModelSort']/method[@name='ConvertChildIterToIter']/*/*[@name='sort_iter']" name="pass_as">out</attr>
<attr path="//object[@cname='GtkTreeModelSort']/method[@name='ConvertIterToChildIter']/*/*[@name='child_iter']" name="pass_as">out</attr>
<attr path="//object[@cname='GtkTreeSelection']/method[@name='GetSelected']/*/*" name="pass_as">out</attr>
<attr path="//object[@cname='GtkTreeStore']/constructor[@cname='gtk_tree_store_newv']/parameters" name="va_type">length_param</attr>
<attr path="//object[@cname='GtkTreeStore']/method[@name='Append']/*/*[@name='iter']" name="pass_as">out</attr>
<attr path="//object[@cname='GtkTreeStore']/method[@name='Insert']/*/*[@name='iter']" name="pass_as">out</attr>

View file

@ -1,22 +1,3 @@
// Gtk.TreeSelection.Custom - Gtk TreeSelection calss customizations
//
// Author: Kristian Rietveld <kris@gtk.org>
//
// (c) 2002 Kristian Rietveld
//
// This code is inserted after the automatically generated code.
/// <summary> GetSelected Method </summary>
/// <remarks> To be completed </remarks>
[DllImport("libgtk-win32-2.0-0.dll")]
static extern bool gtk_tree_selection_get_selected(IntPtr raw, out IntPtr model, ref Gtk.TreeIter iter);
public bool GetSelected(out Gtk.TreeModel model, ref Gtk.TreeIter iter) {
IntPtr handle = (IntPtr) 0;
bool raw_ret = gtk_tree_selection_get_selected(Handle, out handle, ref iter);
bool ret = raw_ret;
model = (Gtk.TreeModel)GLib.Object.GetObject (handle, false);
return ret;
}
// this file was emptied when the generator became capable of generating its contents,
// but was not removed in the event future customizations are needed.

View file

@ -8253,11 +8253,11 @@
<method name="GetMode" cname="gtk_tree_selection_get_mode">
<return-type type="GtkSelectionMode" />
</method>
<method name="GetSelected" cname="gtk_tree_selection_get_selected" hidden="1">
<method name="GetSelected" cname="gtk_tree_selection_get_selected">
<return-type type="gboolean" />
<parameters>
<parameter type="GtkTreeModel**" name="model" />
<parameter type="GtkTreeIter*" name="iter" />
<parameter type="GtkTreeModel**" name="model" pass_as="out" />
<parameter type="GtkTreeIter*" name="iter" pass_as="out" />
</parameters>
</method>
<method name="GetSelectedRows" cname="gtk_tree_selection_get_selected_rows">

View file

@ -1257,9 +1257,6 @@
<class name="GtkTreePath">
<method>GetIndices</method>
</class>
<class name="GtkTreeSelection">
<method>GetSelected</method>
</class>
<class name="GtkTreeView">
<method>GetPathAtPos</method>
<method>GetSearchEqualFunc</method>