Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (18 sloc) 0.93 kb
{-# LANGUAGE ForeignFunctionInterface #-}
module Graphics.UI.WXCore.GHCiSupport(enableGUI) where
-- GHCi support on MacOS X
-- TODO: preprocessor to make it conditional on the platform
import Data.Int
import Foreign
type ProcessSerialNumber = Int64
foreign import ccall "GetCurrentProcess" getCurrentProcess :: Ptr ProcessSerialNumber -> IO Int16
foreign import ccall "_CGSDefaultConnection" cgsDefaultConnection :: IO ()
foreign import ccall "CPSEnableForegroundOperation" cpsEnableForegroundOperation :: Ptr ProcessSerialNumber -> IO ()
foreign import ccall "CPSSignalAppReady" cpsSignalAppReady :: Ptr ProcessSerialNumber -> IO ()
foreign import ccall "CPSSetFrontProcess" cpsSetFrontProcess :: Ptr ProcessSerialNumber -> IO ()
enableGUI = alloca $ \psn -> do
getCurrentProcess psn
cgsDefaultConnection
cpsEnableForegroundOperation psn
cpsSignalAppReady psn
cpsSetFrontProcess psn
Jump to Line
Something went wrong with that request. Please try again.