packages feed

webkit 0.11.2 → 0.12.0

raw patch · 14 files changed

+108/−84 lines, 14 filesdep ~cairodep ~glibdep ~gtksetup-changed

Dependency ranges changed: cairo, glib, gtk, pango

Files

Graphics/UI/Gtk/WebKit/Download.chs view
@@ -106,7 +106,7 @@ -- Object used to communicate with the application when downloading. downloadNew :: NetworkRequestClass request => request -> IO Download downloadNew nr = -    makeNewGObject mkDownload $ {#call download_new#} (toNetworkRequest nr)+    wrapNewGObject mkDownload $ {#call download_new#} (toNetworkRequest nr)  -- | Initiates the 'Download'. --
Graphics/UI/Gtk/WebKit/NetworkRequest.chs view
@@ -70,7 +70,7 @@  -> IO NetworkRequest networkRequestNew uri =      withCString uri $ \uriPtr -> -      constructNewGObject mkNetworkRequest $ +      wrapNewGObject mkNetworkRequest $          {#call network_request_new#} uriPtr  
Graphics/UI/Gtk/WebKit/WebBackForwardList.chs view
@@ -72,7 +72,7 @@ -- | Create an WebBackForwardList with a controlling WebView. webBackForwardListNewWithWebView :: (WebViewClass webview) => webview -> IO WebBackForwardList webBackForwardListNewWithWebView webview = -    constructNewGObject mkWebBackForwardList $ +    wrapNewGObject mkWebBackForwardList $        {#call web_back_forward_list_new_with_web_view#}          (toWebView webview) 
Graphics/UI/Gtk/WebKit/WebDataSource.chs view
@@ -78,7 +78,7 @@ -- The URL of the 'WebDataSource' will be set to "about:blank". webDataSourceNew :: IO WebDataSource webDataSourceNew = -    constructNewGObject mkWebDataSource $ {#call web_data_source_new#} +    wrapNewGObject mkWebDataSource $ {#call web_data_source_new#}   -- | Returns the raw data that represents the the frame's content.The data will be incomplete until the -- data has finished loading. Returns 'Nothing' if the web frame hasn't loaded any data. Use
Graphics/UI/Gtk/WebKit/WebFrame.chs view
@@ -102,7 +102,7 @@     WebViewClass webview => webview  -- ^ @webview@ - the given webview  -> IO WebFrame webFrameNew webview =  -    constructNewGObject mkWebFrame $ {#call web_frame_new#} (toWebView webview)+    wrapNewGObject mkWebFrame $ {#call web_frame_new#} (toWebView webview)  -- | Return the 'WebView' that manages the given 'WebFrame'. webFrameGetWebView :: 
Graphics/UI/Gtk/WebKit/WebHistoryItem.chs view
@@ -87,7 +87,7 @@ -- automatically added to the global history. webHistoryItemNew :: IO WebHistoryItem webHistoryItemNew = -    constructNewGObject mkWebHistoryItem $ {#call web_history_item_new#}+    wrapNewGObject mkWebHistoryItem $ {#call web_history_item_new#}   -- | Create a new 'WebHistoryItem' instance with the given @uri@ and @title@.@@ -101,7 +101,7 @@ webHistoryItemNewWithData uri title =      withCString uri $ \uriPtr ->     withCString title $ \titlePtr ->-    constructNewGObject mkWebHistoryItem $+    wrapNewGObject mkWebHistoryItem $       {#call web_history_item_new_with_data#}          uriPtr          titlePtr
Graphics/UI/Gtk/WebKit/WebInspector.chs view
@@ -169,26 +169,26 @@ -- -- return True if the signal is handled attachWindow :: WebInspectorClass self => Signal self (IO Bool)-attachWindow = Signal (connect_NONE__BOOL "attach-window")+attachWindow = Signal (connect_NONE__BOOL "attach_window")  -- | Emitted when the inspector should appear in a separate window. -- -- return True if the signal has been handled                   detachWindow :: WebInspectorClass self => Signal self (IO Bool)-detachWindow = Signal (connect_NONE__BOOL "detach-window")+detachWindow = Signal (connect_NONE__BOOL "detach_window")  -- | Emitted when the inspector window should be closed.  -- -- return True if the signal is handled. closeWindow :: WebInspectorClass self => Signal self (IO Bool)-closeWindow = Signal (connect_NONE__BOOL "close-window")+closeWindow = Signal (connect_NONE__BOOL "close_window")  -- | Emitted when the inspector window should be displayed.  -- Notice that the window must have been created already by handling 'inspectWebView'. -- -- return True if the signal has been handled                   showWindow :: WebInspectorClass self => Signal self (IO Bool)-showWindow = Signal (connect_NONE__BOOL "show-window")+showWindow = Signal (connect_NONE__BOOL "show_window")  -- | Emitted when the inspection is done. You should release your references on the inspector at this time.  -- The inspected 'WebView' may no longer exist when this signal is emitted.@@ -202,4 +202,4 @@ -- You don't need to handle the reference count of the 'WebView' instance you create;  -- the widget to which you add it will do that. inspectWebView :: WebInspectorClass self => Signal self (WebView -> IO WebView)-inspectWebView = Signal (connect_OBJECT__OBJECTPTR "inspect-web-view")+inspectWebView = Signal (connect_OBJECT__OBJECTPTR "inspect_web_view")
Graphics/UI/Gtk/WebKit/WebResource.chs view
@@ -72,29 +72,29 @@    withCString mimeType $ \mimePtr ->    withCString encoding $ \encodingPtr ->    withCString frameName $ \framePtr -> -   constructNewGObject mkWebResource $ +   wrapNewGObject mkWebResource $       {#call web_resource_new#} dataPtr (fromIntegral size) uriPtr mimePtr encodingPtr framePtr  -- | Get encoding. webResourceGetEncoding ::     WebResourceClass self => self- -> IO String+ -> IO (Maybe String) webResourceGetEncoding wr =-  {#call web_resource_get_encoding#} (toWebResource wr) >>= peekCString+  {#call web_resource_get_encoding#} (toWebResource wr) >>= maybePeek peekCString  -- | Get frame name. webResourceGetFrameName ::     WebResourceClass self => self- -> IO String+ -> IO (Maybe String) webResourceGetFrameName wr =-  {#call web_resource_get_frame_name#} (toWebResource wr) >>= peekCString+  {#call web_resource_get_frame_name#} (toWebResource wr) >>= maybePeek peekCString  -- | Get mime type. webResourceGetMimeType ::     WebResourceClass self => self- -> IO String+ -> IO (Maybe String) webResourceGetMimeType wr =-  {#call web_resource_get_mime_type#} (toWebResource wr) >>= peekCString+  {#call web_resource_get_mime_type#} (toWebResource wr) >>= maybePeek peekCString  -- | Get uri. webResourceGetUri :: 
Graphics/UI/Gtk/WebKit/WebSettings.chs view
@@ -123,7 +123,7 @@ -- printing mode,script support, loading of images and various other things. webSettingsNew :: IO WebSettings webSettingsNew = -    constructNewGObject mkWebSettings $ {#call web_settings_new#}+    wrapNewGObject mkWebSettings $ {#call web_settings_new#}   -- | Copy an existing 'WebSettings' instance.
Graphics/UI/Gtk/WebKit/WebView.chs view
@@ -958,34 +958,30 @@ -- -- It can be used to set the Application 'Window' title. ----- the user function signature is (WebFrame->String->IO())--- -- webframe - which 'WebFrame' changes the document title. -- -- title - current title string. titleChanged :: WebViewClass self => Signal self ( WebFrame -> String -> IO() ) titleChanged = -    Signal (connect_OBJECT_STRING__NONE "title-changed")+    Signal (connect_OBJECT_STRING__NONE "title_changed")   -- | When the cursor is over a link, this signal is emitted. -- --- the user function signature is (Maybe String -> Maybe String -> IO () )---  -- title - the link's title or @Nothing@ in case of failure. -- -- uri - the URI the link points to or @Nothing@ in case of failure. hoveringOverLink :: WebViewClass self => Signal self (Maybe String -> Maybe String -> IO()) hoveringOverLink =-    Signal (connect_MSTRING_MSTRING__NONE "hovering-over-link")+    Signal (connect_MSTRING_MSTRING__NONE "hovering_over_link")  -- | When a 'WebFrame' begins to load, this signal is emitted loadStarted :: WebViewClass self => Signal self (WebFrame -> IO())-loadStarted = Signal (connect_OBJECT__NONE "load-started")+loadStarted = Signal (connect_OBJECT__NONE "load_started")  -- | When a 'WebFrame' loaded the first data, this signal is emitted loadCommitted :: WebViewClass self => Signal self (WebFrame -> IO())-loadCommitted = Signal (connect_OBJECT__NONE "load-committed")+loadCommitted = Signal (connect_OBJECT__NONE "load_committed")   -- | When the global progress changed, this signal is emitted@@ -993,12 +989,12 @@ -- the global progress will be passed back to user function progressChanged :: WebViewClass self => Signal self (Int-> IO()) progressChanged = -    Signal (connect_INT__NONE "load-progress-changed")+    Signal (connect_INT__NONE "load_progress_changed")  -- | When loading finished, this signal is emitted loadFinished :: WebViewClass self => Signal self (WebFrame -> IO()) loadFinished = -    Signal (connect_OBJECT__NONE "load-finished")+    Signal (connect_OBJECT__NONE "load_finished")  -- | When An error occurred while loading.  --@@ -1010,10 +1006,10 @@ --  -- The URI that triggered the error and the 'GError' will be passed back to user function. loadError :: WebViewClass self => Signal self (WebFrame -> String -> GError -> IO Bool)-loadError = Signal (connect_OBJECT_STRING_BOXED__BOOL "load-error" peek)+loadError = Signal (connect_OBJECT_STRING_BOXED__BOOL "load_error" peek)  createWebView :: WebViewClass self => Signal self (WebFrame -> IO WebView)-createWebView = Signal (connect_OBJECT__OBJECTPTR "create-web-view")+createWebView = Signal (connect_OBJECT__OBJECTPTR "create_web_view")  -- | Emitted when closing a WebView is requested.  --@@ -1025,33 +1021,33 @@ -- or False to propagate the event furter closeWebView :: WebViewClass self => Signal self (IO Bool) closeWebView = -    Signal (connect_NONE__BOOL "close-web-view")+    Signal (connect_NONE__BOOL "close_web_view")  -- | A JavaScript console message was created. consoleMessage :: WebViewClass self => Signal self (String -> String -> Int -> String -> IO Bool)-consoleMessage = Signal (connect_STRING_STRING_INT_STRING__BOOL "console-message")+consoleMessage = Signal (connect_STRING_STRING_INT_STRING__BOOL "console_message")  -- | The 'copyClipboard' signal is a keybinding signal which gets emitted to copy the selection to the clipboard. -- -- The default bindings for this signal are Ctrl-c and Ctrl-Insert. copyClipboard :: WebViewClass self => Signal self (IO ())-copyClipboard = Signal (connect_NONE__NONE "copy-clipboard")+copyClipboard = Signal (connect_NONE__NONE "copy_clipboard")  -- | The 'cutClipboard' signal is a keybinding signal which gets emitted to cut the selection to the clipboard. -- -- The default bindings for this signal are Ctrl-x and Shift-Delete. cutClipboard :: WebViewClass self => Signal self (IO ())-cutClipboard = Signal (connect_NONE__NONE "cut-clipboard")+cutClipboard = Signal (connect_NONE__NONE "cut_clipboard")  -- | The 'pasteClipboard' signal is a keybinding signal which gets emitted to paste the contents of the clipboard into the Web view. -- -- The default bindings for this signal are Ctrl-v and Shift-Insert. pasteClipboard :: WebViewClass self => Signal self (IO ())-pasteClipboard = Signal (connect_NONE__NONE "paste-clipboard")+pasteClipboard = Signal (connect_NONE__NONE "paste_clipboard")  -- | When a context menu is about to be displayed this signal is emitted. populatePopup :: WebViewClass self => Signal self (Menu -> IO ())-populatePopup = Signal (connect_OBJECT__NONE "populate-popup")+populatePopup = Signal (connect_OBJECT__NONE "populate_popup")  -- | Emitted when printing is requested by the frame, usually because of a javascript call.  -- When handling this signal you should call 'webFramePrintFull' or 'webFramePrint' to do the actual printing.@@ -1060,7 +1056,7 @@ -- Notice that this means that if you intend to ignore a print -- request you must connect to this signal, and return True. printRequested :: WebViewClass self => Signal self (WebFrame -> IO Bool)-printRequested = Signal (connect_OBJECT__BOOL "print-requested")+printRequested = Signal (connect_OBJECT__BOOL "print_requested")  -- | A JavaScript alert dialog was created. scriptAlert :: WebViewClass self => Signal self (WebFrame -> String -> IO Bool)@@ -1068,15 +1064,15 @@  -- | A JavaScript confirm dialog was created, providing Yes and No buttons. scriptConfirm :: WebViewClass self => Signal self (WebFrame -> String -> IO Bool)-scriptConfirm = Signal (connect_OBJECT_STRING__BOOL "script-confirm")+scriptConfirm = Signal (connect_OBJECT_STRING__BOOL "script_confirm")  -- | A JavaScript prompt dialog was created, providing an entry to input text. scriptPrompt :: WebViewClass self => Signal self (WebFrame -> String -> String -> IO Bool)-scriptPrompt = Signal (connect_OBJECT_STRING_STRING__BOOL "script-prompt")+scriptPrompt = Signal (connect_OBJECT_STRING_STRING__BOOL "script_prompt")  -- | When status-bar text changed, this signal will emitted. statusBarTextChanged :: WebViewClass self => Signal self (String -> IO ())-statusBarTextChanged = Signal (connect_STRING__NONE "status-bar-text-changed")+statusBarTextChanged = Signal (connect_STRING__NONE "status_bar_text_changed")   @@ -1084,24 +1080,24 @@ --  -- The default bindings for this signal is Ctrl-a. selectAll :: WebViewClass self => Signal self (IO ())-selectAll = Signal (connect_NONE__NONE "select-all")+selectAll = Signal (connect_NONE__NONE "select_all")  -- | When selection changed, this signal is emitted. selectionChanged :: WebViewClass self => Signal self (IO ())-selectionChanged = Signal (connect_NONE__NONE "selection-changed")+selectionChanged = Signal (connect_NONE__NONE "selection_changed")  -- | When set scroll adjustments, this signal is emitted. setScrollAdjustments :: WebViewClass self => Signal self (Adjustment -> Adjustment -> IO ())-setScrollAdjustments = Signal (connect_OBJECT_OBJECT__NONE "set-scroll-adjustments")+setScrollAdjustments = Signal (connect_OBJECT_OBJECT__NONE "set_scroll_adjustments")  -- | The 'databaseQuotaExceeded' signal will be emitted when a Web Database exceeds the quota of its security origin.  -- This signal may be used to increase the size of the quota before the originating operation fails. databaseQuotaExceeded :: WebViewClass self => Signal self (WebFrame -> WebDatabase -> IO ())-databaseQuotaExceeded = Signal (connect_OBJECT_OBJECT__NONE "database-quota-exceeded")+databaseQuotaExceeded = Signal (connect_OBJECT_OBJECT__NONE "database_quota_exceeded")  -- | When document loading finished, this signal is emitted documentLoadFinished :: WebViewClass self => Signal self (WebFrame -> IO ())-documentLoadFinished = Signal (connect_OBJECT__NONE "document-load-finished")+documentLoadFinished = Signal (connect_OBJECT__NONE "document_load_finished")   -- | Emitted after new 'WebView' instance had been created in 'onCreateWebView' user function@@ -1112,7 +1108,7 @@ -- is ready set. webViewReady:: WebViewClass self => Signal self (IO Bool) webViewReady =-    Signal (connect_NONE__BOOL "web-view-ready")+    Signal (connect_NONE__BOOL "web_view_ready")  -- | Emitted after A new 'Download' is being requested.  --@@ -1123,13 +1119,13 @@ -- If you intend to handle downloads yourself, return False in user function. downloadRequested :: WebViewClass self => Signal self (Download -> IO Bool) downloadRequested =-    Signal (connect_OBJECT__BOOL "download-requested")+    Signal (connect_OBJECT__BOOL "download_requested")  #if WEBKIT_CHECK_VERSION (1,1,18) -- | Emitted after Icon loaded iconLoaded :: WebViewClass self => Signal self (String -> IO ()) iconLoaded =-    Signal (connect_STRING__NONE "icon-loaded")+    Signal (connect_STRING__NONE "icon_loaded") #endif  -- | The "redo" signal is a keybinding signal which gets emitted to redo the last editing command.@@ -1158,11 +1154,11 @@ -- And you must call 'webPolicyDecisionIgnore', 'webPolicyDecisionDownload', or 'webPolicyDecisionUse'  -- on the 'webPolicyDecision' object. mimeTypePolicyDecisionRequested :: WebViewClass self => Signal self (WebFrame -> NetworkRequest -> String -> WebPolicyDecision -> IO Bool)-mimeTypePolicyDecisionRequested = Signal (connect_OBJECT_OBJECT_STRING_OBJECT__BOOL "mime-type-policy-decision-requested")+mimeTypePolicyDecisionRequested = Signal (connect_OBJECT_OBJECT_STRING_OBJECT__BOOL "mime_type_policy_decision_requested")  -- | The 'moveCursor' will be emitted to apply the cursor movement described by its parameters to the view. moveCursor :: WebViewClass self => Signal self (MovementStep -> Int -> IO Bool)-moveCursor = Signal (connect_ENUM_INT__BOOL "move-cursor")+moveCursor = Signal (connect_ENUM_INT__BOOL "move_cursor")  -- | Emitted when frame requests a navigation to another page.  -- If this signal is not handled, the default behavior is to allow the navigation.@@ -1174,7 +1170,7 @@ -- And you must call 'webPolicyDecisionIgnore', 'webPolicyDecisionDownload', or 'webPolicyDecisionUse'  -- on the 'webPolicyDecision' object. navigationPolicyDecisionRequested :: WebViewClass self => Signal self (WebFrame -> NetworkRequest -> WebNavigationAction -> WebPolicyDecision -> IO Bool)-navigationPolicyDecisionRequested = Signal (connect_OBJECT_OBJECT_OBJECT_OBJECT__BOOL "navigation-policy-decision-requested")+navigationPolicyDecisionRequested = Signal (connect_OBJECT_OBJECT_OBJECT_OBJECT__BOOL "navigation_policy_decision_requested")  -- | Emitted when frame requests opening a new window.  -- With this signal the browser can use the context of the request to decide about the new window. @@ -1192,7 +1188,7 @@ -- And you must call 'webPolicyDecisionIgnore', 'webPolicyDecisionDownload', or 'webPolicyDecisionUse'  -- on the 'webPolicyDecision' object. newWindowPolicyDecisionRequested :: WebViewClass self => Signal self (WebFrame -> NetworkRequest -> WebNavigationAction -> WebPolicyDecision -> IO Bool)-newWindowPolicyDecisionRequested = Signal (connect_OBJECT_OBJECT_OBJECT_OBJECT__BOOL "new-window-policy-decision-requested")+newWindowPolicyDecisionRequested = Signal (connect_OBJECT_OBJECT_OBJECT_OBJECT__BOOL "new_window_policy_decision_requested")  -- | Emitted when a request is about to be sent.  -- You can modify the request while handling this signal. @@ -1209,14 +1205,14 @@ -- The 'WebResource' object will be the same throughout all the lifetime of the resource,  -- but the contents may change from inbetween signal emissions. resourceRequestStarting :: WebViewClass self => Signal self (WebFrame -> WebResource -> Maybe NetworkRequest -> Maybe NetworkResponse -> IO ())-resourceRequestStarting = Signal (connect_OBJECT_OBJECT_MOBJECT_MOBJECT__NONE "resource-request-starting")+resourceRequestStarting = Signal (connect_OBJECT_OBJECT_MOBJECT_MOBJECT__NONE "resource_request_starting")  #if WEBKIT_CHECK_VERSION (1,1,23) -- | When a frame wants to cancel geolocation permission it had requested before. -- -- * Since 1.1.23     geolocationPolicyDecisionCancelled :: WebViewClass self => Signal self (WebFrame -> IO ())-geolocationPolicyDecisionCancelled = Signal (connect_OBJECT__NONE "geolocation-policy-decision-cancelled")+geolocationPolicyDecisionCancelled = Signal (connect_OBJECT__NONE "geolocation_policy_decision_cancelled")  -- | When a frame wants to get its geolocation permission. The receiver must reply with a boolean wether -- it handled or not the request. If the request is not handled, default behaviour is to deny@@ -1224,5 +1220,5 @@ --  -- * Since 1.1.23     geolocationPolicyDecisionRequested :: WebViewClass self => Signal self (WebFrame -> GeolocationPolicyDecision -> IO ())-geolocationPolicyDecisionRequested = Signal (connect_OBJECT_OBJECT__NONE "geolocation-policy-decision-requested")+geolocationPolicyDecisionRequested = Signal (connect_OBJECT_OBJECT__NONE "geolocation_policy_decision_requested") #endif
Graphics/UI/Gtk/WebKit/WebWindowFeatures.chs view
@@ -81,7 +81,7 @@ -- It must be manually attached to a WebView. webWindowFeaturesNew :: IO WebWindowFeatures webWindowFeaturesNew = -    constructNewGObject mkWebWindowFeatures $ {#call web_window_features_new#}+    wrapNewGObject mkWebWindowFeatures $ {#call web_window_features_new#}  -- | Decides if a 'WebWindowFeatures' instance equals another, as in has the same values. webWindowFeaturesEqual :: 
Gtk2HsSetup.hs view
@@ -23,16 +23,24 @@         CABAL_VERSION_MICRO) #else #warning Setup.hs is guessing the version of Cabal. If compilation of Setup.hs fails use -DCABAL_VERSION_MINOR=x for Cabal version 1.x.0 when building (prefixed by --ghc-option= when using the 'cabal' command)+#if (__GLASGOW_HASKELL__ >= 700)+#define CABAL_VERSION CABAL_VERSION_ENCODE(1,10,0)+#else #if (__GLASGOW_HASKELL__ >= 612) #define CABAL_VERSION CABAL_VERSION_ENCODE(1,8,0) #else #define CABAL_VERSION CABAL_VERSION_ENCODE(1,6,0) #endif #endif+#endif  -- | Build a Gtk2hs package. ---module Gtk2HsSetup ( gtk2hsUserHooks, getPkgConfigPackages ) where+module Gtk2HsSetup ( +  gtk2hsUserHooks, +  getPkgConfigPackages, +  checkGtk2hsBuildtools+  ) where  import Distribution.Simple import Distribution.Simple.PreProcess@@ -65,7 +73,7 @@ import Distribution.Simple.Compiler  ( Compiler(..) ) import Distribution.Simple.Program (   Program(..), ConfiguredProgram(..),-  rawSystemProgramConf, rawSystemProgramStdoutConf,+  rawSystemProgramConf, rawSystemProgramStdoutConf, programName,   c2hsProgram, pkgConfigProgram, requireProgram, ghcPkgProgram,   simpleProgram, lookupProgram, rawSystemProgramStdout, ProgArg) import Distribution.ModuleName ( ModuleName, components, toFilePath )@@ -83,10 +91,11 @@ #endif import Distribution.Text ( simpleParse, display ) import System.FilePath-import System.Directory ( doesFileExist )+import System.Exit (exitFailure)+import System.Directory ( doesFileExist, getDirectoryContents, doesDirectoryExist ) import Distribution.Version (Version(..)) import Distribution.Verbosity-import Control.Monad (when, unless, filterM)+import Control.Monad (when, unless, filterM, liftM, forM, forM_) import Data.Maybe ( isJust, isNothing, fromMaybe, maybeToList ) import Data.List (isPrefixOf, isSuffixOf, nub) import Data.Char (isAlpha)@@ -94,7 +103,6 @@ import qualified Data.Set as S  import Control.Applicative ((<$>))-import System.Directory (getDirectoryContents, doesDirectoryExist)  -- the name of the c2hs pre-compiled header file precompFile = "precompchs.bin"@@ -103,13 +111,13 @@     hookedPrograms = [typeGenProgram, signalGenProgram, c2hsLocal],     hookedPreProcessors = [("chs", ourC2hs)],     confHook = \pd cf ->-      confHook simpleUserHooks pd cf >>= return . adjustLocalBuildInfo,+      (fmap adjustLocalBuildInfo (confHook simpleUserHooks pd cf)),     postConf = \args cf pd lbi -> do       genSynthezisedFiles (fromFlag (configVerbosity cf)) pd lbi       postConf simpleUserHooks args cf pd lbi,     buildHook = \pd lbi uh bf -> fixDeps pd >>= \pd ->-                                 (buildHook simpleUserHooks) pd lbi uh bf,-    copyHook = \pd lbi uh flags -> (copyHook simpleUserHooks) pd lbi uh flags >>+                                 buildHook simpleUserHooks pd lbi uh bf,+    copyHook = \pd lbi uh flags -> copyHook simpleUserHooks pd lbi uh flags >>       installCHI pd lbi (fromFlag (copyVerbosity flags)) (fromFlag (copyDest flags)),     instHook = \pd lbi uh flags -> #if defined(mingw32_HOST_OS) || defined(__MINGW32__)@@ -187,7 +195,11 @@      _ | modeGenerateRegFile   -> die "Generate Reg File not supported"        | modeGenerateRegScript -> die "Generate Reg Script not supported"        | otherwise             -> registerPackage verbosity+#if CABAL_VERSION_CHECK(1,10,0)+                                    installedPkgInfo pkg lbi inplace [packageDb]+#else                                     installedPkgInfo pkg lbi inplace packageDb+#endif    where     modeGenerateRegFile = isJust (flagToMaybe (regGenPkgConf regFlags))@@ -298,7 +310,7 @@ getCppOptions bi lbi     = nub $       ["-I" ++ dir | dir <- PD.includeDirs bi]-   ++ [opt | opt@('-':c:_) <- (PD.cppOptions bi ++ PD.ccOptions bi), c `elem` "DIU"]+   ++ [opt | opt@('-':c:_) <- PD.cppOptions bi ++ PD.ccOptions bi, c `elem` "DIU"]  installCHI :: PackageDescription -- ^information from the .cabal file         -> LocalBuildInfo -- ^information from the configure step@@ -308,14 +320,13 @@   let InstallDirs { libdir = libPref } = absoluteInstallDirs pkg lbi copydest   -- cannot use the recommended 'findModuleFiles' since it fails if there exists   -- a modules that does not have a .chi file-  mFiles <- mapM (findFileWithExtension' ["chi"] [buildDir lbi])-                 (map toFilePath+  mFiles <- mapM (findFileWithExtension' ["chi"] [buildDir lbi] . toFilePath) #if CABAL_VERSION_CHECK(1,8,0)                    (PD.libModules lib) #else                    (PD.libModules pkg) #endif-                 )+                    let files = [ f | Just f <- mFiles ] #if CABAL_VERSION_CHECK(1,8,0)   installOrdinaryFiles verbosity libPref files@@ -331,13 +342,13 @@ ------------------------------------------------------------------------------  typeGenProgram :: Program-typeGenProgram = (simpleProgram "gtk2hsTypeGen")+typeGenProgram = simpleProgram "gtk2hsTypeGen"  signalGenProgram :: Program-signalGenProgram = (simpleProgram "gtk2hsHookGenerator")+signalGenProgram = simpleProgram "gtk2hsHookGenerator"  c2hsLocal :: Program-c2hsLocal = (simpleProgram "gtk2hsC2hs")+c2hsLocal = simpleProgram "gtk2hsC2hs"  genSynthezisedFiles :: Verbosity -> PackageDescription -> LocalBuildInfo -> IO () genSynthezisedFiles verb pd lbi = do@@ -370,7 +381,7 @@          res <- rawSystemProgramStdoutConf verb prog (withPrograms lbi) args          rewriteFile outFile res -  (flip mapM_) (filter (\(tag,_) -> "x-types-" `isPrefixOf` tag && "file" `isSuffixOf` tag) xList) $+  forM_ (filter (\(tag,_) -> "x-types-" `isPrefixOf` tag && "file" `isSuffixOf` tag) xList) $     \(fileTag, f) -> do       let tag = reverse (drop 4 (reverse fileTag))       info verb ("Ensuring that class hierarchy in "++f++" is up-to-date.")@@ -391,7 +402,7 @@   sequence     [ do version <- pkgconfig ["--modversion", display pkgname]          case simpleParse version of-           Nothing -> die $ "parsing output of pkg-config --modversion failed"+           Nothing -> die "parsing output of pkg-config --modversion failed"            Just v  -> return (PackageIdentifier pkgname v)     | Dependency pkgname _ <- concatMap pkgconfigDepends (allBuildInfo pkg) ]   where@@ -456,9 +467,9 @@ extractDeps :: ModDep -> IO ModDep extractDeps md@ModDep { mdLocation = Nothing } = return md extractDeps md@ModDep { mdLocation = Just f } = withUTF8FileContents f $ \con -> do-  let findImports acc (('{':'#':xs):xxs) = case (dropWhile ((==) ' ') xs) of+  let findImports acc (('{':'#':xs):xxs) = case (dropWhile (' ' ==) xs) of         ('i':'m':'p':'o':'r':'t':' ':ys) ->-          case simpleParse (takeWhile ((/=) '#') ys) of+          case simpleParse (takeWhile ('#' /=) ys) of             Just m -> findImports (m:acc) xxs              Nothing -> die ("cannot parse chs import in "++f++":\n"++                             "offending line is {#"++xs)@@ -484,3 +495,17 @@         Just md -> (md:out', visited')           where             (out',visited') = foldl visit (out, m `S.insert` visited) (mdRequires md)++-- Check user whether install gtk2hs-buildtools correctly.+checkGtk2hsBuildtools :: [String] -> IO ()+checkGtk2hsBuildtools programs = do+  programInfos <- mapM (\ name -> do+                         location <- programFindLocation (simpleProgram name) normal+                         return (name, location)+                      ) programs+  let printError name = do+        putStrLn $ "Cannot find " ++ name ++ "\n" +                 ++ "Please install `gtk2hs-buildtools` first and check that the install directory is in your PATH (e.g. HOME/.cabal/bin)."+        exitFailure+  forM_ programInfos $ \ (name, location) ->+    when (isNothing location) (printError name) 
Setup.hs view
@@ -1,7 +1,10 @@ -- Setup file for a Gtk2Hs module. Contains only adjustments specific to this module, -- all Gtk2Hs-specific boilerplate is stored in Gtk2HsSetup.hs which should be kept -- identical across all modules.-import Gtk2HsSetup ( gtk2hsUserHooks )+import Gtk2HsSetup ( gtk2hsUserHooks, checkGtk2hsBuildtools ) import Distribution.Simple ( defaultMainWithHooks ) -main = defaultMainWithHooks gtk2hsUserHooks+main = do+  checkGtk2hsBuildtools ["gtk2hsC2hs", "gtk2hsTypeGen", "gtk2hsHookGenerator"]+  defaultMainWithHooks gtk2hsUserHooks+  
webkit.cabal view
@@ -1,5 +1,5 @@ Name:           webkit-Version:        0.11.2+Version:        0.12.0 License:        LGPL-2.1 License-file:   COPYING Copyright:      (c) 2001-2010 The Gtk2Hs Team@@ -42,10 +42,10 @@  Library         build-depends:  base >= 4 && < 5, array, containers, haskell98, mtl,-                        glib  >= 0.11.2 && < 0.12, -                        pango >= 0.11 && < 0.12, -                        cairo >= 0.11 && < 0.12,-                        gtk   >= 0.11 && < 0.12+                        glib  >= 0.12 && < 0.13, +                        pango >= 0.12 && < 0.13, +                        cairo >= 0.12 && < 0.13,+                        gtk   >= 0.12 && < 0.13 						         build-tools:    gtk2hsC2hs, gtk2hsHookGenerator, gtk2hsTypeGen