home *** CD-ROM | disk | FTP | other *** search
- #ifndef filer_H
- #define filer_H
-
- /* C header file for Filer
- * written by DefMod (Sep 7 1994) on Wed Sep 14 13:19:09 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 Service_StartFiler
- #define Service_StartFiler 0x4B
- #undef Service_StartedFiler
- #define Service_StartedFiler 0x4C
- #undef Service_FilerDying
- #define Service_FilerDying 0x4F
- #undef Service_EnumerateFormats
- #define Service_EnumerateFormats 0x6A
- #undef Service_DiscDismounted
- #define Service_DiscDismounted 0x7D
-
- /************************************
- * Structure and union declarations *
- ************************************/
- typedef struct filer_message_dir filer_message_dir;
- typedef struct filer_message_open_dir_at filer_message_open_dir_at;
- typedef struct filer_message_selection_dir filer_message_selection_dir;
- typedef struct filer_message_add_selection filer_message_add_selection;
- typedef struct filer_message_action filer_message_action;
- typedef struct filer_message_control_action filer_message_control_action;
- typedef struct filer_message_selection filer_message_selection;
- typedef struct filer_format filer_format;
-
- /********************
- * Type definitions *
- ********************/
- struct filer_message_dir
- { int fs_no;
- bits flags;
- char dir_name [228];
- };
-
- struct filer_message_open_dir_at
- { int fs_no;
- bits flags;
- os_coord at;
- int width;
- int height;
- byte display;
- char dir_name [211];
- };
-
- struct filer_message_selection_dir
- { char dir_name [236];
- };
-
- struct filer_message_add_selection
- { char leaf_list [236];
- };
-
- struct filer_message_action
- { int operation;
- bits options;
- union
- { char destination_dir_name [228];
- struct
- { short access;
- short mask;
- }
- access;
- bits file_type;
- char find_leaf [228];
- }
- data;
- };
-
- struct filer_message_control_action
- { int control;
- };
-
- struct filer_message_selection
- { os_box bbox;
- int width;
- int height;
- bits display;
- int col0;
- int row0;
- int col1;
- int row1;
- };
-
- struct filer_format
- { filer_format *next;
- char *menu_text;
- char *help_text;
- int disc_format_swi;
- int disc_format_handle;
- int layout_structure_swi;
- int layout_structure_handle;
- bits flags;
- };
-
- /************************
- * Constant definitions *
- ************************/
- #define error_FILER_NO_RECURSION 0xB80u
- #define error_FILER_NO_TEMPLATE 0xB81u
- #define error_FILER_FAILED_SAVE 0xB82u
- #define error_FILER_BAD_PATH 0xB83u
- #define message_FILER_OPEN_DIR 0x400u
- #define message_FILER_CLOSE_DIR 0x401u
- #define message_FILER_OPEN_DIR_AT 0x402u
- #define message_FILER_SELECTION_DIR 0x403u
- #define message_FILER_ADD_SELECTION 0x404u
- #define message_FILER_ACTION 0x405u
- #define message_FILER_CONTROL_ACTION 0x406u
- #define message_FILER_SELECTION 0x407u
- #define filer_FORMAT_NATIVE 0x1u
- #define filer_DIR_NONCANONICAL 0x1u
- #define filer_DISPLAY_LARGE_ICONS 0x0u
- #define filer_DISPLAY_SMALL_ICONS 0x1u
- #define filer_DISPLAY_FULL_INFO 0x2u
- #define filer_DISPLAY 0x3u
- #define filer_DISPLAY_SHIFT 0
- #define filer_SORT_BY_NAME 0x0u
- #define filer_SORT_BY_SIZE 0x1u
- #define filer_SORT_BY_TYPE 0x2u
- #define filer_SORT_BY_DATE 0x3u
- #define filer_SORT 0xCu
- #define filer_SORT_SHIFT 2
- #define filer_GIVEN_DISPLAY 0x10u
- #define filer_GIVEN_SORT 0x20u
- #define filer_CONTROL_ACKNOWLEDGE 0
- #define filer_CONTROL_VERBOSE_ON 1
- #define filer_CONTROL_VERBOSE_OFF 2
-
- /*************************
- * 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: service_start_filer()
- *
- * Description: Request to filing-system-specific desktop filers to start
- * up
- *
- * Input: task - value of R0 on entry
- *
- * Output: command - value of R0 on exit
- * unclaimed - value of R1 on exit (X version only)
- *
- * Returns: R1 (non-X version only)
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x4B.
- */
-
- extern os_error *xservice_start_filer (wimp_t task,
- char **command,
- bool *unclaimed);
- extern bool service_start_filer (wimp_t task,
- char **command);
-
- /* ------------------------------------------------------------------------
- * Function: service_started_filer()
- *
- * Description: Request to filing-system-specific desktop filers to set
- * task_handle variable to 0
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x4C.
- */
-
- extern os_error *xservice_started_filer (void);
- extern void service_started_filer (void);
-
- /* ------------------------------------------------------------------------
- * Function: service_filer_dying()
- *
- * Description: Notification that the Filer module is about to close down
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x4F.
- */
-
- extern os_error *xservice_filer_dying (void);
- extern void service_filer_dying (void);
-
- /* ------------------------------------------------------------------------
- * Function: service_enumerate_formats()
- *
- * Description: Enumerate available disc formats
- *
- * Input: format_list - value of R2 on entry
- *
- * Output: format_list_out - value of R2 on exit
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x6A.
- */
-
- extern os_error *xservice_enumerate_formats (filer_format *format_list,
- filer_format **format_list_out);
- extern void service_enumerate_formats (filer_format *format_list,
- filer_format **format_list_out);
-
- /* ------------------------------------------------------------------------
- * Function: service_disc_dismounted()
- *
- * Description: Disc dismounted
- *
- * Input: disc_name - value of R2 on entry
- *
- * Other notes: Calls SWI 0x30 with R1 = 0x7D.
- */
-
- extern os_error *xservice_disc_dismounted (char *disc_name);
- extern void service_disc_dismounted (char *disc_name);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-