blob: 6eaadf25c57aecfd964f5b0826131de1eb57b906 (
plain)
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
41
42
43
44
45
46
47
48
49
50
51
|
############################################################################
#
# File: evrecord.icn
#
# Subject: Procedure to record window events
#
# Author: Ralph E. Griswold
#
# Date: April 25, 1996
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This procedure writes a file of graphics events. The file can be
# converted to "pseudo events" by evplay.icn.
#
# When used with a vidget interface, evrecord can be passed as an
# argument to, say, GetEvents(), as in
#
# GetEvents(root, , evrecord)
#
############################################################################
#
# Requires: Version 9 graphics
#
############################################################################
#
# Links: enqueue
#
############################################################################
link enqueue
procedure evrecord(event)
local modkeys
modkeys := ""
modkeys ||:= (&shift & "s")
modkeys ||:= (&meta & "m")
modkeys ||:= (&control & "c")
write(image(event))
write(ior(pack_modkeys(modkeys), iand(&x, 16rFFFF)))
write(ior(pack_intrvl(&interval), iand(&y, 16rFFFF)))
return
end
|