[perl-Gtk2] GtkWidget: allow undef in a few places



commit f1f8a39fd5d6a77186bcc04cb7ecdff9c84948d3
Author: Quentin Sculo <squentin free fr>
Date:   Thu Apr 22 21:39:40 2010 +0200

    GtkWidget: allow undef in a few places
    
    set_accel_path : allow undef for accel_path and accel_group
    shape_combine_mask : allow undef for bitmap mask

 t/GtkWidget.t   |    2 ++
 xs/GtkWidget.xs |    6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/t/GtkWidget.t b/t/GtkWidget.t
index 21384f1..bda6de2 100644
--- a/t/GtkWidget.t
+++ b/t/GtkWidget.t
@@ -92,6 +92,7 @@ use Gtk2::Gdk::Keysyms;
 my $accel_group = Gtk2::AccelGroup->new;
 $widget->add_accelerator ("activate", $accel_group, $Gtk2::Gdk::Keysyms{ Return }, qw/shift-mask/, qw/visible/);
 $widget->set_accel_path ("<gtk2perl>/Bla", $accel_group);
+$widget->set_accel_path (undef,undef);
 $widget->remove_accelerator ($accel_group, $Gtk2::Gdk::Keysyms{ Return }, qw/shift-mask/);
 
 isa_ok ($widget->intersect (Gtk2::Gdk::Rectangle->new (0, 0, 10000, 10000)),
@@ -373,6 +374,7 @@ my $bitmap = Gtk2::Gdk::Bitmap->create_from_data ($win->window, "", 1, 1);
 
 $win->realize;
 $widget->shape_combine_mask ($bitmap, 5, 5);
+$widget->shape_combine_mask (undef, 5, 5);
 
 SKIP: {
 	skip "stuff that's new in 2.2", 5
diff --git a/xs/GtkWidget.xs b/xs/GtkWidget.xs
index 45a0648..0747802 100644
--- a/xs/GtkWidget.xs
+++ b/xs/GtkWidget.xs
@@ -631,8 +631,8 @@ gtk_widget_remove_accelerator (widget, accel_group, accel_key, accel_mods)
 void
 gtk_widget_set_accel_path (widget, accel_path, accel_group)
 	GtkWidget     * widget
-	const gchar   * accel_path
-	GtkAccelGroup * accel_group
+	const gchar_ornull   * accel_path
+	GtkAccelGroup_ornull * accel_group
 
  #GList*     gtk_widget_list_accel_closures (GtkWidget	       *widget);
 
@@ -1090,7 +1090,7 @@ gtk_widget_get_default_direction (class);
 
  #/* Counterpart to gdk_window_shape_combine_mask.
  # */
-void gtk_widget_shape_combine_mask (GtkWidget *widget, GdkBitmap *shape_mask, gint offset_x, gint offset_y);
+void gtk_widget_shape_combine_mask (GtkWidget *widget, GdkBitmap_ornull *shape_mask, gint offset_x, gint offset_y);
 
 
 



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