mirror of
https://github.com/elliotnunn/supermario.git
synced 2025-01-20 22:30:04 +00:00
182 lines
4.6 KiB
Plaintext
182 lines
4.6 KiB
Plaintext
; Version: 1.4
|
|
; Created: Friday, January 20, 1990 at 9:11:52 PM
|
|
; File: StandardFile.a
|
|
;
|
|
; Assembler Interface to the Macintosh Libraries
|
|
; Copyright Apple Computer, Inc. 1989
|
|
; All Rights Reserved
|
|
;
|
|
;--------------------------------------------------------------------
|
|
|
|
IF &TYPE('__IncludingStandardFile__') = 'UNDEFINED' THEN
|
|
__IncludingStandardFile__ SET 1
|
|
|
|
|
|
|
|
StandardFileReply RECORD 0
|
|
sfGood DS.B 1 ; ST if OK hit
|
|
sfReplacing DS.B 1 ; ST if user requested "replace existing"
|
|
sfType DS.L 1 ; type of file
|
|
sfFile DS.B 70 ; FSSpec (vRefNum, parID, name)
|
|
sfScript DS.W 1 ; ScriptCode of filename
|
|
sfFlags DS.W 1 ; Finder flags
|
|
sfIsFolder DS.B 1 ; ST if item is a folder
|
|
sfIsVolume DS.B 1 ; ST if item is a volume
|
|
sfReserved1 DS.L 1 ; reserved set to 0
|
|
sfReserved2 DS.W 1 ; reserved set to 0
|
|
ENDR
|
|
|
|
|
|
SFReply RECORD 0
|
|
good DS.B 1 ; ST if OK hit
|
|
copy DS.B 1 ; ST replacing ???
|
|
fType DS.L 1 ; type of file or DirID
|
|
vRefNum DS.W 1 ; vRefNum or WDRefNum
|
|
version DS.W 1 ; unused
|
|
fName DS.B 64 ; name of file
|
|
ENDR
|
|
|
|
; pseudo-item hits for use in DlgHook
|
|
sfHookFirstCall EQU -1
|
|
sfHookCharOffset EQU $1000
|
|
sfHookNullEvent EQU 100
|
|
sfHookRebuildList EQU 101
|
|
sfHookFolderPopUp EQU 102
|
|
sfHookOpenFolder EQU 103
|
|
; the following are only in system 7.0+
|
|
sfHookOpenAlias EQU 104
|
|
sfHookGoToDesktop EQU 105
|
|
sfHookGoToAliasTarget EQU 106
|
|
sfHookGoToParent EQU 107
|
|
sfHookGoToNextDrive EQU 108
|
|
sfHookGoToPrevDrive EQU 109
|
|
sfHookChangeSelection EQU 110
|
|
sfHookSetActiveOffset EQU 200
|
|
sfHookLastCall EQU -2
|
|
|
|
|
|
; resource IDs and item offsets of pre-system 7.0 dialogs
|
|
putDlgID EQU -3999 ; SFPutFile dialog template ID
|
|
putSave EQU 1 ; save button
|
|
putCancel EQU 2 ; cancel button
|
|
putPrompt EQU 3 ; prompt, i.e. Save document as:
|
|
putVolume EQU 4 ; volume icon and name
|
|
putEject EQU 5 ; eject button
|
|
putDrive EQU 6 ; drive button
|
|
putName EQU 7 ; editTExt item for file name
|
|
putNmList EQU 8 ; userItem for file name list
|
|
|
|
|
|
getDlgID EQU -4000 ; SFGetFile dialog template ID
|
|
getOpen EQU 1 ; open button
|
|
getCancel EQU 3 ; cancel button
|
|
getEject EQU 5 ; eject button
|
|
getDrive EQU 6 ; drive button
|
|
getNmList EQU 7 ; userItem for file name list
|
|
getScroll EQU 8 ; userItem for scroll bar
|
|
getGrayBar EQU 9 ; grey line between buttons
|
|
|
|
|
|
; resource IDs and item offsets of system 7.0+ dialogs
|
|
sfPutDialogID EQU -6043;
|
|
sfGetDialogID EQU -6042;
|
|
sfItemOpenButton EQU 1
|
|
sfItemCancelButton EQU 2
|
|
sfItemBalloonHelp EQU 3
|
|
sfItemVolumeUser EQU 4
|
|
sfItemEjectButton EQU 5
|
|
sfItemDesktopButton EQU 6
|
|
sfItemFileListUser EQU 7
|
|
sfItemPopUpMenuUser EQU 8
|
|
sfItemDividerLinePict EQU 9
|
|
sfItemFileNameTextEdit EQU 10
|
|
sfItemPromptStaticText EQU 11
|
|
sfItemNewFolderUser EQU 12
|
|
|
|
|
|
; the refcon field of the dialog record during a modalfilter or dialoghook contains one the following
|
|
sfMainDialogRefCon EQU 'stdf'
|
|
sfNewFolderDialogRefCon EQU 'nfdr'
|
|
sfReplaceDialogRefCon EQU 'rplc'
|
|
sfStatWarnDialogRefCon EQU 'stat'
|
|
sfLockWarnDialogRefCon EQU 'lock'
|
|
sfErrorDialogRefCon EQU 'err '
|
|
|
|
|
|
; Routine selectors
|
|
selectorSFPutFile EQU 1
|
|
selectorSFGetFile EQU 2
|
|
selectorSFPPutFile EQU 3
|
|
selectorSFPGetFile EQU 4
|
|
selectorStandardPutFile EQU 5
|
|
selectorStandareGetFile EQU 6
|
|
selectorCustomPutFile EQU 7
|
|
selectorCustomGetFile EQU 8
|
|
|
|
|
|
|
|
MACRO
|
|
_SFPutFile
|
|
MOVE.W #selectorSFPutFile,-(SP)
|
|
_Pack3
|
|
ENDM
|
|
|
|
MACRO
|
|
_SFGetFile
|
|
MOVE.W #selectorSFGetFile,-(SP)
|
|
_Pack3
|
|
ENDM
|
|
|
|
MACRO
|
|
_SFPPutFile
|
|
MOVE.W #selectorSFPPutFile,-(SP)
|
|
_Pack3
|
|
ENDM
|
|
|
|
MACRO
|
|
_SFPGetFile
|
|
MOVE.W #selectorSFPGetFile,-(SP)
|
|
_Pack3
|
|
ENDM
|
|
|
|
MACRO
|
|
_StandardPutFile
|
|
MOVE.W #selectorStandardPutFile,-(SP)
|
|
_Pack3
|
|
ENDM
|
|
|
|
MACRO
|
|
_StandardGetFile
|
|
MOVE.W #selectorStandareGetFile,-(SP)
|
|
_Pack3
|
|
ENDM
|
|
|
|
MACRO
|
|
_CustomPutFile
|
|
MOVE.W #selectorCustomPutFile,-(SP)
|
|
_Pack3
|
|
ENDM
|
|
|
|
MACRO
|
|
_CustomGetFile
|
|
MOVE.W #selectorCustomGetFile,-(SP)
|
|
_Pack3
|
|
ENDM
|
|
|
|
|
|
; old style equates for compatability
|
|
|
|
; Reply record data structure
|
|
rGood EQU 0 ; ignore command if FALSE
|
|
rType EQU 2 ; file type
|
|
rVolume EQU 6 ; volume reference number
|
|
rVersion EQU 8 ; file's version number
|
|
rName EQU 10 ; file name
|
|
|
|
; Routine selectors
|
|
sfPutFile EQU 1
|
|
sfPPutFile EQU 3
|
|
sfGetFile EQU 2
|
|
sfPGetFile EQU 4
|
|
|
|
ENDIF ; ...already included |