diff options
author | Benjamin Otte <otte@redhat.com> | 2010-08-14 06:46:25 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-09-26 15:02:59 +0200 |
commit | a7fec8cf46cd74db13d1de710011d6afa1b0a7d6 (patch) | |
tree | be0004ba598c8d9357aebc96a0706436cbaca030 /gdk | |
parent | 806a7239aef9f20f06391ca01e991afd79b27874 (diff) | |
download | gtk+-a7fec8cf46cd74db13d1de710011d6afa1b0a7d6.tar.gz |
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().
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/gdk.symbols | 2 | ||||
-rw-r--r-- | gdk/gdkwindow.c | 108 | ||||
-rw-r--r-- | gdk/gdkwindow.h | 8 |
3 files changed, 3 insertions, 115 deletions
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols index 9d048fe15c..e694ee28c5 100644 --- a/gdk/gdk.symbols +++ b/gdk/gdk.symbols @@ -594,11 +594,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 339a935ce3..8ac96356a0 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -7677,55 +7677,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 @@ -7733,8 +7684,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 @@ -7866,7 +7816,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 @@ -7881,58 +7831,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 @@ -8048,7 +7946,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 2724c05c20..6e44defd2a 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, |