From: <kr_...@us...> - 2003-03-30 18:49:12
|
Update of /cvsroot/htoolkit/port/src In directory sc8-pr-cvs1:/tmp/cvs-serv19641/port/src Modified Files: Port.hs Log Message: The process related features are extracted into newly created module "Process". Added new process attribute "title" instead of title as parameter. Index: Port.hs =================================================================== RCS file: /cvsroot/htoolkit/port/src/Port.hs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Port.hs 26 Mar 2003 08:45:51 -0000 1.13 --- Port.hs 30 Mar 2003 18:49:07 -0000 1.14 *************** *** 1,3 **** - {-# OPTIONS -fglasgow-exts -#include Types.h #-} ----------------------------------------------------------------------------------------- {-| Module : Port --- 1,2 ---- *************** *** 10,14 **** The /main/ interface of "Port". Re-exports functionality from ! other modules and exports the 'start' function. -} ----------------------------------------------------------------------------------------- --- 9,13 ---- The /main/ interface of "Port". Re-exports functionality from ! other modules. -} ----------------------------------------------------------------------------------------- *************** *** 38,43 **** , module Graphics.UI.Port.Types ! -- * The main event loop ! , start, quit ) where --- 37,42 ---- , module Graphics.UI.Port.Types ! -- * Process ! , module Graphics.UI.Port.Process ) where *************** *** 58,61 **** --- 57,62 ---- import Graphics.UI.Port.Timer + import Graphics.UI.Port.Process + import Graphics.UI.Port.Types hiding ( CColor, fromCColor, toCColor *************** *** 75,103 **** , CBool, fromCBool, toCBool ) - - import Foreign.C - import System.Mem( performGC ) - import Control.Monad(when) - - -- | Start the event loop. Runs until 'quit' is called. - start :: String -> DocumentInterface -> IO a -> IO a - start appName di io = do - withCString appName (\s -> osInit s (toCDocumentInterface di)) - setProcessDismissHandler quit - r <- io - osStart - return r - foreign import ccall "osInit" osInit :: CString -> CInt -> IO () - foreign import ccall "osStart" osStart :: IO () - - -- | 'quit' exits the main event loop, closes any windows and menus, destroys all timers - -- and unregisters any event handlers. This function is automatically called when all - -- windows are closed. - quit :: IO () - quit = do - r <- dismissAllWindows - when r $ do - destroyAllTimers - osQuit - performGC -- to release any foreign objects - foreign import ccall osQuit :: IO () \ No newline at end of file --- 76,77 ---- |