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

    -- | Copyright  : Will Thompson and Iñaki García Etxebarria
    -- License    : LGPL-2.1
    -- Maintainer : Iñaki García Etxebarria
    --
    -- @GAppInfoMonitor@ monitors application information for changes.
    --
    -- @GAppInfoMonitor@ is a very simple object used for monitoring the app
    -- info database for changes (newly installed or removed applications).
    --
    -- Call [func/@gio@/.AppInfoMonitor.get] to get a @GAppInfoMonitor@ and connect
    -- to the [AppInfoMonitor::changed]("GI.Gio.Objects.AppInfoMonitor#g:signal:changed") signal. The signal will be emitted once when
    -- the app info database changes, and will not be emitted again until after the
    -- next call to [func/@gio@/.AppInfo.get_all] or another @g_app_info_*()@ function.
    -- This is because monitoring the app info database for changes is expensive.
    --
    -- The following functions will re-arm the [AppInfoMonitor::changed]("GI.Gio.Objects.AppInfoMonitor#g:signal:changed")
    -- signal so it can be emitted again:
    --
    --  - [func/@gio@/.AppInfo.get_all]
    --  - [func/@gio@/.AppInfo.get_all_for_type]
    --  - [func/@gio@/.AppInfo.get_default_for_type]
    --  - [func/@gio@/.AppInfo.get_fallback_for_type]
    --  - [func/@gio@/.AppInfo.get_recommended_for_type]
    --  - <http://developer.gnome.org/gio/stable/../gio-unix/type_func.DesktopAppInfo.get_implementation.html `g_desktop_app_info_get_implementations()`>
    --  - <http://developer.gnome.org/gio/stable/../gio-unix/ctor.DesktopAppInfo.new.html `g_desktop_app_info_new()`>
    --  - <http://developer.gnome.org/gio/stable/../gio-unix/ctor.DesktopAppInfo.new_from_filename.html `g_desktop_app_info_new_from_filename()`>
    --  - <http://developer.gnome.org/gio/stable/../gio-unix/ctor.DesktopAppInfo.new_from_keyfile.html `g_desktop_app_info_new_from_keyfile()`>
    --  - <http://developer.gnome.org/gio/stable/../gio-unix/type_func.DesktopAppInfo.search.html `g_desktop_app_info_search()`>
    --
    -- The latter functions are available if using
    -- <http://developer.gnome.org/gio/stable/../gio-unix/class.DesktopAppInfo.html `GDesktopAppInfo`> from
    -- @gio-unix-2.0.pc@ (GIR namespace @GioUnix-2.0@).
    --
    -- In the usual case, applications should try to make note of the change
    -- (doing things like invalidating caches) but not act on it. In
    -- particular, applications should avoid making calls to @GAppInfo@ APIs
    -- in response to the change signal, deferring these until the time that
    -- the updated data is actually required. The exception to this case is when
    -- application information is actually being displayed on the screen
    -- (for example, during a search or when the list of all applications is shown).
    -- The reason for this is that changes to the list of installed applications
    -- often come in groups (like during system updates) and rescanning the list
    -- on every change is pointless and expensive.
    --
    -- /Since: 2.40/

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

    module GI.Gio.Objects.AppInfoMonitor
        (

    -- * Exported types
        AppInfoMonitor(..)                      ,
        IsAppInfoMonitor                        ,
        toAppInfoMonitor                        ,

     -- * 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)
        ResolveAppInfoMonitorMethod             ,
    #endif

    -- ** get #method:get#

        appInfoMonitorGet                       ,

     -- * Signals

    -- ** changed #signal:changed#

        AppInfoMonitorChangedCallback           ,
    #if defined(ENABLE_OVERLOADING)
        AppInfoMonitorChangedSignalInfo         ,
    #endif
        afterAppInfoMonitorChanged              ,
        onAppInfoMonitorChanged                 ,

        ) 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.GObject.Objects.Object as GObject.Object

    #else
    import qualified GI.GObject.Objects.Object as GObject.Object

    #endif

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

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

    foreign import ccall "g_app_info_monitor_get_type"
        c_g_app_info_monitor_get_type :: IO B.Types.GType

    instance B.Types.TypedObject AppInfoMonitor where
        glibType :: IO GType
    glibType = IO GType
    c_g_app_info_monitor_get_type

    instance B.Types.GObject AppInfoMonitor

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

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

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

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

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

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

    #endif

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

    #endif

    -- signal AppInfoMonitor::changed
    -- | Signal emitted when the app info database changes, when applications are
    -- installed or removed.
    --
    -- /Since: 2.40/
    type AppInfoMonitorChangedCallback =
        IO ()

    type C_AppInfoMonitorChangedCallback =
        Ptr AppInfoMonitor ->                   -- object
        Ptr () ->                               -- user_data
        IO ()

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

    wrap_AppInfoMonitorChangedCallback ::
        GObject a => (a -> AppInfoMonitorChangedCallback) ->
        C_AppInfoMonitorChangedCallback
    wrap_AppInfoMonitorChangedCallback :: forall a.
    GObject a =>
    (a -> IO ()) -> C_AppInfoMonitorChangedCallback
    wrap_AppInfoMonitorChangedCallback a -> IO ()
    gi'cb Ptr AppInfoMonitor
    gi'selfPtr Ptr ()
    _ = do
        Ptr AppInfoMonitor -> (AppInfoMonitor -> IO ()) -> IO ()
    forall o b.
    (HasCallStack, GObject o) =>
    Ptr o -> (o -> IO b) -> IO b
    B.ManagedPtr.withNewObject Ptr AppInfoMonitor
    gi'selfPtr ((AppInfoMonitor -> IO ()) -> IO ())
    -> (AppInfoMonitor -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \AppInfoMonitor
    gi'self -> a -> IO ()
    gi'cb (AppInfoMonitor -> a
    forall a b. Coercible a b => a -> b
    Coerce.coerce AppInfoMonitor
    gi'self)

    -- | Connect a signal handler for the [changed](#signal:changed) 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' appInfoMonitor #changed callback
    -- @
    --
    --
    onAppInfoMonitorChanged :: (IsAppInfoMonitor a, MonadIO m) => a -> ((?self :: a) => AppInfoMonitorChangedCallback) -> m SignalHandlerId
    onAppInfoMonitorChanged :: forall a (m :: * -> *).
    (IsAppInfoMonitor a, MonadIO m) =>
    a -> ((?self::a) => IO ()) -> m SignalHandlerId
    onAppInfoMonitorChanged a
    obj (?self::a) => IO ()
    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 -> IO ()
    wrapped a
    self = let ?self = a
    ?self::a
    self in IO ()
    (?self::a) => IO ()
    cb
        let wrapped' :: C_AppInfoMonitorChangedCallback
    wrapped' = (a -> IO ()) -> C_AppInfoMonitorChangedCallback
    forall a.
    GObject a =>
    (a -> IO ()) -> C_AppInfoMonitorChangedCallback
    wrap_AppInfoMonitorChangedCallback a -> IO ()
    wrapped
        FunPtr C_AppInfoMonitorChangedCallback
    wrapped'' <- C_AppInfoMonitorChangedCallback
    -> IO (FunPtr C_AppInfoMonitorChangedCallback)
    mk_AppInfoMonitorChangedCallback C_AppInfoMonitorChangedCallback
    wrapped'
        a
    -> Text
    -> FunPtr C_AppInfoMonitorChangedCallback
    -> SignalConnectMode
    -> Maybe Text
    -> IO SignalHandlerId
    forall o a.
    GObject o =>
    o
    -> Text
    -> FunPtr a
    -> SignalConnectMode
    -> Maybe Text
    -> IO SignalHandlerId
    connectSignalFunPtr a
    obj Text
    "changed" FunPtr C_AppInfoMonitorChangedCallback
    wrapped'' SignalConnectMode
    SignalConnectBefore Maybe Text
    forall a. Maybe a
    Nothing

    -- | Connect a signal handler for the [changed](#signal:changed) 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' appInfoMonitor #changed 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.
    --
    afterAppInfoMonitorChanged :: (IsAppInfoMonitor a, MonadIO m) => a -> ((?self :: a) => AppInfoMonitorChangedCallback) -> m SignalHandlerId
    afterAppInfoMonitorChanged :: forall a (m :: * -> *).
    (IsAppInfoMonitor a, MonadIO m) =>
    a -> ((?self::a) => IO ()) -> m SignalHandlerId
    afterAppInfoMonitorChanged a
    obj (?self::a) => IO ()
    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 -> IO ()
    wrapped a
    self = let ?self = a
    ?self::a
    self in IO ()
    (?self::a) => IO ()
    cb
        let wrapped' :: C_AppInfoMonitorChangedCallback
    wrapped' = (a -> IO ()) -> C_AppInfoMonitorChangedCallback
    forall a.
    GObject a =>
    (a -> IO ()) -> C_AppInfoMonitorChangedCallback
    wrap_AppInfoMonitorChangedCallback a -> IO ()
    wrapped
        FunPtr C_AppInfoMonitorChangedCallback
    wrapped'' <- C_AppInfoMonitorChangedCallback
    -> IO (FunPtr C_AppInfoMonitorChangedCallback)
    mk_AppInfoMonitorChangedCallback C_AppInfoMonitorChangedCallback
    wrapped'
        a
    -> Text
    -> FunPtr C_AppInfoMonitorChangedCallback
    -> SignalConnectMode
    -> Maybe Text
    -> IO SignalHandlerId
    forall o a.
    GObject o =>
    o
    -> Text
    -> FunPtr a
    -> SignalConnectMode
    -> Maybe Text
    -> IO SignalHandlerId
    connectSignalFunPtr a
    obj Text
    "changed" FunPtr C_AppInfoMonitorChangedCallback
    wrapped'' SignalConnectMode
    SignalConnectAfter Maybe Text
    forall a. Maybe a
    Nothing

    #if defined(ENABLE_OVERLOADING)
    data AppInfoMonitorChangedSignalInfo
    instance SignalInfo AppInfoMonitorChangedSignalInfo where
        type HaskellCallbackType AppInfoMonitorChangedSignalInfo = AppInfoMonitorChangedCallback
        connectSignal obj cb connectMode detail = do
            let cb' = wrap_AppInfoMonitorChangedCallback cb
            cb'' <- mk_AppInfoMonitorChangedCallback cb'
            connectSignalFunPtr obj "changed" cb'' connectMode detail
        dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Objects.AppInfoMonitor::changed"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-AppInfoMonitor.html#g:signal:changed"})

    #endif

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

    #if defined(ENABLE_OVERLOADING)
    #endif

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

    #endif

    -- method AppInfoMonitor::get
    -- method type : MemberFunction
    -- Args: []
    -- Lengths: []
    -- returnType: Just
    --               (TInterface Name { namespace = "Gio" , name = "AppInfoMonitor" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_app_info_monitor_get" g_app_info_monitor_get ::
        IO (Ptr AppInfoMonitor)

    -- | Gets the t'GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor' for the current thread-default main
    -- context.
    --
    -- The t'GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor' will emit a “changed” signal in the
    -- thread-default main context whenever the list of installed
    -- applications (as reported by 'GI.Gio.Functions.appInfoGetAll') may have changed.
    --
    -- The [AppInfoMonitor::changed]("GI.Gio.Objects.AppInfoMonitor#g:signal:changed") signal will only be emitted once until
    -- 'GI.Gio.Functions.appInfoGetAll' (or another @g_app_info_*()@ function) is called. Doing
    -- so will re-arm the signal ready to notify about the next change.
    --
    -- You must only call 'GI.GObject.Objects.Object.objectUnref' on the return value from under
    -- the same main context as you created it.
    --
    -- /Since: 2.40/
    appInfoMonitorGet ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        m AppInfoMonitor
        -- ^ __Returns:__ a reference to a t'GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor'
    appInfoMonitorGet :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m AppInfoMonitor
    appInfoMonitorGet  = IO AppInfoMonitor -> m AppInfoMonitor
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO AppInfoMonitor -> m AppInfoMonitor)
    -> IO AppInfoMonitor -> m AppInfoMonitor
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr AppInfoMonitor
    result <- IO (Ptr AppInfoMonitor)
    g_app_info_monitor_get
        Text -> Ptr AppInfoMonitor -> IO ()
    forall a. HasCallStack => Text -> Ptr a -> IO ()
    checkUnexpectedReturnNULL Text
    "appInfoMonitorGet" Ptr AppInfoMonitor
    result
        AppInfoMonitor
    result' <- ((ManagedPtr AppInfoMonitor -> AppInfoMonitor)
    -> Ptr AppInfoMonitor -> IO AppInfoMonitor
    forall a b.
    (HasCallStack, GObject a, GObject b) =>
    (ManagedPtr a -> a) -> Ptr b -> IO a
    wrapObject ManagedPtr AppInfoMonitor -> AppInfoMonitor
    AppInfoMonitor) Ptr AppInfoMonitor
    result
        AppInfoMonitor -> IO AppInfoMonitor
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return AppInfoMonitor
    result'

    #if defined(ENABLE_OVERLOADING)
    #endif