anchor.diff:  ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
   ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
   
  -;; $Id: gcallback.lisp,v 1.35 2006-06-07 13:16:11 espen Exp $
  +;; $Id: gcallback.lisp,v 1.36 2006-07-14 10:51:07 espen Exp $
   
   (in-package "GLIB")
   
  
positive.code: 		for offset from 0 by +gvalue-size+
  		collect (gvalue-peek (pointer+ param-values offset)))))
      (unwind-protect
  	(let ((result (apply #'invoke-callback callback-id return-type args)))
  	  (when return-type
  	    (gvalue-set return-value result)))
        ;; TODO: this should be made more general, by adding a type
        ;; method to return invalidate functions.
        (loop 
         for arg in args
         when (typep arg 'struct)
         do (invalidate-instance arg)))))
  
  
  (defun invoke-callback (callback-id return-type &rest args)
    (restart-case
        (apply (find-user-data callback-id) args)
      (continue nil :report "Return from callback function"
  	      (when return-type
  		(format *query-io* "Enter return value of type ~S: " return-type)
  		(force-output *query-io*)
  		(eval (read *query-io*))))
      (re-invoke nil :report "Re-invoke callback function"
  	       (apply #'invoke-callback callback-id return-type args))))
  
  
  ;;;; Timeouts and idle functions
  
negative.code:   (deftype signal-flags () 
      '(flags :run-first :run-last :run-cleanup :no-recurse 
  	    :detailed :action :no-hooks))
  
    (define-flags-type signal-match-type
      :id :detail :closure :func :data :unblocked)
  
    (defclass signal-query (struct)
      ((id :allocation :alien :type unsigned-int)
  