{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- Form manager of a t'GI.WebKit2WebExtension.Objects.WebPage.WebPage' in a t'GI.WebKit2WebExtension.Objects.ScriptWorld.ScriptWorld'
-- 
-- /Since: 2.40/

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

module GI.WebKit2WebExtension.Objects.WebFormManager
    ( 

-- * Exported types
    WebFormManager(..)                      ,
    IsWebFormManager                        ,
    toWebFormManager                        ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getData]("GI.GObject.Objects.Object#g:method:getData"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata").
-- 
-- ==== Setters
-- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

#if defined(ENABLE_OVERLOADING)
    ResolveWebFormManagerMethod             ,
#endif

-- ** inputElementAutoFill #method:inputElementAutoFill#

    webFormManagerInputElementAutoFill      ,


-- ** inputElementIsAutoFilled #method:inputElementIsAutoFilled#

    webFormManagerInputElementIsAutoFilled  ,


-- ** inputElementIsUserEdited #method:inputElementIsUserEdited#

    webFormManagerInputElementIsUserEdited  ,




 -- * Signals


-- ** formControlsAssociated #signal:formControlsAssociated#

    WebFormManagerFormControlsAssociatedCallback,
#if defined(ENABLE_OVERLOADING)
    WebFormManagerFormControlsAssociatedSignalInfo,
#endif
    afterWebFormManagerFormControlsAssociated,
    onWebFormManagerFormControlsAssociated  ,


-- ** willSendSubmitEvent #signal:willSendSubmitEvent#

    WebFormManagerWillSendSubmitEventCallback,
#if defined(ENABLE_OVERLOADING)
    WebFormManagerWillSendSubmitEventSignalInfo,
#endif
    afterWebFormManagerWillSendSubmitEvent  ,
    onWebFormManagerWillSendSubmitEvent     ,


-- ** willSubmitForm #signal:willSubmitForm#

    WebFormManagerWillSubmitFormCallback    ,
#if defined(ENABLE_OVERLOADING)
    WebFormManagerWillSubmitFormSignalInfo  ,
#endif
    afterWebFormManagerWillSubmitForm       ,
    onWebFormManagerWillSubmitForm          ,




    ) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
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.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 GHC.Records as R

import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.JavaScriptCore.Objects.Value as JavaScriptCore.Value
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.Frame as WebKit2WebExtension.Frame

-- | Memory-managed wrapper type.
newtype WebFormManager = WebFormManager (SP.ManagedPtr WebFormManager)
    deriving (WebFormManager -> WebFormManager -> Bool
(WebFormManager -> WebFormManager -> Bool)
-> (WebFormManager -> WebFormManager -> Bool) -> Eq WebFormManager
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WebFormManager -> WebFormManager -> Bool
== :: WebFormManager -> WebFormManager -> Bool
$c/= :: WebFormManager -> WebFormManager -> Bool
/= :: WebFormManager -> WebFormManager -> Bool
Eq)

instance SP.ManagedPtrNewtype WebFormManager where
    toManagedPtr :: WebFormManager -> ManagedPtr WebFormManager
toManagedPtr (WebFormManager ManagedPtr WebFormManager
p) = ManagedPtr WebFormManager
p

foreign import ccall "webkit_web_form_manager_get_type"
    c_webkit_web_form_manager_get_type :: IO B.Types.GType

instance B.Types.TypedObject WebFormManager where
    glibType :: IO GType
glibType = IO GType
c_webkit_web_form_manager_get_type

instance B.Types.GObject WebFormManager

-- | Type class for types which can be safely cast to `WebFormManager`, for instance with `toWebFormManager`.
class (SP.GObject o, O.IsDescendantOf WebFormManager o) => IsWebFormManager o
instance (SP.GObject o, O.IsDescendantOf WebFormManager o) => IsWebFormManager o

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

-- | Cast to `WebFormManager`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toWebFormManager :: (MIO.MonadIO m, IsWebFormManager o) => o -> m WebFormManager
toWebFormManager :: forall (m :: * -> *) o.
(MonadIO m, IsWebFormManager o) =>
o -> m WebFormManager
toWebFormManager = IO WebFormManager -> m WebFormManager
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO WebFormManager -> m WebFormManager)
-> (o -> IO WebFormManager) -> o -> m WebFormManager
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr WebFormManager -> WebFormManager)
-> o -> IO WebFormManager
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr WebFormManager -> WebFormManager
WebFormManager

