From: Evan Nemerson Date: Mon, 13 Aug 2012 02:47:03 +0000 (-0700) Subject: pango: switch to GIR X-Git-Tag: 0.17.5~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5aec6712781ed272b7fbaa8c4404555e6f254ff;p=thirdparty%2Fvala.git pango: switch to GIR Fixes bug 681424. --- diff --git a/vapi/Makefile.am b/vapi/Makefile.am index f3a9c329a..f259bb966 100644 --- a/vapi/Makefile.am +++ b/vapi/Makefile.am @@ -308,7 +308,6 @@ GIDL_BINDINGS = \ libsexy \ libsoup-2.2 \ loudmouth-1.0 \ - pango \ purple \ rest-0.6 \ rest-extras-0.6 \ @@ -338,6 +337,7 @@ GIR_BINDINGS = \ libwnck-3.0 \ mx-1.0 \ packagekit-glib2 \ + pango \ pangocairo \ poppler-glib \ rest-0.7 \ @@ -583,7 +583,7 @@ packagekit-glib2: $(GENVAPI) --library $(srcdir)/packagekit-glib2 --metadatadir $(METADATADIR) --pkg gio-2.0 $(GIRDIR)/PackageKitGlib-1.0.gir pango: - $(GENVAPI) --library $(srcdir)/pango $(PACKAGESDIR)/pango/pango-custom.vala $(PACKAGESDIR)/pango/pango.gi + $(GENVAPI) --library $(srcdir)/pango --metadatadir $(METADATADIR) $(METADATADIR)/Pango-1.0-custom.vala $(GIRDIR)/Pango-1.0.gir pangocairo: $(GENVAPI) --library $(srcdir)/pangocairo --metadatadir $(METADATADIR) $(GIRDIR)/PangoCairo-1.0.gir diff --git a/vapi/metadata/Pango-1.0-custom.vala b/vapi/metadata/Pango-1.0-custom.vala new file mode 100644 index 000000000..b620352f8 --- /dev/null +++ b/vapi/metadata/Pango-1.0-custom.vala @@ -0,0 +1,94 @@ +namespace Pango { + namespace Scale { + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_SCALE_LARGE")] + public const double LARGE; + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_SCALE_MEDIUM")] + public const double MEDIUM; + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_SCALE_SMALL")] + public const double SMALL; + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_SCALE_XX_LARGE")] + public const double XX_LARGE; + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_SCALE_XX_SMALL")] + public const double XX_SMALL; + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_SCALE_X_LARGE")] + public const double X_LARGE; + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_SCALE_X_SMALL")] + public const double X_SMALL; + } + + [CCode (cheader_filename = "pango/pango.h")] + [Compact] + public class AttrFontDesc { + [CCode (has_construct_function = false, type = "PangoAttribute*")] + public AttrFontDesc (Pango.FontDescription desc); + } + + [CCode (cheader_filename = "pango/pango.h")] + [Compact] + public class AttrLanguage { + [CCode (has_construct_function = false, type = "PangoAttribute*")] + public AttrLanguage (Pango.Language language); + } + + [CCode (cheader_filename = "pango/pango.h")] + [Compact] + public class AttrShape { + [CCode (has_construct_function = false, type = "PangoAttribute*")] + public AttrShape (Pango.Rectangle ink_rect, Pango.Rectangle logical_rect); + [CCode (has_construct_function = false, simple_generics = true, type = "PangoAttribute*")] + public AttrShape.with_data (Pango.Rectangle ink_rect, Pango.Rectangle logical_rect, owned T data, Pango.AttrDataCopyFunc copy_func); + } + + [CCode (cheader_filename = "pango/pango.h")] + [Compact] + public class AttrSize { + [CCode (has_construct_function = false, type = "PangoAttribute*")] + public AttrSize (int size); + } + + [CCode (cheader_filename = "pango/pango.h", ref_function = "pango_coverage_ref", unref_function = "pango_coverage_unref")] + [Compact] + public class Coverage { + [CCode (has_construct_function = false)] + public Coverage (); + public static Pango.Coverage from_bytes (uint8[] bytes); + } + + [CCode (cheader_filename = "pango/pango.h")] + [Compact] + public class ScriptIter { + [CCode (has_construct_function = false)] + public ScriptIter (string text, int length); + } + + [CCode (cheader_filename = "pango/pango.h", has_target = false)] + public delegate T AttrDataCopyFunc (T data); + + [CCode (cheader_filename = "pango/pango.h")] + public const int VERSION_MAJOR; + [CCode (cheader_filename = "pango/pango.h")] + public const int VERSION_MICRO; + [CCode (cheader_filename = "pango/pango.h")] + public const int VERSION_MINOR; + [CCode (cheader_filename = "pango/pango.h")] + public const string VERSION_STRING; + + [Deprecated (since = "vala-0.18", replacement = "Pango.AttrType.get_name")] + public static unowned string attr_type_get_name (Pango.AttrType type); + [Deprecated (since = "vala-0.18", replacement = "Pango.AttrType.get_name")] + public static Pango.AttrType attr_type_register (string name); + [Deprecated (since = "vala-0.18", replacement = "Pango.BidiType.for_unichar")] + public static Pango.BidiType bidi_type_for_unichar (unichar ch); + [Deprecated (since = "vala-0.18", replacement = "Pango.Gravity.get_for_matrix")] + public static Pango.Gravity gravity_get_for_matrix (Pango.Matrix matrix); + [Deprecated (since = "vala-0.18", replacement = "Pango.Gravity.get_for_script")] + public static Pango.Gravity gravity_get_for_script (Pango.Script script, Pango.Gravity base_gravity, Pango.GravityHint hint); + [Deprecated (since = "vala-0.18", replacement = "Pango.Gravity.get_for_script_and_width")] + public static Pango.Gravity gravity_get_for_script_and_width (Pango.Script script, bool wide, Pango.Gravity base_gravity, Pango.GravityHint hint); + [Deprecated (since = "vala-0.18", replacement = "Pango.Gravity.get_to_rotation")] + public static double gravity_to_rotation (Pango.Gravity gravity); + [Deprecated (since = "vala-0.18", replacement = "Pango.Script.for_unichar")] + public static Pango.Script script_for_unichar (unichar ch); + [Deprecated (since = "vala-0.18", replacement = "Pango.Script.get_sample_language")] + public static Pango.Language script_get_sample_language (Pango.Script script); +} \ No newline at end of file diff --git a/vapi/metadata/Pango-1.0.metadata b/vapi/metadata/Pango-1.0.metadata new file mode 100644 index 000000000..879dd1118 --- /dev/null +++ b/vapi/metadata/Pango-1.0.metadata @@ -0,0 +1,75 @@ +AttrClass struct=false + +Attr*.attr skip +AttrColor struct=false base_type="Pango.Attribute" +AttrFloat struct=false base_type="Pango.Attribute" +AttrFontDesc struct=false base_type="Pango.Attribute" +AttrInt struct=false base_type="Pango.Attribute" +// AttrIterator struct=false base_type="Pango.Attribute" +AttrLanguage struct=false base_type="Pango.Attribute" +AttrShape struct=false base_type="Pango.Attribute" +AttrSize struct=false base_type="Pango.Attribute" +AttrString struct=false base_type="Pango.Attribute" +Attribute struct=false + +// Generics +AttrShape + .data type="T" + .copy_func skip=false type_arguments="T" + +// Fields +AttrColor + .color unowned=false +GlyphString + .glyphs array unowned=false array_length_field="num_glyphs" + .log_clusters array unowned=false array_length_field="num_glyphs" +LayoutLine + .runs type_arguments="Pango.LayoutRun" + +// G-I doesn't support non-GObject, non-GBoxed return values +AttrIterator + .copy skip=false + .get skip=false +AttrList + .get_iterator skip=false +Attribute + .copy skip=false +Coverage + .copy skip=false +Font + .find_shaper skip=false + .get_coverage skip=false +attr_*_new skip=false + +// Nullability of return values +AttrIterator + .get nullable +AttrList + .filter nullable +Font + .get_font_map nullable +Layout + .get_font_description nullable + +// Variadic +TabArray + .new_with_positions skip=false + +// g-i uses _ScriptForLang intead of ScriptForLang. There is a bug, +// bug I can't find it right now. +_ScriptForLang skip + +read_line + .stream type="GLib.FileStream" + .str out=false +scan_string + .out out=false + +// Backwards compatability +AttrClass + .copy type="GLib.Callback" skip=false + .destroy type="GLib.Callback" skip=false + .equal type="GLib.Callback" +Color struct +GlyphItemIter struct +Matrix struct diff --git a/vapi/packages/pango/pango-custom.vala b/vapi/packages/pango/pango-custom.vala deleted file mode 100644 index 34739f15b..000000000 --- a/vapi/packages/pango/pango-custom.vala +++ /dev/null @@ -1,45 +0,0 @@ -/* pango.vala - * - * Copyright (C) 2007 Mathias Hasselmann - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Author: - * Mathias Hasselmann - */ - -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; - [CCode (cname = "PANGO_SCALE_X_SMALL")] - public const double X_SMALL; - [CCode (cname = "PANGO_SCALE_SMALL")] - public const double SMALL; - [CCode (cname = "PANGO_SCALE_MEDIUM")] - public const double MEDIUM; - [CCode (cname = "PANGO_SCALE_LARGE")] - public const double LARGE; - [CCode (cname = "PANGO_SCALE_X_LARGE")] - public const double X_LARGE; - [CCode (cname = "PANGO_SCALE_XX_LARGE")] - public const double XX_LARGE; - } -} diff --git a/vapi/packages/pango/pango.defines b/vapi/packages/pango/pango.defines deleted file mode 100644 index d10321606..000000000 --- a/vapi/packages/pango/pango.defines +++ /dev/null @@ -1 +0,0 @@ --DPANGO_DISABLE_DEPRECATED diff --git a/vapi/packages/pango/pango.deps b/vapi/packages/pango/pango.deps deleted file mode 100644 index 129fe166f..000000000 --- a/vapi/packages/pango/pango.deps +++ /dev/null @@ -1 +0,0 @@ -cairo diff --git a/vapi/packages/pango/pango.excludes b/vapi/packages/pango/pango.excludes deleted file mode 100644 index 509f6d9ef..000000000 --- a/vapi/packages/pango/pango.excludes +++ /dev/null @@ -1,9 +0,0 @@ -pangocairo.h -pangofc-decoder.h -pangofc-font.h -pangofc-fontmap.h -pangoft2.h -pango-ot.h -pangox.h -pangoxft.h -pangoxft-render.h diff --git a/vapi/packages/pango/pango.files b/vapi/packages/pango/pango.files deleted file mode 100644 index 375ee318c..000000000 --- a/vapi/packages/pango/pango.files +++ /dev/null @@ -1,2 +0,0 @@ -include/pango-1.0/pango -lib/libpango-1.0.so diff --git a/vapi/packages/pango/pango.gi b/vapi/packages/pango/pango.gi deleted file mode 100644 index 022081af0..000000000 --- a/vapi/packages/pango/pango.gi +++ /dev/null @@ -1,2884 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vapi/packages/pango/pango.metadata b/vapi/packages/pango/pango.metadata deleted file mode 100644 index 6b7d0a097..000000000 --- a/vapi/packages/pango/pango.metadata +++ /dev/null @@ -1,181 +0,0 @@ -Pango cheader_filename="pango/pango.h" gir_namespace="Pango" gir_version="1.0" -PangoAnalysis is_value_type="1" -pango_attribute_copy transfer_ownership="1" -PangoAttrColor base_class="PangoAttribute" free_function="pango_attribute_destroy" -PangoAttrColor.attr hidden="1" -PangoAttrFloat base_class="PangoAttribute" free_function="pango_attribute_destroy" -PangoAttrFloat.attr hidden="1" -PangoAttrFontDesc base_class="PangoAttribute" free_function="pango_attribute_destroy" -PangoAttrFontDesc.attr hidden="1" -PangoAttrInt base_class="PangoAttribute" free_function="pango_attribute_destroy" -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" type_parameters="T" -PangoAttrShape.data type_name="T" -PangoAttrShape.copy_func type_arguments="T" -pango_attr_shape_new_with_data simple_generics="1" -pango_attr_shape_new_with_data.data type_name="T" transfer_ownership="1" -pango_attr_shape_new_with_data.copy_func type_arguments="T" -pango_attr_shape_new_with_data.destroy_func hidden="1" -PangoAttrDataCopyFunc type_parameters="T" type_name="T" transfer_ownership="1" has_target="0" -PangoAttrDataCopyFunc.data hidden="0" type_name="T" -PangoAttrSize.attr hidden="1" -PangoAttrSize base_class="PangoAttribute" free_function="pango_attribute_destroy" -PangoAttrSize.attr hidden="1" -PangoAttrString base_class="PangoAttribute" free_function="pango_attribute_destroy" -PangoAttrString.attr hidden="1" -pango_attr_background_new transfer_ownership="1" -pango_attr_fallback_new transfer_ownership="1" -pango_attr_family_new transfer_ownership="1" -pango_attr_foreground_new transfer_ownership="1" -pango_attr_gravity_hint_new transfer_ownership="1" -pango_attr_gravity_new transfer_ownership="1" -pango_attr_letter_spacing_new transfer_ownership="1" -pango_attr_rise_new transfer_ownership="1" -pango_attr_scale_new transfer_ownership="1" -pango_attr_stretch_new transfer_ownership="1" -pango_attr_font_desc_new transfer_ownership="1" -pango_attr_strikethrough_color_new transfer_ownership="1" -pango_attr_strikethrough_new transfer_ownership="1" -pango_attr_style_new transfer_ownership="1" -pango_attr_underline_color_new transfer_ownership="1" -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_context_list_families.families is_array="1" is_out="1" transfer_ownership="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" -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_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" -pango_attr_size_new_absolute hidden="1" -pango_break.attrs is_array="1" -PangoColor is_value_type="1" -pango_extents_to_pixels.inclusive is_ref="1" -pango_extents_to_pixels.nearest is_ref="1" -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_font_map_list_families.families is_array="1" is_out="1" 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" -PangoGlyphGeometry is_value_type="1" -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 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" -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_line_index_to_x.x_pos is_out="1" -pango_layout_line_x_to_index.index_ is_out="1" -pango_layout_line_x_to_index.trailing is_out="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" -pango_layout_iter_get_layout_extents.ink_rect is_out="1" -pango_layout_iter_get_layout_extents.logical_rect is_out="1" -pango_layout_iter_get_line_extents.ink_rect is_out="1" -pango_layout_iter_get_line_extents.logical_rect is_out="1" -pango_layout_iter_get_line_yrange.y0_ is_out="1" -pango_layout_iter_get_line_yrange.y1_ is_out="1" -pango_layout_iter_get_run_extents.ink_rect is_out="1" -pango_layout_iter_get_run_extents.logical_rect is_out="1" -pango_layout_line_get_extents.ink_rect is_out="1" -pango_layout_line_get_extents.logical_rect is_out="1" -pango_layout_line_get_pixel_extents.ink_rect is_out="1" -pango_layout_line_get_pixel_extents.logical_rect is_out="1" -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" -PangoWeight default_value="PANGO_WEIGHT_NORMAL" diff --git a/vapi/packages/pango/pango.namespace b/vapi/packages/pango/pango.namespace deleted file mode 100644 index 1e0fa507d..000000000 --- a/vapi/packages/pango/pango.namespace +++ /dev/null @@ -1 +0,0 @@ -Pango diff --git a/vapi/pango.vapi b/vapi/pango.vapi index c22073cae..05ba90f12 100644 --- a/vapi/pango.vapi +++ b/vapi/pango.vapi @@ -1,6 +1,6 @@ /* pango.vapi generated by vapigen, do not modify. */ -[CCode (gir_namespace = "Pango", gir_version = "1.0")] +[CCode (cprefix = "Pango", gir_namespace = "Pango", gir_version = "1.0", lower_case_cprefix = "pango_")] namespace Pango { namespace Scale { [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_SCALE_LARGE")] @@ -21,46 +21,52 @@ namespace Pango { [CCode (cheader_filename = "pango/pango.h")] [Compact] public class AttrClass { - public weak GLib.Callback copy; - public weak GLib.Callback destroy; - public weak GLib.Callback equal; + public GLib.Callback copy; + public GLib.Callback destroy; + public GLib.Callback equal; public Pango.AttrType type; } - [CCode (cheader_filename = "pango/pango.h", free_function = "pango_attribute_destroy")] + [CCode (cheader_filename = "pango/pango.h")] + [Compact] public class AttrColor : Pango.Attribute { public Pango.Color color; } - [CCode (cheader_filename = "pango/pango.h", free_function = "pango_attribute_destroy")] + [CCode (cheader_filename = "pango/pango.h")] + [Compact] public class AttrFloat : Pango.Attribute { public double value; } - [CCode (cheader_filename = "pango/pango.h", free_function = "pango_attribute_destroy")] + [CCode (cheader_filename = "pango/pango.h")] + [Compact] public class AttrFontDesc : Pango.Attribute { public weak Pango.FontDescription desc; [CCode (has_construct_function = false, type = "PangoAttribute*")] public AttrFontDesc (Pango.FontDescription desc); } - [CCode (cheader_filename = "pango/pango.h", free_function = "pango_attribute_destroy")] + [CCode (cheader_filename = "pango/pango.h")] + [Compact] public class AttrInt : Pango.Attribute { public int value; } - [CCode (cheader_filename = "pango/pango.h", copy_function = "pango_attr_iterator_copy", free_function = "pango_attr_iterator_destroy")] + [CCode (cheader_filename = "pango/pango.h")] [Compact] public class AttrIterator { public Pango.AttrIterator copy (); - public unowned Pango.Attribute @get (Pango.AttrType type); - public unowned GLib.SList get_attrs (); - public void get_font (Pango.FontDescription desc, out unowned Pango.Language language, GLib.SList extra_attrs); + public void destroy (); + public unowned Pango.Attribute? @get (Pango.AttrType type); + public GLib.SList get_attrs (); + public void get_font (Pango.FontDescription desc, Pango.Language? language, owned GLib.SList? extra_attrs); public bool next (); public void range (out int start, out int end); } - [CCode (cheader_filename = "pango/pango.h", free_function = "pango_attribute_destroy")] + [CCode (cheader_filename = "pango/pango.h")] + [Compact] public class AttrLanguage : Pango.Attribute { public weak Pango.Language value; [CCode (has_construct_function = false, type = "PangoAttribute*")] public AttrLanguage (Pango.Language language); } - [CCode (cheader_filename = "pango/pango.h", ref_function = "pango_attr_list_ref", type_id = "pango_attr_list_get_type ()", unref_function = "pango_attr_list_unref")] + [CCode (cheader_filename = "pango/pango.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "pango_attr_list_get_type ()")] [Compact] public class AttrList { [CCode (has_construct_function = false)] @@ -71,11 +77,13 @@ namespace Pango { public Pango.AttrIterator get_iterator (); public void insert (owned Pango.Attribute attr); public void insert_before (owned Pango.Attribute attr); + public Pango.AttrList @ref (); public void splice (Pango.AttrList other, int pos, int len); + public void unref (); } - [CCode (cheader_filename = "pango/pango.h", free_function = "pango_attribute_destroy")] + [CCode (cheader_filename = "pango/pango.h")] + [Compact] public class AttrShape : Pango.Attribute { - public weak Pango.Attribute attr; public weak Pango.AttrDataCopyFunc copy_func; public T data; public weak GLib.DestroyNotify destroy_func; @@ -86,28 +94,31 @@ namespace Pango { [CCode (has_construct_function = false, simple_generics = true, type = "PangoAttribute*")] public AttrShape.with_data (Pango.Rectangle ink_rect, Pango.Rectangle logical_rect, owned T data, Pango.AttrDataCopyFunc copy_func); } - [CCode (cheader_filename = "pango/pango.h", free_function = "pango_attribute_destroy")] + [CCode (cheader_filename = "pango/pango.h")] + [Compact] public class AttrSize : Pango.Attribute { public uint absolute; public int size; [CCode (has_construct_function = false, type = "PangoAttribute*")] public AttrSize (int size); } - [CCode (cheader_filename = "pango/pango.h", free_function = "pango_attribute_destroy")] + [CCode (cheader_filename = "pango/pango.h")] + [Compact] public class AttrString : Pango.Attribute { public weak string value; } - [CCode (cheader_filename = "pango/pango.h", copy_function = "pango_attribute_copy", free_function = "pango_attribute_destroy")] + [CCode (cheader_filename = "pango/pango.h")] [Compact] public class Attribute { public uint end_index; public weak Pango.AttrClass klass; public uint start_index; public Pango.Attribute copy (); + public void destroy (); public bool equal (Pango.Attribute attr2); public void init (Pango.AttrClass klass); } - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", type_id = "pango_context_get_type ()")] public class Context : GLib.Object { [CCode (has_construct_function = false)] public Context (); @@ -117,23 +128,19 @@ namespace Pango { public unowned Pango.FontMap get_font_map (); public Pango.Gravity get_gravity (); public Pango.GravityHint get_gravity_hint (); - public unowned Pango.Language get_language (); - public Pango.Matrix? get_matrix (); + public Pango.Language get_language (); + public Pango.Matrix get_matrix (); public Pango.FontMetrics get_metrics (Pango.FontDescription? desc, Pango.Language? language); - public void list_families (out Pango.FontFamily[] families); - public unowned Pango.Font load_font (Pango.FontDescription desc); - public unowned Pango.Fontset load_fontset (Pango.FontDescription desc, Pango.Language language); + public void list_families ([CCode (array_length_cname = "n_families", array_length_pos = 1.1)] out Pango.FontFamily[] families); + public Pango.Font load_font (Pango.FontDescription desc); + public Pango.Fontset load_fontset (Pango.FontDescription desc, Pango.Language language); public void set_base_dir (Pango.Direction direction); public void set_base_gravity (Pango.Gravity gravity); public void set_font_description (Pango.FontDescription desc); public void set_font_map (Pango.FontMap font_map); public void set_gravity_hint (Pango.GravityHint hint); public void set_language (Pango.Language language); - public void set_matrix (Pango.Matrix matrix); - } - [CCode (cheader_filename = "pango/pango.h")] - [Compact] - public class ContextClass { + public void set_matrix (Pango.Matrix? matrix); } [CCode (cheader_filename = "pango/pango.h", ref_function = "pango_coverage_ref", unref_function = "pango_coverage_unref")] [Compact] @@ -141,11 +148,12 @@ namespace Pango { [CCode (has_construct_function = false)] public Coverage (); public Pango.Coverage copy (); - public static Pango.Coverage from_bytes (uchar[] bytes); + public static Pango.Coverage from_bytes (uint8[] 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 (out uchar[][] bytes); + public void to_bytes ([CCode (array_length_cname = "n_bytes", array_length_pos = 1.1)] out uint8[] bytes); + public void unref (); } [CCode (cheader_filename = "pango/pango.h")] [Compact] @@ -155,28 +163,29 @@ namespace Pango { [Compact] public class EngineShape { } - [CCode (cheader_filename = "pango/pango.h")] - public class Font : GLib.Object { + [CCode (cheader_filename = "pango/pango.h", type_id = "pango_font_get_type ()")] + public abstract class Font : GLib.Object { [CCode (has_construct_function = false)] protected Font (); public Pango.FontDescription describe (); public Pango.FontDescription describe_with_absolute_size (); - public static void descriptions_free (Pango.FontDescription[] descs); + public static void descriptions_free ([CCode (array_length_cname = "n_descs", array_length_pos = 1.1)] owned Pango.FontDescription[]? descs); public unowned Pango.EngineShape find_shaper (Pango.Language language, uint32 ch); public Pango.Coverage get_coverage (Pango.Language language); - public Pango.FontMap? get_font_map (); + public unowned Pango.FontMap? get_font_map (); public void get_glyph_extents (Pango.Glyph glyph, out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect); public Pango.FontMetrics get_metrics (Pango.Language? language); } - [CCode (cheader_filename = "pango/pango.h", copy_function = "pango_font_description_copy", type_id = "pango_font_description_get_type ()")] + [CCode (cheader_filename = "pango/pango.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "pango_font_description_get_type ()")] [Compact] - [Immutable] public class FontDescription { [CCode (has_construct_function = false)] public FontDescription (); - public bool better_match (Pango.FontDescription old_match, Pango.FontDescription new_match); + public bool better_match (Pango.FontDescription? old_match, Pango.FontDescription new_match); public Pango.FontDescription copy (); + public Pango.FontDescription copy_static (); public bool equal (Pango.FontDescription desc2); + public void free (); public static Pango.FontDescription from_string (string str); public unowned string get_family (); public Pango.Gravity get_gravity (); @@ -188,7 +197,7 @@ namespace Pango { public Pango.Variant get_variant (); public Pango.Weight get_weight (); public uint hash (); - public void merge (Pango.FontDescription desc_to_merge, bool replace_existing); + public void merge (Pango.FontDescription? desc_to_merge, bool replace_existing); public void merge_static (Pango.FontDescription desc_to_merge, bool replace_existing); public void set_absolute_size (double size); public void set_family (string family); @@ -203,33 +212,33 @@ namespace Pango { public string to_string (); public void unset_fields (Pango.FontMask to_unset); } - [CCode (cheader_filename = "pango/pango.h")] - public class FontFace : GLib.Object { + [CCode (cheader_filename = "pango/pango.h", type_id = "pango_font_face_get_type ()")] + public abstract class FontFace : GLib.Object { [CCode (has_construct_function = false)] protected FontFace (); public Pango.FontDescription describe (); public unowned string get_face_name (); public bool is_synthesized (); - public void list_sizes (out int[] sizes); + public void list_sizes ([CCode (array_length_cname = "n_sizes", array_length_pos = 1.1)] out int[] sizes); } - [CCode (cheader_filename = "pango/pango.h")] - public class FontFamily : GLib.Object { + [CCode (cheader_filename = "pango/pango.h", type_id = "pango_font_family_get_type ()")] + public abstract class FontFamily : GLib.Object { [CCode (has_construct_function = false)] protected FontFamily (); public unowned string get_name (); public bool is_monospace (); - public void list_faces (out Pango.FontFace[] faces); + public void list_faces ([CCode (array_length_cname = "n_faces", array_length_pos = 1.1)] out Pango.FontFace[] faces); } - [CCode (cheader_filename = "pango/pango.h")] - public class FontMap : GLib.Object { + [CCode (cheader_filename = "pango/pango.h", type_id = "pango_font_map_get_type ()")] + public abstract class FontMap : GLib.Object { [CCode (has_construct_function = false)] protected FontMap (); public Pango.Context create_context (); - public void list_families (out 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); + public void list_families ([CCode (array_length_cname = "n_families", array_length_pos = 1.1)] out Pango.FontFamily[] families); + public Pango.Font load_font (Pango.Context context, Pango.FontDescription desc); + public Pango.Fontset load_fontset (Pango.Context context, Pango.FontDescription desc, Pango.Language language); } - [CCode (cheader_filename = "pango/pango.h", ref_function = "pango_font_metrics_ref", type_id = "pango_font_metrics_get_type ()", unref_function = "pango_font_metrics_unref")] + [CCode (cheader_filename = "pango/pango.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "pango_font_metrics_get_type ()")] [Compact] public class FontMetrics { public int get_approximate_char_width (); @@ -240,27 +249,30 @@ namespace Pango { public int get_strikethrough_thickness (); public int get_underline_position (); public int get_underline_thickness (); + public Pango.FontMetrics @ref (); + public void unref (); } - [CCode (cheader_filename = "pango/pango.h")] - public class Fontset : GLib.Object { + [CCode (cheader_filename = "pango/pango.h", type_id = "pango_fontset_get_type ()")] + public abstract class Fontset : GLib.Object { [CCode (has_construct_function = false)] protected Fontset (); public void @foreach (Pango.FontsetForeachFunc func); public Pango.Font get_font (uint wc); public Pango.FontMetrics get_metrics (); } - [CCode (cheader_filename = "pango/pango.h", copy_function = "pango_glyph_item_copy", type_id = "pango_glyph_item_get_type ()")] + [CCode (cheader_filename = "pango/pango.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "pango_glyph_item_get_type ()")] [Compact] public class GlyphItem { public weak Pango.GlyphString glyphs; public weak Pango.Item item; public GLib.SList apply_attrs (string text, Pango.AttrList list); public Pango.GlyphItem copy (); + public void free (); 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 void letter_space (string text, [CCode (array_length = false)] Pango.LogAttr[] log_attrs, int letter_spacing); public Pango.GlyphItem split (string text, int split_index); } - [CCode (cheader_filename = "pango/pango.h", copy_function = "pango_glyph_string_copy", type_id = "pango_glyph_string_get_type ()")] + [CCode (cheader_filename = "pango/pango.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "pango_glyph_string_get_type ()")] [Compact] public class GlyphString { [CCode (array_length_cname = "num_glyphs")] @@ -268,23 +280,19 @@ namespace Pango { [CCode (array_length_cname = "num_glyphs")] public int[] log_clusters; public int num_glyphs; - public int space; [CCode (has_construct_function = false)] public GlyphString (); 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 free (); 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, 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, out int index_, out int trailing); } - [CCode (cheader_filename = "pango/pango.h")] - [Compact] - public class GlyphUnit { - } - [CCode (cheader_filename = "pango/pango.h", copy_function = "pango_item_copy", type_id = "pango_item_get_type ()")] + [CCode (cheader_filename = "pango/pango.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "pango_item_get_type ()")] [Compact] public class Item { public Pango.Analysis analysis; @@ -294,20 +302,22 @@ namespace Pango { [CCode (has_construct_function = false)] public Item (); public Pango.Item copy (); + public void free (); public Pango.Item split (int split_index, int split_offset); } - [CCode (cheader_filename = "pango/pango.h", type_id = "pango_language_get_type ()")] + [CCode (cheader_filename = "pango/pango.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "pango_language_get_type ()")] [Compact] public class Language { - public static unowned Pango.Language? from_string (string language); + public static unowned Pango.Language from_string (string? language); public static unowned Pango.Language get_default (); public unowned string get_sample_string (); + [CCode (array_length_pos = 0.1)] public unowned Pango.Script[] get_scripts (); public bool includes_script (Pango.Script script); public bool matches (string range_list); public unowned string to_string (); } - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", type_id = "pango_layout_get_type ()")] public class Layout : GLib.Object { [CCode (has_construct_function = false)] public Layout (Pango.Context context); @@ -317,6 +327,7 @@ namespace Pango { public unowned Pango.AttrList get_attributes (); public bool get_auto_dir (); public int get_baseline (); + public int get_character_count (); public unowned Pango.Context get_context (); public void get_cursor_pos (int index_, out Pango.Rectangle strong_pos, out Pango.Rectangle weak_pos); public Pango.EllipsizeMode get_ellipsize (); @@ -324,31 +335,33 @@ namespace Pango { public unowned Pango.FontDescription? get_font_description (); public int get_height (); public int get_indent (); - public unowned Pango.LayoutIter get_iter (); + public Pango.LayoutIter get_iter (); public bool get_justify (); 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 void get_log_attrs (out Pango.LogAttr[] attrs); + public unowned GLib.SList get_lines (); + public unowned GLib.SList get_lines_readonly (); + public void get_log_attrs ([CCode (array_length_cname = "n_attrs", array_length_pos = 1.1)] out Pango.LogAttr[] attrs); + [CCode (array_length_pos = 0.1)] + public unowned Pango.LogAttr[] get_log_attrs_readonly (); 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); public bool get_single_paragraph_mode (); public void get_size (out int width, out int height); public int get_spacing (); - public unowned Pango.TabArray get_tabs (); + public Pango.TabArray get_tabs (); public unowned string get_text (); 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, out int line, out int x_pos); - public void index_to_pos (int index_, out Pango.Rectangle pos); + public Pango.Rectangle index_to_pos (int index_); public bool is_ellipsized (); public bool is_wrapped (); 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_attributes (owned 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); @@ -356,31 +369,28 @@ namespace Pango { public void set_indent (int indent); public void set_justify (bool justify); public void set_markup (string markup, int length); - public void set_markup_with_accel (string markup, int length, unichar accel_marker, unichar accel_char); + public void set_markup_with_accel (string markup, int length, unichar accel_marker, out unichar accel_char); public void set_single_paragraph_mode (bool setting); public void set_spacing (int spacing); - public void set_tabs (Pango.TabArray tabs); + public void set_tabs (Pango.TabArray? tabs); 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, out int index_, out int trailing); } - [CCode (cheader_filename = "pango/pango.h")] - [Compact] - public class LayoutClass { - } - [CCode (cheader_filename = "pango/pango.h", copy_function = "pango_layout_iter_copy", type_id = "pango_layout_iter_get_type ()")] + [CCode (cheader_filename = "pango/pango.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "pango_layout_iter_get_type ()")] [Compact] public class LayoutIter { public bool at_last_line (); public Pango.LayoutIter copy (); + public void free (); public int get_baseline (); - public void get_char_extents (out Pango.Rectangle logical_rect); + public Pango.Rectangle get_char_extents (); public void get_cluster_extents (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect); public int get_index (); public unowned Pango.Layout get_layout (); public void get_layout_extents (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect); - public unowned Pango.LayoutLine get_line (); + public Pango.LayoutLine get_line (); public void get_line_extents (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect); public unowned Pango.LayoutLine get_line_readonly (); public void get_line_yrange (out int y0_, out int y1_); @@ -392,31 +402,31 @@ namespace Pango { public bool next_line (); public bool next_run (); } - [CCode (cheader_filename = "pango/pango.h", ref_function = "pango_layout_line_ref", type_id = "pango_layout_line_get_type ()", unref_function = "pango_layout_line_unref")] + [CCode (cheader_filename = "pango/pango.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "pango_layout_line_get_type ()")] [Compact] public class LayoutLine { public uint is_paragraph_start; public weak Pango.Layout layout; public int length; public uint resolved_dir; - public weak GLib.SList runs; + public weak GLib.SList runs; public int start_index; public void get_extents (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect); public void get_pixel_extents (out Pango.Rectangle ink_rect, out Pango.Rectangle logical_rect); - public void get_x_ranges (int start_index, int end_index, int[] ranges); + public void get_x_ranges (int start_index, int end_index, [CCode (array_length_cname = "n_ranges", array_length_pos = 3.1)] out int[] ranges); public void index_to_x (int index_, bool trailing, out int x_pos); + public Pango.LayoutLine @ref (); + public void unref (); public bool x_to_index (int x_pos, out int index_, out int trailing); } [CCode (cheader_filename = "pango/pango.h")] - [Compact] - public class LayoutRun { + public class LayoutRun : Pango.GlyphItem { + [CCode (has_construct_function = false)] + protected LayoutRun (); } - [CCode (cheader_filename = "pango/pango.h")] - public class Renderer : GLib.Object { - public int active_count; + [CCode (cheader_filename = "pango/pango.h", type_id = "pango_renderer_get_type ()")] + public abstract class Renderer : GLib.Object { public Pango.Matrix matrix; - public bool strikethrough; - public Pango.Underline underline; [CCode (has_construct_function = false)] protected Renderer (); public void activate (); @@ -425,7 +435,7 @@ namespace Pango { public void deactivate (); public virtual void draw_error_underline (int x, int y, int width, int height); public virtual void draw_glyph (Pango.Font font, Pango.Glyph glyph, double x, double y); - public virtual void draw_glyph_item (string text, Pango.GlyphItem glyph_item, int x, int y); + public virtual void draw_glyph_item (string? text, Pango.GlyphItem glyph_item, int x, int y); public virtual void draw_glyphs (Pango.Font font, Pango.GlyphString glyphs, int x, int y); public void draw_layout (Pango.Layout layout, int x, int y); public void draw_layout_line (Pango.LayoutLine line, int x, int y); @@ -442,45 +452,47 @@ namespace Pango { public virtual void part_changed (Pango.RenderPart part); [NoWrapper] public virtual void prepare_run (Pango.LayoutRun run); - public void set_color (Pango.RenderPart part, Pango.Color color); - public void set_matrix (Pango.Matrix matrix); + public void set_color (Pango.RenderPart part, Pango.Color? color); + public void set_matrix (Pango.Matrix? matrix); } [CCode (cheader_filename = "pango/pango.h")] [Compact] public class ScriptIter { [CCode (has_construct_function = false)] public ScriptIter (string text, int length); - public void get_range (out unowned string start, out unowned string end, Pango.Script script); + public void free (); + public void get_range (out string start, out string end, out Pango.Script script); public bool next (); } - [CCode (cheader_filename = "pango/pango.h", copy_function = "pango_tab_array_copy", type_id = "pango_tab_array_get_type ()")] + [CCode (cheader_filename = "pango/pango.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "pango_tab_array_get_type ()")] [Compact] public class TabArray { [CCode (has_construct_function = false)] public TabArray (int initial_size, bool positions_in_pixels); public Pango.TabArray copy (); + public void free (); public bool get_positions_in_pixels (); public int get_size (); - public void get_tab (int tab_index, Pango.TabAlign alignment, int location); - public void get_tabs (out Pango.TabAlign alignments, int locations); + public void get_tab (int tab_index, out Pango.TabAlign alignment, out int location); + public void get_tabs (out Pango.TabAlign alignments, [CCode (array_length = false)] out int[] locations); public void resize (int new_size); public void set_tab (int tab_index, Pango.TabAlign alignment, int location); [CCode (has_construct_function = false)] public TabArray.with_positions (int size, bool positions_in_pixels, Pango.TabAlign first_alignment, ...); } - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", has_type_id = false)] public struct Analysis { public weak Pango.EngineShape shape_engine; public weak Pango.EngineLang lang_engine; public weak Pango.Font font; - public uchar level; - public uchar gravity; - public uchar flags; - public uchar script; + public uint8 level; + public uint8 gravity; + public uint8 flags; + public uint8 script; public weak Pango.Language language; - public weak GLib.SList extra_attrs; + public weak GLib.SList extra_attrs; } - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", type_id = "pango_color_get_type ()")] public struct Color { public uint16 red; public uint16 green; @@ -488,24 +500,25 @@ namespace Pango { public Pango.Color copy (); public void free (); public bool parse (string spec); - public unowned string to_string (); + public string to_string (); } [CCode (cheader_filename = "pango/pango.h")] + [SimpleType] public struct Glyph : uint32 { } - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", has_type_id = false)] public struct GlyphGeometry { - public weak Pango.GlyphUnit width; - public weak Pango.GlyphUnit x_offset; - public weak Pango.GlyphUnit y_offset; + public Pango.GlyphUnit width; + public Pango.GlyphUnit x_offset; + public Pango.GlyphUnit y_offset; } - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", has_type_id = false)] public struct GlyphInfo { public Pango.Glyph glyph; public Pango.GlyphGeometry geometry; public Pango.GlyphVisAttr attr; } - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", type_id = "pango_glyph_item_iter_get_type ()")] public struct GlyphItemIter { public weak Pango.GlyphItem glyph_item; public weak string text; @@ -523,10 +536,14 @@ namespace Pango { public bool prev_cluster (); } [CCode (cheader_filename = "pango/pango.h")] + [SimpleType] + public struct GlyphUnit : int32 { + } + [CCode (cheader_filename = "pango/pango.h", has_type_id = false)] public struct GlyphVisAttr { public uint is_cluster_start; } - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", has_type_id = false)] public struct LogAttr { public uint is_line_break; public uint is_mandatory_break; @@ -542,7 +559,7 @@ namespace Pango { public uint is_expandable_space; public uint is_word_boundary; } - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", type_id = "pango_matrix_get_type ()")] public struct Matrix { public double xx; public double xy; @@ -556,13 +573,13 @@ namespace Pango { public double get_font_scale_factor (); public void rotate (double degrees); public void scale (double scale_x, double scale_y); - public void transform_distance (double dx, double dy); - public void transform_pixel_rectangle (ref Pango.Rectangle rect); - public void transform_point (double x, double y); - public void transform_rectangle (ref Pango.Rectangle rect); + public void transform_distance (ref double dx, ref double dy); + public void transform_pixel_rectangle (ref Pango.Rectangle? rect); + public void transform_point (ref double x, ref double y); + public void transform_rectangle (ref Pango.Rectangle? rect); public void translate (double tx, double ty); } - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", has_type_id = false)] public struct Rectangle { public int x; public int y; @@ -599,7 +616,9 @@ namespace Pango { STRIKETHROUGH_COLOR, ABSOLUTE_SIZE, GRAVITY, - GRAVITY_HINT + GRAVITY_HINT; + public static unowned string get_name (Pango.AttrType type); + public static Pango.AttrType register (string name); } [CCode (cheader_filename = "pango/pango.h", cprefix = "PANGO_BIDI_TYPE_")] public enum BidiType { @@ -621,7 +640,8 @@ namespace Pango { B, S, WS, - ON + ON; + public static Pango.BidiType for_unichar (unichar ch); } [CCode (cheader_filename = "pango/pango.h", cprefix = "PANGO_COVERAGE_")] public enum CoverageLevel { @@ -664,7 +684,11 @@ namespace Pango { EAST, NORTH, WEST, - AUTO + AUTO; + public static Pango.Gravity get_for_matrix (Pango.Matrix matrix); + public static Pango.Gravity get_for_script (Pango.Script script, Pango.Gravity base_gravity, Pango.GravityHint hint); + public static Pango.Gravity get_for_script_and_width (Pango.Script script, bool wide, Pango.Gravity base_gravity, Pango.GravityHint hint); + public static double to_rotation (Pango.Gravity gravity); } [CCode (cheader_filename = "pango/pango.h", cprefix = "PANGO_GRAVITY_HINT_")] public enum GravityHint { @@ -759,7 +783,9 @@ namespace Pango { VAI, CARIAN, LYCIAN, - LYDIAN + LYDIAN; + public static Pango.Script for_unichar (unichar ch); + public static Pango.Language get_sample_language (Pango.Script script); } [CCode (cheader_filename = "pango/pango.h", cprefix = "PANGO_STRETCH_")] public enum Stretch { @@ -796,7 +822,7 @@ namespace Pango { NORMAL, SMALL_CAPS } - [CCode (cheader_filename = "pango/pango.h", cprefix = "PANGO_WEIGHT_", default_value = "PANGO_WEIGHT_NORMAL")] + [CCode (cheader_filename = "pango/pango.h", cprefix = "PANGO_WEIGHT_")] public enum Weight { THIN, ULTRALIGHT, @@ -818,25 +844,31 @@ namespace Pango { } [CCode (cheader_filename = "pango/pango.h", has_target = false)] public delegate T AttrDataCopyFunc (T data); - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", instance_pos = 1.9)] public delegate bool AttrFilterFunc (Pango.Attribute attribute); - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", instance_pos = 2.9)] public delegate bool FontsetForeachFunc (Pango.Fontset fontset, Pango.Font font); - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_ANALYSIS_FLAG_CENTERED_BASELINE")] public const int ANALYSIS_FLAG_CENTERED_BASELINE; - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING")] public const int ATTR_INDEX_FROM_TEXT_BEGINNING; - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_ENGINE_TYPE_LANG")] public const string ENGINE_TYPE_LANG; - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_ENGINE_TYPE_SHAPE")] public const string ENGINE_TYPE_SHAPE; - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_GLYPH_EMPTY")] + public const Pango.Glyph GLYPH_EMPTY; + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_GLYPH_INVALID_INPUT")] + public const Pango.Glyph GLYPH_INVALID_INPUT; + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_GLYPH_UNKNOWN_FLAG")] + public const Pango.Glyph GLYPH_UNKNOWN_FLAG; + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_RENDER_TYPE_NONE")] public const string RENDER_TYPE_NONE; - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_SCALE")] public const int SCALE; - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_UNKNOWN_GLYPH_HEIGHT")] public const int UNKNOWN_GLYPH_HEIGHT; - [CCode (cheader_filename = "pango/pango.h")] + [CCode (cheader_filename = "pango/pango.h", cname = "PANGO_UNKNOWN_GLYPH_WIDTH")] public const int UNKNOWN_GLYPH_WIDTH; [CCode (cheader_filename = "pango/pango.h")] public const int VERSION_MAJOR; @@ -873,8 +905,10 @@ namespace Pango { [CCode (cheader_filename = "pango/pango.h")] public static Pango.Attribute attr_style_new (Pango.Style style); [CCode (cheader_filename = "pango/pango.h")] + [Deprecated (replacement = "Pango.AttrType.get_name", since = "vala-0.18")] public static unowned string attr_type_get_name (Pango.AttrType type); [CCode (cheader_filename = "pango/pango.h")] + [Deprecated (replacement = "Pango.AttrType.get_name", since = "vala-0.18")] public static Pango.AttrType attr_type_register (string name); [CCode (cheader_filename = "pango/pango.h")] public static Pango.Attribute attr_underline_color_new (uint16 red, uint16 green, uint16 blue); @@ -885,33 +919,40 @@ namespace Pango { [CCode (cheader_filename = "pango/pango.h")] public static Pango.Attribute attr_weight_new (Pango.Weight weight); [CCode (cheader_filename = "pango/pango.h")] + [Deprecated (replacement = "Pango.BidiType.for_unichar", since = "vala-0.18")] public static Pango.BidiType bidi_type_for_unichar (unichar ch); [CCode (cheader_filename = "pango/pango.h")] - public static void @break (string text, int length, Pango.Analysis analysis, Pango.LogAttr[] attrs, int attrs_len); + public static void @break (string text, int length, Pango.Analysis analysis, [CCode (array_length_cname = "attrs_len", array_length_pos = 4.1)] Pango.LogAttr[] attrs); [CCode (cheader_filename = "pango/pango.h")] - public static void extents_to_pixels (ref Pango.Rectangle inclusive, ref Pango.Rectangle nearest); + public static void extents_to_pixels (Pango.Rectangle? inclusive, Pango.Rectangle? nearest); [CCode (cheader_filename = "pango/pango.h")] public static Pango.Direction find_base_dir (string text, int length); [CCode (cheader_filename = "pango/pango.h")] public static void find_paragraph_boundary (string text, int length, out int paragraph_delimiter_index, out int next_paragraph_start); [CCode (cheader_filename = "pango/pango.h")] - public static void get_log_attrs (string text, int length, int level, Pango.Language language, Pango.LogAttr[] log_attrs); + public static void get_log_attrs (string text, int length, int level, Pango.Language language, [CCode (array_length_cname = "attrs_len", array_length_pos = 5.1)] Pango.LogAttr[] log_attrs); [CCode (cheader_filename = "pango/pango.h")] + public static bool get_mirror_char (unichar ch, unichar mirrored_ch); + [CCode (cheader_filename = "pango/pango.h")] + [Deprecated (replacement = "Pango.Gravity.get_for_matrix", since = "vala-0.18")] public static Pango.Gravity gravity_get_for_matrix (Pango.Matrix matrix); [CCode (cheader_filename = "pango/pango.h")] + [Deprecated (replacement = "Pango.Gravity.get_for_script", since = "vala-0.18")] public static Pango.Gravity gravity_get_for_script (Pango.Script script, Pango.Gravity base_gravity, Pango.GravityHint hint); [CCode (cheader_filename = "pango/pango.h")] + [Deprecated (replacement = "Pango.Gravity.get_for_script_and_width", since = "vala-0.18")] public static Pango.Gravity gravity_get_for_script_and_width (Pango.Script script, bool wide, Pango.Gravity base_gravity, Pango.GravityHint hint); [CCode (cheader_filename = "pango/pango.h")] + [Deprecated (replacement = "Pango.Gravity.get_to_rotation", since = "vala-0.18")] public static double gravity_to_rotation (Pango.Gravity gravity); [CCode (cheader_filename = "pango/pango.h")] public static bool is_zero_width (unichar ch); [CCode (cheader_filename = "pango/pango.h")] - public static unowned GLib.List itemize (Pango.Context context, string text, int start_index, int length, Pango.AttrList attrs, Pango.AttrIterator cached_iter); + public static GLib.List itemize (Pango.Context context, string text, int start_index, int length, Pango.AttrList attrs, Pango.AttrIterator? cached_iter); [CCode (cheader_filename = "pango/pango.h")] - public static unowned GLib.List itemize_with_base_dir (Pango.Context context, Pango.Direction base_dir, string text, int start_index, int length, Pango.AttrList attrs, Pango.AttrIterator cached_iter); + public static GLib.List itemize_with_base_dir (Pango.Context context, Pango.Direction base_dir, string text, int start_index, int length, Pango.AttrList attrs, Pango.AttrIterator? cached_iter); [CCode (cheader_filename = "pango/pango.h")] - public static uchar log2vis_get_embedding_levels (string text, int length, Pango.Direction pbase_dir); + public static uint8 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, out int value, bool warn, out string possible_values); [CCode (cheader_filename = "pango/pango.h")] @@ -925,29 +966,31 @@ namespace Pango { [CCode (cheader_filename = "pango/pango.h")] 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); + public static void quantize_line_geometry (ref int thickness, ref int position); [CCode (cheader_filename = "pango/pango.h")] - public static int read_line (GLib.FileStream stream, GLib.StringBuilder str); + public static int read_line ([CCode (type = "FILE*")] GLib.FileStream stream, GLib.StringBuilder str); [CCode (cheader_filename = "pango/pango.h")] - public static unowned GLib.List reorder_items (GLib.List logical_items); + public static GLib.List reorder_items (GLib.List logical_items); [CCode (cheader_filename = "pango/pango.h")] - public static bool scan_int (out unowned string pos, int @out); + public static bool scan_int (ref string pos, out int @out); [CCode (cheader_filename = "pango/pango.h")] - public static bool scan_string (out unowned string pos, GLib.StringBuilder @out); + public static bool scan_string (ref string pos, GLib.StringBuilder @out); [CCode (cheader_filename = "pango/pango.h")] - public static bool scan_word (out unowned string pos, GLib.StringBuilder @out); + public static bool scan_word (ref string pos, out unowned GLib.StringBuilder @out); [CCode (cheader_filename = "pango/pango.h")] + [Deprecated (replacement = "Pango.Script.for_unichar", since = "vala-0.18")] public static Pango.Script script_for_unichar (unichar ch); [CCode (cheader_filename = "pango/pango.h")] - public static unowned Pango.Language script_get_sample_language (Pango.Script script); + [Deprecated (replacement = "Pango.Script.get_sample_language", since = "vala-0.18")] + public static Pango.Language script_get_sample_language (Pango.Script script); [CCode (cheader_filename = "pango/pango.h")] public static void shape (string text, int length, Pango.Analysis analysis, Pango.GlyphString glyphs); [CCode (cheader_filename = "pango/pango.h")] - public static bool skip_space (out unowned string pos); - [CCode (cheader_filename = "pango/pango.h")] - public static unowned string split_file_list (string str); + public static bool skip_space (ref string pos); + [CCode (array_length = false, array_null_terminated = true, cheader_filename = "pango/pango.h")] + public static string[] split_file_list (string str); [CCode (cheader_filename = "pango/pango.h")] - public static unowned string trim_string (string str); + public static string trim_string (string str); [CCode (cheader_filename = "pango/pango.h")] public static Pango.Direction unichar_direction (unichar ch); [CCode (cheader_filename = "pango/pango.h")]