/[mcclim]/mcclim/input.lisp
ViewVC logotype

Diff of /mcclim/input.lisp

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

revision 1.6 by gilbert, Sat Feb 16 02:48:22 2002 UTC revision 1.7 by mikemac, Sat Feb 23 23:25:59 2002 UTC
# Line 71  Line 71 
71            (t            (t
72             (push item (event-queue-head eq))))))             (push item (event-queue-head eq))))))
73    
74    (defmethod event-queue-peek ((eq standard-event-queue))
75      (with-lock-held ((event-queue-lock eq))
76        (first (event-queue-head eq))))
77    
78  (defmethod event-queue-peek-if (predicate (eq standard-event-queue))  (defmethod event-queue-peek-if (predicate (eq standard-event-queue))
79    "Goes thru the whole event queue an returns the first event, which    "Goes thru the whole event queue an returns the first event, which
80     satisfies 'predicate' and leaves the event in the queue.     satisfies 'predicate' and leaves the event in the queue.
# Line 84  Line 88 
88  ;; STANDARD-SHEET-INPUT-MIXIN  ;; STANDARD-SHEET-INPUT-MIXIN
89    
90  (defclass standard-sheet-input-mixin ()  (defclass standard-sheet-input-mixin ()
91    ((queue :initform (make-instance 'standard-event-queue))    ((queue :initform (make-instance 'standard-event-queue)
92              :reader sheet-event-queue)
93     (port :initform nil     (port :initform nil
94           :initarg :port           :initarg :port
95           :reader port)           :reader port)
96     ))     ))
97    
98  (defmethod dispatch-event ((sheet standard-sheet-input-mixin) event)  (defmethod stream-input-buffer ((stream standard-sheet-input-mixin))
99    (if (typep event 'device-event)    (sheet-event-queue stream))
       (queue-event sheet event)  
     (handle-event sheet event)))  
100    
101  (defmethod dispatch-event ((sheet standard-sheet-input-mixin) (event device-event))  ;(defmethod dispatch-event ((sheet standard-sheet-input-mixin) event)
102    (queue-event sheet event))  ;  (if (typep event 'device-event)
103    ;      (queue-event sheet event)
104    ;    (handle-event sheet event)))
105    
106  (defmethod dispatch-event ((sheet standard-sheet-input-mixin) event)  (defmethod dispatch-event ((sheet standard-sheet-input-mixin) event)
107    (handle-event sheet event))    (handle-event sheet event))
108    
109    (defmethod dispatch-event ((sheet standard-sheet-input-mixin) (event device-event))
110      (queue-event sheet event))
111    
112  (defmethod queue-event ((sheet standard-sheet-input-mixin) event)  (defmethod queue-event ((sheet standard-sheet-input-mixin) event)
113    (with-slots (queue) sheet    (with-slots (queue) sheet
114      (event-queue-append queue event)))      (event-queue-append queue event)))

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.5