visual: Deprecate querying APIs

They are going away in 4.0 and nobody should be using them anyway.
This commit is contained in:
Benjamin Otte 2016-10-28 06:04:58 +02:00
parent eb43c3e6b6
commit be1af1e01b
2 changed files with 38 additions and 10 deletions

View File

@ -88,6 +88,8 @@ gdk_visual_class_init (GdkVisualClass *visual_class)
* *
* Returns: (transfer container) (element-type GdkVisual): * Returns: (transfer container) (element-type GdkVisual):
* a list of visuals; the list must be freed, but not its contents * 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* GList*
gdk_list_visuals (void) gdk_list_visuals (void)
@ -103,6 +105,8 @@ gdk_list_visuals (void)
* The return value should not be freed. * The return value should not be freed.
* *
* Returns: (transfer none): system visual * Returns: (transfer none): system visual
*
* Deprecated: 3.22: Use gdk_screen_get_system_visual (gdk_screen_get_default ()).
*/ */
GdkVisual* GdkVisual*
gdk_visual_get_system (void) gdk_visual_get_system (void)
@ -118,6 +122,9 @@ gdk_visual_get_system (void)
* per pixel. * per pixel.
* *
* Returns: best available depth * 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 gint
gdk_visual_get_best_depth (void) 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. * Return the best available visual type for the default GDK screen.
* *
* Returns: best visual type * 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 GdkVisualType
gdk_visual_get_best_type (void) 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. * GDK screen. The return value should not be freed.
* *
* Returns: (transfer none): best visual * 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* GdkVisual*
gdk_visual_get_best (void) 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. * not be freed. %NULL may be returned if no visual supports @depth.
* *
* Returns: (transfer none): best visual for the given 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* GdkVisual*
gdk_visual_get_best_with_depth (gint depth) gdk_visual_get_best_with_depth (gint depth)
@ -187,6 +203,9 @@ gdk_visual_get_best_with_depth (gint depth)
* @visual_type. * @visual_type.
* *
* Returns: (transfer none): best visual of the given 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* GdkVisual*
gdk_visual_get_best_with_type (GdkVisualType visual_type) 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 * Returns: (nullable) (transfer none): best visual with both @depth
* and @visual_type, or %NULL if none * 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* GdkVisual*
gdk_visual_get_best_with_both (gint depth, gdk_visual_get_best_with_both (gint depth,
@ -229,6 +251,9 @@ gdk_visual_get_best_with_both (gint depth,
* visual, removing duplicates. * visual, removing duplicates.
* *
* The array returned by this function should not be freed. * 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 void
gdk_query_depths (gint **depths, gdk_query_depths (gint **depths,
@ -251,6 +276,9 @@ gdk_query_depths (gint **depths,
* visual, removing duplicates. * visual, removing duplicates.
* *
* The array returned by this function should not be freed. * 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 void
gdk_query_visual_types (GdkVisualType **visual_types, gdk_query_visual_types (GdkVisualType **visual_types,

View File

@ -82,30 +82,30 @@ typedef enum
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
GType gdk_visual_get_type (void) G_GNUC_CONST; 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); gint gdk_visual_get_best_depth (void);
GDK_AVAILABLE_IN_ALL GDK_DEPRECATED_IN_3_22
GdkVisualType gdk_visual_get_best_type (void); 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); GdkVisual* gdk_visual_get_system (void);
GDK_AVAILABLE_IN_ALL GDK_DEPRECATED_IN_3_22
GdkVisual* gdk_visual_get_best (void); GdkVisual* gdk_visual_get_best (void);
GDK_AVAILABLE_IN_ALL GDK_DEPRECATED_IN_3_22
GdkVisual* gdk_visual_get_best_with_depth (gint depth); 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); 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, GdkVisual* gdk_visual_get_best_with_both (gint depth,
GdkVisualType visual_type); GdkVisualType visual_type);
GDK_AVAILABLE_IN_ALL GDK_DEPRECATED_IN_3_22
void gdk_query_depths (gint **depths, void gdk_query_depths (gint **depths,
gint *count); gint *count);
GDK_AVAILABLE_IN_ALL GDK_DEPRECATED_IN_3_22
void gdk_query_visual_types (GdkVisualType **visual_types, void gdk_query_visual_types (GdkVisualType **visual_types,
gint *count); gint *count);
GDK_AVAILABLE_IN_ALL GDK_DEPRECATED_IN_3_22_FOR(gdk_screen_list_visuals)
GList* gdk_list_visuals (void); GList* gdk_list_visuals (void);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL