pango: Conditionally use deprecated API

When compiling against a newer version of Pango we can avoid the
deprecation warning.
This commit is contained in:
Emmanuele Bassi 2015-06-10 15:14:30 +01:00
parent 838355afbd
commit 9ab320cd3d

View File

@ -98,9 +98,13 @@ cogl_pango_font_map_create_context (CoglPangoFontMap *fm)
{ {
_COGL_RETURN_VAL_IF_FAIL (COGL_PANGO_IS_FONT_MAP (fm), NULL); _COGL_RETURN_VAL_IF_FAIL (COGL_PANGO_IS_FONT_MAP (fm), NULL);
#if PANGO_VERSION_CHECK (1, 22, 0)
/* We can just directly use the pango context from the Cairo font /* We can just directly use the pango context from the Cairo font
map */ map */
return pango_font_map_create_context (PANGO_FONT_MAP (fm));
#else
return pango_cairo_font_map_create_context (PANGO_CAIRO_FONT_MAP (fm)); return pango_cairo_font_map_create_context (PANGO_CAIRO_FONT_MAP (fm));
#endif
} }
static CoglPangoFontMapPriv * static CoglPangoFontMapPriv *