4 WIN and big-bang integration
(require dos/win/big-bang) | package: dos |
dos/win/big-bang implements some helpers for using dos/win efficiently with 2htdp/universe. A simple example is included in the source, compare it to a version that does not use dos.
procedure
(win-on-tick cur) → win?
cur : win?
procedure
(win-stop-when k) → (-> win? boolean?)
k : symbol?
Returns a
function that returns something the environment maps k
to. Suitable for use with stop-when.
procedure
(win-to-draw base) → (-> win? any/c)
base : any/c
Returns a
function that composes all the values that the registry maps
'gfx to using base as the initial argument. Suitable
for use with to-draw when base is a image?
and the function in 'gfx consume and produce image?
objects.
Stores x in 'mouse-x and y in
'mouse-y and the state of the mouse button in
'mouse-down? of w’s registry. Suitable for use with
on-mouse.
procedure
(win-on-key w ke) → win?
w : win? ke : any/c
Records the state of
the key that ke corresponds to in the 'keys entry in
w’s environment. Suitable for use with on-key, when
win-on-release is used with on-release.
procedure
(win-on-release w ke) → win?
w : win? ke : any/c
Records the state
of the key that ke corresponds to in the 'keys entry
in w’s environment. Suitable for use with
on-release, when win-on-key is used with
on-key.
Returns the state
of the key ke in the environment e. Suitable for use
within processes when win-on-key is used with on-key
and win-on-release is used with on-release.