Introduction and Overview
Wimp_PlotIcon has been extended to allow its use more reliably outside of the redraw loop, such as might be required for drawing icons during drag operations. These changes have been made to address a number of issues :
- The new shaded icon operations fade sprites, backgrounds and buttons toward the background colour of the window; without information about the background colour, the fade would not function correctly outside of the redraw loop.
- Without information about the window, sprites rendered from an area associated with a window would generate an error when used outside the redraw loop.
- A future version of the Window Manager may provide facilities for highlighting of icons when the pointer is over them. The changes allow for this to be indicated.
The call has been extended in a similar manner to other Wimp SWI extensions, using a magic word in a previously unused register. In order to allow flexibility without requiring additional magic values, a flags word is used to indicate the extra facilities required. Under systems which use earlier versions of the WindowManager the behaviour will be unaffected by the new flags, however where sprites are taken from a private pool supplied in the extensions the operation will be faulted. Where such operations are expected, alternate measures should be taken to ensure the correct rendering of icons is performed.
SWI Calls
| R1 | = | Pointer to icon block | ||||||||||||
| R2 | = | &5441534B ('KSAT') | ||||||||||||
| R3 | = | Context flags:
| ||||||||||||
| R4 | = | X origin to offset icon by (if outside redraw loop) | ||||||||||||
| R5 | = | Y origin to offset icon by (if outside redraw loop) | ||||||||||||
| R6 | = | Window handle to use as context, or background colour | ||||||||||||
| R7 | = | Sprite area | ||||||||||||
| R0 | = | Corrupted |
| R2 | = | 0 |
This SWI is used to plot an icon. If used within a redraw loop the origin will be that given by the window. If used outside a redraw loop the origin must be supplied by the user. The context flags provide information about the context under which the icon is being rendered.
Note: Under earlier versions of the Window Manager this extension was incorrectly implemented. The incorrect form could have undefined effects when used outside a redraw loop. In order to address this problem, the value used as a magic word has been changed, and the order of registers corrected.