[vala] pango: Multiple binding fixes



commit 5d6c21cebd3c5a4fdbf50cfa780729ba863c2909
Author: Michal Hruby <michal mhr gmail com>
Date:   Fri Mar 11 01:27:31 2011 +0100

    pango: Multiple binding fixes
    
    Fixes bug 642293.

 vapi/packages/pango/pango.metadata |   56 ++++++++++++++++++++++++
 vapi/pango.vapi                    |   82 ++++++++++++++++++------------------
 2 files changed, 97 insertions(+), 41 deletions(-)
---
diff --git a/vapi/packages/pango/pango.metadata b/vapi/packages/pango/pango.metadata
index 6401744..ae10dae 100644
--- a/vapi/packages/pango/pango.metadata
+++ b/vapi/packages/pango/pango.metadata
@@ -12,7 +12,10 @@ PangoAttrInt.attr hidden="1"
 pango_attr_list_copy transfer_ownership="1"
 pango_attr_list_get_iterator transfer_ownership="1"
 pango_attr_list_change.attr transfer_ownership="1"
+pango_attr_list_filter nullable="1" transfer_ownership="1"
+pango_attr_list_filter.data hidden="1"
 pango_attr_list_insert.attr transfer_ownership="1"
+pango_attr_list_insert_before.attr transfer_ownership="1"
 PangoAttrLanguage base_class="PangoAttribute" free_function="pango_attribute_destroy"
 PangoAttrLanguage.attr hidden="1"
 PangoAttrShape base_class="PangoAttribute" free_function="pango_attribute_destroy"
@@ -40,7 +43,14 @@ pango_attr_underline_new transfer_ownership="1"
 pango_attr_variant_new transfer_ownership="1"
 pango_attr_weight_new transfer_ownership="1"
 pango_attr_iterator_copy transfer_ownership="1"
+pango_attr_iterator_range.start is_out="1"
+pango_attr_iterator_range.end is_out="1"
+pango_context_get_metrics transfer_ownership="1"
+pango_context_get_metrics.desc nullable="1"
+pango_context_get_metrics.language nullable="1"
 pango_coverage_copy transfer_ownership="1"
+pango_coverage_from_bytes transfer_ownership="1"
+pango_coverage_to_bytes.bytes is_array="1" is_out="1" transfer_ownership="1"
 pango_font_description_copy transfer_ownership="1"
 pango_font_description_copy_static hidden="1"
 PangoGlyph hidden="1"
@@ -50,6 +60,7 @@ pango_glyph_string_copy transfer_ownership="1"
 PangoGlyphString.glyphs is_array="1" weak="0" array_length_cname="num_glyphs"
 PangoGlyphString.log_clusters is_array="1" weak="0" array_length_cname="num_glyphs"
 pango_item_copy transfer_ownership="1"
+pango_item_split transfer_ownership="1"
 pango_layout_copy transfer_ownership="1"
 pango_layout_iter_copy transfer_ownership="1"
 pango_tab_array_copy transfer_ownership="1"
@@ -62,12 +73,29 @@ pango_get_log_attrs.log_attrs is_array="1"
 pango_get_log_attrs.attrs_len hidden="1"
 pango_find_paragraph_boundary.paragraph_delimiter_index is_out="1"
 pango_find_paragraph_boundary.next_paragraph_start is_out="1"
+pango_font_describe transfer_ownership="1"
+pango_font_describe_with_absolute_size transfer_ownership="1"
+pango_font_get_coverage transfer_ownership="1"
 pango_font_get_glyph_extents.ink_rect is_out="1"
 pango_font_get_glyph_extents.logical_rect is_out="1"
+pango_font_get_metrics transfer_ownership="1"
+pango_font_get_metrics.language nullable="1"
+pango_font_get_font_map nullable="1" transfer_ownership="1"
 # PangoFontDescription should be opaque value type
 PangoFontDescription is_immutable="1"
 pango_font_description_from_string transfer_ownership="1"
+pango_font_description_to_string transfer_ownership="1"
+pango_font_description_to_filename transfer_ownership="1"
+pango_font_face_describe transfer_ownership="1"
+pango_font_face_list_sizes.sizes is_array="1" is_out="1" transfer_ownership="1"
+pango_font_family_list_faces.faces is_array="1" is_out="1" transfer_ownership="1"
+pango_font_map_create_context transfer_ownership="1"
+pango_fontset_foreach.data hidden="1"
+pango_fontset_get_font transfer_ownership="1"
+pango_fontset_get_metrics transfer_ownership="1"
 PangoGlyphInfo is_value_type="1"
