Home » Archimedes archive » Acorn User » AU 1997-10 A.adf » Extras » Apple][e/PD/BOB/ARMBOB/!ArmBob/progs/h/wimp/ev_process
Apple][e/PD/BOB/ARMBOB/!ArmBob/progs/h/wimp/ev_process
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1997-10 A.adf » Extras |
Filename: | Apple][e/PD/BOB/ARMBOB/!ArmBob/progs/h/wimp/ev_process |
Read OK: | ✔ |
File size: | 0315 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
/********************************************************** * event_process GCW 30/11/94 * event_process(maskptr,buffer,action,user); * maskptr - pointer to integer mask for wimp poll * buffer - integer address of message buffer * action - vector of 20 BYTECODE actions returning FALSE to quit * user - user parameter * * Changed to maskptr so that handler code can update mask * **********************************************************/ event_process(maskptr,buffer,action,user) { local r, respond, go_on; r = newvector(8); go_on = TRUE; while(go_on) { r[0] = maskptr[0]; r[1] = buffer; swi("Wimp_Poll",r); go_on = (typeof(respond = action[r[0]]) == BYTECODE)?respond(buffer,user,maskptr):TRUE; } wimp_closedown(); }
00000000 2f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |/***************| 00000010 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000030 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 20 0a 20 2a 20 |*********** . * | 00000040 65 76 65 6e 74 5f 70 72 6f 63 65 73 73 20 20 20 |event_process | 00000050 20 20 20 20 20 20 20 20 20 20 20 47 43 57 20 33 | GCW 3| 00000060 30 2f 31 31 2f 39 34 0a 20 2a 20 65 76 65 6e 74 |0/11/94. * event| 00000070 5f 70 72 6f 63 65 73 73 28 6d 61 73 6b 70 74 72 |_process(maskptr| 00000080 2c 62 75 66 66 65 72 2c 61 63 74 69 6f 6e 2c 75 |,buffer,action,u| 00000090 73 65 72 29 3b 0a 20 2a 20 6d 61 73 6b 70 74 72 |ser);. * maskptr| 000000a0 20 20 2d 20 70 6f 69 6e 74 65 72 20 74 6f 20 69 | - pointer to i| 000000b0 6e 74 65 67 65 72 20 6d 61 73 6b 20 66 6f 72 20 |nteger mask for | 000000c0 77 69 6d 70 20 70 6f 6c 6c 0a 20 2a 20 62 75 66 |wimp poll. * buf| 000000d0 66 65 72 20 20 20 2d 20 69 6e 74 65 67 65 72 20 |fer - integer | 000000e0 61 64 64 72 65 73 73 20 6f 66 20 6d 65 73 73 61 |address of messa| 000000f0 67 65 20 62 75 66 66 65 72 0a 20 2a 20 61 63 74 |ge buffer. * act| 00000100 69 6f 6e 20 20 20 2d 20 76 65 63 74 6f 72 20 6f |ion - vector o| 00000110 66 20 32 30 20 42 59 54 45 43 4f 44 45 20 61 63 |f 20 BYTECODE ac| 00000120 74 69 6f 6e 73 20 72 65 74 75 72 6e 69 6e 67 20 |tions returning | 00000130 46 41 4c 53 45 20 74 6f 20 71 75 69 74 0a 20 2a |FALSE to quit. *| 00000140 20 75 73 65 72 20 20 20 20 20 2d 20 75 73 65 72 | user - user| 00000150 20 70 61 72 61 6d 65 74 65 72 0a 20 2a 0a 20 2a | parameter. *. *| 00000160 20 43 68 61 6e 67 65 64 20 74 6f 20 6d 61 73 6b | Changed to mask| 00000170 70 74 72 20 73 6f 20 74 68 61 74 20 68 61 6e 64 |ptr so that hand| 00000180 6c 65 72 20 63 6f 64 65 20 63 61 6e 20 75 70 64 |ler code can upd| 00000190 61 74 65 20 6d 61 73 6b 0a 20 2a 0a 20 2a 2a 2a |ate mask. *. ***| 000001a0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 000001d0 2a 2a 2a 2a 2a 2a 2a 2f 0a 0a 65 76 65 6e 74 5f |*******/..event_| 000001e0 70 72 6f 63 65 73 73 28 6d 61 73 6b 70 74 72 2c |process(maskptr,| 000001f0 62 75 66 66 65 72 2c 61 63 74 69 6f 6e 2c 75 73 |buffer,action,us| 00000200 65 72 29 0a 7b 0a 20 6c 6f 63 61 6c 20 72 2c 20 |er).{. local r, | 00000210 72 65 73 70 6f 6e 64 2c 20 67 6f 5f 6f 6e 3b 0a |respond, go_on;.| 00000220 20 72 20 3d 20 6e 65 77 76 65 63 74 6f 72 28 38 | r = newvector(8| 00000230 29 3b 0a 20 67 6f 5f 6f 6e 20 3d 20 54 52 55 45 |);. go_on = TRUE| 00000240 3b 0a 20 77 68 69 6c 65 28 67 6f 5f 6f 6e 29 0a |;. while(go_on).| 00000250 20 7b 0a 20 20 72 5b 30 5d 20 3d 20 6d 61 73 6b | {. r[0] = mask| 00000260 70 74 72 5b 30 5d 3b 0a 20 20 72 5b 31 5d 20 3d |ptr[0];. r[1] =| 00000270 20 62 75 66 66 65 72 3b 0a 20 20 73 77 69 28 22 | buffer;. swi("| 00000280 57 69 6d 70 5f 50 6f 6c 6c 22 2c 72 29 3b 0a 20 |Wimp_Poll",r);. | 00000290 20 67 6f 5f 6f 6e 20 3d 0a 20 20 20 20 20 28 74 | go_on =. (t| 000002a0 79 70 65 6f 66 28 72 65 73 70 6f 6e 64 20 3d 20 |ypeof(respond = | 000002b0 61 63 74 69 6f 6e 5b 72 5b 30 5d 5d 29 0a 20 20 |action[r[0]]). | 000002c0 20 20 20 20 20 20 20 20 20 20 20 20 20 3d 3d 20 | == | 000002d0 42 59 54 45 43 4f 44 45 29 3f 72 65 73 70 6f 6e |BYTECODE)?respon| 000002e0 64 28 62 75 66 66 65 72 2c 75 73 65 72 2c 6d 61 |d(buffer,user,ma| 000002f0 73 6b 70 74 72 29 3a 54 52 55 45 3b 0a 20 7d 0a |skptr):TRUE;. }.| 00000300 20 77 69 6d 70 5f 63 6c 6f 73 65 64 6f 77 6e 28 | wimp_closedown(| 00000310 29 3b 0a 7d 0a |);.}.| 00000315