module GI.WebKit2.Objects.WebInspector
(
WebInspector(..) ,
WebInspectorK ,
toWebInspector ,
noWebInspector ,
webInspectorAttach ,
webInspectorClose ,
webInspectorDetach ,
webInspectorGetAttachedHeight ,
webInspectorGetCanAttach ,
webInspectorGetInspectedUri ,
webInspectorGetWebView ,
webInspectorIsAttached ,
webInspectorShow ,
WebInspectorAttachedHeightPropertyInfo ,
getWebInspectorAttachedHeight ,
WebInspectorCanAttachPropertyInfo ,
getWebInspectorCanAttach ,
WebInspectorInspectedUriPropertyInfo ,
getWebInspectorInspectedUri ,
WebInspectorAttachCallback ,
WebInspectorAttachCallbackC ,
WebInspectorAttachSignalInfo ,
afterWebInspectorAttach ,
mkWebInspectorAttachCallback ,
noWebInspectorAttachCallback ,
onWebInspectorAttach ,
webInspectorAttachCallbackWrapper ,
webInspectorAttachClosure ,
WebInspectorBringToFrontCallback ,
WebInspectorBringToFrontCallbackC ,
WebInspectorBringToFrontSignalInfo ,
afterWebInspectorBringToFront ,
mkWebInspectorBringToFrontCallback ,
noWebInspectorBringToFrontCallback ,
onWebInspectorBringToFront ,
webInspectorBringToFrontCallbackWrapper ,
webInspectorBringToFrontClosure ,
WebInspectorClosedCallback ,
WebInspectorClosedCallbackC ,
WebInspectorClosedSignalInfo ,
afterWebInspectorClosed ,
mkWebInspectorClosedCallback ,
noWebInspectorClosedCallback ,
onWebInspectorClosed ,
webInspectorClosedCallbackWrapper ,
webInspectorClosedClosure ,
WebInspectorDetachCallback ,
WebInspectorDetachCallbackC ,
WebInspectorDetachSignalInfo ,
afterWebInspectorDetach ,
mkWebInspectorDetachCallback ,
noWebInspectorDetachCallback ,
onWebInspectorDetach ,
webInspectorDetachCallbackWrapper ,
webInspectorDetachClosure ,
WebInspectorOpenWindowCallback ,
WebInspectorOpenWindowCallbackC ,
WebInspectorOpenWindowSignalInfo ,
afterWebInspectorOpenWindow ,
mkWebInspectorOpenWindowCallback ,
noWebInspectorOpenWindowCallback ,
onWebInspectorOpenWindow ,
webInspectorOpenWindowCallbackWrapper ,
webInspectorOpenWindowClosure ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.WebKit2.Types
import GI.WebKit2.Callbacks
import qualified GI.GObject as GObject
newtype WebInspector = WebInspector (ForeignPtr WebInspector)
foreign import ccall "webkit_web_inspector_get_type"
c_webkit_web_inspector_get_type :: IO GType
type instance ParentTypes WebInspector = WebInspectorParentTypes
type WebInspectorParentTypes = '[GObject.Object]
instance GObject WebInspector where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_webkit_web_inspector_get_type
class GObject o => WebInspectorK o
instance (GObject o, IsDescendantOf WebInspector o) => WebInspectorK o
toWebInspector :: WebInspectorK o => o -> IO WebInspector
toWebInspector = unsafeCastTo WebInspector
noWebInspector :: Maybe WebInspector
noWebInspector = Nothing
type WebInspectorAttachCallback =
IO Bool
noWebInspectorAttachCallback :: Maybe WebInspectorAttachCallback
noWebInspectorAttachCallback = Nothing
type WebInspectorAttachCallbackC =
Ptr () ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mkWebInspectorAttachCallback :: WebInspectorAttachCallbackC -> IO (FunPtr WebInspectorAttachCallbackC)
webInspectorAttachClosure :: WebInspectorAttachCallback -> IO Closure
webInspectorAttachClosure cb = newCClosure =<< mkWebInspectorAttachCallback wrapped
where wrapped = webInspectorAttachCallbackWrapper cb
webInspectorAttachCallbackWrapper ::
WebInspectorAttachCallback ->
Ptr () ->
Ptr () ->
IO CInt
webInspectorAttachCallbackWrapper _cb _ _ = do
result <- _cb
let result' = (fromIntegral . fromEnum) result
return result'
onWebInspectorAttach :: (GObject a, MonadIO m) => a -> WebInspectorAttachCallback -> m SignalHandlerId
onWebInspectorAttach obj cb = liftIO $ connectWebInspectorAttach obj cb SignalConnectBefore
afterWebInspectorAttach :: (GObject a, MonadIO m) => a -> WebInspectorAttachCallback -> m SignalHandlerId
afterWebInspectorAttach obj cb = connectWebInspectorAttach obj cb SignalConnectAfter
connectWebInspectorAttach :: (GObject a, MonadIO m) =>
a -> WebInspectorAttachCallback -> SignalConnectMode -> m SignalHandlerId
connectWebInspectorAttach obj cb after = liftIO $ do
cb' <- mkWebInspectorAttachCallback (webInspectorAttachCallbackWrapper cb)
connectSignalFunPtr obj "attach" cb' after
type WebInspectorBringToFrontCallback =
IO Bool
noWebInspectorBringToFrontCallback :: Maybe WebInspectorBringToFrontCallback
noWebInspectorBringToFrontCallback = Nothing
type WebInspectorBringToFrontCallbackC =
Ptr () ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mkWebInspectorBringToFrontCallback :: WebInspectorBringToFrontCallbackC -> IO (FunPtr WebInspectorBringToFrontCallbackC)
webInspectorBringToFrontClosure :: WebInspectorBringToFrontCallback -> IO Closure
webInspectorBringToFrontClosure cb = newCClosure =<< mkWebInspectorBringToFrontCallback wrapped
where wrapped = webInspectorBringToFrontCallbackWrapper cb
webInspectorBringToFrontCallbackWrapper ::
WebInspectorBringToFrontCallback ->
Ptr () ->
Ptr () ->
IO CInt
webInspectorBringToFrontCallbackWrapper _cb _ _ = do
result <- _cb
let result' = (fromIntegral . fromEnum) result
return result'
onWebInspectorBringToFront :: (GObject a, MonadIO m) => a -> WebInspectorBringToFrontCallback -> m SignalHandlerId
onWebInspectorBringToFront obj cb = liftIO $ connectWebInspectorBringToFront obj cb SignalConnectBefore
afterWebInspectorBringToFront :: (GObject a, MonadIO m) => a -> WebInspectorBringToFrontCallback -> m SignalHandlerId
afterWebInspectorBringToFront obj cb = connectWebInspectorBringToFront obj cb SignalConnectAfter
connectWebInspectorBringToFront :: (GObject a, MonadIO m) =>
a -> WebInspectorBringToFrontCallback -> SignalConnectMode -> m SignalHandlerId
connectWebInspectorBringToFront obj cb after = liftIO $ do
cb' <- mkWebInspectorBringToFrontCallback (webInspectorBringToFrontCallbackWrapper cb)
connectSignalFunPtr obj "bring-to-front" cb' after
type WebInspectorClosedCallback =
IO ()
noWebInspectorClosedCallback :: Maybe WebInspectorClosedCallback
noWebInspectorClosedCallback = Nothing
type WebInspectorClosedCallbackC =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mkWebInspectorClosedCallback :: WebInspectorClosedCallbackC -> IO (FunPtr WebInspectorClosedCallbackC)
webInspectorClosedClosure :: WebInspectorClosedCallback -> IO Closure
webInspectorClosedClosure cb = newCClosure =<< mkWebInspectorClosedCallback wrapped
where wrapped = webInspectorClosedCallbackWrapper cb
webInspectorClosedCallbackWrapper ::
WebInspectorClosedCallback ->
Ptr () ->
Ptr () ->
IO ()
webInspectorClosedCallbackWrapper _cb _ _ = do
_cb
onWebInspectorClosed :: (GObject a, MonadIO m) => a -> WebInspectorClosedCallback -> m SignalHandlerId
onWebInspectorClosed obj cb = liftIO $ connectWebInspectorClosed obj cb SignalConnectBefore
afterWebInspectorClosed :: (GObject a, MonadIO m) => a -> WebInspectorClosedCallback -> m SignalHandlerId
afterWebInspectorClosed obj cb = connectWebInspectorClosed obj cb SignalConnectAfter
connectWebInspectorClosed :: (GObject a, MonadIO m) =>
a -> WebInspectorClosedCallback -> SignalConnectMode -> m SignalHandlerId
connectWebInspectorClosed obj cb after = liftIO $ do
cb' <- mkWebInspectorClosedCallback (webInspectorClosedCallbackWrapper cb)
connectSignalFunPtr obj "closed" cb' after
type WebInspectorDetachCallback =
IO Bool
noWebInspectorDetachCallback :: Maybe WebInspectorDetachCallback
noWebInspectorDetachCallback = Nothing
type WebInspectorDetachCallbackC =
Ptr () ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mkWebInspectorDetachCallback :: WebInspectorDetachCallbackC -> IO (FunPtr WebInspectorDetachCallbackC)
webInspectorDetachClosure :: WebInspectorDetachCallback -> IO Closure
webInspectorDetachClosure cb = newCClosure =<< mkWebInspectorDetachCallback wrapped
where wrapped = webInspectorDetachCallbackWrapper cb
webInspectorDetachCallbackWrapper ::
WebInspectorDetachCallback ->
Ptr () ->
Ptr () ->
IO CInt
webInspectorDetachCallbackWrapper _cb _ _ = do
result <- _cb
let result' = (fromIntegral . fromEnum) result
return result'
onWebInspectorDetach :: (GObject a, MonadIO m) => a -> WebInspectorDetachCallback -> m SignalHandlerId
onWebInspectorDetach obj cb = liftIO $ connectWebInspectorDetach obj cb SignalConnectBefore
afterWebInspectorDetach :: (GObject a, MonadIO m) => a -> WebInspectorDetachCallback -> m SignalHandlerId
afterWebInspectorDetach obj cb = connectWebInspectorDetach obj cb SignalConnectAfter
connectWebInspectorDetach :: (GObject a, MonadIO m) =>
a -> WebInspectorDetachCallback -> SignalConnectMode -> m SignalHandlerId
connectWebInspectorDetach obj cb after = liftIO $ do
cb' <- mkWebInspectorDetachCallback (webInspectorDetachCallbackWrapper cb)
connectSignalFunPtr obj "detach" cb' after
type WebInspectorOpenWindowCallback =
IO Bool
noWebInspectorOpenWindowCallback :: Maybe WebInspectorOpenWindowCallback
noWebInspectorOpenWindowCallback = Nothing
type WebInspectorOpenWindowCallbackC =
Ptr () ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mkWebInspectorOpenWindowCallback :: WebInspectorOpenWindowCallbackC -> IO (FunPtr WebInspectorOpenWindowCallbackC)
webInspectorOpenWindowClosure :: WebInspectorOpenWindowCallback -> IO Closure
webInspectorOpenWindowClosure cb = newCClosure =<< mkWebInspectorOpenWindowCallback wrapped
where wrapped = webInspectorOpenWindowCallbackWrapper cb
webInspectorOpenWindowCallbackWrapper ::
WebInspectorOpenWindowCallback ->
Ptr () ->
Ptr () ->
IO CInt
webInspectorOpenWindowCallbackWrapper _cb _ _ = do
result <- _cb
let result' = (fromIntegral . fromEnum) result
return result'
onWebInspectorOpenWindow :: (GObject a, MonadIO m) => a -> WebInspectorOpenWindowCallback -> m SignalHandlerId
onWebInspectorOpenWindow obj cb = liftIO $ connectWebInspectorOpenWindow obj cb SignalConnectBefore
afterWebInspectorOpenWindow :: (GObject a, MonadIO m) => a -> WebInspectorOpenWindowCallback -> m SignalHandlerId
afterWebInspectorOpenWindow obj cb = connectWebInspectorOpenWindow obj cb SignalConnectAfter
connectWebInspectorOpenWindow :: (GObject a, MonadIO m) =>
a -> WebInspectorOpenWindowCallback -> SignalConnectMode -> m SignalHandlerId
connectWebInspectorOpenWindow obj cb after = liftIO $ do
cb' <- mkWebInspectorOpenWindowCallback (webInspectorOpenWindowCallbackWrapper cb)
connectSignalFunPtr obj "open-window" cb' after
getWebInspectorAttachedHeight :: (MonadIO m, WebInspectorK o) => o -> m Word32
getWebInspectorAttachedHeight obj = liftIO $ getObjectPropertyCUInt obj "attached-height"
data WebInspectorAttachedHeightPropertyInfo
instance AttrInfo WebInspectorAttachedHeightPropertyInfo where
type AttrAllowedOps WebInspectorAttachedHeightPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint WebInspectorAttachedHeightPropertyInfo = (~) ()
type AttrBaseTypeConstraint WebInspectorAttachedHeightPropertyInfo = WebInspectorK
type AttrGetType WebInspectorAttachedHeightPropertyInfo = Word32
type AttrLabel WebInspectorAttachedHeightPropertyInfo = "WebInspector::attached-height"
attrGet _ = getWebInspectorAttachedHeight
attrSet _ = undefined
attrConstruct _ = undefined
getWebInspectorCanAttach :: (MonadIO m, WebInspectorK o) => o -> m Bool
getWebInspectorCanAttach obj = liftIO $ getObjectPropertyBool obj "can-attach"
data WebInspectorCanAttachPropertyInfo
instance AttrInfo WebInspectorCanAttachPropertyInfo where
type AttrAllowedOps WebInspectorCanAttachPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint WebInspectorCanAttachPropertyInfo = (~) ()
type AttrBaseTypeConstraint WebInspectorCanAttachPropertyInfo = WebInspectorK
type AttrGetType WebInspectorCanAttachPropertyInfo = Bool
type AttrLabel WebInspectorCanAttachPropertyInfo = "WebInspector::can-attach"
attrGet _ = getWebInspectorCanAttach
attrSet _ = undefined
attrConstruct _ = undefined
getWebInspectorInspectedUri :: (MonadIO m, WebInspectorK o) => o -> m T.Text
getWebInspectorInspectedUri obj = liftIO $ getObjectPropertyString obj "inspected-uri"
data WebInspectorInspectedUriPropertyInfo
instance AttrInfo WebInspectorInspectedUriPropertyInfo where
type AttrAllowedOps WebInspectorInspectedUriPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint WebInspectorInspectedUriPropertyInfo = (~) ()
type AttrBaseTypeConstraint WebInspectorInspectedUriPropertyInfo = WebInspectorK
type AttrGetType WebInspectorInspectedUriPropertyInfo = T.Text
type AttrLabel WebInspectorInspectedUriPropertyInfo = "WebInspector::inspected-uri"
attrGet _ = getWebInspectorInspectedUri
attrSet _ = undefined
attrConstruct _ = undefined
type instance AttributeList WebInspector = WebInspectorAttributeList
type WebInspectorAttributeList = ('[ '("attached-height", WebInspectorAttachedHeightPropertyInfo), '("can-attach", WebInspectorCanAttachPropertyInfo), '("inspected-uri", WebInspectorInspectedUriPropertyInfo)] :: [(Symbol, *)])
data WebInspectorAttachSignalInfo
instance SignalInfo WebInspectorAttachSignalInfo where
type HaskellCallbackType WebInspectorAttachSignalInfo = WebInspectorAttachCallback
connectSignal _ = connectWebInspectorAttach
data WebInspectorBringToFrontSignalInfo
instance SignalInfo WebInspectorBringToFrontSignalInfo where
type HaskellCallbackType WebInspectorBringToFrontSignalInfo = WebInspectorBringToFrontCallback
connectSignal _ = connectWebInspectorBringToFront
data WebInspectorClosedSignalInfo
instance SignalInfo WebInspectorClosedSignalInfo where
type HaskellCallbackType WebInspectorClosedSignalInfo = WebInspectorClosedCallback
connectSignal _ = connectWebInspectorClosed
data WebInspectorDetachSignalInfo
instance SignalInfo WebInspectorDetachSignalInfo where
type HaskellCallbackType WebInspectorDetachSignalInfo = WebInspectorDetachCallback
connectSignal _ = connectWebInspectorDetach
data WebInspectorOpenWindowSignalInfo
instance SignalInfo WebInspectorOpenWindowSignalInfo where
type HaskellCallbackType WebInspectorOpenWindowSignalInfo = WebInspectorOpenWindowCallback
connectSignal _ = connectWebInspectorOpenWindow
type instance SignalList WebInspector = WebInspectorSignalList
type WebInspectorSignalList = ('[ '("attach", WebInspectorAttachSignalInfo), '("bring-to-front", WebInspectorBringToFrontSignalInfo), '("closed", WebInspectorClosedSignalInfo), '("detach", WebInspectorDetachSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("open-window", WebInspectorOpenWindowSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "webkit_web_inspector_attach" webkit_web_inspector_attach ::
Ptr WebInspector ->
IO ()
webInspectorAttach ::
(MonadIO m, WebInspectorK a) =>
a ->
m ()
webInspectorAttach _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
webkit_web_inspector_attach _obj'
touchManagedPtr _obj
return ()
foreign import ccall "webkit_web_inspector_close" webkit_web_inspector_close ::
Ptr WebInspector ->
IO ()
webInspectorClose ::
(MonadIO m, WebInspectorK a) =>
a ->
m ()
webInspectorClose _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
webkit_web_inspector_close _obj'
touchManagedPtr _obj
return ()
foreign import ccall "webkit_web_inspector_detach" webkit_web_inspector_detach ::
Ptr WebInspector ->
IO ()
webInspectorDetach ::
(MonadIO m, WebInspectorK a) =>
a ->
m ()
webInspectorDetach _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
webkit_web_inspector_detach _obj'
touchManagedPtr _obj
return ()
foreign import ccall "webkit_web_inspector_get_attached_height" webkit_web_inspector_get_attached_height ::
Ptr WebInspector ->
IO Word32
webInspectorGetAttachedHeight ::
(MonadIO m, WebInspectorK a) =>
a ->
m Word32
webInspectorGetAttachedHeight _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_web_inspector_get_attached_height _obj'
touchManagedPtr _obj
return result
foreign import ccall "webkit_web_inspector_get_can_attach" webkit_web_inspector_get_can_attach ::
Ptr WebInspector ->
IO CInt
webInspectorGetCanAttach ::
(MonadIO m, WebInspectorK a) =>
a ->
m Bool
webInspectorGetCanAttach _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_web_inspector_get_can_attach _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_web_inspector_get_inspected_uri" webkit_web_inspector_get_inspected_uri ::
Ptr WebInspector ->
IO CString
webInspectorGetInspectedUri ::
(MonadIO m, WebInspectorK a) =>
a ->
m T.Text
webInspectorGetInspectedUri _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_web_inspector_get_inspected_uri _obj'
checkUnexpectedReturnNULL "webkit_web_inspector_get_inspected_uri" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_web_inspector_get_web_view" webkit_web_inspector_get_web_view ::
Ptr WebInspector ->
IO (Ptr WebViewBase)
webInspectorGetWebView ::
(MonadIO m, WebInspectorK a) =>
a ->
m WebViewBase
webInspectorGetWebView _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_web_inspector_get_web_view _obj'
checkUnexpectedReturnNULL "webkit_web_inspector_get_web_view" result
result' <- (newObject WebViewBase) result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_web_inspector_is_attached" webkit_web_inspector_is_attached ::
Ptr WebInspector ->
IO CInt
webInspectorIsAttached ::
(MonadIO m, WebInspectorK a) =>
a ->
m Bool
webInspectorIsAttached _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_web_inspector_is_attached _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_web_inspector_show" webkit_web_inspector_show ::
Ptr WebInspector ->
IO ()
webInspectorShow ::
(MonadIO m, WebInspectorK a) =>
a ->
m ()
webInspectorShow _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
webkit_web_inspector_show _obj'
touchManagedPtr _obj
return ()