module Graphics.UI.Gtk.WebKit.WebView (
WebView,
WebViewClass,
NavigationResponse(..),
TargetInfo(..),
LoadStatus(..),
webViewNew,
webViewLoadUri,
webViewLoadHtmlString,
webViewLoadRequest,
webViewLoadString,
webViewStopLoading,
webViewReload,
webViewReloadBypassCache,
webViewCanGoBack,
webViewCanGoForward,
webViewGoBack,
webViewGoForward,
webViewGetBackForwardList,
webViewSetMaintainsBackForwardList,
webViewGoToBackForwardItem,
webViewCanGoBackOrForward,
webViewGoBackOrForward,
webViewGetZoomLevel,
webViewSetZoomLevel,
webViewZoomIn,
webViewZoomOut,
webViewGetFullContentZoom,
webViewSetFullContentZoom,
webViewCanCutClipboard,
webViewCanCopyClipboard,
webViewCanPasteClipboard,
webViewCutClipboard,
webViewCopyClipboard,
webViewPasteClipboard,
webViewCanRedo,
webViewCanUndo,
webViewRedo,
webViewUndo,
webViewDeleteSelection,
webViewHasSelection,
webViewSelectAll,
webViewGetEncoding,
webViewSetCustomEncoding,
webViewGetCustomEncoding,
webViewGetViewSourceMode,
webViewSetViewSourceMode,
webViewGetTransparent,
webViewSetTransparent,
webViewGetCopyTargetList,
webViewGetPasteTargetList,
webViewMarkTextMatches,
webViewUnMarkTextMatches,
webViewSetHighlightTextMatches,
webViewExecuteScript,
webViewCanShowMimeType,
webViewGetEditable,
webViewSetEditable,
webViewGetInspector,
webViewGetProgress,
webViewSearchText,
webViewMoveCursor,
webViewGetMainFrame,
webViewGetFocusedFrame,
webViewSetWebSettings,
webViewGetWebSettings,
webViewGetWindowFeatures,
webViewGetIconUri,
webViewGetTitle,
webViewGetUri,
webViewZoomLevel,
webViewFullContentZoom,
webViewEncoding,
webViewCustomEncoding,
webViewLoadStatus,
webViewProgress,
webViewTitle,
webViewInspector,
webViewWebSettings,
webViewViewSourceMode,
webViewTransparent,
webViewEditable,
webViewUri,
webViewCopyTargetList,
webViewPasteTargetList,
webViewWindowFeatures,
webViewIconUri,
webViewImContext,
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,
geolocationPolicyDecisionCancelled,
geolocationPolicyDecisionRequested,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.UTFString
import System.Glib.GList
import System.Glib.Attributes
import System.Glib.Properties
import System.Glib.GError
import Graphics.UI.Gtk.Gdk.Events
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.WebKit.Types
import Graphics.UI.Gtk.WebKit.Signals
import Graphics.UI.Gtk.WebKit.Internal
import System.Glib.GObject
import Graphics.UI.Gtk.General.Selection ( TargetList )
import Graphics.UI.Gtk.MenuComboToolbar.Menu
import Graphics.UI.Gtk.General.Enums
data NavigationResponse = NavigationResponseAccept
| NavigationResponseIgnore
| NavigationResponseDownload
deriving (Enum)
data TargetInfo = WebViewTargetInfoHtml
| WebViewTargetInfoText
| WebViewTargetInfoImage
| WebViewTargetInfoUriList
| WebViewTargetInfoNetscapeUrl
deriving (Enum)
data LoadStatus = LoadProvisional
| LoadCommitted
| LoadFinished
| LoadFirstVisuallyNonEmptyLayout
| LoadFailed
deriving (Enum)
webViewNew :: IO WebView
webViewNew = do
isGthreadInited <- liftM toBool g_thread_get_initialized
if not isGthreadInited then g_thread_init nullPtr
else return ()
makeNewObject mkWebView $ liftM castPtr webkit_web_view_new
webViewSetWebSettings ::
(WebViewClass self, WebSettingsClass settings) => self
-> settings
-> IO ()
webViewSetWebSettings webview websettings =
(\(WebView arg1) (WebSettings arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->webkit_web_view_set_settings argPtr1 argPtr2) (toWebView webview) (toWebSettings websettings)
webViewGetWebSettings ::
WebViewClass self => self
-> IO WebSettings
webViewGetWebSettings webview =
makeNewGObject mkWebSettings $ (\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_settings argPtr1) (toWebView webview)
webViewGetWindowFeatures ::
WebViewClass self => self
-> IO WebWindowFeatures
webViewGetWindowFeatures webview =
makeNewGObject mkWebWindowFeatures $ (\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_window_features argPtr1) (toWebView webview)
webViewGetIconUri :: WebViewClass self => self -> IO (Maybe String)
webViewGetIconUri webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_icon_uri argPtr1) (toWebView webview)
>>= maybePeek peekUTFString
webViewGetMainFrame ::
WebViewClass self => self
-> IO WebFrame
webViewGetMainFrame webview =
makeNewGObject mkWebFrame $ (\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_main_frame argPtr1) (toWebView webview)
webViewGetFocusedFrame ::
WebViewClass self => self
-> IO WebFrame
webViewGetFocusedFrame webview =
makeNewGObject mkWebFrame $ (\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_focused_frame argPtr1) (toWebView webview)
webViewLoadUri ::
WebViewClass self => self
-> String
-> IO()
webViewLoadUri webview url =
withCString url $ \urlPtr -> (\(WebView arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_load_uri argPtr1 arg2)
(toWebView webview)
urlPtr
webViewCanGoBack ::
WebViewClass self => self
-> IO Bool
webViewCanGoBack webview =
liftM toBool $ (\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_can_go_back argPtr1) (toWebView webview)
webViewCanGoForward ::
WebViewClass self => self
-> IO Bool
webViewCanGoForward webview =
liftM toBool $ (\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_can_go_forward argPtr1) (toWebView webview)
webViewGoBack ::
WebViewClass self => self
-> IO ()
webViewGoBack webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_go_back argPtr1) (toWebView webview)
webViewGoForward ::
WebViewClass self => self
-> IO ()
webViewGoForward webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_go_forward argPtr1) (toWebView webview)
webViewSetMaintainsBackForwardList ::
WebViewClass self => self
-> Bool
-> IO()
webViewSetMaintainsBackForwardList webview flag =
(\(WebView arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_set_maintains_back_forward_list argPtr1 arg2)
(toWebView webview)
(fromBool flag)
webViewGetBackForwardList ::
WebViewClass self => self
-> IO WebBackForwardList
webViewGetBackForwardList webview =
makeNewGObject mkWebBackForwardList $
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_back_forward_list argPtr1)
(toWebView webview)
webViewGoToBackForwardItem ::
(WebViewClass self, WebHistoryItemClass item) => self
-> item
-> IO Bool
webViewGoToBackForwardItem webview item =
liftM toBool $ (\(WebView arg1) (WebHistoryItem arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->webkit_web_view_go_to_back_forward_item argPtr1 argPtr2) (toWebView webview) (toWebHistoryItem item)
webViewCanGoBackOrForward ::
WebViewClass self => self
-> Int
-> IO Bool
webViewCanGoBackOrForward webview steps =
liftM toBool $
(\(WebView arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_can_go_back_or_forward argPtr1 arg2)
(toWebView webview)
(fromIntegral steps)
webViewGoBackOrForward ::
WebViewClass self => self
-> Int
-> IO ()
webViewGoBackOrForward webview steps =
(\(WebView arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_go_back_or_forward argPtr1 arg2)
(toWebView webview)
(fromIntegral steps)
webViewCanRedo ::
WebViewClass self => self
-> IO Bool
webViewCanRedo webview =
liftM toBool $
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_can_redo argPtr1) (toWebView webview)
webViewCanUndo ::
WebViewClass self => self
-> IO Bool
webViewCanUndo webview =
liftM toBool $
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_can_undo argPtr1) (toWebView webview)
webViewRedo ::
WebViewClass self => self
-> IO()
webViewRedo webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_redo argPtr1) (toWebView webview)
webViewUndo ::
WebViewClass self => self
-> IO()
webViewUndo webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_undo argPtr1) (toWebView webview)
webViewCanShowMimeType ::
WebViewClass self => self
-> String
-> IO Bool
webViewCanShowMimeType webview mime =
withCString mime $ \mimePtr ->
liftM toBool $
(\(WebView arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_can_show_mime_type argPtr1 arg2)
(toWebView webview)
mimePtr
webViewGetEditable ::
WebViewClass self => self
-> IO Bool
webViewGetEditable webview =
liftM toBool $
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_editable argPtr1) (toWebView webview)
webViewSetEditable ::
WebViewClass self => self
-> Bool
-> IO ()
webViewSetEditable webview editable =
(\(WebView arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_set_editable argPtr1 arg2) (toWebView webview) (fromBool editable)
webViewGetViewSourceMode ::
WebViewClass self => self
-> IO Bool
webViewGetViewSourceMode webview =
liftM toBool $
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_view_source_mode argPtr1) (toWebView webview)
webViewSetViewSourceMode ::
WebViewClass self => self
-> Bool
-> IO ()
webViewSetViewSourceMode webview mode =
(\(WebView arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_set_view_source_mode argPtr1 arg2) (toWebView webview) (fromBool mode)
webViewGetTransparent ::
WebViewClass self => self
-> IO Bool
webViewGetTransparent webview =
liftM toBool $
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_transparent argPtr1) (toWebView webview)
webViewSetTransparent ::
WebViewClass self => self
-> Bool
-> IO ()
webViewSetTransparent webview trans =
(\(WebView arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_set_transparent argPtr1 arg2) (toWebView webview) (fromBool trans)
webViewGetInspector ::
WebViewClass self => self
-> IO WebInspector
webViewGetInspector webview =
makeNewGObject mkWebInspector $ (\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_inspector argPtr1) (toWebView webview)
webViewLoadRequest ::
(WebViewClass self, NetworkRequestClass request) => self
-> request
-> IO()
webViewLoadRequest webview request =
(\(WebView arg1) (NetworkRequest arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->webkit_web_view_load_request argPtr1 argPtr2) (toWebView webview) (toNetworkRequest request)
webViewGetZoomLevel ::
WebViewClass self => self
-> IO Float
webViewGetZoomLevel webview =
liftM realToFrac $
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_zoom_level argPtr1) (toWebView webview)
webViewSetZoomLevel ::
WebViewClass self => self
-> Float
-> IO ()
webViewSetZoomLevel webview zlevel =
(\(WebView arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_set_zoom_level argPtr1 arg2) (toWebView webview) (realToFrac zlevel)
webViewLoadHtmlString ::
WebViewClass self => self
-> String
-> String
-> IO()
webViewLoadHtmlString webview htmlstr url =
withCString htmlstr $ \htmlPtr ->
withCString url $ \urlPtr ->
(\(WebView arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_load_html_string argPtr1 arg2 arg3) (toWebView webview) htmlPtr urlPtr
webViewLoadString ::
WebViewClass self => self
-> String
-> (Maybe String)
-> (Maybe String)
-> String
-> IO()
webViewLoadString webview content mimetype encoding baseuri =
withCString content $ \contentPtr ->
maybeWith withCString mimetype $ \mimetypePtr ->
maybeWith withCString encoding $ \encodingPtr ->
withCString baseuri $ \baseuriPtr ->
(\(WebView arg1) arg2 arg3 arg4 arg5 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_load_string argPtr1 arg2 arg3 arg4 arg5)
(toWebView webview)
contentPtr
mimetypePtr
encodingPtr
baseuriPtr
webViewGetTitle ::
WebViewClass self => self
-> IO (Maybe String)
webViewGetTitle webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_title argPtr1) (toWebView webview) >>= maybePeek peekUTFString
webViewGetUri ::
WebViewClass self => self
-> IO (Maybe String)
webViewGetUri webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_uri argPtr1) (toWebView webview) >>= maybePeek peekUTFString
webViewStopLoading ::
WebViewClass self => self
-> IO ()
webViewStopLoading webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_stop_loading argPtr1) (toWebView webview)
webViewReload ::
WebViewClass self => self
-> IO ()
webViewReload webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_reload argPtr1) (toWebView webview)
webViewReloadBypassCache ::
WebViewClass self => self
-> IO()
webViewReloadBypassCache webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_reload_bypass_cache argPtr1) (toWebView webview)
webViewZoomIn ::
WebViewClass self => self
-> IO()
webViewZoomIn webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_zoom_in argPtr1) (toWebView webview)
webViewZoomOut ::
WebViewClass self => self
-> IO()
webViewZoomOut webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_zoom_out argPtr1) (toWebView webview)
webViewSearchText ::
WebViewClass self => self
-> String
-> Bool
-> Bool
-> Bool
-> IO Bool
webViewSearchText webview text case_sensitive forward wrap =
withCString text $ \textPtr ->
liftM toBool $
(\(WebView arg1) arg2 arg3 arg4 arg5 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_search_text argPtr1 arg2 arg3 arg4 arg5)
(toWebView webview)
textPtr
(fromBool case_sensitive)
(fromBool forward)
(fromBool wrap)
webViewMarkTextMatches ::
WebViewClass self => self
-> String
-> Bool
-> Int
-> IO Int
webViewMarkTextMatches webview text case_sensitive limit =
withCString text $ \textPtr ->
liftM fromIntegral $
(\(WebView arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_mark_text_matches argPtr1 arg2 arg3 arg4)
(toWebView webview)
textPtr
(fromBool case_sensitive)
(fromIntegral limit)
webViewMoveCursor ::
WebViewClass self => self
-> MovementStep
-> Int
-> IO ()
webViewMoveCursor webview step count =
(\(WebView arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_move_cursor argPtr1 arg2 arg3) (toWebView webview) (fromIntegral $ fromEnum step) (fromIntegral count)
webViewUnMarkTextMatches ::
WebViewClass self => self
-> IO ()
webViewUnMarkTextMatches webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_unmark_text_matches argPtr1) (toWebView webview)
webViewSetHighlightTextMatches ::
WebViewClass self => self
-> Bool
-> IO ()
webViewSetHighlightTextMatches webview highlight =
(\(WebView arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_set_highlight_text_matches argPtr1 arg2)
(toWebView webview)
(fromBool highlight)
webViewExecuteScript ::
WebViewClass self => self
-> String
-> IO()
webViewExecuteScript webview script =
withCString script $ \scriptPtr ->
(\(WebView arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_execute_script argPtr1 arg2) (toWebView webview) scriptPtr
webViewCanCutClipboard ::
WebViewClass self => self
-> IO Bool
webViewCanCutClipboard webview =
liftM toBool $ (\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_can_cut_clipboard argPtr1) (toWebView webview)
webViewCanCopyClipboard :: WebViewClass self => self -> IO Bool
webViewCanCopyClipboard webview =
liftM toBool $ (\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_can_copy_clipboard argPtr1) (toWebView webview)
webViewCanPasteClipboard :: WebViewClass self => self -> IO Bool
webViewCanPasteClipboard webview =
liftM toBool $ (\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_can_paste_clipboard argPtr1) (toWebView webview)
webViewCutClipboard :: WebViewClass self => self -> IO()
webViewCutClipboard webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_cut_clipboard argPtr1) (toWebView webview)
webViewCopyClipboard :: WebViewClass self => self -> IO()
webViewCopyClipboard webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_copy_clipboard argPtr1) (toWebView webview)
webViewPasteClipboard :: WebViewClass self => self -> IO()
webViewPasteClipboard webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_paste_clipboard argPtr1) (toWebView webview)
webViewDeleteSelection :: WebViewClass self => self -> IO ()
webViewDeleteSelection webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_delete_selection argPtr1) (toWebView webview)
webViewHasSelection :: WebViewClass self => self -> IO Bool
webViewHasSelection webview =
liftM toBool $ (\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_has_selection argPtr1) (toWebView webview)
webViewSelectAll :: WebViewClass self => self -> IO ()
webViewSelectAll webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_select_all argPtr1) (toWebView webview)
webViewGetFullContentZoom ::
WebViewClass self => self
-> IO Bool
webViewGetFullContentZoom webview =
liftM toBool $ (\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_full_content_zoom argPtr1) (toWebView webview)
webViewSetFullContentZoom ::
WebViewClass self => self
-> Bool
-> IO ()
webViewSetFullContentZoom webview full =
(\(WebView arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_set_full_content_zoom argPtr1 arg2) (toWebView webview) (fromBool full)
webViewGetEncoding ::
WebViewClass self => self
-> IO (Maybe String)
webViewGetEncoding webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_encoding argPtr1) (toWebView webview) >>= maybePeek peekUTFString
webViewSetCustomEncoding ::
WebViewClass self => self
-> (Maybe String)
-> IO ()
webViewSetCustomEncoding webview encoding =
maybeWith withCString encoding $ \encodingPtr ->
(\(WebView arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_set_custom_encoding argPtr1 arg2) (toWebView webview) encodingPtr
webViewGetCustomEncoding ::
WebViewClass self => self
-> IO (Maybe String)
webViewGetCustomEncoding webview =
(\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_custom_encoding argPtr1) (toWebView webview) >>= maybePeek peekUTFString
webViewGetLoadStatus ::
WebViewClass self => self
-> IO LoadStatus
webViewGetLoadStatus webview =
liftM (toEnum . fromIntegral) $ (\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_load_status argPtr1) (toWebView webview)
webViewGetProgress ::
WebViewClass self => self
-> IO Double
webViewGetProgress webview =
liftM realToFrac $ (\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_progress argPtr1) (toWebView webview)
webViewGetCopyTargetList ::
WebViewClass self => self
-> IO (Maybe TargetList)
webViewGetCopyTargetList webview = do
tlPtr <- (\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_copy_target_list argPtr1) (toWebView webview)
if tlPtr==nullPtr then return Nothing else liftM Just (mkTargetList tlPtr)
webViewGetPasteTargetList ::
WebViewClass self => self
-> IO (Maybe TargetList)
webViewGetPasteTargetList webview = do
tlPtr <- (\(WebView arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_web_view_get_paste_target_list argPtr1) (toWebView webview)
if tlPtr==nullPtr then return Nothing else liftM Just (mkTargetList tlPtr)
webViewZoomLevel :: WebViewClass self => Attr self Float
webViewZoomLevel = newAttr
webViewGetZoomLevel
webViewSetZoomLevel
webViewFullContentZoom :: WebViewClass self => Attr self Bool
webViewFullContentZoom = newAttr
webViewGetFullContentZoom
webViewSetFullContentZoom
webViewEncoding :: WebViewClass self => ReadAttr self (Maybe String)
webViewEncoding = readAttr webViewGetEncoding
webViewLoadStatus :: WebViewClass self => ReadAttr self LoadStatus
webViewLoadStatus = readAttr webViewGetLoadStatus
webViewProgress :: WebViewClass self => ReadAttr self Double
webViewProgress = readAttr webViewGetProgress
webViewWebSettings :: WebViewClass self => Attr self WebSettings
webViewWebSettings = newAttr
webViewGetWebSettings
webViewSetWebSettings
webViewTitle :: WebViewClass self => ReadAttr self (Maybe String)
webViewTitle = readAttr webViewGetTitle
webViewInspector :: WebViewClass self => ReadAttr self WebInspector
webViewInspector = readAttr webViewGetInspector
webViewCustomEncoding :: WebViewClass self => Attr self (Maybe String)
webViewCustomEncoding = newAttr
webViewGetCustomEncoding
webViewSetCustomEncoding
webViewViewSourceMode :: WebViewClass self => Attr self Bool
webViewViewSourceMode = newAttr
webViewGetViewSourceMode
webViewSetViewSourceMode
webViewTransparent :: WebViewClass self => Attr self Bool
webViewTransparent = newAttr
webViewGetTransparent
webViewSetTransparent
webViewEditable :: WebViewClass self => Attr self Bool
webViewEditable = newAttr
webViewGetEditable
webViewSetEditable
webViewUri :: WebViewClass self => ReadAttr self (Maybe String)
webViewUri = readAttr webViewGetUri
webViewCopyTargetList :: WebViewClass self => ReadAttr self (Maybe TargetList)
webViewCopyTargetList = readAttr webViewGetCopyTargetList
webViewPasteTargetList :: WebViewClass self => ReadAttr self (Maybe TargetList)
webViewPasteTargetList = readAttr webViewGetPasteTargetList
webViewWindowFeatures :: WebViewClass self => Attr self WebWindowFeatures
webViewWindowFeatures =
newAttrFromObjectProperty "window-features"
webkit_web_window_features_get_type
webViewIconUri :: WebViewClass self => ReadAttr self String
webViewIconUri = readAttrFromStringProperty "icon-uri"
webViewImContext :: WebViewClass self => ReadAttr self IMContext
webViewImContext =
readAttrFromObjectProperty "im-context"
gtk_im_context_get_type
titleChanged :: WebViewClass self => Signal self ( WebFrame -> String -> IO() )
titleChanged =
Signal (connect_OBJECT_STRING__NONE "title-changed")
hoveringOverLink :: WebViewClass self => Signal self (String -> String -> IO())
hoveringOverLink =
Signal (connect_STRING_STRING__NONE "hovering-over-link")
loadStarted :: WebViewClass self => Signal self (WebFrame -> IO())
loadStarted = Signal (connect_OBJECT__NONE "load-started")
loadCommitted :: WebViewClass self => Signal self (WebFrame -> IO())
loadCommitted = Signal (connect_OBJECT__NONE "load-committed")
progressChanged :: WebViewClass self => Signal self (Int-> IO())
progressChanged =
Signal (connect_INT__NONE "load-progress-changed")
loadFinished :: WebViewClass self => Signal self (WebFrame -> IO())
loadFinished =
Signal (connect_OBJECT__NONE "load-finished")
loadError :: WebViewClass self => Signal self (WebFrame -> String -> GError -> IO Bool)
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")
closeWebView :: WebViewClass self => Signal self (IO Bool)
closeWebView =
Signal (connect_NONE__BOOL "close-web-view")
consoleMessage :: WebViewClass self => Signal self (String -> String -> Int -> String -> IO Bool)
consoleMessage = Signal (connect_STRING_STRING_INT_STRING__BOOL "console-message")
copyClipboard :: WebViewClass self => Signal self (IO ())
copyClipboard = Signal (connect_NONE__NONE "copy-clipboard")
cutClipboard :: WebViewClass self => Signal self (IO ())
cutClipboard = Signal (connect_NONE__NONE "cut-clipboard")
pasteClipboard :: WebViewClass self => Signal self (IO ())
pasteClipboard = Signal (connect_NONE__NONE "paste-clipboard")
populatePopup :: WebViewClass self => Signal self (Menu -> IO ())
populatePopup = Signal (connect_OBJECT__NONE "populate-popup")
printRequested :: WebViewClass self => Signal self (WebFrame -> IO Bool)
printRequested = Signal (connect_OBJECT__BOOL "print-requested")
scriptAlert :: WebViewClass self => Signal self (WebFrame -> String -> IO Bool)
scriptAlert = Signal (connect_OBJECT_STRING__BOOL "scriptAlert")
scriptConfirm :: WebViewClass self => Signal self (WebFrame -> String -> IO Bool)
scriptConfirm = Signal (connect_OBJECT_STRING__BOOL "script-confirm")
scriptPrompt :: WebViewClass self => Signal self (WebFrame -> String -> String -> IO Bool)
scriptPrompt = Signal (connect_OBJECT_STRING_STRING__BOOL "script-prompt")
statusBarTextChanged :: WebViewClass self => Signal self (String -> IO ())
statusBarTextChanged = Signal (connect_STRING__NONE "status-bar-text-changed")
selectAll :: WebViewClass self => Signal self (IO ())
selectAll = Signal (connect_NONE__NONE "select-all")
selectionChanged :: WebViewClass self => Signal self (IO ())
selectionChanged = Signal (connect_NONE__NONE "selection-changed")
setScrollAdjustments :: WebViewClass self => Signal self (Adjustment -> Adjustment -> IO ())
setScrollAdjustments = Signal (connect_OBJECT_OBJECT__NONE "set-scroll-adjustments")
databaseQuotaExceeded :: WebViewClass self => Signal self (WebFrame -> WebDatabase -> IO ())
databaseQuotaExceeded = Signal (connect_OBJECT_OBJECT__NONE "database-quota-exceeded")
documentLoadFinished :: WebViewClass self => Signal self (WebFrame -> IO ())
documentLoadFinished = Signal (connect_OBJECT__NONE "document-load-finished")
webViewReady:: WebViewClass self => Signal self (IO Bool)
webViewReady =
Signal (connect_NONE__BOOL "web-view-ready")
downloadRequested :: WebViewClass self => Signal self (Download -> IO Bool)
downloadRequested =
Signal (connect_OBJECT__BOOL "download-requested")
iconLoaded :: WebViewClass self => Signal self (IO ())
iconLoaded =
Signal (connect_NONE__NONE "icon-loaded")
redo :: WebViewClass self => Signal self (IO ())
redo =
Signal (connect_NONE__NONE "redo")
undo :: WebViewClass self => Signal self (IO ())
undo =
Signal (connect_NONE__NONE "undo")
mimeTypePolicyDecisionRequested :: WebViewClass self => Signal self (WebFrame -> NetworkRequest -> String -> WebPolicyDecision -> IO Bool)
mimeTypePolicyDecisionRequested = Signal (connect_OBJECT_OBJECT_STRING_OBJECT__BOOL "mime-type-policy-decision-requested")
moveCursor :: WebViewClass self => Signal self (MovementStep -> Int -> IO Bool)
moveCursor = Signal (connect_ENUM_INT__BOOL "move-cursor")
navigationPolicyDecisionRequested :: WebViewClass self => Signal self (WebFrame -> NetworkRequest -> WebNavigationAction -> WebPolicyDecision -> IO Bool)
navigationPolicyDecisionRequested = Signal (connect_OBJECT_OBJECT_OBJECT_OBJECT__BOOL "navigation-policy-decision-requested")
newWindowPolicyDecisionRequested :: WebViewClass self => Signal self (WebFrame -> NetworkRequest -> WebNavigationAction -> WebPolicyDecision -> IO Bool)
newWindowPolicyDecisionRequested = Signal (connect_OBJECT_OBJECT_OBJECT_OBJECT__BOOL "new-window-policy-decision-requested")
resourceRequestStarting :: WebViewClass self => Signal self (WebFrame -> WebResource -> NetworkRequest -> NetworkResponse -> IO ())
resourceRequestStarting = Signal (connect_OBJECT_OBJECT_OBJECT_OBJECT__NONE "resource-request-starting")
geolocationPolicyDecisionCancelled :: WebViewClass self => Signal self (WebFrame -> IO ())
geolocationPolicyDecisionCancelled = Signal (connect_OBJECT__NONE "geolocation-policy-decision-cancelled")
geolocationPolicyDecisionRequested :: WebViewClass self => Signal self (WebFrame -> GeolocationPolicyDecision -> IO ())
geolocationPolicyDecisionRequested = Signal (connect_OBJECT_OBJECT__NONE "geolocation-policy-decision-requested")
foreign import ccall safe "g_thread_get_initialized"
g_thread_get_initialized :: (IO CInt)
foreign import ccall safe "g_thread_init"
g_thread_init :: ((Ptr ()) -> (IO ()))
foreign import ccall safe "webkit_web_view_new"
webkit_web_view_new :: (IO (Ptr Widget))
foreign import ccall safe "webkit_web_view_set_settings"
webkit_web_view_set_settings :: ((Ptr WebView) -> ((Ptr WebSettings) -> (IO ())))
foreign import ccall safe "webkit_web_view_get_settings"
webkit_web_view_get_settings :: ((Ptr WebView) -> (IO (Ptr WebSettings)))
foreign import ccall safe "webkit_web_view_get_window_features"
webkit_web_view_get_window_features :: ((Ptr WebView) -> (IO (Ptr WebWindowFeatures)))
foreign import ccall safe "webkit_web_view_get_icon_uri"
webkit_web_view_get_icon_uri :: ((Ptr WebView) -> (IO (Ptr CChar)))
foreign import ccall safe "webkit_web_view_get_main_frame"
webkit_web_view_get_main_frame :: ((Ptr WebView) -> (IO (Ptr WebFrame)))
foreign import ccall safe "webkit_web_view_get_focused_frame"
webkit_web_view_get_focused_frame :: ((Ptr WebView) -> (IO (Ptr WebFrame)))
foreign import ccall safe "webkit_web_view_load_uri"
webkit_web_view_load_uri :: ((Ptr WebView) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "webkit_web_view_can_go_back"
webkit_web_view_can_go_back :: ((Ptr WebView) -> (IO CInt))
foreign import ccall safe "webkit_web_view_can_go_forward"
webkit_web_view_can_go_forward :: ((Ptr WebView) -> (IO CInt))
foreign import ccall safe "webkit_web_view_go_back"
webkit_web_view_go_back :: ((Ptr WebView) -> (IO ()))
foreign import ccall safe "webkit_web_view_go_forward"
webkit_web_view_go_forward :: ((Ptr WebView) -> (IO ()))
foreign import ccall safe "webkit_web_view_set_maintains_back_forward_list"
webkit_web_view_set_maintains_back_forward_list :: ((Ptr WebView) -> (CInt -> (IO ())))
foreign import ccall safe "webkit_web_view_get_back_forward_list"
webkit_web_view_get_back_forward_list :: ((Ptr WebView) -> (IO (Ptr WebBackForwardList)))
foreign import ccall safe "webkit_web_view_go_to_back_forward_item"
webkit_web_view_go_to_back_forward_item :: ((Ptr WebView) -> ((Ptr WebHistoryItem) -> (IO CInt)))
foreign import ccall safe "webkit_web_view_can_go_back_or_forward"
webkit_web_view_can_go_back_or_forward :: ((Ptr WebView) -> (CInt -> (IO CInt)))
foreign import ccall safe "webkit_web_view_go_back_or_forward"
webkit_web_view_go_back_or_forward :: ((Ptr WebView) -> (CInt -> (IO ())))
foreign import ccall safe "webkit_web_view_can_redo"
webkit_web_view_can_redo :: ((Ptr WebView) -> (IO CInt))
foreign import ccall safe "webkit_web_view_can_undo"
webkit_web_view_can_undo :: ((Ptr WebView) -> (IO CInt))
foreign import ccall safe "webkit_web_view_redo"
webkit_web_view_redo :: ((Ptr WebView) -> (IO ()))
foreign import ccall safe "webkit_web_view_undo"
webkit_web_view_undo :: ((Ptr WebView) -> (IO ()))
foreign import ccall safe "webkit_web_view_can_show_mime_type"
webkit_web_view_can_show_mime_type :: ((Ptr WebView) -> ((Ptr CChar) -> (IO CInt)))
foreign import ccall safe "webkit_web_view_get_editable"
webkit_web_view_get_editable :: ((Ptr WebView) -> (IO CInt))
foreign import ccall safe "webkit_web_view_set_editable"
webkit_web_view_set_editable :: ((Ptr WebView) -> (CInt -> (IO ())))
foreign import ccall safe "webkit_web_view_get_view_source_mode"
webkit_web_view_get_view_source_mode :: ((Ptr WebView) -> (IO CInt))
foreign import ccall safe "webkit_web_view_set_view_source_mode"
webkit_web_view_set_view_source_mode :: ((Ptr WebView) -> (CInt -> (IO ())))
foreign import ccall safe "webkit_web_view_get_transparent"
webkit_web_view_get_transparent :: ((Ptr WebView) -> (IO CInt))
foreign import ccall safe "webkit_web_view_set_transparent"
webkit_web_view_set_transparent :: ((Ptr WebView) -> (CInt -> (IO ())))
foreign import ccall safe "webkit_web_view_get_inspector"
webkit_web_view_get_inspector :: ((Ptr WebView) -> (IO (Ptr WebInspector)))
foreign import ccall safe "webkit_web_view_load_request"
webkit_web_view_load_request :: ((Ptr WebView) -> ((Ptr NetworkRequest) -> (IO ())))
foreign import ccall safe "webkit_web_view_get_zoom_level"
webkit_web_view_get_zoom_level :: ((Ptr WebView) -> (IO CFloat))
foreign import ccall safe "webkit_web_view_set_zoom_level"
webkit_web_view_set_zoom_level :: ((Ptr WebView) -> (CFloat -> (IO ())))
foreign import ccall safe "webkit_web_view_load_html_string"
webkit_web_view_load_html_string :: ((Ptr WebView) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO ()))))
foreign import ccall safe "webkit_web_view_load_string"
webkit_web_view_load_string :: ((Ptr WebView) -> ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO ()))))))
foreign import ccall safe "webkit_web_view_get_title"
webkit_web_view_get_title :: ((Ptr WebView) -> (IO (Ptr CChar)))
foreign import ccall safe "webkit_web_view_get_uri"
webkit_web_view_get_uri :: ((Ptr WebView) -> (IO (Ptr CChar)))
foreign import ccall safe "webkit_web_view_stop_loading"
webkit_web_view_stop_loading :: ((Ptr WebView) -> (IO ()))
foreign import ccall safe "webkit_web_view_reload"
webkit_web_view_reload :: ((Ptr WebView) -> (IO ()))
foreign import ccall safe "webkit_web_view_reload_bypass_cache"
webkit_web_view_reload_bypass_cache :: ((Ptr WebView) -> (IO ()))
foreign import ccall safe "webkit_web_view_zoom_in"
webkit_web_view_zoom_in :: ((Ptr WebView) -> (IO ()))
foreign import ccall safe "webkit_web_view_zoom_out"
webkit_web_view_zoom_out :: ((Ptr WebView) -> (IO ()))
foreign import ccall safe "webkit_web_view_search_text"
webkit_web_view_search_text :: ((Ptr WebView) -> ((Ptr CChar) -> (CInt -> (CInt -> (CInt -> (IO CInt))))))
foreign import ccall safe "webkit_web_view_mark_text_matches"
webkit_web_view_mark_text_matches :: ((Ptr WebView) -> ((Ptr CChar) -> (CInt -> (CUInt -> (IO CUInt)))))
foreign import ccall safe "webkit_web_view_move_cursor"
webkit_web_view_move_cursor :: ((Ptr WebView) -> (CInt -> (CInt -> (IO ()))))
foreign import ccall safe "webkit_web_view_unmark_text_matches"
webkit_web_view_unmark_text_matches :: ((Ptr WebView) -> (IO ()))
foreign import ccall safe "webkit_web_view_set_highlight_text_matches"
webkit_web_view_set_highlight_text_matches :: ((Ptr WebView) -> (CInt -> (IO ())))
foreign import ccall safe "webkit_web_view_execute_script"
webkit_web_view_execute_script :: ((Ptr WebView) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "webkit_web_view_can_cut_clipboard"
webkit_web_view_can_cut_clipboard :: ((Ptr WebView) -> (IO CInt))
foreign import ccall safe "webkit_web_view_can_copy_clipboard"
webkit_web_view_can_copy_clipboard :: ((Ptr WebView) -> (IO CInt))
foreign import ccall safe "webkit_web_view_can_paste_clipboard"
webkit_web_view_can_paste_clipboard :: ((Ptr WebView) -> (IO CInt))
foreign import ccall safe "webkit_web_view_cut_clipboard"
webkit_web_view_cut_clipboard :: ((Ptr WebView) -> (IO ()))
foreign import ccall safe "webkit_web_view_copy_clipboard"
webkit_web_view_copy_clipboard :: ((Ptr WebView) -> (IO ()))
foreign import ccall safe "webkit_web_view_paste_clipboard"
webkit_web_view_paste_clipboard :: ((Ptr WebView) -> (IO ()))
foreign import ccall safe "webkit_web_view_delete_selection"
webkit_web_view_delete_selection :: ((Ptr WebView) -> (IO ()))
foreign import ccall safe "webkit_web_view_has_selection"
webkit_web_view_has_selection :: ((Ptr WebView) -> (IO CInt))
foreign import ccall safe "webkit_web_view_select_all"
webkit_web_view_select_all :: ((Ptr WebView) -> (IO ()))
foreign import ccall safe "webkit_web_view_get_full_content_zoom"
webkit_web_view_get_full_content_zoom :: ((Ptr WebView) -> (IO CInt))
foreign import ccall safe "webkit_web_view_set_full_content_zoom"
webkit_web_view_set_full_content_zoom :: ((Ptr WebView) -> (CInt -> (IO ())))
foreign import ccall safe "webkit_web_view_get_encoding"
webkit_web_view_get_encoding :: ((Ptr WebView) -> (IO (Ptr CChar)))
foreign import ccall safe "webkit_web_view_set_custom_encoding"
webkit_web_view_set_custom_encoding :: ((Ptr WebView) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "webkit_web_view_get_custom_encoding"
webkit_web_view_get_custom_encoding :: ((Ptr WebView) -> (IO (Ptr CChar)))
foreign import ccall safe "webkit_web_view_get_load_status"
webkit_web_view_get_load_status :: ((Ptr WebView) -> (IO CInt))
foreign import ccall safe "webkit_web_view_get_progress"
webkit_web_view_get_progress :: ((Ptr WebView) -> (IO CDouble))
foreign import ccall safe "webkit_web_view_get_copy_target_list"
webkit_web_view_get_copy_target_list :: ((Ptr WebView) -> (IO (Ptr TargetList)))
foreign import ccall safe "webkit_web_view_get_paste_target_list"
webkit_web_view_get_paste_target_list :: ((Ptr WebView) -> (IO (Ptr TargetList)))
foreign import ccall safe "webkit_web_window_features_get_type"
webkit_web_window_features_get_type :: CUInt
foreign import ccall safe "gtk_im_context_get_type"
gtk_im_context_get_type :: CUInt