/
racket-impl.rkt
40 lines (27 loc) · 984 Bytes
/
racket-impl.rkt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#lang s-exp "../lang/base.rkt"
(provide big-bang
to-draw
on-tick
on-mouse
on-key
key=?
stop-when)
;; Fixme: the errors below need to be replaced with 2htdp/world-based
;; implementations.
(define (big-bang initial-world . args)
(error 'big-bang "must be run in JavaScript context"))
(define on-tick
(case-lambda [(handler)
(error 'on-tick "must be run in JavaScript context")]
[(handler interval)
(error 'on-tick "must be run in JavaScript context")]))
(define (on-mouse handle)
(error 'on-mouse "must be run in JavaScript context"))
(define (to-draw handler)
(error 'to-draw "must be run in JavaScript context"))
(define (on-key handler)
(error 'on-key "must be run in JavaScript context"))
(define (key=? key-1 key-2)
(error 'key=? "must be run in JavaScript context"))
(define (stop-when handler)
(error 'stop-when "must be run in JavaScript context"))