Home » Archimedes archive » Acorn Computing » 1994 02 subscription disc.adf » 9402s » PD/IClear/Help
PD/IClear/Help
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 Computing » 1994 02 subscription disc.adf » 9402s |
Filename: | PD/IClear/Help |
Read OK: | ✔ |
File size: | 1A63 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
IClear Module ====== ====== by Martyn Fox This software is Public Domain. It may be freely copied and distributed, including distribution by magazine discs, PD libraries, bulletin boards etc., provided the following conditions are adhered to: 1. No charge is made other than to cover the reasonable cost of duplication and distribution. 2. No alteration is made to either the software or this text file. 3. This text file accompanies all copies of the software. Please note that this module will only work with RISC OS 3 or later. IClear is a module which makes it easier to delete text from a writable icon. Under RISC OS, to replace the text in such an icon with new text, you first have to either delete all the characters of the old text or press Ctrl-U to clear it. This can be a nuisance, especially if you have just selected the icon with the mouse, as you first have to transfer to the keyboard, then press Ctrl-U before you can type in your new text. With IClear running, simply double-click on the writable icon, using either Select or Adjust. The icon will be inverted, which usually means that it will turn black with white text. As soon as you press a key, the text in the icon will vanish, to be replaced with the character that you typed. If you change your mind after inverting the icon and decide you want to keep your existing text, a further click with any mouse button anywhere on the screen will de-invert the icon and put things back to normal. This software will work with writable icons (button type 15) and also draggable writable icons (button type 14) but not with writable menu items. Programming Notes =========== ===== The module intercepts the MouseV and InsV vectors to detect calls to OS_Mouse and keypresses. OS_Mouse calls are first passed onto the SWI routine and processed on exit. Because RISC OS will not automatically detect a double-click over a writable icon, the module has to do the job itself. This involves checking the time interval since the previous click, selecting the 'double-arrow' pointer sprite, checking which button was pressed and monitoring the mouse position. Rather than put too much code into a vector intercept routine, the software just sets one of two callbacks, depending on the time interval since the previous click. The callback routine is called by RISC OS as soon as it is not busy. The first of these callbacks handles a single click. It first checks to see if the module has a record of an inverted icon and, if so, takes steps to clear it. It then stores a record of which button was pressed and checks the icon type. If the click was over a writable icon, it stores the mouse position and redefines mouse pointer 1 sprite as ptr_double. N.B. There appears to be no way of reading which sprite is used by a particular pointer number. The PRM though says that only RISC OS should use pointer 1, so this pointer should presumably always use the ptr_default arrow sprite. The module assumes this and always replaces ptr_double with ptr_default at the end of the period during which it checks for a second click. The module then sets a call-after, which is an instruction to RISC OS to call a routine after a certain length of time. It also calls OS_CallEvery to arrange for a call every 10 centiseconds to a routine which checks the mouse position and cancels the double-click monitoring if the mouse is moved more than a certain amount. N.B. Although the normal double-click time limit and permitted mouse movement can be configured, there appears to be no way of reading their values, other than the unreliable method of checking CMOS RAM locations, which could change between different versions of RISC OS. This module uses the default configuration values of 1 second maximum between clicks and a maximum mouse movement of 10 OS units (it checks for either 10 horizontal or 10 vertical units of movement). These values are fixed in this version of the module. If there is a demand for the ability to alter these values, I will endeavour to include a couple of SWIs and/or star commands in a later version. If either a second key is pressed or the mouse is moved before the call-after has timed out, the call-after and call-every are cancelled and a second callback is used. This routine checks that the same key has been pressed as previously, sets a flag and takes steps to invert the icon. Although any icon can be inverted or de-inverted by means of a call to Wimp_SetIconState, the procedure is not that simple. This SWI may only be called while the application which owns the icon is the currently active task. If we simply call it when the mouse is clicked, this may not be the case, especially if several multi-tasking applications are running at the same time. We have to send a message to the task but we cannot, of course, rewrite its software. The solution is to use a filter. We could use a pre-filter, which is called just before Wimp_Poll is executed, or a post-filter which is called on return from Wimp_Poll. In this case, we use the latter. The technique is to send a unique message to the task which our filter will intercept and recognise, telling it to invert or de-invert the required icon. We could send a message, using reason code 17 or 18, but we would have to find a message action code that is not used for anything else, which would present problems. It is also permissible for a task to mask out these reason codes, which would prevent our message getting through. So that this cannot happen, the module sends a message with reason code 2, which usually means 'open window request'. This reason code is not supposed to be masked out when calling Wimp_Poll. Our message sends R1+0 as zero and R1+4 as &726C4349, which is the ASCII code for 'IClr'. This corresponds to a request to open the window whose handle is zero, with a minimum x coordinate of &726C4349 - a most unlikely state of affairs in any other situation! The third word in the block is zero to clear the icon or 1 to invert it. The filter is set to handle only reason code 2. If it receives the exact state of affairs as described, it either inverts or clears the icon and exits without passing the call onto the application. If a key is pressed while the inverted icon flag is set, the routine (again by means of a callback) sends a message to clear the icon, then sends the keypress character, preceded by a Ctrl-U to delete the text. The module incorporates a self-checking routine to detect corruption by viruses. Please send all comments and suggestions to: M.P. Fox, 31 Pierson Road, Windsor, Berks. SL4 5RE
00000000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000010 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 | I| 00000020 43 6c 65 61 72 20 4d 6f 64 75 6c 65 0a 20 20 20 |Clear Module. | 00000030 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000040 20 20 20 20 20 20 20 20 20 20 20 20 3d 3d 3d 3d | ====| 00000050 3d 3d 20 3d 3d 3d 3d 3d 3d 0a 0a 20 20 20 20 20 |== ======.. | 00000060 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000070 20 20 20 20 20 20 20 20 20 20 62 79 20 4d 61 72 | by Mar| 00000080 74 79 6e 20 46 6f 78 0a 0a 54 68 69 73 20 73 6f |tyn Fox..This so| 00000090 66 74 77 61 72 65 20 69 73 20 50 75 62 6c 69 63 |ftware is Public| 000000a0 20 44 6f 6d 61 69 6e 2e 20 49 74 20 6d 61 79 20 | Domain. It may | 000000b0 62 65 20 66 72 65 65 6c 79 20 63 6f 70 69 65 64 |be freely copied| 000000c0 20 61 6e 64 20 64 69 73 74 72 69 62 75 74 65 64 | and distributed| 000000d0 2c 0a 69 6e 63 6c 75 64 69 6e 67 20 64 69 73 74 |,.including dist| 000000e0 72 69 62 75 74 69 6f 6e 20 62 79 20 6d 61 67 61 |ribution by maga| 000000f0 7a 69 6e 65 20 64 69 73 63 73 2c 20 50 44 20 6c |zine discs, PD l| 00000100 69 62 72 61 72 69 65 73 2c 20 62 75 6c 6c 65 74 |ibraries, bullet| 00000110 69 6e 20 62 6f 61 72 64 73 0a 65 74 63 2e 2c 20 |in boards.etc., | 00000120 70 72 6f 76 69 64 65 64 20 74 68 65 20 66 6f 6c |provided the fol| 00000130 6c 6f 77 69 6e 67 20 63 6f 6e 64 69 74 69 6f 6e |lowing condition| 00000140 73 20 61 72 65 20 61 64 68 65 72 65 64 20 74 6f |s are adhered to| 00000150 3a 0a 0a 31 2e 20 4e 6f 20 63 68 61 72 67 65 20 |:..1. No charge | 00000160 69 73 20 6d 61 64 65 20 6f 74 68 65 72 20 74 68 |is made other th| 00000170 61 6e 20 74 6f 20 63 6f 76 65 72 20 74 68 65 20 |an to cover the | 00000180 72 65 61 73 6f 6e 61 62 6c 65 20 63 6f 73 74 20 |reasonable cost | 00000190 6f 66 20 64 75 70 6c 69 63 61 74 69 6f 6e 0a 61 |of duplication.a| 000001a0 6e 64 20 64 69 73 74 72 69 62 75 74 69 6f 6e 2e |nd distribution.| 000001b0 0a 0a 32 2e 20 4e 6f 20 61 6c 74 65 72 61 74 69 |..2. No alterati| 000001c0 6f 6e 20 69 73 20 6d 61 64 65 20 74 6f 20 65 69 |on is made to ei| 000001d0 74 68 65 72 20 74 68 65 20 73 6f 66 74 77 61 72 |ther the softwar| 000001e0 65 20 6f 72 20 74 68 69 73 20 74 65 78 74 20 66 |e or this text f| 000001f0 69 6c 65 2e 0a 0a 33 2e 20 54 68 69 73 20 74 65 |ile...3. This te| 00000200 78 74 20 66 69 6c 65 20 61 63 63 6f 6d 70 61 6e |xt file accompan| 00000210 69 65 73 20 61 6c 6c 20 63 6f 70 69 65 73 20 6f |ies all copies o| 00000220 66 20 74 68 65 20 73 6f 66 74 77 61 72 65 2e 0a |f the software..| 00000230 0a 50 6c 65 61 73 65 20 6e 6f 74 65 20 74 68 61 |.Please note tha| 00000240 74 20 74 68 69 73 20 6d 6f 64 75 6c 65 20 77 69 |t this module wi| 00000250 6c 6c 20 6f 6e 6c 79 20 77 6f 72 6b 20 77 69 74 |ll only work wit| 00000260 68 20 52 49 53 43 20 4f 53 20 33 20 6f 72 20 6c |h RISC OS 3 or l| 00000270 61 74 65 72 2e 0a 0a 49 43 6c 65 61 72 20 69 73 |ater...IClear is| 00000280 20 61 20 6d 6f 64 75 6c 65 20 77 68 69 63 68 20 | a module which | 00000290 6d 61 6b 65 73 20 69 74 20 65 61 73 69 65 72 20 |makes it easier | 000002a0 74 6f 20 64 65 6c 65 74 65 20 74 65 78 74 20 66 |to delete text f| 000002b0 72 6f 6d 20 61 20 77 72 69 74 61 62 6c 65 0a 69 |rom a writable.i| 000002c0 63 6f 6e 2e 20 55 6e 64 65 72 20 52 49 53 43 20 |con. Under RISC | 000002d0 4f 53 2c 20 74 6f 20 72 65 70 6c 61 63 65 20 74 |OS, to replace t| 000002e0 68 65 20 74 65 78 74 20 69 6e 20 73 75 63 68 20 |he text in such | 000002f0 61 6e 20 69 63 6f 6e 20 77 69 74 68 20 6e 65 77 |an icon with new| 00000300 20 74 65 78 74 2c 20 79 6f 75 0a 66 69 72 73 74 | text, you.first| 00000310 20 68 61 76 65 20 74 6f 20 65 69 74 68 65 72 20 | have to either | 00000320 64 65 6c 65 74 65 20 61 6c 6c 20 74 68 65 20 63 |delete all the c| 00000330 68 61 72 61 63 74 65 72 73 20 6f 66 20 74 68 65 |haracters of the| 00000340 20 6f 6c 64 20 74 65 78 74 20 6f 72 20 70 72 65 | old text or pre| 00000350 73 73 0a 43 74 72 6c 2d 55 20 74 6f 20 63 6c 65 |ss.Ctrl-U to cle| 00000360 61 72 20 69 74 2e 20 54 68 69 73 20 63 61 6e 20 |ar it. This can | 00000370 62 65 20 61 20 6e 75 69 73 61 6e 63 65 2c 20 65 |be a nuisance, e| 00000380 73 70 65 63 69 61 6c 6c 79 20 69 66 20 79 6f 75 |specially if you| 00000390 20 68 61 76 65 20 6a 75 73 74 0a 73 65 6c 65 63 | have just.selec| 000003a0 74 65 64 20 74 68 65 20 69 63 6f 6e 20 77 69 74 |ted the icon wit| 000003b0 68 20 74 68 65 20 6d 6f 75 73 65 2c 20 61 73 20 |h the mouse, as | 000003c0 79 6f 75 20 66 69 72 73 74 20 68 61 76 65 20 74 |you first have t| 000003d0 6f 20 74 72 61 6e 73 66 65 72 20 74 6f 20 74 68 |o transfer to th| 000003e0 65 0a 6b 65 79 62 6f 61 72 64 2c 20 74 68 65 6e |e.keyboard, then| 000003f0 20 70 72 65 73 73 20 43 74 72 6c 2d 55 20 62 65 | press Ctrl-U be| 00000400 66 6f 72 65 20 79 6f 75 20 63 61 6e 20 74 79 70 |fore you can typ| 00000410 65 20 69 6e 20 79 6f 75 72 20 6e 65 77 20 74 65 |e in your new te| 00000420 78 74 2e 0a 0a 57 69 74 68 20 49 43 6c 65 61 72 |xt...With IClear| 00000430 20 72 75 6e 6e 69 6e 67 2c 20 73 69 6d 70 6c 79 | running, simply| 00000440 20 64 6f 75 62 6c 65 2d 63 6c 69 63 6b 20 6f 6e | double-click on| 00000450 20 74 68 65 20 77 72 69 74 61 62 6c 65 20 69 63 | the writable ic| 00000460 6f 6e 2c 20 75 73 69 6e 67 20 65 69 74 68 65 72 |on, using either| 00000470 0a 53 65 6c 65 63 74 20 6f 72 20 41 64 6a 75 73 |.Select or Adjus| 00000480 74 2e 20 54 68 65 20 69 63 6f 6e 20 77 69 6c 6c |t. The icon will| 00000490 20 62 65 20 69 6e 76 65 72 74 65 64 2c 20 77 68 | be inverted, wh| 000004a0 69 63 68 20 75 73 75 61 6c 6c 79 20 6d 65 61 6e |ich usually mean| 000004b0 73 20 74 68 61 74 20 69 74 0a 77 69 6c 6c 20 74 |s that it.will t| 000004c0 75 72 6e 20 62 6c 61 63 6b 20 77 69 74 68 20 77 |urn black with w| 000004d0 68 69 74 65 20 74 65 78 74 2e 20 41 73 20 73 6f |hite text. As so| 000004e0 6f 6e 20 61 73 20 79 6f 75 20 70 72 65 73 73 20 |on as you press | 000004f0 61 20 6b 65 79 2c 20 74 68 65 20 74 65 78 74 20 |a key, the text | 00000500 69 6e 20 74 68 65 0a 69 63 6f 6e 20 77 69 6c 6c |in the.icon will| 00000510 20 76 61 6e 69 73 68 2c 20 74 6f 20 62 65 20 72 | vanish, to be r| 00000520 65 70 6c 61 63 65 64 20 77 69 74 68 20 74 68 65 |eplaced with the| 00000530 20 63 68 61 72 61 63 74 65 72 20 74 68 61 74 20 | character that | 00000540 79 6f 75 20 74 79 70 65 64 2e 20 49 66 20 79 6f |you typed. If yo| 00000550 75 0a 63 68 61 6e 67 65 20 79 6f 75 72 20 6d 69 |u.change your mi| 00000560 6e 64 20 61 66 74 65 72 20 69 6e 76 65 72 74 69 |nd after inverti| 00000570 6e 67 20 74 68 65 20 69 63 6f 6e 20 61 6e 64 20 |ng the icon and | 00000580 64 65 63 69 64 65 20 79 6f 75 20 77 61 6e 74 20 |decide you want | 00000590 74 6f 20 6b 65 65 70 20 79 6f 75 72 0a 65 78 69 |to keep your.exi| 000005a0 73 74 69 6e 67 20 74 65 78 74 2c 20 61 20 66 75 |sting text, a fu| 000005b0 72 74 68 65 72 20 63 6c 69 63 6b 20 77 69 74 68 |rther click with| 000005c0 20 61 6e 79 20 6d 6f 75 73 65 20 62 75 74 74 6f | any mouse butto| 000005d0 6e 20 61 6e 79 77 68 65 72 65 20 6f 6e 20 74 68 |n anywhere on th| 000005e0 65 20 73 63 72 65 65 6e 0a 77 69 6c 6c 20 64 65 |e screen.will de| 000005f0 2d 69 6e 76 65 72 74 20 74 68 65 20 69 63 6f 6e |-invert the icon| 00000600 20 61 6e 64 20 70 75 74 20 74 68 69 6e 67 73 20 | and put things | 00000610 62 61 63 6b 20 74 6f 20 6e 6f 72 6d 61 6c 2e 0a |back to normal..| 00000620 0a 54 68 69 73 20 73 6f 66 74 77 61 72 65 20 77 |.This software w| 00000630 69 6c 6c 20 77 6f 72 6b 20 77 69 74 68 20 77 72 |ill work with wr| 00000640 69 74 61 62 6c 65 20 69 63 6f 6e 73 20 28 62 75 |itable icons (bu| 00000650 74 74 6f 6e 20 74 79 70 65 20 31 35 29 20 61 6e |tton type 15) an| 00000660 64 20 61 6c 73 6f 0a 64 72 61 67 67 61 62 6c 65 |d also.draggable| 00000670 20 77 72 69 74 61 62 6c 65 20 69 63 6f 6e 73 20 | writable icons | 00000680 28 62 75 74 74 6f 6e 20 74 79 70 65 20 31 34 29 |(button type 14)| 00000690 20 62 75 74 20 6e 6f 74 20 77 69 74 68 20 77 72 | but not with wr| 000006a0 69 74 61 62 6c 65 20 6d 65 6e 75 20 69 74 65 6d |itable menu item| 000006b0 73 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 |s... | 000006c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000006d0 20 50 72 6f 67 72 61 6d 6d 69 6e 67 20 4e 6f 74 | Programming Not| 000006e0 65 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |es. | 000006f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000700 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 20 3d 3d 3d 3d |=========== ====| 00000710 3d 0a 0a 54 68 65 20 6d 6f 64 75 6c 65 20 69 6e |=..The module in| 00000720 74 65 72 63 65 70 74 73 20 74 68 65 20 4d 6f 75 |tercepts the Mou| 00000730 73 65 56 20 61 6e 64 20 49 6e 73 56 20 76 65 63 |seV and InsV vec| 00000740 74 6f 72 73 20 74 6f 20 64 65 74 65 63 74 20 63 |tors to detect c| 00000750 61 6c 6c 73 20 74 6f 0a 4f 53 5f 4d 6f 75 73 65 |alls to.OS_Mouse| 00000760 20 61 6e 64 20 6b 65 79 70 72 65 73 73 65 73 2e | and keypresses.| 00000770 20 4f 53 5f 4d 6f 75 73 65 20 63 61 6c 6c 73 20 | OS_Mouse calls | 00000780 61 72 65 20 66 69 72 73 74 20 70 61 73 73 65 64 |are first passed| 00000790 20 6f 6e 74 6f 20 74 68 65 20 53 57 49 0a 72 6f | onto the SWI.ro| 000007a0 75 74 69 6e 65 20 61 6e 64 20 70 72 6f 63 65 73 |utine and proces| 000007b0 73 65 64 20 6f 6e 20 65 78 69 74 2e 0a 0a 42 65 |sed on exit...Be| 000007c0 63 61 75 73 65 20 52 49 53 43 20 4f 53 20 77 69 |cause RISC OS wi| 000007d0 6c 6c 20 6e 6f 74 20 61 75 74 6f 6d 61 74 69 63 |ll not automatic| 000007e0 61 6c 6c 79 20 64 65 74 65 63 74 20 61 20 64 6f |ally detect a do| 000007f0 75 62 6c 65 2d 63 6c 69 63 6b 20 6f 76 65 72 20 |uble-click over | 00000800 61 20 77 72 69 74 61 62 6c 65 0a 69 63 6f 6e 2c |a writable.icon,| 00000810 20 74 68 65 20 6d 6f 64 75 6c 65 20 68 61 73 20 | the module has | 00000820 74 6f 20 64 6f 20 74 68 65 20 6a 6f 62 20 69 74 |to do the job it| 00000830 73 65 6c 66 2e 20 54 68 69 73 20 69 6e 76 6f 6c |self. This invol| 00000840 76 65 73 20 63 68 65 63 6b 69 6e 67 20 74 68 65 |ves checking the| 00000850 20 74 69 6d 65 0a 69 6e 74 65 72 76 61 6c 20 73 | time.interval s| 00000860 69 6e 63 65 20 74 68 65 20 70 72 65 76 69 6f 75 |ince the previou| 00000870 73 20 63 6c 69 63 6b 2c 20 73 65 6c 65 63 74 69 |s click, selecti| 00000880 6e 67 20 74 68 65 20 27 64 6f 75 62 6c 65 2d 61 |ng the 'double-a| 00000890 72 72 6f 77 27 20 70 6f 69 6e 74 65 72 0a 73 70 |rrow' pointer.sp| 000008a0 72 69 74 65 2c 20 63 68 65 63 6b 69 6e 67 20 77 |rite, checking w| 000008b0 68 69 63 68 20 62 75 74 74 6f 6e 20 77 61 73 20 |hich button was | 000008c0 70 72 65 73 73 65 64 20 61 6e 64 20 6d 6f 6e 69 |pressed and moni| 000008d0 74 6f 72 69 6e 67 20 74 68 65 20 6d 6f 75 73 65 |toring the mouse| 000008e0 20 70 6f 73 69 74 69 6f 6e 2e 0a 0a 52 61 74 68 | position...Rath| 000008f0 65 72 20 74 68 61 6e 20 70 75 74 20 74 6f 6f 20 |er than put too | 00000900 6d 75 63 68 20 63 6f 64 65 20 69 6e 74 6f 20 61 |much code into a| 00000910 20 76 65 63 74 6f 72 20 69 6e 74 65 72 63 65 70 | vector intercep| 00000920 74 20 72 6f 75 74 69 6e 65 2c 20 74 68 65 20 73 |t routine, the s| 00000930 6f 66 74 77 61 72 65 0a 6a 75 73 74 20 73 65 74 |oftware.just set| 00000940 73 20 6f 6e 65 20 6f 66 20 74 77 6f 20 63 61 6c |s one of two cal| 00000950 6c 62 61 63 6b 73 2c 20 64 65 70 65 6e 64 69 6e |lbacks, dependin| 00000960 67 20 6f 6e 20 74 68 65 20 74 69 6d 65 20 69 6e |g on the time in| 00000970 74 65 72 76 61 6c 20 73 69 6e 63 65 20 74 68 65 |terval since the| 00000980 0a 70 72 65 76 69 6f 75 73 20 63 6c 69 63 6b 2e |.previous click.| 00000990 20 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 72 6f | The callback ro| 000009a0 75 74 69 6e 65 20 69 73 20 63 61 6c 6c 65 64 20 |utine is called | 000009b0 62 79 20 52 49 53 43 20 4f 53 20 61 73 20 73 6f |by RISC OS as so| 000009c0 6f 6e 20 61 73 20 69 74 20 69 73 0a 6e 6f 74 20 |on as it is.not | 000009d0 62 75 73 79 2e 20 54 68 65 20 66 69 72 73 74 20 |busy. The first | 000009e0 6f 66 20 74 68 65 73 65 20 63 61 6c 6c 62 61 63 |of these callbac| 000009f0 6b 73 20 68 61 6e 64 6c 65 73 20 61 20 73 69 6e |ks handles a sin| 00000a00 67 6c 65 20 63 6c 69 63 6b 2e 20 49 74 20 66 69 |gle click. It fi| 00000a10 72 73 74 0a 63 68 65 63 6b 73 20 74 6f 20 73 65 |rst.checks to se| 00000a20 65 20 69 66 20 74 68 65 20 6d 6f 64 75 6c 65 20 |e if the module | 00000a30 68 61 73 20 61 20 72 65 63 6f 72 64 20 6f 66 20 |has a record of | 00000a40 61 6e 20 69 6e 76 65 72 74 65 64 20 69 63 6f 6e |an inverted icon| 00000a50 20 61 6e 64 2c 20 69 66 20 73 6f 2c 0a 74 61 6b | and, if so,.tak| 00000a60 65 73 20 73 74 65 70 73 20 74 6f 20 63 6c 65 61 |es steps to clea| 00000a70 72 20 69 74 2e 20 49 74 20 74 68 65 6e 20 73 74 |r it. It then st| 00000a80 6f 72 65 73 20 61 20 72 65 63 6f 72 64 20 6f 66 |ores a record of| 00000a90 20 77 68 69 63 68 20 62 75 74 74 6f 6e 20 77 61 | which button wa| 00000aa0 73 20 70 72 65 73 73 65 64 0a 61 6e 64 20 63 68 |s pressed.and ch| 00000ab0 65 63 6b 73 20 74 68 65 20 69 63 6f 6e 20 74 79 |ecks the icon ty| 00000ac0 70 65 2e 20 49 66 20 74 68 65 20 63 6c 69 63 6b |pe. If the click| 00000ad0 20 77 61 73 20 6f 76 65 72 20 61 20 77 72 69 74 | was over a writ| 00000ae0 61 62 6c 65 20 69 63 6f 6e 2c 20 69 74 20 73 74 |able icon, it st| 00000af0 6f 72 65 73 0a 74 68 65 20 6d 6f 75 73 65 20 70 |ores.the mouse p| 00000b00 6f 73 69 74 69 6f 6e 20 61 6e 64 20 72 65 64 65 |osition and rede| 00000b10 66 69 6e 65 73 20 6d 6f 75 73 65 20 70 6f 69 6e |fines mouse poin| 00000b20 74 65 72 20 31 20 73 70 72 69 74 65 20 61 73 20 |ter 1 sprite as | 00000b30 70 74 72 5f 64 6f 75 62 6c 65 2e 0a 0a 4e 2e 42 |ptr_double...N.B| 00000b40 2e 20 54 68 65 72 65 20 61 70 70 65 61 72 73 20 |. There appears | 00000b50 74 6f 20 62 65 20 6e 6f 20 77 61 79 20 6f 66 20 |to be no way of | 00000b60 72 65 61 64 69 6e 67 20 77 68 69 63 68 20 73 70 |reading which sp| 00000b70 72 69 74 65 20 69 73 20 75 73 65 64 20 62 79 20 |rite is used by | 00000b80 61 0a 70 61 72 74 69 63 75 6c 61 72 20 70 6f 69 |a.particular poi| 00000b90 6e 74 65 72 20 6e 75 6d 62 65 72 2e 20 54 68 65 |nter number. The| 00000ba0 20 50 52 4d 20 74 68 6f 75 67 68 20 73 61 79 73 | PRM though says| 00000bb0 20 74 68 61 74 20 6f 6e 6c 79 20 52 49 53 43 20 | that only RISC | 00000bc0 4f 53 20 73 68 6f 75 6c 64 20 75 73 65 0a 70 6f |OS should use.po| 00000bd0 69 6e 74 65 72 20 31 2c 20 73 6f 20 74 68 69 73 |inter 1, so this| 00000be0 20 70 6f 69 6e 74 65 72 20 73 68 6f 75 6c 64 20 | pointer should | 00000bf0 70 72 65 73 75 6d 61 62 6c 79 20 61 6c 77 61 79 |presumably alway| 00000c00 73 20 75 73 65 20 74 68 65 20 70 74 72 5f 64 65 |s use the ptr_de| 00000c10 66 61 75 6c 74 0a 61 72 72 6f 77 20 73 70 72 69 |fault.arrow spri| 00000c20 74 65 2e 20 54 68 65 20 6d 6f 64 75 6c 65 20 61 |te. The module a| 00000c30 73 73 75 6d 65 73 20 74 68 69 73 20 61 6e 64 20 |ssumes this and | 00000c40 61 6c 77 61 79 73 20 72 65 70 6c 61 63 65 73 20 |always replaces | 00000c50 70 74 72 5f 64 6f 75 62 6c 65 20 77 69 74 68 0a |ptr_double with.| 00000c60 70 74 72 5f 64 65 66 61 75 6c 74 20 61 74 20 74 |ptr_default at t| 00000c70 68 65 20 65 6e 64 20 6f 66 20 74 68 65 20 70 65 |he end of the pe| 00000c80 72 69 6f 64 20 64 75 72 69 6e 67 20 77 68 69 63 |riod during whic| 00000c90 68 20 69 74 20 63 68 65 63 6b 73 20 66 6f 72 20 |h it checks for | 00000ca0 61 20 73 65 63 6f 6e 64 0a 63 6c 69 63 6b 2e 0a |a second.click..| 00000cb0 0a 54 68 65 20 6d 6f 64 75 6c 65 20 74 68 65 6e |.The module then| 00000cc0 20 73 65 74 73 20 61 20 63 61 6c 6c 2d 61 66 74 | sets a call-aft| 00000cd0 65 72 2c 20 77 68 69 63 68 20 69 73 20 61 6e 20 |er, which is an | 00000ce0 69 6e 73 74 72 75 63 74 69 6f 6e 20 74 6f 20 52 |instruction to R| 00000cf0 49 53 43 20 4f 53 20 74 6f 0a 63 61 6c 6c 20 61 |ISC OS to.call a| 00000d00 20 72 6f 75 74 69 6e 65 20 61 66 74 65 72 20 61 | routine after a| 00000d10 20 63 65 72 74 61 69 6e 20 6c 65 6e 67 74 68 20 | certain length | 00000d20 6f 66 20 74 69 6d 65 2e 20 49 74 20 61 6c 73 6f |of time. It also| 00000d30 20 63 61 6c 6c 73 20 4f 53 5f 43 61 6c 6c 45 76 | calls OS_CallEv| 00000d40 65 72 79 20 74 6f 0a 61 72 72 61 6e 67 65 20 66 |ery to.arrange f| 00000d50 6f 72 20 61 20 63 61 6c 6c 20 65 76 65 72 79 20 |or a call every | 00000d60 31 30 20 63 65 6e 74 69 73 65 63 6f 6e 64 73 20 |10 centiseconds | 00000d70 74 6f 20 61 20 72 6f 75 74 69 6e 65 20 77 68 69 |to a routine whi| 00000d80 63 68 20 63 68 65 63 6b 73 20 74 68 65 20 6d 6f |ch checks the mo| 00000d90 75 73 65 0a 70 6f 73 69 74 69 6f 6e 20 61 6e 64 |use.position and| 00000da0 20 63 61 6e 63 65 6c 73 20 74 68 65 20 64 6f 75 | cancels the dou| 00000db0 62 6c 65 2d 63 6c 69 63 6b 20 6d 6f 6e 69 74 6f |ble-click monito| 00000dc0 72 69 6e 67 20 69 66 20 74 68 65 20 6d 6f 75 73 |ring if the mous| 00000dd0 65 20 69 73 20 6d 6f 76 65 64 20 6d 6f 72 65 0a |e is moved more.| 00000de0 74 68 61 6e 20 61 20 63 65 72 74 61 69 6e 20 61 |than a certain a| 00000df0 6d 6f 75 6e 74 2e 0a 0a 4e 2e 42 2e 20 41 6c 74 |mount...N.B. Alt| 00000e00 68 6f 75 67 68 20 74 68 65 20 6e 6f 72 6d 61 6c |hough the normal| 00000e10 20 64 6f 75 62 6c 65 2d 63 6c 69 63 6b 20 74 69 | double-click ti| 00000e20 6d 65 20 6c 69 6d 69 74 20 61 6e 64 20 70 65 72 |me limit and per| 00000e30 6d 69 74 74 65 64 20 6d 6f 75 73 65 0a 6d 6f 76 |mitted mouse.mov| 00000e40 65 6d 65 6e 74 20 63 61 6e 20 62 65 20 63 6f 6e |ement can be con| 00000e50 66 69 67 75 72 65 64 2c 20 74 68 65 72 65 20 61 |figured, there a| 00000e60 70 70 65 61 72 73 20 74 6f 20 62 65 20 6e 6f 20 |ppears to be no | 00000e70 77 61 79 20 6f 66 20 72 65 61 64 69 6e 67 20 74 |way of reading t| 00000e80 68 65 69 72 0a 76 61 6c 75 65 73 2c 20 6f 74 68 |heir.values, oth| 00000e90 65 72 20 74 68 61 6e 20 74 68 65 20 75 6e 72 65 |er than the unre| 00000ea0 6c 69 61 62 6c 65 20 6d 65 74 68 6f 64 20 6f 66 |liable method of| 00000eb0 20 63 68 65 63 6b 69 6e 67 20 43 4d 4f 53 20 52 | checking CMOS R| 00000ec0 41 4d 20 6c 6f 63 61 74 69 6f 6e 73 2c 0a 77 68 |AM locations,.wh| 00000ed0 69 63 68 20 63 6f 75 6c 64 20 63 68 61 6e 67 65 |ich could change| 00000ee0 20 62 65 74 77 65 65 6e 20 64 69 66 66 65 72 65 | between differe| 00000ef0 6e 74 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 52 |nt versions of R| 00000f00 49 53 43 20 4f 53 2e 20 54 68 69 73 20 6d 6f 64 |ISC OS. This mod| 00000f10 75 6c 65 20 75 73 65 73 0a 74 68 65 20 64 65 66 |ule uses.the def| 00000f20 61 75 6c 74 20 63 6f 6e 66 69 67 75 72 61 74 69 |ault configurati| 00000f30 6f 6e 20 76 61 6c 75 65 73 20 6f 66 20 31 20 73 |on values of 1 s| 00000f40 65 63 6f 6e 64 20 6d 61 78 69 6d 75 6d 20 62 65 |econd maximum be| 00000f50 74 77 65 65 6e 20 63 6c 69 63 6b 73 20 61 6e 64 |tween clicks and| 00000f60 20 61 0a 6d 61 78 69 6d 75 6d 20 6d 6f 75 73 65 | a.maximum mouse| 00000f70 20 6d 6f 76 65 6d 65 6e 74 20 6f 66 20 31 30 20 | movement of 10 | 00000f80 4f 53 20 75 6e 69 74 73 20 28 69 74 20 63 68 65 |OS units (it che| 00000f90 63 6b 73 20 66 6f 72 20 65 69 74 68 65 72 20 31 |cks for either 1| 00000fa0 30 20 68 6f 72 69 7a 6f 6e 74 61 6c 20 6f 72 0a |0 horizontal or.| 00000fb0 31 30 20 76 65 72 74 69 63 61 6c 20 75 6e 69 74 |10 vertical unit| 00000fc0 73 20 6f 66 20 6d 6f 76 65 6d 65 6e 74 29 2e 20 |s of movement). | 00000fd0 54 68 65 73 65 20 76 61 6c 75 65 73 20 61 72 65 |These values are| 00000fe0 20 66 69 78 65 64 20 69 6e 20 74 68 69 73 20 76 | fixed in this v| 00000ff0 65 72 73 69 6f 6e 20 6f 66 0a 74 68 65 20 6d 6f |ersion of.the mo| 00001000 64 75 6c 65 2e 20 49 66 20 74 68 65 72 65 20 69 |dule. If there i| 00001010 73 20 61 20 64 65 6d 61 6e 64 20 66 6f 72 20 74 |s a demand for t| 00001020 68 65 20 61 62 69 6c 69 74 79 20 74 6f 20 61 6c |he ability to al| 00001030 74 65 72 20 74 68 65 73 65 20 76 61 6c 75 65 73 |ter these values| 00001040 2c 20 49 0a 77 69 6c 6c 20 65 6e 64 65 61 76 6f |, I.will endeavo| 00001050 75 72 20 74 6f 20 69 6e 63 6c 75 64 65 20 61 20 |ur to include a | 00001060 63 6f 75 70 6c 65 20 6f 66 20 53 57 49 73 20 61 |couple of SWIs a| 00001070 6e 64 2f 6f 72 20 73 74 61 72 20 63 6f 6d 6d 61 |nd/or star comma| 00001080 6e 64 73 20 69 6e 20 61 20 6c 61 74 65 72 0a 76 |nds in a later.v| 00001090 65 72 73 69 6f 6e 2e 0a 0a 49 66 20 65 69 74 68 |ersion...If eith| 000010a0 65 72 20 61 20 73 65 63 6f 6e 64 20 6b 65 79 20 |er a second key | 000010b0 69 73 20 70 72 65 73 73 65 64 20 6f 72 20 74 68 |is pressed or th| 000010c0 65 20 6d 6f 75 73 65 20 69 73 20 6d 6f 76 65 64 |e mouse is moved| 000010d0 20 62 65 66 6f 72 65 20 74 68 65 0a 63 61 6c 6c | before the.call| 000010e0 2d 61 66 74 65 72 20 68 61 73 20 74 69 6d 65 64 |-after has timed| 000010f0 20 6f 75 74 2c 20 74 68 65 20 63 61 6c 6c 2d 61 | out, the call-a| 00001100 66 74 65 72 20 61 6e 64 20 63 61 6c 6c 2d 65 76 |fter and call-ev| 00001110 65 72 79 20 61 72 65 20 63 61 6e 63 65 6c 6c 65 |ery are cancelle| 00001120 64 20 61 6e 64 20 61 0a 73 65 63 6f 6e 64 20 63 |d and a.second c| 00001130 61 6c 6c 62 61 63 6b 20 69 73 20 75 73 65 64 2e |allback is used.| 00001140 20 54 68 69 73 20 72 6f 75 74 69 6e 65 20 63 68 | This routine ch| 00001150 65 63 6b 73 20 74 68 61 74 20 74 68 65 20 73 61 |ecks that the sa| 00001160 6d 65 20 6b 65 79 20 68 61 73 20 62 65 65 6e 0a |me key has been.| 00001170 70 72 65 73 73 65 64 20 61 73 20 70 72 65 76 69 |pressed as previ| 00001180 6f 75 73 6c 79 2c 20 73 65 74 73 20 61 20 66 6c |ously, sets a fl| 00001190 61 67 20 61 6e 64 20 74 61 6b 65 73 20 73 74 65 |ag and takes ste| 000011a0 70 73 20 74 6f 20 69 6e 76 65 72 74 20 74 68 65 |ps to invert the| 000011b0 20 69 63 6f 6e 2e 0a 0a 41 6c 74 68 6f 75 67 68 | icon...Although| 000011c0 20 61 6e 79 20 69 63 6f 6e 20 63 61 6e 20 62 65 | any icon can be| 000011d0 20 69 6e 76 65 72 74 65 64 20 6f 72 20 64 65 2d | inverted or de-| 000011e0 69 6e 76 65 72 74 65 64 20 62 79 20 6d 65 61 6e |inverted by mean| 000011f0 73 20 6f 66 20 61 20 63 61 6c 6c 20 74 6f 0a 57 |s of a call to.W| 00001200 69 6d 70 5f 53 65 74 49 63 6f 6e 53 74 61 74 65 |imp_SetIconState| 00001210 2c 20 74 68 65 20 70 72 6f 63 65 64 75 72 65 20 |, the procedure | 00001220 69 73 20 6e 6f 74 20 74 68 61 74 20 73 69 6d 70 |is not that simp| 00001230 6c 65 2e 20 54 68 69 73 20 53 57 49 20 6d 61 79 |le. This SWI may| 00001240 20 6f 6e 6c 79 20 62 65 0a 63 61 6c 6c 65 64 20 | only be.called | 00001250 77 68 69 6c 65 20 74 68 65 20 61 70 70 6c 69 63 |while the applic| 00001260 61 74 69 6f 6e 20 77 68 69 63 68 20 6f 77 6e 73 |ation which owns| 00001270 20 74 68 65 20 69 63 6f 6e 20 69 73 20 74 68 65 | the icon is the| 00001280 20 63 75 72 72 65 6e 74 6c 79 20 61 63 74 69 76 | currently activ| 00001290 65 0a 74 61 73 6b 2e 20 49 66 20 77 65 20 73 69 |e.task. If we si| 000012a0 6d 70 6c 79 20 63 61 6c 6c 20 69 74 20 77 68 65 |mply call it whe| 000012b0 6e 20 74 68 65 20 6d 6f 75 73 65 20 69 73 20 63 |n the mouse is c| 000012c0 6c 69 63 6b 65 64 2c 20 74 68 69 73 20 6d 61 79 |licked, this may| 000012d0 20 6e 6f 74 20 62 65 20 74 68 65 0a 63 61 73 65 | not be the.case| 000012e0 2c 20 65 73 70 65 63 69 61 6c 6c 79 20 69 66 20 |, especially if | 000012f0 73 65 76 65 72 61 6c 20 6d 75 6c 74 69 2d 74 61 |several multi-ta| 00001300 73 6b 69 6e 67 20 61 70 70 6c 69 63 61 74 69 6f |sking applicatio| 00001310 6e 73 20 61 72 65 20 72 75 6e 6e 69 6e 67 20 61 |ns are running a| 00001320 74 20 74 68 65 0a 73 61 6d 65 20 74 69 6d 65 2e |t the.same time.| 00001330 20 57 65 20 68 61 76 65 20 74 6f 20 73 65 6e 64 | We have to send| 00001340 20 61 20 6d 65 73 73 61 67 65 20 74 6f 20 74 68 | a message to th| 00001350 65 20 74 61 73 6b 20 62 75 74 20 77 65 20 63 61 |e task but we ca| 00001360 6e 6e 6f 74 2c 20 6f 66 20 63 6f 75 72 73 65 2c |nnot, of course,| 00001370 0a 72 65 77 72 69 74 65 20 69 74 73 20 73 6f 66 |.rewrite its sof| 00001380 74 77 61 72 65 2e 0a 0a 54 68 65 20 73 6f 6c 75 |tware...The solu| 00001390 74 69 6f 6e 20 69 73 20 74 6f 20 75 73 65 20 61 |tion is to use a| 000013a0 20 66 69 6c 74 65 72 2e 20 57 65 20 63 6f 75 6c | filter. We coul| 000013b0 64 20 75 73 65 20 61 20 70 72 65 2d 66 69 6c 74 |d use a pre-filt| 000013c0 65 72 2c 20 77 68 69 63 68 20 69 73 20 63 61 6c |er, which is cal| 000013d0 6c 65 64 0a 6a 75 73 74 20 62 65 66 6f 72 65 20 |led.just before | 000013e0 57 69 6d 70 5f 50 6f 6c 6c 20 69 73 20 65 78 65 |Wimp_Poll is exe| 000013f0 63 75 74 65 64 2c 20 6f 72 20 61 20 70 6f 73 74 |cuted, or a post| 00001400 2d 66 69 6c 74 65 72 20 77 68 69 63 68 20 69 73 |-filter which is| 00001410 20 63 61 6c 6c 65 64 20 6f 6e 0a 72 65 74 75 72 | called on.retur| 00001420 6e 20 66 72 6f 6d 20 57 69 6d 70 5f 50 6f 6c 6c |n from Wimp_Poll| 00001430 2e 20 49 6e 20 74 68 69 73 20 63 61 73 65 2c 20 |. In this case, | 00001440 77 65 20 75 73 65 20 74 68 65 20 6c 61 74 74 65 |we use the latte| 00001450 72 2e 20 54 68 65 20 74 65 63 68 6e 69 71 75 65 |r. The technique| 00001460 20 69 73 20 74 6f 0a 73 65 6e 64 20 61 20 75 6e | is to.send a un| 00001470 69 71 75 65 20 6d 65 73 73 61 67 65 20 74 6f 20 |ique message to | 00001480 74 68 65 20 74 61 73 6b 20 77 68 69 63 68 20 6f |the task which o| 00001490 75 72 20 66 69 6c 74 65 72 20 77 69 6c 6c 20 69 |ur filter will i| 000014a0 6e 74 65 72 63 65 70 74 20 61 6e 64 0a 72 65 63 |ntercept and.rec| 000014b0 6f 67 6e 69 73 65 2c 20 74 65 6c 6c 69 6e 67 20 |ognise, telling | 000014c0 69 74 20 74 6f 20 69 6e 76 65 72 74 20 6f 72 20 |it to invert or | 000014d0 64 65 2d 69 6e 76 65 72 74 20 74 68 65 20 72 65 |de-invert the re| 000014e0 71 75 69 72 65 64 20 69 63 6f 6e 2e 0a 0a 57 65 |quired icon...We| 000014f0 20 63 6f 75 6c 64 20 73 65 6e 64 20 61 20 6d 65 | could send a me| 00001500 73 73 61 67 65 2c 20 75 73 69 6e 67 20 72 65 61 |ssage, using rea| 00001510 73 6f 6e 20 63 6f 64 65 20 31 37 20 6f 72 20 31 |son code 17 or 1| 00001520 38 2c 20 62 75 74 20 77 65 20 77 6f 75 6c 64 20 |8, but we would | 00001530 68 61 76 65 20 74 6f 0a 66 69 6e 64 20 61 20 6d |have to.find a m| 00001540 65 73 73 61 67 65 20 61 63 74 69 6f 6e 20 63 6f |essage action co| 00001550 64 65 20 74 68 61 74 20 69 73 20 6e 6f 74 20 75 |de that is not u| 00001560 73 65 64 20 66 6f 72 20 61 6e 79 74 68 69 6e 67 |sed for anything| 00001570 20 65 6c 73 65 2c 20 77 68 69 63 68 20 77 6f 75 | else, which wou| 00001580 6c 64 0a 70 72 65 73 65 6e 74 20 70 72 6f 62 6c |ld.present probl| 00001590 65 6d 73 2e 20 49 74 20 69 73 20 61 6c 73 6f 20 |ems. It is also | 000015a0 70 65 72 6d 69 73 73 69 62 6c 65 20 66 6f 72 20 |permissible for | 000015b0 61 20 74 61 73 6b 20 74 6f 20 6d 61 73 6b 20 6f |a task to mask o| 000015c0 75 74 20 74 68 65 73 65 20 72 65 61 73 6f 6e 0a |ut these reason.| 000015d0 63 6f 64 65 73 2c 20 77 68 69 63 68 20 77 6f 75 |codes, which wou| 000015e0 6c 64 20 70 72 65 76 65 6e 74 20 6f 75 72 20 6d |ld prevent our m| 000015f0 65 73 73 61 67 65 20 67 65 74 74 69 6e 67 20 74 |essage getting t| 00001600 68 72 6f 75 67 68 2e 20 53 6f 20 74 68 61 74 20 |hrough. So that | 00001610 74 68 69 73 20 63 61 6e 6e 6f 74 0a 68 61 70 70 |this cannot.happ| 00001620 65 6e 2c 20 74 68 65 20 6d 6f 64 75 6c 65 20 73 |en, the module s| 00001630 65 6e 64 73 20 61 20 6d 65 73 73 61 67 65 20 77 |ends a message w| 00001640 69 74 68 20 72 65 61 73 6f 6e 20 63 6f 64 65 20 |ith reason code | 00001650 32 2c 20 77 68 69 63 68 20 75 73 75 61 6c 6c 79 |2, which usually| 00001660 20 6d 65 61 6e 73 0a 27 6f 70 65 6e 20 77 69 6e | means.'open win| 00001670 64 6f 77 20 72 65 71 75 65 73 74 27 2e 20 54 68 |dow request'. Th| 00001680 69 73 20 72 65 61 73 6f 6e 20 63 6f 64 65 20 69 |is reason code i| 00001690 73 20 6e 6f 74 20 73 75 70 70 6f 73 65 64 20 74 |s not supposed t| 000016a0 6f 20 62 65 20 6d 61 73 6b 65 64 20 6f 75 74 0a |o be masked out.| 000016b0 77 68 65 6e 20 63 61 6c 6c 69 6e 67 20 57 69 6d |when calling Wim| 000016c0 70 5f 50 6f 6c 6c 2e 20 4f 75 72 20 6d 65 73 73 |p_Poll. Our mess| 000016d0 61 67 65 20 73 65 6e 64 73 20 52 31 2b 30 20 61 |age sends R1+0 a| 000016e0 73 20 7a 65 72 6f 20 61 6e 64 20 52 31 2b 34 20 |s zero and R1+4 | 000016f0 61 73 0a 26 37 32 36 43 34 33 34 39 2c 20 77 68 |as.&726C4349, wh| 00001700 69 63 68 20 69 73 20 74 68 65 20 41 53 43 49 49 |ich is the ASCII| 00001710 20 63 6f 64 65 20 66 6f 72 20 27 49 43 6c 72 27 | code for 'IClr'| 00001720 2e 20 54 68 69 73 20 63 6f 72 72 65 73 70 6f 6e |. This correspon| 00001730 64 73 20 74 6f 20 61 20 72 65 71 75 65 73 74 0a |ds to a request.| 00001740 74 6f 20 6f 70 65 6e 20 74 68 65 20 77 69 6e 64 |to open the wind| 00001750 6f 77 20 77 68 6f 73 65 20 68 61 6e 64 6c 65 20 |ow whose handle | 00001760 69 73 20 7a 65 72 6f 2c 20 77 69 74 68 20 61 20 |is zero, with a | 00001770 6d 69 6e 69 6d 75 6d 20 78 20 63 6f 6f 72 64 69 |minimum x coordi| 00001780 6e 61 74 65 20 6f 66 0a 26 37 32 36 43 34 33 34 |nate of.&726C434| 00001790 39 20 2d 20 61 20 6d 6f 73 74 20 75 6e 6c 69 6b |9 - a most unlik| 000017a0 65 6c 79 20 73 74 61 74 65 20 6f 66 20 61 66 66 |ely state of aff| 000017b0 61 69 72 73 20 69 6e 20 61 6e 79 20 6f 74 68 65 |airs in any othe| 000017c0 72 20 73 69 74 75 61 74 69 6f 6e 21 20 54 68 65 |r situation! The| 000017d0 0a 74 68 69 72 64 20 77 6f 72 64 20 69 6e 20 74 |.third word in t| 000017e0 68 65 20 62 6c 6f 63 6b 20 69 73 20 7a 65 72 6f |he block is zero| 000017f0 20 74 6f 20 63 6c 65 61 72 20 74 68 65 20 69 63 | to clear the ic| 00001800 6f 6e 20 6f 72 20 31 20 74 6f 20 69 6e 76 65 72 |on or 1 to inver| 00001810 74 20 69 74 2e 20 54 68 65 0a 66 69 6c 74 65 72 |t it. The.filter| 00001820 20 69 73 20 73 65 74 20 74 6f 20 68 61 6e 64 6c | is set to handl| 00001830 65 20 6f 6e 6c 79 20 72 65 61 73 6f 6e 20 63 6f |e only reason co| 00001840 64 65 20 32 2e 20 49 66 20 69 74 20 72 65 63 65 |de 2. If it rece| 00001850 69 76 65 73 20 74 68 65 20 65 78 61 63 74 20 73 |ives the exact s| 00001860 74 61 74 65 0a 6f 66 20 61 66 66 61 69 72 73 20 |tate.of affairs | 00001870 61 73 20 64 65 73 63 72 69 62 65 64 2c 20 69 74 |as described, it| 00001880 20 65 69 74 68 65 72 20 69 6e 76 65 72 74 73 20 | either inverts | 00001890 6f 72 20 63 6c 65 61 72 73 20 74 68 65 20 69 63 |or clears the ic| 000018a0 6f 6e 20 61 6e 64 20 65 78 69 74 73 0a 77 69 74 |on and exits.wit| 000018b0 68 6f 75 74 20 70 61 73 73 69 6e 67 20 74 68 65 |hout passing the| 000018c0 20 63 61 6c 6c 20 6f 6e 74 6f 20 74 68 65 20 61 | call onto the a| 000018d0 70 70 6c 69 63 61 74 69 6f 6e 2e 0a 0a 49 66 20 |pplication...If | 000018e0 61 20 6b 65 79 20 69 73 20 70 72 65 73 73 65 64 |a key is pressed| 000018f0 20 77 68 69 6c 65 20 74 68 65 20 69 6e 76 65 72 | while the inver| 00001900 74 65 64 20 69 63 6f 6e 20 66 6c 61 67 20 69 73 |ted icon flag is| 00001910 20 73 65 74 2c 20 74 68 65 20 72 6f 75 74 69 6e | set, the routin| 00001920 65 20 28 61 67 61 69 6e 0a 62 79 20 6d 65 61 6e |e (again.by mean| 00001930 73 20 6f 66 20 61 20 63 61 6c 6c 62 61 63 6b 29 |s of a callback)| 00001940 20 73 65 6e 64 73 20 61 20 6d 65 73 73 61 67 65 | sends a message| 00001950 20 74 6f 20 63 6c 65 61 72 20 74 68 65 20 69 63 | to clear the ic| 00001960 6f 6e 2c 20 74 68 65 6e 20 73 65 6e 64 73 20 74 |on, then sends t| 00001970 68 65 0a 6b 65 79 70 72 65 73 73 20 63 68 61 72 |he.keypress char| 00001980 61 63 74 65 72 2c 20 70 72 65 63 65 64 65 64 20 |acter, preceded | 00001990 62 79 20 61 20 43 74 72 6c 2d 55 20 74 6f 20 64 |by a Ctrl-U to d| 000019a0 65 6c 65 74 65 20 74 68 65 20 74 65 78 74 2e 0a |elete the text..| 000019b0 0a 54 68 65 20 6d 6f 64 75 6c 65 20 69 6e 63 6f |.The module inco| 000019c0 72 70 6f 72 61 74 65 73 20 61 20 73 65 6c 66 2d |rporates a self-| 000019d0 63 68 65 63 6b 69 6e 67 20 72 6f 75 74 69 6e 65 |checking routine| 000019e0 20 74 6f 20 64 65 74 65 63 74 20 63 6f 72 72 75 | to detect corru| 000019f0 70 74 69 6f 6e 20 62 79 0a 76 69 72 75 73 65 73 |ption by.viruses| 00001a00 2e 0a 0a 50 6c 65 61 73 65 20 73 65 6e 64 20 61 |...Please send a| 00001a10 6c 6c 20 63 6f 6d 6d 65 6e 74 73 20 61 6e 64 20 |ll comments and | 00001a20 73 75 67 67 65 73 74 69 6f 6e 73 20 74 6f 3a 0a |suggestions to:.| 00001a30 0a 4d 2e 50 2e 20 46 6f 78 2c 0a 33 31 20 50 69 |.M.P. Fox,.31 Pi| 00001a40 65 72 73 6f 6e 20 52 6f 61 64 2c 0a 57 69 6e 64 |erson Road,.Wind| 00001a50 73 6f 72 2c 0a 42 65 72 6b 73 2e 20 53 4c 34 20 |sor,.Berks. SL4 | 00001a60 35 52 45 |5RE| 00001a63