-- | Convert 'WebFormManager' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe WebFormManager) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_webkit_web_form_manager_get_type
    gvalueSet_ :: Ptr GValue -> Maybe WebFormManager -> IO ()
gvalueSet_ Ptr GValue
gv Maybe WebFormManager
P.Nothing = Ptr GValue -> Ptr WebFormManager -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr WebFormManager
forall a. Ptr a
FP.nullPtr :: FP.Ptr WebFormManager)
    gvalueSet_ Ptr GValue
gv (P.Just WebFormManager
obj) = WebFormManager -> (Ptr WebFormManager -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr WebFormManager
obj (Ptr GValue -> Ptr WebFormManager -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe WebFormManager)
gvalueGet_ Ptr GValue
gv = do
        Ptr WebFormManager
ptr <- Ptr GValue -> IO (Ptr WebFormManager)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr WebFormManager)
        if Ptr WebFormManager
ptr Ptr WebFormManager -> Ptr WebFormManager -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr WebFormManager
forall a. Ptr a
FP.nullPtr
        then WebFormManager -> Maybe WebFormManager
forall a. a -> Maybe a
P.Just (WebFormManager -> Maybe WebFormManager)
-> IO WebFormManager -> IO (Maybe WebFormManager)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr WebFormManager -> WebFormManager)
-> Ptr WebFormManager -> IO WebFormManager
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr WebFormManager -> WebFormManager
WebFormManager Ptr WebFormManager
ptr
        else Maybe WebFormManager -> IO (Maybe WebFormManager)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe WebFormManager
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveWebFormManagerMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveWebFormManagerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveWebFormManagerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveWebFormManagerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveWebFormManagerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveWebFormManagerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveWebFormManagerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveWebFormManagerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveWebFormManagerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveWebFormManagerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveWebFormManagerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveWebFormManagerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveWebFormManagerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveWebFormManagerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveWebFormManagerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveWebFormManagerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveWebFormManagerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveWebFormManagerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveWebFormManagerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveWebFormManagerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveWebFormManagerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveWebFormManagerMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveWebFormManagerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveWebFormManagerMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveWebFormManagerMethod t WebFormManager, O.OverloadedMethod info WebFormManager p) => OL.IsLabel t (WebFormManager -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveWebFormManagerMethod t WebFormManager, O.OverloadedMethod info WebFormManager p, R.HasField t WebFormManager p) => R.HasField t WebFormManager p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveWebFormManagerMethod t WebFormManager, O.OverloadedMethodInfo info WebFormManager) => OL.IsLabel t (O.MethodProxy info WebFormManager) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

-- signal WebFormManager::form-controls-associated
-- | Emitted after form elements (or form associated elements) are associated to /@frame@/.
-- This is useful to implement form auto filling for web pages where form fields are added
-- dynamically. This signal might be emitted multiple times for the same frame.
-- 
-- Note that this signal could be also emitted when form controls are moved between forms. In
-- that case, the /@elements@/ array carries the list of those elements which have moved.
-- 
-- Clients should take a reference to the members of the /@elements@/ array if it is desired to
-- keep them alive after the signal handler returns.
-- 
-- /Since: 2.40/
type WebFormManagerFormControlsAssociatedCallback =
    WebKit2WebExtension.Frame.Frame
    -- ^ /@frame@/: a t'GI.WebKit2WebExtension.Objects.Frame.Frame'
    -> [JavaScriptCore.Value.Value]
    -- ^ /@elements@/: a t'GI.GLib.Structs.PtrArray.PtrArray' of
    --     t'GI.JavaScriptCore.Objects.Value.Value' with the list of forms in the page
    -> IO ()

type C_WebFormManagerFormControlsAssociatedCallback =
    Ptr WebFormManager ->                   -- object
    Ptr WebKit2WebExtension.Frame.Frame ->
    Ptr (GPtrArray (Ptr JavaScriptCore.Value.Value)) ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WebFormManagerFormControlsAssociatedCallback :: 
    GObject a => (a -> WebFormManagerFormControlsAssociatedCallback) ->
    C_WebFormManagerFormControlsAssociatedCallback
