[Gtk-sharp-list] Pango API issues
Shane Hyde
shane@enactive.org
Tue, 08 Jul 2003 18:04:34 +1000
This is a multi-part message in MIME format.
--------------010906000805020009080802
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Actually I noticed that a couple of those parms are const, so they
probably wont need a ref tag
Shane
Shane Hyde wrote:
> While trying to call Pango# APIs I found that Pango.Rectangle parms
> are not being passed to Pango# as ref objects. This means that all
> the APIs which return Rectangle do not actually return values that
> they should.
>
> I have attached a patch for pango-api.xml which fixes this. You can
> then use GetPixelExtents (etc).
>
> Hope this helps.
> Shane
>
>------------------------------------------------------------------------
>
>Index: pango-api.xml
>===================================================================
>RCS file: /mono/gtk-sharp/api/pango-api.xml,v
>retrieving revision 1.9
>diff -u -r1.9 pango-api.xml
>--- pango-api.xml 6 Jul 2003 04:08:12 -0000 1.9
>+++ pango-api.xml 8 Jul 2003 07:38:50 -0000
>@@ -204,8 +204,8 @@
> <return-type type="void"/>
> <parameters>
> <parameter type="PangoGlyph" name="glyph"/>
>- <parameter type="PangoRectangle*" name="ink_rect"/>
>- <parameter type="PangoRectangle*" name="logical_rect"/>
>+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref"/>
>+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
> </parameters>
> </method>
> <method name="GetMetrics" cname="pango_font_get_metrics">
>@@ -324,15 +324,15 @@
> <return-type type="void"/>
> <parameters>
> <parameter type="int" name="index"/>
>- <parameter type="PangoRectangle*" name="strong_pos"/>
>- <parameter type="PangoRectangle*" name="weak_pos"/>
>+ <parameter type="PangoRectangle*" name="strong_pos" pass_as="ref"/>
>+ <parameter type="PangoRectangle*" name="weak_pos" pass_as="ref"/>
> </parameters>
> </method>
> <method name="GetExtents" cname="pango_layout_get_extents">
> <return-type type="void"/>
> <parameters>
>- <parameter type="PangoRectangle*" name="ink_rect"/>
>- <parameter type="PangoRectangle*" name="logical_rect"/>
>+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref"/>
>+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
> </parameters>
> </method>
> <method name="GetIndent" cname="pango_layout_get_indent">
>@@ -366,8 +366,8 @@
> <method name="GetPixelExtents" cname="pango_layout_get_pixel_extents">
> <return-type type="void"/>
> <parameters>
>- <parameter type="PangoRectangle*" name="ink_rect"/>
>- <parameter type="PangoRectangle*" name="logical_rect"/>
>+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref"/>
>+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
> </parameters>
> </method>
> <method name="GetPixelSize" cname="pango_layout_get_pixel_size">
>@@ -409,7 +409,7 @@
> <return-type type="void"/>
> <parameters>
> <parameter type="int" name="index"/>
>- <parameter type="PangoRectangle*" name="pos"/>
>+ <parameter type="PangoRectangle*" name="pos" pass_as="ref"/>
> </parameters>
> </method>
> <method name="MoveCursorVisually" cname="pango_layout_move_cursor_visually">
>@@ -662,8 +662,8 @@
> <field cname="logical_rect" type="PangoRectangle"/>
> <constructor cname="pango_attr_shape_new">
> <parameters>
>- <parameter type="const-PangoRectangle*" name="ink_rect"/>
>- <parameter type="const-PangoRectangle*" name="logical_rect"/>
>+ <parameter type="const-PangoRectangle*" name="ink_rect" pass_as="ref"/>
>+ <parameter type="const-PangoRectangle*" name="logical_rect" pass_as="ref"/>
> </parameters>
> </constructor>
> </struct>
>@@ -972,8 +972,8 @@
> <return-type type="void"/>
> <parameters>
> <parameter type="PangoFont*" name="font"/>
>- <parameter type="PangoRectangle*" name="ink_rect"/>
>- <parameter type="PangoRectangle*" name="logical_rect"/>
>+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref"/>
>+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
> </parameters>
> </method>
> <method name="ExtentsRange" cname="pango_glyph_string_extents_range">
>@@ -982,8 +982,8 @@
> <parameter type="int" name="start"/>
> <parameter type="int" name="end"/>
> <parameter type="PangoFont*" name="font"/>
>- <parameter type="PangoRectangle*" name="ink_rect"/>
>- <parameter type="PangoRectangle*" name="logical_rect"/>
>+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref"/>
>+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
> </parameters>
> </method>
> <method name="Free" cname="pango_glyph_string_free">
>@@ -1169,14 +1169,14 @@
> <method name="GetCharExtents" cname="pango_layout_iter_get_char_extents">
> <return-type type="void"/>
> <parameters>
>- <parameter type="PangoRectangle*" name="logical_rect"/>
>+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
> </parameters>
> </method>
> <method name="GetClusterExtents" cname="pango_layout_iter_get_cluster_extents">
> <return-type type="void"/>
> <parameters>
>- <parameter type="PangoRectangle*" name="ink_rect"/>
>- <parameter type="PangoRectangle*" name="logical_rect"/>
>+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref"/>
>+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
> </parameters>
> </method>
> <method name="GetIndex" cname="pango_layout_iter_get_index">
>@@ -1185,8 +1185,8 @@
> <method name="GetLayoutExtents" cname="pango_layout_iter_get_layout_extents">
> <return-type type="void"/>
> <parameters>
>- <parameter type="PangoRectangle*" name="ink_rect"/>
>- <parameter type="PangoRectangle*" name="logical_rect"/>
>+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref" />
>+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref" />
> </parameters>
> </method>
> <method name="GetLine" cname="pango_layout_iter_get_line">
>@@ -1195,8 +1195,8 @@
> <method name="GetLineExtents" cname="pango_layout_iter_get_line_extents">
> <return-type type="void"/>
> <parameters>
>- <parameter type="PangoRectangle*" name="ink_rect"/>
>- <parameter type="PangoRectangle*" name="logical_rect"/>
>+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref" />
>+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref" />
> </parameters>
> </method>
> <method name="GetLineYrange" cname="pango_layout_iter_get_line_yrange">
>@@ -1212,8 +1212,8 @@
> <method name="GetRunExtents" cname="pango_layout_iter_get_run_extents">
> <return-type type="void"/>
> <parameters>
>- <parameter type="PangoRectangle*" name="ink_rect"/>
>- <parameter type="PangoRectangle*" name="logical_rect"/>
>+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref"/>
>+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
> </parameters>
> </method>
> <method name="NextChar" cname="pango_layout_iter_next_char">
>@@ -1237,15 +1237,15 @@
> <method name="GetExtents" cname="pango_layout_line_get_extents">
> <return-type type="void"/>
> <parameters>
>- <parameter type="PangoRectangle*" name="ink_rect"/>
>- <parameter type="PangoRectangle*" name="logical_rect"/>
>+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref"/>
>+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
> </parameters>
> </method>
> <method name="GetPixelExtents" cname="pango_layout_line_get_pixel_extents">
> <return-type type="void"/>
> <parameters>
>- <parameter type="PangoRectangle*" name="ink_rect"/>
>- <parameter type="PangoRectangle*" name="logical_rect"/>
>+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref" />
>+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref" />
> </parameters>
> </method>
> <method name="GetXRanges" cname="pango_layout_line_get_x_ranges">
>
>
--------------010906000805020009080802
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Actually I noticed that a couple of those parms are const, so they
probably wont need a ref tag<br>
<br>
Shane<br>
<br>
Shane Hyde wrote:<br>
<blockquote type="cite" cite="mid3F0A757B.7070205@enactive.org">While
trying to call Pango# APIs I found that Pango.Rectangle parms are not
being passed to Pango# as ref objects. This means that all the APIs
which return Rectangle do not actually return values that they should.
<br>
<br>
I have attached a patch for pango-api.xml which fixes this. You can
then use GetPixelExtents (etc).
<br>
<br>
Hope this helps.
<br>
Shane
<br>
<br>
<pre wrap="">
<hr width="90%" size="4">
Index: pango-api.xml
===================================================================
RCS file: /mono/gtk-sharp/api/pango-api.xml,v
retrieving revision 1.9
diff -u -r1.9 pango-api.xml
--- pango-api.xml 6 Jul 2003 04:08:12 -0000 1.9
+++ pango-api.xml 8 Jul 2003 07:38:50 -0000
@@ -204,8 +204,8 @@
<return-type type="void"/>
<parameters>
<parameter type="PangoGlyph" name="glyph"/>
- <parameter type="PangoRectangle*" name="ink_rect"/>
- <parameter type="PangoRectangle*" name="logical_rect"/>
+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref"/>
+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
</parameters>
</method>
<method name="GetMetrics" cname="pango_font_get_metrics">
@@ -324,15 +324,15 @@
<return-type type="void"/>
<parameters>
<parameter type="int" name="index"/>
- <parameter type="PangoRectangle*" name="strong_pos"/>
- <parameter type="PangoRectangle*" name="weak_pos"/>
+ <parameter type="PangoRectangle*" name="strong_pos" pass_as="ref"/>
+ <parameter type="PangoRectangle*" name="weak_pos" pass_as="ref"/>
</parameters>
</method>
<method name="GetExtents" cname="pango_layout_get_extents">
<return-type type="void"/>
<parameters>
- <parameter type="PangoRectangle*" name="ink_rect"/>
- <parameter type="PangoRectangle*" name="logical_rect"/>
+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref"/>
+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
</parameters>
</method>
<method name="GetIndent" cname="pango_layout_get_indent">
@@ -366,8 +366,8 @@
<method name="GetPixelExtents" cname="pango_layout_get_pixel_extents">
<return-type type="void"/>
<parameters>
- <parameter type="PangoRectangle*" name="ink_rect"/>
- <parameter type="PangoRectangle*" name="logical_rect"/>
+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref"/>
+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
</parameters>
</method>
<method name="GetPixelSize" cname="pango_layout_get_pixel_size">
@@ -409,7 +409,7 @@
<return-type type="void"/>
<parameters>
<parameter type="int" name="index"/>
- <parameter type="PangoRectangle*" name="pos"/>
+ <parameter type="PangoRectangle*" name="pos" pass_as="ref"/>
</parameters>
</method>
<method name="MoveCursorVisually" cname="pango_layout_move_cursor_visually">
@@ -662,8 +662,8 @@
<field cname="logical_rect" type="PangoRectangle"/>
<constructor cname="pango_attr_shape_new">
<parameters>
- <parameter type="const-PangoRectangle*" name="ink_rect"/>
- <parameter type="const-PangoRectangle*" name="logical_rect"/>
+ <parameter type="const-PangoRectangle*" name="ink_rect" pass_as="ref"/>
+ <parameter type="const-PangoRectangle*" name="logical_rect" pass_as="ref"/>
</parameters>
</constructor>
</struct>
@@ -972,8 +972,8 @@
<return-type type="void"/>
<parameters>
<parameter type="PangoFont*" name="font"/>
- <parameter type="PangoRectangle*" name="ink_rect"/>
- <parameter type="PangoRectangle*" name="logical_rect"/>
+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref"/>
+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
</parameters>
</method>
<method name="ExtentsRange" cname="pango_glyph_string_extents_range">
@@ -982,8 +982,8 @@
<parameter type="int" name="start"/>
<parameter type="int" name="end"/>
<parameter type="PangoFont*" name="font"/>
- <parameter type="PangoRectangle*" name="ink_rect"/>
- <parameter type="PangoRectangle*" name="logical_rect"/>
+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref"/>
+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
</parameters>
</method>
<method name="Free" cname="pango_glyph_string_free">
@@ -1169,14 +1169,14 @@
<method name="GetCharExtents" cname="pango_layout_iter_get_char_extents">
<return-type type="void"/>
<parameters>
- <parameter type="PangoRectangle*" name="logical_rect"/>
+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
</parameters>
</method>
<method name="GetClusterExtents" cname="pango_layout_iter_get_cluster_extents">
<return-type type="void"/>
<parameters>
- <parameter type="PangoRectangle*" name="ink_rect"/>
- <parameter type="PangoRectangle*" name="logical_rect"/>
+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref"/>
+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
</parameters>
</method>
<method name="GetIndex" cname="pango_layout_iter_get_index">
@@ -1185,8 +1185,8 @@
<method name="GetLayoutExtents" cname="pango_layout_iter_get_layout_extents">
<return-type type="void"/>
<parameters>
- <parameter type="PangoRectangle*" name="ink_rect"/>
- <parameter type="PangoRectangle*" name="logical_rect"/>
+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref" />
+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref" />
</parameters>
</method>
<method name="GetLine" cname="pango_layout_iter_get_line">
@@ -1195,8 +1195,8 @@
<method name="GetLineExtents" cname="pango_layout_iter_get_line_extents">
<return-type type="void"/>
<parameters>
- <parameter type="PangoRectangle*" name="ink_rect"/>
- <parameter type="PangoRectangle*" name="logical_rect"/>
+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref" />
+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref" />
</parameters>
</method>
<method name="GetLineYrange" cname="pango_layout_iter_get_line_yrange">
@@ -1212,8 +1212,8 @@
<method name="GetRunExtents" cname="pango_layout_iter_get_run_extents">
<return-type type="void"/>
<parameters>
- <parameter type="PangoRectangle*" name="ink_rect"/>
- <parameter type="PangoRectangle*" name="logical_rect"/>
+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref"/>
+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
</parameters>
</method>
<method name="NextChar" cname="pango_layout_iter_next_char">
@@ -1237,15 +1237,15 @@
<method name="GetExtents" cname="pango_layout_line_get_extents">
<return-type type="void"/>
<parameters>
- <parameter type="PangoRectangle*" name="ink_rect"/>
- <parameter type="PangoRectangle*" name="logical_rect"/>
+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref"/>
+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref"/>
</parameters>
</method>
<method name="GetPixelExtents" cname="pango_layout_line_get_pixel_extents">
<return-type type="void"/>
<parameters>
- <parameter type="PangoRectangle*" name="ink_rect"/>
- <parameter type="PangoRectangle*" name="logical_rect"/>
+ <parameter type="PangoRectangle*" name="ink_rect" pass_as="ref" />
+ <parameter type="PangoRectangle*" name="logical_rect" pass_as="ref" />
</parameters>
</method>
<method name="GetXRanges" cname="pango_layout_line_get_x_ranges">
</pre>
</blockquote>
</body>
</html>
--------------010906000805020009080802--