mirror of
https://github.com/elliotnunn/mac-rom.git
synced 2024-12-28 16:31:01 +00:00
122 lines
3.0 KiB
Plaintext
122 lines
3.0 KiB
Plaintext
|
;
|
|||
|
; File: PuppetStringDefs.a
|
|||
|
;
|
|||
|
; Contains: Puppet string conversion header file
|
|||
|
;
|
|||
|
; Written by: Phil Goldman
|
|||
|
;
|
|||
|
; Copyright: <09> 1986-1991 by Apple Computer, Inc., all rights reserved.
|
|||
|
;
|
|||
|
; Change History (most recent first):
|
|||
|
;
|
|||
|
; <0> x/xx/86 PYG New Today.
|
|||
|
;
|
|||
|
;--------------------------------------------------------------------
|
|||
|
|
|||
|
;
|
|||
|
; PROCEDURE CancelSwitch; {Pascal}
|
|||
|
;
|
|||
|
; void CancelSwitch(void) /* C */
|
|||
|
;
|
|||
|
MACRO
|
|||
|
_CancelSwitch
|
|||
|
MOVE.W #IDCancelSwitch,-(SP) ;push routine ID
|
|||
|
_OSDispatch ;go do it
|
|||
|
ENDMACRO
|
|||
|
|
|||
|
; Puppet String types
|
|||
|
pstNormalEvent EQU 0
|
|||
|
pstNullInstr EQU 1
|
|||
|
pstUnknownInstr EQU 2
|
|||
|
pstMenuItem EQU 3
|
|||
|
pstEventList EQU 4
|
|||
|
pstEventCode EQU 5
|
|||
|
pstImplementCode EQU 6
|
|||
|
pstIllegalInstr EQU 7
|
|||
|
pstMenuString EQU 8
|
|||
|
|
|||
|
; Instruction Types
|
|||
|
instrReset EQU 2
|
|||
|
instrCut EQU 3
|
|||
|
instrCopy EQU 4
|
|||
|
instrPaste EQU 5
|
|||
|
instrSelRect EQU 6
|
|||
|
instrSelAll EQU 7
|
|||
|
instrMemCopy EQU 8
|
|||
|
instrOutlineRect EQU 9
|
|||
|
instrPrivate1 EQU 10 ; For intra-puppet string use only
|
|||
|
instrQuit EQU 11
|
|||
|
instrOpen EQU 12
|
|||
|
instrCancel EQU 13
|
|||
|
instrPrint EQU 14
|
|||
|
|
|||
|
; Instruction,Event Flags
|
|||
|
instrMouseLocal EQU $8000
|
|||
|
evtMouseLocal EQU $8000
|
|||
|
evtMouseGlobal EQU $0000
|
|||
|
evtMouseEither EQU $4000
|
|||
|
evtIsImportant EQU $0000
|
|||
|
evtIsUnimportant EQU $2000
|
|||
|
|
|||
|
; String IDs for type pstMenuString
|
|||
|
strIDQuitMenu EQU 100
|
|||
|
strIDQuitItem EQU 101
|
|||
|
strIDOpenMenu EQU 102
|
|||
|
strIDOpenItem EQU 103
|
|||
|
|
|||
|
|
|||
|
; Dispatch numbers for specific routines
|
|||
|
IDSwitchTask EQU 0
|
|||
|
IDGetActiveTaskInfo EQU 1
|
|||
|
IDGetSwitchInfo EQU 2
|
|||
|
IDCancelSwitch EQU 3
|
|||
|
|
|||
|
; Macros for Switcher routine calls
|
|||
|
|
|||
|
; FUNCTION SwitchTask(taskDescriptor:Integer;
|
|||
|
; eventListIn, eventListOut:EventListHdl; timeout:INTEGER): INTEGER;
|
|||
|
MACRO
|
|||
|
_SwitchTask &taskDescriptor,&eventListIn,&eventListOut,&timeout
|
|||
|
SUB #2,SP ;make room for result
|
|||
|
MOVE.W &taskDescriptor,-(SP) ;put on task descriptor
|
|||
|
MOVE.L &eventListIn,-(SP) ;push in evt list hdl
|
|||
|
MOVE.L &eventListOut,-(SP) ;push out evt list hdl
|
|||
|
MOVE.W &timeout,-(SP) ;push timeout
|
|||
|
MOVE.W #IDSwitchTask,-(SP) ;push ID of routine
|
|||
|
_OSDispatch ;go do it
|
|||
|
ENDMACRO
|
|||
|
|
|||
|
; SwitchTask return values
|
|||
|
ResumeFromScratchpad EQU 0
|
|||
|
; resumeFlag EQU 1
|
|||
|
ResumeTimeout EQU 2
|
|||
|
ResumeEventListInErr EQU 3
|
|||
|
ResumeEventListOutErr EQU 4
|
|||
|
ResumeSoundActive EQU 5
|
|||
|
ResumeFSBusy EQU 6
|
|||
|
ResumeFromCancel EQU 7
|
|||
|
ResumeTooManyScratchpads EQU 8
|
|||
|
|
|||
|
; FUNCTION GetActiveTaskInfo(taskInfo:Array of TaskInfoRec; maxSlot:INTEGER): INTEGER;
|
|||
|
MACRO
|
|||
|
_GetActiveTaskInfo &taskInfo,&maxSlot
|
|||
|
SUB #2,SP ;make room for result
|
|||
|
PEA &taskInfo ;push task information record array
|
|||
|
MOVE.W &maxSlot,-(SP) ;maximum of 8 tasks
|
|||
|
MOVE.W #IDGetActiveTaskInfo,-(SP) ;push routine ID
|
|||
|
_OSDispatch ;go do it
|
|||
|
ENDMACRO
|
|||
|
|
|||
|
|
|||
|
; PROCEDURE GetSwitchInfo(VAR mySwitchInfoRec: SwitchInfoRec);
|
|||
|
;
|
|||
|
; void GetSwitchInfo(switchInfoPtr) /* C */
|
|||
|
; SwitchInfoPtr switchInfoPtr;
|
|||
|
;
|
|||
|
MACRO
|
|||
|
_GetSwitchInfo &switchInfoRec
|
|||
|
PEA &switchInfoRec ;push ptr to the record
|
|||
|
MOVE.W #IDGetSwitchInfo,-(SP) ;push routine ID
|
|||
|
_OSDispatch ;go do it
|
|||
|
ENDMACRO
|