#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.WebKit2WebExtension.Objects.WebPage
(
WebPage(..) ,
IsWebPage ,
toWebPage ,
noWebPage ,
#if ENABLE_OVERLOADING
WebPageGetDomDocumentMethodInfo ,
#endif
webPageGetDomDocument ,
#if ENABLE_OVERLOADING
WebPageGetEditorMethodInfo ,
#endif
webPageGetEditor ,
#if ENABLE_OVERLOADING
WebPageGetIdMethodInfo ,
#endif
webPageGetId ,
#if ENABLE_OVERLOADING
WebPageGetMainFrameMethodInfo ,
#endif
webPageGetMainFrame ,
#if ENABLE_OVERLOADING
WebPageGetUriMethodInfo ,
#endif
webPageGetUri ,
#if ENABLE_OVERLOADING
WebPageUriPropertyInfo ,
#endif
getWebPageUri ,
#if ENABLE_OVERLOADING
webPageUri ,
#endif
C_WebPageConsoleMessageSentCallback ,
WebPageConsoleMessageSentCallback ,
#if ENABLE_OVERLOADING
WebPageConsoleMessageSentSignalInfo ,
#endif
afterWebPageConsoleMessageSent ,
genClosure_WebPageConsoleMessageSent ,
mk_WebPageConsoleMessageSentCallback ,
noWebPageConsoleMessageSentCallback ,
onWebPageConsoleMessageSent ,
wrap_WebPageConsoleMessageSentCallback ,
C_WebPageContextMenuCallback ,
WebPageContextMenuCallback ,
#if ENABLE_OVERLOADING
WebPageContextMenuSignalInfo ,
#endif
afterWebPageContextMenu ,
genClosure_WebPageContextMenu ,
mk_WebPageContextMenuCallback ,
noWebPageContextMenuCallback ,
onWebPageContextMenu ,
wrap_WebPageContextMenuCallback ,
C_WebPageDocumentLoadedCallback ,
WebPageDocumentLoadedCallback ,
#if ENABLE_OVERLOADING
WebPageDocumentLoadedSignalInfo ,
#endif
afterWebPageDocumentLoaded ,
genClosure_WebPageDocumentLoaded ,
mk_WebPageDocumentLoadedCallback ,
noWebPageDocumentLoadedCallback ,
onWebPageDocumentLoaded ,
wrap_WebPageDocumentLoadedCallback ,
C_WebPageFormControlsAssociatedCallback ,
WebPageFormControlsAssociatedCallback ,
#if ENABLE_OVERLOADING
WebPageFormControlsAssociatedSignalInfo ,
#endif
afterWebPageFormControlsAssociated ,
genClosure_WebPageFormControlsAssociated,
mk_WebPageFormControlsAssociatedCallback,
noWebPageFormControlsAssociatedCallback ,
onWebPageFormControlsAssociated ,
wrap_WebPageFormControlsAssociatedCallback,
C_WebPageSendRequestCallback ,
WebPageSendRequestCallback ,
#if ENABLE_OVERLOADING
WebPageSendRequestSignalInfo ,
#endif
afterWebPageSendRequest ,
genClosure_WebPageSendRequest ,
mk_WebPageSendRequestCallback ,
noWebPageSendRequestCallback ,
onWebPageSendRequest ,
wrap_WebPageSendRequestCallback ,
C_WebPageWillSubmitFormCallback ,
WebPageWillSubmitFormCallback ,
#if ENABLE_OVERLOADING
WebPageWillSubmitFormSignalInfo ,
#endif
afterWebPageWillSubmitForm ,
genClosure_WebPageWillSubmitForm ,
mk_WebPageWillSubmitFormCallback ,
noWebPageWillSubmitFormCallback ,
onWebPageWillSubmitForm ,
wrap_WebPageWillSubmitFormCallback ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Enums as WebKit2WebExtension.Enums
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.ContextMenu as WebKit2WebExtension.ContextMenu
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMDocument as WebKit2WebExtension.DOMDocument
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMElement as WebKit2WebExtension.DOMElement
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.Frame as WebKit2WebExtension.Frame
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.URIRequest as WebKit2WebExtension.URIRequest
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.URIResponse as WebKit2WebExtension.URIResponse
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.WebEditor as WebKit2WebExtension.WebEditor
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.WebHitTestResult as WebKit2WebExtension.WebHitTestResult
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Structs.ConsoleMessage as WebKit2WebExtension.ConsoleMessage
newtype WebPage = WebPage (ManagedPtr WebPage)
foreign import ccall "webkit_web_page_get_type"
c_webkit_web_page_get_type :: IO GType
instance GObject WebPage where
gobjectType = c_webkit_web_page_get_type
class (GObject o, O.IsDescendantOf WebPage o) => IsWebPage o
instance (GObject o, O.IsDescendantOf WebPage o) => IsWebPage o
instance O.HasParentTypes WebPage
type instance O.ParentTypes WebPage = '[GObject.Object.Object]
toWebPage :: (MonadIO m, IsWebPage o) => o -> m WebPage
toWebPage = liftIO . unsafeCastTo WebPage
noWebPage :: Maybe WebPage
noWebPage = Nothing
#if ENABLE_OVERLOADING
type family ResolveWebPageMethod (t :: Symbol) (o :: *) :: * where
ResolveWebPageMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveWebPageMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveWebPageMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveWebPageMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveWebPageMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveWebPageMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveWebPageMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveWebPageMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveWebPageMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveWebPageMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveWebPageMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveWebPageMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveWebPageMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveWebPageMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveWebPageMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveWebPageMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveWebPageMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveWebPageMethod "getDomDocument" o = WebPageGetDomDocumentMethodInfo
ResolveWebPageMethod "getEditor" o = WebPageGetEditorMethodInfo
ResolveWebPageMethod "getId" o = WebPageGetIdMethodInfo
ResolveWebPageMethod "getMainFrame" o = WebPageGetMainFrameMethodInfo
ResolveWebPageMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveWebPageMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveWebPageMethod "getUri" o = WebPageGetUriMethodInfo
ResolveWebPageMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveWebPageMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveWebPageMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveWebPageMethod t WebPage, O.MethodInfo info WebPage p) => OL.IsLabel t (WebPage -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
type WebPageConsoleMessageSentCallback =
WebKit2WebExtension.ConsoleMessage.ConsoleMessage
-> IO ()
noWebPageConsoleMessageSentCallback :: Maybe WebPageConsoleMessageSentCallback
noWebPageConsoleMessageSentCallback = Nothing
type C_WebPageConsoleMessageSentCallback =
Ptr () ->
Ptr WebKit2WebExtension.ConsoleMessage.ConsoleMessage ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_WebPageConsoleMessageSentCallback :: C_WebPageConsoleMessageSentCallback -> IO (FunPtr C_WebPageConsoleMessageSentCallback)
genClosure_WebPageConsoleMessageSent :: MonadIO m => WebPageConsoleMessageSentCallback -> m (GClosure C_WebPageConsoleMessageSentCallback)
genClosure_WebPageConsoleMessageSent cb = liftIO $ do
let cb' = wrap_WebPageConsoleMessageSentCallback cb
mk_WebPageConsoleMessageSentCallback cb' >>= B.GClosure.newGClosure
wrap_WebPageConsoleMessageSentCallback ::
WebPageConsoleMessageSentCallback ->
C_WebPageConsoleMessageSentCallback
wrap_WebPageConsoleMessageSentCallback _cb _ consoleMessage _ = do
B.ManagedPtr.withTransient WebKit2WebExtension.ConsoleMessage.ConsoleMessage consoleMessage $ \consoleMessage' -> do
_cb consoleMessage'
onWebPageConsoleMessageSent :: (IsWebPage a, MonadIO m) => a -> WebPageConsoleMessageSentCallback -> m SignalHandlerId
onWebPageConsoleMessageSent obj cb = liftIO $ do
let cb' = wrap_WebPageConsoleMessageSentCallback cb
cb'' <- mk_WebPageConsoleMessageSentCallback cb'
connectSignalFunPtr obj "console-message-sent" cb'' SignalConnectBefore
afterWebPageConsoleMessageSent :: (IsWebPage a, MonadIO m) => a -> WebPageConsoleMessageSentCallback -> m SignalHandlerId
afterWebPageConsoleMessageSent obj cb = liftIO $ do
let cb' = wrap_WebPageConsoleMessageSentCallback cb
cb'' <- mk_WebPageConsoleMessageSentCallback cb'
connectSignalFunPtr obj "console-message-sent" cb'' SignalConnectAfter
type WebPageContextMenuCallback =
WebKit2WebExtension.ContextMenu.ContextMenu
-> WebKit2WebExtension.WebHitTestResult.WebHitTestResult
-> IO Bool
noWebPageContextMenuCallback :: Maybe WebPageContextMenuCallback
noWebPageContextMenuCallback = Nothing
type C_WebPageContextMenuCallback =
Ptr () ->
Ptr WebKit2WebExtension.ContextMenu.ContextMenu ->
Ptr WebKit2WebExtension.WebHitTestResult.WebHitTestResult ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_WebPageContextMenuCallback :: C_WebPageContextMenuCallback -> IO (FunPtr C_WebPageContextMenuCallback)
genClosure_WebPageContextMenu :: MonadIO m => WebPageContextMenuCallback -> m (GClosure C_WebPageContextMenuCallback)
genClosure_WebPageContextMenu cb = liftIO $ do
let cb' = wrap_WebPageContextMenuCallback cb
mk_WebPageContextMenuCallback cb' >>= B.GClosure.newGClosure
wrap_WebPageContextMenuCallback ::
WebPageContextMenuCallback ->
C_WebPageContextMenuCallback
wrap_WebPageContextMenuCallback _cb _ contextMenu hitTestResult _ = do
contextMenu' <- (newObject WebKit2WebExtension.ContextMenu.ContextMenu) contextMenu
hitTestResult' <- (newObject WebKit2WebExtension.WebHitTestResult.WebHitTestResult) hitTestResult
result <- _cb contextMenu' hitTestResult'
let result' = (fromIntegral . fromEnum) result
return result'
onWebPageContextMenu :: (IsWebPage a, MonadIO m) => a -> WebPageContextMenuCallback -> m SignalHandlerId
onWebPageContextMenu obj cb = liftIO $ do
let cb' = wrap_WebPageContextMenuCallback cb
cb'' <- mk_WebPageContextMenuCallback cb'
connectSignalFunPtr obj "context-menu" cb'' SignalConnectBefore
afterWebPageContextMenu :: (IsWebPage a, MonadIO m) => a -> WebPageContextMenuCallback -> m SignalHandlerId
afterWebPageContextMenu obj cb = liftIO $ do
let cb' = wrap_WebPageContextMenuCallback cb
cb'' <- mk_WebPageContextMenuCallback cb'
connectSignalFunPtr obj "context-menu" cb'' SignalConnectAfter
type WebPageDocumentLoadedCallback =
IO ()
noWebPageDocumentLoadedCallback :: Maybe WebPageDocumentLoadedCallback
noWebPageDocumentLoadedCallback = Nothing
type C_WebPageDocumentLoadedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_WebPageDocumentLoadedCallback :: C_WebPageDocumentLoadedCallback -> IO (FunPtr C_WebPageDocumentLoadedCallback)
genClosure_WebPageDocumentLoaded :: MonadIO m => WebPageDocumentLoadedCallback -> m (GClosure C_WebPageDocumentLoadedCallback)
genClosure_WebPageDocumentLoaded cb = liftIO $ do
let cb' = wrap_WebPageDocumentLoadedCallback cb
mk_WebPageDocumentLoadedCallback cb' >>= B.GClosure.newGClosure
wrap_WebPageDocumentLoadedCallback ::
WebPageDocumentLoadedCallback ->
C_WebPageDocumentLoadedCallback
wrap_WebPageDocumentLoadedCallback _cb _ _ = do
_cb
onWebPageDocumentLoaded :: (IsWebPage a, MonadIO m) => a -> WebPageDocumentLoadedCallback -> m SignalHandlerId
onWebPageDocumentLoaded obj cb = liftIO $ do
let cb' = wrap_WebPageDocumentLoadedCallback cb
cb'' <- mk_WebPageDocumentLoadedCallback cb'
connectSignalFunPtr obj "document-loaded" cb'' SignalConnectBefore
afterWebPageDocumentLoaded :: (IsWebPage a, MonadIO m) => a -> WebPageDocumentLoadedCallback -> m SignalHandlerId
afterWebPageDocumentLoaded obj cb = liftIO $ do
let cb' = wrap_WebPageDocumentLoadedCallback cb
cb'' <- mk_WebPageDocumentLoadedCallback cb'
connectSignalFunPtr obj "document-loaded" cb'' SignalConnectAfter
type WebPageFormControlsAssociatedCallback =
[WebKit2WebExtension.DOMElement.DOMElement]
-> IO ()
noWebPageFormControlsAssociatedCallback :: Maybe WebPageFormControlsAssociatedCallback
noWebPageFormControlsAssociatedCallback = Nothing
type C_WebPageFormControlsAssociatedCallback =
Ptr () ->
Ptr (GPtrArray (Ptr WebKit2WebExtension.DOMElement.DOMElement)) ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_WebPageFormControlsAssociatedCallback :: C_WebPageFormControlsAssociatedCallback -> IO (FunPtr C_WebPageFormControlsAssociatedCallback)
genClosure_WebPageFormControlsAssociated :: MonadIO m => WebPageFormControlsAssociatedCallback -> m (GClosure C_WebPageFormControlsAssociatedCallback)
genClosure_WebPageFormControlsAssociated cb = liftIO $ do
let cb' = wrap_WebPageFormControlsAssociatedCallback cb
mk_WebPageFormControlsAssociatedCallback cb' >>= B.GClosure.newGClosure
wrap_WebPageFormControlsAssociatedCallback ::
WebPageFormControlsAssociatedCallback ->
C_WebPageFormControlsAssociatedCallback
wrap_WebPageFormControlsAssociatedCallback _cb _ elements _ = do
elements' <- unpackGPtrArray elements
elements'' <- mapM (newObject WebKit2WebExtension.DOMElement.DOMElement) elements'
_cb elements''
onWebPageFormControlsAssociated :: (IsWebPage a, MonadIO m) => a -> WebPageFormControlsAssociatedCallback -> m SignalHandlerId
onWebPageFormControlsAssociated obj cb = liftIO $ do
let cb' = wrap_WebPageFormControlsAssociatedCallback cb
cb'' <- mk_WebPageFormControlsAssociatedCallback cb'
connectSignalFunPtr obj "form-controls-associated" cb'' SignalConnectBefore
afterWebPageFormControlsAssociated :: (IsWebPage a, MonadIO m) => a -> WebPageFormControlsAssociatedCallback -> m SignalHandlerId
afterWebPageFormControlsAssociated obj cb = liftIO $ do
let cb' = wrap_WebPageFormControlsAssociatedCallback cb
cb'' <- mk_WebPageFormControlsAssociatedCallback cb'
connectSignalFunPtr obj "form-controls-associated" cb'' SignalConnectAfter
type WebPageSendRequestCallback =
WebKit2WebExtension.URIRequest.URIRequest
-> WebKit2WebExtension.URIResponse.URIResponse
-> IO Bool
noWebPageSendRequestCallback :: Maybe WebPageSendRequestCallback
noWebPageSendRequestCallback = Nothing
type C_WebPageSendRequestCallback =
Ptr () ->
Ptr WebKit2WebExtension.URIRequest.URIRequest ->
Ptr WebKit2WebExtension.URIResponse.URIResponse ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_WebPageSendRequestCallback :: C_WebPageSendRequestCallback -> IO (FunPtr C_WebPageSendRequestCallback)
genClosure_WebPageSendRequest :: MonadIO m => WebPageSendRequestCallback -> m (GClosure C_WebPageSendRequestCallback)
genClosure_WebPageSendRequest cb = liftIO $ do
let cb' = wrap_WebPageSendRequestCallback cb
mk_WebPageSendRequestCallback cb' >>= B.GClosure.newGClosure
wrap_WebPageSendRequestCallback ::
WebPageSendRequestCallback ->
C_WebPageSendRequestCallback
wrap_WebPageSendRequestCallback _cb _ request redirectedResponse _ = do
request' <- (newObject WebKit2WebExtension.URIRequest.URIRequest) request
redirectedResponse' <- (newObject WebKit2WebExtension.URIResponse.URIResponse) redirectedResponse
result <- _cb request' redirectedResponse'
let result' = (fromIntegral . fromEnum) result
return result'
onWebPageSendRequest :: (IsWebPage a, MonadIO m) => a -> WebPageSendRequestCallback -> m SignalHandlerId
onWebPageSendRequest obj cb = liftIO $ do
let cb' = wrap_WebPageSendRequestCallback cb
cb'' <- mk_WebPageSendRequestCallback cb'
connectSignalFunPtr obj "send-request" cb'' SignalConnectBefore
afterWebPageSendRequest :: (IsWebPage a, MonadIO m) => a -> WebPageSendRequestCallback -> m SignalHandlerId
afterWebPageSendRequest obj cb = liftIO $ do
let cb' = wrap_WebPageSendRequestCallback cb
cb'' <- mk_WebPageSendRequestCallback cb'
connectSignalFunPtr obj "send-request" cb'' SignalConnectAfter
type WebPageWillSubmitFormCallback =
WebKit2WebExtension.DOMElement.DOMElement
-> WebKit2WebExtension.Enums.FormSubmissionStep
-> WebKit2WebExtension.Frame.Frame
-> WebKit2WebExtension.Frame.Frame
-> [T.Text]
-> [T.Text]
-> IO ()
noWebPageWillSubmitFormCallback :: Maybe WebPageWillSubmitFormCallback
noWebPageWillSubmitFormCallback = Nothing
type C_WebPageWillSubmitFormCallback =
Ptr () ->
Ptr WebKit2WebExtension.DOMElement.DOMElement ->
CUInt ->
Ptr WebKit2WebExtension.Frame.Frame ->
Ptr WebKit2WebExtension.Frame.Frame ->
Ptr (GPtrArray CString) ->
Ptr (GPtrArray CString) ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_WebPageWillSubmitFormCallback :: C_WebPageWillSubmitFormCallback -> IO (FunPtr C_WebPageWillSubmitFormCallback)
genClosure_WebPageWillSubmitForm :: MonadIO m => WebPageWillSubmitFormCallback -> m (GClosure C_WebPageWillSubmitFormCallback)
genClosure_WebPageWillSubmitForm cb = liftIO $ do
let cb' = wrap_WebPageWillSubmitFormCallback cb
mk_WebPageWillSubmitFormCallback cb' >>= B.GClosure.newGClosure
wrap_WebPageWillSubmitFormCallback ::
WebPageWillSubmitFormCallback ->
C_WebPageWillSubmitFormCallback
wrap_WebPageWillSubmitFormCallback _cb _ form step sourceFrame targetFrame textFieldNames textFieldValues _ = do
form' <- (newObject WebKit2WebExtension.DOMElement.DOMElement) form
let step' = (toEnum . fromIntegral) step
sourceFrame' <- (newObject WebKit2WebExtension.Frame.Frame) sourceFrame
targetFrame' <- (newObject WebKit2WebExtension.Frame.Frame) targetFrame
textFieldNames' <- unpackGPtrArray textFieldNames
textFieldNames'' <- mapM cstringToText textFieldNames'
textFieldValues' <- unpackGPtrArray textFieldValues
textFieldValues'' <- mapM cstringToText textFieldValues'
_cb form' step' sourceFrame' targetFrame' textFieldNames'' textFieldValues''
onWebPageWillSubmitForm :: (IsWebPage a, MonadIO m) => a -> WebPageWillSubmitFormCallback -> m SignalHandlerId
onWebPageWillSubmitForm obj cb = liftIO $ do
let cb' = wrap_WebPageWillSubmitFormCallback cb
cb'' <- mk_WebPageWillSubmitFormCallback cb'
connectSignalFunPtr obj "will-submit-form" cb'' SignalConnectBefore
afterWebPageWillSubmitForm :: (IsWebPage a, MonadIO m) => a -> WebPageWillSubmitFormCallback -> m SignalHandlerId
afterWebPageWillSubmitForm obj cb = liftIO $ do
let cb' = wrap_WebPageWillSubmitFormCallback cb
cb'' <- mk_WebPageWillSubmitFormCallback cb'
connectSignalFunPtr obj "will-submit-form" cb'' SignalConnectAfter
getWebPageUri :: (MonadIO m, IsWebPage o) => o -> m (Maybe T.Text)
getWebPageUri obj = liftIO $ B.Properties.getObjectPropertyString obj "uri"
#if ENABLE_OVERLOADING
data WebPageUriPropertyInfo
instance AttrInfo WebPageUriPropertyInfo where
type AttrAllowedOps WebPageUriPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint WebPageUriPropertyInfo = (~) ()
type AttrBaseTypeConstraint WebPageUriPropertyInfo = IsWebPage
type AttrGetType WebPageUriPropertyInfo = (Maybe T.Text)
type AttrLabel WebPageUriPropertyInfo = "uri"
type AttrOrigin WebPageUriPropertyInfo = WebPage
attrGet _ = getWebPageUri
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList WebPage
type instance O.AttributeList WebPage = WebPageAttributeList
type WebPageAttributeList = ('[ '("uri", WebPageUriPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
webPageUri :: AttrLabelProxy "uri"
webPageUri = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
data WebPageConsoleMessageSentSignalInfo
instance SignalInfo WebPageConsoleMessageSentSignalInfo where
type HaskellCallbackType WebPageConsoleMessageSentSignalInfo = WebPageConsoleMessageSentCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_WebPageConsoleMessageSentCallback cb
cb'' <- mk_WebPageConsoleMessageSentCallback cb'
connectSignalFunPtr obj "console-message-sent" cb'' connectMode
data WebPageContextMenuSignalInfo
instance SignalInfo WebPageContextMenuSignalInfo where
type HaskellCallbackType WebPageContextMenuSignalInfo = WebPageContextMenuCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_WebPageContextMenuCallback cb
cb'' <- mk_WebPageContextMenuCallback cb'
connectSignalFunPtr obj "context-menu" cb'' connectMode
data WebPageDocumentLoadedSignalInfo
instance SignalInfo WebPageDocumentLoadedSignalInfo where
type HaskellCallbackType WebPageDocumentLoadedSignalInfo = WebPageDocumentLoadedCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_WebPageDocumentLoadedCallback cb
cb'' <- mk_WebPageDocumentLoadedCallback cb'
connectSignalFunPtr obj "document-loaded" cb'' connectMode
data WebPageFormControlsAssociatedSignalInfo
instance SignalInfo WebPageFormControlsAssociatedSignalInfo where
type HaskellCallbackType WebPageFormControlsAssociatedSignalInfo = WebPageFormControlsAssociatedCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_WebPageFormControlsAssociatedCallback cb
cb'' <- mk_WebPageFormControlsAssociatedCallback cb'
connectSignalFunPtr obj "form-controls-associated" cb'' connectMode
data WebPageSendRequestSignalInfo
instance SignalInfo WebPageSendRequestSignalInfo where
type HaskellCallbackType WebPageSendRequestSignalInfo = WebPageSendRequestCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_WebPageSendRequestCallback cb
cb'' <- mk_WebPageSendRequestCallback cb'
connectSignalFunPtr obj "send-request" cb'' connectMode
data WebPageWillSubmitFormSignalInfo
instance SignalInfo WebPageWillSubmitFormSignalInfo where
type HaskellCallbackType WebPageWillSubmitFormSignalInfo = WebPageWillSubmitFormCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_WebPageWillSubmitFormCallback cb
cb'' <- mk_WebPageWillSubmitFormCallback cb'
connectSignalFunPtr obj "will-submit-form" cb'' connectMode
type instance O.SignalList WebPage = WebPageSignalList
type WebPageSignalList = ('[ '("consoleMessageSent", WebPageConsoleMessageSentSignalInfo), '("contextMenu", WebPageContextMenuSignalInfo), '("documentLoaded", WebPageDocumentLoadedSignalInfo), '("formControlsAssociated", WebPageFormControlsAssociatedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("sendRequest", WebPageSendRequestSignalInfo), '("willSubmitForm", WebPageWillSubmitFormSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "webkit_web_page_get_dom_document" webkit_web_page_get_dom_document ::
Ptr WebPage ->
IO (Ptr WebKit2WebExtension.DOMDocument.DOMDocument)
webPageGetDomDocument ::
(B.CallStack.HasCallStack, MonadIO m, IsWebPage a) =>
a
-> m (Maybe WebKit2WebExtension.DOMDocument.DOMDocument)
webPageGetDomDocument webPage = liftIO $ do
webPage' <- unsafeManagedPtrCastPtr webPage
result <- webkit_web_page_get_dom_document webPage'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject WebKit2WebExtension.DOMDocument.DOMDocument) result'
return result''
touchManagedPtr webPage
return maybeResult
#if ENABLE_OVERLOADING
data WebPageGetDomDocumentMethodInfo
instance (signature ~ (m (Maybe WebKit2WebExtension.DOMDocument.DOMDocument)), MonadIO m, IsWebPage a) => O.MethodInfo WebPageGetDomDocumentMethodInfo a signature where
overloadedMethod _ = webPageGetDomDocument
#endif
foreign import ccall "webkit_web_page_get_editor" webkit_web_page_get_editor ::
Ptr WebPage ->
IO (Ptr WebKit2WebExtension.WebEditor.WebEditor)
webPageGetEditor ::
(B.CallStack.HasCallStack, MonadIO m, IsWebPage a) =>
a
-> m WebKit2WebExtension.WebEditor.WebEditor
webPageGetEditor webPage = liftIO $ do
webPage' <- unsafeManagedPtrCastPtr webPage
result <- webkit_web_page_get_editor webPage'
checkUnexpectedReturnNULL "webPageGetEditor" result
result' <- (newObject WebKit2WebExtension.WebEditor.WebEditor) result
touchManagedPtr webPage
return result'
#if ENABLE_OVERLOADING
data WebPageGetEditorMethodInfo
instance (signature ~ (m WebKit2WebExtension.WebEditor.WebEditor), MonadIO m, IsWebPage a) => O.MethodInfo WebPageGetEditorMethodInfo a signature where
overloadedMethod _ = webPageGetEditor
#endif
foreign import ccall "webkit_web_page_get_id" webkit_web_page_get_id ::
Ptr WebPage ->
IO Word64
webPageGetId ::
(B.CallStack.HasCallStack, MonadIO m, IsWebPage a) =>
a
-> m Word64
webPageGetId webPage = liftIO $ do
webPage' <- unsafeManagedPtrCastPtr webPage
result <- webkit_web_page_get_id webPage'
touchManagedPtr webPage
return result
#if ENABLE_OVERLOADING
data WebPageGetIdMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsWebPage a) => O.MethodInfo WebPageGetIdMethodInfo a signature where
overloadedMethod _ = webPageGetId
#endif
foreign import ccall "webkit_web_page_get_main_frame" webkit_web_page_get_main_frame ::
Ptr WebPage ->
IO (Ptr WebKit2WebExtension.Frame.Frame)
webPageGetMainFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsWebPage a) =>
a
-> m WebKit2WebExtension.Frame.Frame
webPageGetMainFrame webPage = liftIO $ do
webPage' <- unsafeManagedPtrCastPtr webPage
result <- webkit_web_page_get_main_frame webPage'
checkUnexpectedReturnNULL "webPageGetMainFrame" result
result' <- (newObject WebKit2WebExtension.Frame.Frame) result
touchManagedPtr webPage
return result'
#if ENABLE_OVERLOADING
data WebPageGetMainFrameMethodInfo
instance (signature ~ (m WebKit2WebExtension.Frame.Frame), MonadIO m, IsWebPage a) => O.MethodInfo WebPageGetMainFrameMethodInfo a signature where
overloadedMethod _ = webPageGetMainFrame
#endif
foreign import ccall "webkit_web_page_get_uri" webkit_web_page_get_uri ::
Ptr WebPage ->
IO CString
webPageGetUri ::
(B.CallStack.HasCallStack, MonadIO m, IsWebPage a) =>
a
-> m (Maybe T.Text)
webPageGetUri webPage = liftIO $ do
webPage' <- unsafeManagedPtrCastPtr webPage
result <- webkit_web_page_get_uri webPage'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- cstringToText result'
return result''
touchManagedPtr webPage
return maybeResult
#if ENABLE_OVERLOADING
data WebPageGetUriMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsWebPage a) => O.MethodInfo WebPageGetUriMethodInfo a signature where
overloadedMethod _ = webPageGetUri
#endif