[gtk+/rendering-cleanup: 34/142] API: Remove shape_combine_mask functions from gdk



commit d5281ea1c24af01e4bc8a570f733e2b5ae59feea
Author: Benjamin Otte <otte redhat com>
Date:   Sat Aug 14 06:46:25 2010 +0200

    API: Remove shape_combine_mask functions from gdk
    
    This removes gdk_window_shape_combine_mask() and
    gdk_window_input_shape_combine_mask(). GdkBitmap is going away and a
    replacement exists via the combine_region() functions and
    gdk_cairo_region_create_from_surface().

 docs/reference/gdk/gdk3-sections.txt |    2 -
 gdk/gdk.symbols                      |    2 -
 gdk/gdkwindow.c                      |  108 +---------------------------------
 gdk/gdkwindow.h                      |    8 ---
 4 files changed, 3 insertions(+), 117 deletions(-)
---
diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt
index c1dc919..a8e5e13 100644
--- a/docs/reference/gdk/gdk3-sections.txt
+++ b/docs/reference/gdk/gdk3-sections.txt
@@ -465,11 +465,9 @@ gdk_window_remove_filter
 GdkFilterFunc
 GdkFilterReturn
 GdkXEvent
-gdk_window_shape_combine_mask
 gdk_window_shape_combine_region
 gdk_window_set_child_shapes
 gdk_window_merge_child_shapes
-gdk_window_input_shape_combine_mask
 gdk_window_input_shape_combine_region
 gdk_window_set_child_input_shapes
 gdk_window_merge_child_input_shapes
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index d2f7fb1..c39ccd3 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -593,11 +593,9 @@ gdk_window_has_native
 gdk_window_set_background
 gdk_window_set_back_pixmap
 gdk_window_set_cursor
-gdk_window_shape_combine_mask
 gdk_window_shape_combine_region
 gdk_window_set_child_shapes
 gdk_window_merge_child_shapes
