From: Andy S. <And...@co...> - 2010-03-19 19:06:57
|
Fri Mar 19 15:05:36 EDT 2010 Andy Stewart <laz...@gm...> * Finish WebKit-1.1.15 API binding. Ignore-this: f5f55bf2e269a4e384409cc385d209bc hunk ./Makefile.am 1288 - webkit/Graphics/UI/Gtk/WebKit/NetworkResponse.chs [_$_] + webkit/Graphics/UI/Gtk/WebKit/NetworkResponse.chs \ + webkit/Graphics/UI/Gtk/WebKit/HitTestResult.chs \ + webkit/Graphics/UI/Gtk/WebKit/SecurityOrigin.chs \ + webkit/Graphics/UI/Gtk/WebKit/SoupAuthDialog.chs \ + webkit/Graphics/UI/Gtk/WebKit/WebDatabase.chs \ + webkit/Graphics/UI/Gtk/WebKit/WebDataSource.chs \ + webkit/Graphics/UI/Gtk/WebKit/WebNavigationAction.chs \ + webkit/Graphics/UI/Gtk/WebKit/WebPolicyDecision.chs \ + webkit/Graphics/UI/Gtk/WebKit/WebResource.chs \ + webkit/Graphics/UI/Gtk/WebKit/WebWindowFeatures.chs \ + webkit/Graphics/UI/Gtk/WebKit/Internal.chs hunk ./configure.ac 350 -GTKHS_PKG_CHECK(webkit, webkit, WEBKIT, [webkit-1.0 >= 1.1.14], [GLIB GTK], +GTKHS_PKG_CHECK(webkit, webkit, WEBKIT, [webkit-1.0 >= 1.1.15], [GLIB GTK], hunk ./tools/callbackGen/gtkmarshal.list 143 +BOOLEAN:INT,INT,STRING +BOOLEAN:STRING,STRING,INT,STRING +BOOLEAN:OBJECT,STRING +BOOLEAN:OBJECT,STRING,STRING +BOOLEAN:OBJECT,OBJECT,OBJECT,OBJECT +BOOLEAN:OBJECT,OBJECT,STRING,OBJECT +NONE:OBJECT,OBJECT,OBJECT,OBJECT +BOOLEAN:ENUM,INT hunk ./tools/hierarchyGen/hierarchy.list 327 + WebkitHitTestResult as HitTestResult if webkit + WebkitSecurityOrigin as SecurityOrigin if webkit + WebkitSoupAuthDialog as SoupAuthDialog if webkit + WebkitWebDatabase as WebDatabase if webkit + WebkitWebDataSource as WebDataSource if webkit + WebkitWebNavigationAction as WebNavigationAction if webkit + WebkitWebPolicyDecision as WebPolicyDecision if webkit + WebkitWebResource as WebResource if webkit + WebkitWebWindowFeatures as WebWindowFeatures if webkit hunk ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp 6 +-- Copyright : (c) 2010 Andy Stewart <laz...@gm...> hunk ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp 30 +-- * Enums + DownloadError(..), + DownloadStatus(..), + hunk ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp 39 - DownloadStatus(..), hunk ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp 52 + +-- * Attributes + currentSize, + destinationUri, + networkRequest, + networkResponse, + progress, + status, + suggestedFilename, + totalSize, + +-- * Signals + downloadError, hunk ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp 73 +import System.Glib.Attributes +import System.Glib.Properties hunk ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp 84 +-- * Enums + hunk ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp 203 +-- * Attibutes hunk ./webkit/Graphics/UI/Gtk/WebKit/Download.chs.pp 205 +-- | The length of the data already downloaded +-- +-- Default value: 0 +-- [_$_] +-- * Since 1.1.2 [_$_] +-- +currentSize :: DownloadClass self => ReadAttr self Int +currentSize = readAttr downloadGetCurrentSize + +-- | The URI of the save location for this download. +-- +-- Default value: "" +-- +-- * Since 1.1.2 +destinationUri :: DownloadClass self => Attr self (Maybe String) [_$_] +destinationUri = newAttrFromMaybeStringProperty "destination-uri" + +-- | The NetworkRequest instance associated with the download. +-- +-- * Since 1.1.2 +networkRequest :: DownloadClass self => Attr self NetworkRequest +networkRequest = [_$_] + newAttrFromObjectProperty "network-request" + {#call pure webkit_network_request_get_type#} + +-- | The NetworkResponse instance associated with the download. +-- +-- * Since 1.1.16 +networkResponse :: DownloadClass self => Attr self NetworkResponse +networkResponse = [_$_] + newAttrFromObjectProperty "network-response" + {#call pure webkit_network_response_get_type#} + +-- | Determines the current progress of the download. [_$_] +-- Notice that, although the progress changes are reported as soon as possible, [_$_] +-- the emission of the notify signal for this property is throttled, for the benefit of download managers. [_$_] +-- If you care about every update, use 'Download' : currentSize. +-- +-- Allowed values: [0,1] +-- +-- Default value: 1 +-- +-- * Since 1.1.2 +progress :: DownloadClass self => ReadAttr self Double +progress = readAttr downloadGetProgress + +-- | Determines the current status of the download. +-- +-- Default value: 'DownloadStatusCreated' +-- +-- * Since 1.1.2 +status :: DownloadClass self => ReadAttr self DownloadStatus +status = readAttr downloadGetStatus + +-- | The file name suggested as default when saving +-- +-- Default value: "" +-- +-- * Since 1.1.2 +suggestedFilename :: DownloadClass self => ReadAttr self (Maybe String) +suggestedFilename = readAttr downloadGetSuggestedFilename + +-- | The total size of the file +-- +-- Default value: 0 +-- +-- * Since 1.1.2 +totalSize :: DownloadClass self => ReadAttr self Int +totalSize = readAttr downloadGetTotalSize + +-- * Signals + +-- | Emitted when download is interrupted either by user action or by network errors, [_$_] +-- errorDetail will take any value of 'DownloadError'. +-- +-- 'download': the object on which the signal is emitted [_$_] +-- 'errorCode': the corresponding error code [_$_] +-- 'errorDetail': detailed error code for the error, see 'DownloadError' [_$_] +-- 'reason': a string describing the error [_$_] +-- [_$_] +-- Since 1.1.2 +downloadError :: DownloadClass self => Signal self (Int -> Int -> String -> IO Bool) +downloadError = Signal (connect_INT_INT_STRING__BOOL "error") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 6 +-- Copyright : (c) 2010 Andy Stewart <laz...@gm...> hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 24 +-- +-- Note: +-- Functon `webkit_web_frame_get_global_context` can't binding now, [_$_] +-- Because it need `JSGlobalContextRef` exist in JavaScriptCore. +-- +-- Function `webkit_web_frame_print_full` can't binding now, +-- Because library `GtkPrintOperation` haven't binding. +-- hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 37 + hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 40 + hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 42 - [_$_] hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 47 + webFrameGetLoadStatus, hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 51 + webFrameLoadRequest, hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 55 + webFrameGetDataSource, + webFrameGetHorizontalScrollbarPolicy, + webFrameGetVerticalScrollbarPolicy, + webFrameGetProvisionalDataSource, + webFrameGetSecurityOrigin, hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 70 +import Graphics.UI.Gtk.General.Enums hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 79 +-- * Enums + +{#enum LoadStatus {underscoreToCase}#} hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 132 +-- | Determines the current status of the load. +-- +-- frame[_\c2_][_\a0_]: a WebKitWebView [_$_] +-- [_$_] +-- * Since 1.1.7 +webFrameGetLoadStatus :: + WebFrameClass self => self + -> IO LoadStatus [_$_] +webFrameGetLoadStatus ls = + liftM (toEnum . fromIntegral) $ {#call web_frame_get_load_status#} (toWebFrame ls) + hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 199 +-- | Connects to a given URI by initiating an asynchronous client request. +-- +-- Creates a provisional data source that will transition to a committed data source once any data has been received. [_$_] +-- Use 'webFrameStopLoading' to stop the load. [_$_] +-- This function is typically invoked on the main frame. +webFrameLoadRequest :: [_$_] + (WebFrameClass self, NetworkRequestClass requ) => self -> requ + -> IO () +webFrameLoadRequest webframe request = + {#call web_frame_load_request#} (toWebFrame webframe) (toNetworkRequest request) [_$_] + hunk ./webkit/Graphics/UI/Gtk/WebKit/WebFrame.chs.pp 237 +-- | Returns the committed data source. +webFrameGetDataSource :: [_$_] + WebFrameClass self => self + -> IO WebDataSource +webFrameGetDataSource webframe = + makeNewGObject mkWebDataSource $ {#call web_frame_get_data_source#} (toWebFrame webframe) + +-- | Return the policy of horizontal scrollbar. +webFrameGetHorizontalScrollbarPolicy :: [_$_] + WebFrameClass self => self + -> IO PolicyType [_$_] +webFrameGetHorizontalScrollbarPolicy webframe = [_$_] + liftM (toEnum.fromIntegral) $ + {#call web_frame_get_horizontal_scrollbar_policy#} (toWebFrame webframe) + [_$_] +-- | Return the policy of vertical scrollbar. +webFrameGetVerticalScrollbarPolicy :: [_$_] + WebFrameClass self => self + -> IO PolicyType [_$_] +webFrameGetVerticalScrollbarPolicy webframe = [_$_] + liftM (toEnum.fromIntegral) $ + {#call web_frame_get_vertical_scrollbar_policy#} (toWebFrame webframe) + +-- | You use the 'webFrameLoadRequest' method to initiate a request that creates a provisional data source. [_$_] +-- The provisional data source will transition to a committed data source once any data has been received. [_$_] +-- Use 'webFrameGetDataSource' to get the committed data source. +webFrameGetProvisionalDataSource :: [_$_] + WebFrameClass self => self + -> IO WebDataSource [_$_] +webFrameGetProvisionalDataSource webframe = + makeNewGObject mkWebDataSource $ {#call web_frame_get_provisional_data_source#} (toWebFrame webframe) + +-- | Returns the frame's security origin. +webFrameGetSecurityOrigin :: + WebFrameClass self => self + -> IO SecurityOrigin [_$_] +webFrameGetSecurityOrigin webframe = [_$_] + makeNewGObject mkSecurityOrigin $ {#call web_frame_get_security_origin#} (toWebFrame webframe) + hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 33 +-- * Attribute [_$_] + webInspectorInspectedUri, + webInspectorJSProfilingEnable, + webInspectorWebView, + hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 39 - onAttachWindow, - onCloseWindow, - onDetachWindow, - onFinished, - onInspectWebView, - onShowWindow, + attachWindow, + detachWindow, + closeWindow, + showWindow, + finished, + inspectWebView, hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 53 +import System.Glib.Attributes +import System.Glib.Properties hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 60 +{#import Graphics.UI.Gtk.WebKit.Internal#} hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 87 +-- * Attribute hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 89 --- * Signals --- | Emitted when the 'WebInspector' should appear at the same window as the 'WebView' being inspected. --- --- return True if the signal is handled. -onAttachWindow :: WebInspectorClass self => self ->( IO Bool )-> IO (ConnectId self) -onAttachWindow = - connect_NONE__BOOL "attach-window" True +-- | The URI that is currently being inspected. +webInspectorInspectedUri :: (WebInspectorClass self) => ReadAttr self String +webInspectorInspectedUri = readAttr webInspectorGetInspectedUri hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 93 --- | Emitted when the inspector window should be closed. [_$_] --- --- return True if the signal is handled. --- --- You can destroy the window or hide it so that it can be displayed again by handling 'onShowWindow' later on. [_$_] --- Notice that the inspected 'WebView' may no longer exist when this signal is emitted. --- Notice, too, that if you decide to destroy the window, [_$_] --- 'onInspectWebView' will be emmited again, when the user inspects an element. +-- | This is enabling JavaScript profiling in the Inspector. This means that Console.profiles will return the profiles. +webInspectorJSProfilingEnable :: (WebInspectorClass self) => Attr self Bool +webInspectorJSProfilingEnable = newAttrFromBoolProperty "javascript-profiling-enabled" hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 97 -onCloseWindow :: WebInspectorClass self => self ->( IO Bool )-> IO (ConnectId self) -onCloseWindow = - connect_NONE__BOOL "close-window" True +-- | The Web View that renders the Web Inspector itself. +webInspectorWebView :: (WebInspectorClass self) => ReadAttr self WebView +webInspectorWebView = [_$_] + readAttrFromObjectProperty "web-view" + {#call pure webkit_web_view_get_type#} + +-- * Signals hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 108 -onDetachWindow :: WebInspectorClass self => self ->( IO Bool )-> IO (ConnectId self) -onDetachWindow = - connect_NONE__BOOL "detach-window" True - --- | Emitted when the inspection is done. -onFinished :: WebInspectorClass self => self ->( IO () )-> IO (ConnectId self) -onFinished = - connect_NONE__NONE "finished" True +attachWindow :: WebInspectorClass self => Signal self (IO Bool) +attachWindow = Signal (connect_NONE__BOOL "attach-window") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 111 --- internal helper function used in onInspectWebView -webViewToWebViewPtr :: WebViewClass self => self -> IO (Ptr WebView) -webViewToWebViewPtr webview = do - let webViewPtr = unsafeForeignPtrToPtr (unWebView (toWebView webview)) - -- objectRef webViewPtr - return webViewPtr +-- | 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") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 117 --- | Emitted when the user activates the \'inspect\' context menu item to inspect a 'WebView'. [_$_] +-- | Emitted when the inspector window should be closed. [_$_] hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 119 --- The application which is interested in the inspector should create a window, [_$_] --- or otherwise add the 'WebView' it creates to an existing window. --- [_$_] --- !!!NOTE!!!, you should return a 'WebView' in user function [_$_] -onInspectWebView :: WebInspectorClass self => self ->( WebView -> IO WebView )-> IO (ConnectId self) -onInspectWebView = - connect_OBJECT__OBJECTPTR "inspect-web-view" True - where connect_OBJECT__OBJECTPTR :: - (GObjectClass a', GObjectClass obj) => SignalName -> - ConnectAfter -> obj -> - (a' -> IO WebView) -> - IO (ConnectId obj) - connect_OBJECT__OBJECTPTR signal after obj user = - connectGeneric signal after obj action - where action :: Ptr GObject -> Ptr GObject -> IO (Ptr WebView) - action _ obj1 = - failOnGError $ - makeNewGObject mkGObject (return obj1) >>= \obj1' -> - user (unsafeCastGObject obj1') >>= webViewToWebViewPtr +-- return True if the signal is handled. +closeWindow :: WebInspectorClass self => Signal self (IO Bool) +closeWindow = Signal (connect_NONE__BOOL "close-window") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 124 +-- Notice that the window must have been created already by handling 'inspectWebView'. hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 126 --- Notice that the window must have been created already by handling "inspect-web-view". -onShowWindow :: WebInspectorClass self => self ->( IO Bool )-> IO (ConnectId self) -onShowWindow = - connect_NONE__BOOL "show-window" True +-- return True if the signal has been handled [_$_] +showWindow :: WebInspectorClass self => Signal self (IO Bool) +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. +finished :: WebInspectorClass self => Signal self (IO ()) +finished = Signal (connect_NONE__NONE "finished") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebInspector.chs.pp 135 +-- | Emitted when the user activates the 'inspect' context menu item to inspect a web view. [_$_] +-- The application which is interested in the inspector should create a window, [_$_] +-- or otherwise add the 'WebView' it creates to an existing window. +-- +-- 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") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebSettings.chs.pp 32 +-- * Methods + webSettingsCopy, + webSettingsGetUserAgent, + hunk ./webkit/Graphics/UI/Gtk/WebKit/WebSettings.chs.pp 70 --- * Methods - - webSettingsCopy, - webSettingsGetUserAgent, - + webSettingsEnableSiteSpecificQuirks, hunk ./webkit/Graphics/UI/Gtk/WebKit/WebSettings.chs.pp 318 +-- | Enables the site-specific compatibility workarounds. +-- +-- Default value: False +webSettingsEnableSiteSpecificQuirks :: WebSettingsClass self => Attr self Bool +webSettingsEnableSiteSpecificQuirks = newAttrFromBoolProperty "enable-site-specific-quirks" + hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 6 +-- Copyright : (c) 2010 Andy Stewart <laz...@gm...> hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 23 +-- Note: +-- +-- Signal `window-object-cleared` can't bidning now, [_$_] +-- because it need JavaScriptCore that haven't binding. +-- +-- Signal `create-plugin-widget` can't binding now, [_$_] +-- no idea how to binding `GHaskellTable` +-- +-- +-- TODO: +-- +-- `webViewGetHitTestResult` +-- hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 43 +-- * Enums + NavigationResponse(..), + TargetInfo(..), + LoadStatus(..), + hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 50 --- * Methods - LoadStatus(..), hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 51 +-- * Methods hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 114 + webViewGetCopyTargetList, + webViewGetPasteTargetList, + hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 122 + webViewMoveCursor, + hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 130 + webViewGetWindowFeatures, + hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 145 - [_$_] + webViewUri, + webViewCopyTargetList, + webViewPasteTargetList, + webViewWindowFeatures, hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 151 - onLoadStarted, - onLoadCommitted, - onProgressChanged, - onLoadFinished, - onLoadError, - onTitleChanged, - -- onHoveringOverLink, - - -- onCreateWebView, - onWebViewReady, - onCloseWebView, - onDownloadRequested, - onIconLoaded, - onRedo, - onUndo, - + loadStarted, + loadCommitted, + progressChanged, + loadFinished, + loadError, + titleChanged, + hoveringOverLink, + createWebView, + webViewReady, + closeWebView, + consoleMessage, + copyClipboard, + cutClipboard, + pasteClipboard, + populatePopup, + printRequested, + scriptAlert, + scriptConfirm, + scriptPrompt, + statusBarTextChanged, + selectAll, + selectionChanged, + setScrollAdjustments, + databaseQuotaExceeded, + documentLoadFinished, + downloadRequested, + iconLoaded, + redo, + undo, + mimeTypePolicyDecisionRequested, + moveCursor, + navigationPolicyDecisionRequested, + newWindowPolicyDecisionRequested, + resourceRequestStarting, hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 189 --- import Data.IORef - hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 193 +import System.Glib.Properties hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 197 - hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 200 +{#import Graphics.UI.Gtk.WebKit.Internal#} hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 202 +{#import Graphics.UI.Gtk.General.DNDTypes#} +{#import Graphics.UI.Gtk.General.Selection#} ( TargetList ) +{#import Graphics.UI.Gtk.MenuComboToolbar.Menu#} +{#import Graphics.UI.Gtk.General.Enums#} hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 209 +-- * Enums + +{#enum NavigationResponse {underscoreToCase}#} + +{#enum WebViewTargetInfo as TargetInfo {underscoreToCase}#} + hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 254 +-- | Returns the instance of WebKitWebWindowFeatures held by the given WebKitWebView. +webViewGetWindowFeatures :: + WebViewClass self => self + -> IO WebWindowFeatures [_$_] +webViewGetWindowFeatures webview = + makeNewGObject mkWebWindowFeatures $ {#call web_view_get_window_features#} (toWebView webview) + hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 629 +-- | Move the cursor in view as described by step and count. +webViewMoveCursor :: + WebViewClass self => self + -> MovementStep + -> Int + -> IO () [_$_] +webViewMoveCursor webview step count = + {#call web_view_move_cursor#} (toWebView webview) (fromIntegral $ fromEnum step) (fromIntegral count) + hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 771 +-- | This function returns the list of targets this 'WebView' can provide for clipboard copying and as DND source. [_$_] +-- The targets in the list are added with values from the 'WebViewTargetInfo' enum, [_$_] +-- using 'targetListAdd' and 'targetListAddTextTargets'. +webViewGetCopyTargetList :: + WebViewClass self => self [_$_] + -> IO (Maybe TargetList) +webViewGetCopyTargetList webview = do + tlPtr <- {#call web_view_get_copy_target_list#} (toWebView webview) + if tlPtr==nullPtr then return Nothing else liftM Just (mkTargetList tlPtr) + +-- | This function returns the list of targets this 'WebView' can provide for clipboard pasteing and as DND source. [_$_] +-- The targets in the list are added with values from the 'WebViewTargetInfo' enum, [_$_] +-- using 'targetListAdd' and 'targetListAddTextTargets'. +webViewGetPasteTargetList :: + WebViewClass self => self [_$_] + -> IO (Maybe TargetList) +webViewGetPasteTargetList webview = do + tlPtr <- {#call web_view_get_paste_target_list#} (toWebView webview) + if tlPtr==nullPtr then return Nothing else liftM Just (mkTargetList tlPtr) + hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 870 +-- | Returns the current URI of the contents displayed by the @web_view. +-- +-- Default value: Nothing +webViewUri :: WebViewClass self => ReadAttr self (Maybe String) +webViewUri = readAttr webViewGetUri + +-- | The list of targets this web view supports for clipboard copying. +webViewCopyTargetList :: WebViewClass self => ReadAttr self (Maybe TargetList) +webViewCopyTargetList = readAttr webViewGetCopyTargetList + +-- | The list of targets this web view supports for clipboard pasteing. +webViewPasteTargetList :: WebViewClass self => ReadAttr self (Maybe TargetList) +webViewPasteTargetList = readAttr webViewGetPasteTargetList + +-- | An associated 'WebWindowFeatures' instance. +webViewWindowFeatures :: WebViewClass self => Attr self WebWindowFeatures +webViewWindowFeatures = [_$_] + newAttrFromObjectProperty "window-features" + {#call pure webkit_web_window_features_get_type#} + hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 901 -onTitleChanged :: WebViewClass self => self ->( WebFrame -> String -> IO() )-> IO (ConnectId self) -onTitleChanged = [_$_] - connect_OBJECT_STRING__NONE "title-changed" True +titleChanged :: WebViewClass self => Signal self ( WebFrame -> String -> IO() ) +titleChanged = [_$_] + Signal (connect_OBJECT_STRING__NONE "title-changed") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 913 --- onHoveringOverLink :: WebViewClass self => self -> (Maybe String -> Maybe String -> IO()) -> IO(ConnectId self) --- onHoveringOverLink = --- connect_BOXED_BOXED__NONE "hovering-over-link" readMString True --- where --- readMString strPtr | strPtr==nullPtr = return Nothing --- | otherwise = liftM Just $ peekUTFString strPtr +hoveringOverLink :: WebViewClass self => Signal self (String -> String -> IO()) +hoveringOverLink = + Signal (connect_STRING_STRING__NONE "hovering-over-link") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 918 -onLoadStarted :: WebViewClass self => self -> (WebFrame -> IO()) -> IO (ConnectId self) -onLoadStarted = [_$_] - connect_OBJECT__NONE "load-started" True +loadStarted :: WebViewClass self => Signal self (WebFrame -> IO()) +loadStarted = Signal (connect_OBJECT__NONE "load-started") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 922 -onLoadCommitted :: WebViewClass self => self -> (WebFrame -> IO()) -> IO (ConnectId self) -onLoadCommitted = [_$_] - connect_OBJECT__NONE "load-committed" True +loadCommitted :: WebViewClass self => Signal self (WebFrame -> IO()) +loadCommitted = Signal (connect_OBJECT__NONE "load-committed") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 929 -onProgressChanged :: WebViewClass self => self -> (Int-> IO()) -> IO (ConnectId self) -onProgressChanged = [_$_] - connect_INT__NONE "load-progress-changed" True +progressChanged :: WebViewClass self => Signal self (Int-> IO()) +progressChanged = [_$_] + Signal (connect_INT__NONE "load-progress-changed") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 934 -onLoadFinished :: WebViewClass self => self -> (WebFrame -> IO()) -> IO (ConnectId self) -onLoadFinished = [_$_] - connect_OBJECT__NONE "load-finished" True +loadFinished :: WebViewClass self => Signal self (WebFrame -> IO()) +loadFinished = [_$_] + Signal (connect_OBJECT__NONE "load-finished") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 947 -onLoadError :: WebViewClass self => self -> (WebFrame -> String -> GError -> IO Bool) -> IO (ConnectId self) -onLoadError = connect_OBJECT_STRING_BOXED__BOOL "load-error" peek True +loadError :: WebViewClass self => Signal self (WebFrame -> String -> GError -> IO Bool) +loadError = Signal (connect_OBJECT_STRING_BOXED__BOOL "load-error" peek) hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 950 - --- |Emitted when the creation of a new window requested. --- [_$_] --- * A new 'WebView' instance should be created in the call back or an --- existing 'WebView' can be returned. In either case, the URL and other --- details of the returned 'WebView' will be modified once this signal --- handler returns, thus, you should not modify the 'WebView' in this --- signal handler. If you need to modify the new 'WebView', you can do so --- in the 'webViewReady' signal or after the 'webViewReady' signal has --- been emitted. --- --- onCreateWebView :: WebViewClass self => self -> (WebFrame -> IO WebView) -> IO (ConnectId self) --- -- onCreateWebView = \vw act --- onCreateWebView vw act = --- connect_OBJECT__PTR "create-web-view" True vw act' --- where --- act' wf = do --- wv <- act wf --- -- We need to return a Ptr WebView to the caller of this signal. To --- -- prevent the garbage collector from freeing the WebView before this --- -- signal returns, we increment the reference count of the object and --- -- decrement it as soon as the 'webViewReady' signal is emitted which --- -- always happens after this signal returns. --- gObjectRef wv --- sidRef <- newIORef undefined --- sid <- onWebViewReady wv $ do --- gObjectUnref wv --- sid <- readIORef sidRef --- signalDisconnect wv sid --- return False --- writeIORef sidRef sid --- return unsafeForeignPtrToPtr (unWebView wv) +createWebView :: WebViewClass self => Signal self (WebFrame -> IO WebView) +createWebView = Signal (connect_OBJECT__OBJECTPTR "create-web-view") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 961 -onCloseWebView :: WebViewClass self => self -> (IO Bool) -> IO(ConnectId self) -onCloseWebView = [_$_] - connect_NONE__BOOL "close-web-view" True +closeWebView :: WebViewClass self => Signal self (IO Bool) +closeWebView = [_$_] + 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") + +-- | 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") + +-- | 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") + +-- | 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") + +-- | 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") + +-- | 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. +-- +-- The default handler will present a print dialog and carry a print operation. [_$_] +-- 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") + +-- | A JavaScript alert dialog was created. +scriptAlert :: WebViewClass self => Signal self (WebFrame -> String -> IO Bool) +scriptAlert = Signal (connect_OBJECT_STRING__BOOL "scriptAlert") + +-- | 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") + +-- | 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") + +-- | 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") + + + +-- | The 'selectAll' signal is a keybinding signal which gets emitted to select the complete contents of the text view. +-- [_$_] +-- The default bindings for this signal is Ctrl-a. +selectAll :: WebViewClass self => Signal self (IO ()) +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") + +-- | 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") + +-- | 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") + +-- | When document loading finished, this signal is emitted +documentLoadFinished :: WebViewClass self => Signal self (WebFrame -> IO ()) +documentLoadFinished = Signal (connect_OBJECT__NONE "document-load-finished") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 1048 -onWebViewReady:: WebViewClass self => self -> (IO Bool) -> IO(ConnectId self) -onWebViewReady = - connect_NONE__BOOL "web-view-ready" True +webViewReady:: WebViewClass self => Signal self (IO Bool) +webViewReady = + Signal (connect_NONE__BOOL "web-view-ready") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 1059 -onDownloadRequested :: WebViewClass self => self -> (Download -> IO Bool) -> IO(ConnectId self) -onDownloadRequested = - connect_OBJECT__BOOL "download-requested" True +downloadRequested :: WebViewClass self => Signal self (Download -> IO Bool) +downloadRequested = + Signal (connect_OBJECT__BOOL "download-requested") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 1064 -onIconLoaded :: WebViewClass self => self -> (IO ()) -> IO(ConnectId self) -onIconLoaded = - connect_NONE__NONE "icon-loaded" True +iconLoaded :: WebViewClass self => Signal self (IO ()) +iconLoaded = + Signal (connect_NONE__NONE "icon-loaded") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 1071 -onRedo :: WebViewClass self => self -> (IO ()) -> IO(ConnectId self) -onRedo = - connect_NONE__NONE "redo" True +redo :: WebViewClass self => Signal self (IO ()) +redo = + Signal (connect_NONE__NONE "redo") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 1078 -onUndo :: WebViewClass self => self -> (IO ()) -> IO(ConnectId self) -onUndo = - connect_NONE__NONE "undo" True [_$_] +undo :: WebViewClass self => Signal self (IO ()) +undo = + Signal (connect_NONE__NONE "undo") + +-- | Decide whether or not to display the given MIME type. [_$_] +-- If this signal is not handled, the default behavior is to show the content of the +-- requested URI if WebKit can show this MIME type and the content disposition is not a download; [_$_] +-- if WebKit is not able to show the MIME type nothing happens. +-- +-- Notice that if you return True, meaning that you handled the signal, [_$_] +-- you are expected to be aware of the "Content-Disposition" header. [_$_] +-- A value of "attachment" usually indicates a download regardless of the MIME type, [_$_] +-- see also soupMessageHeadersGetContentDisposition' +-- 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") + +-- | 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") + +-- | Emitted when frame requests a navigation to another page. [_$_] +-- If this signal is not handled, the default behavior is to allow the navigation. +-- +-- Notice that if you return True, meaning that you handled the signal, [_$_] +-- you are expected to be aware of the "Content-Disposition" header. [_$_] +-- A value of "attachment" usually indicates a download regardless of the MIME type, [_$_] +-- see also soupMessageHeadersGetContentDisposition' +-- 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") hunk ./webkit/Graphics/UI/Gtk/WebKit/WebView.chs.pp 1112 +-- | 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. [_$_] +-- If the request is not handled the default behavior is to allow opening the new window to load the URI, [_$_] +-- which will cause a 'createWebView' signal emission where the browser handles the new window action [_$_] +-- but without information of the context that caused the navigation. [_$_] +-- The following 'navigationPolicyDecisionRequested' emissions will load the page [_$_] +-- after the creation of the new window just with the information of this new navigation context, [_$_] +-- without any information about the action that made this new window to be opened. +-- +-- Notice that if you return True, meaning that you handled the signal, [_$_] +-- you are expected to be aware of the "Content-Disposition" header. [_$_] +-- A value of "attachment" usually indicates a download regardless of the MIME type, [_$_] +-- see also soupMessageHeadersGetContentDisposition' +-- 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") + +-- | Emitted when a request is about to be sent. [_$_] +-- You can modify the request while handling this signal. [_$_] +-- You can set the URI in the 'NetworkRequest' object itself, [_$_] +-- and add/remove/replace headers using the SoupMessage object it carries, [_$_] +-- if it is present. See 'networkRequestGetMessage'. [_$_] +-- Setting the request URI to "about:blank" will effectively cause the request to load nothing, [_$_] +-- and can be used to disable the loading of specific resources. +-- +-- Notice that information about an eventual redirect is available in response's SoupMessage, [_$_] +-- not in the SoupMessage carried by the request. +-- If response is NULL, then this is not a redirected request. +-- +-- 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 -> NetworkRequest -> NetworkResponse -> IO ()) +resourceRequestStarting = Signal (connect_OBJECT_OBJECT_OBJECT_OBJECT__NONE "resource-request-starting") |