[gtk+] Deprecate the gdk_window_begin/end_paint family of functions



commit c5d0522a23fbeaccb4b7301df896012fb5288650
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Jun 7 16:40:43 2016 +0100

    Deprecate the gdk_window_begin/end_paint family of functions
    
    They are replaced by the more appropriate gdk_window_begin_draw_frame()
    and gdk_window_end_draw_frame() functions.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=766675

 gdk/gdkwindow.c |    8 +++++---
 gdk/gdkwindow.h |    6 +++---
 gtk/gtkwidget.c |    8 ++++----
 3 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 0f3e222..c9f043d 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -2949,7 +2949,7 @@ gdk_window_end_paint_internal (GdkWindow *window)
 
   if (window->current_paint.surface == NULL)
     {
-      g_warning (G_STRLOC": no preceding call to gdk_window_begin_paint_region(), see documentation");
+      g_warning (G_STRLOC": no preceding call to gdk_window_begin_draw_frame(), see documentation");
       return;
     }
 
@@ -3043,7 +3043,8 @@ gdk_window_end_paint_internal (GdkWindow *window)
  * creates a rectangular region for you. See
  * gdk_window_begin_paint_region() for details.
  *
- **/
+ * Deprecated: 3.22: Use gdk_window_begin_draw_frame() instead
+ */
 void
 gdk_window_begin_paint_rect (GdkWindow          *window,
                             const GdkRectangle *rectangle)
@@ -3101,7 +3102,8 @@ gdk_window_begin_paint_rect (GdkWindow          *window,
  * gdk_window_end_paint() is required for each call to
  * gdk_window_begin_paint_region().
  *
- **/
+ * Deprecated: 3.22: Use gdk_window_begin_draw_frame() instead
+ */
 void
 gdk_window_begin_paint_region (GdkWindow            *window,
                               const cairo_region_t *region)
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h
index 463cd4f..4d98e07 100644
--- a/gdk/gdkwindow.h
+++ b/gdk/gdkwindow.h
@@ -694,16 +694,16 @@ GDK_AVAILABLE_IN_ALL
 cairo_region_t *gdk_window_get_visible_region(GdkWindow         *window);
 
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_22_FOR(gdk_window_begin_draw_frame)
 void         gdk_window_begin_paint_rect   (GdkWindow          *window,
                                             const GdkRectangle *rectangle);
 GDK_AVAILABLE_IN_3_16
 void         gdk_window_mark_paint_from_clip (GdkWindow          *window,
                                               cairo_t            *cr);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_22_FOR(gdk_window_begin_draw_frame)
 void         gdk_window_begin_paint_region (GdkWindow          *window,
                                             const cairo_region_t    *region);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_22_FOR(gdk_window_end_draw_frame)
 void         gdk_window_end_paint          (GdkWindow          *window);
 
 GDK_AVAILABLE_IN_3_22
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 313a425..f9a37c6 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -9294,10 +9294,10 @@ gtk_widget_get_app_paintable (GtkWidget *widget)
  *
  * Widgets are double buffered by default; you can use this function
  * to turn off the buffering. “Double buffered” simply means that
- * gdk_window_begin_paint_region() and gdk_window_end_paint() are called
+ * gdk_window_begin_draw_frame() and gdk_window_end_draw_frame() are called
  * automatically around expose events sent to the
- * widget. gdk_window_begin_paint_region() diverts all drawing to a widget's
- * window to an offscreen buffer, and gdk_window_end_paint() draws the
+ * widget. gdk_window_begin_draw_frame() diverts all drawing to a widget's
+ * window to an offscreen buffer, and gdk_window_end_draw_frame() draws the
  * buffer to the screen. The result is that users see the window
  * update in one smooth step, and don’t see individual graphics
  * primitives being rendered.
@@ -9309,7 +9309,7 @@ gtk_widget_get_app_paintable (GtkWidget *widget)
  * Note: if you turn off double-buffering, you have to handle
  * expose events, since even the clearing to the background color or
  * pixmap will not happen automatically (as it is done in
- * gdk_window_begin_paint_region()).
+ * gdk_window_begin_draw_frame()).
  *
  * In 3.10 GTK and GDK have been restructured for translucent drawing. Since
  * then expose events for double-buffered widgets are culled into a single


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