[gtk+] API: Remove window clear APIs



commit 6c971ac47948c8e2b85d710b8496d442cd572840
Author: Benjamin Otte <otte redhat com>
Date:   Mon Sep 20 12:14:25 2010 +0200

    API: Remove window clear APIs
    
    The feature can and should be implemented manually using
    gdk_window_get_background() and Cairo drawing. A non-cairo drawing API
    does not make sense in GDK anymore.

 docs/reference/gdk/gdk3-sections.txt |    2 -
 gdk/gdk.symbols                      |    2 -
 gdk/gdkwindow.c                      |   63 +---------------------------------
 gdk/gdkwindow.h                      |    6 ---
 4 files changed, 1 insertions(+), 72 deletions(-)
---
diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt
index 38f0069..412663b 100644
--- a/docs/reference/gdk/gdk3-sections.txt
+++ b/docs/reference/gdk/gdk3-sections.txt
@@ -372,8 +372,6 @@ gdk_window_flush
 gdk_window_has_native
 gdk_window_ensure_native
 gdk_window_reparent
-gdk_window_clear
-gdk_window_clear_area
 gdk_window_raise
 gdk_window_lower
 gdk_window_restack
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index c62d646..e8cad5e 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -587,8 +587,6 @@ gdk_window_at_pointer
 #endif
 gdk_window_begin_paint_rect
 gdk_window_begin_paint_region
-gdk_window_clear
-gdk_window_clear_area
 gdk_window_constrain_size
 gdk_window_coords_from_parent
 gdk_window_coords_to_parent
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 9d56299..2a5ade8 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3572,25 +3572,6 @@ gdk_window_clear_backing_region_direct (GdkWindow *window,
 }
 
 
-/**
- * gdk_window_clear:
- * @window: a #GdkWindow
- *
- * Clears an entire @window to the background pattern.
- **/
-void
-gdk_window_clear (GdkWindow *window)
-{
-  gint width, height;
-
-  g_return_if_fail (GDK_IS_WINDOW (window));
-
-  gdk_drawable_get_size (GDK_DRAWABLE (window), &width, &height);
-
-  gdk_window_clear_area (window, 0, 0,
-			 width, height);
-}
-
 static void
 gdk_window_clear_region_internal (GdkWindow *window,
 				  cairo_region_t *region)
@@ -3603,47 +3584,6 @@ gdk_window_clear_region_internal (GdkWindow *window,
     gdk_window_clear_backing_region_direct (window, region);
 }
 
-/**
- * gdk_window_clear_area:
- * @window: a #GdkWindow
- * @x: x coordinate of rectangle to clear
- * @y: y coordinate of rectangle to clear
- * @width: width of rectangle to clear
- * @height: height of rectangle to clear
- *
- * Clears an area of @window to the background pattern.
- **/
-void
-gdk_window_clear_area (GdkWindow *window,
-		       gint       x,
-		       gint       y,
-		       gint       width,
-		       gint       height)
-{
-  GdkRectangle rect;
-  cairo_region_t *region;
-
-  g_return_if_fail (GDK_IS_WINDOW (window));
-
-  if (GDK_WINDOW_DESTROYED (window))
-    return;
-
-  /* Terminate early to avoid weird interpretation of
-     zero width/height by XClearArea */
-  if (width == 0 || height == 0)
-    return;
-
-  rect.x = x;
-  rect.y = y;
-  rect.width = width;
-  rect.height = height;
-
-  region = cairo_region_create_rectangle (&rect);
-  gdk_window_clear_region_internal (window,
-				    region);
-  cairo_region_destroy (region);
-}
-
 static void
 gdk_window_real_get_size (GdkDrawable *drawable,
 			  gint *width,
@@ -6705,8 +6645,7 @@ gdk_window_set_background (GdkWindow      *window,
  * background form its parent window.
  *
  * The windowing system will normally fill a window with its background
- * when the window is obscured then exposed, and when you call
- * gdk_window_clear().
+ * when the window is obscured then exposed.
  */
 void
 gdk_window_set_background_pattern (GdkWindow *window,
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h
index 9956795..84fc1e8 100644
--- a/gdk/gdkwindow.h
+++ b/gdk/gdkwindow.h
@@ -527,12 +527,6 @@ void          gdk_window_reparent              (GdkWindow     *window,
                                                 GdkWindow     *new_parent,
                                                 gint           x,
                                                 gint           y);
-void          gdk_window_clear                 (GdkWindow     *window);
-void          gdk_window_clear_area            (GdkWindow     *window,
-                                                gint           x,
-                                                gint           y,
-                                                gint           width,
-                                                gint           height);
 void          gdk_window_raise                 (GdkWindow     *window);
 void          gdk_window_lower                 (GdkWindow     *window);
 void          gdk_window_restack               (GdkWindow     *window,



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