[pangomm] Fix build when _WRAP_ENUM generates enum class



commit e5cb65e20302819008dd422aff51b357639f576e
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Tue Apr 11 19:43:07 2017 +0200

    Fix build when _WRAP_ENUM generates enum class
    
    Bug 86864

 pango/src/attributes.hg           |    3 ++-
 pango/src/pango_docs_override.xml |   14 ++++++++++++++
 2 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/pango/src/attributes.hg b/pango/src/attributes.hg
index 5d63d4c..aeb0034 100644
--- a/pango/src/attributes.hg
+++ b/pango/src/attributes.hg
@@ -35,7 +35,8 @@ _CC_INCLUDE(pango/pango-enum-types.h)
  * custom attributes using Pango::Attribute::register_type(). The predefined values
  * are given below.
  */
-_WRAP_ENUM(AttrType, PangoAttrType)
+_WRAP_ENUM(AttrType, PangoAttrType, s#^SCALE$#SCALE_FACTOR#)
+// gcc complains that SCALE shadows the global constant SCALE from font.h.
 
 
 /** A Pango::Underline is used to specify whether text should be underlined, and if so, the type of 
underlining.
diff --git a/pango/src/pango_docs_override.xml b/pango/src/pango_docs_override.xml
index 011d67e..a880b2f 100644
--- a/pango/src/pango_docs_override.xml
+++ b/pango/src/pango_docs_override.xml
@@ -1,4 +1,18 @@
 <root>
+<substitute_enumerator_name from_prefix="PANGO_UNDERLINE_" to_prefix="Pango::Underline::" />
+<substitute_enumerator_name from_prefix="PANGO_DIRECTION_" to_prefix="Pango::Direction::" />
+<substitute_enumerator_name from_prefix="PANGO_GRAVITY_" to_prefix="Pango::Gravity::" />
+<substitute_enumerator_name from_prefix="PANGO_GRAVITY_HINT_" to_prefix="Pango::GravityHint::" />
+<substitute_enumerator_name from_prefix="PANGO_STYLE_" to_prefix="Pango::Style::" />
+<substitute_enumerator_name from_prefix="PANGO_VARIANT_" to_prefix="Pango::Variant::" />
+<substitute_enumerator_name from_prefix="PANGO_ELLIPSIZE_" to_prefix="Pango::EllipsizeMode::" />
+<substitute_enumerator_name from_prefix="PANGO_ALIGN_" to_prefix="Pango::Alignment::" />
+<substitute_enumerator_name from_prefix="PANGO_ATTR_" to_prefix="Pango::AttrType::" />
+<substitute_enumerator_name from_prefix="PANGO_TAB_" to_prefix="Pango::TabAlign::" />
+<!-- These are preprocessor defines. Don't substitute. -->
+<substitute_enumerator_name from="G_MAXINT" to="G_MAXINT" />
+<!-- This is the default substitution. Included here to avoid warnings from DocsParser.pm. -->
+<substitute_enumerator_name from="PANGO_SCALE" to="Pango::SCALE" />
 
 
 <function name="pango_font_face_describe">


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