/[cmucl]/src/code/serve-event.lisp
ViewVC logotype

Diff of /src/code/serve-event.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by ram, Thu Feb 22 10:41:18 1990 UTC revision 1.2 by ram, Thu Mar 8 11:03:55 1990 UTC
# Line 18  Line 18 
18  (export '(with-fd-handler add-fd-handler remove-fd-handler invalidate-descriptor  (export '(with-fd-handler add-fd-handler remove-fd-handler invalidate-descriptor
19            serve-event serve-all-events wait-until-fd-usable))            serve-event serve-all-events wait-until-fd-usable))
20    
21    (in-package "EXTENSIONS")
22    
23    (export '(*display-event-handlers*))
24    
25  (in-package "LISP")  (in-package "LISP")
26    
27    
# Line 243  Line 247 
247    
248  ;;;; Serve-all-events, serve-event, and friends.  ;;;; Serve-all-events, serve-event, and friends.
249    
250    (defvar *display-event-handlers* nil
251      "This is an alist mapping displays to user functions to be called when
252       SYSTEM:SERVE-EVENT notices input on a display connection.  Do not modify
253       this directly; use EXT:ENABLE-CLX-EVENT-HANDLING.  A given display
254       should be represented here only once.")
255    
256  ;;; SERVE-ALL-EVENTS -- public  ;;; SERVE-ALL-EVENTS -- public
257  ;;;  ;;;
258  ;;;   Wait for up to timeout seconds for an event to happen. Make sure all  ;;;   Wait for up to timeout seconds for an event to happen. Make sure all
# Line 258  Line 268 
268        ((null sval) res)        ((null sval) res)
269      (setq res t)))      (setq res t)))
270    
271    
272  ;;; SERVE-EVENT -- public  ;;; SERVE-EVENT -- public
273  ;;;  ;;;
274  ;;;   Serve a single event.  ;;;   Serve a single event.
# Line 268  Line 279 
279    seconds) and then return, otherwise it will wait until something happens.    seconds) and then return, otherwise it will wait until something happens.
280    Server returns T if something happened and NIL otherwise."    Server returns T if something happened and NIL otherwise."
281    ;; First, check any X displays for any pending events.    ;; First, check any X displays for any pending events.
282    (dolist (d/h ext::*display-event-handlers*)    (dolist (d/h *display-event-handlers*)
283      (let ((d (car d/h)))      (let ((d (car d/h)))
284        (when (xlib::event-listen d)        (when (xlib::event-listen d)
285          (handler-bind ((error #'(lambda (condx)          (handler-bind ((error #'(lambda (condx)

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.5