Platform.icl 1.21 KB
Newer Older
Diederik van Arkel's avatar
Diederik van Arkel committed
1
2
implementation module Platform

Diederik van Arkel's avatar
Diederik van Arkel committed
3
import StdInt, StdMisc, StdFile
Diederik van Arkel's avatar
Diederik van Arkel committed
4
import StdPSt
Diederik van Arkel's avatar
Diederik van Arkel committed
5
6
import StdIOCommon
import StdSystem
Diederik van Arkel's avatar
Diederik van Arkel committed
7

Diederik van Arkel's avatar
Diederik van Arkel committed
8
9
PlatformDependant win mac
	:== mac
Diederik van Arkel's avatar
Diederik van Arkel committed
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

initPlatformCommandLine :: !*(PSt .l) -> (![String],!*PSt .l)
initPlatformCommandLine ps
	= ([],ps)

installPlatformEventHandlers :: !*(PSt .l) -> *(PSt .l)
installPlatformEventHandlers ps
	| install_apple_event_handlers == 0
//		= trace_n "apple events installed" ps
		= ps
//	= trace_n "installing apple events failed :-(" ps
	= ps

openPlatformWindowMenu :: !*(PSt .l) -> *(PSt .l)
openPlatformWindowMenu ps
	= ps
//	= openWindowMenu ps

Diederik van Arkel's avatar
Diederik van Arkel committed
28
29
30
31
32
33
34
35
36
37
38
39
40
41
batchOptions	:: !*World -> (!Bool,Bool,String,*File,!*World)
batchOptions world
	# interact		= True
	  force_update	= undef
	  prj_name		= undef
	  logfile		= undef
	= (interact,force_update,prj_name,logfile,world)

wAbort			:: !String !*World -> *World
wAbort message world
	# stderr	= fwrites message stderr
	# (_,world)	= fclose stderr world
	= world

Diederik van Arkel's avatar
Diederik van Arkel committed
42
43
44
45
46
47
install_apple_event_handlers :: Int
install_apple_event_handlers
	= code ()(r=D0) {
		call	.install_apple_event_handlers
	}

Diederik van Arkel's avatar
Diederik van Arkel committed
48
49
50
51
52
53
54
55
TooltempDir	:: String
TooltempDir = applicationpath "Temp"

EnvsDir		:: String
EnvsDir = applicationpath "Config"

PrefsDir	:: String
PrefsDir = applicationpath "Config"