(module slideshow (lib "frtime.ss" "fta" "slideshow" "private" "frtime")
(require (lib "slide.ss" "fta" "slideshow"))
(require (lib "slideshow-frlib.ss" "fta" "slideshow" "private"))
(define-syntax (make-reactive stx)
(syntax-case stx ()
[(src-make-reactive exp ...)
(with-syntax ([slide-time (datum->syntax-object #'src-make-reactive 'slide-time)]
[mouse-x (datum->syntax-object #'src-make-reactive 'mouse-x)]
[mouse-y (datum->syntax-object #'src-make-reactive 'mouse-y)]
[key-events (datum->syntax-object #'src-make-reactive 'key-events)])
#'(let ([slide-time (get-current-slide-time)]
[mouse-x (get-current-mouse-x)]
[mouse-y (get-current-mouse-y)]
[key-events (get-current-key-events)])
(parameterize ([current-slide/time slide-time]
[current-slide/mouse-x mouse-x]
[current-slide/mouse-y mouse-y]
[current-slide/key-events key-events])
exp ...)))]))
(provide make-reactive
(all-from (lib "slideshow-frlib.ss" "fta" "slideshow" "private"))
(all-from (lib "slide.ss" "fta" "slideshow"))
(all-from-except (lib "frtime.ss" "fta" "slideshow" "private" "frtime") seconds milliseconds)))