[gtk+/gtk-3-22] Deprecate the gdk_window_set_background* functions



commit 72baa374529f2b97a5f1040b1fa6c58901281520
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Oct 20 14:51:31 2016 -0400

    Deprecate the gdk_window_set_background* functions
    
    These functions are gone in GTK+ 4, so deprecate them here.

 gdk/gdkwindow.c      |   16 +++++++++++++---
 gdk/gdkwindow.h      |    8 ++++----
 gdk/x11/gdkdnd-x11.c |    2 ++
 3 files changed, 19 insertions(+), 7 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index cee66a2..924c83e 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3491,7 +3491,9 @@ gdk_window_clear_backing_region (GdkWindow *window)
 
   for (bg_window = window; bg_window; bg_window = bg_window->parent)
     {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       pattern = gdk_window_get_background_pattern (bg_window);
+G_GNUC_END_IGNORE_DEPRECATIONS
       if (pattern)
         break;
 
@@ -6356,9 +6358,7 @@ gdk_window_move_region (GdkWindow            *window,
  * gtk_style_context_set_background() — if you're implementing a
  * custom widget.
  *
- * See also gdk_window_set_background_pattern().
- *
- * Deprecated: 3.4: Use gdk_window_set_background_rgba() instead.
+ * Deprecated: 3.4: Don't use this function
  */
 void
 gdk_window_set_background (GdkWindow      *window,
@@ -6372,7 +6372,9 @@ gdk_window_set_background (GdkWindow      *window,
                                       color->green / 65535.,
                                       color->blue  / 65535.);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gdk_window_set_background_pattern (window, pattern);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   cairo_pattern_destroy (pattern);
 }
@@ -6385,6 +6387,8 @@ gdk_window_set_background (GdkWindow      *window,
  * Sets the background color of @window.
  *
  * See also gdk_window_set_background_pattern().
+ *
+ * Deprecated: 3.22: Don't use this function
  **/
 void
 gdk_window_set_background_rgba (GdkWindow     *window,
@@ -6413,7 +6417,9 @@ gdk_window_set_background_rgba (GdkWindow     *window,
   pattern = cairo_pattern_create_rgba (rgba->red, rgba->green,
                                        rgba->blue, rgba->alpha);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gdk_window_set_background_pattern (window, pattern);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   cairo_pattern_destroy (pattern);
 }
@@ -6431,6 +6437,8 @@ gdk_window_set_background_rgba (GdkWindow     *window,
  *
  * The windowing system will normally fill a window with its background
  * when the window is obscured then exposed.
+ *
+ * Deprecated: 3.22: Don't use this function
  */
 void
 gdk_window_set_background_pattern (GdkWindow       *window,
@@ -6468,6 +6476,8 @@ gdk_window_set_background_pattern (GdkWindow       *window,
  * background or %NULL to use the parent’s background.
  *
  * Since: 2.22
+ *
+ * Deprecated: 3.22: Don't use this function
  **/
 cairo_pattern_t *
 gdk_window_get_background_pattern (GdkWindow *window)
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h
index 8692499..8b8853e 100644
--- a/gdk/gdkwindow.h
+++ b/gdk/gdkwindow.h
@@ -771,16 +771,16 @@ void          gdk_window_set_startup_id    (GdkWindow     *window,
 GDK_AVAILABLE_IN_ALL
 void          gdk_window_set_transient_for (GdkWindow     *window,
                                            GdkWindow     *parent);
-GDK_DEPRECATED_IN_3_4_FOR(gdk_window_set_background_rgba)
+GDK_DEPRECATED_IN_3_4
 void         gdk_window_set_background  (GdkWindow       *window,
                                          const GdkColor  *color);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_22
 void          gdk_window_set_background_rgba (GdkWindow     *window,
                                               const GdkRGBA *rgba);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_22
 void         gdk_window_set_background_pattern (GdkWindow       *window,
                                                  cairo_pattern_t *pattern);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_22
 cairo_pattern_t *gdk_window_get_background_pattern (GdkWindow     *window);
 
 GDK_AVAILABLE_IN_ALL
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index ed2bedb..3600220 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -2636,7 +2636,9 @@ gdk_x11_drag_context_drop_done (GdkDragContext *context,
 
   pattern = cairo_pattern_create_for_surface (surface);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gdk_window_set_background_pattern (x11_context->drag_window, pattern);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   cairo_pattern_destroy (pattern);
   cairo_surface_destroy (surface);


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