{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)

/No description available in the introspection data./
-}

#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
       && !defined(__HADDOCK_VERSION__))

module GI.WebKit2.Objects.WebInspector
    (

-- * Exported types
    WebInspector(..)                        ,
    IsWebInspector                          ,
    toWebInspector                          ,
    noWebInspector                          ,


 -- * Methods
-- ** attach #method:attach#

#if ENABLE_OVERLOADING
    WebInspectorAttachMethodInfo            ,
#endif
    webInspectorAttach                      ,


-- ** close #method:close#

#if ENABLE_OVERLOADING
    WebInspectorCloseMethodInfo             ,
#endif
    webInspectorClose                       ,


-- ** detach #method:detach#

#if ENABLE_OVERLOADING
    WebInspectorDetachMethodInfo            ,
#endif
    webInspectorDetach                      ,


-- ** getAttachedHeight #method:getAttachedHeight#

#if ENABLE_OVERLOADING
    WebInspectorGetAttachedHeightMethodInfo ,
#endif
    webInspectorGetAttachedHeight           ,


-- ** getCanAttach #method:getCanAttach#

#if ENABLE_OVERLOADING
    WebInspectorGetCanAttachMethodInfo      ,
#endif
    webInspectorGetCanAttach                ,


-- ** getInspectedUri #method:getInspectedUri#

#if ENABLE_OVERLOADING
    WebInspectorGetInspectedUriMethodInfo   ,
#endif
    webInspectorGetInspectedUri             ,


-- ** getWebView #method:getWebView#

#if ENABLE_OVERLOADING
    WebInspectorGetWebViewMethodInfo        ,
#endif
    webInspectorGetWebView                  ,


-- ** isAttached #method:isAttached#

#if ENABLE_OVERLOADING
    WebInspectorIsAttachedMethodInfo        ,
#endif
    webInspectorIsAttached                  ,


-- ** show #method:show#

#if ENABLE_OVERLOADING
    WebInspectorShowMethodInfo              ,
#endif
    webInspectorShow                        ,




 -- * Properties
-- ** attachedHeight #attr:attachedHeight#
{- | The height that the inspector view should have when it is attached.
-}
#if ENABLE_OVERLOADING
    WebInspectorAttachedHeightPropertyInfo  ,
#endif
    getWebInspectorAttachedHeight           ,
#if ENABLE_OVERLOADING
    webInspectorAttachedHeight              ,
#endif


-- ** canAttach #attr:canAttach#
{- | Whether the /@inspector@/ can be attached to the same window that contains
the inspected view.

/Since: 2.8/
-}
#if ENABLE_OVERLOADING
    WebInspectorCanAttachPropertyInfo       ,
#endif
    getWebInspectorCanAttach                ,
#if ENABLE_OVERLOADING
    webInspectorCanAttach                   ,
#endif


-- ** inspectedUri #attr:inspectedUri#
{- | The URI that is currently being inspected.
-}
#if ENABLE_OVERLOADING
    WebInspectorInspectedUriPropertyInfo    ,
#endif
    getWebInspectorInspectedUri             ,
#if ENABLE_OVERLOADING
    webInspectorInspectedUri                ,
#endif




 -- * Signals
-- ** attach #signal:attach#

    C_WebInspectorAttachCallback            ,
    WebInspectorAttachCallback              ,
#if ENABLE_OVERLOADING
    WebInspectorAttachSignalInfo            ,
#endif
    afterWebInspectorAttach                 ,
    genClosure_WebInspectorAttach           ,
    mk_WebInspectorAttachCallback           ,
    noWebInspectorAttachCallback            ,
    onWebInspectorAttach                    ,
    wrap_WebInspectorAttachCallback         ,


-- ** bringToFront #signal:bringToFront#

    C_WebInspectorBringToFrontCallback      ,
    WebInspectorBringToFrontCallback        ,
#if ENABLE_OVERLOADING
    WebInspectorBringToFrontSignalInfo      ,
#endif
    afterWebInspectorBringToFront           ,
    genClosure_WebInspectorBringToFront     ,
    mk_WebInspectorBringToFrontCallback     ,
    noWebInspectorBringToFrontCallback      ,
    onWebInspectorBringToFront              ,
    wrap_WebInspectorBringToFrontCallback   ,


-- ** closed #signal:closed#

    C_WebInspectorClosedCallback            ,
    WebInspectorClosedCallback              ,
#if ENABLE_OVERLOADING
    WebInspectorClosedSignalInfo            ,
#endif
    afterWebInspectorClosed                 ,
    genClosure_WebInspectorClosed           ,
    mk_WebInspectorClosedCallback           ,
    noWebInspectorClosedCallback            ,
    onWebInspectorClosed                    ,
    wrap_WebInspectorClosedCallback         ,


-- ** detach #signal:detach#

    C_WebInspectorDetachCallback            ,
    WebInspectorDetachCallback              ,
#if ENABLE_OVERLOADING
    WebInspectorDetachSignalInfo            ,
#endif
    afterWebInspectorDetach                 ,
    genClosure_WebInspectorDetach           ,
    mk_WebInspectorDetachCallback           ,
    noWebInspectorDetachCallback            ,
    onWebInspectorDetach                    ,
    wrap_WebInspectorDetachCallback         ,


-- ** openWindow #signal:openWindow#

    C_WebInspectorOpenWindowCallback        ,
    WebInspectorOpenWindowCallback          ,
#if ENABLE_OVERLOADING
    WebInspectorOpenWindowSignalInfo        ,
#endif
    afterWebInspectorOpenWindow             ,
    genClosure_WebInspectorOpenWindow       ,
    mk_WebInspectorOpenWindowCallback       ,
    noWebInspectorOpenWindowCallback        ,
    onWebInspectorOpenWindow                ,
    wrap_WebInspectorOpenWindowCallback     ,




    ) 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.WebKit2.Objects.WebViewBase as WebKit2.WebViewBase