wrap_WebFormManagerFormControlsAssociatedCallback :: forall a.
GObject a =>
(a -> WebFormManagerFormControlsAssociatedCallback)
-> C_WebFormManagerFormControlsAssociatedCallback
wrap_WebFormManagerFormControlsAssociatedCallback a -> WebFormManagerFormControlsAssociatedCallback
gi'cb Ptr WebFormManager
gi'selfPtr Ptr Frame
frame Ptr (GPtrArray (Ptr Value))
elements Ptr ()
_ = do
    Frame
frame' <- ((ManagedPtr Frame -> Frame) -> Ptr Frame -> IO Frame
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Frame -> Frame
WebKit2WebExtension.Frame.Frame) Ptr Frame
frame
    [Ptr Value]
elements' <- Ptr (GPtrArray (Ptr Value)) -> IO [Ptr Value]
forall a. Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
unpackGPtrArray Ptr (GPtrArray (Ptr Value))
elements
    [Value]
elements'' <- (Ptr Value -> IO Value) -> [Ptr Value] -> IO [Value]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr Value -> Value) -> Ptr Value -> IO Value
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Value -> Value
JavaScriptCore.Value.Value) [Ptr Value]
elements'
    Ptr WebFormManager -> (WebFormManager -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr WebFormManager
gi'selfPtr ((WebFormManager -> IO ()) -> IO ())
-> (WebFormManager -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \WebFormManager
gi'self -> a -> WebFormManagerFormControlsAssociatedCallback
gi'cb (WebFormManager -> a
forall a b. Coercible a b => a -> b
Coerce.coerce WebFormManager
gi'self)  Frame
frame' [Value]
elements''


-- | Connect a signal handler for the [formControlsAssociated](#signal:formControlsAssociated) 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' webFormManager #formControlsAssociated callback
-- @
-- 
-- 
onWebFormManagerFormControlsAssociated :: (IsWebFormManager a, MonadIO m) => a -> ((?self :: a) => WebFormManagerFormControlsAssociatedCallback) -> m SignalHandlerId
onWebFormManagerFormControlsAssociated :: forall a (m :: * -> *).
(IsWebFormManager a, MonadIO m) =>
a
-> ((?self::a) => WebFormManagerFormControlsAssociatedCallback)
-> m SignalHandlerId
onWebFormManagerFormControlsAssociated a
obj (?self::a) => WebFormManagerFormControlsAssociatedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> WebFormManagerFormControlsAssociatedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WebFormManagerFormControlsAssociatedCallback
WebFormManagerFormControlsAssociatedCallback
cb
    let wrapped' :: C_WebFormManagerFormControlsAssociatedCallback
wrapped' = (a -> WebFormManagerFormControlsAssociatedCallback)
-> C_WebFormManagerFormControlsAssociatedCallback
forall a.
GObject a =>
(a -> WebFormManagerFormControlsAssociatedCallback)
-> C_WebFormManagerFormControlsAssociatedCallback
wrap_WebFormManagerFormControlsAssociatedCallback a -> WebFormManagerFormControlsAssociatedCallback
wrapped
    FunPtr C_WebFormManagerFormControlsAssociatedCallback
wrapped'' <- C_WebFormManagerFormControlsAssociatedCallback
-> IO (FunPtr C_WebFormManagerFormControlsAssociatedCallback)
mk_WebFormManagerFormControlsAssociatedCallback C_WebFormManagerFormControlsAssociatedCallback
wrapped'
    a
-> Text
-> FunPtr C_WebFormManagerFormControlsAssociatedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"form-controls-associated" FunPtr C_WebFormManagerFormControlsAssociatedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [formControlsAssociated](#signal:formControlsAssociated) 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' webFormManager #formControlsAssociated callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWebFormManagerFormControlsAssociated :: (IsWebFormManager a, MonadIO m) => a -> ((?self :: a) => WebFormManagerFormControlsAssociatedCallback) -> m SignalHandlerId
afterWebFormManagerFormControlsAssociated :: forall a (m :: * -> *).
(IsWebFormManager a, MonadIO m) =>
a
-> ((?self::a) => WebFormManagerFormControlsAssociatedCallback)
-> m SignalHandlerId
afterWebFormManagerFormControlsAssociated a
obj (?self::a) => WebFormManagerFormControlsAssociatedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> WebFormManagerFormControlsAssociatedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WebFormManagerFormControlsAssociatedCallback
WebFormManagerFormControlsAssociatedCallback
cb
    let wrapped' :: C_WebFormManagerFormControlsAssociatedCallback
wrapped' = (a -> WebFormManagerFormControlsAssociatedCallback)
-> C_WebFormManagerFormControlsAssociatedCallback
forall a.
GObject a =>
(a -> WebFormManagerFormControlsAssociatedCallback)
-> C_WebFormManagerFormControlsAssociatedCallback
wrap_WebFormManagerFormControlsAssociatedCallback a -> WebFormManagerFormControlsAssociatedCallback
wrapped
    FunPtr C_WebFormManagerFormControlsAssociatedCallback
wrapped'' <- C_WebFormManagerFormControlsAssociatedCallback
-> IO (FunPtr C_WebFormManagerFormControlsAssociatedCallback)
mk_WebFormManagerFormControlsAssociatedCallback C_WebFormManagerFormControlsAssociatedCallback
wrapped'
    a
-> Text
-> FunPtr C_WebFormManagerFormControlsAssociatedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"form-controls-associated" FunPtr C_WebFormManagerFormControlsAssociatedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebFormManagerFormControlsAssociatedSignalInfo
instance SignalInfo WebFormManagerFormControlsAssociatedSignalInfo where
    type HaskellCallbackType WebFormManagerFormControlsAssociatedSignalInfo = WebFormManagerFormControlsAssociatedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebFormManagerFormControlsAssociatedCallback cb
        cb'' <- mk_WebFormManagerFormControlsAssociatedCallback cb'
        connectSignalFunPtr obj "form-controls-associated" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.WebFormManager::form-controls-associated"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-WebFormManager.html#g:signal:formControlsAssociated"})

#endif

-- signal WebFormManager::will-send-submit-event
-- | This signal is emitted when the DOM submit event is about to be fired for /@form@/.
-- JavaScript code may rely on the submit event to detect that the user has clicked
-- on a submit button, and to possibly cancel the form submission before
-- [WebFormManager::willSubmitForm]("GI.WebKit2WebExtension.Objects.WebFormManager#g:signal:willSubmitForm") signal is emitted.
-- However, beware that, for historical reasons, the submit event is not emitted at
-- all if the form submission is triggered by JavaScript. For these reasons,
-- this signal may not be used to reliably detect whether a form will be submitted.
-- Instead, use it to detect if a user has clicked on a form\'s submit button even if
-- JavaScript later cancels the form submission, or to read the values of the form\'s
-- fields even if JavaScript later clears certain fields before submitting. This may
-- be needed, for example, to implement a robust browser password manager, as some
-- misguided websites may use such techniques to attempt to thwart password managers.
-- 
-- /Since: 2.40/
type WebFormManagerWillSendSubmitEventCallback =
    JavaScriptCore.Value.Value
    -- ^ /@form@/: the t'GI.JavaScriptCore.Objects.Value.Value' to be submitted, which will always correspond to an HTMLFormElement
    -> WebKit2WebExtension.Frame.Frame
    -- ^ /@sourceFrame@/: the t'GI.WebKit2WebExtension.Objects.Frame.Frame' containing the form to be submitted
    -> WebKit2WebExtension.Frame.Frame
    -- ^ /@targetFrame@/: the t'GI.WebKit2WebExtension.Objects.Frame.Frame' containing the form\'s target,
    --     which may be the same as /@sourceFrame@/ if no target was specified
    -> IO ()

type C_WebFormManagerWillSendSubmitEventCallback =
    Ptr WebFormManager ->                   -- object
    Ptr JavaScriptCore.Value.Value ->
    Ptr WebKit2WebExtension.Frame.Frame ->
    Ptr WebKit2WebExtension.Frame.Frame ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WebFormManagerWillSendSubmitEventCallback :: 
    GObject a => (a -> WebFormManagerWillSendSubmitEventCallback) ->
    C_WebFormManagerWillSendSubmitEventCallback
wrap_WebFormManagerWillSendSubmitEventCallback :: forall a.
GObject a =>
(a -> WebFormManagerWillSendSubmitEventCallback)
-> C_WebFormManagerWillSendSubmitEventCallback
wrap_WebFormManagerWillSendSubmitEventCallback a -> WebFormManagerWillSendSubmitEventCallback
gi'cb Ptr WebFormManager
gi'selfPtr Ptr Value
form Ptr Frame
sourceFrame Ptr Frame
targetFrame Ptr ()
_ = do
    Value
form' <- ((ManagedPtr Value -> Value) -> Ptr Value -> IO Value
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Value -> Value
JavaScriptCore.Value.Value) Ptr Value
form
    Frame
sourceFrame' <- ((ManagedPtr Frame -> Frame) -> Ptr Frame -> IO Frame
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Frame -> Frame
WebKit2WebExtension.Frame.Frame) Ptr Frame
sourceFrame
    Frame
