******************************************************************
*                                                                *
*                                                                *
*          Title : Filer Action Window                           *
*                                                                *
*  Change Record : 0.00 22/08/90 JRoach Started                  *
*                  0.01 22/08/90 JRoach First improvements after *
*                                       feedback from users      *
*                                                                *
*                                                                *
******************************************************************

What is it?
-----------

The Filer Action Window is a module which performs file manipulation
operations for the Filer without the desktop hanging whilst they are under
way.

Overview of driving it
----------------------

To drive Filer_Action you:
1) Wimp_StartTask with a command of *Filer_Action
2) Send a sequence of messages to the new task describing the activity:
        *  Specify the directory in which the objects that are going to be
           actied upon exist (using Message_FilerSelectionDirectory).
        *  Specify the objects in the directory (using several
           Message_FilerAddSelection messages).
        *  Start the action using Message_FilerAction.

Filer_Action will sort out its own slot size as appropriate. If no messages
are sent, then Filer_Action will kill itself.

Controlling the Filer_Action task.
----------------------------------

To set the Filer_Action going, the following messages are sent:
Message_FilerSelectionDirectory (&403)
Message_FilerAddSelection       (&404)
Message_FilerAction             (&405)
The selection directory is the name of the directory in which the selection
of files being operated upon lies. AddSelection sends a set of files which
are to be added to the list of files in the selected directory. You should
just send a space separated list of leaf names of the selected objects.
FilerAction starts the operation going.

Once the Filer_Action is going it can be controlled by messages:
Message_FilerControlAction      (&406)

Details of the messages.
------------------------

Message_FilerSelectionDirectory
The data for this message should be a nul-terminated name of a directory.
Sending this message clears out the current selection of files.

Message_FilerAddSelection
The data for this message should be a nul-terminated string which is a space
separated list of leaf names of objects in the selection directory which are
to be operated upon. This adds the given names to the list.

Message_FilerAction
The format of the data for this message takes the following form:
Word    Meaning
0       Operation to be performed:
          0    Copy
                Copy a number of objects from one directory to another
          1    Move (rename)
                Move a number of objects from one directory to another
                by trying a rename first then doing a copy/delete if that
                fails
          2    Delete
                Delete a number of objects in a particular directory
          3    Set access
                Set the access of a number of objects to a given value
          4    Set type
                Set the file type of a number of objects to a given value
          5    Count
                Count the file sizes of the selected objects
          6    Move (by copying and deleting afterwards)
                Move a number of objects from one directory by copying
                them then deleting the source
          7    Copy local (within directory)
                Copy a single object to a different name in the same directory
          8    Stamp files
                Stamp the selected objects with the time when they get stamped
          9    Find file
                Find an object with a given name.
1       Option bits
        Bit     Meaning when set
         0        Verbose
         1        Confirm
         2        Force
         3        Newer (as opposed to copying always)
         4        Recurse (only applies to access)
2 onwards
        Information specific to the particular operation:
        Operation               Meaning
        0 Copy                  nul terminated destination directory
        1 Move (rename)         nul terminated destination directory
        2 Delete                unused
        3 Set access            How to set the access
                                  The 1st two bytes are the access values to be set
                                  The 2nd two bytes are a mask which, when set, disable
                                    the corresponding access bit from being set
        4 Set type              Numeric file type to set
        5 Count                 unused
        6 Move (copy/delete)    nul terminated destination directory
        7 Copy local            nul terminated destination object name
        8 Stamp                 unused
        9 Find                  nul terminated name of object to find

Message_FilerControlAction
The 1st word determins what control is to be performed:
0       Acknowledge the control message (to check FilerAction is still going)
1       Show the action window (turn verbose on)
2       Hide the action window (turn verbose off)

SWIs to help sending these messages
-----------------------------------

These SWIs provide a convenient means to package up and send the above
messages:
FilerAction_SendSelectedDirectory
r0 = Task handle to send the message to
r2 = pointer to nul terminated directory name.

FilerAction_SendSelectedFile
r0 = Task handle to send the message to
r1 = pointer to a nul terminated leaf name

FilerAction_SendStartOperation
r0 = Task handle to send the message to
r1 = operation id to start
r2 = option bits
r3 = pointer to operation specific data
r4 = length of operation specific data
        (NOTE: Strings INCLUDE the terminator in the length)
