[vala/0.10] pango: Fix PangoGlyph and PangoGlyphString bindings



commit ba15eb1f0f5e1a79789c91d20554e1dfc3bf100c
Author: Jürg Billeter <j bitron ch>
Date:   Mon Oct 25 21:05:19 2010 +0200

    pango: Fix PangoGlyph and PangoGlyphString bindings

 vapi/packages/pango/pango-custom.vala |    4 ++++
 vapi/packages/pango/pango.metadata    |    3 +++
 vapi/pango.vapi                       |   17 ++++++++++-------
 3 files changed, 17 insertions(+), 7 deletions(-)
---
diff --git a/vapi/packages/pango/pango-custom.vala b/vapi/packages/pango/pango-custom.vala
index 5da8cf6..34739f1 100644
--- a/vapi/packages/pango/pango-custom.vala
+++ b/vapi/packages/pango/pango-custom.vala
@@ -22,6 +22,10 @@
 
 namespace Pango {
 	[CCode (cheader_filename = "pango/pango.h")]
+	public struct Glyph : uint32 {
+	}
+
+	[CCode (cheader_filename = "pango/pango.h")]
 	namespace Scale {
 		[CCode (cname = "PANGO_SCALE_XX_SMALL")]
 		public const double XX_SMALL;
diff --git a/vapi/packages/pango/pango.metadata b/vapi/packages/pango/pango.metadata
index d271c2c..76efe5b 100644
--- a/vapi/packages/pango/pango.metadata
+++ b/vapi/packages/pango/pango.metadata
@@ -41,9 +41,12 @@ pango_attr_iterator_copy transfer_ownership="1"
 pango_coverage_copy transfer_ownership="1"
 pango_font_description_copy transfer_ownership="1"
 pango_font_description_copy_static hidden="1"
+PangoGlyph hidden="1"
 pango_glyph_item_copy transfer_ownership="1"
 pango_glyph_item_iter_copy transfer_ownership="1"
 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_layout_copy transfer_ownership="1"
 pango_layout_iter_copy transfer_ownership="1"
diff --git a/vapi/pango.vapi b/vapi/pango.vapi
index 784319b..2fd1642 100644
--- a/vapi/pango.vapi
+++ b/vapi/pango.vapi
@@ -259,10 +259,6 @@ namespace Pango {
 		public unowned Pango.FontMetrics get_metrics ();
 	}
 	[Compact]
-	[CCode (cheader_filename = "pango/pango.h")]
-	public class Glyph {
-	}
-	[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;
@@ -276,8 +272,10 @@ namespace Pango {
 	[Compact]
 	[CCode (copy_function = "pango_glyph_string_copy", type_id = "PANGO_TYPE_GLYPH_STRING", cheader_filename = "pango/pango.h")]
 	public class GlyphString {
-		public Pango.GlyphInfo glyphs;
-		public int log_clusters;
+		[CCode (array_length_cname = "num_glyphs")]
+		public Pango.GlyphInfo[] glyphs;
+		[CCode (array_length_cname = "num_glyphs")]
+		public int[] log_clusters;
 		public int num_glyphs;
 		public int space;
 		[CCode (has_construct_function = false)]
@@ -501,6 +499,11 @@ namespace Pango {
 		public bool parse (string spec);
 		public unowned string to_string ();
 	}
+	[CCode (cheader_filename = "pango/pango.h")]
+	[SimpleType]
+	[IntegerType (rank = 0)]
+	public struct Glyph : uint32 {
+	}
 	[CCode (type_id = "PANGO_TYPE_GLYPH_GEOMETRY", cheader_filename = "pango/pango.h")]
 	public struct GlyphGeometry {
 		public weak Pango.GlyphUnit width;
@@ -509,7 +512,7 @@ namespace Pango {
 	}
 	[CCode (type_id = "PANGO_TYPE_GLYPH_INFO", cheader_filename = "pango/pango.h")]
 	public struct GlyphInfo {
-		public weak Pango.Glyph glyph;
+		public Pango.Glyph glyph;
 		public Pango.GlyphGeometry geometry;
 		public Pango.GlyphVisAttr attr;
 	}



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