targetFrame' <- ((ManagedPtr Frame -> Frame) -> Ptr Frame -> IO Frame
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Frame -> Frame
WebKit2WebExtension.Frame.Frame) Ptr Frame
targetFrame
    Ptr WebFormManager -> (WebFormManager -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr WebFormManager
gi'selfPtr ((WebFormManager -> IO ()) -> IO ())
-> (WebFormManager -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \WebFormManager
gi'self -> a -> WebFormManagerWillSendSubmitEventCallback
gi'cb (WebFormManager -> a
forall a b. Coercible a b => a -> b
Coerce.coerce WebFormManager
gi'self)  Value
form' Frame
sourceFrame' Frame
targetFrame'


-- | Connect a signal handler for the [willSendSubmitEvent](#signal:willSendSubmitEvent) 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' webFormManager #willSendSubmitEvent callback
-- @
-- 
-- 
onWebFormManagerWillSendSubmitEvent :: (IsWebFormManager a, MonadIO m) => a -> ((?self :: a) => WebFormManagerWillSendSubmitEventCallback) -> m SignalHandlerId
onWebFormManagerWillSendSubmitEvent :: forall a (m :: * -> *).
(IsWebFormManager a, MonadIO m) =>
a
-> ((?self::a) => WebFormManagerWillSendSubmitEventCallback)
-> m SignalHandlerId
onWebFormManagerWillSendSubmitEvent a
obj (?self::a) => WebFormManagerWillSendSubmitEventCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> WebFormManagerWillSendSubmitEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WebFormManagerWillSendSubmitEventCallback
WebFormManagerWillSendSubmitEventCallback
cb
    let wrapped' :: C_WebFormManagerWillSendSubmitEventCallback
wrapped' = (a -> WebFormManagerWillSendSubmitEventCallback)
-> C_WebFormManagerWillSendSubmitEventCallback
forall a.
GObject a =>
(a -> WebFormManagerWillSendSubmitEventCallback)
-> C_WebFormManagerWillSendSubmitEventCallback
wrap_WebFormManagerWillSendSubmitEventCallback a -> WebFormManagerWillSendSubmitEventCallback
wrapped
    FunPtr C_WebFormManagerWillSendSubmitEventCallback
wrapped'' <- C_WebFormManagerWillSendSubmitEventCallback
-> IO (FunPtr C_WebFormManagerWillSendSubmitEventCallback)
mk_WebFormManagerWillSendSubmitEventCallback C_WebFormManagerWillSendSubmitEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WebFormManagerWillSendSubmitEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"will-send-submit-event" FunPtr C_WebFormManagerWillSendSubmitEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [willSendSubmitEvent](#signal:willSendSubmitEvent) 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' webFormManager #willSendSubmitEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWebFormManagerWillSendSubmitEvent :: (IsWebFormManager a, MonadIO m) => a -> ((?self :: a) => WebFormManagerWillSendSubmitEventCallback) -> m SignalHandlerId
afterWebFormManagerWillSendSubmitEvent :: forall a (m :: * -> *).
(IsWebFormManager a, MonadIO m) =>
a
-> ((?self::a) => WebFormManagerWillSendSubmitEventCallback)
-> m SignalHandlerId
afterWebFormManagerWillSendSubmitEvent a
obj (?self::a) => WebFormManagerWillSendSubmitEventCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> WebFormManagerWillSendSubmitEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WebFormManagerWillSendSubmitEventCallback
WebFormManagerWillSendSubmitEventCallback
cb
    let wrapped' :: C_WebFormManagerWillSendSubmitEventCallback
wrapped' = (a -> WebFormManagerWillSendSubmitEventCallback)
-> C_WebFormManagerWillSendSubmitEventCallback
forall a.
GObject a =>
(a -> WebFormManagerWillSendSubmitEventCallback)
-> C_WebFormManagerWillSendSubmitEventCallback
wrap_WebFormManagerWillSendSubmitEventCallback a -> WebFormManagerWillSendSubmitEventCallback
wrapped
    FunPtr C_WebFormManagerWillSendSubmitEventCallback
wrapped'' <- C_WebFormManagerWillSendSubmitEventCallback
-> IO (FunPtr C_WebFormManagerWillSendSubmitEventCallback)
mk_WebFormManagerWillSendSubmitEventCallback C_WebFormManagerWillSendSubmitEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WebFormManagerWillSendSubmitEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"will-send-submit-event" FunPtr C_WebFormManagerWillSendSubmitEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebFormManagerWillSendSubmitEventSignalInfo
instance SignalInfo WebFormManagerWillSendSubmitEventSignalInfo where
    type HaskellCallbackType WebFormManagerWillSendSubmitEventSignalInfo = WebFormManagerWillSendSubmitEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebFormManagerWillSendSubmitEventCallback cb
        cb'' <- mk_WebFormManagerWillSendSubmitEventCallback cb'
        connectSignalFunPtr obj "will-send-submit-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.WebFormManager::will-send-submit-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-WebFormManager.html#g:signal:willSendSubmitEvent"})

#endif

-- signal WebFormManager::will-submit-form
-- | This signal is emitted when /@form@/ will imminently be submitted. It can no longer
-- be cancelled. This event always occurs immediately before a form is submitted to
-- its target, so use this event to reliably detect when a form is submitted. This
-- signal is emitted after [WebFormManager::willSendSubmitEvent]("GI.WebKit2WebExtension.Objects.WebFormManager#g:signal:willSendSubmitEvent") if that
-- signal is emitted.
-- 
-- /Since: 2.40/
type WebFormManagerWillSubmitFormCallback =
    JavaScriptCore.Value.Value
    -- ^ /@form@/: the t'GI.JavaScriptCore.Objects.Value.Value' to be submitted, which will always correspond to an HTMLFormElement
    -> WebKit2WebExtension.Frame.Frame
    -- ^ /@sourceFrame@/: the t'GI.WebKit2WebExtension.Objects.Frame.Frame' containing the form to be submitted
    -> WebKit2WebExtension.Frame.Frame
    -- ^ /@targetFrame@/: the t'GI.WebKit2WebExtension.Objects.Frame.Frame' containing the form\'s target,
    --     which may be the same as /@sourceFrame@/ if no target was specified
    -> IO ()

type C_WebFormManagerWillSubmitFormCallback =
    Ptr WebFormManager ->                   -- object
    Ptr JavaScriptCore.Value.Value ->
    Ptr WebKit2WebExtension.Frame.Frame ->
    Ptr WebKit2WebExtension.Frame.Frame ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WebFormManagerWillSubmitFormCallback :: 
    GObject a => (a -> WebFormManagerWillSubmitFormCallback) ->
    C_WebFormManagerWillSubmitFormCallback
wrap_WebFormManagerWillSubmitFormCallback :: forall a.
GObject a =>
(a -> WebFormManagerWillSendSubmitEventCallback)
-> C_WebFormManagerWillSendSubmitEventCallback
wrap_WebFormManagerWillSubmitFormCallback a -> WebFormManagerWillSendSubmitEventCallback
gi'cb Ptr WebFormManager
gi'selfPtr Ptr Value
form Ptr Frame
sourceFrame Ptr Frame
targetFrame Ptr ()
_ = do
    Value
form' <- ((ManagedPtr Value -> Value) -> Ptr Value -> IO Value
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Value -> Value
JavaScriptCore.Value.Value) Ptr Value
form
    Frame
sourceFrame' <- ((ManagedPtr Frame -> Frame) -> Ptr Frame -> IO Frame
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Frame -> Frame
WebKit2WebExtension.Frame.Frame) Ptr Frame
sourceFrame
    Frame
