[perl-Gtk2] GdkWindow: allow undef in a few places
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk2] GdkWindow: allow undef in a few places
- Date: Sat, 24 Apr 2010 21:43:47 +0000 (UTC)
commit 3f5a410923cbdea511668c36605612c6de095911
Author: Quentin Sculo <squentin free fr>
Date: Thu Apr 22 21:33:57 2010 +0200
GdkWindow: allow undef in a few places
invalidate_rect : allow undef for rectangle
set_icon_name : allow undef for name
input_shape_combine_mask, shape_combine_mask :
allow undef for bitmap mask
input_shape_combine_region, shape_combine_region :
allow undef for region
t/GdkWindow.t | 13 ++++++++++++-
xs/GdkWindow.xs | 14 +++++++-------
2 files changed, 19 insertions(+), 8 deletions(-)
---
diff --git a/t/GdkWindow.t b/t/GdkWindow.t
index 31fc298..4b58b68 100644
--- a/t/GdkWindow.t
+++ b/t/GdkWindow.t
@@ -155,6 +155,7 @@ $window_two -> begin_paint_region($region);
$window_two -> end_paint();
$window_two -> invalidate_rect($rectangle, 1);
+$window_two -> invalidate_rect(undef, 1);
$window_two -> invalidate_region($region, 1);
# FIXME: never called?
@@ -186,6 +187,11 @@ my $bitmap = Gtk2::Gdk::Bitmap->create_from_data ($window, "", 1, 1);
$window -> shape_combine_mask($bitmap, 5, 5);
$window -> shape_combine_region($region, 1, 1);
+# test with undef
+$window -> shape_combine_mask(undef, 0, 0);
+$window -> shape_combine_region(undef, 0, 0);
+
+
$window -> set_child_shapes();
$window -> merge_child_shapes();
$window -> set_static_gravities(0); # FIXME: check retval?
@@ -223,7 +229,11 @@ SKIP: {
$window -> merge_child_input_shapes();
$window -> input_shape_combine_mask($bitmap, 23, 42);
$window -> input_shape_combine_region($region, 23, 42);
-
+
+ # test with undef
+ $window -> input_shape_combine_mask(undef, 0,0);
+ $window -> input_shape_combine_region(undef, 0,0);
+
}
SKIP: {
@@ -261,6 +271,7 @@ isa_ok($window -> get_events(), "Gtk2::Gdk::EventMask");
$window_three -> set_icon(undef, undef, undef);
$window -> set_icon_name("Wheeee");
+$window -> set_icon_name(undef);
$window -> set_transient_for($window_three);
$window -> set_role("Playa");
$window_three -> set_group($window_three);
diff --git a/xs/GdkWindow.xs b/xs/GdkWindow.xs
index 1ebbce6..8ceea10 100644
--- a/xs/GdkWindow.xs
+++ b/xs/GdkWindow.xs
@@ -346,13 +346,13 @@ gdk_window_scroll (window, dx, dy)
gint dx
gint dy
-void gdk_window_shape_combine_mask (GdkWindow * window, GdkBitmap * mask, gint x, gint y);
+void gdk_window_shape_combine_mask (GdkWindow * window, GdkBitmap_ornull * mask, gint x, gint y);
## void gdk_window_shape_combine_region (GdkWindow *window, GdkRegion *shape_region, gint offset_x, gint offset_y)
void
gdk_window_shape_combine_region (window, shape_region, offset_x, offset_y)
GdkWindow *window
- GdkRegion *shape_region
+ GdkRegion_ornull *shape_region
gint offset_x
gint offset_y
@@ -691,7 +691,7 @@ gdk_window_set_icon (window, icon_window, pixmap, mask)
void
gdk_window_set_icon_name (window, name)
GdkWindow *window
- const gchar *name
+ const gchar_ornull *name
#if GTK_CHECK_VERSION (2, 4, 0)
@@ -709,7 +709,7 @@ GdkWindow * gdk_window_get_group (GdkWindow * window)
void
gdk_window_set_group (window, leader)
GdkWindow *window
- GdkWindow *leader
+ GdkWindow_ornull *leader
## void gdk_window_set_decorations (GdkWindow *window, GdkWMDecoration decorations)
void
@@ -824,7 +824,7 @@ gdk_window_begin_move_drag (window, button, root_x, root_y, timestamp)
void
gdk_window_invalidate_rect (window, rectangle, invalidate_children)
GdkWindow * window
- GdkRectangle * rectangle
+ GdkRectangle_ornull * rectangle
gboolean invalidate_children
## void gdk_window_invalidate_region (GdkWindow *window, GdkRegion *region, gboolean invalidate_children)
@@ -920,9 +920,9 @@ void gdk_window_move_region (GdkWindow *window, GdkRegion *region, gint dx, gint
GdkWindowTypeHint gdk_window_get_type_hint (GdkWindow *window);
-void gdk_window_input_shape_combine_mask (GdkWindow * window, GdkBitmap *mask, gint x, gint y);
+void gdk_window_input_shape_combine_mask (GdkWindow * window, GdkBitmap_ornull *mask, gint x, gint y);
-void gdk_window_input_shape_combine_region (GdkWindow * window, GdkRegion *shape, gint offset_x, gint offset_y);
+void gdk_window_input_shape_combine_region (GdkWindow * window, GdkRegion_ornull *shape, gint offset_x, gint offset_y);
void gdk_window_set_child_input_shapes (GdkWindow *window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]