[Gtk-sharp-list] Patch for TreeView
McP
mariano.cano@hispalinux.es
21 Apr 2003 17:32:40 +0200
--=-vtTzhLQgbQ5p3Bbl2ytl
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
The attached patch fix the arguments of GetCursor.
The patch adds pass_as="out" for the two argumends, hides GetCursor and
write that function in gtk/TreeView.custom
Ok to commit ?
--
McP <mariano.cano@hispalinux.es>
--=-vtTzhLQgbQ5p3Bbl2ytl
Content-Disposition: inline; filename=TreeView.GetCursor.patch
Content-Type: text/x-patch; name=TreeView.GetCursor.patch; charset=ANSI_X3.4-1968
Content-Transfer-Encoding: 7bit
Index: api/gtk-api.xml
===================================================================
RCS file: /mono/gtk-sharp/api/gtk-api.xml,v
retrieving revision 1.32
diff -u -r1.32 gtk-api.xml
--- api/gtk-api.xml 16 Apr 2003 02:26:11 -0000 1.32
+++ api/gtk-api.xml 21 Apr 2003 15:21:30 -0000
@@ -8128,11 +8128,11 @@
<method name="GetColumns" cname="gtk_tree_view_get_columns">
<return-type type="GList*"/>
</method>
- <method name="GetCursor" cname="gtk_tree_view_get_cursor">
+ <method name="GetCursor" cname="gtk_tree_view_get_cursor" hidden="1">
<return-type type="void"/>
<parameters>
- <parameter type="GtkTreePath**" name="path"/>
- <parameter type="GtkTreeViewColumn**" name="focus_column"/>
+ <parameter type="GtkTreePath**" name="path" pass_as="out"/>
+ <parameter type="GtkTreeViewColumn**" name="focus_column" pass_as="out"/>
</parameters>
</method>
<method name="GetDestRowAtPos" cname="gtk_tree_view_get_dest_row_at_pos">
Index: gtk/TreeView.custom
===================================================================
RCS file: /mono/gtk-sharp/gtk/TreeView.custom,v
retrieving revision 1.6
diff -u -r1.6 TreeView.custom
--- gtk/TreeView.custom 16 Apr 2003 02:26:11 -0000 1.6
+++ gtk/TreeView.custom 21 Apr 2003 15:21:30 -0000
@@ -95,3 +95,23 @@
return raw_ret;
}
+ [DllImport("libgtk-win32-2.0-0.dll")]
+ static extern void gtk_tree_view_get_cursor(IntPtr raw, out IntPtr path,out IntPtr focus_column);
+
+ /// <summary> GetCursor Method </summary>
+ /// <remarks> To be completed </remarks>
+ public void GetCursor(out Gtk.TreePath path,out Gtk.TreeViewColumn focus_column)
+ {
+ IntPtr pathHandle, focus_columnHandle;
+ gtk_tree_view_get_cursor (Handle, out pathHandle, out focus_columnHandle);
+
+ if (pathHandle == IntPtr.Zero)
+ path = null;
+ else
+ path = new TreePath(pathHandle);
+
+ if (focus_columnHandle == IntPtr.Zero)
+ focus_column = null;
+ else
+ focus_column = new TreeViewColumn (focus_columnHandle);
+ }
Index: sources/Gtk.metadata
===================================================================
RCS file: /mono/gtk-sharp/sources/Gtk.metadata,v
retrieving revision 1.50
diff -u -r1.50 Gtk.metadata
--- sources/Gtk.metadata 16 Apr 2003 02:26:12 -0000 1.50
+++ sources/Gtk.metadata 21 Apr 2003 15:21:34 -0000
@@ -394,6 +394,23 @@
</attribute>
</data>
</rule>
+<rule>
+ <class name="GtkTreeView">
+ <method>GetCursor</method>
+ </class>
+ <data>
+ <attribute target="param">
+ <filter level="name">path</filter>
+ <name>pass_as</name>
+ <value>out</value>
+ </attribute>
+ <attribute target="param">
+ <filter level="name">focus_column</filter>
+ <name>pass_as</name>
+ <value>out</value>
+ </attribute>
+ </data>
+</rule>
<!-- variable arguments -->
<rule>
@@ -1670,6 +1687,7 @@
<rule>
<class name="GtkTreeView">
<method>GetPathAtPos</method>
+ <method>GetCursor</method>
</class>
<data>
<attribute target="method">
--=-vtTzhLQgbQ5p3Bbl2ytl--