diff --git a/scheme/xlib/event.scm b/scheme/xlib/event.scm index e824c86..7638d0f 100644 --- a/scheme/xlib/event.scm +++ b/scheme/xlib/event.scm @@ -8,14 +8,15 @@ (vector-set! args idx (func (vector-ref args idx)))))) ;; for all types - (comp 2 make-display) ;; Display the event was read from - (comp 3 (lambda (Xwin);; event-window it is reported relative to - (make-window Xwin (vector-ref args 2)))) + (comp 2 (lambda (Xdisplay) ;; Display the event was read from + (make-display Xdisplay #f))) + (comp 3 (lambda (Xwin) ;; event-window it is reported relative to + (make-window Xwin (vector-ref args 2) #f))) (let* ((display (vector-ref args 2)) (window (vector-ref args 3)) (sidx 4) ;; start index of event-dependand fields (make-window* (lambda (Xwindow) - (make-window Xwindow display)))) + (make-window Xwindow display #f)))) ;; special entries (case type ((key-press key-release button-press button-release motion-notify) @@ -46,8 +47,9 @@ (comp (+ sidx 0) make-atom) (comp (+ sidx 1) make-atom) (comp (+ sidx 2) make-atom)) - ((colormap-notify) - (comp (+ sidx 0) make-colormap)) ;;?? + ((colormap-notify) ;;?? + (comp (+ sidx 0) (lambda (Xcolormap) + (make-colormap Xcolormap #f)))) ((client-message) (comp (+ sidx 0) make-atom)) ;;?? ) ;; case end @@ -77,4 +79,12 @@ ; 0)) (import-lambda-definition %events-pending (Xdisplay) - "Events_Pending") \ No newline at end of file + "Events_Pending") + +(define (get-motion-events window from-time to-time) + (%get-motion-events (display-Xdisplay (window-display window)) + (window-Xwindow window) + from-time to-time)) + +(import-lambda-definition %get-motion-events (Xdisplay Xwindow from to) + "Get_Motion_Events") \ No newline at end of file