home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / oslib / h / fileractio < prev    next >
Encoding:
Text File  |  1994-09-14  |  10.4 KB  |  322 lines

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