targetFrame' <- ((ManagedPtr Frame -> Frame) -> Ptr Frame -> IO Frame
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Frame -> Frame
WebKit2WebExtension.Frame.Frame) Ptr Frame
targetFrame
    Ptr WebFormManager -> (WebFormManager -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr WebFormManager
gi'selfPtr ((WebFormManager -> IO ()) -> IO ())
-> (WebFormManager -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \WebFormManager
gi'self -> a -> WebFormManagerWillSendSubmitEventCallback
gi'cb (WebFormManager -> a
forall a b. Coercible a b => a -> b
Coerce.coerce WebFormManager
gi'self)  Value
form' Frame
sourceFrame' Frame
targetFrame'


-- | Connect a signal handler for the [willSubmitForm](#signal:willSubmitForm) 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' webFormManager #willSubmitForm callback
-- @
-- 
-- 
onWebFormManagerWillSubmitForm :: (IsWebFormManager a, MonadIO m) => a -> ((?self :: a) => WebFormManagerWillSubmitFormCallback) -> m SignalHandlerId
onWebFormManagerWillSubmitForm :: forall a (m :: * -> *).
(IsWebFormManager a, MonadIO m) =>
a
-> ((?self::a) => WebFormManagerWillSendSubmitEventCallback)
-> m SignalHandlerId
onWebFormManagerWillSubmitForm a
obj (?self::a) => WebFormManagerWillSendSubmitEventCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> WebFormManagerWillSendSubmitEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WebFormManagerWillSendSubmitEventCallback
WebFormManagerWillSendSubmitEventCallback
cb
    let wrapped' :: C_WebFormManagerWillSendSubmitEventCallback
wrapped' = (a -> WebFormManagerWillSendSubmitEventCallback)
-> C_WebFormManagerWillSendSubmitEventCallback
forall a.
GObject a =>
(a -> WebFormManagerWillSendSubmitEventCallback)
-> C_WebFormManagerWillSendSubmitEventCallback
wrap_WebFormManagerWillSubmitFormCallback a -> WebFormManagerWillSendSubmitEventCallback
wrapped
    FunPtr C_WebFormManagerWillSendSubmitEventCallback
wrapped'' <- C_WebFormManagerWillSendSubmitEventCallback
-> IO (FunPtr C_WebFormManagerWillSendSubmitEventCallback)
mk_WebFormManagerWillSubmitFormCallback C_WebFormManagerWillSendSubmitEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WebFormManagerWillSendSubmitEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"will-submit-form" FunPtr C_WebFormManagerWillSendSubmitEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [willSubmitForm](#signal:willSubmitForm) 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' webFormManager #willSubmitForm callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWebFormManagerWillSubmitForm :: (IsWebFormManager a, MonadIO m) => a -> ((?self :: a) => WebFormManagerWillSubmitFormCallback) -> m SignalHandlerId
afterWebFormManagerWillSubmitForm :: forall a (m :: * -> *).
(IsWebFormManager a, MonadIO m) =>
a
-> ((?self::a) => WebFormManagerWillSendSubmitEventCallback)
-> m SignalHandlerId
afterWebFormManagerWillSubmitForm a
obj (?self::a) => WebFormManagerWillSendSubmitEventCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> WebFormManagerWillSendSubmitEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WebFormManagerWillSendSubmitEventCallback
WebFormManagerWillSendSubmitEventCallback
cb
    let wrapped' :: C_WebFormManagerWillSendSubmitEventCallback
wrapped' = (a -> WebFormManagerWillSendSubmitEventCallback)
-> C_WebFormManagerWillSendSubmitEventCallback
forall a.
GObject a =>
(a -> WebFormManagerWillSendSubmitEventCallback)
-> C_WebFormManagerWillSendSubmitEventCallback
wrap_WebFormManagerWillSubmitFormCallback a -> WebFormManagerWillSendSubmitEventCallback
wrapped
    FunPtr C_WebFormManagerWillSendSubmitEventCallback
wrapped'' <- C_WebFormManagerWillSendSubmitEventCallback
-> IO (FunPtr C_WebFormManagerWillSendSubmitEventCallback)
mk_WebFormManagerWillSubmitFormCallback C_WebFormManagerWillSendSubmitEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WebFormManagerWillSendSubmitEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"will-submit-form" FunPtr C_WebFormManagerWillSendSubmitEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WebFormManagerWillSubmitFormSignalInfo
instance SignalInfo WebFormManagerWillSubmitFormSignalInfo where
    type HaskellCallbackType WebFormManagerWillSubmitFormSignalInfo = WebFormManagerWillSubmitFormCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WebFormManagerWillSubmitFormCallback cb
        cb'' <- mk_WebFormManagerWillSubmitFormCallback cb'
        connectSignalFunPtr obj "will-submit-form" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.WebFormManager::will-submit-form"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.30/docs/GI-WebKit2WebExtension-Objects-WebFormManager.html#g:signal:willSubmitForm"})

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList WebFormManager
type instance O.AttributeList WebFormManager = WebFormManagerAttributeList
type WebFormManagerAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList WebFormManager = WebFormManagerSignalList
type WebFormManagerSignalList = ('[ '("formControlsAssociated", WebFormManagerFormControlsAssociatedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("willSendSubmitEvent", WebFormManagerWillSendSubmitEventSignalInfo), '("willSubmitForm", WebFormManagerWillSubmitFormSignalInfo)] :: [(Symbol, DK.Type)])

#endif

-- method WebFormManager::input_element_auto_fill
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "element"
--           , argType =
--               TInterface Name { namespace = "JavaScriptCore" , name = "Value" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #JSCValue" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the text to set" , 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_form_manager_input_element_auto_fill" webkit_web_form_manager_input_element_auto_fill :: 
    Ptr JavaScriptCore.Value.Value ->       -- element : TInterface (Name {namespace = "JavaScriptCore", name = "Value"})
    CString ->                              -- value : TBasicType TUTF8
    IO ()

-- | Set the value of an HTML input element as if it had been edited by
-- the user, triggering a change event, and set it as filled automatically.
-- If /@element@/ is not an HTML input element this function does nothing.
-- 
-- /Since: 2.40/
webFormManagerInputElementAutoFill ::
    (B.CallStack.HasCallStack, MonadIO m, JavaScriptCore.Value.IsValue a) =>
    a
    -- ^ /@element@/: a t'GI.JavaScriptCore.Objects.Value.Value'
    -> T.Text
    -- ^ /@value@/: the text to set
    -> m ()
webFormManagerInputElementAutoFill :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsValue a) =>
a -> Text -> m ()
webFormManagerInputElementAutoFill a
element Text
value = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Value
element' <- a -> IO (Ptr Value)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
    CString
value' <- Text -> IO CString
textToCString Text
value
    Ptr Value -> CString -> IO ()
webkit_web_form_manager_input_element_auto_fill Ptr Value
element' CString
value'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
value'
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif

-- method WebFormManager::input_element_is_auto_filled
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "element"
--           , argType =
--               TInterface Name { namespace = "JavaScriptCore" , name = "Value" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #JSCValue" , 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_form_manager_input_element_is_auto_filled" webkit_web_form_manager_input_element_is_auto_filled :: 
    Ptr JavaScriptCore.Value.Value ->       -- element : TInterface (Name {namespace = "JavaScriptCore", name = "Value"})
    IO CInt

-- | Get whether /@element@/ is an HTML input element that has been filled automatically.
-- 
-- /Since: 2.40/
webFormManagerInputElementIsAutoFilled ::
    (B.CallStack.HasCallStack, MonadIO m, JavaScriptCore.Value.IsValue a) =>
    a
    -- ^ /@element@/: a t'GI.JavaScriptCore.Objects.Value.Value'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@element@/ is an HTML input element that has been filled automatically,
    --    or 'P.False' otherwise
webFormManagerInputElementIsAutoFilled :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsValue a) =>
a -> m Bool
webFormManagerInputElementIsAutoFilled a
element = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Value
element' <- a -> IO (Ptr Value)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
    CInt
result <- Ptr Value -> IO CInt
webkit_web_form_manager_input_element_is_auto_filled Ptr Value
element'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method WebFormManager::input_element_is_user_edited
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "element"
--           , argType =
--               TInterface Name { namespace = "JavaScriptCore" , name = "Value" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #JSCValue" , 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_form_manager_input_element_is_user_edited" webkit_web_form_manager_input_element_is_user_edited :: 
    Ptr JavaScriptCore.Value.Value ->       -- element : TInterface (Name {namespace = "JavaScriptCore", name = "Value"})
    IO CInt

-- | Get whether /@element@/ is an HTML text input element that has been edited by a user action.
-- 
-- /Since: 2.40/
webFormManagerInputElementIsUserEdited ::
    (B.CallStack.HasCallStack, MonadIO m, JavaScriptCore.Value.IsValue a) =>
    a
    -- ^ /@element@/: a t'GI.JavaScriptCore.Objects.Value.Value'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@element@/ is an HTML text input element that has been edited by a user action,
    --    or 'P.False' otherwise
webFormManagerInputElementIsUserEdited :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsValue a) =>
a -> m Bool
webFormManagerInputElementIsUserEdited a
element = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Value
element' <- a -> IO (Ptr Value)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
    CInt
result <- Ptr Value -> IO CInt
webkit_web_form_manager_input_element_is_user_edited Ptr Value
element'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
#endif