+pango_glyph_item_apply_attrs transfer_ownership="1" type_arguments="Pango.GlyphItem"
+pango_glyph_item_get_logical_widths.logical_widths is_array="1" no_array_length="1"
 pango_glyph_item_letter_space.log_attrs is_array="1"
 pango_glyph_item_split transfer_ownership="1"
 PangoGlyphItemIter is_value_type="1"
@@ -76,12 +104,22 @@ pango_glyph_string_extents.ink_rect is_out="1"
 pango_glyph_string_extents.logical_rect is_out="1"
 pango_glyph_string_extents_range.ink_rect is_out="1"
 pango_glyph_string_extents_range.logical_rect is_out="1"
+pango_glyph_string_get_logical_widths.logical_widths is_array="1" no_array_length="1"
+pango_glyph_string_index_to_x.x_pos is_out="1"
+pango_glyph_string_x_to_index.index_ is_out="1"
+pango_glyph_string_x_to_index.trailing is_out="1"
 PangoGlyphVisAttr is_value_type="1"
+pango_language_from_string transfer_ownership="1" nullable="1"
+pango_language_get_scripts is_array="1"
+pango_language_get_scripts.num_scripts hidden="1"
 pango_layout_get_cursor_pos.strong_pos is_out="1"
 pango_layout_get_cursor_pos.weak_pos is_out="1"
 pango_layout_get_extents.ink_rect is_out="1"
 pango_layout_get_extents.logical_rect is_out="1"
+pango_layouy_get_iter transfer_ownership="1"
 pango_layout_get_log_attrs.attrs is_array="1" is_out="1" transfer_ownership="1"
+pango_layout_get_lines type_arguments="unowned Pango.LayoutLine"
+pango_layout_get_lines_readonly type_arguments="unowned Pango.LayoutLine"
 pango_layout_get_pixel_extents.ink_rect is_out="1"
 pango_layout_get_pixel_extents.logical_rect is_out="1"
 pango_layout_get_pixel_size.width is_out="1"
@@ -89,6 +127,14 @@ pango_layout_get_pixel_size.height is_out="1"
 pango_layout_get_size.width is_out="1"
 pango_layout_get_size.height is_out="1"
 pango_layout_index_to_pos.pos is_out="1"
+pango_layout_index_to_line_x.line is_out="1"
+pango_layout_index_to_line_x.x_pos is_out="1"
+pango_layout_get_font_description nullable="1"
+pango_layout_set_font_description.desc nullable="1"
+pango_layout_move_cursor_visually.new_index is_out="1"
+pango_layout_move_cursor_visually.new_trailing is_out="1"
+pango_layout_xy_to_index.index_ is_out="1"
+pango_layout_xy_to_index.trailing is_out="1"
 pango_layout_iter_get_char_extents.logical_rect is_out="1"
 pango_layout_iter_get_cluster_extents.ink_rect is_out="1"
 pango_layout_iter_get_cluster_extents.logical_rect is_out="1"
@@ -108,4 +154,14 @@ PangoLogAttr is_value_type="1"
 PangoMatrix is_value_type="1"
 pango_matrix_transform_pixel_rectangle.rect is_ref="1"
 pango_matrix_transform_rectangle.rect is_ref="1"
+pango_parse_enum.str nullable="1"
+pango_parse_enum.value is_out="1"
+pango_parse_enum.possible_values is_out="1" transfer_ownership="1"
+pango_parse_markup.attr_list transfer_ownership="1"
+pango_parse_markup.text transfer_ownership="1"
+pango_parse_markup.accel_char is_out="1"
+pango_parse_stretch.stretch is_out="1"
+pango_parse_style.style is_out="1"
+pango_parse_variant.variant is_out="1"
+pango_parse_weight.weight is_out="1"
 PangoRectangle is_value_type="1"
diff --git a/vapi/pango.vapi b/vapi/pango.vapi
index 20d6cdc..8d183a9 100644
--- a/vapi/pango.vapi
+++ b/vapi/pango.vapi
@@ -57,7 +57,7 @@ namespace Pango {
 		public unowned GLib.SList get_attrs ();
 		public void get_font (Pango.FontDescription desc, out unowned Pango.Language language, GLib.SList extra_attrs);
 		public bool next ();
-		public void range (int start, int end);
+		public void range (out int start, out int end);
 	}
 	[Compact]
 	[CCode (free_function = "pango_attribute_destroy", cheader_filename = "pango/pango.h")]
