packages feed

gi-wireplumber-0.5.14: GI/Wp/Objects/EventHook.hs

{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- The event hook is a structure that describes some executable action that an event dispatcher will run when a matching event has been received.

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

module GI.Wp.Objects.EventHook
    ( 

-- * Exported types
    EventHook(..)                           ,
    IsEventHook                             ,
    toEventHook                             ,


 -- * 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"), [finish]("GI.Wp.Objects.EventHook#g:method:finish"), [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"), [run]("GI.Wp.Objects.EventHook#g:method:run"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [runsForEvent]("GI.Wp.Objects.EventHook#g:method:runsForEvent"), [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"), [getMatchingEventTypes]("GI.Wp.Objects.EventHook#g:method:getMatchingEventTypes"), [getName]("GI.Wp.Objects.EventHook#g:method:getName"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getRunsAfterHooks]("GI.Wp.Objects.EventHook#g:method:getRunsAfterHooks"), [getRunsBeforeHooks]("GI.Wp.Objects.EventHook#g:method:getRunsBeforeHooks").
-- 
-- ==== 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)
    ResolveEventHookMethod                  ,
#endif

-- ** finish #method:finish#

#if defined(ENABLE_OVERLOADING)
    EventHookFinishMethodInfo               ,
#endif
    eventHookFinish                         ,


-- ** getMatchingEventTypes #method:getMatchingEventTypes#

#if defined(ENABLE_OVERLOADING)
    EventHookGetMatchingEventTypesMethodInfo,
#endif
    eventHookGetMatchingEventTypes          ,


-- ** getName #method:getName#

#if defined(ENABLE_OVERLOADING)
    EventHookGetNameMethodInfo              ,
#endif
    eventHookGetName                        ,


-- ** getRunsAfterHooks #method:getRunsAfterHooks#

#if defined(ENABLE_OVERLOADING)
    EventHookGetRunsAfterHooksMethodInfo    ,
#endif
    eventHookGetRunsAfterHooks              ,


-- ** getRunsBeforeHooks #method:getRunsBeforeHooks#

#if defined(ENABLE_OVERLOADING)
    EventHookGetRunsBeforeHooksMethodInfo   ,
#endif
    eventHookGetRunsBeforeHooks             ,


-- ** run #method:run#

#if defined(ENABLE_OVERLOADING)
    EventHookRunMethodInfo                  ,
#endif
    eventHookRun                            ,


-- ** runsForEvent #method:runsForEvent#

#if defined(ENABLE_OVERLOADING)
    EventHookRunsForEventMethodInfo         ,
#endif
    eventHookRunsForEvent                   ,




 -- * Properties


-- ** dispatcher #attr:dispatcher#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    EventHookDispatcherPropertyInfo         ,
#endif
#if defined(ENABLE_OVERLOADING)
    eventHookDispatcher                     ,
#endif
    getEventHookDispatcher                  ,


-- ** name #attr:name#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    EventHookNamePropertyInfo               ,
#endif
    constructEventHookName                  ,
#if defined(ENABLE_OVERLOADING)
    eventHookName                           ,
#endif
    getEventHookName                        ,


-- ** runsAfterHooks #attr:runsAfterHooks#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    EventHookRunsAfterHooksPropertyInfo     ,
#endif
    constructEventHookRunsAfterHooks        ,
#if defined(ENABLE_OVERLOADING)
    eventHookRunsAfterHooks                 ,
#endif
    getEventHookRunsAfterHooks              ,


-- ** runsBeforeHooks #attr:runsBeforeHooks#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    EventHookRunsBeforeHooksPropertyInfo    ,
#endif
    constructEventHookRunsBeforeHooks       ,
#if defined(ENABLE_OVERLOADING)
    eventHookRunsBeforeHooks                ,
#endif
    getEventHookRunsBeforeHooks             ,




    ) 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 Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT

-- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.MainContext as GLib.MainContext
import qualified GI.GLib.Structs.Source as GLib.Source
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Wp.Callbacks as Wp.Callbacks
import {-# SOURCE #-} qualified GI.Wp.Enums as Wp.Enums
import {-# SOURCE #-} qualified GI.Wp.Flags as Wp.Flags
import {-# SOURCE #-} qualified GI.Wp.Objects.Conf as Wp.Conf
import {-# SOURCE #-} qualified GI.Wp.Objects.Core as Wp.Core
import {-# SOURCE #-} qualified GI.Wp.Objects.EventDispatcher as Wp.EventDispatcher
import {-# SOURCE #-} qualified GI.Wp.Objects.Object as Wp.Object
import {-# SOURCE #-} qualified GI.Wp.Objects.ObjectManager as Wp.ObjectManager
import {-# SOURCE #-} qualified GI.Wp.Structs.Event as Wp.Event
import {-# SOURCE #-} qualified GI.Wp.Structs.Iterator as Wp.Iterator
import {-# SOURCE #-} qualified GI.Wp.Structs.IteratorMethods as Wp.IteratorMethods
import {-# SOURCE #-} qualified GI.Wp.Structs.ObjectInterest as Wp.ObjectInterest
import {-# SOURCE #-} qualified GI.Wp.Structs.Properties as Wp.Properties
import {-# SOURCE #-} qualified GI.Wp.Structs.SpaJson as Wp.SpaJson

#else
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Wp.Objects.EventDispatcher as Wp.EventDispatcher
import {-# SOURCE #-} qualified GI.Wp.Structs.Event as Wp.Event

#endif

-- | Memory-managed wrapper type.
newtype EventHook = EventHook (SP.ManagedPtr EventHook)
    deriving (Eq)

instance SP.ManagedPtrNewtype EventHook where
    toManagedPtr (EventHook p) = p

foreign import ccall "wp_event_hook_get_type"
    c_wp_event_hook_get_type :: IO B.Types.GType

instance B.Types.TypedObject EventHook where
    glibType = c_wp_event_hook_get_type

instance B.Types.GObject EventHook

-- | Type class for types which can be safely cast to t'EventHook', for instance with `toEventHook`.
class (SP.GObject o, O.IsDescendantOf EventHook o) => IsEventHook o
instance (SP.GObject o, O.IsDescendantOf EventHook o) => IsEventHook o

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

-- | Cast to t'EventHook', for types for which this is known to be safe. For general casts, use 'Data.GI.Base.ManagedPtr.castTo'.
toEventHook :: (MIO.MonadIO m, IsEventHook o) => o -> m EventHook
toEventHook = MIO.liftIO . B.ManagedPtr.unsafeCastTo EventHook

-- | Convert t'EventHook' to and from t'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe EventHook) where
    gvalueGType_ = c_wp_event_hook_get_type
    gvalueSet_ gv P.Nothing = B.GValue.set_object gv (FP.nullPtr :: FP.Ptr EventHook)
    gvalueSet_ gv (P.Just obj) = B.ManagedPtr.withManagedPtr obj (B.GValue.set_object gv)
    gvalueGet_ gv = do
        ptr <- B.GValue.get_object gv :: IO (FP.Ptr EventHook)
        if ptr /= FP.nullPtr
        then P.Just <$> B.ManagedPtr.newObject EventHook ptr
        else return P.Nothing
        
    

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

instance (info ~ ResolveEventHookMethod t EventHook, O.OverloadedMethod info EventHook p) => OL.IsLabel t (EventHook -> 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 ~ ResolveEventHookMethod t EventHook, O.OverloadedMethod info EventHook p, R.HasField t EventHook p) => R.HasField t EventHook p where
    getField = O.overloadedMethod @info

#endif

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

#endif

-- VVV Prop "dispatcher"
   -- Type: TInterface (Name {namespace = "Wp", name = "EventDispatcher"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@dispatcher@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' eventHook #dispatcher
-- @
getEventHookDispatcher :: (MonadIO m, IsEventHook o) => o -> m (Maybe Wp.EventDispatcher.EventDispatcher)
getEventHookDispatcher obj = MIO.liftIO $ B.Properties.getObjectPropertyObject obj "dispatcher" Wp.EventDispatcher.EventDispatcher

#if defined(ENABLE_OVERLOADING)
data EventHookDispatcherPropertyInfo
instance AttrInfo EventHookDispatcherPropertyInfo where
    type AttrAllowedOps EventHookDispatcherPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint EventHookDispatcherPropertyInfo = IsEventHook
    type AttrSetTypeConstraint EventHookDispatcherPropertyInfo = (~) ()
    type AttrTransferTypeConstraint EventHookDispatcherPropertyInfo = (~) ()
    type AttrTransferType EventHookDispatcherPropertyInfo = ()
    type AttrGetType EventHookDispatcherPropertyInfo = (Maybe Wp.EventDispatcher.EventDispatcher)
    type AttrLabel EventHookDispatcherPropertyInfo = "dispatcher"
    type AttrOrigin EventHookDispatcherPropertyInfo = EventHook
    attrGet = getEventHookDispatcher
    attrSet = undefined
    attrPut = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Objects.EventHook.dispatcher"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14/docs/GI-Wp-Objects-EventHook.html#g:attr:dispatcher"
        })
#endif

-- VVV Prop "name"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@name@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' eventHook #name
-- @
getEventHookName :: (MonadIO m, IsEventHook o) => o -> m T.Text
getEventHookName obj = MIO.liftIO $ checkUnexpectedNothing "getEventHookName" $ B.Properties.getObjectPropertyString obj "name"

-- | Construct a t'GValueConstruct' with valid value for the “@name@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructEventHookName :: (IsEventHook o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructEventHookName val = MIO.liftIO $ do
    MIO.liftIO $ B.Properties.constructObjectPropertyString "name" (P.Just val)

#if defined(ENABLE_OVERLOADING)
data EventHookNamePropertyInfo
instance AttrInfo EventHookNamePropertyInfo where
    type AttrAllowedOps EventHookNamePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint EventHookNamePropertyInfo = IsEventHook
    type AttrSetTypeConstraint EventHookNamePropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint EventHookNamePropertyInfo = (~) T.Text
    type AttrTransferType EventHookNamePropertyInfo = T.Text
    type AttrGetType EventHookNamePropertyInfo = T.Text
    type AttrLabel EventHookNamePropertyInfo = "name"
    type AttrOrigin EventHookNamePropertyInfo = EventHook
    attrGet = getEventHookName
    attrSet = undefined
    attrPut = undefined
    attrTransfer _ v = do
        return v
    attrConstruct = constructEventHookName
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Objects.EventHook.name"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14/docs/GI-Wp-Objects-EventHook.html#g:attr:name"
        })
#endif

-- VVV Prop "runs-after-hooks"
   -- Type: TCArray True (-1) (-1) (TBasicType TUTF8)
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@runs-after-hooks@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' eventHook #runsAfterHooks
-- @
getEventHookRunsAfterHooks :: (MonadIO m, IsEventHook o) => o -> m [T.Text]
getEventHookRunsAfterHooks obj = MIO.liftIO $ checkUnexpectedNothing "getEventHookRunsAfterHooks" $ B.Properties.getObjectPropertyStringArray obj "runs-after-hooks"

-- | Construct a t'GValueConstruct' with valid value for the “@runs-after-hooks@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructEventHookRunsAfterHooks :: (IsEventHook o, MIO.MonadIO m) => [T.Text] -> m (GValueConstruct o)
constructEventHookRunsAfterHooks val = MIO.liftIO $ do
    MIO.liftIO $ B.Properties.constructObjectPropertyStringArray "runs-after-hooks" (P.Just val)

#if defined(ENABLE_OVERLOADING)
data EventHookRunsAfterHooksPropertyInfo
instance AttrInfo EventHookRunsAfterHooksPropertyInfo where
    type AttrAllowedOps EventHookRunsAfterHooksPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint EventHookRunsAfterHooksPropertyInfo = IsEventHook
    type AttrSetTypeConstraint EventHookRunsAfterHooksPropertyInfo = (~) [T.Text]
    type AttrTransferTypeConstraint EventHookRunsAfterHooksPropertyInfo = (~) [T.Text]
    type AttrTransferType EventHookRunsAfterHooksPropertyInfo = [T.Text]
    type AttrGetType EventHookRunsAfterHooksPropertyInfo = [T.Text]
    type AttrLabel EventHookRunsAfterHooksPropertyInfo = "runs-after-hooks"
    type AttrOrigin EventHookRunsAfterHooksPropertyInfo = EventHook
    attrGet = getEventHookRunsAfterHooks
    attrSet = undefined
    attrPut = undefined
    attrTransfer _ v = do
        return v
    attrConstruct = constructEventHookRunsAfterHooks
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Objects.EventHook.runsAfterHooks"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14/docs/GI-Wp-Objects-EventHook.html#g:attr:runsAfterHooks"
        })
#endif

-- VVV Prop "runs-before-hooks"
   -- Type: TCArray True (-1) (-1) (TBasicType TUTF8)
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@runs-before-hooks@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' eventHook #runsBeforeHooks
-- @
getEventHookRunsBeforeHooks :: (MonadIO m, IsEventHook o) => o -> m [T.Text]
getEventHookRunsBeforeHooks obj = MIO.liftIO $ checkUnexpectedNothing "getEventHookRunsBeforeHooks" $ B.Properties.getObjectPropertyStringArray obj "runs-before-hooks"

-- | Construct a t'GValueConstruct' with valid value for the “@runs-before-hooks@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructEventHookRunsBeforeHooks :: (IsEventHook o, MIO.MonadIO m) => [T.Text] -> m (GValueConstruct o)
constructEventHookRunsBeforeHooks val = MIO.liftIO $ do
    MIO.liftIO $ B.Properties.constructObjectPropertyStringArray "runs-before-hooks" (P.Just val)

#if defined(ENABLE_OVERLOADING)
data EventHookRunsBeforeHooksPropertyInfo
instance AttrInfo EventHookRunsBeforeHooksPropertyInfo where
    type AttrAllowedOps EventHookRunsBeforeHooksPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint EventHookRunsBeforeHooksPropertyInfo = IsEventHook
    type AttrSetTypeConstraint EventHookRunsBeforeHooksPropertyInfo = (~) [T.Text]
    type AttrTransferTypeConstraint EventHookRunsBeforeHooksPropertyInfo = (~) [T.Text]
    type AttrTransferType EventHookRunsBeforeHooksPropertyInfo = [T.Text]
    type AttrGetType EventHookRunsBeforeHooksPropertyInfo = [T.Text]
    type AttrLabel EventHookRunsBeforeHooksPropertyInfo = "runs-before-hooks"
    type AttrOrigin EventHookRunsBeforeHooksPropertyInfo = EventHook
    attrGet = getEventHookRunsBeforeHooks
    attrSet = undefined
    attrPut = undefined
    attrTransfer _ v = do
        return v
    attrConstruct = constructEventHookRunsBeforeHooks
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Objects.EventHook.runsBeforeHooks"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14/docs/GI-Wp-Objects-EventHook.html#g:attr:runsBeforeHooks"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList EventHook
type instance O.AttributeList EventHook = EventHookAttributeList
type EventHookAttributeList = ('[ '("dispatcher", EventHookDispatcherPropertyInfo), '("name", EventHookNamePropertyInfo), '("runsAfterHooks", EventHookRunsAfterHooksPropertyInfo), '("runsBeforeHooks", EventHookRunsBeforeHooksPropertyInfo)] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
eventHookDispatcher :: AttrLabelProxy "dispatcher"
eventHookDispatcher = AttrLabelProxy

eventHookName :: AttrLabelProxy "name"
eventHookName = AttrLabelProxy

eventHookRunsAfterHooks :: AttrLabelProxy "runsAfterHooks"
eventHookRunsAfterHooks = AttrLabelProxy

eventHookRunsBeforeHooks :: AttrLabelProxy "runsBeforeHooks"
eventHookRunsBeforeHooks = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList EventHook = EventHookSignalList
type EventHookSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])

#endif

-- method EventHook::finish
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "EventHook" }
--           , argCType = Just "WpEventHook*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the event hook" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "res"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncResult" }
--           , argCType = Just "GAsyncResult*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the async operation result"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "wp_event_hook_finish" wp_event_hook_finish :: 
    Ptr EventHook ->                        -- self : TInterface (Name {namespace = "Wp", name = "EventHook"})
    Ptr Gio.AsyncResult.AsyncResult ->      -- res : TInterface (Name {namespace = "Gio", name = "AsyncResult"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Finishes the async operation that was started by 'GI.Wp.Objects.EventHook.eventHookRun'.
eventHookFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsEventHook a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    -- ^ /@self@/: the event hook
    -> b
    -- ^ /@res@/: the async operation result
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
eventHookFinish self res = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    res' <- unsafeManagedPtrCastPtr res
    onException (do
        _ <- propagateGError $ wp_event_hook_finish self' res'
        touchManagedPtr self
        touchManagedPtr res
        return ()
     ) (do
        return ()
     )

#if defined(ENABLE_OVERLOADING)
data EventHookFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsEventHook a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod EventHookFinishMethodInfo a signature where
    overloadedMethod = eventHookFinish

instance O.OverloadedMethodInfo EventHookFinishMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Objects.EventHook.eventHookFinish",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14/docs/GI-Wp-Objects-EventHook.html#v:eventHookFinish"
        })


#endif

-- method EventHook::get_matching_event_types
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "EventHook" }
--           , argCType = Just "WpEventHook*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the event hook" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TPtrArray (TBasicType TUTF8))
-- throws : False
-- Skip return : False

foreign import ccall "wp_event_hook_get_matching_event_types" wp_event_hook_get_matching_event_types :: 
    Ptr EventHook ->                        -- self : TInterface (Name {namespace = "Wp", name = "EventHook"})
    IO (Ptr (GPtrArray CString))

-- | Gets all the matching event types for this hook if any.
-- 
-- /Since: 0.5.13/
eventHookGetMatchingEventTypes ::
    (B.CallStack.HasCallStack, MonadIO m, IsEventHook a) =>
    a
    -- ^ /@self@/: the event hook
    -> m (Maybe [T.Text])
    -- ^ __Returns:__ the matching event types for this hook if any.
eventHookGetMatchingEventTypes self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- wp_event_hook_get_matching_event_types self'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- unpackGPtrArray result'
        result''' <- mapM cstringToText result''
        mapPtrArray freeMem result'
        unrefPtrArray result'
        return result'''
    touchManagedPtr self
    return maybeResult

#if defined(ENABLE_OVERLOADING)
data EventHookGetMatchingEventTypesMethodInfo
instance (signature ~ (m (Maybe [T.Text])), MonadIO m, IsEventHook a) => O.OverloadedMethod EventHookGetMatchingEventTypesMethodInfo a signature where
    overloadedMethod = eventHookGetMatchingEventTypes

instance O.OverloadedMethodInfo EventHookGetMatchingEventTypesMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Objects.EventHook.eventHookGetMatchingEventTypes",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14/docs/GI-Wp-Objects-EventHook.html#v:eventHookGetMatchingEventTypes"
        })


#endif

-- method EventHook::get_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "EventHook" }
--           , argCType = Just "WpEventHook*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the event hook" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "wp_event_hook_get_name" wp_event_hook_get_name :: 
    Ptr EventHook ->                        -- self : TInterface (Name {namespace = "Wp", name = "EventHook"})
    IO CString

-- | Returns the name of the hook.
eventHookGetName ::
    (B.CallStack.HasCallStack, MonadIO m, IsEventHook a) =>
    a
    -- ^ /@self@/: the event hook
    -> m T.Text
    -- ^ __Returns:__ the event hook name
eventHookGetName self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- wp_event_hook_get_name self'
    checkUnexpectedReturnNULL "eventHookGetName" result
    result' <- cstringToText result
    touchManagedPtr self
    return result'

#if defined(ENABLE_OVERLOADING)
data EventHookGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsEventHook a) => O.OverloadedMethod EventHookGetNameMethodInfo a signature where
    overloadedMethod = eventHookGetName

instance O.OverloadedMethodInfo EventHookGetNameMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Objects.EventHook.eventHookGetName",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14/docs/GI-Wp-Objects-EventHook.html#v:eventHookGetName"
        })


#endif

-- method EventHook::get_runs_after_hooks
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "EventHook" }
--           , argCType = Just "WpEventHook*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the event hook" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TCArray True (-1) (-1) (TBasicType TUTF8))
-- throws : False
-- Skip return : False

