home *** CD-ROM | disk | FTP | other *** search
- #ifndef fileraction_H
- #define fileraction_H
-
- /* C header file for FilerAction
- * written by DefMod (Sep 7 1994) on Wed Sep 14 13:19:06 1994
- * Copyright © Acorn Computers Ltd, 1994
- */
-
- /*************************************************************************
- * This source file was written by Acorn Computers Limited. It is part *
- * of the OSLib library for writing applications for RISC OS. It may be *
- * used freely in the creation of programs for RISC OS. *
- *************************************************************************/
-
- #ifndef types_H
- #include "types.h"
- #endif
-
- #ifndef os_H
- #include "os.h"
- #endif
-
- #ifndef wimp_H
- #include "wimp.h"
- #endif
-
- /**********************************
- * SWI names and SWI reason codes *
- **********************************/
- #undef FilerAction_SendSelectedDirectory
- #define FilerAction_SendSelectedDirectory 0x40F80
- #undef XFilerAction_SendSelectedDirectory
- #define XFilerAction_SendSelectedDirectory 0x60F80
- #undef FilerAction_SendSelectedFile
- #define FilerAction_SendSelectedFile 0x40F81
- #undef XFilerAction_SendSelectedFile
- #define XFilerAction_SendSelectedFile 0x60F81
- #undef FilerAction_SendStartOperation
- #define FilerAction_SendStartOperation 0x40F82
- #undef XFilerAction_SendStartOperation
- #define XFilerAction_SendStartOperation 0x60F82
- #undef FilerActionSendStartOperation_Copy
- #define FilerActionSendStartOperation_Copy 0x0
- #undef FilerActionSendStartOperation_MoveLocal
- #define FilerActionSendStartOperation_MoveLocal 0x1
- #undef FilerActionSendStartOperation_Delete
- #define FilerActionSendStartOperation_Delete 0x2
- #undef FilerActionSendStartOperation_Access
- #define FilerActionSendStartOperation_Access 0x3
- #undef FilerActionSendStartOperation_SetType
- #define FilerActionSendStartOperation_SetType 0x4
- #undef FilerActionSendStartOperation_Count
- #define FilerActionSendStartOperation_Count 0x5
- #undef FilerActionSendStartOperation_Move
- #define FilerActionSendStartOperation_Move 0x6
- #undef FilerActionSendStartOperation_CopyLocal
- #define FilerActionSendStartOperation_CopyLocal 0x7
- #undef FilerActionSendStartOperation_Stamp
- #define FilerActionSendStartOperation_Stamp 0x8
- #undef FilerActionSendStartOperation_Find
- #define FilerActionSendStartOperation_Find 0x9
-
- /************************
- * Constant definitions *
- ************************/
- #define fileraction_VERBOSE 0x1u
- #define fileraction_CONFIRM 0x2u
- #define fileraction_FORCE 0x4u
- #define fileraction_NEWER 0x8u
- #define fileraction_RECURSE 0x10u
-
- /*************************
- * Function declarations *
- *************************/
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /*************************************************************
- * NOTE: The following functions provide direct access to *
- * the SWI's noted in the function description. *
- * Please read the relevant PRM section for more *
- * information on their input/output parameters. *
- *************************************************************/
-
- /* ------------------------------------------------------------------------
- * Function: fileraction_send_selected_directory()
- *
- * Description: Sends a message specifying the directory containing the
- * selection
- *
- * Input: task - value of R0 on entry
- * name - value of R1 on entry
- *
- * Other notes: Calls SWI 0x40F80.
- */
-
- extern os_error *xfileraction_send_selected_directory (wimp_t task,
- char *name);
- extern void fileraction_send_selected_directory (wimp_t task,
- char *name);
-
- /* ------------------------------------------------------------------------
- * Function: fileraction_send_selected_file()
- *
- * Description: Sends a message specifying a selected file within the
- * given directory
- *
- * Input: task - value of R0 on entry
- * leaf_name - value of R1 on entry
- *
- * Other notes: Calls SWI 0x40F81.
- */
-
- extern os_error *xfileraction_send_selected_file (wimp_t task,
- char *leaf_name);
- extern void fileraction_send_selected_file (wimp_t task,
- char *leaf_name);
-
- /* ------------------------------------------------------------------------
- * Function: fileractionsendstartoperation_copy()
- *
- * Description: Sends a message to start a copy
- *
- * Input: task - value of R0 on entry
- * flags - value of R2 on entry
- * destination - value of R3 on entry
- * size - value of R4 on entry
- *
- * Other notes: Calls SWI 0x40F82 with R1 = 0x0.
- */
-
- extern os_error *xfileractionsendstartoperation_copy (wimp_t task,
- bits flags,
- char *destination,
- int size);
- extern void fileractionsendstartoperation_copy (wimp_t task,
- bits flags,
- char *destination,
- int size);
-
- /* ------------------------------------------------------------------------
- * Function: fileractionsendstartoperation_move_local()
- *
- * Description: Sends a message to start a move (by renaming)
- *
- * Input: task - value of R0 on entry
- * flags - value of R2 on entry
- * destination - value of R3 on entry
- * size - value of R4 on entry
- *
- * Other notes: Calls SWI 0x40F82 with R1 = 0x1.
- */
-
- extern os_error *xfileractionsendstartoperation_move_local (wimp_t task,
- bits flags,
- char *destination,
- int size);
- extern void fileractionsendstartoperation_move_local (wimp_t task,
- bits flags,
- char *destination,
- int size);
-
- /* ------------------------------------------------------------------------
- * Function: fileractionsendstartoperation_delete()
- *
- * Description: Sends a message to start a delete
- *
- * Input: task - value of R0 on entry
- * flags - value of R2 on entry
- *
- * Other notes: Calls SWI 0x40F82 with R1 = 0x2, R4 = 0x0.
- */
-
- extern os_error *xfileractionsendstartoperation_delete (wimp_t task,
- bits flags);
- extern void fileractionsendstartoperation_delete (wimp_t task,
- bits flags);
-
- /* ------------------------------------------------------------------------
- * Function: fileractionsendstartoperation_access()
- *
- * Description: Sends a message to start an access modification
- *
- * Input: task - value of R0 on entry
- * flags - value of R2 on entry
- * access - value of R3 on entry
- *
- * Other notes: Calls SWI 0x40F82 with R1 = 0x3, R4 = 0x4.
- */
-
- extern os_error *xfileractionsendstartoperation_access (wimp_t task,
- bits flags,
- int *access);
- extern void fileractionsendstartoperation_access (wimp_t task,
- bits flags,
- int *access);
-
- /* ------------------------------------------------------------------------
- * Function: fileractionsendstartoperation_set_type()
- *
- * Description: Sends a message to start a set type
- *
- * Input: task - value of R0 on entry
- * flags - value of R2 on entry
- * file_type - value of R3 on entry
- *
- * Other notes: Calls SWI 0x40F82 with R1 = 0x4, R4 = 0x4.
- */
-
- extern os_error *xfileractionsendstartoperation_set_type (wimp_t task,
- bits flags,
- bits *file_type);
- extern void fileractionsendstartoperation_set_type (wimp_t task,
- bits flags,
- bits *file_type);
-
- /* ------------------------------------------------------------------------
- * Function: fileractionsendstartoperation_count()
- *
- * Description: Sends a message to start a count
- *
- * Input: task - value of R0 on entry
- * flags - value of R2 on entry
- *
- * Other notes: Calls SWI 0x40F82 with R1 = 0x5, R4 = 0x0.
- */
-
- extern os_error *xfileractionsendstartoperation_count (wimp_t task,
- bits flags);
- extern void fileractionsendstartoperation_count (wimp_t task,
- bits flags);
-
- /* ------------------------------------------------------------------------
- * Function: fileractionsendstartoperation_move()
- *
- * Description: Sends a message to start a move (by copying and deleting)
- *
- * Input: task - value of R0 on entry
- * flags - value of R2 on entry
- * destination - value of R3 on entry
- * size - value of R4 on entry
- *
- * Other notes: Calls SWI 0x40F82 with R1 = 0x6.
- */
-
- extern os_error *xfileractionsendstartoperation_move (wimp_t task,
- bits flags,
- char *destination,
- int size);
- extern void fileractionsendstartoperation_move (wimp_t task,
- bits flags,
- char *destination,
- int size);
-
- /* ------------------------------------------------------------------------
- * Function: fileractionsendstartoperation_copy_local()
- *
- * Description: Sends a message to start a copy within a directory
- *
- * Input: task - value of R0 on entry
- * flags - value of R2 on entry
- * destination - value of R3 on entry
- * size - value of R4 on entry
- *
- * Other notes: Calls SWI 0x40F82 with R1 = 0x7.
- */
-
- extern os_error *xfileractionsendstartoperation_copy_local (wimp_t task,
- bits flags,
- char *destination,
- int size);
- extern void fileractionsendstartoperation_copy_local (wimp_t task,
- bits flags,
- char *destination,
- int size);
-
- /* ------------------------------------------------------------------------
- * Function: fileractionsendstartoperation_stamp()
- *
- * Description: Sends a message to start a stamp
- *
- * Input: task - value of R0 on entry
- * flags - value of R2 on entry
- *
- * Other notes: Calls SWI 0x40F82 with R1 = 0x8, R4 = 0x0.
- */
-
- extern os_error *xfileractionsendstartoperation_stamp (wimp_t task,
- bits flags);
- extern void fileractionsendstartoperation_stamp (wimp_t task,
- bits flags);
-
- /* ------------------------------------------------------------------------
- * Function: fileractionsendstartoperation_find()
- *
- * Description: Sends a message to start a file search
- *
- * Input: task - value of R0 on entry
- * flags - value of R2 on entry
- * file_name - value of R3 on entry
- * size - value of R4 on entry
- *
- * Other notes: Calls SWI 0x40F82 with R1 = 0x9.
- */
-
- extern os_error *xfileractionsendstartoperation_find (wimp_t task,
- bits flags,
- char *file_name,
- int size);
- extern void fileractionsendstartoperation_find (wimp_t task,
- bits flags,
- char *file_name,
- int size);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-