@@ -73,10 +73,10 @@ namespace Pango {
 		public AttrList ();
 		public void change (owned Pango.Attribute attr);
 		public Pango.AttrList copy ();
-		public unowned Pango.AttrList filter (Pango.AttrFilterFunc func, void* data);
+		public Pango.AttrList? filter (Pango.AttrFilterFunc func);
 		public Pango.AttrIterator get_iterator ();
 		public void insert (owned Pango.Attribute attr);
-		public void insert_before (Pango.Attribute attr);
+		public void insert_before (owned Pango.Attribute attr);
 		public void splice (Pango.AttrList other, int pos, int len);
 	}
 	[Compact]
@@ -128,7 +128,7 @@ namespace Pango {
 		public Pango.GravityHint get_gravity_hint ();
 		public unowned Pango.Language get_language ();
 		public Pango.Matrix get_matrix ();
-		public unowned Pango.FontMetrics get_metrics (Pango.FontDescription desc, Pango.Language language);
+		public Pango.FontMetrics get_metrics (Pango.FontDescription? desc, Pango.Language? language);
 		public void list_families (Pango.FontFamily[] families);
 		public unowned Pango.Font load_font (Pango.FontDescription desc);
 		public unowned Pango.Fontset load_fontset (Pango.FontDescription desc, Pango.Language language);
@@ -150,11 +150,11 @@ namespace Pango {
 		[CCode (has_construct_function = false)]
 		public Coverage ();
 		public Pango.Coverage copy ();
-		public static unowned Pango.Coverage from_bytes (uchar[] bytes);
+		public static Pango.Coverage from_bytes (uchar[] bytes);
 		public Pango.CoverageLevel @get (int index_);
 		public void max (Pango.Coverage other);
 		public void @set (int index_, Pango.CoverageLevel level);
-		public void to_bytes (uchar[] bytes);
+		public void to_bytes (out uchar[][] bytes);
 	}
 	[Compact]
 	[CCode (cheader_filename = "pango/pango.h")]
@@ -168,14 +168,14 @@ namespace Pango {
 	public class Font : GLib.Object {
 		[CCode (has_construct_function = false)]
 		protected Font ();
-		public unowned Pango.FontDescription describe ();
-		public unowned Pango.FontDescription describe_with_absolute_size ();
+		public Pango.FontDescription describe ();
+		public Pango.FontDescription describe_with_absolute_size ();
 		public static void descriptions_free (Pango.FontDescription[] descs);
 		public unowned Pango.EngineShape find_shaper (Pango.Language language, uint32 ch);
-		public unowned Pango.Coverage get_coverage (Pango.Language language);
-		public unowned Pango.FontMap get_font_map ();
+		public Pango.Coverage get_coverage (Pango.Language language);
+		public Pango.FontMap? get_font_map ();
 		public void get_glyph_extents (Pango.Glyph glyph, out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
-		public unowned Pango.FontMetrics get_metrics (Pango.Language language);
+		public Pango.FontMetrics get_metrics (Pango.Language? language);
 	}
 	[Compact]
 	[Immutable]
@@ -208,18 +208,18 @@ namespace Pango {
 		public void set_style (Pango.Style style);
 		public void set_variant (Pango.Variant variant);
 		public void set_weight (Pango.Weight weight);
-		public unowned string to_filename ();
-		public unowned string to_string ();
+		public string to_filename ();
+		public string to_string ();
 		public void unset_fields (Pango.FontMask to_unset);
 	}
 	[CCode (cheader_filename = "pango/pango.h")]
 	public class FontFace : GLib.Object {
 		[CCode (has_construct_function = false)]
 		protected FontFace ();
-		public unowned Pango.FontDescription describe ();
+		public Pango.FontDescription describe ();
 		public unowned string get_face_name ();
 		public bool is_synthesized ();
-		public void list_sizes (int[] sizes);
+		public void list_sizes (out int[] sizes);
 	}
 	[CCode (cheader_filename = "pango/pango.h")]
 	public class FontFamily : GLib.Object {
@@ -227,13 +227,13 @@ namespace Pango {
 		protected FontFamily ();
 		public unowned string get_name ();
 		public bool is_monospace ();
-		public void list_faces (Pango.FontFace[] faces);
+		public void list_faces (out Pango.FontFace[] faces);
 	}
 	[CCode (cheader_filename = "pango/pango.h")]
 	public class FontMap : GLib.Object {
 		[CCode (has_construct_function = false)]
 		protected FontMap ();
-		public unowned Pango.Context create_context ();
+		public Pango.Context create_context ();
 		public void list_families (Pango.FontFamily[] families);
 		public unowned Pango.Font load_font (Pango.Context context, Pango.FontDescription desc);
 		public unowned Pango.Fontset load_fontset (Pango.Context context, Pango.FontDescription desc, Pango.Language language);
@@ -254,18 +254,18 @@ namespace Pango {
 	public class Fontset : GLib.Object {
 		[CCode (has_construct_function = false)]
 		protected Fontset ();
-		public void @foreach (Pango.FontsetForeachFunc func, void* data);
-		public unowned Pango.Font get_font (uint wc);
-		public unowned Pango.FontMetrics get_metrics ();
+		public void @foreach (Pango.FontsetForeachFunc func);
+		public Pango.Font get_font (uint wc);
+		public Pango.FontMetrics get_metrics ();
 	}
 	[Compact]
 	[CCode (copy_function = "pango_glyph_item_copy", type_id = "PANGO_TYPE_GLYPH_ITEM", cheader_filename = "pango/pango.h")]
 	public class GlyphItem {
 		public weak Pango.GlyphString glyphs;
 		public weak Pango.Item item;
-		public unowned GLib.SList apply_attrs (string text, Pango.AttrList list);
+		public GLib.SList<Pango.GlyphItem> apply_attrs (string text, Pango.AttrList list);
 		public Pango.GlyphItem copy ();
-		public void get_logical_widths (string text, int logical_widths);
+		public void get_logical_widths (string text, [CCode (array_length = false)] int[] logical_widths);
 		public void letter_space (string text, Pango.LogAttr[] log_attrs, int letter_spacing);
 		public Pango.GlyphItem split (string text, int split_index);
 	}
@@ -283,11 +283,11 @@ namespace Pango {
 		public Pango.GlyphString copy ();
 		public void extents (Pango.Font font, out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
 		public void extents_range (int start, int end, Pango.Font font, out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
-		public void get_logical_widths (string text, int length, int embedding_level, int logical_widths);
+		public void get_logical_widths (string text, int length, int embedding_level, [CCode (array_length = false)] int[] logical_widths);
 		public int get_width ();
-		public void index_to_x (string text, int length, Pango.Analysis analysis, int index_, bool trailing, int x_pos);
+		public void index_to_x (string text, int length, Pango.Analysis analysis, int index_, bool trailing, out int x_pos);
 		public void set_size (int new_len);
-		public void x_to_index (string text, int length, Pango.Analysis analysis, int x_pos, int index_, int trailing);
+		public void x_to_index (string text, int length, Pango.Analysis analysis, int x_pos, out int index_, out int trailing);
 	}
 	[Compact]
 	[CCode (cheader_filename = "pango/pango.h")]
@@ -303,15 +303,15 @@ namespace Pango {
 		[CCode (has_construct_function = false)]
 		public Item ();
 		public Pango.Item copy ();
-		public unowned Pango.Item split (int split_index, int split_offset);
+		public Pango.Item split (int split_index, int split_offset);
 	}
 	[Compact]
 	[CCode (type_id = "PANGO_TYPE_LANGUAGE", cheader_filename = "pango/pango.h")]
 	public class Language {
-		public static unowned Pango.Language from_string (string language);
+		public static Pango.Language? from_string (string language);
 		public static unowned Pango.Language get_default ();
 		public unowned string get_sample_string ();
-		public Pango.Script get_scripts (int num_scripts);
+		public unowned Pango.Script[] get_scripts ();
 		public bool includes_script (Pango.Script script);
 		public bool matches (string range_list);
 		public unowned string to_string ();
@@ -330,7 +330,7 @@ namespace Pango {
 		public void get_cursor_pos (int index_, out Pango.Rectangle strong_pos, out Pango.Rectangle weak_pos);
 		public Pango.EllipsizeMode get_ellipsize ();
 		public void get_extents (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
-		public unowned Pango.FontDescription get_font_description ();
+		public unowned Pango.FontDescription? get_font_description ();
 		public int get_height ();
 		public int get_indent ();
 		public unowned Pango.LayoutIter get_iter ();
@@ -338,8 +338,8 @@ namespace Pango {
 		public unowned Pango.LayoutLine get_line (int line);
 		public int get_line_count ();
 		public unowned Pango.LayoutLine get_line_readonly (int line);
-		public unowned GLib.SList get_lines ();
-		public unowned GLib.SList get_lines_readonly ();
+		public unowned GLib.SList<weak Pango.LayoutLine> get_lines ();
+		public unowned GLib.SList<weak Pango.LayoutLine> get_lines_readonly ();
 		public void get_log_attrs (out Pango.LogAttr[] attrs);
 		public void get_pixel_extents (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect);
 		public void get_pixel_size (out int width, out int height);
@@ -351,16 +351,16 @@ namespace Pango {
 		public int get_unknown_glyphs_count ();
 		public int get_width ();
 		public Pango.WrapMode get_wrap ();
-		public void index_to_line_x (int index_, bool trailing, int line, int x_pos);
+		public void index_to_line_x (int index_, bool trailing, out int line, out int x_pos);
 		public void index_to_pos (int index_, out Pango.Rectangle pos);
 		public bool is_ellipsized ();
 		public bool is_wrapped ();
-		public void move_cursor_visually (bool strong, int old_index, int old_trailing, int direction, int new_index, int new_trailing);
+		public void move_cursor_visually (bool strong, int old_index, int old_trailing, int direction, out int new_index, out int new_trailing);
 		public void set_alignment (Pango.Alignment alignment);
 		public void set_attributes (Pango.AttrList attrs);
 		public void set_auto_dir (bool auto_dir);
 		public void set_ellipsize (Pango.EllipsizeMode ellipsize);
-		public void set_font_description (Pango.FontDescription desc);
+		public void set_font_description (Pango.FontDescription? desc);
 		public void set_height (int height);
 		public void set_indent (int indent);
 		public void set_justify (bool justify);
@@ -372,7 +372,7 @@ namespace Pango {
 		public void set_text (string text, int length);
 		public void set_width (int width);
 		public void set_wrap (Pango.WrapMode wrap);
-		public bool xy_to_index (int x, int y, int index_, int trailing);
+		public bool xy_to_index (int x, int y, out int index_, out int trailing);
 	}
 	[Compact]
 	[CCode (cheader_filename = "pango/pango.h")]
@@ -924,17 +924,17 @@ namespace Pango {
 	[CCode (cheader_filename = "pango/pango.h")]
 	public static uchar log2vis_get_embedding_levels (string text, int length, Pango.Direction pbase_dir);
 	[CCode (cheader_filename = "pango/pango.h")]
-	public static bool parse_enum (GLib.Type type, string str, int value, bool warn, out unowned string possible_values);
+	public static bool parse_enum (GLib.Type type, string? str, out int value, bool warn, out string possible_values);
 	[CCode (cheader_filename = "pango/pango.h")]
-	public static bool parse_markup (string markup_text, int length, unichar accel_marker, out unowned Pango.AttrList attr_list, out unowned string text, unichar accel_char) throws GLib.Error;
+	public static bool parse_markup (string markup_text, int length, unichar accel_marker, out Pango.AttrList attr_list, out string text, out unichar accel_char) throws GLib.Error;
 	[CCode (cheader_filename = "pango/pango.h")]
-	public static bool parse_stretch (string str, Pango.Stretch stretch, bool warn);
+	public static bool parse_stretch (string str, out Pango.Stretch stretch, bool warn);
 	[CCode (cheader_filename = "pango/pango.h")]
-	public static bool parse_style (string str, Pango.Style style, bool warn);
+	public static bool parse_style (string str, out Pango.Style style, bool warn);
 	[CCode (cheader_filename = "pango/pango.h")]
-	public static bool parse_variant (string str, Pango.Variant variant, bool warn);
+	public static bool parse_variant (string str, out Pango.Variant variant, bool warn);
 	[CCode (cheader_filename = "pango/pango.h")]
-	public static bool parse_weight (string str, Pango.Weight weight, bool warn);
+	public static bool parse_weight (string str, out Pango.Weight weight, bool warn);
 	[CCode (cheader_filename = "pango/pango.h")]
 	public static void quantize_line_geometry (int thickness, int position);
 	[CCode (cheader_filename = "pango/pango.h")]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]