The following is the iconize message protocol.

Pinboard acts as the default iconizer.

When the user SHIFT-Select on the close tool the wimp broadcasts the following message:

Message_Iconize:

     +20  Window handle.
     +24  Task handle.
     +28  20 Bytes of title string. (last part of first word)
     +48
                   

If no iconizer loaded

        Nothing happens.

If iconizer loaded

  1. It acknowledges the message. (stops the broadcast)
  2. It sends the following message to the window:
               Message_WindowInfo:
    
                   +20 Window handle
    
               (For old applications)
                             Application ignores the message.
                             Iconizer gets acknowledgement back.
                             Iconizer uses info in the first Message_Iconize to
                             iconize the window.
    
                            sprite used is ic_<task name> or ic_? if not found.
    
               (New applications)
    
    1. If it doesn't want to help it ignores the message.
    2. If it wants to help it replies with the following message:
                             Message_WindowInfo:
      
                                +20 Window handle.
                                +24 Reserved, must be 0.
                                +28 Sprite name to use, null terminated  (MAX = 7
                                    chars + NULL) sprite name used is 
                                    ic_<string>
                                +36 Title string to use null terminated (as short
                                    as possible truncated to 20 characters).
      
                              The iconizer will then use this info to iconize the
                              window.       
      
                              This should enable applications such as edit to give
                              a different icon depending on the file type of
                              the file being edited in the window.
      
                          3.  If the application wants to iconize its own window
                              it acknowledges the original Window_Info                        
                              message, and does all the work itself.
      

      When a window is closed:

                          The wimp broadcasts the following message:
      
                          Message_WindowClosed
      
                          +20 Window handle.
      
                          The iconizer should then remove the icon.
      

      When a task exits:

                          The iconizer should spot the Message_TaskQuit and
                          remove all the icons for that task.
      

      When a new iconizer starts up:

                          It broadcasts a Message_WindowInfo with
      
                          +20 0.   (Window handle 0)
                          +24
                          
                          An iconizer receiving this message should reopen 
                          all iconized windows.
      
                          All applications should ignore such a message.
      

      Current iconizer (Pinboard) behaviour:

                If it does not get a reply to the Message_WindowInfo
                   
                     1. It gets the task name for the task that owns the window.
                        it 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. When shift menu is pressed over an iconized window, the application will receive a normal menu event, new applications should note that the window is iconized and always produce the main menu for the window, even if there is a context specific menu for the current pointer position.