From be1af1e01b4d0dfdd5d615a8e6d7f493b8dc1b19 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 28 Oct 2016 06:04:58 +0200 Subject: [PATCH] visual: Deprecate querying APIs They are going away in 4.0 and nobody should be using them anyway. --- gdk/gdkvisual.c | 28 ++++++++++++++++++++++++++++ gdk/gdkvisual.h | 20 ++++++++++---------- 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/gdk/gdkvisual.c b/gdk/gdkvisual.c index efdeac7302..c7f3ec5ac1 100644 --- a/gdk/gdkvisual.c +++ b/gdk/gdkvisual.c @@ -88,6 +88,8 @@ gdk_visual_class_init (GdkVisualClass *visual_class) * * Returns: (transfer container) (element-type GdkVisual): * a list of visuals; the list must be freed, but not its contents + * + * Deprecated: 3.22: Use gdk_screen_list_visuals (gdk_screen_get_default ()). */ GList* gdk_list_visuals (void) @@ -103,6 +105,8 @@ gdk_list_visuals (void) * The return value should not be freed. * * Returns: (transfer none): system visual + * + * Deprecated: 3.22: Use gdk_screen_get_system_visual (gdk_screen_get_default ()). */ GdkVisual* gdk_visual_get_system (void) @@ -118,6 +122,9 @@ gdk_visual_get_system (void) * per pixel. * * Returns: best available depth + * + * Deprecated: 3.22: Visual selection should be done using + * gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual() */ gint gdk_visual_get_best_depth (void) @@ -133,6 +140,9 @@ gdk_visual_get_best_depth (void) * Return the best available visual type for the default GDK screen. * * Returns: best visual type + * + * Deprecated: 3.22: Visual selection should be done using + * gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual() */ GdkVisualType gdk_visual_get_best_type (void) @@ -149,6 +159,9 @@ gdk_visual_get_best_type (void) * GDK screen. The return value should not be freed. * * Returns: (transfer none): best visual + * + * Deprecated: 3.22: Visual selection should be done using + * gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual() */ GdkVisual* gdk_visual_get_best (void) @@ -168,6 +181,9 @@ gdk_visual_get_best (void) * not be freed. %NULL may be returned if no visual supports @depth. * * Returns: (transfer none): best visual for the given depth + * + * Deprecated: 3.22: Visual selection should be done using + * gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual() */ GdkVisual* gdk_visual_get_best_with_depth (gint depth) @@ -187,6 +203,9 @@ gdk_visual_get_best_with_depth (gint depth) * @visual_type. * * Returns: (transfer none): best visual of the given type + * + * Deprecated: 3.22: Visual selection should be done using + * gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual() */ GdkVisual* gdk_visual_get_best_with_type (GdkVisualType visual_type) @@ -207,6 +226,9 @@ gdk_visual_get_best_with_type (GdkVisualType visual_type) * * Returns: (nullable) (transfer none): best visual with both @depth * and @visual_type, or %NULL if none + * + * Deprecated: 3.22: Visual selection should be done using + * gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual() */ GdkVisual* gdk_visual_get_best_with_both (gint depth, @@ -229,6 +251,9 @@ gdk_visual_get_best_with_both (gint depth, * visual, removing duplicates. * * The array returned by this function should not be freed. + * + * Deprecated: 3.22: Visual selection should be done using + * gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual() */ void gdk_query_depths (gint **depths, @@ -251,6 +276,9 @@ gdk_query_depths (gint **depths, * visual, removing duplicates. * * The array returned by this function should not be freed. + * + * Deprecated: 3.22: Visual selection should be done using + * gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual() */ void gdk_query_visual_types (GdkVisualType **visual_types, diff --git a/gdk/gdkvisual.h b/gdk/gdkvisual.h index a401f1f489..10fd38ea20 100644 --- a/gdk/gdkvisual.h +++ b/gdk/gdkvisual.h @@ -82,30 +82,30 @@ typedef enum GDK_AVAILABLE_IN_ALL GType gdk_visual_get_type (void) G_GNUC_CONST; -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_22 gint gdk_visual_get_best_depth (void); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_22 GdkVisualType gdk_visual_get_best_type (void); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_22_FOR(gdk_screen_get_system_visual) GdkVisual* gdk_visual_get_system (void); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_22 GdkVisual* gdk_visual_get_best (void); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_22 GdkVisual* gdk_visual_get_best_with_depth (gint depth); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_22 GdkVisual* gdk_visual_get_best_with_type (GdkVisualType visual_type); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_22 GdkVisual* gdk_visual_get_best_with_both (gint depth, GdkVisualType visual_type); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_22 void gdk_query_depths (gint **depths, gint *count); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_22 void gdk_query_visual_types (GdkVisualType **visual_types, gint *count); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_22_FOR(gdk_screen_list_visuals) GList* gdk_list_visuals (void); GDK_AVAILABLE_IN_ALL