2002-10-08 Kristian Rietveld <kris@gtk.org>

(So Miguel told me just to go ahead and commit -kris)

        * gtk/TreeSelection.custom: new file, defines a working
        GetSelected method (GetSelected is a bit tricky function).

        * generator/InterfaceGen.cs (Generate): also call AppendCustom

        * sources/Gtk.metadata: hide the autogenerated
        Gtk.TreeSelection.GetSelected method.

svn path=/trunk/gtk-sharp/; revision=8071
This commit is contained in:
Kristian Rietveld 2002-10-08 19:14:14 +00:00
parent 71bfd023be
commit 27862c71c3
4 changed files with 40 additions and 5 deletions

View File

@ -1,3 +1,15 @@
2002-10-08 Kristian Rietveld <kris@gtk.org>
(So Miguel told me just to go ahead and commit -kris)
* gtk/TreeSelection.custom: new file, defines a working
GetSelected method (GetSelected is a bit tricky function).
* generator/InterfaceGen.cs (Generate): also call AppendCustom
* sources/Gtk.metadata: hide the autogenerated
Gtk.TreeSelection.GetSelected method.
2002-10-08 Miguel de Icaza <miguel@ximian.com>
* gdk/Point.custom: Use (x,y) instead.

View File

@ -44,6 +44,8 @@ namespace GtkSharp.Generation {
method.GenerateDecl (sw);
}
AppendCustom (sw);
sw.WriteLine ("\t}");
CloseWriter (sw);
Statistics.IFaceCount++;

22
gtk/TreeSelection.custom Normal file
View File

@ -0,0 +1,22 @@
// 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("gtk-x11-2.0")]
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);
return ret;
}

View File

@ -106,11 +106,10 @@
<method>GetSelected</method>
</class>
<data>
<attribute target="param">
<filter level="name">iter</filter>
<name>pass_as</name>
<value>out</value>
</attribute>
<attribute target="method">
<name>hidden</name>
<value>1</value>
</attribute>
</data>
</rule>
<rule>