sys7.1-doc-wip/Toolbox/StandardFile/StandardFilePriv.a
2019-07-27 22:37:48 +08:00

208 lines
7.2 KiB
Plaintext

;
; File: StandardFilePriv.a
;
; Contains: Private equates for the Standard File package
;
; Written by: Ernie Beernick, Erich Ringewald, John Meier, Nick Kledzik
;
; Copyright: © 1988-1992 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <2> 4/3/92 FM #1022940 Make Standard file respect invisible volumes.
; Unfortunately High Sierra and ISO drivers that are currently
; shipping set the invisible bit by mistake. Therefore we have to
; special case them IF their FSTs are version 2.0.3 (We can check
; this by looking at the gestalt selector'hscd'.
; <1> 10/1/91 JSM first checked in
; <0> 10/1/91 JSM Created from StandardFile3Priv.a.
;
; Modification history from StandardFile3Priv.a below:
;
; <17> 12/13/90 ngk Added constant for "original in trash" error
; <16> 11/28/90 ngk Fix isStatAwareBit constant
; <15> 8/31/90 ngk add rGenericFileTypeMapTableID and sfCommandKeys
; <14> 8/21/90 ngk added locked file constants
; <13> 8/5/90 ngk repack fields in FileEntry
; <12> 7/23/90 ngk Correct isStatAwareBIt constant
; <11> 7/2/90 ngk renumber dialog IDs because of conflict with Disk Init
; <10> 6/6/90 ngk Moved generic icon definitions to IconUtilsPriv. Moved
; stackframe into StandardFile.PACK.a
; <9> 5/23/90 ngk Conditionally, use popup CDEF
; <8> 5/2/90 ngk Moved type select definintions into IntlUtilsPriv.a
; <7> 4/30/90 ngk add new typeselect structures
; <6> 4/10/90 ngk Added local variables for NewFolder button and dialog. Added
; constants for renumbered resource IDs. Added virtual item codes.
; <5> 3/28/90 ngk Fix stationery bit.
; <3+> 3/19/90 JRM add stationery warning for old apps
; <3> 3/13/90 ngk Add variable for current volParms
; <2> 2/25/90 ngk Added error for saving and trying to replace a folder. Defined
; templates for parameters in calls 1-4 and 5-8 whose values are
; moved into unified locals.
; <1> 2/17/90 ngk Massive changes. See header in StandardFile3.PACK.a Lots of
; renaming to better symbolic names. Better use of RECORD
; templates.
;
; split into StandardFile3Priv.a and StandardFile2Priv.a
; <3> 2/2/90 ngk added chClear and chDelete equates
; <1+> 1/22/90 JRM add equate for mail icon
; <2.7> 12/7/89 dba added equates for Escapce
; <2.6> 11/30/89 RLC Took over the lUnused byte (made lBalloonUp) for use w/ Help
; Mgr.
; <2.5> 11/29/89 ngk added lTERect to stack frame
; <2.4> 11/29/89 JRM add BootDrive to stack frame
; <2.3> 11/14/89 ngk Change FileEntry record to a real record structure
; <2.2> 11/14/89 JRM add startup vref to stack frame
; <2.1> 10/31/89 JRM add openAliasParent item
; <2.0> 10/30/89 JRM added global for system script, equates for iocn base
; <1.9> 10/13/89 ngk Removed macro for _ResolveAlias
; <1.8> 10/4/89 ngk Added sfPopUpIcon
; <1.7> 10/1/89 ngk Added lUseCallBack and lSelector
; <1.6> 9/13/89 ngk expanded a6 frame to include parameters. Added string to hold
; "open" button title. Added extra locals to support new calls.
; <1.5> 8/29/89 JRM add missing 0 after RECORD for new SFReply record
; <1.4> 8/11/89 JRM Add back in 604 conditionals that Darin said I could take out
; <1.3> 8/8/89 JRM 7.10d10 release
; <1.2> 6/8/89 JRM conditionals for big bang and 604
; <1.1> 6/5/89 JRM big bang standard file - see StandardFilePACK.a
; <1.0> 11/16/88 CCH Added to EASE.
;
;------------------------------------------------------
;
; Constants used for special casing CD's from
; disappearing on the invisible bit
kHighSierraCDFST equ 'hscd'
;------------------------------------------------------
;
; StyledString is used to draw strings with styles and scripts
;
StyledString RECORD 0
script DS.W 1 ; script id of text
font DS.W 1 ; font id for text
dimmed DS.B 1 ; boolean whether to grey out text
style DS.B 1 ; style for text
size DS.W 1 ; size for text
text DS.B 64 ; Str63
ENDR
;-------------------------------------------------------------------
;
; Generic file list entry. Record is cut back to just hold filename
;
; dirID and type fields are overlapped
FileEntry RECORD 0
feTypeOrDirID DS.L 1 ; file type for files, dirID of folders, desktop dirID for volumes
feDrive DS.W 1 ; drive number
feVRefNum DS.W 1 ; vRefNum
feParID DS.L 1 ; parent dirID
feFLAttr DS.B 1 ; file attribute byte
feFLPriv DS.B 1 ; access privileges byte
feFndrFlags DS.W 1 ; 16 bits of finder flags
feIcon DS.W 1 ; icon resource ID
feIconLeft DS.B 1 ; Boolean, icon on left or right
feJust DS.B 1 ; How to justify text, normally, teJustLeft
feIconColor DS.W 1 ; entry in color Pallete in userHandle
feFile DS StyledString ; styled filename
size EQU *
ENDR
;-------------------------------------------------------------------
; new access privileges returned in getcatinfo call
; wierd polarity is so that local HFS default of zero means all privileges
; these are the bits used in FileEntry.feFLPriv
mNoEject EQU 128 ; set if user cannot eject disk
mOpenable EQU 8 ; set if user cannot open this folder
mNoWrite EQU 4 ; set if missing write
mNoRead EQU 2 ; set if missing read
mNoSearch EQU 1 ; set if missing search
bNoEject EQU 7 ; set if user cannot eject disk
bOpenable EQU 3 ; set if user cannot open this folder
bNoWrite EQU 2 ; set if missing write
bNoRead EQU 1 ; set if missing read
bNoSearch EQU 0 ; set if missing search
; bits in ioFlAttrib
isLockedFile EQU 0 ; file is finder locked
; bits in finder flags
mInvisible EQU $4000 ; mask for invisible bit in finder bytes
isAliasBit EQU 15 ; file is an alias
isInvisible EQU 14 ; file is invisible
isStationeryBit EQU 11 ; file is stationery
isLetter EQU 9 ; folder is a letter
; bit in second byte of app's size resource
isStatAwareBit EQU 4
sfFndrScript EQU $8 ; offset into FndrXInfo of script
ioACUser EQU 31 ; offset into CatInfo for permissions byte
; icon positioning
iconWidth EQU 16
iconPad EQU 3
;; resources
sfPopUpMenuID EQU -4000
; dialog IDs of old dialogs
rStandardFileOldPutID EQU -3999
rStandardFileOldGetID EQU -4000
; DLOG's, ALRT's, and DITL's
rSFNewFolderDialogID EQU -6046
rSFReplaceExistingDialogID EQU -6045
rSFOKDialogID EQU -6044
rStandardFilePutID EQU -6043
rStandardFileGetID EQU -6042
rSFStationeryWrnDialogID EQU -6041
rSFLockedWrnDialogID EQU -6040
; PICT's
rNewFolderPictID EQU -6046
rGrayRectPictID EQU -6045
; STR#'s
rStandardFileStringsID EQU -6046
rStandardFileHelpStringsID EQU -6045
; CNTL's
rNewFolderControlID EQU -6046
; 'picb'
rNewFolderPictButtonID EQU -6046
; 'fmap'
rGenericFileTypeMapTableID EQU -6046 ; for converting file types to icon ID's
; indices into rStandardFileStringsID STR#
sfDesktopName EQU 1
sfTrashName EQU 2
sfOpenName EQU 3
sfErrDiskLocked EQU 4
sfErrNoPrivileges EQU 5
sfErrBadFilename EQU 6
sfErrSystemError EQU 7
sfErrBadAlias EQU 8
sfErrSaveOnFolder EQU 9
sfFolderNameExists EQU 10
sfCommandKeys EQU 11
sfErrTrashAlias EQU 12
; indexes into help strings
hsiPopUpMenu EQU 1
hsiOpen EQU 8