StdPSt.dcl 1.85 KB
Newer Older
Peter Achten's avatar
Peter Achten committed
1
2
3
4
5
6
7
8
9
10
11
definition module StdPSt


//	********************************************************************************
//	Clean Standard Object I/O library, version 1.2
//	
//	StdPSt defines operations on PSt and IOSt that are not abstract device related.
//	********************************************************************************


from	StdFunc		import St
12
from	StdIOCommon	import IdFun, DocumentInterface, MDI, SDI, NDI
Peter Achten's avatar
Peter Achten committed
13
14
15
16
17
18
19
20
21
22
from	StdPicture	import Picture
from	iostate		import PSt, IOSt


/*	accScreenPicture provides access to an initial Picture as it would be created in
	a window or control.
*/
class accScreenPicture env :: !.(St *Picture .x) !*env -> (!.x,!*env)

instance accScreenPicture World
23
instance accScreenPicture (IOSt .l)
Peter Achten's avatar
Peter Achten committed
24
25


26
beep :: !(IOSt .l) -> IOSt .l
Peter Achten's avatar
Peter Achten committed
27
28
29
30
31
32
/*	beep emits the alert sound.
*/


//	Operations on the DocumentInterface of an interactive process:

33
getDocumentInterface :: !(IOSt .l) -> (!DocumentInterface, !IOSt .l)
Peter Achten's avatar
Peter Achten committed
34
35
36
37
38
39
/*	getDocumentInterface returns the DocumentInterface of the interactive process.
*/


//	Operations on the attributes of an interactive process:

40
41
setProcessActivate	:: !(IdFun (PSt .l)) !(IOSt .l) -> IOSt .l
setProcessDeactivate:: !(IdFun (PSt .l)) !(IOSt .l) -> IOSt .l
Peter Achten's avatar
Peter Achten committed
42
43
44
45
46
47
48
/*	These functions set the ProcessActivate and ProcessDeactivate attribute of the 
	interactive process respectively.
*/


//	Coercing PSt component operations to PSt operations.

49
50
appListPIO	:: ![.IdFun (IOSt .l)]	!(PSt .l) ->		 PSt .l
appListPLoc	:: ![.IdFun .l]			!(PSt .l) ->		 PSt .l
Peter Achten's avatar
Peter Achten committed
51

52
53
appPIO		:: !.(IdFun (IOSt .l))	!(PSt .l) ->		 PSt .l
appPLoc		:: !.(IdFun .l)			!(PSt .l) ->		 PSt .l
Peter Achten's avatar
Peter Achten committed
54
55
56

//	Accessing PSt component operations.

57
58
accListPIO	:: ![.St (IOSt .l) .x]	!(PSt .l) -> (![.x],!PSt .l)
accListPLoc	:: ![.St .l        .x]	!(PSt .l) -> (![.x],!PSt .l)
Peter Achten's avatar
Peter Achten committed
59

60
61
accPIO		:: !.(St (IOSt .l) .x)	!(PSt .l) -> (! .x,	!PSt .l)
accPLoc		:: !.(St .l        .x)	!(PSt .l) -> (! .x,	!PSt .l)