perl-Glib r1036 - trunk



Author: tsch
Date: Sat Nov  1 18:55:45 2008
New Revision: 1036
URL: http://svn.gnome.org/viewvc/perl-Glib?rev=1036&view=rev

Log:
Add constants Glib::SOURCE_CONTINUE and SOURCE_REMOVE for use in source-type
callbacks.  Patch by Kevin Ryde.


Modified:
   trunk/ChangeLog
   trunk/GMainLoop.xs
   trunk/Glib.pm

Modified: trunk/GMainLoop.xs
==============================================================================
--- trunk/GMainLoop.xs	(original)
+++ trunk/GMainLoop.xs	Sat Nov  1 18:55:45 2008
@@ -187,6 +187,16 @@
 play nicely together.  It is no longer necessary to install a timeout to
 ensure that async signals get handled in a timely manner.
 
+=head1 CONSTANTS
+
+C<SOURCE_REMOVE> and C<SOURCE_CONTINUE> are designed for use as the
+return values from timeout, idle and I/O watch source functions.  They
+return true to keep running or false to remove themselves.  These
+constants can help you get that the right way around.
+
+    Glib::SOURCE_CONTINUE     # true
+    Glib::SOURCE_REMOVE       # false
+
 =cut
  
  #####################

Modified: trunk/Glib.pm
==============================================================================
--- trunk/Glib.pm	(original)
+++ trunk/Glib.pm	Sat Nov  1 18:55:45 2008
@@ -36,6 +36,9 @@
 	G_PRIORITY_DEFAULT_IDLE =>  200,
 	G_PRIORITY_LOW	        =>  300,
 	G_PARAM_READWRITE       => [qw/readable writable/],
+
+	SOURCE_CONTINUE         => 1,
+	SOURCE_REMOVE           => !1,
 };
 
 # export nothing by default.



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