    {-# LANGUAGE TypeApplications #-}

    -- | Copyright  : Will Thompson and Iñaki García Etxebarria
    -- License    : LGPL-2.1
    -- Maintainer : Iñaki García Etxebarria
    --
    -- Combines two shortcut triggers.
    --
    -- The @GtkAlternativeTrigger@ triggers when either of the two trigger.
    --
    -- This can be cascaded to combine more than two triggers.

    #if !defined(__HADDOCK_VERSION__)
    #define ENABLE_OVERLOADING
    #endif

    module GI.Gtk.Objects.AlternativeTrigger
        (

    -- * Exported types
        AlternativeTrigger(..)                  ,
        IsAlternativeTrigger                    ,
        toAlternativeTrigger                    ,

     -- * 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"), [compare]("GI.Gtk.Objects.ShortcutTrigger#g:method:compare"), [equal]("GI.Gtk.Objects.ShortcutTrigger#g:method:equal"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [hash]("GI.Gtk.Objects.ShortcutTrigger#g:method:hash"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [itemsChanged]("GI.Gio.Interfaces.ListModel#g:method:itemsChanged"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [print]("GI.Gtk.Objects.ShortcutTrigger#g:method:print"), [printLabel]("GI.Gtk.Objects.ShortcutTrigger#g:method:printLabel"), [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"), [toLabel]("GI.Gtk.Objects.ShortcutTrigger#g:method:toLabel"), [toString]("GI.Gtk.Objects.ShortcutTrigger#g:method:toString"), [trigger]("GI.Gtk.Objects.ShortcutTrigger#g:method:trigger"), [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"), [getFirst]("GI.Gtk.Objects.AlternativeTrigger#g:method:getFirst"), [getItem]("GI.Gio.Interfaces.ListModel#g:method:getItem"), [getItemType]("GI.Gio.Interfaces.ListModel#g:method:getItemType"), [getNItems]("GI.Gio.Interfaces.ListModel#g:method:getNItems"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getSecond]("GI.Gtk.Objects.AlternativeTrigger#g:method:getSecond").
    --
    -- ==== 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)
        ResolveAlternativeTriggerMethod         ,
    #endif

    -- ** getFirst #method:getFirst#

    #if defined(ENABLE_OVERLOADING)
        AlternativeTriggerGetFirstMethodInfo    ,
    #endif
        alternativeTriggerGetFirst              ,

    -- ** getSecond #method:getSecond#

    #if defined(ENABLE_OVERLOADING)
        AlternativeTriggerGetSecondMethodInfo   ,
    #endif
        alternativeTriggerGetSecond             ,

    -- ** new #method:new#

        alternativeTriggerNew                   ,

    -- ** newv #method:newv#

        alternativeTriggerNewv                  ,

     -- * Properties

    -- ** first #attr:first#
    -- | The first @GtkShortcutTrigger@ to check.

    #if defined(ENABLE_OVERLOADING)
        AlternativeTriggerFirstPropertyInfo     ,
    #endif
    #if defined(ENABLE_OVERLOADING)
        alternativeTriggerFirst                 ,
    #endif
        constructAlternativeTriggerFirst        ,
        getAlternativeTriggerFirst              ,

    -- ** second #attr:second#
    -- | The second @GtkShortcutTrigger@ to check.

    #if defined(ENABLE_OVERLOADING)
        AlternativeTriggerSecondPropertyInfo    ,
    #endif
    #if defined(ENABLE_OVERLOADING)
        alternativeTriggerSecond                ,
    #endif
        constructAlternativeTriggerSecond       ,
        getAlternativeTriggerSecond             ,

        ) 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.Structs.String as GLib.String
    import qualified GI.GObject.Objects.Object as GObject.Object
    import qualified GI.Gdk.Enums as Gdk.Enums
    import qualified GI.Gdk.Flags as Gdk.Flags
    import qualified GI.Gdk.Objects.Display as Gdk.Display
    import qualified GI.Gdk.Objects.Event as Gdk.Event
    import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
    import {-# SOURCE #-} qualified GI.Gtk.Objects.ShortcutTrigger as Gtk.ShortcutTrigger

    #else
    import qualified GI.GObject.Objects.Object as GObject.Object
    import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
    import {-# SOURCE #-} qualified GI.Gtk.Objects.ShortcutTrigger as Gtk.ShortcutTrigger

    #endif

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

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

    foreign import ccall "gtk_alternative_trigger_get_type"
        c_gtk_alternative_trigger_get_type :: IO B.Types.GType

    instance B.Types.TypedObject AlternativeTrigger where
        glibType :: IO GType
    glibType = IO GType
    c_gtk_alternative_trigger_get_type

    instance B.Types.GObject AlternativeTrigger

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

    instance O.HasParentTypes AlternativeTrigger
    type instance O.ParentTypes AlternativeTrigger = '[Gtk.ShortcutTrigger.ShortcutTrigger, GObject.Object.Object, Gio.ListModel.ListModel]

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

    -- | Convert t'AlternativeTrigger' 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 AlternativeTrigger) where
        gvalueGType_ :: IO GType
    gvalueGType_ = IO GType
    c_gtk_alternative_trigger_get_type
        gvalueSet_ :: Ptr GValue -> Maybe AlternativeTrigger -> IO ()
    gvalueSet_ Ptr GValue
    gv Maybe AlternativeTrigger
    P.Nothing = Ptr GValue -> Ptr AlternativeTrigger -> IO ()
    forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
    B.GValue.set_object Ptr GValue
    gv (Ptr AlternativeTrigger
    forall a. Ptr a
    FP.nullPtr :: FP.Ptr AlternativeTrigger)
        gvalueSet_ Ptr GValue
    gv (P.Just AlternativeTrigger
    obj) = AlternativeTrigger -> (Ptr AlternativeTrigger -> IO ()) -> IO ()
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    B.ManagedPtr.withManagedPtr AlternativeTrigger
    obj (Ptr GValue -> Ptr AlternativeTrigger -> IO ()
    forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
    B.GValue.set_object Ptr GValue
    gv)
        gvalueGet_ :: Ptr GValue -> IO (Maybe AlternativeTrigger)
    gvalueGet_ Ptr GValue
    gv = do
            ptr <- Ptr GValue -> IO (Ptr AlternativeTrigger)
    forall a. GObject a => Ptr GValue -> IO (Ptr a)
    B.GValue.get_object Ptr GValue
    gv :: IO (FP.Ptr AlternativeTrigger)
            if ptr /= FP.nullPtr
            then P.Just <$> B.ManagedPtr.newObject AlternativeTrigger ptr
            else return P.Nothing

    #if defined(ENABLE_OVERLOADING)
    type family ResolveAlternativeTriggerMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
        ResolveAlternativeTriggerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
        ResolveAlternativeTriggerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
        ResolveAlternativeTriggerMethod "compare" o = Gtk.ShortcutTrigger.ShortcutTriggerCompareMethodInfo
        ResolveAlternativeTriggerMethod "equal" o = Gtk.ShortcutTrigger.ShortcutTriggerEqualMethodInfo
        ResolveAlternativeTriggerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
        ResolveAlternativeTriggerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
        ResolveAlternativeTriggerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
        ResolveAlternativeTriggerMethod "hash" o = Gtk.ShortcutTrigger.ShortcutTriggerHashMethodInfo
        ResolveAlternativeTriggerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
        ResolveAlternativeTriggerMethod "itemsChanged" o = Gio.ListModel.ListModelItemsChangedMethodInfo
        ResolveAlternativeTriggerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
        ResolveAlternativeTriggerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
        ResolveAlternativeTriggerMethod "print" o = Gtk.ShortcutTrigger.ShortcutTriggerPrintMethodInfo
        ResolveAlternativeTriggerMethod "printLabel" o = Gtk.ShortcutTrigger.ShortcutTriggerPrintLabelMethodInfo
        ResolveAlternativeTriggerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
        ResolveAlternativeTriggerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
        ResolveAlternativeTriggerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
        ResolveAlternativeTriggerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
        ResolveAlternativeTriggerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
        ResolveAlternativeTriggerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
        ResolveAlternativeTriggerMethod "toLabel" o = Gtk.ShortcutTrigger.ShortcutTriggerToLabelMethodInfo
        ResolveAlternativeTriggerMethod "toString" o = Gtk.ShortcutTrigger.ShortcutTriggerToStringMethodInfo
        ResolveAlternativeTriggerMethod "trigger" o = Gtk.ShortcutTrigger.ShortcutTriggerTriggerMethodInfo
        ResolveAlternativeTriggerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
        ResolveAlternativeTriggerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
        ResolveAlternativeTriggerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
        ResolveAlternativeTriggerMethod "getFirst" o = AlternativeTriggerGetFirstMethodInfo
        ResolveAlternativeTriggerMethod "getItem" o = Gio.ListModel.ListModelGetItemMethodInfo
        ResolveAlternativeTriggerMethod "getItemType" o = Gio.ListModel.ListModelGetItemTypeMethodInfo
        ResolveAlternativeTriggerMethod "getNItems" o = Gio.ListModel.ListModelGetNItemsMethodInfo
        ResolveAlternativeTriggerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
        ResolveAlternativeTriggerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
        ResolveAlternativeTriggerMethod "getSecond" o = AlternativeTriggerGetSecondMethodInfo
        ResolveAlternativeTriggerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
        ResolveAlternativeTriggerMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
        ResolveAlternativeTriggerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
        ResolveAlternativeTriggerMethod l o = O.MethodResolutionFailed l o

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

    #endif

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

    #endif

    -- VVV Prop "first"
       -- Type: TInterface (Name {namespace = "Gtk", name = "ShortcutTrigger"})
       -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
       -- Nullable: (Just False,Nothing)

    -- | Get the value of the “@first@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' alternativeTrigger #first
    -- @
    getAlternativeTriggerFirst :: (MonadIO m, IsAlternativeTrigger o) => o -> m Gtk.ShortcutTrigger.ShortcutTrigger
    getAlternativeTriggerFirst :: forall (m :: * -> *) o.
    (MonadIO m, IsAlternativeTrigger o) =>
    o -> m ShortcutTrigger
    getAlternativeTriggerFirst o
    obj = IO ShortcutTrigger -> m ShortcutTrigger
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO ShortcutTrigger -> m ShortcutTrigger)
    -> IO ShortcutTrigger -> m ShortcutTrigger
    forall a b. (a -> b) -> a -> b
    $ Text -> IO (Maybe ShortcutTrigger) -> IO ShortcutTrigger
    forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
    checkUnexpectedNothing Text
    "getAlternativeTriggerFirst" (IO (Maybe ShortcutTrigger) -> IO ShortcutTrigger)
    -> IO (Maybe ShortcutTrigger) -> IO ShortcutTrigger
    forall a b. (a -> b) -> a -> b
    $ o
    -> String
    -> (ManagedPtr ShortcutTrigger -> ShortcutTrigger)
    -> IO (Maybe ShortcutTrigger)
    forall a b.
    (GObject a, GObject b) =>
    a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
    B.Properties.getObjectPropertyObject o
    obj String
    "first" ManagedPtr ShortcutTrigger -> ShortcutTrigger
    Gtk.ShortcutTrigger.ShortcutTrigger

    -- | Construct a t'GValueConstruct' with valid value for the “@first@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
    constructAlternativeTriggerFirst :: (IsAlternativeTrigger o, MIO.MonadIO m, Gtk.ShortcutTrigger.IsShortcutTrigger a) => a -> m (GValueConstruct o)
    constructAlternativeTriggerFirst :: forall o (m :: * -> *) a.
    (IsAlternativeTrigger o, MonadIO m, IsShortcutTrigger a) =>
    a -> m (GValueConstruct o)
    constructAlternativeTriggerFirst a
    val = IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
    -> IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ do
        IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a. IO a -> IO a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
    -> IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ String -> Maybe a -> IO (GValueConstruct o)
    forall a o.
    GObject a =>
    String -> Maybe a -> IO (GValueConstruct o)
    B.Properties.constructObjectPropertyObject String
    "first" (a -> Maybe a
    forall a. a -> Maybe a
    P.Just a
    val)

    #if defined(ENABLE_OVERLOADING)
    data AlternativeTriggerFirstPropertyInfo
    instance AttrInfo AlternativeTriggerFirstPropertyInfo where
        type AttrAllowedOps AlternativeTriggerFirstPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
        type AttrBaseTypeConstraint AlternativeTriggerFirstPropertyInfo = IsAlternativeTrigger
        type AttrSetTypeConstraint AlternativeTriggerFirstPropertyInfo = Gtk.ShortcutTrigger.IsShortcutTrigger
        type AttrTransferTypeConstraint AlternativeTriggerFirstPropertyInfo = Gtk.ShortcutTrigger.IsShortcutTrigger
        type AttrTransferType AlternativeTriggerFirstPropertyInfo = Gtk.ShortcutTrigger.ShortcutTrigger
        type AttrGetType AlternativeTriggerFirstPropertyInfo = Gtk.ShortcutTrigger.ShortcutTrigger
        type AttrLabel AlternativeTriggerFirstPropertyInfo = "first"
        type AttrOrigin AlternativeTriggerFirstPropertyInfo = AlternativeTrigger
        attrGet = getAlternativeTriggerFirst
        attrSet = undefined
        attrPut = undefined
        attrTransfer _ v = do
            unsafeCastTo Gtk.ShortcutTrigger.ShortcutTrigger v
        attrConstruct = constructAlternativeTriggerFirst
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.AlternativeTrigger.first"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-AlternativeTrigger.html#g:attr:first"
            })
    #endif

    -- VVV Prop "second"
       -- Type: TInterface (Name {namespace = "Gtk", name = "ShortcutTrigger"})
       -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
       -- Nullable: (Just False,Nothing)

    -- | Get the value of the “@second@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' alternativeTrigger #second
    -- @
    getAlternativeTriggerSecond :: (MonadIO m, IsAlternativeTrigger o) => o -> m Gtk.ShortcutTrigger.ShortcutTrigger
    getAlternativeTriggerSecond :: forall (m :: * -> *) o.
    (MonadIO m, IsAlternativeTrigger o) =>
    o -> m ShortcutTrigger
    getAlternativeTriggerSecond o
    obj = IO ShortcutTrigger -> m ShortcutTrigger
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO ShortcutTrigger -> m ShortcutTrigger)
    -> IO ShortcutTrigger -> m ShortcutTrigger
    forall a b. (a -> b) -> a -> b
    $ Text -> IO (Maybe ShortcutTrigger) -> IO ShortcutTrigger
    forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
    checkUnexpectedNothing Text
    "getAlternativeTriggerSecond" (IO (Maybe ShortcutTrigger) -> IO ShortcutTrigger)
    -> IO (Maybe ShortcutTrigger) -> IO ShortcutTrigger
    forall a b. (a -> b) -> a -> b
    $ o
    -> String
    -> (ManagedPtr ShortcutTrigger -> ShortcutTrigger)
    -> IO (Maybe ShortcutTrigger)
    forall a b.
    (GObject a, GObject b) =>
    a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
    B.Properties.getObjectPropertyObject o
    obj String
    "second" ManagedPtr ShortcutTrigger -> ShortcutTrigger
    Gtk.ShortcutTrigger.ShortcutTrigger

    -- | Construct a t'GValueConstruct' with valid value for the “@second@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
    constructAlternativeTriggerSecond :: (IsAlternativeTrigger o, MIO.MonadIO m, Gtk.ShortcutTrigger.IsShortcutTrigger a) => a -> m (GValueConstruct o)
    constructAlternativeTriggerSecond :: forall o (m :: * -> *) a.
    (IsAlternativeTrigger o, MonadIO m, IsShortcutTrigger a) =>
    a -> m (GValueConstruct o)
    constructAlternativeTriggerSecond a
    val = IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
    -> IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ do
        IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a. IO a -> IO a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
    -> IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ String -> Maybe a -> IO (GValueConstruct o)
    forall a o.
    GObject a =>
    String -> Maybe a -> IO (GValueConstruct o)
    B.Properties.constructObjectPropertyObject String
    "second" (a -> Maybe a
    forall a. a -> Maybe a
    P.Just a
    val)

    #if defined(ENABLE_OVERLOADING)
    data AlternativeTriggerSecondPropertyInfo
    instance AttrInfo AlternativeTriggerSecondPropertyInfo where
        type AttrAllowedOps AlternativeTriggerSecondPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
        type AttrBaseTypeConstraint AlternativeTriggerSecondPropertyInfo = IsAlternativeTrigger
        type AttrSetTypeConstraint AlternativeTriggerSecondPropertyInfo = Gtk.ShortcutTrigger.IsShortcutTrigger
        type AttrTransferTypeConstraint AlternativeTriggerSecondPropertyInfo = Gtk.ShortcutTrigger.IsShortcutTrigger
        type AttrTransferType AlternativeTriggerSecondPropertyInfo = Gtk.ShortcutTrigger.ShortcutTrigger
        type AttrGetType AlternativeTriggerSecondPropertyInfo = Gtk.ShortcutTrigger.ShortcutTrigger
        type AttrLabel AlternativeTriggerSecondPropertyInfo = "second"
        type AttrOrigin AlternativeTriggerSecondPropertyInfo = AlternativeTrigger
        attrGet = getAlternativeTriggerSecond
        attrSet = undefined
        attrPut = undefined
        attrTransfer _ v = do
            unsafeCastTo Gtk.ShortcutTrigger.ShortcutTrigger v
        attrConstruct = constructAlternativeTriggerSecond
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.AlternativeTrigger.second"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-AlternativeTrigger.html#g:attr:second"
            })
    #endif

    #if defined(ENABLE_OVERLOADING)
    instance O.HasAttributeList AlternativeTrigger
    type instance O.AttributeList AlternativeTrigger = AlternativeTriggerAttributeList
    type AlternativeTriggerAttributeList = ('[ '("first", AlternativeTriggerFirstPropertyInfo), '("second", AlternativeTriggerSecondPropertyInfo)] :: [(Symbol, DK.Type)])
    #endif

    #if defined(ENABLE_OVERLOADING)
    alternativeTriggerFirst :: AttrLabelProxy "first"
    alternativeTriggerFirst = AttrLabelProxy

    alternativeTriggerSecond :: AttrLabelProxy "second"
    alternativeTriggerSecond = AttrLabelProxy

    #endif

    #if defined(ENABLE_OVERLOADING)
    type instance O.SignalList AlternativeTrigger = AlternativeTriggerSignalList
    type AlternativeTriggerSignalList = ('[ '("itemsChanged", Gio.ListModel.ListModelItemsChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])

    #endif

    -- method AlternativeTrigger::new
    -- method type : Constructor
    -- Args: [ Arg
    --           { argCName = "first"
    --           , argType =
    --               TInterface Name { namespace = "Gtk" , name = "ShortcutTrigger" }
    --           , argCType = Just "GtkShortcutTrigger*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "The first trigger that may trigger"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferEverything
    --           }
    --       , Arg
    --           { argCName = "second"
    --           , argType =
    --               TInterface Name { namespace = "Gtk" , name = "ShortcutTrigger" }
    --           , argCType = Just "GtkShortcutTrigger*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "The second trigger that may trigger"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferEverything
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just
    --               (TInterface
    --                  Name { namespace = "Gtk" , name = "AlternativeTrigger" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "gtk_alternative_trigger_new" gtk_alternative_trigger_new ::
        Ptr Gtk.ShortcutTrigger.ShortcutTrigger -> -- first : TInterface (Name {namespace = "Gtk", name = "ShortcutTrigger"})
        Ptr Gtk.ShortcutTrigger.ShortcutTrigger -> -- second : TInterface (Name {namespace = "Gtk", name = "ShortcutTrigger"})
        IO (Ptr AlternativeTrigger)

    -- | Creates a @GtkShortcutTrigger@ that will trigger whenever
    -- either of the two given triggers gets triggered.
    --
    -- Note that nesting is allowed, so if you want more than two
    -- alternative, create a new alternative trigger for each option.
    alternativeTriggerNew ::
        (B.CallStack.HasCallStack, MonadIO m, Gtk.ShortcutTrigger.IsShortcutTrigger a, Gtk.ShortcutTrigger.IsShortcutTrigger b) =>
        a
        -- ^ /@first@/: The first trigger that may trigger
        -> b
        -- ^ /@second@/: The second trigger that may trigger
        -> m AlternativeTrigger
        -- ^ __Returns:__ a new @GtkShortcutTrigger@
    alternativeTriggerNew :: forall (m :: * -> *) a b.
    (HasCallStack, MonadIO m, IsShortcutTrigger a,
     IsShortcutTrigger b) =>
    a -> b -> m AlternativeTrigger
    alternativeTriggerNew a
    first b
    second = IO AlternativeTrigger -> m AlternativeTrigger
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO AlternativeTrigger -> m AlternativeTrigger)
    -> IO AlternativeTrigger -> m AlternativeTrigger
    forall a b. (a -> b) -> a -> b
    $ do
        first' <- a -> IO (Ptr ShortcutTrigger)
    forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
    B.ManagedPtr.disownObject a
    first
        second' <- B.ManagedPtr.disownObject second
        result <- gtk_alternative_trigger_new first' second'
        checkUnexpectedReturnNULL "alternativeTriggerNew" result
        result' <- (wrapObject AlternativeTrigger) result
        touchManagedPtr first
        touchManagedPtr second
        return result'

    #if defined(ENABLE_OVERLOADING)
    #endif

    -- method AlternativeTrigger::newv
    -- method type : Constructor
    -- Args: [ Arg
    --           { argCName = "triggers"
    --           , argType =
    --               TCArray
    --                 False
    --                 (-1)
    --                 1
    --                 (TInterface Name { namespace = "Gtk" , name = "ShortcutTrigger" })
    --           , argCType = Just "GtkShortcutTrigger**"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the triggers" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferEverything
    --           }
    --       , Arg
    --           { argCName = "n_triggers"
    --           , argType = TBasicType TSize
    --           , argCType = Just "size_t"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the number of triggers"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: [ Arg
    --              { argCName = "n_triggers"
    --              , argType = TBasicType TSize
    --              , argCType = Just "size_t"
    --              , direction = DirectionIn
    --              , mayBeNull = False
    --              , argDoc =
    --                  Documentation
    --                    { rawDocText = Just "the number of triggers"
    --                    , sinceVersion = Nothing
    --                    }
    --              , argScope = ScopeTypeInvalid
    --              , argClosure = -1
    --              , argDestroy = -1
    --              , argCallerAllocates = False
    --              , argCallbackUserData = False
    --              , transfer = TransferNothing
    --              }
    --          ]
    -- returnType: Just
    --               (TInterface
    --                  Name { namespace = "Gtk" , name = "AlternativeTrigger" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "gtk_alternative_trigger_newv" gtk_alternative_trigger_newv ::
        Ptr (Ptr Gtk.ShortcutTrigger.ShortcutTrigger) -> -- triggers : TCArray False (-1) 1 (TInterface (Name {namespace = "Gtk", name = "ShortcutTrigger"}))
        FCT.CSize ->                            -- n_triggers : TBasicType TSize
        IO (Ptr AlternativeTrigger)

    -- | Creates a @GtkShortcutTrigger@ that will trigger whenever
    -- any of the given triggers gets triggered.
    --
    -- /Since: 4.24/
    alternativeTriggerNewv ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        [Gtk.ShortcutTrigger.ShortcutTrigger]
        -- ^ /@triggers@/: the triggers
        -> m AlternativeTrigger
        -- ^ __Returns:__ a new @GtkShortcutTrigger@
    alternativeTriggerNewv :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    [ShortcutTrigger] -> m AlternativeTrigger
    alternativeTriggerNewv [ShortcutTrigger]
    triggers = IO AlternativeTrigger -> m AlternativeTrigger
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO AlternativeTrigger -> m AlternativeTrigger)
    -> IO AlternativeTrigger -> m AlternativeTrigger
    forall a b. (a -> b) -> a -> b
    $ do
        let nTriggers :: CSize
    nTriggers = Int -> CSize
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (Int -> CSize) -> Int -> CSize
    forall a b. (a -> b) -> a -> b
    $ [ShortcutTrigger] -> Int
    forall a. [a] -> Int
    forall (t :: * -> *) a. Foldable t => t a -> Int
    P.length [ShortcutTrigger]
    triggers
        triggers' <- (ShortcutTrigger -> IO (Ptr ShortcutTrigger))
    -> [ShortcutTrigger] -> IO [Ptr ShortcutTrigger]
    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 ShortcutTrigger -> IO (Ptr ShortcutTrigger)
    forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
    B.ManagedPtr.disownObject [ShortcutTrigger]
    triggers
        triggers'' <- packPtrArray triggers'
        result <- gtk_alternative_trigger_newv triggers'' nTriggers
        checkUnexpectedReturnNULL "alternativeTriggerNewv" result
        result' <- (wrapObject AlternativeTrigger) result
        mapM_ touchManagedPtr triggers
        return result'

    #if defined(ENABLE_OVERLOADING)
    #endif

    -- method AlternativeTrigger::get_first
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType =
    --               TInterface Name { namespace = "Gtk" , name = "AlternativeTrigger" }
    --           , argCType = Just "GtkAlternativeTrigger*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "an alternative `GtkShortcutTrigger`"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just
    --               (TInterface Name { namespace = "Gtk" , name = "ShortcutTrigger" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "gtk_alternative_trigger_get_first" gtk_alternative_trigger_get_first ::
        Ptr AlternativeTrigger ->               -- self : TInterface (Name {namespace = "Gtk", name = "AlternativeTrigger"})
        IO (Ptr Gtk.ShortcutTrigger.ShortcutTrigger)

    -- | Gets the first of the two alternative triggers that may
    -- trigger /@self@/.
    --
    -- 'GI.Gtk.Objects.AlternativeTrigger.alternativeTriggerGetSecond' will return
    -- the other one.
    alternativeTriggerGetFirst ::
        (B.CallStack.HasCallStack, MonadIO m, IsAlternativeTrigger a) =>
        a
        -- ^ /@self@/: an alternative @GtkShortcutTrigger@
        -> m Gtk.ShortcutTrigger.ShortcutTrigger
        -- ^ __Returns:__ the first alternative trigger
    alternativeTriggerGetFirst :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsAlternativeTrigger a) =>
    a -> m ShortcutTrigger
    alternativeTriggerGetFirst a
    self = IO ShortcutTrigger -> m ShortcutTrigger
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO ShortcutTrigger -> m ShortcutTrigger)
    -> IO ShortcutTrigger -> m ShortcutTrigger
    forall a b. (a -> b) -> a -> b
    $ do
        self' <- a -> IO (Ptr AlternativeTrigger)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        result <- gtk_alternative_trigger_get_first self'
        checkUnexpectedReturnNULL "alternativeTriggerGetFirst" result
        result' <- (newObject Gtk.ShortcutTrigger.ShortcutTrigger) result
        touchManagedPtr self
        return result'

    #if defined(ENABLE_OVERLOADING)
    data AlternativeTriggerGetFirstMethodInfo
    instance (signature ~ (m Gtk.ShortcutTrigger.ShortcutTrigger), MonadIO m, IsAlternativeTrigger a) => O.OverloadedMethod AlternativeTriggerGetFirstMethodInfo a signature where
        overloadedMethod = alternativeTriggerGetFirst

    instance O.OverloadedMethodInfo AlternativeTriggerGetFirstMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.AlternativeTrigger.alternativeTriggerGetFirst",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-AlternativeTrigger.html#v:alternativeTriggerGetFirst"
            })

    #endif

    -- method AlternativeTrigger::get_second
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "self"
    --           , argType =
    --               TInterface Name { namespace = "Gtk" , name = "AlternativeTrigger" }
    --           , argCType = Just "GtkAlternativeTrigger*"
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "an alternative `GtkShortcutTrigger`"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just
    --               (TInterface Name { namespace = "Gtk" , name = "ShortcutTrigger" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "gtk_alternative_trigger_get_second" gtk_alternative_trigger_get_second ::
        Ptr AlternativeTrigger ->               -- self : TInterface (Name {namespace = "Gtk", name = "AlternativeTrigger"})
        IO (Ptr Gtk.ShortcutTrigger.ShortcutTrigger)

    -- | Gets the second of the two alternative triggers that may
    -- trigger /@self@/.
    --
    -- 'GI.Gtk.Objects.AlternativeTrigger.alternativeTriggerGetFirst' will return
    -- the other one.
    alternativeTriggerGetSecond ::
        (B.CallStack.HasCallStack, MonadIO m, IsAlternativeTrigger a) =>
        a
        -- ^ /@self@/: an alternative @GtkShortcutTrigger@
        -> m Gtk.ShortcutTrigger.ShortcutTrigger
        -- ^ __Returns:__ the second alternative trigger
    alternativeTriggerGetSecond :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsAlternativeTrigger a) =>
    a -> m ShortcutTrigger
    alternativeTriggerGetSecond a
    self = IO ShortcutTrigger -> m ShortcutTrigger
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO ShortcutTrigger -> m ShortcutTrigger)
    -> IO ShortcutTrigger -> m ShortcutTrigger
    forall a b. (a -> b) -> a -> b
    $ do
        self' <- a -> IO (Ptr AlternativeTrigger)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    self
        result <- gtk_alternative_trigger_get_second self'
        checkUnexpectedReturnNULL "alternativeTriggerGetSecond" result
        result' <- (newObject Gtk.ShortcutTrigger.ShortcutTrigger) result
        touchManagedPtr self
        return result'

    #if defined(ENABLE_OVERLOADING)
    data AlternativeTriggerGetSecondMethodInfo
    instance (signature ~ (m Gtk.ShortcutTrigger.ShortcutTrigger), MonadIO m, IsAlternativeTrigger a) => O.OverloadedMethod AlternativeTriggerGetSecondMethodInfo a signature where
        overloadedMethod = alternativeTriggerGetSecond

    instance O.OverloadedMethodInfo AlternativeTriggerGetSecondMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gtk.Objects.AlternativeTrigger.alternativeTriggerGetSecond",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-AlternativeTrigger.html#v:alternativeTriggerGetSecond"
            })

    #endif