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

misc fixes



The attached patch fixes some API bugs and implements two new functions.
Feel free to verify, correct & apply.

There is some other similar small breakage, but I forgot to fix that when
I encountered them. I'll probably stumble over it again, though, so no
hurry :)

-- 
                The choice of a
      -----==-     _GNU_
      ----==-- _       generation     Marc Lehmann
      ---==---(_)__  __ ____  __      pcg goof com
      --==---/ / _ \/ // /\ \/ /      http://schmorp.de/
      -=====/_/_//_/\_,_/ /_/\_\      XX11-RIPE
? blibdirs
? blibdirs.ts
? misc.diff
? pm_to_blib.ts
Index: ChangeLog
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/ChangeLog,v
retrieving revision 1.634
diff -u -p -r1.634 ChangeLog
--- ChangeLog	18 Sep 2005 15:07:18 -0000	1.634
+++ ChangeLog	24 Sep 2005 16:05:39 -0000
@@ -1,3 +1,12 @@
+2005/09/24 18:07 pcg
+
+	* xs/GdkEvent.xs: gdk_event_get_time allows NULL.
+	* xs/GdkGC.xs: allow NULL for gdk_gc_set_clip_region and
+	  gdk_gc_set_clip_region.
+	* xs/GdkGC.xs: similar for gdk_gc_set_clip_mask.
+	* xs/GdkX11.xs: implement gdk_x11_screen_supports_net_wm_hint and
+	  gdk_net_wm_supports.
+
 2005/09/18	kaffeetisch
 
 	* t/GtkComboBox.t, xs/GtkComboBox.xs: Only add Gtk2::CellEditable
Index: xs/GdkEvent.xs
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GdkEvent.xs,v
retrieving revision 1.44
diff -u -p -r1.44 GdkEvent.xs
--- xs/GdkEvent.xs	18 Sep 2005 15:07:22 -0000	1.44
+++ xs/GdkEvent.xs	24 Sep 2005 16:05:40 -0000
@@ -432,17 +432,17 @@ gdk_event_copy (event)
  ## guint32 gdk_event_get_time (GdkEvent *event)
 guint
 gdk_event_get_time (event, ...)
-	GdkEvent *event
+	GdkEvent_ornull *event
     ALIAS:
 	Gtk2::Gdk::Event::time = 1
 	Gtk2::Gdk::Event::set_time = 2
     CODE:
 	if (ix == 0 && items != 1)
 		croak ("Usage:  Gtk2::Gdk::Event::get_time (event)");
-	if (ix == 2 && items != 2)
+	if (ix == 2 && items != 2 && !event)
 		croak ("Usage:  Gtk2::Gdk::Event::set_time (event, newtime)");
 	RETVAL = gdk_event_get_time (event);
-	if (items == 2 || ix == 2) {
+	if ((items == 2 || ix == 2) && event) {
 		/* set */
 		gtk2perl_gdk_event_set_time (event, SvIV (ST (1)));
 	}
Index: xs/GdkGC.xs
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GdkGC.xs,v
retrieving revision 1.19
diff -u -p -r1.19 GdkGC.xs
--- xs/GdkGC.xs	19 Apr 2004 19:20:51 -0000	1.19
+++ xs/GdkGC.xs	24 Sep 2005 16:05:41 -0000
@@ -273,19 +273,19 @@ gdk_gc_set_clip_mask (gc, mask)
 	GdkGC *gc
 	SV *mask
     CODE:
-	gdk_gc_set_clip_mask (gc, SvGdkBitmap (mask));
+	gdk_gc_set_clip_mask (gc, SvGdkBitmap_ornull (mask));
 
  ## void gdk_gc_set_clip_rectangle (GdkGC *gc, GdkRectangle *rectangle)
 void
 gdk_gc_set_clip_rectangle (gc, rectangle)
 	GdkGC *gc
-	GdkRectangle *rectangle
+	GdkRectangle_ornull *rectangle
 
  ## void gdk_gc_set_clip_region (GdkGC *gc, GdkRegion *region)
 void
 gdk_gc_set_clip_region (gc, region)
 	GdkGC *gc
-	GdkRegion *region
+	GdkRegion_ornull *region
 
  ## void gdk_gc_set_subwindow (GdkGC *gc, GdkSubwindowMode mode)
 void
Index: xs/GdkX11.xs
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GdkX11.xs,v
retrieving revision 1.7
diff -u -p -r1.7 GdkX11.xs
--- xs/GdkX11.xs	18 Sep 2005 15:07:22 -0000	1.7
+++ xs/GdkX11.xs	24 Sep 2005 16:05:41 -0000
@@ -102,7 +102,7 @@ UV gdk_x11_drawable_get_xid (GdkDrawable
 
 MODULE = Gtk2::Gdk::X11	PACKAGE = Gtk2::Gdk::X11	PREFIX = gdk_x11_
 
-#if defined(GDK_WINDOWING_X11) && !defined(GDK_MULTIHEAD_SAFE)
+#ifdef GDK_WINDOWING_X11
 
 ###ifndef GDK_MULTIHEAD_SAFE
 
@@ -124,10 +124,22 @@ MODULE = Gtk2::Gdk::X11	PACKAGE = Gtk2::
 ##
 ##/* returns TRUE if we support the given WM spec feature */
 ##gboolean gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen, GdkAtom property);
+
+gboolean
+gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen, GdkAtom property)
+
 ##
 ###ifndef GDK_MULTIHEAD_SAFE
 ##gpointer gdk_xid_table_lookup (XID xid);
-##gboolean gdk_net_wm_supports (GdkAtom property);
+##gboolean gdk_net_wm_supports (GdkAtom property)
+
+#ifndef GDK_MULTIHEAD_SAFE
+
+gboolean
+gdk_net_wm_supports (GdkAtom property)
+
+#endif
+
 ##void gdk_x11_grab_server (void);
 ##void gdk_x11_ungrab_server (void);
 ###endif


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