The iconize protocol

This protocol is not available in RISC OS 2.0

If shift is held down when the close tool of a window is clicked, the wimp does not close the window, but instead broadcasts a Message_Iconize.

If no iconizer, such as pinboard and hopefully in the future !Larger, is loaded then nothing happens.

If an iconizer is loaded :
1 It acknowledges the message (stops the broadcast) 2 It sends a Message_WindowInfo to the window.

Old applications ignore the above message when sent and wimp return acknowledgement to the iconizer which then uses the information in the first Message_Iconize to iconize the window.

New applications react as follows :
If it doesn't want to help it will ignore the message. If it wants to help it will reply with a Message_WindowInfo. The iconizer will then use this info to iconize the window. If the application wants to iconize its own window it acknowledges the original Window_Info message, and does all the work itself.

Whenever a window is closed the Wimp broadcasts the message Message_WindowClosed. The iconizer should then remove the icon.

When a task exits the iconizer should spot the Message_TaskQuit and remove all icons for that task.

When a new iconizer starts up it broadcasts a Message_WindowInfo. An iconizer receiving this message should reopen all iconized windows. All applications should ignore such a message.

Pinboard behavior
If it does not get a reply to the Message_WindowInfo:

     1  It gets the task name for the task that owns the window and then
        tries to find a sprite called ic_'task name' in the wimp sprite area.
        If it fails it uses a sprite called ic_? .
     2  It uses the title given in the Message_Iconize.
If it gets a Message_WindowInfo
     1  It tries to find the sprite ic_'name given in message'. If it fails
        it uses ic_? .
     2  It uses the title given in the Message_WindowInfo.

The SWI's ...

Messsage_Iconize (&400CA)
R1+20 window handle
R1+24 task handle for task which owns the window R1+28 20 bytes of title string (last part of first word) R1+48

Message_WindowInfo (&400CC)
R1+20 window handle
R1+24 reserved must be 0
R1+28 sprite name to use, null terminated (MAX=7 chars +NULL) sprite

            name used is icon_string
R1+36 title string to use null terminated (as short as possible
            truncated to 20 characters)

Message_WindowClosed (&400CB)
R1+20 window handle
R1+24