[pango] Add deprecation attributes to deprecated functions



commit 0e091322c494b1523617ca7488ea22e58f8a2c13
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Oct 12 18:33:03 2011 -0400

    Add deprecation attributes to deprecated functions
    
    This is using the newly introduce G_DEPRECATED macros
    from GLib. Traditional deprecation guards are still in
    place.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=661612

 configure.in            |    2 +-
 pango/pango-bidi-type.h |    1 +
 pango/pangocairo.h      |    1 +
 pango/pangofc-font.h    |    1 +
 pango/pangofc-fontmap.h |    1 +
 pango/pangoft2.h        |    8 ++++++++
 pango/pangowin32.h      |    2 ++
 pango/pangox.h          |   21 +++++++++++++++++++++
 pango/pangoxft.h        |    5 +++++
 9 files changed, 41 insertions(+), 1 deletions(-)
---
diff --git a/configure.in b/configure.in
index 28ae088..7159901 100644
--- a/configure.in
+++ b/configure.in
@@ -465,7 +465,7 @@ fi
 #
 # Checks for GLib
 #
-GLIB_REQUIRED_VERSION=2.26.0
+GLIB_REQUIRED_VERSION=2.31.0
 GLIB_MODULES="glib-2.0 >= $GLIB_REQUIRED_VERSION gobject-2.0 gmodule-no-export-2.0"
 
 PKG_CHECK_MODULES(GLIB, $GLIB_MODULES, :,
diff --git a/pango/pango-bidi-type.h b/pango/pango-bidi-type.h
index c53b170..21bb7e7 100644
--- a/pango/pango-bidi-type.h
+++ b/pango/pango-bidi-type.h
@@ -126,6 +126,7 @@ PangoDirection pango_find_base_dir          (const gchar *text,
 					     gint         length);
 
 #ifndef PANGO_DISABLE_DEPRECATED
+G_DEPRECATED_FOR(g_unichar_get_mirror_char)
 gboolean       pango_get_mirror_char        (gunichar     ch,
 					     gunichar    *mirrored_ch);
 #endif
diff --git a/pango/pangocairo.h b/pango/pangocairo.h
index f6fc261..81e842d 100644
--- a/pango/pangocairo.h
+++ b/pango/pangocairo.h
@@ -75,6 +75,7 @@ void          pango_cairo_font_map_set_resolution (PangoCairoFontMap *fontmap,
 						   double             dpi);
 double        pango_cairo_font_map_get_resolution (PangoCairoFontMap *fontmap);
 #ifndef PANGO_DISABLE_DEPRECATED
+G_DEPRECATED_FOR(pango_font_map_create_context)
 PangoContext *pango_cairo_font_map_create_context (PangoCairoFontMap *fontmap);
 #endif
 
diff --git a/pango/pangofc-font.h b/pango/pangofc-font.h
index ae16b16..de11d43 100644
--- a/pango/pangofc-font.h
+++ b/pango/pangofc-font.h
@@ -134,6 +134,7 @@ gboolean   pango_fc_font_has_char          (PangoFcFont      *font,
 guint      pango_fc_font_get_glyph         (PangoFcFont      *font,
 					    gunichar          wc);
 #ifndef PANGO_DISABLE_DEPRECATED
+G_DEPRECATED_FOR(PANGO_GET_UNKNOWN_GLYPH)
 PangoGlyph pango_fc_font_get_unknown_glyph (PangoFcFont      *font,
 					    gunichar          wc);
 #endif /* PANGO_DISABLE_DEPRECATED */
diff --git a/pango/pangofc-fontmap.h b/pango/pangofc-fontmap.h
index 8d496eb..3809446 100644
--- a/pango/pangofc-fontmap.h
+++ b/pango/pangofc-fontmap.h
@@ -186,6 +186,7 @@ struct _PangoFcFontMapClass
 };
 
 #ifndef PANGO_DISABLE_DEPRECATED
+G_DEPRECATED_FOR(pango_font_map_create_context)
 PangoContext * pango_fc_font_map_create_context (PangoFcFontMap *fcfontmap);
 #endif
 void           pango_fc_font_map_shutdown       (PangoFcFontMap *fcfontmap);
diff --git a/pango/pangoft2.h b/pango/pangoft2.h
index e43e2e4..d2ba13d 100644
--- a/pango/pangoft2.h
+++ b/pango/pangoft2.h
@@ -86,6 +86,7 @@ void          pango_ft2_font_map_set_default_substitute (PangoFT2FontMap
 							 GDestroyNotify          notify);
 void          pango_ft2_font_map_substitute_changed     (PangoFT2FontMap         *fontmap);
 #ifndef PANGO_DISABLE_DEPRECATED
+G_DEPRECATED_FOR(pango_font_map_create_context)
 PangoContext *pango_ft2_font_map_create_context         (PangoFT2FontMap         *fontmap);
 #endif
 
@@ -93,16 +94,23 @@ PangoContext *pango_ft2_font_map_create_context         (PangoFT2FontMap
 /* API for rendering modules
  */
 #ifndef PANGO_DISABLE_DEPRECATED
+G_DEPRECATED_FOR(pango_font_map_create_context)
 PangoContext      *pango_ft2_get_context          (double dpi_x,
 						   double dpi_y);
+G_DEPRECATED_FOR(pango_ft2_font_map_new)
 PangoFontMap      *pango_ft2_font_map_for_display (void);
+G_DEPRECATED
 void               pango_ft2_shutdown_display     (void);
 
+G_DEPRECATED_FOR(PANGO_GET_UNKNOWN_GLYPH)
 PangoGlyph     pango_ft2_get_unknown_glyph (PangoFont       *font);
+G_DEPRECATED_FOR(pango_fc_font_kern_glyphs)
 int            pango_ft2_font_get_kerning  (PangoFont       *font,
 					    PangoGlyph       left,
 					    PangoGlyph       right);
+G_DEPRECATED_FOR(pango_fc_font_lock_face)
 FT_Face        pango_ft2_font_get_face     (PangoFont       *font);
+G_DEPRECATED_FOR(pango_font_get_coverage)
 PangoCoverage *pango_ft2_font_get_coverage (PangoFont       *font,
 					    PangoLanguage   *language);
 #endif /* PANGO_DISABLE_DEPRECATED */
diff --git a/pango/pangowin32.h b/pango/pangowin32.h
index 6653a17..a27c473 100644
--- a/pango/pangowin32.h
+++ b/pango/pangowin32.h
@@ -42,6 +42,7 @@ G_BEGIN_DECLS
 /* Calls for applications
  */
 #ifndef PANGO_DISABLE_DEPRECATED
+G_DEPRECATED_FOR(pango_font_map_create_context)
 PangoContext * pango_win32_get_context        (void);
 #endif
 
@@ -72,6 +73,7 @@ void           pango_win32_render_transformed (HDC         hdc,
  */
 
 #ifndef PANGO_DISABLE_DEPRECATED
+G_DEPRECATED_FOR(PANGO_GET_UNKNOWN_GLYPH)
 PangoGlyph     pango_win32_get_unknown_glyph  (PangoFont        *font,
 					       gunichar          wc);
 #endif /* PANGO_DISABLE_DEPRECATED */
diff --git a/pango/pangox.h b/pango/pangox.h
index dc41b61..f708ed1 100644
--- a/pango/pangox.h
+++ b/pango/pangox.h
@@ -39,13 +39,17 @@ typedef void (*PangoFreeGCFunc) (PangoContext *context, GC gc);
 
 /* Calls for applications
  */
+G_DEPRECATED
 PangoContext * pango_x_get_context        (Display          *display);
+G_DEPRECATED
 void           pango_x_context_set_funcs  (PangoContext     *context,
 					   PangoGetGCFunc    get_gc_func,
 					   PangoFreeGCFunc   free_gc_func);
 
+G_DEPRECATED
 PangoFont *    pango_x_load_font          (Display          *display,
 					   const gchar      *spec);
+G_DEPRECATED
 void           pango_x_render             (Display          *display,
 					   Drawable          d,
 					   GC                gc,
@@ -53,12 +57,14 @@ void           pango_x_render             (Display          *display,
 					   PangoGlyphString *glyphs,
 					   gint              x,
 					   gint              y);
+G_DEPRECATED
 void           pango_x_render_layout_line (Display          *display,
 					   Drawable          drawable,
 					   GC                gc,
 					   PangoLayoutLine  *line,
 					   int               x,
 					   int               y);
+G_DEPRECATED
 void           pango_x_render_layout      (Display          *display,
 					   Drawable          drawable,
 					   GC                gc,
@@ -74,16 +80,20 @@ typedef guint16 PangoXSubfont;
 #define PANGO_X_GLYPH_SUBFONT(glyph) ((glyph)>>16)
 #define PANGO_X_GLYPH_INDEX(glyph) ((glyph) & 0xffff)
 
+G_DEPRECATED
 int        pango_x_list_subfonts     (PangoFont      *font,
 				      char          **charsets,
 				      int             n_charsets,
 				      PangoXSubfont **subfont_ids,
 				      int           **subfont_charsets);
+G_DEPRECATED
 gboolean   pango_x_has_glyph         (PangoFont      *font,
 				      PangoGlyph      glyph);
+G_DEPRECATED
 PangoGlyph pango_x_get_unknown_glyph (PangoFont      *font);
 
 #ifdef PANGO_ENABLE_ENGINE
+G_DEPRECATED
 PangoGlyph pango_x_font_get_unknown_glyph (PangoFont    *font,
 					   gunichar      wc);
 #endif /* PANGO_ENABLE_ENGINE */
@@ -92,32 +102,43 @@ PangoGlyph pango_x_font_get_unknown_glyph (PangoFont    *font,
  */
 typedef struct _PangoXFontCache PangoXFontCache;
 
+G_DEPRECATED
 PangoXFontCache *pango_x_font_cache_new     (Display         *display);
+G_DEPRECATED
 void             pango_x_font_cache_free    (PangoXFontCache *cache);
 
+G_DEPRECATED
 XFontStruct * pango_x_font_cache_load      (PangoXFontCache *cache,
 					    const char      *xlfd);
+G_DEPRECATED
 void          pango_x_font_cache_unload    (PangoXFontCache *cache,
 					    XFontStruct     *fs);
 
+G_DEPRECATED
 PangoFontMap *   pango_x_font_map_for_display  (Display     *display);
+G_DEPRECATED
 void             pango_x_shutdown_display      (Display     *display);
+G_DEPRECATED
 PangoXFontCache *pango_x_font_map_get_font_cache (PangoFontMap *font_map);
 
+G_DEPRECATED
 char *pango_x_font_subfont_xlfd (PangoFont     *font,
 				 PangoXSubfont  subfont_id);
 
 
+G_DEPRECATED
 gboolean pango_x_find_first_subfont (PangoFont     *font,
 				     char         **charsets,
 				     int            n_charsets,
 				     PangoXSubfont *rfont);
 
+G_DEPRECATED
 void pango_x_fallback_shape (PangoFont        *font,
 			     PangoGlyphString *glyphs,
 			     const char       *text,
 			     int               n_chars);
 
+G_DEPRECATED
 gboolean pango_x_apply_ligatures (PangoFont     *font,
 				  PangoXSubfont  subfont,
 				  gunichar     **glyphs,
diff --git a/pango/pangoxft.h b/pango/pangoxft.h
index 177bf97..c5c7501 100644
--- a/pango/pangoxft.h
+++ b/pango/pangoxft.h
@@ -80,12 +80,17 @@ GType      pango_xft_font_get_type (void) G_GNUC_CONST;
 XftFont *     pango_xft_font_get_font          (PangoFont *font);
 Display *     pango_xft_font_get_display       (PangoFont *font);
 #ifndef PANGO_DISABLE_DEPRECATED
+G_DEPRECATED_FOR(pango_fc_font_lock_face)
 FT_Face       pango_xft_font_lock_face         (PangoFont *font);
+G_DEPRECATED_FOR(pango_fc_font_unlock_face)
 void	      pango_xft_font_unlock_face       (PangoFont *font);
+G_DEPRECATED_FOR(pango_fc_font_get_glyph)
 guint	      pango_xft_font_get_glyph	       (PangoFont *font,
 						gunichar   wc);
+G_DEPRECATED_FOR(pango_fc_font_has_char)
 gboolean      pango_xft_font_has_char          (PangoFont *font,
 						gunichar   wc);
+G_DEPRECATED_FOR(PANGO_GET_UNKNOWN_GLYPH)
 PangoGlyph    pango_xft_font_get_unknown_glyph (PangoFont *font,
 						gunichar   wc);
 #endif /* PANGO_DISABLE_DEPRECATED */



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