summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2020-06-10 16:59:41 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2020-06-10 17:17:51 +0100
commit94f44a08d3c177c12de8ce84c647a08b0a12a411 (patch)
treebc0de4d9cc743ce093c99b0a1c52155e914af304 /pango
parent4b5e25a22cc0bb10c60cd43bef394e16f4a11846 (diff)
downloadpango-94f44a08d3c177c12de8ce84c647a08b0a12a411.tar.gz
Use the appropriate namespace for Pango sub-libraries
The Pango sub-libraries have symbols in the pango_<something> namespace, but the identifiers are in the Pango one, which makes consumers of the introspection data either get something like: PangoCairo.show_layout() with a bunch of warnings caused by the type macros not following the appropriate pattern, or: PangoCairo.cairo_show_layout() which breaks introspection ABI. We can use the __GI_SCANNER__ pre-processor symbol to trick the scanner into generating the appropriate representation of the API, while keeping the C consumers happy with the existing—albeit wildly inconsistent with best practices for GObject-based libraries—symbols.
Diffstat (limited to 'pango')
-rw-r--r--pango/meson.build10
-rw-r--r--pango/pango-ot.h23
-rw-r--r--pango/pangocairo-fc.h6
-rw-r--r--pango/pangocairo.h24
-rw-r--r--pango/pangofc-decoder.h22
-rw-r--r--pango/pangofc-font.h6
-rw-r--r--pango/pangofc-fontmap.h6
-rw-r--r--pango/pangoft2.h12
-rw-r--r--pango/pangoxft-render.h9
-rw-r--r--pango/pangoxft.h31
10 files changed, 127 insertions, 22 deletions
diff --git a/pango/meson.build b/pango/meson.build
index 015175c3..41158141 100644
--- a/pango/meson.build
+++ b/pango/meson.build
@@ -239,7 +239,7 @@ if build_pangoft2
namespace: 'PangoFc',
nsversion: pango_api_version,
identifier_prefix: 'PangoFc',
- symbol_prefix: 'pango',
+ symbol_prefix: 'pango_fc',
export_packages: 'pangofc',
includes: [ pango_gir[0], 'fontconfig-2.0', ],
header: 'pango/pangofc-fontmap.h',
@@ -257,7 +257,7 @@ if build_pangoft2
namespace: 'PangoOT',
nsversion: pango_api_version,
identifier_prefix: 'PangoOT',
- symbol_prefix: 'pango',
+ symbol_prefix: 'pango_ot',
export_packages: 'pangoot',
includes: [ pangofc_gir[0], 'freetype2-2.0', ],
header: 'pango/pango-ot.h',
@@ -274,7 +274,7 @@ if build_pangoft2
namespace: 'PangoFT2',
nsversion: pango_api_version,
identifier_prefix: 'PangoFT2',
- symbol_prefix: 'pango',
+ symbol_prefix: 'pango_ft2',
export_packages: 'pangoft2',
includes: [ pangofc_gir[0], 'freetype2-2.0', ],
header: 'pango/pangoft2.h',
@@ -364,7 +364,7 @@ if xft_dep.found() and fontconfig_dep.found()
namespace: 'PangoXft',
nsversion: pango_api_version,
identifier_prefix: 'PangoXft',
- symbol_prefix: 'pango',
+ symbol_prefix: 'pango_xft',
export_packages: 'pangoxft',
includes: [ pango_gir[0], pangoot_gir[0], pangoft2_gir[0], 'GObject-2.0', 'xft-2.0', 'xlib-2.0' ],
header: 'pango/pangoxft.h',
@@ -529,7 +529,7 @@ if cairo_dep.found()
namespace: 'PangoCairo',
nsversion: pango_api_version,
identifier_prefix: 'PangoCairo',
- symbol_prefix: 'pango',
+ symbol_prefix: 'pango_cairo',
export_packages: 'pangocairo',
includes: [ pango_gir[0], 'GObject-2.0', 'cairo-1.0' ],
header: 'pango/pangocairo.h',
diff --git a/pango/pango-ot.h b/pango/pango-ot.h
index 2c9f42d5..b8c6acc8 100644
--- a/pango/pango-ot.h
+++ b/pango/pango-ot.h
@@ -247,16 +247,29 @@ struct _PangoOTRulesetDescription {
guint n_other_features;
};
-
+#ifdef __GI_SCANNER__
+#define PANGO_OT_TYPE_INFO (pango_ot_info_get_type ())
+#define PANGO_OT_INFO(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_OT_TYPE_INFO, PangoOTInfo))
+#define PANGO_OT_IS_INFO(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_OT_TYPE_INFO))
+#else
#define PANGO_TYPE_OT_INFO (pango_ot_info_get_type ())
#define PANGO_OT_INFO(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_OT_INFO, PangoOTInfo))
#define PANGO_IS_OT_INFO(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_OT_INFO))
+#endif
+
PANGO_DEPRECATED
GType pango_ot_info_get_type (void) G_GNUC_CONST;
+#ifdef __GI_SCANNER__
+#define PANGO_OT_TYPE_RULESET (pango_ot_ruleset_get_type ())
+#define PANGO_OT_RULESET(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_OT_TYPE_RULESET, PangoOTRuleset))
+#define PANGO_OT_IS_RULESET(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_OT_TYPE_RULESET))
+#else
#define PANGO_TYPE_OT_RULESET (pango_ot_ruleset_get_type ())
#define PANGO_OT_RULESET(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_OT_RULESET, PangoOTRuleset))
#define PANGO_IS_OT_RULESET(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_OT_RULESET))
+#endif
+
PANGO_DEPRECATED
GType pango_ot_ruleset_get_type (void) G_GNUC_CONST;
@@ -300,7 +313,11 @@ PangoOTTag *pango_ot_info_list_features (PangoOTInfo *info,
guint script_index,
guint language_index);
+#ifdef __GI_SCANNER__
+#define PANGO_OT_TYPE_BUFFER (pango_ot_buffer_get_type())
+#else
#define PANGO_TYPE_OT_BUFFER (pango_ot_buffer_get_type())
+#endif
PANGO_DEPRECATED
GType pango_ot_buffer_get_type (void) G_GNUC_CONST;
@@ -383,7 +400,11 @@ PangoLanguage *pango_ot_tag_to_language (PangoOTTag language_tag) G_GNUC_
PANGO_DEPRECATED
PangoOTTag pango_ot_tag_from_language (PangoLanguage *language) G_GNUC_CONST;
+#ifdef __GI_SCANNER__
+#define PANGO_OT_TYPE_RULESET_DESCRIPTION (pango_ot_ruleset_description_get_type())
+#else
#define PANGO_TYPE_OT_RULESET_DESCRIPTION (pango_ot_ruleset_description_get_type())
+#endif
PANGO_DEPRECATED
GType pango_ot_ruleset_description_get_type (void) G_GNUC_CONST;
diff --git a/pango/pangocairo-fc.h b/pango/pangocairo-fc.h
index 0d9d04b4..36529569 100644
--- a/pango/pangocairo-fc.h
+++ b/pango/pangocairo-fc.h
@@ -27,9 +27,15 @@
G_BEGIN_DECLS
+#ifdef __GI_SCANNER__
+#define PANGO_CAIRO_TYPE_FC_FONT_MAP (pango_cairo_fc_font_map_get_type())
+#define PANGO_CAIRO_FC_FONT_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PANGO_CAIRO_TYPE_FC_FONT_MAP, PangoCairoFcFontMap))
+#define PANGO_CAIRO_IS_FC_FONT_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PANGO_CAIRO_TYPE_FC_FONT_MAP))
+#else
#define PANGO_TYPE_CAIRO_FC_FONT_MAP (pango_cairo_fc_font_map_get_type ())
#define PANGO_CAIRO_FC_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CAIRO_FC_FONT_MAP, PangoCairoFcFontMap))
#define PANGO_IS_CAIRO_FC_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CAIRO_FC_FONT_MAP))
+#endif
typedef struct _PangoCairoFcFontMap PangoCairoFcFontMap;
diff --git a/pango/pangocairo.h b/pango/pangocairo.h
index cd368f8f..633ccf9d 100644
--- a/pango/pangocairo.h
+++ b/pango/pangocairo.h
@@ -37,9 +37,20 @@ G_BEGIN_DECLS
* Since: 1.18
**/
typedef struct _PangoCairoFont PangoCairoFont;
-#define PANGO_TYPE_CAIRO_FONT (pango_cairo_font_get_type ())
-#define PANGO_CAIRO_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CAIRO_FONT, PangoCairoFont))
-#define PANGO_IS_CAIRO_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CAIRO_FONT))
+
+/* This is a hack because PangoCairo is hijacking the Pango namespace, but
+ * consumers of the PangoCairo API expect these symbols to live under the
+ * PangoCairo namespace.
+ */
+#ifdef __GI_SCANNER__
+#define PANGO_CAIRO_TYPE_FONT (pango_cairo_font_get_type())
+#define PANGO_CAIRO_FONT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PANGO_CAIRO_TYPE_FONT, PangoCairoFont))
+#define PANGO_CAIRO_IS_FONT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PANGO_CAIRO_TYPE_FONT))
+#else
+#define PANGO_TYPE_CAIRO_FONT (pango_cairo_font_get_type ())
+#define PANGO_CAIRO_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CAIRO_FONT, PangoCairoFont))
+#define PANGO_IS_CAIRO_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CAIRO_FONT))
+#endif
/**
* PangoCairoFontMap:
@@ -51,9 +62,16 @@ typedef struct _PangoCairoFont PangoCairoFont;
* Since: 1.10
**/
typedef struct _PangoCairoFontMap PangoCairoFontMap;
+
+#ifdef __GI_SCANNER__
+#define PANGO_CAIRO_TYPE_FONT_MAP (pango_cairo_font_map_get_type())
+#define PANGO_CAIRO_FONT_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PANGO_CAIRO_TYPE_FONT_MAP, PangoCairoFontMap))
+#define PANGO_CAIRO_IS_FONT_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PANGO_CAIRO_TYPE_FONT_MAP))
+#else
#define PANGO_TYPE_CAIRO_FONT_MAP (pango_cairo_font_map_get_type ())
#define PANGO_CAIRO_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CAIRO_FONT_MAP, PangoCairoFontMap))
#define PANGO_IS_CAIRO_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CAIRO_FONT_MAP))
+#endif
/**
* PangoCairoShapeRendererFunc:
diff --git a/pango/pangofc-decoder.h b/pango/pangofc-decoder.h
index f4b8cc86..7c78958c 100644
--- a/pango/pangofc-decoder.h
+++ b/pango/pangofc-decoder.h
@@ -26,17 +26,25 @@
G_BEGIN_DECLS
-#define PANGO_TYPE_FC_DECODER (pango_fc_decoder_get_type())
-#define PANGO_FC_DECODER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FC_DECODER, PangoFcDecoder))
-#define PANGO_IS_FC_DECODER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FC_DECODER))
+#ifdef __GI_SCANNER__
+#define PANGO_FC_TYPE_DECODER (pango_fc_decoder_get_type())
+#define PANGO_FC_DECODER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_FC_TYPE_DECODER, PangoFcDecoder))
+#define PANGO_FC_IS_DECODER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_FC_TYPE_DECODER))
+#define PANGO_FC_DECODER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_FC_TYPE_DECODER, PangoFcDecoderClass))
+#define PANGO_FC_IS_DECODER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_FC_TYPE_DECODER))
+#define PANGO_FC_DECODER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_FC_TYPE_DECODER, PangoFcDecoderClass))
+#else
+#define PANGO_TYPE_FC_DECODER (pango_fc_decoder_get_type())
+#define PANGO_FC_DECODER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FC_DECODER, PangoFcDecoder))
+#define PANGO_IS_FC_DECODER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FC_DECODER))
+#define PANGO_FC_DECODER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FC_DECODER, PangoFcDecoderClass))
+#define PANGO_IS_FC_DECODER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FC_DECODER))
+#define PANGO_FC_DECODER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FC_DECODER, PangoFcDecoderClass))
+#endif
typedef struct _PangoFcDecoder PangoFcDecoder;
typedef struct _PangoFcDecoderClass PangoFcDecoderClass;
-#define PANGO_FC_DECODER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FC_DECODER, PangoFcDecoderClass))
-#define PANGO_IS_FC_DECODER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FC_DECODER))
-#define PANGO_FC_DECODER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FC_DECODER, PangoFcDecoderClass))
-
/**
* PangoFcDecoder:
*
diff --git a/pango/pangofc-font.h b/pango/pangofc-font.h
index 641f5947..25a0277c 100644
--- a/pango/pangofc-font.h
+++ b/pango/pangofc-font.h
@@ -42,9 +42,15 @@
G_BEGIN_DECLS
+#ifdef __GI_SCANNER__
+#define PANGO_FC_TYPE_FONT (pango_fc_font_get_type ())
+#define PANGO_FC_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_FC_TYPE_FONT, PangoFcFont))
+#define PANGO_FC_IS_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_FC_TYPE_FONT))
+#else
#define PANGO_TYPE_FC_FONT (pango_fc_font_get_type ())
#define PANGO_FC_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FC_FONT, PangoFcFont))
#define PANGO_IS_FC_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FC_FONT))
+#endif
typedef struct _PangoFcFont PangoFcFont;
typedef struct _PangoFcFontClass PangoFcFontClass;
diff --git a/pango/pangofc-fontmap.h b/pango/pangofc-fontmap.h
index ae11ec31..a41ae1d9 100644
--- a/pango/pangofc-fontmap.h
+++ b/pango/pangofc-fontmap.h
@@ -35,9 +35,15 @@ G_BEGIN_DECLS
* PangoFcFontMap
*/
+#ifdef __GI_SCANNER__
+#define PANGO_FC_TYPE_FONT_MAP (pango_fc_font_map_get_type ())
+#define PANGO_FC_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_FC_TYPE_FONT_MAP, PangoFcFontMap))
+#define PANGO_FC_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_FC_TYPE_FONT_MAP))
+#else
#define PANGO_TYPE_FC_FONT_MAP (pango_fc_font_map_get_type ())
#define PANGO_FC_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FC_FONT_MAP, PangoFcFontMap))
#define PANGO_IS_FC_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FC_FONT_MAP))
+#endif
typedef struct _PangoFcFontMap PangoFcFontMap;
typedef struct _PangoFcFontMapClass PangoFcFontMapClass;
diff --git a/pango/pangoft2.h b/pango/pangoft2.h
index 87d0ae2d..483bc366 100644
--- a/pango/pangoft2.h
+++ b/pango/pangoft2.h
@@ -33,9 +33,11 @@
G_BEGIN_DECLS
+#ifndef __GI_SCANNER__
+
#ifndef PANGO_DISABLE_DEPRECATED
/**
- * PANGO_RENDER_TYPE_FT2:
+ * PANGO_RENDER_TYPE_FT2: (skip)
*
* A string constant that was used to identify shape engines that work
* with the FreeType backend. See %PANGO_RENDER_TYPE_FC for the replacement.
@@ -43,9 +45,17 @@ G_BEGIN_DECLS
#define PANGO_RENDER_TYPE_FT2 "PangoRenderFT2"
#endif
+#endif /* __GI_SCANNER__ */
+
+#ifdef __GI_SCANNER__
+#define PANGO_FT2_TYPE_FONT_MAP (pango_ft2_font_map_get_type ())
+#define PANGO_FT2_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_FT2_TYPE_FONT_MAP, PangoFT2FontMap))
+#define PANGO_FT2_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_FT2_TYPE_FONT_MAP))
+#else
#define PANGO_TYPE_FT2_FONT_MAP (pango_ft2_font_map_get_type ())
#define PANGO_FT2_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FT2_FONT_MAP, PangoFT2FontMap))
#define PANGO_FT2_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FT2_FONT_MAP))
+#endif
typedef struct _PangoFT2FontMap PangoFT2FontMap;
diff --git a/pango/pangoxft-render.h b/pango/pangoxft-render.h
index 5893574b..77684728 100644
--- a/pango/pangoxft-render.h
+++ b/pango/pangoxft-render.h
@@ -38,12 +38,21 @@ typedef struct _PangoXftRenderer PangoXftRenderer;
typedef struct _PangoXftRendererClass PangoXftRendererClass;
typedef struct _PangoXftRendererPrivate PangoXftRendererPrivate;
+#ifdef __GI_SCANNER__
+#define PANGO_XFT_TYPE_RENDERER (pango_xft_renderer_get_type())
+#define PANGO_XFT_RENDERER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_XFT_TYPE_RENDERER, PangoXftRenderer))
+#define PANGO_XFT_IS_RENDERER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_XFT_TYPE_RENDERER))
+#define PANGO_XFT_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_XFT_TYPE_RENDERER, PangoXftRendererClass))
+#define PANGO_XFT_IS_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_XFT_TYPE_RENDERER))
+#define PANGO_XFT_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_XFT_TYPE_RENDERER, PangoXftRendererClass))
+#else
#define PANGO_TYPE_XFT_RENDERER (pango_xft_renderer_get_type())
#define PANGO_XFT_RENDERER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_XFT_RENDERER, PangoXftRenderer))
#define PANGO_IS_XFT_RENDERER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_XFT_RENDERER))
#define PANGO_XFT_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_XFT_RENDERER, PangoXftRendererClass))
#define PANGO_IS_XFT_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_XFT_RENDERER))
#define PANGO_XFT_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_XFT_RENDERER, PangoXftRendererClass))
+#endif
/**
* PangoXftRenderer:
diff --git a/pango/pangoxft.h b/pango/pangoxft.h
index d02624f3..f14b89c9 100644
--- a/pango/pangoxft.h
+++ b/pango/pangoxft.h
@@ -31,8 +31,10 @@
G_BEGIN_DECLS
+#ifndef __GI_SCANNER__
+
/**
- * PANGO_RENDER_TYPE_XFT:
+ * PANGO_RENDER_TYPE_XFT: (skip)
*
* A string constant that was used to identify shape engines that work
* with the Xft backend. See %PANGO_RENDER_TYPE_FC for the replacement.
@@ -41,6 +43,8 @@ G_BEGIN_DECLS
#define PANGO_RENDER_TYPE_XFT "PangoRenderXft"
#endif
+#endif /* __GI_SCANNER__ */
+
/**
* PangoXftFontMap:
*
@@ -48,9 +52,20 @@ G_BEGIN_DECLS
* the Xft library as the renderer. It is used in to create fonts of
* type #PangoXftFont.
*/
-#define PANGO_TYPE_XFT_FONT_MAP (pango_xft_font_map_get_type ())
-#define PANGO_XFT_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_XFT_FONT_MAP, PangoXftFontMap))
-#define PANGO_XFT_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_XFT_FONT_MAP))
+
+/* This is a hack needed because PangoXft hijacks the Pango namespace
+ * for the identifiers, but consumers expect these symbols to be under
+ * the PangoXft namespace.
+ */
+#ifdef __GI_SCANNER__
+#define PANGO_XFT_TYPE_FONT_MAP (pango_xft_font_map_get_type())
+#define PANGO_XFT_FONT_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PANGO_XFT_TYPE_FONT_MAP, PangoXftFontMap))
+#define PANGO_XFT_IS_FONT_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PANGO_XFT_TYPE_FONT_MAP))
+#else
+#define PANGO_TYPE_XFT_FONT_MAP (pango_xft_font_map_get_type ())
+#define PANGO_XFT_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_XFT_FONT_MAP, PangoXftFontMap))
+#define PANGO_XFT_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_XFT_FONT_MAP))
+#endif
typedef struct _PangoXftFontMap PangoXftFontMap;
@@ -99,9 +114,15 @@ void pango_xft_substitute_changed (Display *display,
PANGO_AVAILABLE_IN_ALL
GType pango_xft_font_map_get_type (void) G_GNUC_CONST;
-#define PANGO_XFT_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_XFT_FONT, PangoXftFont))
+#ifdef __GI_SCANNER__
+#define PANGO_XFT_TYPE_FONT (pango_xft_font_get_type ())
+#define PANGO_XFT_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_XFT_TYPE_FONT, PangoXftFont))
+#define PANGO_XFT_IS_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_XFT_TYPE_FONT))
+#else
#define PANGO_TYPE_XFT_FONT (pango_xft_font_get_type ())
+#define PANGO_XFT_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_XFT_FONT, PangoXftFont))
#define PANGO_XFT_IS_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_XFT_FONT))
+#endif
PANGO_AVAILABLE_IN_ALL
GType pango_xft_font_get_type (void) G_GNUC_CONST;