Wimp_PlotIcon

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 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

Wimp_PlotIconSWI &400E2
Plot an icon, optionally outside of the redraw loop
R1=Pointer to icon block
R2=&5441534B ('KSAT')
R3=Context flags:
Bit(s)Meaning
0If set: R6 contains background colour and R7 contains sprite area. If clear: R6 contains a window handle to use for the colours and sprite area
1If set: icon should be treated as if the pointer were over it. If clear: icon should be treated as if the pointer were elsewhere
2-31Reserved, must be 0
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
Interrupts are undefined
Fast interrupts are undefined
Processor is in undefined mode
Not defined

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.