Home » Archimedes archive » Acorn User » Acorn User - Updated Shareware Collection (1994).adf » Programs » IClear/Help

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 User » Acorn User - Updated Shareware Collection (1994).adf » Programs
Filename: IClear/Help
Read OK:
File size: 1C3B 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. Versions of this module up to v1.01 always
replaced the double pointer with the ptr_default sprite after the
double-click time-out. Version v1.10 checks the icon�s validation string, if
any, looking for the �P� instruction, which sets an alternative pointer
sprite when over the icon, and restores the pointer to this sprite after
first checking its presence in the Wimp sprite pool.

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 button 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 button 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. Version
v1.10 also uses the filter to check the icon�s validation string to get the
pointer sprite name.

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 contains the action code for the call. Bit 1 set
denotes that the call is to invert or clear the icon - bit 0 is cleared to
clear, set to invert. Bit 2 is set to call the routine to read the
validation string.

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.

Incidentally, use of this module has revealed that the configuration
dialogue box of PC Emulator v1.70 contains a writable icon which was created
in its inverted state. Its response to a double-click is to remain
black-on-white. A subsequent single click clears it to white-on-black!

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 56 65 72  |nter number. Ver|
00000ba0  73 69 6f 6e 73 20 6f 66  20 74 68 69 73 20 6d 6f  |sions of this mo|
00000bb0  64 75 6c 65 20 75 70 20  74 6f 20 76 31 2e 30 31  |dule up to v1.01|
00000bc0  20 61 6c 77 61 79 73 0a  72 65 70 6c 61 63 65 64  | always.replaced|
00000bd0  20 74 68 65 20 64 6f 75  62 6c 65 20 70 6f 69 6e  | the double poin|
00000be0  74 65 72 20 77 69 74 68  20 74 68 65 20 70 74 72  |ter with the ptr|
00000bf0  5f 64 65 66 61 75 6c 74  20 73 70 72 69 74 65 20  |_default sprite |
00000c00  61 66 74 65 72 20 74 68  65 0a 64 6f 75 62 6c 65  |after the.double|
00000c10  2d 63 6c 69 63 6b 20 74  69 6d 65 2d 6f 75 74 2e  |-click time-out.|
00000c20  20 56 65 72 73 69 6f 6e  20 76 31 2e 31 30 20 63  | Version v1.10 c|
00000c30  68 65 63 6b 73 20 74 68  65 20 69 63 6f 6e 91 73  |hecks the icon.s|
00000c40  20 76 61 6c 69 64 61 74  69 6f 6e 20 73 74 72 69  | validation stri|
00000c50  6e 67 2c 20 69 66 0a 61  6e 79 2c 20 6c 6f 6f 6b  |ng, if.any, look|
00000c60  69 6e 67 20 66 6f 72 20  74 68 65 20 90 50 91 20  |ing for the .P. |
00000c70  69 6e 73 74 72 75 63 74  69 6f 6e 2c 20 77 68 69  |instruction, whi|
00000c80  63 68 20 73 65 74 73 20  61 6e 20 61 6c 74 65 72  |ch sets an alter|
00000c90  6e 61 74 69 76 65 20 70  6f 69 6e 74 65 72 0a 73  |native pointer.s|
00000ca0  70 72 69 74 65 20 77 68  65 6e 20 6f 76 65 72 20  |prite when over |
00000cb0  74 68 65 20 69 63 6f 6e  2c 20 61 6e 64 20 72 65  |the icon, and re|
00000cc0  73 74 6f 72 65 73 20 74  68 65 20 70 6f 69 6e 74  |stores the point|
00000cd0  65 72 20 74 6f 20 74 68  69 73 20 73 70 72 69 74  |er to this sprit|
00000ce0  65 20 61 66 74 65 72 0a  66 69 72 73 74 20 63 68  |e after.first ch|
00000cf0  65 63 6b 69 6e 67 20 69  74 73 20 70 72 65 73 65  |ecking its prese|
00000d00  6e 63 65 20 69 6e 20 74  68 65 20 57 69 6d 70 20  |nce in the Wimp |
00000d10  73 70 72 69 74 65 20 70  6f 6f 6c 2e 0a 0a 54 68  |sprite pool...Th|
00000d20  65 20 6d 6f 64 75 6c 65  20 74 68 65 6e 20 73 65  |e module then se|
00000d30  74 73 20 61 20 63 61 6c  6c 2d 61 66 74 65 72 2c  |ts a call-after,|
00000d40  20 77 68 69 63 68 20 69  73 20 61 6e 20 69 6e 73  | which is an ins|
00000d50  74 72 75 63 74 69 6f 6e  20 74 6f 20 52 49 53 43  |truction to RISC|
00000d60  20 4f 53 20 74 6f 0a 63  61 6c 6c 20 61 20 72 6f  | OS to.call a ro|
00000d70  75 74 69 6e 65 20 61 66  74 65 72 20 61 20 63 65  |utine after a ce|
00000d80  72 74 61 69 6e 20 6c 65  6e 67 74 68 20 6f 66 20  |rtain length of |
00000d90  74 69 6d 65 2e 20 49 74  20 61 6c 73 6f 20 63 61  |time. It also ca|
00000da0  6c 6c 73 20 4f 53 5f 43  61 6c 6c 45 76 65 72 79  |lls OS_CallEvery|
00000db0  20 74 6f 0a 61 72 72 61  6e 67 65 20 66 6f 72 20  | to.arrange for |
00000dc0  61 20 63 61 6c 6c 20 65  76 65 72 79 20 31 30 20  |a call every 10 |
00000dd0  63 65 6e 74 69 73 65 63  6f 6e 64 73 20 74 6f 20  |centiseconds to |
00000de0  61 20 72 6f 75 74 69 6e  65 20 77 68 69 63 68 20  |a routine which |
00000df0  63 68 65 63 6b 73 20 74  68 65 20 6d 6f 75 73 65  |checks the mouse|
00000e00  0a 70 6f 73 69 74 69 6f  6e 20 61 6e 64 20 63 61  |.position and ca|
00000e10  6e 63 65 6c 73 20 74 68  65 20 64 6f 75 62 6c 65  |ncels the double|
00000e20  2d 63 6c 69 63 6b 20 6d  6f 6e 69 74 6f 72 69 6e  |-click monitorin|
00000e30  67 20 69 66 20 74 68 65  20 6d 6f 75 73 65 20 69  |g if the mouse i|
00000e40  73 20 6d 6f 76 65 64 20  6d 6f 72 65 0a 74 68 61  |s moved more.tha|
00000e50  6e 20 61 20 63 65 72 74  61 69 6e 20 61 6d 6f 75  |n a certain amou|
00000e60  6e 74 2e 0a 0a 4e 2e 42  2e 20 41 6c 74 68 6f 75  |nt...N.B. Althou|
00000e70  67 68 20 74 68 65 20 6e  6f 72 6d 61 6c 20 64 6f  |gh the normal do|
00000e80  75 62 6c 65 2d 63 6c 69  63 6b 20 74 69 6d 65 20  |uble-click time |
00000e90  6c 69 6d 69 74 20 61 6e  64 20 70 65 72 6d 69 74  |limit and permit|
00000ea0  74 65 64 20 6d 6f 75 73  65 0a 6d 6f 76 65 6d 65  |ted mouse.moveme|
00000eb0  6e 74 20 63 61 6e 20 62  65 20 63 6f 6e 66 69 67  |nt can be config|
00000ec0  75 72 65 64 2c 20 74 68  65 72 65 20 61 70 70 65  |ured, there appe|
00000ed0  61 72 73 20 74 6f 20 62  65 20 6e 6f 20 77 61 79  |ars to be no way|
00000ee0  20 6f 66 20 72 65 61 64  69 6e 67 20 74 68 65 69  | of reading thei|
00000ef0  72 0a 76 61 6c 75 65 73  2c 20 6f 74 68 65 72 20  |r.values, other |
00000f00  74 68 61 6e 20 74 68 65  20 75 6e 72 65 6c 69 61  |than the unrelia|
00000f10  62 6c 65 20 6d 65 74 68  6f 64 20 6f 66 20 63 68  |ble method of ch|
00000f20  65 63 6b 69 6e 67 20 43  4d 4f 53 20 52 41 4d 20  |ecking CMOS RAM |
00000f30  6c 6f 63 61 74 69 6f 6e  73 2c 0a 77 68 69 63 68  |locations,.which|
00000f40  20 63 6f 75 6c 64 20 63  68 61 6e 67 65 20 62 65  | could change be|
00000f50  74 77 65 65 6e 20 64 69  66 66 65 72 65 6e 74 20  |tween different |
00000f60  76 65 72 73 69 6f 6e 73  20 6f 66 20 52 49 53 43  |versions of RISC|
00000f70  20 4f 53 2e 20 54 68 69  73 20 6d 6f 64 75 6c 65  | OS. This module|
00000f80  20 75 73 65 73 0a 74 68  65 20 64 65 66 61 75 6c  | uses.the defaul|
00000f90  74 20 63 6f 6e 66 69 67  75 72 61 74 69 6f 6e 20  |t configuration |
00000fa0  76 61 6c 75 65 73 20 6f  66 20 31 20 73 65 63 6f  |values of 1 seco|
00000fb0  6e 64 20 6d 61 78 69 6d  75 6d 20 62 65 74 77 65  |nd maximum betwe|
00000fc0  65 6e 20 63 6c 69 63 6b  73 20 61 6e 64 20 61 0a  |en clicks and a.|
00000fd0  6d 61 78 69 6d 75 6d 20  6d 6f 75 73 65 20 6d 6f  |maximum mouse mo|
00000fe0  76 65 6d 65 6e 74 20 6f  66 20 31 30 20 4f 53 20  |vement of 10 OS |
00000ff0  75 6e 69 74 73 20 28 69  74 20 63 68 65 63 6b 73  |units (it checks|
00001000  20 66 6f 72 20 65 69 74  68 65 72 20 31 30 20 68  | for either 10 h|
00001010  6f 72 69 7a 6f 6e 74 61  6c 20 6f 72 0a 31 30 20  |orizontal or.10 |
00001020  76 65 72 74 69 63 61 6c  20 75 6e 69 74 73 20 6f  |vertical units o|
00001030  66 20 6d 6f 76 65 6d 65  6e 74 29 2e 20 54 68 65  |f movement). The|
00001040  73 65 20 76 61 6c 75 65  73 20 61 72 65 20 66 69  |se values are fi|
00001050  78 65 64 20 69 6e 20 74  68 69 73 20 76 65 72 73  |xed in this vers|
00001060  69 6f 6e 20 6f 66 0a 74  68 65 20 6d 6f 64 75 6c  |ion of.the modul|
00001070  65 2e 20 49 66 20 74 68  65 72 65 20 69 73 20 61  |e. If there is a|
00001080  20 64 65 6d 61 6e 64 20  66 6f 72 20 74 68 65 20  | demand for the |
00001090  61 62 69 6c 69 74 79 20  74 6f 20 61 6c 74 65 72  |ability to alter|
000010a0  20 74 68 65 73 65 20 76  61 6c 75 65 73 2c 20 49  | these values, I|
000010b0  0a 77 69 6c 6c 20 65 6e  64 65 61 76 6f 75 72 20  |.will endeavour |
000010c0  74 6f 20 69 6e 63 6c 75  64 65 20 61 20 63 6f 75  |to include a cou|
000010d0  70 6c 65 20 6f 66 20 53  57 49 73 20 61 6e 64 2f  |ple of SWIs and/|
000010e0  6f 72 20 73 74 61 72 20  63 6f 6d 6d 61 6e 64 73  |or star commands|
000010f0  20 69 6e 20 61 20 6c 61  74 65 72 0a 76 65 72 73  | in a later.vers|
00001100  69 6f 6e 2e 0a 0a 49 66  20 65 69 74 68 65 72 20  |ion...If either |
00001110  61 20 73 65 63 6f 6e 64  20 62 75 74 74 6f 6e 20  |a second button |
00001120  69 73 20 70 72 65 73 73  65 64 20 6f 72 20 74 68  |is pressed or th|
00001130  65 20 6d 6f 75 73 65 20  69 73 20 6d 6f 76 65 64  |e mouse is moved|
00001140  20 62 65 66 6f 72 65 20  74 68 65 0a 63 61 6c 6c  | before the.call|
00001150  2d 61 66 74 65 72 20 68  61 73 20 74 69 6d 65 64  |-after has timed|
00001160  20 6f 75 74 2c 20 74 68  65 20 63 61 6c 6c 2d 61  | out, the call-a|
00001170  66 74 65 72 20 61 6e 64  20 63 61 6c 6c 2d 65 76  |fter and call-ev|
00001180  65 72 79 20 61 72 65 20  63 61 6e 63 65 6c 6c 65  |ery are cancelle|
00001190  64 20 61 6e 64 20 61 0a  73 65 63 6f 6e 64 20 63  |d and a.second c|
000011a0  61 6c 6c 62 61 63 6b 20  69 73 20 75 73 65 64 2e  |allback is used.|
000011b0  20 54 68 69 73 20 72 6f  75 74 69 6e 65 20 63 68  | This routine ch|
000011c0  65 63 6b 73 20 74 68 61  74 20 74 68 65 20 73 61  |ecks that the sa|
000011d0  6d 65 20 62 75 74 74 6f  6e 20 68 61 73 20 62 65  |me button has be|
000011e0  65 6e 0a 70 72 65 73 73  65 64 20 61 73 20 70 72  |en.pressed as pr|
000011f0  65 76 69 6f 75 73 6c 79  2c 20 73 65 74 73 20 61  |eviously, sets a|
00001200  20 66 6c 61 67 20 61 6e  64 20 74 61 6b 65 73 20  | flag and takes |
00001210  73 74 65 70 73 20 74 6f  20 69 6e 76 65 72 74 20  |steps to invert |
00001220  74 68 65 20 69 63 6f 6e  2e 0a 0a 41 6c 74 68 6f  |the icon...Altho|
00001230  75 67 68 20 61 6e 79 20  69 63 6f 6e 20 63 61 6e  |ugh any icon can|
00001240  20 62 65 20 69 6e 76 65  72 74 65 64 20 6f 72 20  | be inverted or |
00001250  64 65 2d 69 6e 76 65 72  74 65 64 20 62 79 20 6d  |de-inverted by m|
00001260  65 61 6e 73 20 6f 66 20  61 20 63 61 6c 6c 20 74  |eans of a call t|
00001270  6f 0a 57 69 6d 70 5f 53  65 74 49 63 6f 6e 53 74  |o.Wimp_SetIconSt|
00001280  61 74 65 2c 20 74 68 65  20 70 72 6f 63 65 64 75  |ate, the procedu|
00001290  72 65 20 69 73 20 6e 6f  74 20 74 68 61 74 20 73  |re is not that s|
000012a0  69 6d 70 6c 65 2e 20 54  68 69 73 20 53 57 49 20  |imple. This SWI |
000012b0  6d 61 79 20 6f 6e 6c 79  20 62 65 0a 63 61 6c 6c  |may only be.call|
000012c0  65 64 20 77 68 69 6c 65  20 74 68 65 20 61 70 70  |ed while the app|
000012d0  6c 69 63 61 74 69 6f 6e  20 77 68 69 63 68 20 6f  |lication which o|
000012e0  77 6e 73 20 74 68 65 20  69 63 6f 6e 20 69 73 20  |wns the icon is |
000012f0  74 68 65 20 63 75 72 72  65 6e 74 6c 79 20 61 63  |the currently ac|
00001300  74 69 76 65 0a 74 61 73  6b 2e 20 49 66 20 77 65  |tive.task. If we|
00001310  20 73 69 6d 70 6c 79 20  63 61 6c 6c 20 69 74 20  | simply call it |
00001320  77 68 65 6e 20 74 68 65  20 6d 6f 75 73 65 20 69  |when the mouse i|
00001330  73 20 63 6c 69 63 6b 65  64 2c 20 74 68 69 73 20  |s clicked, this |
00001340  6d 61 79 20 6e 6f 74 20  62 65 20 74 68 65 0a 63  |may not be the.c|
00001350  61 73 65 2c 20 65 73 70  65 63 69 61 6c 6c 79 20  |ase, especially |
00001360  69 66 20 73 65 76 65 72  61 6c 20 6d 75 6c 74 69  |if several multi|
00001370  2d 74 61 73 6b 69 6e 67  20 61 70 70 6c 69 63 61  |-tasking applica|
00001380  74 69 6f 6e 73 20 61 72  65 20 72 75 6e 6e 69 6e  |tions are runnin|
00001390  67 20 61 74 20 74 68 65  0a 73 61 6d 65 20 74 69  |g at the.same ti|
000013a0  6d 65 2e 20 57 65 20 68  61 76 65 20 74 6f 20 73  |me. We have to s|
000013b0  65 6e 64 20 61 20 6d 65  73 73 61 67 65 20 74 6f  |end a message to|
000013c0  20 74 68 65 20 74 61 73  6b 20 62 75 74 20 77 65  | the task but we|
000013d0  20 63 61 6e 6e 6f 74 2c  20 6f 66 20 63 6f 75 72  | cannot, of cour|
000013e0  73 65 2c 0a 72 65 77 72  69 74 65 20 69 74 73 20  |se,.rewrite its |
000013f0  73 6f 66 74 77 61 72 65  2e 0a 0a 54 68 65 20 73  |software...The s|
00001400  6f 6c 75 74 69 6f 6e 20  69 73 20 74 6f 20 75 73  |olution is to us|
00001410  65 20 61 20 66 69 6c 74  65 72 2e 20 57 65 20 63  |e a filter. We c|
00001420  6f 75 6c 64 20 75 73 65  20 61 20 70 72 65 2d 66  |ould use a pre-f|
00001430  69 6c 74 65 72 2c 20 77  68 69 63 68 20 69 73 20  |ilter, which is |
00001440  63 61 6c 6c 65 64 0a 6a  75 73 74 20 62 65 66 6f  |called.just befo|
00001450  72 65 20 57 69 6d 70 5f  50 6f 6c 6c 20 69 73 20  |re Wimp_Poll is |
00001460  65 78 65 63 75 74 65 64  2c 20 6f 72 20 61 20 70  |executed, or a p|
00001470  6f 73 74 2d 66 69 6c 74  65 72 20 77 68 69 63 68  |ost-filter which|
00001480  20 69 73 20 63 61 6c 6c  65 64 20 6f 6e 0a 72 65  | is called on.re|
00001490  74 75 72 6e 20 66 72 6f  6d 20 57 69 6d 70 5f 50  |turn from Wimp_P|
000014a0  6f 6c 6c 2e 20 49 6e 20  74 68 69 73 20 63 61 73  |oll. In this cas|
000014b0  65 2c 20 77 65 20 75 73  65 20 74 68 65 20 6c 61  |e, we use the la|
000014c0  74 74 65 72 2e 20 54 68  65 20 74 65 63 68 6e 69  |tter. The techni|
000014d0  71 75 65 20 69 73 20 74  6f 0a 73 65 6e 64 20 61  |que is to.send a|
000014e0  20 75 6e 69 71 75 65 20  6d 65 73 73 61 67 65 20  | unique message |
000014f0  74 6f 20 74 68 65 20 74  61 73 6b 20 77 68 69 63  |to the task whic|
00001500  68 20 6f 75 72 20 66 69  6c 74 65 72 20 77 69 6c  |h our filter wil|
00001510  6c 20 69 6e 74 65 72 63  65 70 74 20 61 6e 64 0a  |l intercept and.|
00001520  72 65 63 6f 67 6e 69 73  65 2c 20 74 65 6c 6c 69  |recognise, telli|
00001530  6e 67 20 69 74 20 74 6f  20 69 6e 76 65 72 74 20  |ng it to invert |
00001540  6f 72 20 64 65 2d 69 6e  76 65 72 74 20 74 68 65  |or de-invert the|
00001550  20 72 65 71 75 69 72 65  64 20 69 63 6f 6e 2e 20  | required icon. |
00001560  56 65 72 73 69 6f 6e 0a  76 31 2e 31 30 20 61 6c  |Version.v1.10 al|
00001570  73 6f 20 75 73 65 73 20  74 68 65 20 66 69 6c 74  |so uses the filt|
00001580  65 72 20 74 6f 20 63 68  65 63 6b 20 74 68 65 20  |er to check the |
00001590  69 63 6f 6e 91 73 20 76  61 6c 69 64 61 74 69 6f  |icon.s validatio|
000015a0  6e 20 73 74 72 69 6e 67  20 74 6f 20 67 65 74 20  |n string to get |
000015b0  74 68 65 0a 70 6f 69 6e  74 65 72 20 73 70 72 69  |the.pointer spri|
000015c0  74 65 20 6e 61 6d 65 2e  0a 0a 57 65 20 63 6f 75  |te name...We cou|
000015d0  6c 64 20 73 65 6e 64 20  61 20 6d 65 73 73 61 67  |ld send a messag|
000015e0  65 2c 20 75 73 69 6e 67  20 72 65 61 73 6f 6e 20  |e, using reason |
000015f0  63 6f 64 65 20 31 37 20  6f 72 20 31 38 2c 20 62  |code 17 or 18, b|
00001600  75 74 20 77 65 20 77 6f  75 6c 64 20 68 61 76 65  |ut we would have|
00001610  20 74 6f 0a 66 69 6e 64  20 61 20 6d 65 73 73 61  | to.find a messa|
00001620  67 65 20 61 63 74 69 6f  6e 20 63 6f 64 65 20 74  |ge action code t|
00001630  68 61 74 20 69 73 20 6e  6f 74 20 75 73 65 64 20  |hat is not used |
00001640  66 6f 72 20 61 6e 79 74  68 69 6e 67 20 65 6c 73  |for anything els|
00001650  65 2c 20 77 68 69 63 68  20 77 6f 75 6c 64 0a 70  |e, which would.p|
00001660  72 65 73 65 6e 74 20 70  72 6f 62 6c 65 6d 73 2e  |resent problems.|
00001670  20 49 74 20 69 73 20 61  6c 73 6f 20 70 65 72 6d  | It is also perm|
00001680  69 73 73 69 62 6c 65 20  66 6f 72 20 61 20 74 61  |issible for a ta|
00001690  73 6b 20 74 6f 20 6d 61  73 6b 20 6f 75 74 20 74  |sk to mask out t|
000016a0  68 65 73 65 20 72 65 61  73 6f 6e 0a 63 6f 64 65  |hese reason.code|
000016b0  73 2c 20 77 68 69 63 68  20 77 6f 75 6c 64 20 70  |s, which would p|
000016c0  72 65 76 65 6e 74 20 6f  75 72 20 6d 65 73 73 61  |revent our messa|
000016d0  67 65 20 67 65 74 74 69  6e 67 20 74 68 72 6f 75  |ge getting throu|
000016e0  67 68 2e 20 53 6f 20 74  68 61 74 20 74 68 69 73  |gh. So that this|
000016f0  20 63 61 6e 6e 6f 74 0a  68 61 70 70 65 6e 2c 20  | cannot.happen, |
00001700  74 68 65 20 6d 6f 64 75  6c 65 20 73 65 6e 64 73  |the module sends|
00001710  20 61 20 6d 65 73 73 61  67 65 20 77 69 74 68 20  | a message with |
00001720  72 65 61 73 6f 6e 20 63  6f 64 65 20 32 2c 20 77  |reason code 2, w|
00001730  68 69 63 68 20 75 73 75  61 6c 6c 79 20 6d 65 61  |hich usually mea|
00001740  6e 73 0a 27 6f 70 65 6e  20 77 69 6e 64 6f 77 20  |ns.'open window |
00001750  72 65 71 75 65 73 74 27  2e 20 54 68 69 73 20 72  |request'. This r|
00001760  65 61 73 6f 6e 20 63 6f  64 65 20 69 73 20 6e 6f  |eason code is no|
00001770  74 20 73 75 70 70 6f 73  65 64 20 74 6f 20 62 65  |t supposed to be|
00001780  20 6d 61 73 6b 65 64 20  6f 75 74 0a 77 68 65 6e  | masked out.when|
00001790  20 63 61 6c 6c 69 6e 67  20 57 69 6d 70 5f 50 6f  | calling Wimp_Po|
000017a0  6c 6c 2e 20 4f 75 72 20  6d 65 73 73 61 67 65 20  |ll. Our message |
000017b0  73 65 6e 64 73 20 52 31  2b 30 20 61 73 20 7a 65  |sends R1+0 as ze|
000017c0  72 6f 20 61 6e 64 20 52  31 2b 34 20 61 73 0a 26  |ro and R1+4 as.&|
000017d0  37 32 36 43 34 33 34 39  2c 20 77 68 69 63 68 20  |726C4349, which |
000017e0  69 73 20 74 68 65 20 41  53 43 49 49 20 63 6f 64  |is the ASCII cod|
000017f0  65 20 66 6f 72 20 27 49  43 6c 72 27 2e 20 54 68  |e for 'IClr'. Th|
00001800  69 73 20 63 6f 72 72 65  73 70 6f 6e 64 73 20 74  |is corresponds t|
00001810  6f 20 61 20 72 65 71 75  65 73 74 0a 74 6f 20 6f  |o a request.to o|
00001820  70 65 6e 20 74 68 65 20  77 69 6e 64 6f 77 20 77  |pen the window w|
00001830  68 6f 73 65 20 68 61 6e  64 6c 65 20 69 73 20 7a  |hose handle is z|
00001840  65 72 6f 2c 20 77 69 74  68 20 61 20 6d 69 6e 69  |ero, with a mini|
00001850  6d 75 6d 20 78 20 63 6f  6f 72 64 69 6e 61 74 65  |mum x coordinate|
00001860  20 6f 66 0a 26 37 32 36  43 34 33 34 39 20 2d 20  | of.&726C4349 - |
00001870  61 20 6d 6f 73 74 20 75  6e 6c 69 6b 65 6c 79 20  |a most unlikely |
00001880  73 74 61 74 65 20 6f 66  20 61 66 66 61 69 72 73  |state of affairs|
00001890  20 69 6e 20 61 6e 79 20  6f 74 68 65 72 20 73 69  | in any other si|
000018a0  74 75 61 74 69 6f 6e 21  20 54 68 65 0a 74 68 69  |tuation! The.thi|
000018b0  72 64 20 77 6f 72 64 20  69 6e 20 74 68 65 20 62  |rd word in the b|
000018c0  6c 6f 63 6b 20 63 6f 6e  74 61 69 6e 73 20 74 68  |lock contains th|
000018d0  65 20 61 63 74 69 6f 6e  20 63 6f 64 65 20 66 6f  |e action code fo|
000018e0  72 20 74 68 65 20 63 61  6c 6c 2e 20 42 69 74 20  |r the call. Bit |
000018f0  31 20 73 65 74 0a 64 65  6e 6f 74 65 73 20 74 68  |1 set.denotes th|
00001900  61 74 20 74 68 65 20 63  61 6c 6c 20 69 73 20 74  |at the call is t|
00001910  6f 20 69 6e 76 65 72 74  20 6f 72 20 63 6c 65 61  |o invert or clea|
00001920  72 20 74 68 65 20 69 63  6f 6e 20 2d 20 62 69 74  |r the icon - bit|
00001930  20 30 20 69 73 20 63 6c  65 61 72 65 64 20 74 6f  | 0 is cleared to|
00001940  0a 63 6c 65 61 72 2c 20  73 65 74 20 74 6f 20 69  |.clear, set to i|
00001950  6e 76 65 72 74 2e 20 42  69 74 20 32 20 69 73 20  |nvert. Bit 2 is |
00001960  73 65 74 20 74 6f 20 63  61 6c 6c 20 74 68 65 20  |set to call the |
00001970  72 6f 75 74 69 6e 65 20  74 6f 20 72 65 61 64 20  |routine to read |
00001980  74 68 65 0a 76 61 6c 69  64 61 74 69 6f 6e 20 73  |the.validation s|
00001990  74 72 69 6e 67 2e 0a 0a  49 66 20 61 20 6b 65 79  |tring...If a key|
000019a0  20 69 73 20 70 72 65 73  73 65 64 20 77 68 69 6c  | is pressed whil|
000019b0  65 20 74 68 65 20 69 6e  76 65 72 74 65 64 20 69  |e the inverted i|
000019c0  63 6f 6e 20 66 6c 61 67  20 69 73 20 73 65 74 2c  |con flag is set,|
000019d0  20 74 68 65 20 72 6f 75  74 69 6e 65 20 28 61 67  | the routine (ag|
000019e0  61 69 6e 0a 62 79 20 6d  65 61 6e 73 20 6f 66 20  |ain.by means of |
000019f0  61 20 63 61 6c 6c 62 61  63 6b 29 20 73 65 6e 64  |a callback) send|
00001a00  73 20 61 20 6d 65 73 73  61 67 65 20 74 6f 20 63  |s a message to c|
00001a10  6c 65 61 72 20 74 68 65  20 69 63 6f 6e 2c 20 74  |lear the icon, t|
00001a20  68 65 6e 20 73 65 6e 64  73 20 74 68 65 0a 6b 65  |hen sends the.ke|
00001a30  79 70 72 65 73 73 20 63  68 61 72 61 63 74 65 72  |ypress character|
00001a40  2c 20 70 72 65 63 65 64  65 64 20 62 79 20 61 20  |, preceded by a |
00001a50  43 74 72 6c 2d 55 20 74  6f 20 64 65 6c 65 74 65  |Ctrl-U to delete|
00001a60  20 74 68 65 20 74 65 78  74 2e 0a 0a 54 68 65 20  | the text...The |
00001a70  6d 6f 64 75 6c 65 20 69  6e 63 6f 72 70 6f 72 61  |module incorpora|
00001a80  74 65 73 20 61 20 73 65  6c 66 2d 63 68 65 63 6b  |tes a self-check|
00001a90  69 6e 67 20 72 6f 75 74  69 6e 65 20 74 6f 20 64  |ing routine to d|
00001aa0  65 74 65 63 74 20 63 6f  72 72 75 70 74 69 6f 6e  |etect corruption|
00001ab0  20 62 79 0a 76 69 72 75  73 65 73 2e 0a 0a 49 6e  | by.viruses...In|
00001ac0  63 69 64 65 6e 74 61 6c  6c 79 2c 20 75 73 65 20  |cidentally, use |
00001ad0  6f 66 20 74 68 69 73 20  6d 6f 64 75 6c 65 20 68  |of this module h|
00001ae0  61 73 20 72 65 76 65 61  6c 65 64 20 74 68 61 74  |as revealed that|
00001af0  20 74 68 65 20 63 6f 6e  66 69 67 75 72 61 74 69  | the configurati|
00001b00  6f 6e 0a 64 69 61 6c 6f  67 75 65 20 62 6f 78 20  |on.dialogue box |
00001b10  6f 66 20 50 43 20 45 6d  75 6c 61 74 6f 72 20 76  |of PC Emulator v|
00001b20  31 2e 37 30 20 63 6f 6e  74 61 69 6e 73 20 61 20  |1.70 contains a |
00001b30  77 72 69 74 61 62 6c 65  20 69 63 6f 6e 20 77 68  |writable icon wh|
00001b40  69 63 68 20 77 61 73 20  63 72 65 61 74 65 64 0a  |ich was created.|
00001b50  69 6e 20 69 74 73 20 69  6e 76 65 72 74 65 64 20  |in its inverted |
00001b60  73 74 61 74 65 2e 20 49  74 73 20 72 65 73 70 6f  |state. Its respo|
00001b70  6e 73 65 20 74 6f 20 61  20 64 6f 75 62 6c 65 2d  |nse to a double-|
00001b80  63 6c 69 63 6b 20 69 73  20 74 6f 20 72 65 6d 61  |click is to rema|
00001b90  69 6e 0a 62 6c 61 63 6b  2d 6f 6e 2d 77 68 69 74  |in.black-on-whit|
00001ba0  65 2e 20 41 20 73 75 62  73 65 71 75 65 6e 74 20  |e. A subsequent |
00001bb0  73 69 6e 67 6c 65 20 63  6c 69 63 6b 20 63 6c 65  |single click cle|
00001bc0  61 72 73 20 69 74 20 74  6f 20 77 68 69 74 65 2d  |ars it to white-|
00001bd0  6f 6e 2d 62 6c 61 63 6b  21 0a 0a 50 6c 65 61 73  |on-black!..Pleas|
00001be0  65 20 73 65 6e 64 20 61  6c 6c 20 63 6f 6d 6d 65  |e send all comme|
00001bf0  6e 74 73 20 61 6e 64 20  73 75 67 67 65 73 74 69  |nts and suggesti|
00001c00  6f 6e 73 20 74 6f 3a 0a  0a 4d 2e 50 2e 20 46 6f  |ons to:..M.P. Fo|
00001c10  78 2c 0a 33 31 20 50 69  65 72 73 6f 6e 20 52 6f  |x,.31 Pierson Ro|
00001c20  61 64 2c 0a 57 69 6e 64  73 6f 72 2c 0a 42 65 72  |ad,.Windsor,.Ber|
00001c30  6b 73 2e 20 53 4c 34 20  35 52 45                 |ks. SL4 5RE|
00001c3b