diff options
author | johnvg | 2001-06-01 10:42:38 +0000 |
---|---|---|
committer | johnvg | 2001-06-01 10:42:38 +0000 |
commit | 29176518c71adf7c681a3429e7c1836cfe4af20f (patch) | |
tree | 2f9c14c582c8fef2e2d596402048db95bcc4218b /main/CleanCocl.icl | |
parent | The _Module generated for each icl-module conflicted with record of name (diff) |
compiler without IO 0.8
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@446 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'main/CleanCocl.icl')
-rw-r--r-- | main/CleanCocl.icl | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/main/CleanCocl.icl b/main/CleanCocl.icl index 69915fd..af7ee42 100644 --- a/main/CleanCocl.icl +++ b/main/CleanCocl.icl @@ -1,6 +1,44 @@ -module CleanCocl +module CleanCocl; -import StdEnv +import StdEnv; + +from compilerSwitches import SwitchFusion; +import cache_variable; + +f = SwitchFusion fusion_is_on 0; + +import CoclSystemDependent,Clean2AppleEventHandler; + +from events import KeyDownEvent,HighLevelEvent,GetNextEvent,WaitNextEvent,Toolbox,RgnHandle; + +DeviceMask :== -31361; // HighLevelEventMask+UpdateMask+ActivMask+KeyboardMask+MouseMask+OsMask+1 + +Start world + | install_apple_event_handlers==0 && store_state empty_cache<>0 + = event_loop world; + = world; +{}{ + event_loop world +// # (b,what,message,when,position1,position2,modifiers,tb) = GetNextEvent DeviceMask 0; + # (b,what,message,when,position1,position2,modifiers,tb) = WaitNextEvent (-1)/*DeviceMask*/ (-1) 0 0; + | what==KeyDownEvent + = world; + | what==HighLevelEvent + # event = (b,what,message,when,position1,position2,modifiers); + # ((ok,quit),world) = accFiles handle_apple_event world; + with { + handle_apple_event :: !*Files -> (!(!Bool,!Bool),!*Files); + handle_apple_event files + # (ok,quit,files) = HandleAppleEvent event script_handler files; + = ((ok,quit),files); + } + | quit + = world; + = event_loop world; + = event_loop world; +} + +/* import deltaEventIO, deltaIOState import CoclSystemDependent @@ -22,3 +60,4 @@ Start world Quit :: *s (IOState *s) -> (*s, IOState *s) Quit s io = (s, QuitIO io) +*/ |