mirror of
https://github.com/elliotnunn/supermario.git
synced 2024-11-29 20:49:19 +00:00
450 lines
5.8 KiB
Plaintext
450 lines
5.8 KiB
Plaintext
;
|
|
;Created Monday, May 9 1989 at 6:00 AM
|
|
; Terminals.a
|
|
; Assembler Interface to the Terminal Manager
|
|
;
|
|
; Copyright Apple Computer, Inc. 1988-90
|
|
; All rights reserved
|
|
;
|
|
IF (&TYPE('TERMINALS') = 'UNDEFINED') THEN
|
|
TERMINALS EQU 1
|
|
|
|
IF (&TYPE('CTBUTILITIES') = 'UNDEFINED') THEN
|
|
INCLUDE 'CTBUtilities.a'
|
|
ENDIF
|
|
|
|
; current Terminal Manager version
|
|
curTMVersion EQU 2
|
|
|
|
; current Terminal Manager Environment Record version
|
|
curTermEnvRecVers EQU 0
|
|
|
|
; TMErr
|
|
tmGenericError EQU -1
|
|
tmNoErr EQU 0
|
|
tmNotSent EQU 1
|
|
tmEnvironsChanged EQU 2
|
|
tmNotSupported EQU 7
|
|
tmNoTools EQU 8
|
|
tmUnknownError EQU 11
|
|
|
|
; TMFlags
|
|
tmInvisible EQU $00000001
|
|
tmSaveBeforeClear EQU $00000002
|
|
tmNoMenus EQU $00000004
|
|
tmAutoScroll EQU $00000008
|
|
|
|
; TMSelTypes & TMSearchTypes
|
|
|
|
selTextNormal EQU $0001
|
|
selTextBoxed EQU $0002
|
|
selGraphicsMarquee EQU $0004
|
|
selGraphicsLasso EQU $0008
|
|
|
|
tmSearchNoDiacrit EQU $0100 ;These are only for TMSearchTypes
|
|
tmSearchNoCase EQU $0200
|
|
|
|
; TMCursorTypes
|
|
cursorText EQU 1
|
|
cursorGraphics EQU 2
|
|
|
|
; TMTermTypes
|
|
tmTextTerminal EQU $0001
|
|
tmGraphicsTerminal EQU $0002
|
|
|
|
TermDataBlock Record 0
|
|
flags ds.w 1
|
|
theData ds.l 1
|
|
auxData ds.l 1
|
|
reserved ds.l 1
|
|
TermDataBlockSize EQU *
|
|
EndR
|
|
|
|
TermEnvironRec Record 0
|
|
version ds.w 1
|
|
termType ds.w 1
|
|
textRows ds.w 1
|
|
textCols ds.w 1
|
|
cellSize ds.l 1
|
|
graphicSize ds.l 2
|
|
slop ds.l 1
|
|
auxSpace ds.l 2
|
|
TermEnvironRecSize EQU *
|
|
EndR
|
|
|
|
TMSelection Record 0
|
|
selRect ds.l 2
|
|
org selRect
|
|
selRgnHandle ds.l 1
|
|
filler ds.l 1
|
|
TMSelectionSize EQU *
|
|
EndR
|
|
|
|
tmChooseNoChange EQU 1
|
|
tmChooseBackdoor EQU 2
|
|
|
|
TMChooseRec RECORD 0
|
|
reserved ds.l 1
|
|
msg ds.l 1
|
|
idleProc ds.l 1
|
|
filterProc ds.l 1
|
|
newTool ds.b 64
|
|
newConfig ds.l 1
|
|
eventProc ds.l 1
|
|
TMChooseRecSize EQU *
|
|
Endr
|
|
|
|
TermRecord Record 0
|
|
procID ds.w 1
|
|
|
|
flags ds.l 1
|
|
errCode ds.w 1
|
|
|
|
refCon ds.l 1
|
|
userData ds.l 1
|
|
|
|
defProc ds.l 1
|
|
|
|
config ds.l 1
|
|
oldConfig ds.l 1
|
|
|
|
environsProc ds.l 1
|
|
reserved1 ds.l 1
|
|
reserved2 ds.l 1
|
|
|
|
tmPrivate ds.l 1
|
|
|
|
sendProc ds.l 1
|
|
breakProc ds.l 1
|
|
cacheProc ds.l 1
|
|
clikLoop ds.l 1
|
|
|
|
owner ds.l 1
|
|
termRect ds.l 2
|
|
viewRect ds.l 2
|
|
visRect ds.l 2
|
|
|
|
lastIdle ds.l 1
|
|
|
|
selection ds TMSelection;
|
|
selType ds.w 1
|
|
|
|
mluField ds.l 1
|
|
TermRecordSize EQU *
|
|
EndR
|
|
|
|
|
|
InitTM EQU $301
|
|
TMNew EQU $302
|
|
TMDispose EQU $303
|
|
TMKey EQU $304
|
|
TMUpdate EQU $305
|
|
TMPaint EQU $306
|
|
TMActivate EQU $307
|
|
TMResume EQU $308
|
|
TMClick EQU $309
|
|
TMStream EQU $30A
|
|
TMMenu EQU $30B
|
|
TMReset EQU $30C
|
|
TMClear EQU $30D
|
|
TMResize EQU $30E
|
|
TMGetSelect EQU $30F
|
|
TMGetLine EQU $310
|
|
TMSetSelection EQU $311
|
|
TMScroll EQU $312
|
|
TMIdle EQU $313
|
|
TMValidate EQU $314
|
|
TMDefault EQU $315
|
|
TMSetupPreflight EQU $316
|
|
TMSetupSetup EQU $317
|
|
TMSetupFilter EQU $318
|
|
TMSetupItem EQU $319
|
|
TMSetupCleanup EQU $31A
|
|
TMGetConfig EQU $31B
|
|
TMSetConfig EQU $31C
|
|
TMIntlToEnglish EQU $31D
|
|
TMEnglishToIntl EQU $31E
|
|
TMGetProcID EQU $31F
|
|
TMGetToolName EQU $320
|
|
TMSetRefCon EQU $321
|
|
TMGetRefCon EQU $322
|
|
TMSetUserData EQU $323
|
|
TMGetUserData EQU $324
|
|
TMGetVersion EQU $325
|
|
TMGetTMVersion EQU $326
|
|
TMAddSearch EQU $327
|
|
TMRemoveSearch EQU $328
|
|
TMClearSearch EQU $329
|
|
TMGetCursor EQU $32A
|
|
TMGetTermEnvirons EQU $32B
|
|
TMChoose EQU $32C
|
|
TMEvent EQU $32D
|
|
TMDoTermKey EQU $32E
|
|
TMCountTermKeys EQU $32F
|
|
TMGetIndTermKey EQU $330
|
|
TMSetupPostflight EQU $331
|
|
TMPChoose EQU $333
|
|
TMPSetXCleanup EQU $334
|
|
TMGetErrorString EQU $335
|
|
|
|
MACRO
|
|
_InitTM
|
|
_CTBCall #InitTM
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMNew
|
|
_CTBCall #TMNew
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMDispose
|
|
_CTBCall #TMDispose
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMKey
|
|
_CTBCall #TMKey
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMUpdate
|
|
_CTBCall #TMUpdate
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMPaint
|
|
_CTBCall #TMPaint
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMActivate
|
|
_CTBCall #TMActivate
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMResume
|
|
_CTBCall #TMResume
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMClick
|
|
_CTBCall #TMClick
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMStream
|
|
_CTBCall #TMStream
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMMenu
|
|
_CTBCall #TMMenu
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMReset
|
|
_CTBCall #TMReset
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMClear
|
|
_CTBCall #TMClear
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMResize
|
|
_CTBCall #TMResize
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMGetSelect
|
|
_CTBCall #TMGetSelect
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMGetLine
|
|
_CTBCall #TMGetLine
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMSetSelection
|
|
_CTBCall #TMSetSelection
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMScroll
|
|
_CTBCall #TMScroll
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMIdle
|
|
_CTBCall #TMIdle
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMValidate
|
|
_CTBCall #TMValidate
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMDefault
|
|
_CTBCall #TMDefault
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMSetupPreflight
|
|
_CTBCall #TMSetupPreflight
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMSetupSetup
|
|
_CTBCall #TMSetupSetup
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMSetupFilter
|
|
_CTBCall #TMSetupFilter
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMSetupItem
|
|
_CTBCall #TMSetupItem
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMSetupCleanup
|
|
_CTBCall #TMSetupCleanup
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMGetConfig
|
|
_CTBCall #TMGetConfig
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMSetConfig
|
|
_CTBCall #TMSetConfig
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMIntlToEnglish
|
|
_CTBCall #TMIntlToEnglish
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMEnglishToIntl
|
|
_CTBCall #TMEnglishToIntl
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMGetProcID
|
|
_CTBCall #TMGetProcID
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMGetToolName
|
|
_CTBCall #TMGetToolName
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMSetRefCon
|
|
_CTBCall #TMSetRefCon
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMGetRefCon
|
|
_CTBCall #TMGetRefCon
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMSetUserData
|
|
_CTBCall #TMSetUserData
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMGetUserData
|
|
_CTBCall #TMGetUserData
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMGetVersion
|
|
_CTBCall #TMGetVersion
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMGetTMVersion
|
|
_CTBCall #TMGetTMVersion
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMAddSearch
|
|
_CTBCall #TMAddSearch
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMRemoveSearch
|
|
_CTBCall #TMRemoveSearch
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMClearSearch
|
|
_CTBCall #TMClearSearch
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMGetCursor
|
|
_CTBCall #TMGetCursor
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMGetTermEnvirons
|
|
_CTBCall #TMGetTermEnvirons
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMChoose
|
|
_CTBCall #TMChoose
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMEvent
|
|
_CTBCall #TMEvent
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMDoTermKey
|
|
_CTBCall #TMDoTermKey
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMCountTermKeys
|
|
_CTBCall #TMCountTermKeys
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMGetIndTermKey
|
|
_CTBCall #TMGetIndTermKey
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMSetupPostflight
|
|
_CTBCall #TMSetupPostflight
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMPChoose
|
|
_CTBCall #TMPChoose
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMSetupXCleanup
|
|
_CTBCall #TMSetupXCleanup
|
|
ENDM
|
|
|
|
MACRO
|
|
_TMGetErrorString
|
|
_CTBCall #TMGetErrorString
|
|
ENDM
|
|
|
|
ENDIF |