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.
R1 = pointer to icon block R2 = &5441534B ('KSAT') R3 = context flags : bit 0 if set R6 = background colour, R7 = sprite area if clear R6 = window handle to use for the colours and sprite area bit 1 if set icon should be treated as if the pointer were over it if clear icon should be treated as if the pointer were elsewhere bits 2-31 reserved, 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 corrupt 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.
This documentation is copyright 3QD Developments Ltd 2013 and may not be reproduced or published in any form without the copyright holders permission. RISC OS is subject to continuous development and improvement as such all information is reproduced by 3QD Developments Ltd in good faith and is believed to be correct at the time of publication E&OE. 3QD Developments Ltd cannot accept any liability for any loss or damage arising from the use of any information provided as part of the RISC OS Documentation.
HTML document version 1.03 3rd November 2015