Wimp_Extend 258

Introduction and Overview

This call reads the colour mapping translation which the Wimp uses when rendering a sprite.

SWI Calls

Wimp_Extend 102Wimp_Extend_ReadColourMapSWI &400FB
Read colourmap translation for rendering sprite
R0=258 (reason code)
R1=Flags:
Bit(s)Meaning
0-20Reserved, must be 0
21Translation is for selected item
22Translation is for faded item
23Translation is for when pointer over item (not implemented)
24-27Wimp foreground colour for icon (if not in validation)
28-31Wimp background colour for icon (if not in validation)
R2=Window handle, or -1 to use grey 1 as background colour
R3=Pointer to validation string to use, or -1 for none
R4=Background colour &BBGGRR00, or -1 for window colour
R0=Pointer to colourmap descriptor:
OffsetContents
0Workspace for translation function
4Pointer to translation function
Interrupts are undefined
Fast interrupts are undefined
Processor is in undefined mode
Not defined

This SWI is used to read the colourmap translation function for a sprite operation. It should be used where a sprite (or other object) needs to be rendered using the same colour mapping as the Wimp would use. In general it may be better to use Wimp_PlotIcon, but where this is not feasible - for example where additional colour mapping is required, or the user wishes to cache results - this call can be used to obtain the relevant colour mapping function.

The descriptor returned is valid until the next Wimp icon, sprite or window operation, or another call to this function. It is recommended therefore that it only be used by the foreground application and never by transient callback code.

The validation string may contain 'C' or 'T' validations to indicate the state of the image being rendered.