forked from jodonoghue/wxHaskell
/
WXCore.hs
82 lines (68 loc) · 2.69 KB
/
WXCore.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
-----------------------------------------------------------------------------------------
{-| Module : WXCore
Copyright : (c) Daan Leijen 2003
License : wxWindows
Maintainer : wxhaskell-devel@lists.sourceforge.net
Stability : provisional
Portability : portable
The "WXCore" module is the interface to the core wxWindows functionality.
The library contains the automatically generated interface to the raw
wxWindows API in "Graphics.UI.WXCore.WxcClasses", "Graphics.UI.WXCore.WxcClassTypes",
and "Graphics.UI.WXCore.WxcDefs".
The other helper modules contain convenient wrappers but only use functional
abstractions: no type classes or other fancy Haskell features. (The
higher-level "Graphics.UI.WX" module provides such abstractions.)
-}
-----------------------------------------------------------------------------------------
module Graphics.UI.WXCore
(
-- * Re-exports
module Graphics.UI.WXCore.WxcDefs
, module Graphics.UI.WXCore.WxcClasses
, module Graphics.UI.WXCore.WxcClassInfo
, module Graphics.UI.WXCore.Defines
, module Graphics.UI.WXCore.Types
, module Graphics.UI.WXCore.Process
, module Graphics.UI.WXCore.Print
, module Graphics.UI.WXCore.Draw
, module Graphics.UI.WXCore.DragAndDrop
, module Graphics.UI.WXCore.Events
, module Graphics.UI.WXCore.Frame
, module Graphics.UI.WXCore.Dialogs
, module Graphics.UI.WXCore.Controls
, module Graphics.UI.WXCore.Layout
, module Graphics.UI.WXCore.Image
, module Graphics.UI.WXCore.OpenGL
-- * Run
, run
) where
import System.Mem( performGC )
import Graphics.UI.WXCore.WxcDefs
import Graphics.UI.WXCore.WxcClasses
import Graphics.UI.WXCore.WxcClassInfo
import Graphics.UI.WXCore.Types
import Graphics.UI.WXCore.Defines
import Graphics.UI.WXCore.Process
import Graphics.UI.WXCore.Print
import Graphics.UI.WXCore.Events hiding ( StreamStatus(..) )
import Graphics.UI.WXCore.Draw
import Graphics.UI.WXCore.DragAndDrop
import Graphics.UI.WXCore.Frame
import Graphics.UI.WXCore.Dialogs
import Graphics.UI.WXCore.Controls
import Graphics.UI.WXCore.Layout
import Graphics.UI.WXCore.Image
import Graphics.UI.WXCore.OpenGL
import Graphics.UI.WXCore.GHCiSupport
-- | Start the event loop. Takes an initialisation action as argument.
-- Except for 'run', the functions in the WXH library can only be called
-- from this intialisation action or from event handlers, or otherwise bad
-- things will happen :-)
run :: IO a -> IO ()
run init
= do enableGUI
appOnInit (do wxcAppInitAllImageHandlers
init
return ())
performGC
performGC