foreign import ccall "wp_event_hook_get_runs_after_hooks" wp_event_hook_get_runs_after_hooks :: 
    Ptr EventHook ->                        -- self : TInterface (Name {namespace = "Wp", name = "EventHook"})
    IO (Ptr CString)

-- | Returns the names of the hooks that should run before this hook, or in other words, this hook should run after them.
eventHookGetRunsAfterHooks ::
    (B.CallStack.HasCallStack, MonadIO m, IsEventHook a) =>
    a
    -- ^ /@self@/: the event hook
    -> m [T.Text]
    -- ^ __Returns:__ a NULL-terminated array of hook names
eventHookGetRunsAfterHooks self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- wp_event_hook_get_runs_after_hooks self'
    checkUnexpectedReturnNULL "eventHookGetRunsAfterHooks" result
    result' <- unpackZeroTerminatedUTF8CArray result
    touchManagedPtr self
    return result'

#if defined(ENABLE_OVERLOADING)
data EventHookGetRunsAfterHooksMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsEventHook a) => O.OverloadedMethod EventHookGetRunsAfterHooksMethodInfo a signature where
    overloadedMethod = eventHookGetRunsAfterHooks

instance O.OverloadedMethodInfo EventHookGetRunsAfterHooksMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Objects.EventHook.eventHookGetRunsAfterHooks",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14/docs/GI-Wp-Objects-EventHook.html#v:eventHookGetRunsAfterHooks"
        })


