supermario/base/SuperMarioProj.1994-02-09/Internal/Asm/DialogsPriv.a
2019-06-29 23:17:50 +08:00

163 lines
4.4 KiB
Plaintext
Raw Permalink 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: DialogsPriv.a
;
; Contains: Assembly Interface for private dialog manager routines
;
; Written by: Nick Kledzik
;
; Copyright: © 1990-1992 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <10> 11/7/92 JDR Removed the now publicly defined routines, StdFilterProc,
; GetStdFilterProc, SetDialogDefaultItem, SetDialogCancelItem,
; SetDialogTracksCursor.
; <9> 6/10/92 JSM Add DialogMgrGlobals record for ROM builds and future System
; builds.
; <8> 3/31/92 KSM #1021993,<DTY>: DTY: #1021993: Added new selectors for
; CitationsCH, CitationsSH, and Cite4.
; <7> 8/21/91 JSM Clean up header.
; <6> 1/30/91 gbm sab, #38: Change the already including this file variable to
; all uppercase (for security reasons)
; <5> 1/14/91 dba (ksm) add IsUserCancelEvent and GetNextUserCancelEvent
; <4> 12/14/90 dba <JDR> change DialogMgrDispatch to DialogDispatch
; <3> 12/3/90 RLC <ksm> Change the IsFrontWindowModal and IsWindowModal routines
; to GetFrontWindowModalClass and GetWindowModalClass.
; <2> 10/30/90 KSM <ngk>Add emulateOrigFilterBit equate.
; <1> 10/29/90 ngk first checked in
; <0> 8/26/90 ngk First checked in
;
IF &TYPE('__INCLUDINGDIALOGSPRIV__') = 'UNDEFINED' THEN
__INCLUDINGDIALOGSPRIV__ SET 1
IF forROM OR TheFuture THEN
; format of globals in emDialogGlobals
DialogMgrGlobals record 0
AnalyzedWindowState ds.w 1
IsDialogState ds.w 1
AnalyzedWindow ds.l 1
SavedMenuState ds.l 1
DialogMgrGlobalsSize equ *
endr
ENDIF ; forROM OR TheFuture
; bits for flag byte
cannotTwitchOutOfDialogBit EQU 7
systemHandlesMenusBit EQU 6
systemHandlesDefaultButtonBit EQU 5
systemHandlesCancelButtonBit EQU 4
systemTracksCursorBit EQU 3
emulateOrigFilterBit EQU 2
cannotTwitchOutOfDialogMask EQU $80
systemHandlesMenusMask EQU $40
systemHandlesDefaultButtonMask EQU $20
systemHandlesCancelButtonMask EQU $10
systemTracksCursorMask EQU $08
emulateOrigFilterMask EQU $04
; constants for dialog dispatch macro
selectDMgrCite4 EQU -5
paramWordsDMgrCite4 EQU 10
selectDMgrCitationsSH EQU -4
paramWordsDMgrCitationsSH EQU 7
selectDMgrCitationsCH EQU -3
paramWordsDMgrCitationsCH EQU 5
selectDMgrPopMenuState EQU -2
paramWordsDMgrPopMenuState EQU 0
selectDMgrPushMenuState EQU -1
paramWordsDMgrPushMenuState EQU 0
selectGetFrontWindowModalClass EQU 1
paramWordsGetFrontWindowModalClass EQU 2
selectGetWindowModalClass EQU 2
paramWordsGetWindowModalClass EQU 4
selectIsUserCancelEvent EQU 7
paramWordsIsUserCancelEvent EQU 2
selectGetNextUserCancelEvent EQU 8
paramWordsGetNextUserCancelEvent EQU 2
MACRO
DoDialogMgrDispatch &routineName
DoDispatch _DialogDispatch,select&routineName,paramWords&routineName
ENDM
;-----------------------------------------------------------------------------------------
; Private calls (negative selectors)
;-----------------------------------------------------------------------------------------
; DMgrPushMenuState
MACRO
_DMgrPushMenuState
DoDialogMgrDispatch DMgrPushMenuState
ENDM
; DMgrPopMenuState
MACRO
_DMgrPopMenuState
DoDialogMgrDispatch DMgrPopMenuState
ENDM
; DMgrCitationsCH <8>
MACRO
_CitationsCH
DoDialogMgrDispatch DMgrCitationsCH
ENDM
; DMgrCitationsSH <8>
MACRO
_CitationsSH
DoDialogMgrDispatch DMgrStdCite
ENDM
; DMgrCite4 <8>
MACRO
_Do4Citations
DoDialogMgrDispatch DMgrCite4
ENDM
;-----------------------------------------------------------------------------------------
; Public calls (positive selectors)
;-----------------------------------------------------------------------------------------
; FUNCTION GetFrontWindowModalClass(VAR modalClass: INTEGER): OSErr;
MACRO
_GetFrontWindowModalClass
DoDialogMgrDispatch GetFrontWindowModalClass
ENDM
; FUNCTION GetWindowModalClass(theWindow: WindowPtr; VAR modalClass: INTEGER): OSErr;
MACRO
_GetWindowModalClass
DoDialogMgrDispatch GetWindowModalClass
ENDM
; FUNCTION IsUserCancelEvent(event: EventRecord): Boolean;
MACRO
_IsUserCancelEvent
DoDialogMgrDispatch IsUserCancelEvent
ENDM
; FUNCTION GetNextUserCancelEvent(event: EventRecord): OSErr;
MACRO
_GetNextUserCancelEvent
DoDialogMgrDispatch GetNextUserCancelEvent
ENDM
ENDIF ; ...already included DialogsPriv.a