mac-rom/Internal/Asm/MenuMgrPriv.a
Elliot Nunn 5b0f0cc134 Bring in CubeE sources
Resource forks are included only for .rsrc files. These are DeRezzed into their data fork. 'ckid' resources, from the Projector VCS, are not included.

The Tools directory, containing mostly junk, is also excluded.
2017-12-26 10:02:57 +08:00

169 lines
5.4 KiB
Plaintext

;
; File: MenuMgrPriv.a
;
; Contains: Private equates and macros for using menu manager private calls
;
; Written by: Kevin S. MacDonell
;
; Copyright: © 1990-1991, 1993 by Apple Computer, Inc., all rights reserved.
;
; This file is used in these builds: System
;
; Change History (most recent first):
;
; <2> 3/31/93 IH Add _CalcMenuBar for Display Manager
; <12> 8/22/91 KSM DCC,#Bruges: Added utility routine InsertFontResMenu for Finder.
; <11> 4/16/91 KSM dba,#86852: Add reentrancy bit to fix case where Think Pascal
; patches DrawMenuBar to call HiliteMenu and we die in a recursive
; patch conflict.
; <10> 3/29/91 JSM dba, #84426: Add MenuBarGlobalInvalidBit and
; MenuBarGlobalInvalidByte.
; <9> 2/5/91 stb gs: move in SaveBits, RestoreBits, DiscardBits
; <8> 1/30/91 gbm sab, #38: Change the Ôalready including this fileÕ variable to
; all uppercase (for security reasons)
; <7> 1/21/91 DFH (ksm) Changing kProcessMenuID to kApplicationMenuID.
; <6> 11/26/90 KSM (dba)Make the MenuBarInvalidBit a switched value.
; <5> 7/2/90 KSM Add InvalMenubar constants.
; <4> 6/8/90 KSM Add SystemMenuList lowmem equate.
; <3> 6/8/90 KSM Define System Menus range.
; <2> 5/14/90 KSM Update header comments
; <1> 5/14/90 KSM New today.
;
;ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
IF &TYPE('__INCLUDINGMENUMGRPRIVATE__') = 'UNDEFINED' THEN
__INCLUDINGMENUMGRPRIVATE__ SET 1
IF &TYPE('__INCLUDINGMENUS__') = 'UNDEFINED' THEN
INCLUDE 'Menus.a'
ENDIF
;ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
MenuBarInvalidBit equ 6
MenuBarInvalidByte equ $B21
MenuBarGlobalInvalidBit equ 6
MenuBarGlobalInvalidByte equ $B20
ValidateMenuBarSemaphoreBit equ 3
ValidateMenuBarSemaphoreByte equ $B20
;ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
; Define the Menu Manager Dispatch trap opword
SystemMenuList EQU $286 ; a list of all the system menus (same format as MenuList)
kLoSystemMenuRange EQU $B000 ; This is -20480 (the lowest value)
kHiSystemMenuRange EQU $BFFF ; This is -16385 (the highest value)
kApplicationMenuID EQU $BF97 ; -16489: The application menu ID
kHelpMenuID EQU $BF96 ; -16490: The help menu ID
kScriptMenuID EQU $BF95 ; -16491: The keyboard menu ID
;ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
; Define the new selectors for the Menu Manager
selectGetMenuTitleRect EQU -1
selectGetMBARRect EQU -2
selectGetAppMenusRect EQU -3
selectGetSysMenusRect EQU -4
selectDrawMBARString EQU -5
selectIsSystemMenu EQU -6
selectMenuCalc EQU -11
paramWordsMenuCalc EQU 1
;ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
; Define the parameter size passed for each call
paramWordsGetMenuTitleRect EQU 6
paramWordsGetMBARRect EQU 4
paramWordsGetAppMenusRect EQU 4
paramWordsGetSysMenusRect EQU 4
paramWordsDrawMBARString EQU 8
paramWordsIsSystemMenu EQU 3
;ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
;ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
; Define the MBDF message numbers of the new calls
;ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
; MBDFRectCall -- Get rectangles for various parts of the menubar
MBDFRectCall EQU 14
; <pos> = 6 B.O.
MBDFRectBar EQU 0 ; Get the menubar rect
MBDFRectApps EQU -1 ; Get the rect enclosing the app menus
MBDFRectSys EQU -2 ; Get the rect enclosing the system menus
;ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
; MBDFDrawMBARString -- Splash a message into the menubar in a given script
MBDFDrawMBARString EQU 15
;ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
; Define the dispatch macros to get to the calls
MACRO
_GetMenuTitleRect
DoDispatch _MenuDispatch,selectGetMenuTitleRect,paramWordsGetMBARRect
ENDM
MACRO
_GetMBARRect
DoDispatch _MenuDispatch,selectGetMBARRect,paramWordsGetMBARRect
ENDM
MACRO
_GetAppMenusRect
DoDispatch _MenuDispatch,selectGetAppMenusRect,paramWordsGetAppMenusRect
ENDM
MACRO
_GetSysMenusRect
DoDispatch _MenuDispatch,selectGetSysMenusRect,paramWordsGetSysMenusRect
ENDM
MACRO
_DrawMBARString
DoDispatch _MenuDispatch,selectDrawMBARString,paramWordsDrawMBARString
ENDM
MACRO
_IsSystemMenu
DoDispatch _MenuDispatch,selectIsSystemMenu,paramWordsIsSystemMenu
ENDM
;ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
; SaveRestoreBits
_SaveRestoreBits OPWORD $A81E
selectSaveBits EQU 1
paramWordsSaveBits EQU 5
selectRestoreBits EQU 2
paramWordsRestoreBits EQU 2
selectDiscardBits EQU 3
paramWordsDiscardBits EQU 2
MACRO
_SaveBits
DoDispatch _SaveRestoreBits,selectSaveBits,paramWordsSaveBits
ENDM
MACRO
_RestoreBits
DoDispatch _SaveRestoreBits,selectRestoreBits,paramWordsRestoreBits
ENDM
MACRO
_DiscardBits
DoDispatch _SaveRestoreBits,selectDiscardBits,paramWordsDiscardBits
ENDM
MACRO
_CalcMenuBar
DoDispatch _MenuDispatch,selectMenuCalc,paramWordsMenuCalc
ENDM
ENDIF ; Already included