#endif

-- method EventHook::get_runs_before_hooks
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "EventHook" }
--           , argCType = Just "WpEventHook*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the event hook" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TCArray True (-1) (-1) (TBasicType TUTF8))
-- throws : False
-- Skip return : False

foreign import ccall "wp_event_hook_get_runs_before_hooks" wp_event_hook_get_runs_before_hooks :: 
    Ptr EventHook ->                        -- self : TInterface (Name {namespace = "Wp", name = "EventHook"})
    IO (Ptr CString)

-- | Returns the names of the hooks that should run after this hook, or in other words, this hook should run before them.
eventHookGetRunsBeforeHooks ::
    (B.CallStack.HasCallStack, MonadIO m, IsEventHook a) =>
    a
    -- ^ /@self@/: the event hook
    -> m [T.Text]
    -- ^ __Returns:__ a NULL-terminated array of hook names
eventHookGetRunsBeforeHooks self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- wp_event_hook_get_runs_before_hooks self'
    checkUnexpectedReturnNULL "eventHookGetRunsBeforeHooks" result
    result' <- unpackZeroTerminatedUTF8CArray result
    touchManagedPtr self
    return result'

#if defined(ENABLE_OVERLOADING)
data EventHookGetRunsBeforeHooksMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsEventHook a) => O.OverloadedMethod EventHookGetRunsBeforeHooksMethodInfo a signature where
    overloadedMethod = eventHookGetRunsBeforeHooks

