mirror of
https://github.com/elliotnunn/mac-rom.git
synced 2024-12-28 01:29:20 +00:00
4325cdcc78
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.
183 lines
6.8 KiB
Plaintext
183 lines
6.8 KiB
Plaintext
;
|
|
; File: DIALOGS.a
|
|
;
|
|
; Contains: Dialog interface glue
|
|
;
|
|
; Written by: Us
|
|
;
|
|
; Copyright: © 1990, 1992 by Apple Computer, Inc., all rights reserved.
|
|
;
|
|
; This file is used in these builds: BigBang Sys606
|
|
;
|
|
; Change History (most recent first):
|
|
;
|
|
; <8> 7/6/92 DCL Added Support for new synonyms.
|
|
; <7> 12/4/90 KIP <KSM> Includes DialogsPriv.a.
|
|
; <6> 10/1/90 JAL Deleted old/moved commented out routines.
|
|
; <5> 7/2/90 ngk Uppercased StdFilterProc, cause its for Pascal.
|
|
; <4> 7/2/90 KSM Undo the previous change...
|
|
; <3> 7/2/90 KSM Temporarily comment glue for stdfilterproc.
|
|
; <2> 7/1/90 KSM Add glue code for new dialog manager calls.
|
|
;
|
|
; To Do:
|
|
; Either get rid of or rewrite the new[c]dialog glue and all those other
|
|
; lower-case C glue routines.
|
|
;
|
|
; Add proper CASE directive to insure case sensitivity is preserved for this file!
|
|
;
|
|
|
|
include 'macintosh.a'
|
|
include 'dialogspriv.a'
|
|
; dialogs.a
|
|
;
|
|
; Copyright Apple Computer, Inc. 1984-1988
|
|
; All rights reserved.
|
|
;
|
|
; Modifications:
|
|
; 12 Jun 87 KLH Added newcdialog.
|
|
; *** MPW 3.0d2 ***
|
|
; 11 Feb 88 KLH Changed C headers to work with new C compiler:
|
|
; Changed to using standard glue in Interface.o, so
|
|
; much glue removed from CInterface.o.
|
|
; *** MPW 3.0d4 ***
|
|
|
|
BLANKS ON
|
|
STRING ASIS
|
|
|
|
;ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
|
|
|
|
; FUNCTION StdFilterProc(dlg: DialogPtr; VAR evt: EventRecord; VAR itemHit: INTEGER): BOOLEAN;
|
|
|
|
; This calls the standard filter proc conveniently for High-Level languages.
|
|
|
|
STDFILTERPROC proc EXPORT
|
|
subq.l #6,sp ; Make a proc ptr var and result
|
|
pea 2(sp) ; Push the proc addr
|
|
_GetStdFilterProc ; Get the standard filter proc address (macro)
|
|
tst.w (sp)+ ; Everything OK
|
|
bne.s @noGood ; branch if not
|
|
move.l (sp)+,a0 ; Get the filter proc address
|
|
jmp (a0) ; Go do it, and never come back
|
|
@noGood
|
|
move.l (sp)+,a0 ; Get the return address
|
|
add.l #12,SP ; Cut back the parameters
|
|
move.w #0,(sp) ; return false as the result (everything left unchanged)
|
|
jmp (a0) ; And go back to where we came from
|
|
|
|
|
|
newdialog proc EXPORT
|
|
import c2pstr ; c2pstr(s) char *s;
|
|
import p2cstr ; p2cstr(s) char *s;
|
|
move.l d2,-(sp) ; save register d2
|
|
clr.l -(sp) ; reserve space for result
|
|
move.l 12(sp),-(sp) ; push copy of first parameter
|
|
move.l 20(sp),-(sp) ; push copy of second parameter
|
|
move.l 28(sp),-(sp) ; push copy of third parameter
|
|
jsr c2pstr ; convert to Pascal string
|
|
move.b 39(sp),-(sp) ; push copy of fourth parameter
|
|
move.w 44(sp),-(sp) ; push copy of fifth parameter
|
|
move.l 48(sp),-(sp) ; push copy of sixth parameter
|
|
move.b 59(sp),-(sp) ; push copy of seventh parameter
|
|
move.l 62(sp),-(sp) ; push copy of eighth parameter
|
|
move.l 70(sp),-(sp) ; push copy of ninth parameter
|
|
dc.w $A97D ; trap to newdialog
|
|
move.l 20(sp),-(sp) ; push copy of third paramter
|
|
jsr p2cstr ; convert back to C string
|
|
add.w #4,sp ; balance stack
|
|
move.l (sp)+,d0 ; load result
|
|
move.l (sp)+,d2 ; restore register d2
|
|
rts
|
|
|
|
newcolordialog proc EXPORT
|
|
export newcdialog ; obsolete old procedure name
|
|
import c2pstr ; c2pstr(s) char *s;
|
|
import p2cstr ; p2cstr(s) char *s;
|
|
newcdialog move.l d2,-(sp) ; save register d2
|
|
clr.l -(sp) ; reserve space for result
|
|
move.l 12(sp),-(sp) ; push copy of first parameter
|
|
move.l 20(sp),-(sp) ; push copy of second parameter
|
|
move.l 28(sp),-(sp) ; push copy of third parameter
|
|
jsr c2pstr ; convert to Pascal string
|
|
move.b 39(sp),-(sp) ; push copy of fourth parameter
|
|
move.w 44(sp),-(sp) ; push copy of fifth parameter
|
|
move.l 48(sp),-(sp) ; push copy of sixth parameter
|
|
move.b 59(sp),-(sp) ; push copy of seventh parameter
|
|
move.l 62(sp),-(sp) ; push copy of eighth parameter
|
|
move.l 70(sp),-(sp) ; push copy of ninth parameter
|
|
dc.w $AA4B ; trap to newcdialog
|
|
move.l 20(sp),-(sp) ; push copy of third paramter
|
|
jsr p2cstr ; convert back to C string
|
|
add.w #4,sp ; balance stack
|
|
move.l (sp)+,d0 ; load result
|
|
move.l (sp)+,d2 ; restore register d2
|
|
rts
|
|
|
|
paramtext proc EXPORT
|
|
import c2pstr ; c2pstr(s) char *s;
|
|
import p2cstr ; p2cstr(s) char *s;
|
|
move.l d2,-(sp) ; save register d2
|
|
move.l 8(sp),-(sp) ; push copy of first parameter
|
|
jsr c2pstr ; convert to Pascal string
|
|
move.l 16(sp),-(sp) ; push copy of second parameter
|
|
jsr c2pstr ; convert to Pascal string
|
|
move.l 24(sp),-(sp) ; push copy of third parameter
|
|
jsr c2pstr ; convert to Pascal string
|
|
move.l 32(sp),-(sp) ; push copy of fourth parameter
|
|
jsr c2pstr ; convert to Pascal string
|
|
dc.w $A98B ; trap to paramtext
|
|
move.l 8(sp),-(sp) ; push copy of first paramter
|
|
jsr p2cstr ; convert back to C string
|
|
move.l 16(sp),-(sp) ; push copy of second paramter
|
|
jsr p2cstr ; convert back to C string
|
|
move.l 24(sp),-(sp) ; push copy of third paramter
|
|
jsr p2cstr ; convert back to C string
|
|
move.l 32(sp),-(sp) ; push copy of fourth paramter
|
|
jsr p2cstr ; convert back to C string
|
|
add.w #16,sp ; balance stack
|
|
move.l (sp)+,d2 ; restore register d2
|
|
rts
|
|
|
|
getdialogitemtext proc EXPORT
|
|
export getitext ; obsolete old procedure name
|
|
import c2pstr ; c2pstr(s) char *s;
|
|
import p2cstr ; p2cstr(s) char *s;
|
|
getitext move.l d2,-(sp) ; save register d2
|
|
move.l 8(sp),-(sp) ; push copy of first parameter
|
|
move.l 16(sp),-(sp) ; push copy of second parameter
|
|
dc.w $A990 ; trap to getitext
|
|
move.l 12(sp),-(sp) ; push copy of second paramter
|
|
jsr p2cstr ; convert back to C string
|
|
add.w #4,sp ; balance stack
|
|
move.l (sp)+,d2 ; restore register d2
|
|
rts
|
|
|
|
setdialogitemtext proc EXPORT
|
|
export setitext ; obsolete old procedure name
|
|
import c2pstr ; c2pstr(s) char *s;
|
|
import p2cstr ; p2cstr(s) char *s;
|
|
setitext move.l d2,-(sp) ; save register d2
|
|
move.l 8(sp),-(sp) ; push copy of 1st parameter (item)
|
|
move.l 16(sp),-(sp) ; copy second parameter (Str255)
|
|
jsr c2pstr ; convert to Pascal string
|
|
dc.w $A98F ; trap to setitext
|
|
move.l 12(sp),-(sp) ; push copy of second paramter
|
|
jsr p2cstr ; convert back to C string
|
|
add.w #4,sp ; balance stack
|
|
move.l (sp)+,d2 ; restore register d2
|
|
rts
|
|
|
|
finddialogitem proc EXPORT
|
|
export findditem ; obsolete old procedure name
|
|
findditem move.l d2,-(sp) ; save register d2
|
|
clr.w -(sp) ; make space for result
|
|
move.l 10(sp),-(sp) ; first param is a handle
|
|
movea.l 18(sp),a0 ; 2nd param is a pointer to
|
|
move.l (a0),-(sp) ; the "Point" we want
|
|
dc.w $A984
|
|
move.w (sp)+,d0
|
|
ext.l d0
|
|
move.l (sp)+,d2 ; restore register d2
|
|
rts
|
|
|
|
END
|