supermario/base/SuperMarioProj.1994-02-09/Interfaces/AIncludes/Balloons.a
2019-06-29 23:17:50 +08:00

328 lines
12 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;
; File: Balloons.a
;
; Contains: Assembly Equates for calling Balloon Help
;
; Written by: Randy Carr
;
; Copyright: © 1989-1992 by Apple Computer, Inc., all rights reserved.
;
; This file is used in these builds: BigBang
;
; Change History (most recent first):
;
; <18> 2/11/92 MH Add include of Traps.a to support references to _Pack14
; <17> 11/1/91 KSM Reserve some HelpMgr selectors for FSM calls.
; <16> 9/20/91 MH Removed macro _HMSystemMenu. It can't work because the selector
; is not defined anywhere in the public or private sources. Its
; not documented in IM or Technotes either, and its not referenced
; in any BBS Sources. If anyone cares enough to find out what the
; selector is supposed to be and write a technote explaining how
; the call is used, then it can be put back into the public
; interfaces.
; <15> 8/18/91 MH added: kHMGetBalloonWindow EQU $0215 to support the reference in
; _HMGetBalloonWindow trap macro. Corrected comment for
; kHMGetHelpMenuHandle.
; <14> 1/30/91 gbm sab, #38: Change the already including this file variable to
; all uppercase (for security reasons)
; <13> 1/24/91 stb RC: change pics to picts
; <12> 9/24/90 RLC Fix the interface to HMGetIndHelpMsg to pass $1306 as
; the selector (not $1106) as there are 19 words of
; parameters (not 17 as originally counted [I better go
; back to grade school]). This will result in a crash if
; this call is made as procHelper won't copy enuf
; parameters to & from the stack!
; <12> 9/24/90 RLC Fix the interface to HMGetIndHelpMsg to pass $1306 as the
; selector (not $1106) as there are 19 words of parameters (not 17
; as originally counted [I better go back to grade school]). This
; will result in a crash if this call is made as procHelper won't
; copy enuf parameters to & from the stack!
; <11> 8/31/90 RLC Remove tons of extraneous equates.
; <9+> 8/17/90 RLC Match up file EQUs with Balloons.p file.
; <8+> 7/24/90 RLC Update HMShowBalloon(), remove HMMouseInApplRgn(), add
; HMGetIndHelpMsg().
; <8> 5/31/90 RLC Change HMState to HMGetHelpMenuHandle.
; <5> 4/24/90 RLC Add GetDialogResID & GetMenuResID macros.
; <4> 4/17/90 RLC Add reference to HMFillCitationString routine.
; <2+> 4/5/90 RLC New HMExtractHelpMsg macro & equates.
; <2> 3/20/90 RLC Rip some extraneous equates.
; <1> 3/20/90 RLC first checked in
;
; To Do:
;
IF &TYPE('__INCLUDINGBALLOONS__') = 'UNDEFINED' THEN
__INCLUDINGBALLOONS__ SET 1
IF &TYPE('__INCLUDINGTRAPS__') = 'UNDEFINED' THEN
INCLUDE 'Traps.a'
ENDIF
TITLE 'Balloons.a - Help Manager'
;
;___________________________________________________________________________________________________________
;
hmBalloonHelpVersion EQU 2 ; The real version of the Help Manager
;
; Help Mgr Error Codes in range: -850 to -874
;
hmHelpDisabled EQU -850 ; Show Balloons mode was off, call to routine ignored
hmBalloonAborted EQU -853 ; Returned if mouse was moving or mouse wasn't in window port rect
hmSameAsLastBalloon EQU -854 ; Returned from HMShowMenuBalloon if menu & item is same as last time
hmHelpManagerNotInited EQU -855 ; Returned from HMGetHelpMenuHandle if help menu not setup
hmSkippedBalloon EQU -857 ; Returned from calls if helpmsg specified a skip balloon
hmWrongVersion EQU -858 ; Returned if help mgr resource was the wrong version
hmUnknownHelpType EQU -859 ; Returned if help msg record contained a bad type
hmOperationUnsupported EQU -861 ; Returned from HMShowBalloon call if bad method passed to routine
hmNoBalloonUp EQU -862 ; Returned from HMRemoveBalloon if no balloon was visible when call was made
hmCloseViewActive EQU -863 ; Returned from HMRemoveBalloon if CloseView was active
;
kHMHelpMenuID EQU -16490 ; Resource ID and menu ID of help menu
kHMAboutHelpItem EQU 1 ; help menu item number of About Balloon Help…
kHMShowBalloonsItem EQU 3 ; help menu item number of Show/Hide Balloons
;
kHMBalloonHelpID EQU -5696 ; ID of various Help Mgr package resources (in Pack14 range)
kHMBalloonWDEFID EQU 126 ; Resource ID of the WDEF proc used in standard balloons
;
helpItem EQU 1 ; key value in DITL template that corresponds to the help item
;
; 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
;
; Constants for Help Types in 'hmnu', 'hdlg', 'hrct', 'hovr', & 'hfdr' resources
;
kHMStringItem EQU 1 ; pstring used in resource
kHMPictItem EQU 2 ; 'PICT' ResID used in resource
kHMStringResItem EQU 3 ; 'STR#' ResID & index used in resource
kHMTEResItem EQU 6 ; Styled Text Edit ResID used in resource ('TEXT' & 'styl')
kHMSTRResItem EQU 7 ; 'STR ' ResID used in resource
kHMSkipItem EQU 256 ; don't display a balloon
kHMCompareItem EQU 512 ; Compare pstring in menu item w/ PString in resource item ('hmnu' only)
kHMNamedResourceItem EQU 1024 ; Use pstring in menu item to get 'STR#', 'PICT', or 'STR ' resource ('hmnu' only)
kHMTrackCntlItem EQU 2048 ; Reserved
;
; Constants for hmmHelpType's when filling out HMMessageRecord
;
khmmString EQU 1 ; help message contains a PString
khmmPict EQU 2 ; help message contains a resource ID to a 'PICT' resource
khmmStringRes EQU 3 ; help message contains a res ID & index to a 'STR#' resource
khmmTEHandle EQU 4 ; help message contains a Text Edit handle
khmmPictHandle EQU 5 ; help message contains a Picture handle
khmmTERes EQU 6 ; help message contains a res ID to 'TEXT' & 'styl' resources
khmmSTRRes EQU 7 ; help message contains a res ID to a 'STR ' resource
;
; ResTypes for Styled TE Handles when extracting from Resources
;
kHMTETextResType EQU 'TEXT' ; Resource Type of text data for styled TE record w/o style info
kHMTEStyleResType EQU 'styl' ; Resource Type of style information for styled TE record
; Generic defines for the state parameter used when extracting 'hmnu' & 'hdlg' messages
;
kHMEnabledItem EQU 0 ; item is enabled, but not checked or control value EQU 0
kHMDisabledItem EQU 1 ; item is disabled, grayed in menus or disabled in dialogs
kHMCheckedItem EQU 2 ; item is enabled, and checked or control value EQU 1
kHMOtherItem EQU 3 ; item is enabled, and control value > 1
;
; Resource Types for whichType parameter used when extracting 'hmnu' & 'hdlg' messages
;
kHMMenuResType EQU 'hmnu' ; ResType of help resource for supporting menus
kHMDialogResType EQU 'hdlg' ; ResType of help resource for supporting dialogs
kHMWindListResType EQU 'hwin' ; ResType of help resource for supporting windows
kHMRectListResType EQU 'hrct' ; ResType of help resource for rectangles in windows
kHMOverrideResType EQU 'hovr' ; ResType of help resource for overriding system balloons
kHMFinderApplResType EQU 'hfdr' ; ResType of help resource for custom balloon in Finder
;
; Method parameters to pass to HMShowBalloon
;
kHMRegularWindow EQU 0 ; Create a regular window floating above all windows
kHMSaveBitsNoWindow EQU 1 ; Just save the bits and draw (for MDEF calls
kHMSaveBitsWindow EQU 2 ; Regular window, save bits behind, AND generate update event
;
; help message structure (offsets into help message record)
;
hmmHelpType EQU 0
hmmHelpMessage EQU 2
hmmHMSize EQU 4 + 256 ; HMMessageRecord worse case size
;
; help message size
;
khmmMsgSize EQU 256 + 2 ; max pstring + type integer
;
;
;___________________________________________________________________________________________________________
;
; Package selectors for Help Manager Package
;
kHMGetHelpMenuHandle EQU $0200 ; 2 words of parameters
kHMShowBalloon EQU $0B01 ; 11 words of parameters
kHMRemoveBalloon EQU $0002 ; 0 words of parameters
kHMGetBalloons EQU $0003 ; 0 words of params (Note: doesn't load package!)
kHMSetBalloons EQU $0104 ; 1 word of parameters
kHMShowMenuBalloon EQU $0E05 ; 14 words of parameters
kHMGetIndHelpMsg EQU $1306 ; 19 words of parameters <12>
kHMIsBalloon EQU $0007 ; 0 words of parameters
kHMSetFont EQU $0108 ; 1 word of parameters
kHMSetFontSize EQU $0109 ; 1 word of parameters
kHMGetFont EQU $020A ; 2 words of parameters
kHMGetFontSize EQU $020B ; 2 words of parameters
kHMSetDialogResID EQU $010C ; 1 words of parameters
kHMSetMenuResID EQU $020D ; 2 words of parameters
kHMBalloonRect EQU $040E ; 4 words of parameters
kHMBalloonPict EQU $040F ; 4 words of parameters
kHMScanTemplateItems EQU $0410 ; 4 words of parameters
kHMExtractHelpMsg EQU $0711 ; 7 words of parameters
kHMFillCitationString EQU $0512 ; 5 words of parameters
kHMGetDialogResID EQU $0213 ; 2 words of parameters
kHMGetMenuResID EQU $0314 ; 3 words of parameters
kHMGetBalloonWindow EQU $0215 ; 2 words of parameters
IF theFuture THEN
; NOTE: <17>
; The selectors $16 thru $1D are reserved for the FSM init.
; The Gestalt selector gestaltHelpMgrExtensions defines the
; existence of these calls and the FSM init will use the
; system-defined version of these calls when this bit is true.
kHMNewHMNU EQU $0B16
kHMDisposeHMNU EQU $0217
kHMClearHMNUItemInfo EQU $0218
kHMCountHMNUItems EQU $0219
kHMInsertHMNUItem EQU $051A
kHMDeleteIHMNUtem EQU $031B
kHMGetHMNUItem EQU $051C
kHMSetHMNUItem EQU $051D
ENDIF
;
;___________________________________________________________________________________________________________
;
; Help Manager interface macros
;
macro
_HMGetHelpMenuHandle
MOVE.W #kHMGetHelpMenuHandle,D0
_Pack14
endm
macro
_HMShowBalloon
MOVE.W #kHMShowBalloon,D0
_Pack14
endm
macro
_HMRemoveBalloon
MOVE.W #kHMRemoveBalloon,D0
_Pack14
endm
macro
_HMGetBalloons
MOVE.W #kHMGetBalloons,D0
_Pack14
endm
macro
_HMSetBalloons
MOVE.W #kHMSetBalloons,D0
_Pack14
endm
macro
_HMShowMenuBalloon
MOVE.W #kHMShowMenuBalloon,D0
_Pack14
endm
macro
_HMGetIndHelpMsg
MOVE.W #kHMGetIndHelpMsg,D0
_Pack14
endm
macro
_HMIsBalloon
MOVE.W #kHMIsBalloon,D0
_Pack14
endm
macro
_HMSetFont
MOVE.W #kHMSetFont,D0
_Pack14
endm
macro
_HMGetFont
MOVE.W #kHMGetFont,D0
_Pack14
endm
macro
_HMGetFontSize
MOVE.W #kHMGetFontSize,D0
_Pack14
endm
macro
_HMSetDialogResID
MOVE.W #kHMSetDialogResID,D0
_Pack14
endm
macro
_HMSetMenuResID
MOVE.W #kHMSetMenuResID,D0
_Pack14
endm
macro
_HMBalloonRect
MOVE.W #kHMBalloonRect,D0
_Pack14
endm
macro
_HMBalloonPict
MOVE.W #kHMBalloonPict,D0
_Pack14
endm
macro
_HMScanTemplateItems
MOVE.W #kHMScanTemplateItems,D0
_Pack14
endm
macro
_HMExtractHelpMsg
MOVE.W #kHMExtractHelpMsg,D0
_Pack14
endm
macro
_HMFillCitationString
MOVE.W #kHMFillCitationString,D0
_Pack14
endm
macro
_HMGetDialogResID
MOVE.W #kHMGetDialogResID,D0
_Pack14
endm
macro
_HMGetMenuResID
MOVE.W #kHMGetMenuResID,D0
_Pack14
endm
macro
_HMGetBalloonWindow
MOVE.W #kHMGetBalloonWindow,D0
_Pack14
endm
ENDIF ; ...already included