instance O.OverloadedMethodInfo EventHookGetRunsBeforeHooksMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Objects.EventHook.eventHookGetRunsBeforeHooks",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14/docs/GI-Wp-Objects-EventHook.html#v:eventHookGetRunsBeforeHooks"
        })


#endif

-- method EventHook::run
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "EventHook" }
--           , argCType = Just "WpEventHook*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the event hook" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "event"
--           , argType = TInterface Name { namespace = "Wp" , name = "Event" }
--           , argCType = Just "WpEvent*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the event that triggered the hook"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , argCType = Just "GCancellable*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a GCancellable to cancel the async operation"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncReadyCallback" }
--           , argCType = Just "GAsyncReadyCallback"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a callback to fire after execution of the hook has completed"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 4
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback_data"
--           , argType = TBasicType TPtr
--           , argCType = Just "gpointer"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "data for the callback"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "wp_event_hook_run" wp_event_hook_run :: 
    Ptr EventHook ->                        -- self : TInterface (Name {namespace = "Wp", name = "EventHook"})
    Ptr Wp.Event.Event ->                   -- event : TInterface (Name {namespace = "Wp", name = "Event"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})
    Ptr () ->                               -- callback_data : TBasicType TPtr
    IO ()

-- | Runs the hook on the given event.
eventHookRun ::
    (B.CallStack.HasCallStack, MonadIO m, IsEventHook a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@self@/: the event hook
    -> Wp.Event.Event
    -- ^ /@event@/: the event that triggered the hook
    -> Maybe (b)
    -- ^ /@cancellable@/: a GCancellable to cancel the async operation
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    -- ^ /@callback@/: a callback to fire after execution of the hook has completed
    -> m ()
eventHookRun self event cancellable callback = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    event' <- unsafeManagedPtrGetPtr event
    maybeCancellable <- case cancellable of
        Nothing -> return FP.nullPtr
        Just jCancellable -> do
            jCancellable' <- unsafeManagedPtrCastPtr jCancellable
            return jCancellable'
    maybeCallback <- case callback of
        Nothing -> return FP.nullFunPtr
        Just jCallback -> do
            ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
            jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))
            poke ptrcallback jCallback'
            return jCallback'
    let callbackData = nullPtr
    wp_event_hook_run self' event' maybeCancellable maybeCallback callbackData
    touchManagedPtr self
    touchManagedPtr event
    whenJust cancellable touchManagedPtr
    return ()

