boot3/Internal/Asm/BalloonsPriv.a

383 lines
12 KiB
Plaintext
Raw Normal View History

;
; File: BalloonsPriv.a
;
; Contains: Private Macros for Balloon Help private routines
;
; Written by: Randy Carr
;
; Copyright: <09> 1991 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <5> 8/21/91 JSM Clean up header.
; <4> 1/30/91 gbm sab, #38: Change the <20>already including this file<6C> variable to
; all uppercase (for security reasons)
; <3> 1/18/91 KSM <RLC> Roll BalloonPackEqu stuff into this file.
; <2> 1/9/91 ngk change moveq to move.w for HMCountDITLHelpItems
;
include 'Balloons.a'
;
;___________________________________________________________________________________________________________
;
; Private selectors for Help Manager Package
;
kHMCountDITLHelpItems EQU $02F8 ; 2 words of parameters (-8)
kHMModalDialogMenuSetup EQU $01F9 ; 1 word of parameters (-7)
kHMInvalidateSavedBits EQU $02FA ; 2 words of parameters (-6) (Note: doesn't load package!)
kHMTrackModalHelpItems EQU $00FB ; 0 words of parameters (-5)
kHMBalloonBulk EQU $00FC ; 0 words of parameters (-4)
kHMInitHelpMenu EQU $FFFD ; 0 words of parameters (-3)
kHMDrawBalloonFrame EQU $02FE ; 2 words of parameters (-2)
kHMSetupBalloonRgns EQU $07FF ; 7 words of parameters (-1)
;
;
;
;___________________________________________________________________________________________________________
;
; Private Help Manager macros
;
macro
_HMCountDITLHelpItems
MOVE.W #kHMCountDITLHelpItems,D0
_Pack14
endm
macro
_HMModalDialogMenuSetup
MOVE.W #kHMModalDialogMenuSetup,D0
_Pack14
endm
macro
_HMInvalidateSavedBits
MOVE.W #kHMInvalidateSavedBits,D0
_Pack14
endm
macro
_HMTrackModalHelpItems
MOVE.W #kHMTrackModalHelpItems,D0
_Pack14
endm
macro
_HMBalloonBulk
MOVE.W #kHMBalloonBulk,D0
_Pack14
endm
macro
_HMInitHelpMenu
MOVEQ #kHMInitHelpMenu,D0
_Pack14
endm
macro
_HMDrawBalloonFrame
MOVE.W #kHMDrawBalloonFrame,D0
_Pack14
endm
macro
_HMSetupBalloonRgns
MOVE.W #kHMSetupBalloonRgns,D0
_Pack14
endm
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