home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / oslib / oslib_1 / OSLib / Computer / h / fileractio < prev    next >
Encoding:
Text File  |  1995-06-22  |  10.3 KB  |  314 lines

  1. #ifndef fileraction_H
  2. #define fileraction_H
  3.  
  4. /* C header file for FilerAction
  5.  * written by DefMod (Jun 20 1995) on Thu Jun 22 12:12:51 1995
  6.  * Jonathan Coxhead, Acorn Computers Ltd
  7.  */
  8.  
  9. #ifndef types_H
  10. #include "types.h"
  11. #endif
  12.  
  13. #ifndef os_H
  14. #include "os.h"
  15. #endif
  16.  
  17. #ifndef wimp_H
  18. #include "wimp.h"
  19. #endif
  20.  
  21. /**********************************
  22.  * SWI names and SWI reason codes *
  23.  **********************************/
  24. #undef  FilerAction_SendSelectedDirectory
  25. #define FilerAction_SendSelectedDirectory       0x40F80
  26. #undef  XFilerAction_SendSelectedDirectory
  27. #define XFilerAction_SendSelectedDirectory      0x60F80
  28. #undef  FilerAction_SendSelectedFile
  29. #define FilerAction_SendSelectedFile            0x40F81
  30. #undef  XFilerAction_SendSelectedFile
  31. #define XFilerAction_SendSelectedFile           0x60F81
  32. #undef  FilerAction_SendStartOperation
  33. #define FilerAction_SendStartOperation          0x40F82
  34. #undef  XFilerAction_SendStartOperation
  35. #define XFilerAction_SendStartOperation         0x60F82
  36. #undef  FilerActionSendStartOperation_Copy
  37. #define FilerActionSendStartOperation_Copy      0x0
  38. #undef  FilerActionSendStartOperation_MoveLocal
  39. #define FilerActionSendStartOperation_MoveLocal 0x1
  40. #undef  FilerActionSendStartOperation_Delete
  41. #define FilerActionSendStartOperation_Delete    0x2
  42. #undef  FilerActionSendStartOperation_Access
  43. #define FilerActionSendStartOperation_Access    0x3
  44. #undef  FilerActionSendStartOperation_SetType
  45. #define FilerActionSendStartOperation_SetType   0x4
  46. #undef  FilerActionSendStartOperation_Count
  47. #define FilerActionSendStartOperation_Count     0x5
  48. #undef  FilerActionSendStartOperation_Move
  49. #define FilerActionSendStartOperation_Move      0x6
  50. #undef  FilerActionSendStartOperation_CopyLocal
  51. #define FilerActionSendStartOperation_CopyLocal 0x7
  52. #undef  FilerActionSendStartOperation_Stamp
  53. #define FilerActionSendStartOperation_Stamp     0x8
  54. #undef  FilerActionSendStartOperation_Find
  55. #define FilerActionSendStartOperation_Find      0x9
  56.  
  57. /********************
  58.  * Type definitions *
  59.  ********************/
  60. typedef bits fileraction_flags;
  61.  
  62. /************************
  63.  * Constant definitions *
  64.  ************************/
  65. #define fileraction_VERBOSE                     ((fileraction_flags) 0x1u)
  66. #define fileraction_CONFIRM                     ((fileraction_flags) 0x2u)
  67. #define fileraction_FORCE                       ((fileraction_flags) 0x4u)
  68. #define fileraction_NEWER                       ((fileraction_flags) 0x8u)
  69. #define fileraction_RECURSE                     ((fileraction_flags) 0x10u)
  70.  
  71. /*************************
  72.  * Function declarations *
  73.  *************************/
  74.  
  75. #ifdef __cplusplus
  76.    extern "C" {
  77. #endif
  78.  
  79. /* ------------------------------------------------------------------------
  80.  * Function:      fileraction_send_selected_directory()
  81.  *
  82.  * Description:   Sends a message specifying the directory containing the
  83.  *                selection
  84.  *
  85.  * Input:         task - value of R0 on entry
  86.  *                name - value of R1 on entry
  87.  *
  88.  * Other notes:   Calls SWI 0x40F80.
  89.  */
  90.  
  91. extern os_error *xfileraction_send_selected_directory (wimp_t task,
  92.       char const *name);
  93. __swi (0x40F80) void fileraction_send_selected_directory (wimp_t task,
  94.       char const *name);
  95.  
  96. /* ------------------------------------------------------------------------
  97.  * Function:      fileraction_send_selected_file()
  98.  *
  99.  * Description:   Sends a message specifying a selected file within the
  100.  *                given directory
  101.  *
  102.  * Input:         task - value of R0 on entry
  103.  *                leaf_name - value of R1 on entry
  104.  *
  105.  * Other notes:   Calls SWI 0x40F81.
  106.  */
  107.  
  108. extern os_error *xfileraction_send_selected_file (wimp_t task,
  109.       char const *leaf_name);
  110. __swi (0x40F81) void fileraction_send_selected_file (wimp_t task,
  111.       char const *leaf_name);
  112.  
  113. /* ------------------------------------------------------------------------
  114.  * Function:      fileractionsendstartoperation_copy()
  115.  *
  116.  * Description:   Sends a message to start a copy
  117.  *
  118.  * Input:         task - value of R0 on entry
  119.  *                flags - value of R2 on entry
  120.  *                destination - value of R3 on entry
  121.  *                size - value of R4 on entry
  122.  *
  123.  * Other notes:   Calls SWI 0x40F82 with R1 = 0x0.
  124.  */
  125.  
  126. extern os_error *xfileractionsendstartoperation_copy (wimp_t task,
  127.       fileraction_flags flags,
  128.       char const *destination,
  129.       int size);
  130. extern void fileractionsendstartoperation_copy (wimp_t task,
  131.       fileraction_flags flags,
  132.       char const *destination,
  133.       int size);
  134.  
  135. /* ------------------------------------------------------------------------
  136.  * Function:      fileractionsendstartoperation_move_local()
  137.  *
  138.  * Description:   Sends a message to start a move (by renaming)
  139.  *
  140.  * Input:         task - value of R0 on entry
  141.  *                flags - value of R2 on entry
  142.  *                destination - value of R3 on entry
  143.  *                size - value of R4 on entry
  144.  *
  145.  * Other notes:   Calls SWI 0x40F82 with R1 = 0x1.
  146.  */
  147.  
  148. extern os_error *xfileractionsendstartoperation_move_local (wimp_t task,
  149.       fileraction_flags flags,
  150.       char const *destination,
  151.       int size);
  152. extern void fileractionsendstartoperation_move_local (wimp_t task,
  153.       fileraction_flags flags,
  154.       char const *destination,
  155.       int size);
  156.  
  157. /* ------------------------------------------------------------------------
  158.  * Function:      fileractionsendstartoperation_delete()
  159.  *
  160.  * Description:   Sends a message to start a delete
  161.  *
  162.  * Input:         task - value of R0 on entry
  163.  *                flags - value of R2 on entry
  164.  *
  165.  * Other notes:   Calls SWI 0x40F82 with R1 = 0x2, R4 = 0x0.
  166.  */
  167.  
  168. extern os_error *xfileractionsendstartoperation_delete (wimp_t task,
  169.       fileraction_flags flags);
  170. extern void fileractionsendstartoperation_delete (wimp_t task,
  171.       fileraction_flags flags);
  172.  
  173. /* ------------------------------------------------------------------------
  174.  * Function:      fileractionsendstartoperation_access()
  175.  *
  176.  * Description:   Sends a message to start an access modification
  177.  *
  178.  * Input:         task - value of R0 on entry
  179.  *                flags - value of R2 on entry
  180.  *                access - value of R3 on entry
  181.  *
  182.  * Other notes:   Calls SWI 0x40F82 with R1 = 0x3, R4 = 0x4.
  183.  */
  184.  
  185. extern os_error *xfileractionsendstartoperation_access (wimp_t task,
  186.       fileraction_flags flags,
  187.       int const *access);
  188. extern void fileractionsendstartoperation_access (wimp_t task,
  189.       fileraction_flags flags,
  190.       int const *access);
  191.  
  192. /* ------------------------------------------------------------------------
  193.  * Function:      fileractionsendstartoperation_set_type()
  194.  *
  195.  * Description:   Sends a message to start a set type
  196.  *
  197.  * Input:         task - value of R0 on entry
  198.  *                flags - value of R2 on entry
  199.  *                file_type - value of R3 on entry
  200.  *
  201.  * Other notes:   Calls SWI 0x40F82 with R1 = 0x4, R4 = 0x4.
  202.  */
  203.  
  204. extern os_error *xfileractionsendstartoperation_set_type (wimp_t task,
  205.       fileraction_flags flags,
  206.       bits const *file_type);
  207. extern void fileractionsendstartoperation_set_type (wimp_t task,
  208.       fileraction_flags flags,
  209.       bits const *file_type);
  210.  
  211. /* ------------------------------------------------------------------------
  212.  * Function:      fileractionsendstartoperation_count()
  213.  *
  214.  * Description:   Sends a message to start a count
  215.  *
  216.  * Input:         task - value of R0 on entry
  217.  *                flags - value of R2 on entry
  218.  *
  219.  * Other notes:   Calls SWI 0x40F82 with R1 = 0x5, R4 = 0x0.
  220.  */
  221.  
  222. extern os_error *xfileractionsendstartoperation_count (wimp_t task,
  223.       fileraction_flags flags);
  224. extern void fileractionsendstartoperation_count (wimp_t task,
  225.       fileraction_flags flags);
  226.  
  227. /* ------------------------------------------------------------------------
  228.  * Function:      fileractionsendstartoperation_move()
  229.  *
  230.  * Description:   Sends a message to start a move (by copying and deleting)
  231.  *
  232.  * Input:         task - value of R0 on entry
  233.  *                flags - value of R2 on entry
  234.  *                destination - value of R3 on entry
  235.  *                size - value of R4 on entry
  236.  *
  237.  * Other notes:   Calls SWI 0x40F82 with R1 = 0x6.
  238.  */
  239.  
  240. extern os_error *xfileractionsendstartoperation_move (wimp_t task,
  241.       fileraction_flags flags,
  242.       char const *destination,
  243.       int size);
  244. extern void fileractionsendstartoperation_move (wimp_t task,
  245.       fileraction_flags flags,
  246.       char const *destination,
  247.       int size);
  248.  
  249. /* ------------------------------------------------------------------------
  250.  * Function:      fileractionsendstartoperation_copy_local()
  251.  *
  252.  * Description:   Sends a message to start a copy within a directory
  253.  *
  254.  * Input:         task - value of R0 on entry
  255.  *                flags - value of R2 on entry
  256.  *                destination - value of R3 on entry
  257.  *                size - value of R4 on entry
  258.  *
  259.  * Other notes:   Calls SWI 0x40F82 with R1 = 0x7.
  260.  */
  261.  
  262. extern os_error *xfileractionsendstartoperation_copy_local (wimp_t task,
  263.       fileraction_flags flags,
  264.       char const *destination,
  265.       int size);
  266. extern void fileractionsendstartoperation_copy_local (wimp_t task,
  267.       fileraction_flags flags,
  268.       char const *destination,
  269.       int size);
  270.  
  271. /* ------------------------------------------------------------------------
  272.  * Function:      fileractionsendstartoperation_stamp()
  273.  *
  274.  * Description:   Sends a message to start a stamp
  275.  *
  276.  * Input:         task - value of R0 on entry
  277.  *                flags - value of R2 on entry
  278.  *
  279.  * Other notes:   Calls SWI 0x40F82 with R1 = 0x8, R4 = 0x0.
  280.  */
  281.  
  282. extern os_error *xfileractionsendstartoperation_stamp (wimp_t task,
  283.       fileraction_flags flags);
  284. extern void fileractionsendstartoperation_stamp (wimp_t task,
  285.       fileraction_flags flags);
  286.  
  287. /* ------------------------------------------------------------------------
  288.  * Function:      fileractionsendstartoperation_find()
  289.  *
  290.  * Description:   Sends a message to start a file search
  291.  *
  292.  * Input:         task - value of R0 on entry
  293.  *                flags - value of R2 on entry
  294.  *                file_name - value of R3 on entry
  295.  *                size - value of R4 on entry
  296.  *
  297.  * Other notes:   Calls SWI 0x40F82 with R1 = 0x9.
  298.  */
  299.  
  300. extern os_error *xfileractionsendstartoperation_find (wimp_t task,
  301.       fileraction_flags flags,
  302.       char const *file_name,
  303.       int size);
  304. extern void fileractionsendstartoperation_find (wimp_t task,
  305.       fileraction_flags flags,
  306.       char const *file_name,
  307.       int size);
  308.  
  309. #ifdef __cplusplus
  310.    }
  311. #endif
  312.  
  313. #endif
  314.