-gdk_window_input_shape_combine_mask
 gdk_window_input_shape_combine_region
 gdk_window_set_child_input_shapes
 gdk_window_merge_child_input_shapes
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 6e75e06..0b67a79 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -7674,55 +7674,6 @@ gdk_window_coords_from_parent (GdkWindow *window,
 }
 
 /**
- * gdk_window_shape_combine_mask:
- * @window: a #GdkWindow
- * @mask: shape mask
- * @x: X position of shape mask with respect to @window
- * @y: Y position of shape mask with respect to @window
- *
- * Applies a shape mask to @window. Pixels in @window corresponding to
- * set bits in the @mask will be visible; pixels in @window
- * corresponding to unset bits in the @mask will be transparent. This
- * gives a non-rectangular window.
- *
- * If @mask is %NULL, the shape mask will be unset, and the @x/@y
- * parameters are not used.
- *
- * On the X11 platform, this uses an X server extension which is
- * widely available on most common platforms, but not available on
- * very old X servers, and occasionally the implementation will be
- * buggy. On servers without the shape extension, this function
- * will do nothing.
- *
- * This function works on both toplevel and child windows.
- */
-void
-gdk_window_shape_combine_mask (GdkWindow *window,
-			       GdkBitmap *mask,
-			       gint       x,
-			       gint       y)
-{
-  GdkWindowObject *private;
-  cairo_region_t *region;
-
-  g_return_if_fail (GDK_IS_WINDOW (window));
-
-  private = (GdkWindowObject *) window;
-
-  if (mask)
-    region = _gdk_windowing_get_shape_for_mask (mask);
-  else
-    region = NULL;
-
-  gdk_window_shape_combine_region (window,
-				   region,
-				   x, y);
-
-  if (region)
-    cairo_region_destroy (region);
-}
-
-/**
  * gdk_window_shape_combine_region:
  * @window: a #GdkWindow
  * @shape_region: region of window to be non-transparent
@@ -7730,8 +7681,7 @@ gdk_window_shape_combine_mask (GdkWindow *window,
  * @offset_y: Y position of @shape_region in @window coordinates
  *
  * Makes pixels in @window outside @shape_region be transparent,
- * so that the window may be nonrectangular. See also
- * gdk_window_shape_combine_mask() to use a bitmap as the mask.
+ * so that the window may be nonrectangular.
  *
  * If @shape_region is %NULL, the shape will be unset, so the whole
  * window will be opaque again. @offset_x and @offset_y are ignored
@@ -7863,7 +7813,7 @@ gdk_window_set_child_shapes (GdkWindow *window)
  * Merges the shape masks for any child windows into the
  * shape mask for @window. i.e. the union of all masks
  * for @window and its children will become the new mask
- * for @window. See gdk_window_shape_combine_mask().
+ * for @window. See gdk_window_shape_combine_region().
  *
  * This function is distinct from gdk_window_set_child_shapes()
  * because it includes @window's shape mask in the set of shapes to
@@ -7878,58 +7828,6 @@ gdk_window_merge_child_shapes (GdkWindow *window)
 }
 
 /**
- * gdk_window_input_shape_combine_mask:
- * @window: a #GdkWindow
- * @mask: (allow-none): shape mask, or %NULL
- * @x: X position of shape mask with respect to @window
- * @y: Y position of shape mask with respect to @window
- *
- * Like gdk_window_shape_combine_mask(), but the shape applies
- * only to event handling. Mouse events which happen while
- * the pointer position corresponds to an unset bit in the
- * mask will be passed on the window below @window.
- *
- * An input shape is typically used with RGBA windows.
- * The alpha channel of the window defines which pixels are
- * invisible and allows for nicely antialiased borders,
- * and the input shape controls where the window is
- * "clickable".
- *
- * On the X11 platform, this requires version 1.1 of the
- * shape extension.
- *
- * On the Win32 platform, this functionality is not present and the
- * function does nothing.
- *
- * Since: 2.10
- */
-void
-gdk_window_input_shape_combine_mask (GdkWindow *window,
-				     GdkBitmap *mask,
-				     gint       x,
-				     gint       y)
-{
-  GdkWindowObject *private;
-  cairo_region_t *region;
-
-  g_return_if_fail (GDK_IS_WINDOW (window));
-
-  private = (GdkWindowObject *) window;
-
-  if (mask)
-    region = _gdk_windowing_get_shape_for_mask (mask);
-  else
-    region = NULL;
-
-  gdk_window_input_shape_combine_region (window,
-					 region,
-					 x, y);
-
-  if (region != NULL)
-    cairo_region_destroy (region);
-}
-
-/**
  * gdk_window_input_shape_combine_region:
  * @window: a #GdkWindow
  * @shape_region: region of window to be non-transparent
@@ -8045,7 +7943,7 @@ gdk_window_set_child_input_shapes (GdkWindow *window)
  * Merges the input shape masks for any child windows into the
  * input shape mask for @window. i.e. the union of all input masks
  * for @window and its children will become the new input mask
- * for @window. See gdk_window_input_shape_combine_mask().
+ * for @window. See gdk_window_input_shape_combine_region().
  *
  * This function is distinct from gdk_window_set_child_input_shapes()
  * because it includes @window's input shape mask in the set of
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h
index 2724c05..6e44def 100644
--- a/gdk/gdkwindow.h
+++ b/gdk/gdkwindow.h
@@ -575,10 +575,6 @@ gboolean      gdk_window_ensure_native        (GdkWindow       *window);
  * This allows for making shaped (partially transparent) windows
  * - cool feature, needed for Drag and Drag for example.
  */
-void gdk_window_shape_combine_mask  (GdkWindow	      *window,
-                                     GdkBitmap	      *mask,
-                                     gint	       x,
-                                     gint	       y);
 void gdk_window_shape_combine_region (GdkWindow	      *window,
                                       const cairo_region_t *shape_region,
                                       gint	       offset_x,
@@ -606,10 +602,6 @@ void gdk_window_set_composited   (GdkWindow *window,
  */
 void gdk_window_merge_child_shapes         (GdkWindow       *window);
 
-void gdk_window_input_shape_combine_mask   (GdkWindow       *window,
-					    GdkBitmap       *mask,
-					    gint             x,
-					    gint             y);
 void gdk_window_input_shape_combine_region (GdkWindow       *window,
                                             const cairo_region_t *shape_region,
                                             gint             offset_x,



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