#if defined(ENABLE_OVERLOADING)
data EventHookRunMethodInfo
instance (signature ~ (Wp.Event.Event -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsEventHook a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod EventHookRunMethodInfo a signature where
    overloadedMethod = eventHookRun

instance O.OverloadedMethodInfo EventHookRunMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Objects.EventHook.eventHookRun",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14/docs/GI-Wp-Objects-EventHook.html#v:eventHookRun"
        })


#endif

-- method EventHook::runs_for_event
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "EventHook" }
--           , argCType = Just "WpEventHook*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the event hook" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "event"
--           , argType = TInterface Name { namespace = "Wp" , name = "Event" }
--           , argCType = Just "WpEvent*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the event" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "wp_event_hook_runs_for_event" wp_event_hook_runs_for_event :: 
    Ptr EventHook ->                        -- self : TInterface (Name {namespace = "Wp", name = "EventHook"})
    Ptr Wp.Event.Event ->                   -- event : TInterface (Name {namespace = "Wp", name = "Event"})
    IO CInt

-- | Checks if the hook should be executed for a given event.
eventHookRunsForEvent ::
    (B.CallStack.HasCallStack, MonadIO m, IsEventHook a) =>
    a
    -- ^ /@self@/: the event hook
    -> Wp.Event.Event
    -- ^ /@event@/: the event
    -> m Bool
    -- ^ __Returns:__ TRUE if the hook should be executed for the given event, FALSE otherwise
eventHookRunsForEvent self event = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    event' <- unsafeManagedPtrGetPtr event
    result <- wp_event_hook_runs_for_event self' event'
    let result' = (/= 0) result
    touchManagedPtr self
    touchManagedPtr event
    return result'

#if defined(ENABLE_OVERLOADING)
data EventHookRunsForEventMethodInfo
instance (signature ~ (Wp.Event.Event -> m Bool), MonadIO m, IsEventHook a) => O.OverloadedMethod EventHookRunsForEventMethodInfo a signature where
    overloadedMethod = eventHookRunsForEvent

instance O.OverloadedMethodInfo EventHookRunsForEventMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Objects.EventHook.eventHookRunsForEvent",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14/docs/GI-Wp-Objects-EventHook.html#v:eventHookRunsForEvent"
        })


#endif