[Gtk-sharp-list] [patch] API fixes/bugs
Lee Mallabone
gnome@fonicmonkey.net
28 Mar 2003 08:08:17 +0000
--=-gi4n5BVbfM00Gna7L4/n
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi all,
I've been trying to fix API problems with Gtk#. I thought I'd start with
the bug report I made; #38660.
I've attached a patch that fixes a bug with GetLabelAlign() in 'Frame'
and most of the reported 'Widget' bugs.
However, there are strange things going on with 'ref' parameters. In
Widget.Intersect(), the parameters are marked as 'ref' in the native C
function, and also as 'ref' *inside* the implementation of Intersect().
However, on the actual C# method signature of Widget.Intersect(), there
are no 'ref' parameters. Would I be right in thinking this is a bug?
(Widget.SizeRequest also exhibits this behaviour).
Regards,
Lee.
--=-gi4n5BVbfM00Gna7L4/n
Content-Disposition: attachment; filename=Widget_Frame.diff
Content-Type: text/x-patch; name=Widget_Frame.diff; charset=ANSI_X3.4-1968
Content-Transfer-Encoding: 7bit
Index: sources/Gtk.metadata
===================================================================
RCS file: /cvs/public/gtk-sharp/sources/Gtk.metadata,v
retrieving revision 1.47
diff -u -r1.47 Gtk.metadata
--- sources/Gtk.metadata 27 Mar 2003 19:15:04 -0000 1.47
+++ sources/Gtk.metadata 28 Mar 2003 08:11:18 -0000
@@ -3,6 +3,18 @@
<!-- out parameters -->
<rule>
+ <class name="GtkFrame">
+ <method>GetLabelAlign</method>
+ </class>
+ <data>
+ <attribute target="param">
+ <filter level="type">gfloat*</filter>
+ <name>pass_as</name>
+ <value>out</value>
+ </attribute>
+ </data>
+</rule>
+<rule>
<class name="GtkTextBuffer">
<method>GetIterAtLineOffset</method>
<method>GetIterAtLineIndex</method>
@@ -279,7 +291,81 @@
</attribute>
</data>
</rule>
-
+<rule>
+ <class name="GtkWidget">
+ <method>GetPointer</method>
+ </class>
+ <data>
+ <attribute target="param">
+ <filter level="type">gint*</filter>
+ <name>pass_as</name>
+ <value>out</value>
+ </attribute>
+ </data>
+</rule>
+<rule>
+ <class name="GtkWidget">
+ <method>TranslateCoordinates</method>
+ </class>
+ <data>
+ <attribute target="param">
+ <filter level="name">dest_x</filter>
+ <name>pass_as</name>
+ <value>out</value>
+ </attribute>
+ </data>
+</rule>
+<rule>
+ <class name="GtkWidget">
+ <method>TranslateCoordinates</method>
+ </class>
+ <data>
+ <attribute target="param">
+ <filter level="name">dest_y</filter>
+ <name>pass_as</name>
+ <value>out</value>
+ </attribute>
+ </data>
+</rule>
+<rule>
+ <class name="GtkWidget">
+ <method>Path</method>
+ <method>ClassPath</method>
+ </class>
+ <data>
+ <attribute target="param">
+ <filter name="type">guint*</filter>
+ <name>pass_as</name>
+ <value>out</value>
+ </attribute>
+ </data>
+</rule>
+<rule>
+ <class name="GtkWidget">
+ <method>Path</method>
+ <method>ClassPath</method>
+ </class>
+ <data>
+ <attribute target="param">
+ <filter name="type">gchar**</filter>
+ <name>pass_as</name>
+ <value>out</value>
+ </attribute>
+ </data>
+</rule>
+<rule>
+ <class name="GtkWidget">
+ <method>StyleGetProperty</method>
+ </class>
+ <data>
+ <attribute target="param">
+ <filter level="name">value</filter>
+ <name>pass_as</name>
+ <value>out</value>
+ </attribute>
+ </data>
+</rule>
+
<!-- variable arguments -->
<rule>
Index: api/gtk-api.xml
===================================================================
RCS file: /cvs/public/gtk-sharp/api/gtk-api.xml,v
retrieving revision 1.29
diff -u -r1.29 gtk-api.xml
--- api/gtk-api.xml 27 Mar 2003 19:15:04 -0000 1.29
+++ api/gtk-api.xml 28 Mar 2003 08:11:23 -0000
@@ -3083,8 +3083,8 @@
<method name="GetLabelAlign" cname="gtk_frame_get_label_align">
<return-type type="void"/>
<parameters>
- <parameter type="gfloat*" name="xalign"/>
- <parameter type="gfloat*" name="yalign"/>
+ <parameter type="gfloat*" name="xalign" pass_as="out"/>
+ <parameter type="gfloat*" name="yalign" pass_as="out"/>
</parameters>
</method>
<method name="GetLabelWidget" cname="gtk_frame_get_label_widget">
@@ -9306,9 +9306,9 @@
<method name="ClassPath" cname="gtk_widget_class_path">
<return-type type="void"/>
<parameters>
- <parameter type="guint*" name="path_length"/>
- <parameter type="gchar**" name="path"/>
- <parameter type="gchar**" name="path_reversed"/>
+ <parameter type="guint*" name="path_length" pass_as="out"/>
+ <parameter type="gchar**" name="path" pass_as="out"/>
+ <parameter type="gchar**" name="path_reversed" pass_as="out"/>
</parameters>
</method>
<method name="CreatePangoContext" cname="gtk_widget_create_pango_context">
@@ -9404,8 +9404,8 @@
<method name="GetPointer" cname="gtk_widget_get_pointer">
<return-type type="void"/>
<parameters>
- <parameter type="gint*" name="x"/>
- <parameter type="gint*" name="y"/>
+ <parameter type="gint*" name="x" pass_as="out"/>
+ <parameter type="gint*" name="y" pass_as="out"/>
</parameters>
</method>
<method name="GetSettings" cname="gtk_widget_get_settings">
@@ -9523,9 +9523,9 @@
<method name="Path" cname="gtk_widget_path">
<return-type type="void"/>
<parameters>
- <parameter type="guint*" name="path_length"/>
- <parameter type="gchar**" name="path"/>
- <parameter type="gchar**" name="path_reversed"/>
+ <parameter type="guint*" name="path_length" pass_as="out"/>
+ <parameter type="gchar**" name="path" pass_as="out"/>
+ <parameter type="gchar**" name="path_reversed" pass_as="out"/>
</parameters>
</method>
<method name="PopColormap" cname="gtk_widget_pop_colormap" shared="true">
@@ -9767,7 +9767,7 @@
<return-type type="void"/>
<parameters>
<parameter type="const-gchar*" name="property_name"/>
- <parameter type="GValue*" name="value"/>
+ <parameter type="GValue*" name="value" pass_as="out"/>
</parameters>
</method>
<method name="StyleGetValist" cname="gtk_widget_style_get_valist">
@@ -9786,8 +9786,8 @@
<parameter type="GtkWidget*" name="dest_widget"/>
<parameter type="gint" name="src_x"/>
<parameter type="gint" name="src_y"/>
- <parameter type="gint*" name="dest_x"/>
- <parameter type="gint*" name="dest_y"/>
+ <parameter type="gint*" name="dest_x" pass_as="out"/>
+ <parameter type="gint*" name="dest_y" pass_as="out"/>
</parameters>
</method>
<method name="Unmap" cname="gtk_widget_unmap">
--=-gi4n5BVbfM00Gna7L4/n--