mirror of
https://github.com/elliotnunn/supermario.git
synced 2024-12-01 18:50:30 +00:00
1276 lines
48 KiB
Plaintext
1276 lines
48 KiB
Plaintext
|
; Version: 3.28
|
|||
|
; Created: Friday, October 20, 1989 at 10:02:20 PM
|
|||
|
;
|
|||
|
; File: ToolUtils.a
|
|||
|
;
|
|||
|
; Assembler Interface to the Macintosh Libraries
|
|||
|
; Copyright Apple Computer, Inc. 1984-1992
|
|||
|
; All Rights Reserved
|
|||
|
;
|
|||
|
; Toolbox Equates -- This file defines the high-level equates for the
|
|||
|
; Macintosh toolbox software. This is divided into two pieces for assembly
|
|||
|
; space and speed considerations. The wholeTools flag is used to include
|
|||
|
; the less common equates which realizes a complete set. The comments
|
|||
|
; marked with ";+" denote managers.
|
|||
|
;
|
|||
|
; Change History (most recent first):
|
|||
|
;
|
|||
|
; <27> 11/7/92 JDR Added the PopupPrivateData record.
|
|||
|
; <26> 10/17/92 PKE For New IM: Add trap macros for new names for old TextEdit
|
|||
|
; routines.
|
|||
|
; <25> 7/15/92 SMB ## <ys>: Move DoText selectors from TextEditPriv.a to here so
|
|||
|
; the whole darn world can use them instead of hard-coded
|
|||
|
; constants! Renamed teMark to teHighlight and teLoc to teCaret.
|
|||
|
; <24> 7/1/92 DCL This file is the replacement for the now obsolete ToolEqu.a.
|
|||
|
; Changed the 'including' name to match the new file name.
|
|||
|
; <23> 2/12/92 MH Add back in support for old spelling: _SetStylScrap
|
|||
|
; <22> 9/9/91 MH Remove macro TEGetStyl. It was added for backward compatibility
|
|||
|
; as a backward compatibility version of TEGetStyle, but never
|
|||
|
; actually existed prior to that
|
|||
|
; <21> 8/27/91 CH Update copyright dates
|
|||
|
; <20> 8/18/91 MH The selector in the macro for _TEGetStyl, changed from teGetStyl
|
|||
|
; to teGetStyle, since that is what is now defined
|
|||
|
; <19> 8/16/91 MH change Equ to EQU
|
|||
|
; <18> 8/14/91 JL Added correctly spelled style calls was spelled styl. Kept old
|
|||
|
; spelling around for compatability.
|
|||
|
; <17> 6/25/91 JNG Add Dialog Manipulation calls (taken from CTBUtilities.a)
|
|||
|
; <16> 6/14/91 JL Checked in official MPW 3.2ƒ version. Changed macros and equated
|
|||
|
; spelled styl to style; need to keep old names for backwards
|
|||
|
; compatability. Updated copyright dates.
|
|||
|
; <15> 1/30/91 gbm sab, #38: Change the ‘already including this file’ variable to
|
|||
|
; all uppercase (for security reasons)
|
|||
|
; <14> 10/30/90 SMB Added intTextWidthHook as a new selector to the TECustomHook and
|
|||
|
; TextWidthHook as an offset into the dispatch table. Added new
|
|||
|
; feature bit, teFUseTextServices, to allow applications to
|
|||
|
; disable inline input.
|
|||
|
; <13> 10/18/90 VL (jsm) Added new variant for movable modal dialog (5).
|
|||
|
; <12> 9/15/90 PWD Moved popupMenu constants here from CTBUtilties.a. <kaz> <crz>
|
|||
|
; <11> 6/21/90 CL Took out WidTabSize since it is not correct for NFNTs or sfnts.
|
|||
|
; <10> 6/11/90 SMB NEEDED FOR SIXPACK & 7.0: added TEFeatureFlag bit definition for
|
|||
|
; inline input features, teFInlineInput.
|
|||
|
; <8> 3/02/90 JAL Changed ffIntl from 52 to 46 and ffVersion from 56 to 50 as per DTS.
|
|||
|
; <6> 2/13/90 SMB NEEDED for 6.0.5 - Added TEFindWord from Private.a since it's
|
|||
|
; now a public hook. Added nWIDTHHook,IntNWidthHook for
|
|||
|
; TextEdit's new C2P code.
|
|||
|
; <5> 1/30/90 SMB Adding names of FindWord callers for TextEdit.
|
|||
|
; <4> 1/17/90 SMB Added new names for TESetJust and moved newTEFlags and
|
|||
|
; intDispSize to TextEditPriv.a.
|
|||
|
; <3> 1/10/90 SMB Reverted back to version 1 for a while longer!
|
|||
|
; <2> 1/9/90 SB NEEDED FOR 6.0.5: Moved newTEFlags and intDispSize to
|
|||
|
; TextEditPriv.a.
|
|||
|
; <1> 12/18/90 CCH Adding for the first time into BBS.
|
|||
|
;___________________________________________________________________________
|
|||
|
; EASE versions below:
|
|||
|
; 1.5 smb 09/25/1989 Added a new selector for TextEdit's new interface, teFeatureFlag.
|
|||
|
; 1.4 SES 08/23/1989 Added MBProcHndl before all nFile references were removed, so
|
|||
|
; MBProcHndl is going to be temporarily commented out until nFiles are COMPLETELY(!)
|
|||
|
; done away with.
|
|||
|
; 1.3 SES 08/22/1989 Added MBProcHndl, which was formerly in nToolEqu.a.
|
|||
|
; 1.2 EMT 02/08/1989 Added new messages for 32-bit clean Control Manager.
|
|||
|
; 1.1 smb 02/03/1989 Added newTEFlags to TextEdit equates and modified intDispSize.
|
|||
|
; 1.0 CCH 11/ 9/1988 Adding to EASE.
|
|||
|
; END EASE MODIFICATION HISTORY
|
|||
|
;•1.1 CCH 9/14/1988 Updated EASE with the current rev of this file.
|
|||
|
; Created: Wednesday, January 13, 1988 at 12:03:33 PM
|
|||
|
;
|
|||
|
; File: ToolEqu.a
|
|||
|
;
|
|||
|
; Assembler Interface to the Macintosh Libraries
|
|||
|
; Copyright Apple Computer, Inc. 1984-1988
|
|||
|
; All Rights Reserved
|
|||
|
;
|
|||
|
; Toolbox Equates -- This file defines the high-level equates for the
|
|||
|
; Macintosh toolbox software. This is divided into two pieces for assembly
|
|||
|
; space and speed considerations. The wholeTools flag is used to include
|
|||
|
; the less common equates which realizes a complete set. The comments
|
|||
|
; marked with ";+" denote managers.
|
|||
|
;___________________________________________________________________________
|
|||
|
; pre-EASE versions below:
|
|||
|
;
|
|||
|
; Modification history
|
|||
|
;
|
|||
|
; <23sep86> NSJ new this date
|
|||
|
; <C139/29Sep86>MBK new TextEdit equates
|
|||
|
; <C187/30Sep86>JDT/CSL Added ScriptEQU into nToolEqu.a
|
|||
|
; <C175/01Oct86>DAF Moved new menuMgr equates from :TLASM:newequ.a
|
|||
|
; <C194/01Oct86>EHB Changed ColorBit to ClrBit (already used by QuickDraw)
|
|||
|
; <Cxxx/05Oct86>DAF Moved window/control part identifiers here.
|
|||
|
; <C182/6oct86> MBK changed stRecSize from 16 to 18, and
|
|||
|
; styleSize from 10 to 12 for RGBColor.
|
|||
|
; <13oct86> NSJ MBarNFnd moved to nSysErr
|
|||
|
; removed all the Script Manager stuff
|
|||
|
; corrected capitalization and names to match Pascal
|
|||
|
; for auxWinRec and auxCtlRec
|
|||
|
; added updated Text Edit records with new names to
|
|||
|
; match Pascal
|
|||
|
; <14OCT86> NSJ added IMPORTS for text edit calls
|
|||
|
; <C207/16oct86>MBK added styl scrap offsets; changed TE equate names
|
|||
|
; to match with PASCAL
|
|||
|
; <A236/17Oct86>CRC moved font manager globals in
|
|||
|
; <21OCT86> NSJ added Font Manager stuff
|
|||
|
; <A283/28oct86>bbm changed the location of all new low memory
|
|||
|
; <A301/30oct86>NSJ moved some errors from this file to {nfiles}nSysErr.a
|
|||
|
; <C314/31Oct86>DAF added some new fields to auxWinRecs
|
|||
|
; 13feb87 KLH removed teFont, already in ToolEqu.a
|
|||
|
;<C346/04nov86> bbm changed equates as there were some conflicts in nSysEqu.a
|
|||
|
; c398/10Nov86 CRC added FontMgr global LastDepth
|
|||
|
;<C413/17nov86> bbm changed comments and names for some menu lo mem.
|
|||
|
;<C222/C408/17nov86> FJL Added hierarchical and color menu equates.
|
|||
|
;<C496/09Dec86> DAF Added InvalPat for wmgr
|
|||
|
;<C519/12Dec86> MBK Added HiliteMode for QuickDraw.
|
|||
|
;<C222/C408/C532/C782> FJL Updated menu equates. Added Background Notification Mgr eqts.
|
|||
|
;<C621/13Jan87> DAF Added additional field to auxCtlRec
|
|||
|
;<13Jan87> jdt Removed all of Script Manager equates; now in nEqu.d via nSMgrEqu.a.
|
|||
|
; 23 Feb 87 KLH moved HiliteMode to SysEqt.a
|
|||
|
; 9 Mar 87 KLH teForceLeft added for script manager in text edit.
|
|||
|
; 26 Mar 87 KLH changed cElevatorColor to cThumbColor.
|
|||
|
; 8 Jun 87 KLH TEStyleRec.teReserved replaced w/ nullStyle. Added NullStRec.
|
|||
|
; *** MPW 2.0 ***
|
|||
|
; 25 Aug 87 KLH AuxWinRec.dialogCTable corrected to AuxWinRec.dialogCItem.
|
|||
|
; *** MPW 3.0d2 ***
|
|||
|
; 1 Dec 87 KLH mPopUpMsg corrected to 3.
|
|||
|
;___________________________________________________________________________
|
|||
|
|
|||
|
IF &TYPE('__INCLUDINGTOOLUTILS__') = 'UNDEFINED' THEN
|
|||
|
__INCLUDINGTOOLUTILS__ SET 1
|
|||
|
|
|||
|
IF (&TYPE('wholeTools') = 'UNDEFINED') THEN
|
|||
|
wholeTools EQU 1
|
|||
|
ENDIF
|
|||
|
|
|||
|
|
|||
|
;+ Resource Manager
|
|||
|
|
|||
|
; Resource attributes
|
|||
|
|
|||
|
resSysRef EQU 7 ; reference to system/local reference
|
|||
|
resSysHeap EQU 6 ; In system/in application heap
|
|||
|
resPurgeable EQU 5 ; Purgeable/not purgeable
|
|||
|
resLocked EQU 4 ; Locked/not locked
|
|||
|
resProtected EQU 3 ; Protected/not protected
|
|||
|
resPreload EQU 2 ; Read in at OpenResource?
|
|||
|
resChanged EQU 1 ; Existing resource changed since last update
|
|||
|
rcbMask EQU $FD ; Must preserve ResChanged over _ResAttrs
|
|||
|
|
|||
|
; Map attributes
|
|||
|
|
|||
|
mapReadOnly EQU 7 ; is this file read-only?
|
|||
|
mapCompact EQU 6 ; Is a compact necessary?
|
|||
|
mapChanged EQU 5 ; Is it necessary to write map?
|
|||
|
|
|||
|
; Resource Manager Globals
|
|||
|
|
|||
|
TopMapHndl EQU $A50 ; topmost map in list [handle]
|
|||
|
SysMapHndl EQU $A54 ; system map [handle]
|
|||
|
SysMap EQU $A58 ; reference number of system map [word]
|
|||
|
CurMap EQU $A5A ; reference number of current map [word]
|
|||
|
ResReadOnly EQU $A5C ; Read only flag [word]
|
|||
|
ResLoad EQU $A5E ; Auto-load feature [word]
|
|||
|
ResErr EQU $A60 ; Resource error code [word]
|
|||
|
ResErrProc EQU $AF2 ; Resource error procedure [pointer]
|
|||
|
SysResName EQU $AD8 ; Name of system resource file [STRING[19]]
|
|||
|
|
|||
|
;new Resource Manager stuff
|
|||
|
|
|||
|
RomMapInsert EQU $B9E ; (byte) determines if we should link in map
|
|||
|
TmpResLoad EQU $B9F ; second byte is temporary ResLoad value.
|
|||
|
|
|||
|
; the following word values are to be placed into the
|
|||
|
; word located at RomMapInsert
|
|||
|
|
|||
|
MapTrue EQU $FFFF ; link in ROM map with resload true
|
|||
|
MapFalse EQU $FF00 ; link in ROM map with resload false
|
|||
|
|
|||
|
;+ Font Manager
|
|||
|
|
|||
|
|
|||
|
; Standard font ID's
|
|||
|
|
|||
|
sysFont EQU 0 ; system font ID
|
|||
|
applFont EQU 1 ; application font ID
|
|||
|
newYork EQU 2 ; standard release fonts
|
|||
|
geneva EQU 3
|
|||
|
monaco EQU 4
|
|||
|
venice EQU 5
|
|||
|
london EQU 6
|
|||
|
athens EQU 7
|
|||
|
sanFran EQU 8
|
|||
|
toronto EQU 9
|
|||
|
cairo EQU 11
|
|||
|
losAngeles EQU 12
|
|||
|
times EQU 20
|
|||
|
helvetica EQU 21
|
|||
|
courier EQU 22
|
|||
|
symbol EQU 23
|
|||
|
mobile EQU 24
|
|||
|
|
|||
|
; Font Manager Globals
|
|||
|
|
|||
|
ApFontID EQU $984 ; resource ID of application font [word]
|
|||
|
FMDefaultSize EQU $987 ; default size [byte]
|
|||
|
CurFMInput EQU $988 ; quickdraw FMInput Record [pointer]
|
|||
|
FMgrOutRec EQU $998 ; quickdraw FontOutput Record [pointer]
|
|||
|
FScaleDisable EQU $A63 ; disable font scaling? [byte]
|
|||
|
|
|||
|
;new FONT manager stuff
|
|||
|
|
|||
|
WidthListHand EQU $8E4 ; list of extra width tables, or nil.
|
|||
|
WidthPtr EQU $B10 ; (long) Font Mgr global
|
|||
|
WidthTabHandle EQU $B2A ; Font width table handle for measure
|
|||
|
LastSPExtra EQU $B4C ; (long) most recent value of space extra
|
|||
|
SysFontFam EQU $BA6 ; (word) System font family ID or zero
|
|||
|
SysFontSize EQU $BA8 ; (word) System font size (or zero for 12 pt)
|
|||
|
FDevDisable EQU $BB3 ; (byte) $FF to disable device-defined style extra
|
|||
|
LastFOND EQU $BC2 ; (long) handle of last font def record
|
|||
|
FONDID EQU $BC6 ; (word) ID of last font def record
|
|||
|
FractEnable EQU $BF4 ; (byte) flag for fractional font widths
|
|||
|
UsedFWidths EQU $BF5 ; (byte) flag saying if we used fract widths
|
|||
|
FScaleHFact EQU $BF6 ; (long) horz. font scale factor
|
|||
|
FScaleVFact EQU $BFA ; (long) vertical font scale factor
|
|||
|
|
|||
|
;+ Window Manager
|
|||
|
|
|||
|
; system windows have negative kinds
|
|||
|
dialogKind EQU 2 ; dialog windows
|
|||
|
userKind EQU 8 ; this and above numbers are for user
|
|||
|
|
|||
|
; Values returned by window definition function's hit routine
|
|||
|
|
|||
|
wNoHit EQU 0 ; not in window at all
|
|||
|
wInContent EQU 1 ; in content area
|
|||
|
wInDrag EQU 2 ; in drag area
|
|||
|
wInGrow EQU 3 ; in grow area
|
|||
|
wInGoAway EQU 4 ; in go away area
|
|||
|
wInZoomIn EQU 5 ; in zoom in
|
|||
|
wInZoomOut EQU 6 ; in zoom out
|
|||
|
|
|||
|
; FindWindow Return Codes
|
|||
|
|
|||
|
inDesk EQU 0 ; not in any window
|
|||
|
inMenuBar EQU 1 ; in the menu bar
|
|||
|
inSysWindow EQU 2 ; in a system window
|
|||
|
inContent EQU 3 ; in content area of user window
|
|||
|
inDrag EQU 4 ; in drag area of user window
|
|||
|
inGrow EQU 5 ; in grow area of user window
|
|||
|
inGoAway EQU 6 ; in go away area of user window
|
|||
|
inZoomIn EQU 7 ; in zoom in part code
|
|||
|
inZoomOut EQU 8 ; in zoom out part code
|
|||
|
|
|||
|
; Resource ID's for windows
|
|||
|
|
|||
|
deskPatID EQU 16 ; desk pattern PAT ID
|
|||
|
documentProc EQU 0 ; standard document WDEF ID
|
|||
|
dBoxProc EQU 1 ; dialog box (document without titleBar) WDEF ID
|
|||
|
plainDBox EQU 2 ; no border WDEF ID
|
|||
|
altDBoxProc EQU 3 ; no shadow or title WDEF ID
|
|||
|
noGrowDocProc EQU 4 ; no grow area WDEF ID
|
|||
|
movableDBoxProc EQU 5 ; movable dialog box WDEF ID
|
|||
|
zoomDocProc EQU 8 ; with zoom box WDEF ID
|
|||
|
zoomNoGrow EQU 12 ; zoom with no grow box WDEF ID
|
|||
|
rDocProc EQU 16 ; document with rounded corners WDEF ID
|
|||
|
|
|||
|
; Window Data Structure Definition
|
|||
|
|
|||
|
windowPort EQU 0 ; grafPort [108 bytes]
|
|||
|
windowKind EQU $6C ; type of window [word]
|
|||
|
wVisible EQU $6E ; visible flag [byte]
|
|||
|
wHilited EQU $6F ; select (hilite) flag [byte]
|
|||
|
wGoAway EQU $70 ; has go away button [byte]
|
|||
|
wZoom EQU $71 ; has zoom box [byte]
|
|||
|
structRgn EQU $72 ; structure region of window [Handle]
|
|||
|
contRgn EQU $76 ; content region of window [Handle]
|
|||
|
updateRgn EQU $7A ; update region of window [Handle]
|
|||
|
windowDef EQU $7E ; window definition procedure [Handle]
|
|||
|
wDataHandle EQU $82 ; window proc-defined data [Handle]
|
|||
|
wTitleHandle EQU $86 ; title string [Handle]
|
|||
|
wTitleWidth EQU $8A ; width in pixels of title string [word]
|
|||
|
wControlList EQU $8C ; control list of this window [handle]
|
|||
|
nextWindow EQU $90 ; next window in z-ordered list [pointer]
|
|||
|
windowPic EQU $94 ; picture handle for updates [handle]
|
|||
|
wRefCon EQU $98 ; application use [long]
|
|||
|
windowSize EQU $9C ; size of window data structure
|
|||
|
WStateData RECORD 0
|
|||
|
userState DS.L 2 ;Rect
|
|||
|
stdState DS.L 2 ;Rect
|
|||
|
ENDR
|
|||
|
|
|||
|
|
|||
|
|
|||
|
; Window Manager Globals
|
|||
|
|
|||
|
WindowList EQU $9D6 ; Z-ordered linked list of windows [pointer]
|
|||
|
PaintWhite EQU $9DC ; erase newly drawn windows? [word]
|
|||
|
WMgrPort EQU $9DE ; window manager's grafport [pointer]
|
|||
|
GrayRgn EQU $9EE ; rounded gray desk region [handle]
|
|||
|
CurActivate EQU $A64 ; window slated for activate event [pointer]
|
|||
|
CurDeactive EQU $A68 ; window slated for deactivate event [pointer]
|
|||
|
DragHook EQU $9F6 ; user hook during dragging [pointer]
|
|||
|
DeskPattern EQU $A3C ; desk pattern [8 bytes]
|
|||
|
DeskHook EQU $A6C ; hook for painting the desk [pointer]
|
|||
|
GhostWindow EQU $A84 ; window hidden from FrontWindow [pointer]
|
|||
|
|
|||
|
|
|||
|
|
|||
|
;+ Menu Manager
|
|||
|
|
|||
|
; "ASCII" marks for menu characters
|
|||
|
|
|||
|
noMark EQU 0
|
|||
|
commandMark EQU $11 ; command fan (cloverleaf)
|
|||
|
checkMark EQU $12 ; check mark for menus
|
|||
|
diamondMark EQU $13 ; diamond mark for menus
|
|||
|
appleMark EQU $14 ; desk ornament menu title
|
|||
|
|
|||
|
; MenuList Data Structure Definition -- one per menuBar
|
|||
|
|
|||
|
; 6 Byte header
|
|||
|
lastMenu EQU 0 ; number of bytes in this menuList [word]
|
|||
|
lastRight EQU 2 ; h coordinate of 1st free point in menuBar [word]
|
|||
|
; one of the following per menu
|
|||
|
menuoH EQU 0 ; menu handle [handle]
|
|||
|
menuLeft EQU 4 ; coordinate of left edge of menu [word]
|
|||
|
|
|||
|
; MenuInfo Data Structure -- one per menu
|
|||
|
|
|||
|
menuID EQU 0 ; unique ID for each menuBar [word]
|
|||
|
menuWidth EQU 2 ; menu width [word]
|
|||
|
menuHeight EQU 4 ; menu height [word]
|
|||
|
menuDefHandle EQU 6 ; menu definition proc [handle]
|
|||
|
menuEnable EQU $A ; enable flags, one bit/item [long]
|
|||
|
menuData EQU $E ; menu item string [STRING]
|
|||
|
menuBlkSize EQU $E ; size of a menu block plus dataString
|
|||
|
|
|||
|
; MenuString Data Structure -- one per menu item
|
|||
|
|
|||
|
itemIcon EQU 0 ; icon byte
|
|||
|
itemCmd EQU 1 ; apple (command key) byte
|
|||
|
itemMark EQU 2 ; checkmark character byte
|
|||
|
itemStyle EQU 3 ; style byte
|
|||
|
|
|||
|
; Menu Manager Globals
|
|||
|
|
|||
|
MenuList EQU $A1C ; current menuBar list structure [handle]
|
|||
|
MenuFlash EQU $A24 ; flash feedback count [word]
|
|||
|
MenuHook EQU $A30 ; user hook during menuSelect [pointer]
|
|||
|
MBarEnable EQU $A20 ; menuBar enable for desk accessories[word]
|
|||
|
MBarHook EQU $A2C ; user hook during menuSelect [pointer]
|
|||
|
|
|||
|
;new Menu Manager stuff
|
|||
|
|
|||
|
MBarHeight EQU $BAA ; (word) height of menu bar (usually 20)
|
|||
|
|
|||
|
;+ Control Manager
|
|||
|
|
|||
|
; Part Codes
|
|||
|
|
|||
|
inButton EQU 10 ; in a push button
|
|||
|
inCheckBox EQU 11 ; in a checkBox button
|
|||
|
inUpButton EQU 20 ; in up button area of a dial
|
|||
|
inDownButton EQU 21 ; in down button area of a dial
|
|||
|
inPageUp EQU 22 ; in page up (gray) area of a dial
|
|||
|
inPageDown EQU 23 ; in page down (gray) area of a dial
|
|||
|
inThumb EQU 129 ; in thumb area of a dial
|
|||
|
|
|||
|
; Constants for axis parameter of DragGrayRgn and DragControl
|
|||
|
|
|||
|
noConstraint EQU 0 ; free form dragging
|
|||
|
hAxisOnly EQU 1 ; horizontally only
|
|||
|
vAxisOnly EQU 2 ; vertically only
|
|||
|
|
|||
|
; Resource ID's for controls
|
|||
|
|
|||
|
pushButProc EQU 0 ; rounded-corner pushButtons CDEF ID
|
|||
|
checkBoxProc EQU 1 ; check-box type buttons CDEF ID
|
|||
|
radioButProc EQU 2 ; radio buttons CDEF ID
|
|||
|
scrollBarProc EQU 16 ; scrollBar CDEF ID
|
|||
|
useWFont EQU 8 ; add this to get window font CDEF ID
|
|||
|
sBarPatID EQU 17 ; scrollBar pattern ID
|
|||
|
|
|||
|
|
|||
|
; Popup Control Constants
|
|||
|
popupMenuCDEFproc EQU 1008 ; popup menu CDEF ID
|
|||
|
|
|||
|
; Popup Variation Codes
|
|||
|
popupFixedWidth EQU $0001 ; size will not vary with menu items
|
|||
|
popupReserved EQU $0002 ; was popupUseCQD
|
|||
|
popupUseAddResMenu EQU $0004 ; menu = AddResMenu(CNTL's refCon)
|
|||
|
popupUseWFont EQU $0008 ; use this for window font/size/face
|
|||
|
|
|||
|
; Popup Title characteristics
|
|||
|
popupTitleBold EQU $00000100 ; styles for the popup title
|
|||
|
popupTitleItalic EQU $00000200
|
|||
|
popupTitleUnderline EQU $00000400
|
|||
|
popupTitleOutline EQU $00000800
|
|||
|
popupTitleShadow EQU $00001000
|
|||
|
popupTitleCondense EQU $00002000
|
|||
|
popupTitleExtend EQU $00004000
|
|||
|
popupTitleNoStyle EQU $00008000
|
|||
|
|
|||
|
popupTitleLeftJust EQU $00000000 ; justification for the title
|
|||
|
popupTitleCenterJust EQU $00000001
|
|||
|
popupTitleRightJust EQU $000000FF
|
|||
|
|
|||
|
|
|||
|
; Control Template
|
|||
|
|
|||
|
nextControl EQU $0 ; next control in the list [handle]
|
|||
|
contrlOwner EQU $4 ; owning window [pointer]
|
|||
|
contrlRect EQU $8 ; bounding rectangle [8 bytes]
|
|||
|
contrlVis EQU $10 ; visible state [byte]
|
|||
|
contrlHilite EQU $11 ; hilite state [byte]
|
|||
|
contrlValue EQU $12 ; current value of control [word]
|
|||
|
contrlMin EQU $14 ; minimum value of control [word]
|
|||
|
contrlMax EQU $16 ; maximum value of control [word]
|
|||
|
contrlDefHandle EQU $18 ; control definition procedure [handle]
|
|||
|
contrlData EQU $1C ; data for definition proc [handle]
|
|||
|
contrlAction EQU $20 ; local actionProc [pointer]
|
|||
|
contrlRFcon EQU $24 ; refcon defined by application [long]
|
|||
|
contrlTitle EQU $28 ; title string [STRING]
|
|||
|
contrlSize EQU $28 ; size of control data structure less title
|
|||
|
|
|||
|
PopupPrivateData RECORD 0 ; popup data found in contrlData
|
|||
|
mHandle DS.L 1 ; popup menu handle
|
|||
|
mID DS.W 1 ; popup menu ID
|
|||
|
ENDR
|
|||
|
|
|||
|
; Control Manager Globals
|
|||
|
|
|||
|
DragPattern EQU $A34 ; DragTheRgn pattern [8 bytes]
|
|||
|
DragFlag EQU $A44 ; implicit parameter to DragControl [word]
|
|||
|
CurDragAction EQU $A46 ; implicit actionProc for dragControl [pointer]
|
|||
|
|
|||
|
|
|||
|
;+ Text Edit
|
|||
|
|
|||
|
|
|||
|
; Justification styles
|
|||
|
|
|||
|
teJustLeft EQU 0 ; left justified text
|
|||
|
teJustRight EQU -1 ; right justified text
|
|||
|
teJustCenter EQU 1 ; center justified text
|
|||
|
teForceLeft EQU -2 ; for Arabic fonts, force left justification
|
|||
|
|
|||
|
; new names for the Justification styles
|
|||
|
teFlushDefault EQU 0 ; flush according to the line direction
|
|||
|
teCenter EQU 1 ; center justify
|
|||
|
teFlushRight EQU -1 ; flush right for all scripts
|
|||
|
teFlushLeft EQU -2 ; flush left for all scripts
|
|||
|
|
|||
|
; Text Edit Record
|
|||
|
|
|||
|
teDestRect EQU $0 ; destination rectangle [8 bytes]
|
|||
|
teViewRect EQU $8 ; view rectangle rectangle [8 bytes]
|
|||
|
teSelRect EQU $10 ; select rectangle [8 bytes]
|
|||
|
teLineHite EQU $18 ; lineheight [word]
|
|||
|
teAscent EQU $1A ; first baseline offset [word]
|
|||
|
teSelPoint EQU $1C ; selection point [long]
|
|||
|
teSelStart EQU $20 ; selection start [word]
|
|||
|
teSelEnd EQU $22 ; selection end [word]
|
|||
|
teActive EQU $24 ; active [byte]
|
|||
|
teWordBreak EQU $26 ; word break routine [pointer]
|
|||
|
teClikProc EQU $2A ; click loop routine [pointer]
|
|||
|
teClikTime EQU $2E ; time of last click [long]
|
|||
|
teClikLoc EQU $32 ; location of double click [long]
|
|||
|
teCarTime EQU $34 ; time for next caret toggle [long]
|
|||
|
teCarOn EQU $38 ; is caret on? [byte]
|
|||
|
teCarAct EQU $39 ; is caret active? [byte]
|
|||
|
teJust EQU $3A ; fill style [word]
|
|||
|
teLength EQU $3C ; length of text below [word]
|
|||
|
teTextH EQU $3E ; text [handle]
|
|||
|
teRecBack EQU $42 ; unused [word]
|
|||
|
teRecLine EQU $44 ; unused [word]
|
|||
|
teLftClick EQU $46 ; click was to left? [byte]
|
|||
|
teLftCaret EQU $47 ; caret was to left? [byte]
|
|||
|
teCROnly EQU $48 ; <CR> only for line breaks? [byte]
|
|||
|
teFontStuff EQU $4A ; space for font specifier [8 bytes]
|
|||
|
teFont EQU $4A ; text font [word]
|
|||
|
teFace EQU $4C ; text face [word]
|
|||
|
teMode EQU $4E ; text mode [word]
|
|||
|
teSize EQU $50 ; text size [word]
|
|||
|
teGrafPort EQU $52 ; grafport for editting [pointer]
|
|||
|
teHiHook EQU $56 ; hook for hilite routine [pointer]
|
|||
|
teCarHook EQU $5A ; hook for hilite routine [pointer]
|
|||
|
teNLines EQU $5E ; number of lines [word]
|
|||
|
teLines EQU $60 ; line starts [words...]
|
|||
|
teRecSize EQU $68 ; base size of a record w/o lines
|
|||
|
|
|||
|
; Text Edit Globals
|
|||
|
|
|||
|
TEDoText EQU $A70 ; textEdit doText proc hook [pointer]
|
|||
|
TERecal EQU $A74 ; textEdit recalText proc hook [pointer]
|
|||
|
TEScrpLength EQU $AB0 ; textEdit Scrap Length [word]
|
|||
|
TEScrpHandle EQU $AB4 ; textEdit Scrap [handle]
|
|||
|
TEWdBreak EQU $AF6 ; default word break routine [pointer]
|
|||
|
TEFindWord EQU $7F8 ; low-memory hook for TextEdit's FindWord routine
|
|||
|
|
|||
|
;new TE stuff
|
|||
|
|
|||
|
WordRedraw EQU $BA5 ; (byte) - used by TextEdit RecalDraw
|
|||
|
TESysJust EQU $BAC ; (word) system justification (intl. textEdit)
|
|||
|
TEFlags EQU teRecBack ; turn whole byte into bit flags
|
|||
|
teFAutoPos EQU 6 ; set this bit for auto position/scroll
|
|||
|
|
|||
|
;+ Dialog Manager
|
|||
|
|
|||
|
; Item codes in item list
|
|||
|
|
|||
|
userItem EQU 0 ; application-defined (dialog only)
|
|||
|
ctrlItem EQU 4 ; must be added to following four items
|
|||
|
btnCtrl EQU 0 ; standard button
|
|||
|
chkCtrl EQU 1 ; standard check box
|
|||
|
radCtrl EQU 2 ; standard radio button
|
|||
|
resCtrl EQU 3 ; control defined in resource file
|
|||
|
statText EQU 8 ; static text
|
|||
|
editText EQU 16 ; editable text (dialog only)
|
|||
|
iconItem EQU 32 ; icon
|
|||
|
picItem EQU 64 ; quickdraw picture
|
|||
|
itemDisable EQU 128 ; add to any of above to disable
|
|||
|
|
|||
|
|
|||
|
; Generic buttons
|
|||
|
|
|||
|
okButton EQU 1 ; OK button
|
|||
|
cancelButton EQU 2 ; Cancel button
|
|||
|
|
|||
|
; Alert/Dialog Resource ID's
|
|||
|
|
|||
|
stopIcon EQU 0 ; stop icon ID
|
|||
|
noteIcon EQU 1 ; note icon ID
|
|||
|
cautionIcon EQU 2 ; caution icon ID
|
|||
|
|
|||
|
; Dialog Template
|
|||
|
|
|||
|
dBounds EQU $0 ; dialog bounds rectangle
|
|||
|
dWindProc EQU $8 ; window proc ID
|
|||
|
dVisible EQU $A ; visible flag
|
|||
|
dGoAway EQU $C ; go away flag
|
|||
|
dRefCon EQU $E ; reference constant
|
|||
|
dItems EQU $12 ; item list ID and handle
|
|||
|
dTitle EQU $14 ; dialog window title
|
|||
|
|
|||
|
; Alert Template
|
|||
|
|
|||
|
aBounds EQU $0 ; alert box height and width
|
|||
|
aItems EQU $8 ; item list ID
|
|||
|
aStages EQU $A ; stages word
|
|||
|
|
|||
|
; Dialog/Alert Window Record
|
|||
|
|
|||
|
dWindow EQU $0 ; window record
|
|||
|
items EQU $9C ; Item list [handle]
|
|||
|
teHandle EQU $A0 ; textEdit object [handle]
|
|||
|
editField EQU $A4 ; current field being edited [word]
|
|||
|
editOpen EQU $A6 ; is editting open? [word]
|
|||
|
aDefItem EQU $A8 ; default item for alerts [word]
|
|||
|
dWindLen EQU $AA ; dialog record length
|
|||
|
|
|||
|
; In each item
|
|||
|
|
|||
|
itmHndl EQU 0 ; handle to the item
|
|||
|
itmRect EQU $4 ; bounding rect of item
|
|||
|
itmType EQU $C ; item type
|
|||
|
itmData EQU $D ; item string, must be even length
|
|||
|
|
|||
|
; Dialog Manager Globals
|
|||
|
|
|||
|
ANumber EQU $A98 ; active alert ID [word]
|
|||
|
ACount EQU $A9A ; # times this alert called [word]
|
|||
|
DABeeper EQU $A9C ; beep routine [pointer]
|
|||
|
DAStrings EQU $AA0 ; paramText substutution strings [4 handles]
|
|||
|
DlgFont EQU $AFA ; default dialog font ID [word]
|
|||
|
|
|||
|
|
|||
|
;+ Package Globals
|
|||
|
|
|||
|
|
|||
|
AppPacks EQU $AB8 ; packages' code [8 handles]
|
|||
|
|
|||
|
|
|||
|
;+ Finder related Globals
|
|||
|
|
|||
|
|
|||
|
FinderName EQU $2E0 ; "Finder" name [STRING[15]]
|
|||
|
AppParmHandle EQU $AEC ; handle to hold application parameters
|
|||
|
|
|||
|
|
|||
|
;+ Miscellaneous Globals
|
|||
|
|
|||
|
|
|||
|
ApplScratch EQU $A78 ; application scratch area [12 Bytes]
|
|||
|
ToolScratch EQU $9CE ; scratch area [8 bytes]
|
|||
|
TempRect EQU $9FA ; scratch rectangle [8 bytes]
|
|||
|
|
|||
|
; System Patterns
|
|||
|
|
|||
|
sysPatListID EQU 0 ; ID of PAT# which contains 38 patterns
|
|||
|
|
|||
|
IF wholeTools THEN
|
|||
|
|
|||
|
; Resource Manager
|
|||
|
|
|||
|
mCCMask EQU $60 ; mapCompact + mapChanged
|
|||
|
mChMask EQU $20 ; mapChanged
|
|||
|
mCoMask EQU $40 ; mapCompact
|
|||
|
|
|||
|
; Font Manager
|
|||
|
|
|||
|
; Font header values
|
|||
|
|
|||
|
propFont EQU $9000 ; proportional font type
|
|||
|
prpFntH EQU $9001 ; with height table
|
|||
|
prpFntW EQU $9002 ; with width table
|
|||
|
prpFntHW EQU $9003 ; with height & width table
|
|||
|
fixedFont EQU $B000 ; fixed-pitch font type
|
|||
|
fxdFntH EQU $B001 ; with height table
|
|||
|
fxdFntW EQU $B002 ; with width table
|
|||
|
fxdFntHW EQU $B003 ; with height & width table
|
|||
|
fontWid EQU $ACB0 ; width-only font type
|
|||
|
|
|||
|
; control/status codes for linkage w/font manager
|
|||
|
|
|||
|
fMgrCtl1 EQU 8 ; printer drivers
|
|||
|
|
|||
|
; Font Header Data Record
|
|||
|
|
|||
|
fFontType EQU 0 ; font type [word]
|
|||
|
fFirstChar EQU 2 ; ASCII code of first char [word]
|
|||
|
fLastChar EQU 4 ; ASCII code of last char [word]
|
|||
|
fWidMax EQU 6 ; maximum width of any char in pixels [word]
|
|||
|
fKernMax EQU 8 ; Negative of maximum character kern [word]
|
|||
|
fNDescent EQU 10 ; negative of descent [word]
|
|||
|
fFRectWidth EQU 12 ; width of font rectangle [word]
|
|||
|
fFRectHeight EQU 14 ; height of font rectangle [word]
|
|||
|
fOWTLoc EQU 16 ; offset to offset/width table [word]
|
|||
|
fAscent EQU 18 ; ascent above baseline in pixels [word]
|
|||
|
fDescent EQU 20 ; descent below baseline in pixels [word]
|
|||
|
fLeading EQU 22 ; space between lines in pixels [word]
|
|||
|
fRowWords EQU 24 ; row width of bit image / 2 [word]
|
|||
|
|
|||
|
; Font Manager Input Record (CurFMInput)
|
|||
|
|
|||
|
fmInFamily EQU 0 ; family [word]
|
|||
|
fmInSize EQU 2 ; size [word]
|
|||
|
fmInFace EQU 4 ; face [word]
|
|||
|
fmInNeedBits EQU 5 ; needBits [byte]
|
|||
|
fmInDevice EQU 6 ; device number [byte]
|
|||
|
fmInNumer EQU 8 ; numerator of scale [fixed]
|
|||
|
fmInDenom EQU 12 ; denominator of scale [fixed]
|
|||
|
|
|||
|
|
|||
|
; Font Manager Output record (FMgrOutRec)
|
|||
|
|
|||
|
fmOutError EQU 0 ; error code [word]
|
|||
|
fmOutFontH EQU 2 ; the actual font [handle]
|
|||
|
fmOutBold EQU 6 ; bolding factor [byte]
|
|||
|
fmOutItalic EQU 7 ; italic factor [byte]
|
|||
|
fmOutULOffset EQU 8 ; underline offset [byte]
|
|||
|
fmOutULShadow EQU 9 ; underline halo [byte]
|
|||
|
fmOutULThick EQU 10 ; underline thickness [byte]
|
|||
|
fmOutShadow EQU 11 ; shadow factor [byte]
|
|||
|
fmOutExtra EQU 12 ; extra horizontal width [byte]
|
|||
|
fmOutAscent EQU 13 ; height above baseline [byte]
|
|||
|
fmOutDescent EQU 14 ; height below baseline [byte]
|
|||
|
fmOutWidMax EQU 15 ; maximum width of character [byte]
|
|||
|
fmOutLeading EQU 16 ; space between lines [byte]
|
|||
|
fmOutNumer EQU 18 ; point for numerators of scale factor [long]
|
|||
|
fmOutDenom EQU 22 ; point for denominators of scale factor [long]
|
|||
|
|
|||
|
|
|||
|
;WidthTable data structure
|
|||
|
|
|||
|
widTabData EQU 0 ;ARRAY[1..256] OF LONGINT character widths
|
|||
|
widTabFont EQU 1024 ;Handle font record used to build table
|
|||
|
widthSExtra EQU 1028 ;LONGINT space extra used for table
|
|||
|
widthStyle EQU 1032 ;LONGINT extra due to style
|
|||
|
widthFID EQU 1036 ;INTEGER font family ID
|
|||
|
widthFSize EQU 1038 ;INTEGER font size request
|
|||
|
widthFace EQU 1040 ;INTEGER style (face) request
|
|||
|
widthDevice EQU 1042 ;INTEGER device requested
|
|||
|
widthVInScale EQU 1044 ;FIXED scale factors requested
|
|||
|
widthHInScale EQU 1048 ;FIXED scale factors requested
|
|||
|
widthAFID EQU 1052 ;INTEGER actual font family ID for table
|
|||
|
widthFHand EQU 1054 ;Handle family record used to build up table
|
|||
|
widthUsedFam EQU 1058 ;BOOLEAN used fixed point family widths
|
|||
|
widthAFace EQU 1059 ;BYTE actual face produced
|
|||
|
widthVOutput EQU 1060 ;INTEGER vertical scale output value
|
|||
|
widthHOutput EQU 1062 ;INTEGER horizontal scale output value
|
|||
|
widthVFactor EQU 1064 ;INTEGER vertical scale output value
|
|||
|
widthHFactor EQU 1066 ;INTEGER horizontal scale output value
|
|||
|
widthASize EQU 1068 ;INTEGER actual size of actual font used
|
|||
|
;widTabSize EQU 1070 ;INTEGER total size of table
|
|||
|
|
|||
|
; Font Family Definition
|
|||
|
|
|||
|
ffFlags EQU 0 ; flags for family (word)
|
|||
|
ffFamID EQU 2 ; family ID number (word)
|
|||
|
ffFirst EQU 4 ; ASCII code of first character (word)
|
|||
|
ffLast EQU 6 ; ASCII code of last character (word)
|
|||
|
ffAscent EQU 8 ; maximum ascent expressed for 1 pt (word)
|
|||
|
ffDescent EQU 10 ; maximum descent expressed for 1 pt (word)
|
|||
|
ffLeading EQU 12 ; maximum leading expressed for 1 pt (word)
|
|||
|
ffWidMax EQU 14 ; maximum widMax expressed for 1 pt (word)
|
|||
|
ffWTabOff EQU 16 ; offset to width table (long)
|
|||
|
ffKernOff EQU 20 ; offset to kerning table (long)
|
|||
|
ffStylOff EQU 24 ; offset to style mapping table (long)
|
|||
|
ffStyleOff EQU 24 ; offset to style mapping table (long)
|
|||
|
ffProperty EQU 28 ; style property info (12 words)
|
|||
|
ffIntl EQU 46 ; reserved for international use (2 words)
|
|||
|
ffVersion EQU 50 ; FOND version number
|
|||
|
|
|||
|
; Font Characterization Table
|
|||
|
|
|||
|
dpiVert EQU 0 ; vertical dots per inch [word]
|
|||
|
dpiHoriz EQU 2 ; horizontal dots per inch [word]
|
|||
|
boldChr EQU 4 ; bold characteristics [3 bytes]
|
|||
|
italChr EQU 7 ; italic characteristics [3 bytes]
|
|||
|
; unused [3 bytes]
|
|||
|
outlineChr EQU 13 ; outline characteristics [3 bytes]
|
|||
|
shadowChr EQU 16 ; shadow characteristics [3 bytes]
|
|||
|
condChr EQU 19 ; condensed characteristics [3 bytes]
|
|||
|
extendChr EQU 22 ; extended characteristics [3 bytes]
|
|||
|
underChr EQU 25 ; underline characteristics [3 bytes]
|
|||
|
|
|||
|
; Globals
|
|||
|
|
|||
|
CurFMFamily EQU $988 ; current font family
|
|||
|
CurFMSize EQU $98A ; current font size
|
|||
|
CurFMFace EQU $98C ; current font face
|
|||
|
CurFMNeedBits EQU $98D ; boolean specifying whether it needs strike
|
|||
|
CurFMDevice EQU $98E ; current font device
|
|||
|
CurFMNumer EQU $990 ; current numerator of scale factor
|
|||
|
CurFMDenom EQU $994 ; current denominator of scale factor
|
|||
|
FOutRec EQU $998 ; Font Manager output record
|
|||
|
FMDotsPerInch EQU $9B2 ; h,v dotsPerInch of current device
|
|||
|
FMStyleTab EQU $9B6 ; style heuristic table supplied by device
|
|||
|
RomFont0 EQU $980 ; system font [handle]
|
|||
|
GotStrike EQU $986 ; Do we have the strike? [byte]
|
|||
|
|
|||
|
|
|||
|
; Window Manager
|
|||
|
|
|||
|
; Window Definition Procedure Messages
|
|||
|
|
|||
|
wDrawMsg EQU 0 ; draw yourself
|
|||
|
wHitMsg EQU 1 ; hit test
|
|||
|
wCalcRgnMsg EQU 2 ; recalculate your regions
|
|||
|
wInitMsg EQU 3 ; initialize yourself
|
|||
|
wDisposeMsg EQU 4 ; dispose any private data
|
|||
|
wGrowMsg EQU 5 ; drag out grow outline
|
|||
|
wGIconMsg EQU 6 ; draw the grow icon
|
|||
|
OldStructure EQU $9E6 ; saved structure region [handle]
|
|||
|
OldContent EQU $9EA ; saved content region [handle]
|
|||
|
SaveVisRgn EQU $9F2 ; temporarily saved visRegion [handle]
|
|||
|
CurDeKind EQU $A22 ; window kind of deactivated window [word]
|
|||
|
SaveUpdate EQU $9DA ; Enable update accumulation? [word]
|
|||
|
|
|||
|
; Menu Manager
|
|||
|
|
|||
|
; Menu Definition Procedure Messages
|
|||
|
|
|||
|
mDrawMsg EQU 0 ; draw yourself
|
|||
|
mChooseMsg EQU 1 ; select an item
|
|||
|
mSizeMsg EQU 2 ; calculate your size
|
|||
|
|
|||
|
; Menu Resource IDs
|
|||
|
|
|||
|
textMenuProc EQU 0 ; standard text menu MDEF ID
|
|||
|
TheMenu EQU $A26 ; ID of hilited menu [word]
|
|||
|
SavedHandle EQU $A28 ; saved bits under a menu [handle]
|
|||
|
|
|||
|
;misc Menu stuff
|
|||
|
|
|||
|
MrMacHook EQU $A2C ; Mr. Macintosh hook [pointer]
|
|||
|
|
|||
|
; Control manager
|
|||
|
|
|||
|
; Control Definition Procedure Messages
|
|||
|
|
|||
|
drawCtlMsg EQU 0 ; draw message
|
|||
|
hitCtlMsg EQU 1 ; hit test message
|
|||
|
calcCtlMsg EQU 2 ; calc region message
|
|||
|
newCtlMsg EQU 3 ; init message
|
|||
|
dispCtlMsg EQU 4 ; dispose any private data message
|
|||
|
posCtlMsg EQU 5 ; adjust indicator position message
|
|||
|
thumbCtlMsg EQU 6 ; calculate rectangles for thumb dragging
|
|||
|
dragCtlMsg EQU 7 ; custom drag message
|
|||
|
trackCtlMsg EQU 8 ; track yourself message
|
|||
|
calcWholeCtlMsg EQU 10 ; calc whole region message
|
|||
|
calcThumbCtlMsg EQU 11 ; calc indicator region message
|
|||
|
|
|||
|
;stage definition--packed 2 to a byte, 4 stages in a word
|
|||
|
|
|||
|
volBits EQU 3 ; number of beeps
|
|||
|
alBit EQU 4 ; alert bit (put up box this time?)
|
|||
|
okDismissal EQU 8 ; bit for OK/Cancel default in each stage
|
|||
|
|
|||
|
; DialogList Data Structure Definitions
|
|||
|
|
|||
|
dlgMaxIndex EQU 0 ; maximum index (=items-1) stored here
|
|||
|
|
|||
|
|
|||
|
SaveProc EQU $A90 ; address of Save failsafe procedure
|
|||
|
SaveSP EQU $A94 ; Safe SP for restart or save
|
|||
|
|
|||
|
; DITLMethod
|
|||
|
overlayDITL EQU 0
|
|||
|
appendDITLRight EQU 1
|
|||
|
appendDITLBottom EQU 2
|
|||
|
|
|||
|
; Dialog Selectors
|
|||
|
AppendDITL EQU $402
|
|||
|
CountDITL EQU $403
|
|||
|
ShortenDITL EQU $404
|
|||
|
|
|||
|
; Package Manager
|
|||
|
|
|||
|
FPState EQU $A4A ; floating point state [6 bytes]
|
|||
|
App2Packs EQU $BC8 ; $BC8-$BE7 eight more package handles
|
|||
|
|
|||
|
; Resource Manager
|
|||
|
|
|||
|
RMGRPerm EQU $BA4 ; (byte) - permission byte for OpenResFile
|
|||
|
|
|||
|
; Miscellaneous Constants
|
|||
|
|
|||
|
screenRadius EQU $00100010 ; rounded corners for desk area
|
|||
|
|
|||
|
; Miscellaneous Globals
|
|||
|
|
|||
|
IconBitmap EQU $A0E ; bitmap used for plotting things
|
|||
|
TaskLock EQU $A62 ; re-entering SystemTask [byte]
|
|||
|
CloseOrnHook EQU $A88 ; hook for closing desk ornaments
|
|||
|
|
|||
|
;new MacApp stuff
|
|||
|
|
|||
|
MAErrProc EQU $BE8 ; (long) MacApp error proc address
|
|||
|
MASuperTab EQU $BEC ; (long) handle to MacApp superclass table
|
|||
|
|
|||
|
|
|||
|
;**************** NEW TOOL EQUATES ************
|
|||
|
|
|||
|
; Font Manager
|
|||
|
|
|||
|
; addition to FMgrOutRec (was unused)
|
|||
|
|
|||
|
fmOutCurStyle EQU 17 ;style algorthmically applied by QuickDraw
|
|||
|
|
|||
|
;___________________________________________________________________________
|
|||
|
;
|
|||
|
; Window Manager
|
|||
|
|
|||
|
; auxWinRec structure
|
|||
|
|
|||
|
awNext EQU $0 ;next in chain [Handle]
|
|||
|
awOwner EQU $4 ;owner ID [WindowPtr]
|
|||
|
awCTable EQU $8 ;color table [CTabHandle]
|
|||
|
dialogCItem EQU $C ;handle to dialog manager structures [handle]
|
|||
|
awFlags EQU $10 ;handle for Ernie [handle]
|
|||
|
awResrv EQU $14 ;for expansion [longint]
|
|||
|
awRefCon EQU $18 ;user constant [longint]
|
|||
|
auxWinSize EQU $1C ;size of record
|
|||
|
AuxWinHead EQU $0CD0 ;[handle] Window Aux List head
|
|||
|
|
|||
|
; Window Part Identifiers which correlate color table entries with window elements
|
|||
|
|
|||
|
wContentColor EQU 0
|
|||
|
wFrameColor EQU 1
|
|||
|
wTextColor EQU 2
|
|||
|
wHiliteColor EQU 3
|
|||
|
wTitleBarColor EQU 4
|
|||
|
|
|||
|
|
|||
|
;___________________________________________________________________________
|
|||
|
;
|
|||
|
; Control Manager
|
|||
|
|
|||
|
; auxCtlRec structure
|
|||
|
|
|||
|
acNext EQU $0 ;next in chain [AuxCtlHndl]
|
|||
|
acOwner EQU $4 ;owner ID [ControlHandle]
|
|||
|
acCTable EQU $8 ;color table [CCTabHandle]
|
|||
|
acFlags EQU $C ;misc flag byte [word]
|
|||
|
acReserved EQU $E ;for expansion [LONGINT]
|
|||
|
acRefCon EQU $12 ;user constant [LONGINT]
|
|||
|
acSize EQU $16 ;size of record
|
|||
|
AuxCtlHead EQU $0CD4 ;[handle] Control Aux List head
|
|||
|
|
|||
|
; Here are some equates for the colors of control parts
|
|||
|
|
|||
|
cFrameColor EQU 0
|
|||
|
cBodyColor EQU 1
|
|||
|
cTextColor EQU 2
|
|||
|
cThumbColor EQU 3
|
|||
|
|
|||
|
;___________________________________________________________________________
|
|||
|
;
|
|||
|
; Menu Manager
|
|||
|
|
|||
|
MenuDisable EQU $0B54 ; menuID and Item when disabled item selected
|
|||
|
MBDFHndl EQU $0B58 ; handle to current menu bar defproc
|
|||
|
MBSaveLoc EQU $0B5C ; handle to the mbarproc private data
|
|||
|
MenuCInfo EQU $0D50 ; hanel to menu color information table
|
|||
|
TopMenuItem EQU $A0A ; pixel value of top of scrollable menu
|
|||
|
AtMenuBottom EQU $A0C ; pixel value of bottom of scrollable menu
|
|||
|
|
|||
|
;
|
|||
|
; color menu table equates (mct = menu color table)
|
|||
|
;
|
|||
|
mctID EQU $0
|
|||
|
mctItem EQU $2
|
|||
|
mctRGB1 EQU $4
|
|||
|
mctRGB2 EQU $A
|
|||
|
mctRGB3 EQU $10
|
|||
|
mctRGB4 EQU $16
|
|||
|
mctReserved EQU $1C
|
|||
|
mctEntrySize EQU $1E
|
|||
|
|
|||
|
;
|
|||
|
; miscellaneous equates for hierarchical menus
|
|||
|
;
|
|||
|
|
|||
|
hMenuCmd EQU $1B ; itemCmd == $1B ==> hierarchical menu for this item
|
|||
|
scriptMenuCmd EQU 28 ; itemCmd == $1C ==> item to be displayed in script font
|
|||
|
hierMenu EQU -1 ; InsertMenu(handle, hierMenu), when beforeID ==
|
|||
|
; hierMenu, the handle is inserted in the
|
|||
|
; hierarchical menuList
|
|||
|
mPopUpMsg EQU 3 ; menu defProc messages - place yourself
|
|||
|
; miscellaneous hierarchical equates
|
|||
|
;
|
|||
|
hMenuMark EQU 200 ; '»' = menu character indicates item with hierarchical menu
|
|||
|
|
|||
|
;
|
|||
|
; miscellaneous menubar equates
|
|||
|
;
|
|||
|
mbMenu1Loc EQU $A ; first menu is 10 pixels from left side of screen
|
|||
|
mctAllIds EQU -97 ; search for all IDs for the given Item
|
|||
|
|
|||
|
;
|
|||
|
; color menu table search (and destroy) messages (mct = menu color table)
|
|||
|
;
|
|||
|
mctAllItems EQU -98 ; search for all Items for the given ID
|
|||
|
mctLastIDIndic EQU -99 ; last entry in color table has this in ID field
|
|||
|
|
|||
|
;___________________________________________________________________________
|
|||
|
;
|
|||
|
; Text Edit
|
|||
|
|
|||
|
; Set/Replace style modes
|
|||
|
|
|||
|
fontBit EQU 0 ; set font
|
|||
|
faceBit EQU 1 ; set face
|
|||
|
sizeBit EQU 2 ; set size
|
|||
|
clrBit EQU 3 ; set color
|
|||
|
addSizeBit EQU 4 ; add size mode
|
|||
|
toglBit EQU 5 ;set faces in toggle mode
|
|||
|
; TESetStyle/TEContinuousStyle modes
|
|||
|
doFont EQU $01
|
|||
|
doFace EQU 2
|
|||
|
doSize EQU 4
|
|||
|
doColor EQU 8
|
|||
|
doAll EQU 15 ; set font/face/size/color
|
|||
|
addSize EQU 16
|
|||
|
doToggle EQU 32
|
|||
|
; New internal dispatch table
|
|||
|
; --offsets into TEDispatchRec
|
|||
|
EOLHook EQU 0 ; [ProcPtr] TEEOLHook
|
|||
|
DRAWHook EQU 4 ; [ProcPtr] TEWidthHook
|
|||
|
WIDTHHook EQU 8 ; [ProcPtr] TEDrawHook
|
|||
|
HITTESTHook EQU 12 ; [ProcPtr] TEHitTestHook
|
|||
|
nWIDTHHook EQU 24 ; [ProcPtr] nTEWidthHook <6>
|
|||
|
TextWidthHook EQU 28 ; [ProcPtr] TETextWidthHook <13>
|
|||
|
; --selectors for TECustomHook
|
|||
|
IntEOLHook EQU 0
|
|||
|
IntDrawHook EQU 1
|
|||
|
IntWidthHook EQU 2
|
|||
|
IntHitTestHook EQU 3
|
|||
|
IntNWidthHook EQU 6 ; new version of WidthHook <6>
|
|||
|
IntTextWidthHook EQU 7 ; new TextWidthHook <13>
|
|||
|
teDispatchH EQU teRecBack ; new handle to internal dispatch record
|
|||
|
; handle to style record
|
|||
|
|
|||
|
teStylesH EQU $4A ; replaces teFont/teFace
|
|||
|
|
|||
|
; offsets into TEStyleRec
|
|||
|
|
|||
|
nRuns EQU $0 ; [INTEGER] # of entries in styleStarts array
|
|||
|
nStyles EQU $2 ; [INTEGER] # of distinct styles
|
|||
|
styleTab EQU $4 ; [STHandle] handle to distinct styles
|
|||
|
lhTab EQU $8 ; [LHHandle] handle to line heights
|
|||
|
teRefCon EQU $C ; [LONGINT] reserved
|
|||
|
nullStyle EQU $10 ; [NullStHandle] to style set at null selection
|
|||
|
runs EQU $14 ; array of styles
|
|||
|
|
|||
|
; offsets into NullStRec
|
|||
|
|
|||
|
teReserved EQU 0 ; [LONGINT] reserved for future expansion
|
|||
|
nullScrap EQU 4 ; [StScrpHandle] handle to scrap style table.
|
|||
|
nullStSize EQU 8
|
|||
|
|
|||
|
; offsets into StyleRun array
|
|||
|
|
|||
|
startChar EQU 0 ; [INTEGER] offset into text to start of style
|
|||
|
styleIndex EQU 2 ; [INTEGER] style index
|
|||
|
stStartSize EQU 4 ; size of a styleStarts entry
|
|||
|
|
|||
|
; offsets into STElement
|
|||
|
|
|||
|
stCount EQU 0 ; [INTEGER] # of times this style is used
|
|||
|
stHeight EQU 2 ; [INTEGER] line height
|
|||
|
stAscent EQU 4 ; [INTEGER] ascent
|
|||
|
stFont EQU 6 ; [INTEGER] font
|
|||
|
stFace EQU 8 ; [Style] face
|
|||
|
stSize EQU 10 ; [INTEGER] size
|
|||
|
stColor EQU 12 ; [RGBColor] color
|
|||
|
stRecSize EQU 18 ; size of a teStylesRec
|
|||
|
|
|||
|
; offsets into TextStyle
|
|||
|
|
|||
|
tsFont EQU 0 ; [INTEGER] font
|
|||
|
tsFace EQU 2 ; [Style] face
|
|||
|
tsSize EQU 4 ; [INTEGER] size
|
|||
|
tsColor EQU 6 ; [RGBColor] color
|
|||
|
styleSize EQU 12 ; size of a StylRec
|
|||
|
|
|||
|
; offsets into StScrpRec
|
|||
|
|
|||
|
scrpNStyles EQU 0 ; [INTEGER] # of styles in scrap
|
|||
|
scrpStyleTab EQU 2 ; [ScrpSTTable] start of scrap styles array
|
|||
|
|
|||
|
; offsets into scrpSTElement
|
|||
|
|
|||
|
scrpStartChar EQU 0 ; [LONGINT] char where this style starts
|
|||
|
scrpHeight EQU 4 ; [INTEGER] line height
|
|||
|
scrpAscent EQU 6 ; [INTEGER] ascent
|
|||
|
scrpFont EQU 8 ; [INTEGER] font
|
|||
|
scrpFace EQU 10 ; [Style] face
|
|||
|
scrpSize EQU 12 ; [INTEGER] size
|
|||
|
scrpColor EQU 14 ; [RGBColor] color
|
|||
|
scrpRecSize EQU 20 ; size of a scrap record
|
|||
|
|
|||
|
teFAutoScr EQU 0 ; (00000001b)
|
|||
|
; feature definitions for TEFeatureFlag
|
|||
|
teFTextBuffering EQU 1 ; (00000010b)
|
|||
|
teFOutlineHilite EQU 2 ; (00000100b)
|
|||
|
teFInlineInput EQU 3 ; (00001000b)
|
|||
|
teFUseTextServices EQU 4 ; (00010000b)
|
|||
|
|
|||
|
; action for the new "bit (un)set" interface, TEFeatureFlag
|
|||
|
TEBitClear EQU 0
|
|||
|
TEBitSet EQU 1 ; set the selector bit.
|
|||
|
TEBitTest EQU -1 ; no change; just return the present value
|
|||
|
|
|||
|
; constants for identifying the routine that called FindWord <5>
|
|||
|
teWordSelect EQU 4 ; clickExpand to select word
|
|||
|
teWordDrag EQU 8 ; clickExpand to drag new word
|
|||
|
teFromFind EQU 12 ; FindLine called it ($0C)
|
|||
|
teFromRecal EQU 16 ; RecalLines called it ($10)
|
|||
|
|
|||
|
; constants for identifying DoText selectors
|
|||
|
teFind Equ 0 ; DoText called for searching
|
|||
|
teHighlight Equ 1 ; DoText called for highlighting
|
|||
|
teDraw Equ -1 ; DoText called for drawing text
|
|||
|
teCaret Equ -2 ; DoText called for drawing the caret
|
|||
|
|
|||
|
; Text Edit Selectors:
|
|||
|
|
|||
|
teStylPaste EQU 0
|
|||
|
teStylePaste EQU 0
|
|||
|
teSetStyle EQU 1
|
|||
|
teReplaceStyle EQU 2
|
|||
|
teGetStyle EQU 3
|
|||
|
getStylHandle EQU 4
|
|||
|
getStyleHandle EQU 4
|
|||
|
setStylHandle EQU 5
|
|||
|
setStyleHandle EQU 5
|
|||
|
getStylScrap EQU 6
|
|||
|
getStyleScrap EQU 6
|
|||
|
teStylInsert EQU 7
|
|||
|
teStyleInsert EQU 7
|
|||
|
teGetPoint EQU 8
|
|||
|
teGetHeight EQU 9
|
|||
|
|
|||
|
teContinuousStyle EQU 10
|
|||
|
setStylScrap EQU 11
|
|||
|
setStyleScrap EQU 11
|
|||
|
teCustomHook EQU 12
|
|||
|
teNumStyles EQU 13
|
|||
|
teFeatureFlag EQU 14 ; new for System 6.0.5/Script Systems 6.0.4 <1.5>
|
|||
|
|
|||
|
MACRO
|
|||
|
_TEContinuousStyle
|
|||
|
MOVE.W #teContinuousStyle,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_SetStylScrap
|
|||
|
MOVE.W #setStylScrap,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_SetStyleScrap
|
|||
|
MOVE.W #setStyleScrap,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_TEUseStyleScrap ; <26>
|
|||
|
MOVE.W #setStyleScrap,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_TECustomHook
|
|||
|
MOVE.W #teCustomHook,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_TENumStyles
|
|||
|
MOVE.W #teNumStyles,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
; new for System 6.0.5/Script Systems 6.0.4 <1.5>
|
|||
|
MACRO
|
|||
|
_TEFeatureFlag
|
|||
|
MOVE.W #teFeatureFlag,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_TEStylPaste
|
|||
|
MOVE.W #teStylPaste,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_TEStylePaste
|
|||
|
MOVE.W #teStylePaste,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_TESetStyle
|
|||
|
MOVE.W #teSetStyle,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_TEReplaceStyle
|
|||
|
MOVE.W #teReplaceStyle,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_TEGetStyle
|
|||
|
MOVE.W #teGetStyle,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_GetStylHandle
|
|||
|
MOVE.W #getStylHandle,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_GetStyleHandle
|
|||
|
MOVE.W #getStyleHandle,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_TEGetStyleHandle ; <26>
|
|||
|
MOVE.W #getStyleHandle,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_SetStylHandle
|
|||
|
MOVE.W #setStylHandle,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_SetStyleHandle
|
|||
|
MOVE.W #setStyleHandle,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_TESetStyleHandle ; <26>
|
|||
|
MOVE.W #setStyleHandle,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_GetStylScrap
|
|||
|
MOVE.W #getStylScrap,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_GetStyleScrap
|
|||
|
MOVE.W #getStyleScrap,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_TEGetStyleScrap ; <26>
|
|||
|
MOVE.W #getStyleScrap,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_TEStylInsert
|
|||
|
MOVE.W #teStylInsert,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_TEStyleInsert
|
|||
|
MOVE.W #teStyleInsert,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_TEGetPoint
|
|||
|
MOVE.W #teGetPoint,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_TEGetHeight
|
|||
|
MOVE.W #teGetHeight,-(SP)
|
|||
|
DC.W $A83D ; _TEDispatch
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_AppendDITL
|
|||
|
MOVE.W #AppendDITL,-(SP)
|
|||
|
MOVE.L SP,A0
|
|||
|
_CommToolboxDispatch
|
|||
|
ADDA.W #$2,SP ; Pop the Selector back off
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_CountDITL
|
|||
|
MOVE.W #CountDITL,-(SP)
|
|||
|
MOVE.L SP,A0
|
|||
|
_CommToolboxDispatch
|
|||
|
ADDA.W #$2,SP ; Pop the Selector back off
|
|||
|
ENDM
|
|||
|
|
|||
|
MACRO
|
|||
|
_ShortenDITL
|
|||
|
MOVE.W #ShortenDITL,-(SP)
|
|||
|
MOVE.L SP,A0
|
|||
|
_CommToolboxDispatch
|
|||
|
ADDA.W #$2,SP ; Pop the Selector back off
|
|||
|
ENDM
|
|||
|
|
|||
|
ENDIF
|
|||
|
|
|||
|
ENDIF ; ...already included
|