; Assembler header file for Filer
; Written by DefMod (Dec  9 2012) on Sun Dec  9 15:43:43 2012
; Jonathan Coxhead, jonathan@doves.demon.co.uk, 23 June 1995

; OSLib---efficient, type-safe, transparent, extensible,
; register-safe API coverage of RISC OS
; 
; Copyright (c) 1994-2012 Jonathan Coxhead and OSLib maintainers
; 
; Licence:
; 
;    OSLib is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 1, or (at your option)
; any later version - and this with the following clarification and
; special exception:
; 
;    Linking this library statically or dynamically with other modules
; is making a combined work based on this library. Thus, the terms
; and conditions of the GNU General Public License cover the whole
; combination.
; 
;    As a special exception, the copyright holders of this library
; give you permission to link this library with independent modules
; to produce an executable, regardless of the license terms of these
; independent modules, and to copy and distribute the resulting
; executable under terms of your choice, provided that you also meet,
; for each linked independent module, the terms and conditions of the
; license of that module. An independent module is a module which is
; not derived from or based on this library. If you modify this
; library, you may extend this exception to your version of the library,
; but you are not obliged to do so. If you do not wish to do so, delete
; this exception statement from your version.
; 
;    OSLib is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
; 
;    You should have received a copy of the GNU General Public License
; along with this programme; if not, write to the Free Software
; Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, USA.

        [       :LNOT: :DEF: Filer_Hdr
        GBLS    Filer_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

        [       :LNOT: :DEF: Get_Wimp
        GBLS    Get_Wimp
        ]
        [       :LNOT: :DEF: Wimp_Hdr
Get_Wimp                        SETS    "GET oslib/Wimp.Hdr"
        |
Get_Wimp                        SETS    ""
        ]
        $Get_Wimp

        [       :LNOT: :DEF: Get_FileSwitch
        GBLS    Get_FileSwitch
        ]
        [       :LNOT: :DEF: FileSwitch_Hdr
Get_FileSwitch                  SETS    "GET oslib/FileSwitch.Hdr"
        |
Get_FileSwitch                  SETS    ""
        ]
        $Get_FileSwitch

        [       :LNOT: :DEF: Get_FilerAction
        GBLS    Get_FilerAction
        ]
        [       :LNOT: :DEF: FilerAction_Hdr
Get_FilerAction                 SETS    "GET oslib/FilerAction.Hdr"
        |
Get_FilerAction                 SETS    ""
        ]
        $Get_FilerAction

;Symbols for constants
Error_FilerNoRecursion          *       &B80
Error_FilerNoTemplate           *       &B81
Error_FilerFailedSave           *       &B82
Error_FilerBadPath              *       &B83
Message_FilerOpenDir            *       &400
Message_FilerCloseDir           *       &401
Message_FilerOpenDirAt          *       &402
Message_FilerSelectionDir       *       &403
Message_FilerAddSelection       *       &404
Message_FilerAction             *       &405
Message_FilerControlAction      *       &406
Message_FilerSelection          *       &407
Message_FilerDeviceDir          *       &408
Filer_FormatNative              *       &1
Filer_DirNoncanonical           *       &1
Filer_DisplayLargeIcons         *       &0
Filer_DisplaySmallIcons         *       &1
Filer_DisplayFullInfo           *       &2
Filer_Display                   *       &3
Filer_DisplayShift              *       0
Filer_SortByName                *       &0
Filer_SortBySize                *       &1
Filer_SortByType                *       &2
Filer_SortByDate                *       &3
Filer_Sort                      *       &C
Filer_SortShift                 *       2
Filer_GivenDisplay              *       &10
Filer_GivenSort                 *       &20
Filer_ControlAcknowledge        *       &0
Filer_ControlVerboseOn          *       &1
Filer_ControlVerboseOff         *       &2

;Symbols for structure offsets and sizes
        ^       0
        #       Int
Filer_Control                   *       @

        ^       0
Filer_MessageOpenDir_fs_no      #       FileSwitch_FSNo
Filer_MessageOpenDir_reserved   #       3*Byte
Filer_MessageOpenDir_flags      #       Bits
Filer_MessageOpenDir_dir_name   #       228*Char
Filer_MessageOpenDir            *       @

        ^       0
Filer_MessageOpenDirAt_fs_no    #       FileSwitch_FSNo
Filer_MessageOpenDirAt_reserved #       3*Byte
Filer_MessageOpenDirAt_flags    #       Bits
Filer_MessageOpenDirAt_at       #       OS_Coord
Filer_MessageOpenDirAt_width    #       Int
Filer_MessageOpenDirAt_height   #       Int
Filer_MessageOpenDirAt_display  #       Byte
Filer_MessageOpenDirAt_dir_name #       211*Char
Filer_MessageOpenDirAt          *       @

        ^       0
Filer_MessageSelectionDir_dir_name #       236*Char
Filer_MessageSelectionDir       *       @

        ^       0
Filer_MessageAddSelection_leaf_list #       236*Char
Filer_MessageAddSelection       *       @

        ^       0
Filer_MessageAction_operation   #       FilerAction_Operation
Filer_MessageAction_options     #       FilerAction_Flags
Filer_MessageAction_data        *       @
Filer_MessageAction_data_destination_dir_name #       228*Char
        ^       Filer_MessageAction_data
Filer_MessageAction_data_access_access #       Short
Filer_MessageAction_data_access_mask #       Short
        ^       Filer_MessageAction_data
Filer_MessageAction_data_file_type #       Bits
        ^       Filer_MessageAction_data
Filer_MessageAction_data_find_leaf #       228*Char
Filer_MessageAction             *       @

        ^       0
Filer_MessageControlAction_control #       Filer_Control
Filer_MessageControlAction      *       @

        ^       0
Filer_MessageSelection_bbox     #       OS_Box
Filer_MessageSelection_width    #       Int
Filer_MessageSelection_height   #       Int
Filer_MessageSelection_display  #       Bits
Filer_MessageSelection_col0     #       Int
Filer_MessageSelection_row0     #       Int
Filer_MessageSelection_col1     #       Int
Filer_MessageSelection_row1     #       Int
Filer_MessageSelection          *       @

        ^       0
Filer_MessageDeviceDir_path_name #       236*Char
Filer_MessageDeviceDir          *       @

        ^       0
Filer_FullMessageOpenDir        Wimp_MessageHeader_MEMBERS
Filer_FullMessageOpenDir_fs_no  #       FileSwitch_FSNo
Filer_FullMessageOpenDir_reserved #       3*Byte
Filer_FullMessageOpenDir_flags  #       Bits
Filer_FullMessageOpenDir_dir_name #       228*Char
Filer_FullMessageOpenDir        *       @

        ^       0
Filer_FullMessageOpenDirAt      Wimp_MessageHeader_MEMBERS
Filer_FullMessageOpenDirAt_fs_no #       FileSwitch_FSNo
Filer_FullMessageOpenDirAt_reserved #       3*Byte
Filer_FullMessageOpenDirAt_flags #       Bits
Filer_FullMessageOpenDirAt_at   #       OS_Coord
Filer_FullMessageOpenDirAt_width #       Int
Filer_FullMessageOpenDirAt_height #       Int
Filer_FullMessageOpenDirAt_display #       Byte
Filer_FullMessageOpenDirAt_dir_name #       211*Char
Filer_FullMessageOpenDirAt      *       @

        ^       0
Filer_FullMessageSelectionDir   Wimp_MessageHeader_MEMBERS
Filer_FullMessageSelectionDir_dir_name #       236*Char
Filer_FullMessageSelectionDir   *       @

        ^       0
Filer_FullMessageAddSelection   Wimp_MessageHeader_MEMBERS
Filer_FullMessageAddSelection_leaf_list #       236*Char
Filer_FullMessageAddSelection   *       @

        ^       0
Filer_FullMessageAction         Wimp_MessageHeader_MEMBERS
Filer_FullMessageAction_operation #       FilerAction_Operation
Filer_FullMessageAction_options #       FilerAction_Flags
Filer_FullMessageAction_data    *       @
Filer_FullMessageAction_data_destination_dir_name #       228*Char
        ^       Filer_FullMessageAction_data
Filer_FullMessageAction_data_access_access #       Short
Filer_FullMessageAction_data_access_mask #       Short
        ^       Filer_FullMessageAction_data
Filer_FullMessageAction_data_file_type #       Bits
        ^       Filer_FullMessageAction_data
Filer_FullMessageAction_data_find_leaf #       228*Char
Filer_FullMessageAction         *       @

        ^       0
Filer_FullMessageControlAction  Wimp_MessageHeader_MEMBERS
Filer_FullMessageControlAction_control #       Filer_Control
Filer_FullMessageControlAction  *       @

        ^       0
Filer_FullMessageSelection      Wimp_MessageHeader_MEMBERS
Filer_FullMessageSelection_bbox #       OS_Box
Filer_FullMessageSelection_width #       Int
Filer_FullMessageSelection_height #       Int
Filer_FullMessageSelection_display #       Bits
Filer_FullMessageSelection_col0 #       Int
Filer_FullMessageSelection_row0 #       Int
Filer_FullMessageSelection_col1 #       Int
Filer_FullMessageSelection_row1 #       Int
Filer_FullMessageSelection      *       @

        ^       0
Filer_FullMessageDeviceDir      Wimp_MessageHeader_MEMBERS
Filer_FullMessageDeviceDir_path_name #       236*Char
Filer_FullMessageDeviceDir      *       @

        ^       0
Filer_Format_next               #       Ptr
Filer_Format_menu_text          #       Ptr
Filer_Format_help_text          #       Ptr
Filer_Format_disc_format_swi    #       Int
Filer_Format_disc_format_handle #       Int
Filer_Format_layout_structure_swi #       Int
Filer_Format_layout_structure_handle #       Int
Filer_Format_flags              #       Bits
Filer_Format                    *       @


;Symbols for SWI's and SWI reason codes
Service_StartFiler              *       &4B
   ;Entry
   ;  R0 = task (Wimp_T)
   ;  R1 = &4B
   ;Exit
   ;  R0 -> command (String)
   ;  R1 = unclaimed (Bool)

Service_StartedFiler            *       &4C
   ;Entry
   ;  R1 = &4C

Service_FilerDying              *       &4F
   ;Entry
   ;  R1 = &4F

Service_EnumerateFormats        *       &6A
   ;Entry
   ;  R1 = &6A
   ;  R2 = format_list (pointer to Filer_Format)
   ;Exit
   ;  R2 = format_list_out (pointer to Filer_Format)

Service_DiscDismounted          *       &7D
   ;Entry
   ;  R1 = &7D
   ;  R2 -> disc_name (String)

        ]
        END
