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

404 lines
15 KiB
Plaintext

;
; File: BalloonPACKEqu.a
;
; Contains: Assembly Equates for Balloon Help Package
;
; Written by: Randy Carr
;
; Copyright: © 1989-1990 by Apple Computer, Inc., all rights reserved.
;
; This file is used in these builds: BigBang
;
;
; Change History (most recent first):
;
; <45> 1/18/91 KSM <RLC> Everything moved to BalloonsPriv.a.
; <44> 1/8/91 RLC Move the private macros to the BalloonsPriv.a file in :Internal:
; and change to include the private file in this file.
; <43> 1/6/91 ngk Fixed _HMCountDITLHelpItems to use MOVE.W instead of MOVEQ.
; <42> 12/14/90 RLC Remove kHMAppleMenuDisabledTitle & kHMAppleMenuDisabledItem
; equates as strings that these equate to are identical to
; kHMActiveApplDisabledTitle & kHMActiveApplDisabledItem strings.
; Changed kHMFinderOnly to kHMActiveApplOther to support menu
; items in Process menu that are marked. Add reference to the new
; globals: hmgSystemMenuID, hmgSystemMenuItem INTEGERs.
; <40+> 10/17/90 RLC <ksm> We're calling HMScanTemplate items internally instead of
; duplicating that code when scanning an 'hwin' resource (saves
; >720 bytes). Remove reference to hmgContentWindow and
; hmgOurBalloon as HMScanTemplate sets its own last window check
; and that isn't the hmgContentWindow variable.
; <40> 9/30/90 RLC Change reference from hmgLastWindow to hmgContentWindow to keep
; the confusion level lower.
; <39> 9/25/90 RLC Add some pascal equivalent globals to this file so that I can
; check to see if any of the special balloons are up in the menu
; bar.
; <37+> 9/22/90 RLC Add hmgHelpWindow windowptr to the HMGlobalRecord to keep the
; preallocated window ptr around so that we can compare it to the
; window being removed to close the window vs. just hiding it.
; <37> 9/13/90 RLC Add hmgHelpWRecord to always have a preallocated window record
; instead of allocating it in the calling app's heap; Update rest
; of hmGlobalRecord assembly offsets to match offsets in
; :BalloonDefs.p file.
; <36> 8/31/90 RLC Remove some extraneous equates.
; <34+> 8/20/90 RLC Remove hmgUserLevel EQU.
; <33+> 8/16/90 RLC Change private interfaces to always return OsErr.
; <33+> 8/6/90 RLC Add new private to call: HMInitHelpMenu code from ProcessMgr at
; startup.
; <32+> 8/1/90 RLC Change HMTrackTemplateHelpItems private to HMInvalidateSavedBits
; private.
; <31+> 7/17/90 RLC Remove reference to hmgProcessFileName.
; <30+> 7/16/90 RLC Update references to HMGlobalRecord to match FSSSpec in
; ProcessFileName.
; <30> 7/13/90 RLC Update global record to match BalloonDefs.p record.
; <28+> 7/5/90 RLC Add some internal result codes.
; <27+> 6/22/90 RLC Add kHMFinderAppResType EQU for 'hfdr
; <26+> 6/14/90 RLC Update HMGlobalRecord to match the pascal one in BalloonDefs.p
; <26> 6/8/90 RLC Update to include newest macros & equates.
; <24+> 5/31/90 RLC Add new STR# message index.
; <23+> 5/29/90 RLC Update equates to support the "Show All" menu item in Process
; item.
; <22+> 5/4/90 RLC New patch equates.
; <21+> 5/3/90 RLC Add hmgLastFrontWindow global for modal dialog update.
; <20+> 4/23/90 RLC New macros.
; <19+> 4/17/90 RLC Add reference to HMFillCitationString.
; <18+> 4/10/90 KSM More equates to handle the new system menu patches.
; <17+> 4/5/90 RLC Define some more options.
; <16+> 4/2/90 RLC Put in equates to support HMSetDialogResID.
; <15+> 3/28/90 RLC Add our help menu handle to global record.
; <14+> 3/27/90 RLC Add equate for AppendMenu.
; <13+> 3/20/90 RLC Update equates.
; <12+> 3/15/90 RLC More equate adjustments.
; <11+> 3/9/90 RLC Add new package selectors for new interfaces.
; <10+> 2/23/90 RLC Update & toss a bunch of globals from HMGlobalRecord.
; <9+> 2/8/90 RLC Add equates to support HMNamed items.
; <8+> 2/5/90 RLC Add support for delay equates in HMGlobalRecord offsets.
; <7+> 1/31/90 RLC Revise HMGlobalRecord offsets (again).
; <6+> 1/30/90 RLC Add new equates.
; <5+> 1/26/90 RLC Update hmgGlobalRecord offsets.
; <5> 1/23/90 RLC Update _HM Macros.
; <3+> 1/12/90 RLC Update macros for calling Pack14
; <2+> 1/11/90 RLC Tweak hdlg equates to handle HMSkipItem correctly.
; <1+> 1/4/90 RLC Toss old resource format equates and fold in new ones.
; <2.5> 11/30/89 RLC Update Globals offsets, add new options bits.
; <2.4> 11/16/89 RLC Add HelpMgr macros to file.
; <2.3> 11/15/89 RLC Update.
; <2.2> 11/13/89 RLC Add new equates to support new 'hdlg' tip and altRect parameters
; in HDialogArray.
; <2.1> 11/9/89 RLC Add HMUserItem equate.
; <2.0> 11/2/89 RLC Added more essential equates.
; <1.9> 10/27/89 RLC Fix a hmmCompare equate.
; <1.8> 10/1/89 RLC Updated equates for HelpMsg types: StyledTE & STR.
; <1.7> 9/21/89 RLC Changed Balloon Help WDEF ID to 126.
; <1.6> 9/20/89 RLC Add some new equates, remove old _pack14 selector codes.
; <1.5> 9/15/89 RLC For some reason this file didn't get submitted correctly for
; 1.4.
; <1.4> 9/13/89 RLC Added new equates to support the new 'hmnu', 'hdlg, & 'hrct'
; resources.
; <1.3> 8/29/89 RLC Added new equates to support the new 'hmnu', 'hdlg', 'hrct'
; resource structure.
; <1.2> 8/10/89 RLC added autocontents equates
; <1.1> 7/20/89 RLC Added equates for the help mgr system resources.
; <1.0> 6/29/89 RLC Created Today.
;
; To Do:
;
TITLE 'BalloonPackEqu.a - Help Manager'
IF 0 THEN
;
;
hmGetNextHelpItem EQU -873 ; internal return code when scanning a DITL for help items
hmWasAppleMenu EQU -874 ; internal return code for apple menu results
;
kHMKeybdMenuID EQU -16491 ; script manager menu ID
kHMProcessMenuID EQU -16489 ; application menu ID
;
kHMHelpBWPictID EQU -5696 ;
kHMHelpColorPictID EQU -5695 ; +1 from BW pict ID
kHMHelpIconID EQU -5696
kHMAboutHelpID EQU -5696
; These constants need to match those in Balloon.r
kHMShowMenuStringIDBase EQU kHMBalloonHelpID ; From Balloons.a
kHMShowMenuStringID EQU kHMShowMenuStringIDBase + 0
kHMHideMenuStringID EQU kHMShowMenuStringIDBase + 1
;
; Process menu equates
;
kHMHideCurrentItem EQU 1
kHMHideOthersItem EQU 2
kHMShowAllItem EQU 3
kHMProcessDashItem EQU 4
kHMProcessesItem EQU 5
;
kHMMenuItemCount EQU 3 ; how many items in menu
;
kHMSlopPix EQU 5
kHMDelayTix EQU 5
;
;
;
; Assembly Equivalent global offsets (Defined in BalloonDefs.p HMGlobalRecord record)
;
hmgItemRect EQU 0 ; Rect
hmgItemNum EQU hmgItemRect+8 ; integer
hmgTitleBalloon EQU hmgItemNum+2 ; integer
hmgState EQU hmgTitleBalloon+2 ; integer
hmgWindow EQU hmgState+2 ; WindowPtr
hmgHelpWindow EQU hmgWindow+4 ; WindowPtr; { our help window }
hmgHelpWRecord EQU hmgHelpWindow+4 ; Space for help window record
hmgMenuID EQU hmgHelpWRecord+windowSize ; integer
hmgSavedBitsHandle EQU hmgMenuID+2 ; PixMapHandle
hmgTix EQU hmgSavedBitsHandle+4
hmgLastPartCode EQU hmgTix+4 ;
hmgLastWindowPtr EQU hmgLastPartCode+2 ;
hmgLastMenuID EQU hmgLastWindowPtr+4
hmgLastEnabled EQU hmgLastMenuID+2
hmgLastItem EQU hmgLastEnabled+4
hmgLastWidth EQU hmgLastItem+2 ; INTEGER;
hmgLastHeight EQU hmgLastWidth+2 ; INTEGER;
hmgLastLeft EQU hmgLastHeight+2 ; INTEGER;
hmgLastTop EQU hmgLastLeft+2 ; INTEGER;
hmgSlopRect EQU hmgLastTop+2
hmgDelay EQU hmgSlopRect+8
hmgFont EQU hmgDelay+2 ; or hmgFontAndSize as a LongWord
hmgFontSize EQU hmgFont+2
hmgBulkReentrantCount EQU hmgFontSize+2
hmgOSEventReentrantCount EQU hmgBulkReentrantCount+2
hmgCloseViewCount EQU hmgOSEventReentrantCount+2
hmgLayer EQU hmgCloseViewCount+2
hmgProcessName EQU hmgLayer+4
hmgMenuQueue EQU hmgProcessName+34
hmgDialogQueue EQU hmgMenuQueue+4
hmgTEHandle EQU hmgDialogQueue+4 ; TEHandle;
hmgSystemMenuID EQU hmgTEHandle+4 ; INTEGER;
hmgSystemMenuItem EQU hmgSystemMenuID+2 ; INTEGER;
hmgInMenuSelectFlag EQU hmgSystemMenuItem+2 ; INTEGER;
hmgWhatIs EQU hmgInMenuSelectFlag+2
;
;
kTitleType EQU 1
kDialogType EQU 2
kMenuType EQU 3
kRectType EQU 4
kMFType EQU 5
kWindPartType EQU 6
;
kwasMultiFinder EQU -2
kwasWindowPart EQU -3
kwasMenuTitle EQU -4
kwasCleared EQU -5
kwasEasyAccess EQU -6
;
; {System STR# resource indexes}
;
kHMMenuTitleIndex EQU 1 ;
kHMAboutHelpIndex EQU 2 ;
kHMAboutHelpDisabled EQU 3
kHMReserved EQU 4 ;
kHMWhatIsHide EQU 5 ;
kHMInDragIndex EQU 6 ;
kHMInGrowIndex EQU 7 ;
kHMInGoAwayIndex EQU 8 ;
kHMInZoomIndex EQU 9 ;
kHMMultiFinderIndex EQU 10 ;
kHMInScrollBar EQU 11 ;
kHMInDisabledScrollBar EQU 12 ;
kHMInOtherWindow EQU 13 ;
kHMInLayerPreamble EQU 14 ;
kHMInLayerBody EQU 15 ;
kHMOutsideModalWindow EQU 16 ;
kHMAppleMenuTitle EQU 17
kHMShowHideEnabled EQU 18
kHMHideCurrentEnabled EQU 0 ; must be in numerical order per menu
kHMHideOthersEnabled EQU 1
kHMShowAllEnabled EQU 2
kHMShowHideDisabled EQU 21
kHMHideCurrentDisabled EQU 0
kHMHideOthersDisabled EQU 1
kHMShowAllDisabled EQU 2
kHMEasy1Access EQU 24 ;
kHMEasy2Access EQU 25 ;
kHMEasy3Access EQU 26 ;
kHMActiveApplEnabled EQU 27 ;
kHMActiveApplDisabled EQU 28 ;
kHMActiveApplChecked EQU 29 ;
kHMActiveApplOther EQU 30
kHMActiveApplDisabledTitle EQU 31
kHMActiveApplDisabledItem EQU 32
;
;
; Universal Help Mgr Resource BTSTing bits that correspond to the
; additive "Options for Help Manager resources in 'hmnu', 'hdlg', 'hrct', 'hovr', & 'hfdr' resources"
;
; hmDefaultOptions EQU 0 ; default options for help manager resources
; hmUseSubID EQU 1 ; treat resID's in resources as subID's of driver base ID (for Desk Accessories)
; hmAbsoluteCoords EQU 2 ; ignore window port origin and treat rectangles as absolute coords (local to window)
; hmSaveBitsNoWindow EQU 4 ; don't create a window, just blast bits on screen. No update event is generated
; hmSaveBitsWindow EQU 8 ; create a window, but restore bits behind window when window goes away & generate update event
; hmMatchInTitle EQU 16 ; for hwin resources, match string anywhere in window title string
;
kBTSTUseSubID EQU 0 ; treat resID's in resources as subID's of driver base ID (for Desk Accessories)
kBTSTAbsoluteCoords EQU 1 ; ignore window port origin and treat rectangles as absolute coords (local to window)
kBTSTSaveBitsNoWindow EQU 2 ; don't create a window, just blast bits on screen. No update event is generated
kBTSTSaveBitsWindow EQU 3 ; create a window, but restore bits behind window when window goes away & generate update event
kBTSTMatchInTitle EQU 4 ; for hwin resources, match string anywhere in window title string
;
; HMNamedResourceItem offsets
;
hmNamedMsgSize EQU 0
hmNamedHelpType EQU 2
hmNamedResType EQU 4
hmNamedEnabledID EQU 8
hmNamedDisabledID EQU 10
hmNamedCheckedID EQU 12
hmNamedOtherID EQU 14
;
;
; hmnu resource structure
;
hmnuVersion EQU 0 ; version of this structure
hmnuOptions EQU 2 ; options
hmnuProcID EQU 6 ; the Balloon procedure ID (resource ID)
hmnuVariant EQU 8 ; the Balloon variant #
hmnuCount EQU 10 ; how many messages in the array
hmnuHeaderSize EQU hmnuCount + 2 ; add this value to index to start of
; real data
;
; hmnuMissingMsg message offsets
;
hmnuMissingSize EQU hmnuCount + 2 ;
hmnuMissingType EQU hmnuMissingSize + 2
hmnuMissingData EQU hmnuMissingType + 2
;
hmnuArray EQU 0 ; start of hmnuArray
;
; hmnuArray record structure
;
hmnuHelpMsgSize EQU 0
hmnuHelpType EQU 2 ; what type of hmnu message
hmnuHelpData EQU 4 ; start of message array for hmnu msgs
;
hmnuCompareStr EQU 0 ; address of pstring to compare menu items agains
hmnuCompHeaderSize EQU 2 ; *** 1 ints for HelpMsgSize & hmnuHelpType
;
hmnuCompType EQU 0
hmnuCompData EQU 2
;
; hdlg resource offsets
;
hdlgVersion EQU 0 ; version of this structure
hdlgOffset EQU 2 ; offset
hdlgOptions EQU 4 ; options
hdlgProcID EQU 8 ; the Balloon procedure ID (resource ID)
hdlgVariant EQU 10 ; the Balloon variant #
hdlgCount EQU 12 ; how many messages in the array
hdlgHeaderSize EQU hdlgCount+2 ; add this value to index to start of
; real data
;
; hdlgMissingMsg message offsets
;
hdlgMissingSize EQU hdlgHeaderSize
hdlgMissingTip EQU hdlgMissingSize + 2
hdlgMissingHotRect EQU hdlgMissingTip + 4
hdlgMissingType EQU hdlgMissingHotRect + 8
hdlgMissingData EQU hdlgMissingType + 2
;
hdlgArray EQU 0 ; this is the beginning of message records array
;
; HDialogArray record offsets
;
hdlgHelpMsgSize EQU 0 ; size of help message (I did this for high-level langs)
hdlgHelpType EQU 2 ; what type of hdlg message
hdlgTip EQU 4 ; tip point
hdlgHotRect EQU 8 ; hot rect
hdlgHelpData EQU 16 ; start of message array for hdlg msgs
;
;
; hwin resource offsets
;
hwinType EQU 0
hwinOptions EQU 2
hwinCount EQU 6
hwinArray EQU 8
;
hwinResID EQU 0
hwinResType EQU 2
hwinLength EQU 6
hwinString EQU 8 ; title string is always word aligned
;
; hrct Resource structure
;
hrctVersion EQU 0 ; version of the hrct resource
hrctOptions EQU hrctVersion + 2 ; options long
hrctProcID EQU hrctOptions + 4 ; use this procedure ID or default if 0
hrctVariant EQU hrctProcID + 2 ; use this variant # or default if 0
hrctCount EQU hrctVariant + 2 ; this is the count of records in hrct resource
;
hrctArray EQU hrctCount+2 ; this is the beginning of message records array
;
hrctHelpMsgSize EQU 0 ; size of help message (I did this for high-level langs)
hrctHelpType EQU 2 ; type of help message
hrctTip EQU 4 ; tip point
hrctHotRect EQU 8 ; hot rect
hrctHelpData EQU 16 ; contents of help message
;
; hovr resource structure
;
hovrVersion EQU 0 ; version of this structure
hovrOptions EQU 2 ; options
hovrProcID EQU 6 ; the Balloon procedure ID (resource ID)
hovrVariant EQU 8 ; the Balloon variant #
hovrCount EQU 10 ; how many messages in the array
hovrHeaderSize EQU hovrCount + 2 ; add this value to index to start of
; real data
;
; hovrMissingMsg message offsets
;
hovrMissingSize EQU hovrCount + 2 ;
hovrMissingType EQU hovrMissingSize + 2
hovrMissingData EQU hovrMissingType + 2
;
hovrArray EQU 0 ; start of hovrArray
;
; hovrArray record structure
;
hovrHelpMsgSize EQU 0
hovrHelpType EQU 2 ; what type of hovr message
hovrHelpData EQU 4 ; start of message array for hovr msgs
;
; hfdr Resource structure
;
hfdrVersion EQU 0 ; version of the hfdr resource
hfdrOptions EQU 2 ; options long
hfdrProcID EQU hfdrOptions + 4 ; use this procedure ID or default if 0
hfdrVariant EQU hfdrProcID + 2 ; use this variant # or default if 0
hfdrCount EQU hfdrVariant + 2 ; this is the count of records in hfdr resource
;
hfdrArray EQU hfdrCount+2 ; this is the beginning of message records array
;
; at this point, the data matches the hovr resource
;
hfdrHelpMsgSize EQU 0
hfdrHelpType EQU 2 ; what type of hfdr message
hfdrHelpData EQU 4 ; start of message array for hfdr msgs
;
kHMMinimumHelpMsgSize EQU 4 ; min size (in bytes) to extract a help msg w/o counting pstrings
;
INCLUDE 'BalloonsPriv.a' ; include the private macros here
ENDIF