-- | Memory-managed wrapper type.
newtype WebInspector = WebInspector (ManagedPtr WebInspector)
foreign import ccall "webkit_web_inspector_get_type"
    c_webkit_web_inspector_get_type :: IO GType

instance GObject WebInspector where
    gobjectType = c_webkit_web_inspector_get_type


-- | Type class for types which can be safely cast to `WebInspector`, for instance with `toWebInspector`.
class (GObject o, O.IsDescendantOf WebInspector o) => IsWebInspector o
instance (GObject o, O.IsDescendantOf WebInspector o) => IsWebInspector o

instance O.HasParentTypes WebInspector
type instance O.ParentTypes WebInspector = '[GObject.Object.Object]

-- | Cast to `WebInspector`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toWebInspector :: (MonadIO m, IsWebInspector o) => o -> m WebInspector
toWebInspector = liftIO . unsafeCastTo WebInspector

-- | A convenience alias for `Nothing` :: `Maybe` `WebInspector`.
noWebInspector :: Maybe WebInspector
noWebInspector = Nothing

#if ENABLE_OVERLOADING
type family ResolveWebInspectorMethod (t :: Symbol) (o :: *) :: * where
    ResolveWebInspectorMethod "attach" o = WebInspectorAttachMethodInfo
    ResolveWebInspectorMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveWebInspectorMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveWebInspectorMethod "close" o = WebInspectorCloseMethodInfo
    ResolveWebInspectorMethod "detach" o = WebInspectorDetachMethodInfo
    ResolveWebInspectorMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveWebInspectorMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveWebInspectorMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveWebInspectorMethod "isAttached" o = WebInspectorIsAttachedMethodInfo
    ResolveWebInspectorMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveWebInspectorMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveWebInspectorMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveWebInspectorMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveWebInspectorMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveWebInspectorMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveWebInspectorMethod "show" o = WebInspectorShowMethodInfo
    ResolveWebInspectorMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveWebInspectorMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveWebInspectorMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveWebInspectorMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveWebInspectorMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveWebInspectorMethod "getAttachedHeight" o = WebInspectorGetAttachedHeightMethodInfo
    ResolveWebInspectorMethod "getCanAttach" o = WebInspectorGetCanAttachMethodInfo
    ResolveWebInspectorMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveWebInspectorMethod "getInspectedUri" o = WebInspectorGetInspectedUriMethodInfo
    ResolveWebInspectorMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveWebInspectorMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveWebInspectorMethod "getWebView" o = WebInspectorGetWebViewMethodInfo
    ResolveWebInspectorMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveWebInspectorMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveWebInspectorMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveWebInspectorMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveWebInspectorMethod t WebInspector, O.MethodInfo info WebInspector p) => OL.IsLabel t (WebInspector -> 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

-- signal WebInspector::attach
{- |
Emitted when the inspector is requested to be attached to the window
where the inspected web view is.
If this signal is not handled the inspector view will be automatically
attached to the inspected view, so you only need to handle this signal
if you want to attach the inspector view yourself (for example, to add
the inspector view to a browser tab).

To prevent the inspector view from being attached you can connect to this
signal and simply return 'True'.
-}
type WebInspectorAttachCallback =
    IO Bool
    {- ^ __Returns:__ 'True' to stop other handlers from being invoked for the event.
   'False' to propagate the event further. -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebInspectorAttachCallback`@.
noWebInspectorAttachCallback :: Maybe WebInspectorAttachCallback
noWebInspectorAttachCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebInspectorAttachCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebInspectorAttachCallback`.
foreign import ccall "wrapper"
    mk_WebInspectorAttachCallback :: C_WebInspectorAttachCallback -> IO (FunPtr C_WebInspectorAttachCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebInspectorAttach :: MonadIO m => WebInspectorAttachCallback -> m (GClosure C_WebInspectorAttachCallback)
genClosure_WebInspectorAttach cb = liftIO $ do
    let cb' = wrap_WebInspectorAttachCallback cb
    mk_WebInspectorAttachCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `WebInspectorAttachCallback` into a `C_WebInspectorAttachCallback`.
wrap_WebInspectorAttachCallback ::
    WebInspectorAttachCallback ->
    C_WebInspectorAttachCallback
wrap_WebInspectorAttachCallback _cb _ _ = do
    result <- _cb
    let result' = (fromIntegral . fromEnum) result
    return result'


{- |
Connect a signal handler for the “@attach@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' webInspector #attach callback
@
-}
onWebInspectorAttach :: (IsWebInspector a, MonadIO m) => a -> WebInspectorAttachCallback -> m SignalHandlerId
onWebInspectorAttach obj cb = liftIO $ do
    let cb' = wrap_WebInspectorAttachCallback cb
    cb'' <- mk_WebInspectorAttachCallback cb'
    connectSignalFunPtr obj "attach" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@attach@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' webInspector #attach callback
@
-}
afterWebInspectorAttach :: (IsWebInspector a, MonadIO m) => a -> WebInspectorAttachCallback -> m SignalHandlerId
afterWebInspectorAttach obj cb = liftIO $ do
    let cb' = wrap_WebInspectorAttachCallback cb
    cb'' <- mk_WebInspectorAttachCallback cb'
    connectSignalFunPtr obj "attach" cb'' SignalConnectAfter


-- signal WebInspector::bring-to-front
{- |
Emitted when the inspector should be shown.

If the inspector is not attached the inspector window should be shown
on top of any other windows.
If the inspector is attached the inspector view should be made visible.
For example, if the inspector view is attached using a tab in a browser
window, the browser window should be raised and the tab containing the
inspector view should be the active one.
In both cases, if this signal is not handled, the default implementation
calls 'GI.Gtk.Objects.Window.windowPresent' on the current toplevel 'GI.Gtk.Objects.Window.Window' of the
inspector view.
-}
type WebInspectorBringToFrontCallback =
    IO Bool
    {- ^ __Returns:__ 'True' to stop other handlers from being invoked for the event.
   'False' to propagate the event further. -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebInspectorBringToFrontCallback`@.
noWebInspectorBringToFrontCallback :: Maybe WebInspectorBringToFrontCallback
noWebInspectorBringToFrontCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebInspectorBringToFrontCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebInspectorBringToFrontCallback`.
foreign import ccall "wrapper"
    mk_WebInspectorBringToFrontCallback :: C_WebInspectorBringToFrontCallback -> IO (FunPtr C_WebInspectorBringToFrontCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebInspectorBringToFront :: MonadIO m => WebInspectorBringToFrontCallback -> m (GClosure C_WebInspectorBringToFrontCallback)
genClosure_WebInspectorBringToFront cb = liftIO $ do
    let cb' = wrap_WebInspectorBringToFrontCallback cb
    mk_WebInspectorBringToFrontCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `WebInspectorBringToFrontCallback` into a `C_WebInspectorBringToFrontCallback`.
wrap_WebInspectorBringToFrontCallback ::
    WebInspectorBringToFrontCallback ->
    C_WebInspectorBringToFrontCallback
wrap_WebInspectorBringToFrontCallback _cb _ _ = do
    result <- _cb
    let result' = (fromIntegral . fromEnum) result
    return result'


{- |
Connect a signal handler for the “@bring-to-front@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' webInspector #bringToFront callback
@
-}
onWebInspectorBringToFront :: (IsWebInspector a, MonadIO m) => a -> WebInspectorBringToFrontCallback -> m SignalHandlerId
onWebInspectorBringToFront obj cb = liftIO $ do
    let cb' = wrap_WebInspectorBringToFrontCallback cb
    cb'' <- mk_WebInspectorBringToFrontCallback cb'
    connectSignalFunPtr obj "bring-to-front" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@bring-to-front@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' webInspector #bringToFront callback
@
-}
afterWebInspectorBringToFront :: (IsWebInspector a, MonadIO m) => a -> WebInspectorBringToFrontCallback -> m SignalHandlerId
afterWebInspectorBringToFront obj cb = liftIO $ do
    let cb' = wrap_WebInspectorBringToFrontCallback cb
    cb'' <- mk_WebInspectorBringToFrontCallback cb'
    connectSignalFunPtr obj "bring-to-front" cb'' SignalConnectAfter


-- signal WebInspector::closed
{- |
Emitted when the inspector page is closed. If you are using your own
inspector window, you should connect to this signal and destroy your
window.
-}
type WebInspectorClosedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebInspectorClosedCallback`@.
noWebInspectorClosedCallback :: Maybe WebInspectorClosedCallback
noWebInspectorClosedCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebInspectorClosedCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WebInspectorClosedCallback`.
foreign import ccall "wrapper"
    mk_WebInspectorClosedCallback :: C_WebInspectorClosedCallback -> IO (FunPtr C_WebInspectorClosedCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebInspectorClosed :: MonadIO m => WebInspectorClosedCallback -> m (GClosure C_WebInspectorClosedCallback)
genClosure_WebInspectorClosed cb = liftIO $ do
    let cb' = wrap_WebInspectorClosedCallback cb
    mk_WebInspectorClosedCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `WebInspectorClosedCallback` into a `C_WebInspectorClosedCallback`.
wrap_WebInspectorClosedCallback ::
    WebInspectorClosedCallback ->
    C_WebInspectorClosedCallback
wrap_WebInspectorClosedCallback _cb _ _ = do
    _cb


{- |
Connect a signal handler for the “@closed@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' webInspector #closed callback
@
-}
onWebInspectorClosed :: (IsWebInspector a, MonadIO m) => a -> WebInspectorClosedCallback -> m SignalHandlerId
onWebInspectorClosed obj cb = liftIO $ do
    let cb' = wrap_WebInspectorClosedCallback cb
    cb'' <- mk_WebInspectorClosedCallback cb'
    connectSignalFunPtr obj "closed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@closed@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' webInspector #closed callback
@
-}
afterWebInspectorClosed :: (IsWebInspector a, MonadIO m) => a -> WebInspectorClosedCallback -> m SignalHandlerId
afterWebInspectorClosed obj cb = liftIO $ do
    let cb' = wrap_WebInspectorClosedCallback cb
    cb'' <- mk_WebInspectorClosedCallback cb'
    connectSignalFunPtr obj "closed" cb'' SignalConnectAfter


-- signal WebInspector::detach
{- |
Emitted when the inspector is requested to be detached from the window
it is currently attached to. The inspector is detached when the inspector page
is about to be closed, and this signal is emitted right before
'GI.WebKit2.Objects.WebInspector.WebInspector'::@/closed/@, or when the user clicks on the detach button
in the inspector view to show the inspector in a separate window. In this case
the signal 'GI.WebKit2.Objects.WebInspector.WebInspector'::@/open-window/@ is emitted after this one.

To prevent the inspector view from being detached you can connect to this
signal and simply return 'True'.
-}
type WebInspectorDetachCallback =
    IO Bool
    {- ^ __Returns:__ 'True' to stop other handlers from being invoked for the event.
   'False' to propagate the event further. -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebInspectorDetachCallback`@.
noWebInspectorDetachCallback :: Maybe WebInspectorDetachCallback
noWebInspectorDetachCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebInspectorDetachCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebInspectorDetachCallback`.
foreign import ccall "wrapper"
    mk_WebInspectorDetachCallback :: C_WebInspectorDetachCallback -> IO (FunPtr C_WebInspectorDetachCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebInspectorDetach :: MonadIO m => WebInspectorDetachCallback -> m (GClosure C_WebInspectorDetachCallback)
genClosure_WebInspectorDetach cb = liftIO $ do
    let cb' = wrap_WebInspectorDetachCallback cb
    mk_WebInspectorDetachCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `WebInspectorDetachCallback` into a `C_WebInspectorDetachCallback`.
wrap_WebInspectorDetachCallback ::
    WebInspectorDetachCallback ->
    C_WebInspectorDetachCallback
wrap_WebInspectorDetachCallback _cb _ _ = do
    result <- _cb
    let result' = (fromIntegral . fromEnum) result
    return result'


{- |
Connect a signal handler for the “@detach@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' webInspector #detach callback
@
-}
onWebInspectorDetach :: (IsWebInspector a, MonadIO m) => a -> WebInspectorDetachCallback -> m SignalHandlerId
onWebInspectorDetach obj cb = liftIO $ do
    let cb' = wrap_WebInspectorDetachCallback cb
    cb'' <- mk_WebInspectorDetachCallback cb'
    connectSignalFunPtr obj "detach" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@detach@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' webInspector #detach callback
@
-}
afterWebInspectorDetach :: (IsWebInspector a, MonadIO m) => a -> WebInspectorDetachCallback -> m SignalHandlerId
afterWebInspectorDetach obj cb = liftIO $ do
    let cb' = wrap_WebInspectorDetachCallback cb
    cb'' <- mk_WebInspectorDetachCallback cb'
    connectSignalFunPtr obj "detach" cb'' SignalConnectAfter


-- signal WebInspector::open-window
{- |
Emitted when the inspector is requested to open in a separate window.
If this signal is not handled, a 'GI.Gtk.Objects.Window.Window' with the inspector will be
created and shown, so you only need to handle this signal if you want
to use your own window.
This signal is emitted after 'GI.WebKit2.Objects.WebInspector.WebInspector'::@/detach/@ to show
the inspector in a separate window after being detached.

To prevent the inspector from being shown you can connect to this
signal and simply return 'True'
-}
type WebInspectorOpenWindowCallback =
    IO Bool
    {- ^ __Returns:__ 'True' to stop other handlers from being invoked for the event.
   'False' to propagate the event further. -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WebInspectorOpenWindowCallback`@.
noWebInspectorOpenWindowCallback :: Maybe WebInspectorOpenWindowCallback
noWebInspectorOpenWindowCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WebInspectorOpenWindowCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WebInspectorOpenWindowCallback`.
foreign import ccall "wrapper"
    mk_WebInspectorOpenWindowCallback :: C_WebInspectorOpenWindowCallback -> IO (FunPtr C_WebInspectorOpenWindowCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_WebInspectorOpenWindow :: MonadIO m => WebInspectorOpenWindowCallback -> m (GClosure C_WebInspectorOpenWindowCallback)
genClosure_WebInspectorOpenWindow cb = liftIO $ do
    let cb' = wrap_WebInspectorOpenWindowCallback cb
    mk_WebInspectorOpenWindowCallback cb' >>= B.GClosure.newGClosure


-- | Wrap a `WebInspectorOpenWindowCallback` into a `C_WebInspectorOpenWindowCallback`.
wrap_WebInspectorOpenWindowCallback ::
    WebInspectorOpenWindowCallback ->
    C_WebInspectorOpenWindowCallback
wrap_WebInspectorOpenWindowCallback _cb _ _ = do
    result <- _cb
    let result' = (fromIntegral . fromEnum) result
    return result'


{- |
Connect a signal handler for the “@open-window@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' webInspector #openWindow callback
@
-}
onWebInspectorOpenWindow :: (IsWebInspector a, MonadIO m) => a -> WebInspectorOpenWindowCallback -> m SignalHandlerId
onWebInspectorOpenWindow obj cb = liftIO $ do
    let cb' = wrap_WebInspectorOpenWindowCallback cb
    cb'' <- mk_WebInspectorOpenWindowCallback cb'
    connectSignalFunPtr obj "open-window" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@open-window@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' webInspector #openWindow callback
@
-}
afterWebInspectorOpenWindow :: (IsWebInspector a, MonadIO m) => a -> WebInspectorOpenWindowCallback -> m SignalHandlerId
afterWebInspectorOpenWindow obj cb = liftIO $ do
    let cb' = wrap_WebInspectorOpenWindowCallback cb
    cb'' <- mk_WebInspectorOpenWindowCallback cb'
    connectSignalFunPtr obj "open-window" cb'' SignalConnectAfter


-- VVV Prop "attached-height"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

{- |
Get the value of the “@attached-height@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' webInspector #attachedHeight
@
-}
getWebInspectorAttachedHeight :: (MonadIO m, IsWebInspector o) => o -> m Word32
getWebInspectorAttachedHeight obj = liftIO $ B.Properties.getObjectPropertyUInt32 obj "attached-height"

#if ENABLE_OVERLOADING
data WebInspectorAttachedHeightPropertyInfo
instance AttrInfo WebInspectorAttachedHeightPropertyInfo where
    type AttrAllowedOps WebInspectorAttachedHeightPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint WebInspectorAttachedHeightPropertyInfo = (~) ()
    type AttrBaseTypeConstraint WebInspectorAttachedHeightPropertyInfo = IsWebInspector
    type AttrGetType WebInspectorAttachedHeightPropertyInfo = Word32
    type AttrLabel WebInspectorAttachedHeightPropertyInfo = "attached-height"
    type AttrOrigin WebInspectorAttachedHeightPropertyInfo = WebInspector
    attrGet _ = getWebInspectorAttachedHeight
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined
#endif

-- VVV Prop "can-attach"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

{- |
Get the value of the “@can-attach@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' webInspector #canAttach
@
-}
getWebInspectorCanAttach :: (MonadIO m, IsWebInspector o) => o -> m Bool
getWebInspectorCanAttach obj = liftIO $ B.Properties.getObjectPropertyBool obj "can-attach"

#if ENABLE_OVERLOADING
data WebInspectorCanAttachPropertyInfo
instance AttrInfo WebInspectorCanAttachPropertyInfo where
    type AttrAllowedOps WebInspectorCanAttachPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint WebInspectorCanAttachPropertyInfo = (~) ()
    type AttrBaseTypeConstraint WebInspectorCanAttachPropertyInfo = IsWebInspector
    type AttrGetType WebInspectorCanAttachPropertyInfo = Bool
    type AttrLabel WebInspectorCanAttachPropertyInfo = "can-attach"
    type AttrOrigin WebInspectorCanAttachPropertyInfo = WebInspector
    attrGet _ = getWebInspectorCanAttach
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined
#endif

-- VVV Prop "inspected-uri"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Just True,Nothing)

{- |
Get the value of the “@inspected-uri@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' webInspector #inspectedUri
@
-}
getWebInspectorInspectedUri :: (MonadIO m, IsWebInspector o) => o -> m (Maybe T.Text)
getWebInspectorInspectedUri obj = liftIO $ B.Properties.getObjectPropertyString obj "inspected-uri"

#if ENABLE_OVERLOADING
data WebInspectorInspectedUriPropertyInfo
instance AttrInfo WebInspectorInspectedUriPropertyInfo where
    type AttrAllowedOps WebInspectorInspectedUriPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint WebInspectorInspectedUriPropertyInfo = (~) ()
    type AttrBaseTypeConstraint WebInspectorInspectedUriPropertyInfo = IsWebInspector
    type AttrGetType WebInspectorInspectedUriPropertyInfo = (Maybe T.Text)
    type AttrLabel WebInspectorInspectedUriPropertyInfo = "inspected-uri"
    type AttrOrigin WebInspectorInspectedUriPropertyInfo = WebInspector
    attrGet _ = getWebInspectorInspectedUri
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined
#endif

#if ENABLE_OVERLOADING
instance O.HasAttributeList WebInspector
type instance O.AttributeList WebInspector = WebInspectorAttributeList
type WebInspectorAttributeList = ('[ '("attachedHeight", WebInspectorAttachedHeightPropertyInfo), '("canAttach", WebInspectorCanAttachPropertyInfo), '("inspectedUri", WebInspectorInspectedUriPropertyInfo)] :: [(Symbol, *)])
#endif

#if ENABLE_OVERLOADING
webInspectorAttachedHeight :: AttrLabelProxy "attachedHeight"
webInspectorAttachedHeight = AttrLabelProxy

webInspectorCanAttach :: AttrLabelProxy "canAttach"
webInspectorCanAttach = AttrLabelProxy

webInspectorInspectedUri :: AttrLabelProxy "inspectedUri"
webInspectorInspectedUri = AttrLabelProxy

#endif

#if ENABLE_OVERLOADING
data WebInspectorAttachSignalInfo
instance SignalInfo WebInspectorAttachSignalInfo where
    type HaskellCallbackType WebInspectorAttachSignalInfo = WebInspectorAttachCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_WebInspectorAttachCallback cb
        cb'' <- mk_WebInspectorAttachCallback cb'
        connectSignalFunPtr obj "attach" cb'' connectMode

data WebInspectorBringToFrontSignalInfo
instance SignalInfo WebInspectorBringToFrontSignalInfo where
    type HaskellCallbackType WebInspectorBringToFrontSignalInfo = WebInspectorBringToFrontCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_WebInspectorBringToFrontCallback cb
        cb'' <- mk_WebInspectorBringToFrontCallback cb'
        connectSignalFunPtr obj "bring-to-front" cb'' connectMode

data WebInspectorClosedSignalInfo
instance SignalInfo WebInspectorClosedSignalInfo where
    type HaskellCallbackType WebInspectorClosedSignalInfo = WebInspectorClosedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_WebInspectorClosedCallback cb
        cb'' <- mk_WebInspectorClosedCallback cb'
        connectSignalFunPtr obj "closed" cb'' connectMode

data WebInspectorDetachSignalInfo
instance SignalInfo WebInspectorDetachSignalInfo where
    type HaskellCallbackType WebInspectorDetachSignalInfo = WebInspectorDetachCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_WebInspectorDetachCallback cb
        cb'' <- mk_WebInspectorDetachCallback cb'
        connectSignalFunPtr obj "detach" cb'' connectMode

data WebInspectorOpenWindowSignalInfo
instance SignalInfo WebInspectorOpenWindowSignalInfo where
    type HaskellCallbackType WebInspectorOpenWindowSignalInfo = WebInspectorOpenWindowCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_WebInspectorOpenWindowCallback cb
        cb'' <- mk_WebInspectorOpenWindowCallback cb'
        connectSignalFunPtr obj "open-window" cb'' connectMode

type instance O.SignalList WebInspector = WebInspectorSignalList
type WebInspectorSignalList = ('[ '("attach", WebInspectorAttachSignalInfo), '("bringToFront", WebInspectorBringToFrontSignalInfo), '("closed", WebInspectorClosedSignalInfo), '("detach", WebInspectorDetachSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("openWindow", WebInspectorOpenWindowSignalInfo)] :: [(Symbol, *)])

#endif

-- method WebInspector::attach
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "inspector", argType = TInterface (Name {namespace = "WebKit2", name = "WebInspector"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitWebInspector", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_inspector_attach" webkit_web_inspector_attach ::
    Ptr WebInspector ->                     -- inspector : TInterface (Name {namespace = "WebKit2", name = "WebInspector"})
    IO ()

{- |
Request /@inspector@/ to be attached. The signal 'GI.WebKit2.Objects.WebInspector.WebInspector'::@/attach/@
will be emitted. If the inspector is already attached it does nothing.
-}
webInspectorAttach ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebInspector a) =>
    a
    {- ^ /@inspector@/: a 'GI.WebKit2.Objects.WebInspector.WebInspector' -}
    -> m ()
webInspectorAttach inspector = liftIO $ do
    inspector' <- unsafeManagedPtrCastPtr inspector
    webkit_web_inspector_attach inspector'
    touchManagedPtr inspector
    return ()

#if ENABLE_OVERLOADING
data WebInspectorAttachMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWebInspector a) => O.MethodInfo WebInspectorAttachMethodInfo a signature where
    overloadedMethod _ = webInspectorAttach

#endif

-- method WebInspector::close
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "inspector", argType = TInterface (Name {namespace = "WebKit2", name = "WebInspector"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitWebInspector", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_inspector_close" webkit_web_inspector_close ::
    Ptr WebInspector ->                     -- inspector : TInterface (Name {namespace = "WebKit2", name = "WebInspector"})
    IO ()

{- |
Request /@inspector@/ to be closed.
-}
webInspectorClose ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebInspector a) =>
    a
    {- ^ /@inspector@/: a 'GI.WebKit2.Objects.WebInspector.WebInspector' -}
    -> m ()
webInspectorClose inspector = liftIO $ do
    inspector' <- unsafeManagedPtrCastPtr inspector
    webkit_web_inspector_close inspector'
    touchManagedPtr inspector
    return ()

#if ENABLE_OVERLOADING
data WebInspectorCloseMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWebInspector a) => O.MethodInfo WebInspectorCloseMethodInfo a signature where
    overloadedMethod _ = webInspectorClose

#endif

-- method WebInspector::detach
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "inspector", argType = TInterface (Name {namespace = "WebKit2", name = "WebInspector"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitWebInspector", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_inspector_detach" webkit_web_inspector_detach ::
    Ptr WebInspector ->                     -- inspector : TInterface (Name {namespace = "WebKit2", name = "WebInspector"})
    IO ()

{- |
Request /@inspector@/ to be detached. The signal 'GI.WebKit2.Objects.WebInspector.WebInspector'::@/detach/@
will be emitted. If the inspector is already detached it does nothing.
-}
webInspectorDetach ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebInspector a) =>
    a
    {- ^ /@inspector@/: a 'GI.WebKit2.Objects.WebInspector.WebInspector' -}
    -> m ()
webInspectorDetach inspector = liftIO $ do
    inspector' <- unsafeManagedPtrCastPtr inspector
    webkit_web_inspector_detach inspector'
    touchManagedPtr inspector
    return ()

#if ENABLE_OVERLOADING
data WebInspectorDetachMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWebInspector a) => O.MethodInfo WebInspectorDetachMethodInfo a signature where
    overloadedMethod _ = webInspectorDetach

#endif

-- method WebInspector::get_attached_height
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "inspector", argType = TInterface (Name {namespace = "WebKit2", name = "WebInspector"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitWebInspector", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_inspector_get_attached_height" webkit_web_inspector_get_attached_height ::
    Ptr WebInspector ->                     -- inspector : TInterface (Name {namespace = "WebKit2", name = "WebInspector"})
    IO Word32

{- |
Get the height that the inspector view should have when
it\'s attached. If the inspector view is not attached this
returns 0.
-}
webInspectorGetAttachedHeight ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebInspector a) =>
    a
    {- ^ /@inspector@/: a 'GI.WebKit2.Objects.WebInspector.WebInspector' -}
    -> m Word32
    {- ^ __Returns:__ the height of the inspector view when attached -}
webInspectorGetAttachedHeight inspector = liftIO $ do
    inspector' <- unsafeManagedPtrCastPtr inspector
    result <- webkit_web_inspector_get_attached_height inspector'
    touchManagedPtr inspector
    return result

#if ENABLE_OVERLOADING
data WebInspectorGetAttachedHeightMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsWebInspector a) => O.MethodInfo WebInspectorGetAttachedHeightMethodInfo a signature where
    overloadedMethod _ = webInspectorGetAttachedHeight

#endif

-- method WebInspector::get_can_attach
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "inspector", argType = TInterface (Name {namespace = "WebKit2", name = "WebInspector"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitWebInspector", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_inspector_get_can_attach" webkit_web_inspector_get_can_attach ::
    Ptr WebInspector ->                     -- inspector : TInterface (Name {namespace = "WebKit2", name = "WebInspector"})
    IO CInt

{- |
Whether the /@inspector@/ can be attached to the same window that contains
the inspected view.

/Since: 2.8/
-}
webInspectorGetCanAttach ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebInspector a) =>
    a
    {- ^ /@inspector@/: a 'GI.WebKit2.Objects.WebInspector.WebInspector' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if there is enough room for the inspector view inside the
    window that contains the inspected view, or 'False' otherwise. -}
webInspectorGetCanAttach inspector = liftIO $ do
    inspector' <- unsafeManagedPtrCastPtr inspector
    result <- webkit_web_inspector_get_can_attach inspector'
    let result' = (/= 0) result
    touchManagedPtr inspector
    return result'

#if ENABLE_OVERLOADING
data WebInspectorGetCanAttachMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWebInspector a) => O.MethodInfo WebInspectorGetCanAttachMethodInfo a signature where
    overloadedMethod _ = webInspectorGetCanAttach

#endif

-- method WebInspector::get_inspected_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "inspector", argType = TInterface (Name {namespace = "WebKit2", name = "WebInspector"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitWebInspector", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_inspector_get_inspected_uri" webkit_web_inspector_get_inspected_uri ::
    Ptr WebInspector ->                     -- inspector : TInterface (Name {namespace = "WebKit2", name = "WebInspector"})
    IO CString

{- |
Get the URI that is currently being inspected. This can be 'Nothing' if
nothing has been loaded yet in the inspected view, if the inspector
has been closed or when inspected view was loaded from a HTML string
instead of a URI.
-}
webInspectorGetInspectedUri ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebInspector a) =>
    a
    {- ^ /@inspector@/: a 'GI.WebKit2.Objects.WebInspector.WebInspector' -}
    -> m (Maybe T.Text)
    {- ^ __Returns:__ the URI that is currently being inspected or 'Nothing' -}
webInspectorGetInspectedUri inspector = liftIO $ do
    inspector' <- unsafeManagedPtrCastPtr inspector
    result <- webkit_web_inspector_get_inspected_uri inspector'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- cstringToText result'
        return result''
    touchManagedPtr inspector
    return maybeResult

#if ENABLE_OVERLOADING
data WebInspectorGetInspectedUriMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsWebInspector a) => O.MethodInfo WebInspectorGetInspectedUriMethodInfo a signature where
    overloadedMethod _ = webInspectorGetInspectedUri

#endif

-- method WebInspector::get_web_view
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "inspector", argType = TInterface (Name {namespace = "WebKit2", name = "WebInspector"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitWebInspector", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "WebKit2", name = "WebViewBase"}))
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_inspector_get_web_view" webkit_web_inspector_get_web_view ::
    Ptr WebInspector ->                     -- inspector : TInterface (Name {namespace = "WebKit2", name = "WebInspector"})
    IO (Ptr WebKit2.WebViewBase.WebViewBase)

{- |
Get the 'GI.WebKit2.Objects.WebViewBase.WebViewBase' used to display the inspector.
This might be 'Nothing' if the inspector hasn\'t been loaded yet,
or it has been closed.
-}
webInspectorGetWebView ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebInspector a) =>
    a
    {- ^ /@inspector@/: a 'GI.WebKit2.Objects.WebInspector.WebInspector' -}
    -> m (Maybe WebKit2.WebViewBase.WebViewBase)
    {- ^ __Returns:__ the 'GI.WebKit2.Objects.WebViewBase.WebViewBase' used to display the inspector or 'Nothing' -}
webInspectorGetWebView inspector = liftIO $ do
    inspector' <- unsafeManagedPtrCastPtr inspector
    result <- webkit_web_inspector_get_web_view inspector'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- (newObject WebKit2.WebViewBase.WebViewBase) result'
        return result''
    touchManagedPtr inspector
    return maybeResult

#if ENABLE_OVERLOADING
data WebInspectorGetWebViewMethodInfo
instance (signature ~ (m (Maybe WebKit2.WebViewBase.WebViewBase)), MonadIO m, IsWebInspector a) => O.MethodInfo WebInspectorGetWebViewMethodInfo a signature where
    overloadedMethod _ = webInspectorGetWebView

#endif

-- method WebInspector::is_attached
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "inspector", argType = TInterface (Name {namespace = "WebKit2", name = "WebInspector"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitWebInspector", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_inspector_is_attached" webkit_web_inspector_is_attached ::
    Ptr WebInspector ->                     -- inspector : TInterface (Name {namespace = "WebKit2", name = "WebInspector"})
    IO CInt

{- |
Whether the /@inspector@/ view is currently attached to the same window that contains
the inspected view.
-}
webInspectorIsAttached ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebInspector a) =>
    a
    {- ^ /@inspector@/: a 'GI.WebKit2.Objects.WebInspector.WebInspector' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@inspector@/ is currently attached or 'False' otherwise -}
webInspectorIsAttached inspector = liftIO $ do
    inspector' <- unsafeManagedPtrCastPtr inspector
    result <- webkit_web_inspector_is_attached inspector'
    let result' = (/= 0) result
    touchManagedPtr inspector
    return result'

#if ENABLE_OVERLOADING
data WebInspectorIsAttachedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWebInspector a) => O.MethodInfo WebInspectorIsAttachedMethodInfo a signature where
    overloadedMethod _ = webInspectorIsAttached

#endif

-- method WebInspector::show
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "inspector", argType = TInterface (Name {namespace = "WebKit2", name = "WebInspector"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitWebInspector", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_inspector_show" webkit_web_inspector_show ::
    Ptr WebInspector ->                     -- inspector : TInterface (Name {namespace = "WebKit2", name = "WebInspector"})
    IO ()

{- |
Request /@inspector@/ to be shown.
-}
webInspectorShow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWebInspector a) =>
    a
    {- ^ /@inspector@/: a 'GI.WebKit2.Objects.WebInspector.WebInspector' -}
    -> m ()
webInspectorShow inspector = liftIO $ do
    inspector' <- unsafeManagedPtrCastPtr inspector
    webkit_web_inspector_show inspector'
    touchManagedPtr inspector
    return ()

#if ENABLE_OVERLOADING
data WebInspectorShowMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWebInspector a) => O.MethodInfo WebInspectorShowMethodInfo a signature where
    overloadedMethod _ = webInspectorShow

#endif