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

    -- | Copyright  : Will Thompson and Iñaki García Etxebarria
    -- License    : LGPL-2.1
    -- Maintainer : Iñaki García Etxebarria
    --
    -- Watches @/GUnixMounts/@ for changes.

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

    module GI.Gio.Objects.UnixMountMonitor
        (

    -- * Exported types
        UnixMountMonitor(..)                    ,
        IsUnixMountMonitor                      ,
        toUnixMountMonitor                      ,

     -- * 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"), [setRateLimit]("GI.Gio.Objects.UnixMountMonitor#g:method:setRateLimit").

    #if defined(ENABLE_OVERLOADING)
        ResolveUnixMountMonitorMethod           ,
    #endif

    -- ** get #method:get#

        unixMountMonitorGet                     ,

    -- ** new #method:new#

        unixMountMonitorNew                     ,

    -- ** setRateLimit #method:setRateLimit#

    #if defined(ENABLE_OVERLOADING)
        UnixMountMonitorSetRateLimitMethodInfo  ,
    #endif
        unixMountMonitorSetRateLimit            ,

     -- * Signals

    -- ** mountpointsChanged #signal:mountpointsChanged#

        UnixMountMonitorMountpointsChangedCallback,
    #if defined(ENABLE_OVERLOADING)
        UnixMountMonitorMountpointsChangedSignalInfo,
    #endif
        afterUnixMountMonitorMountpointsChanged ,
        onUnixMountMonitorMountpointsChanged    ,

    -- ** mountsChanged #signal:mountsChanged#

        UnixMountMonitorMountsChangedCallback   ,
    #if defined(ENABLE_OVERLOADING)
        UnixMountMonitorMountsChangedSignalInfo ,
    #endif
        afterUnixMountMonitorMountsChanged      ,
        onUnixMountMonitorMountsChanged         ,

        ) where

    import Data.GI.Base.ShortPrelude
    import qualified Data.GI.Base.ShortPrelude as SP
    import qualified Data.GI.Base.Overloading as O
    import qualified Prelude as P

    import qualified Data.GI.Base.Attributes as GI.Attributes
    import qualified Data.GI.Base.BasicTypes as B.Types
    import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
    import qualified Data.GI.Base.GArray as B.GArray
    import qualified Data.GI.Base.GClosure as B.GClosure
    import qualified Data.GI.Base.GError as B.GError
    import qualified Data.GI.Base.GHashTable as B.GHT
    import qualified Data.GI.Base.GVariant as B.GVariant
    import qualified Data.GI.Base.GValue as B.GValue
    import qualified Data.GI.Base.GParamSpec as B.GParamSpec
    import qualified Data.GI.Base.CallStack as B.CallStack
    import qualified Data.GI.Base.Properties as B.Properties
    import qualified Data.GI.Base.Signals as B.Signals
    import qualified Control.Monad.IO.Class as MIO
    import qualified Data.Coerce as Coerce
    import qualified Data.Text as T
    import qualified Data.Kind as DK
    import qualified Data.ByteString.Char8 as B
    import qualified Data.Map as Map
    import qualified Foreign.Ptr as FP
    import qualified GHC.OverloadedLabels as OL
    import qualified GHC.Records as R

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

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

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

    foreign import ccall "g_unix_mount_monitor_get_type"
        c_g_unix_mount_monitor_get_type :: IO B.Types.GType

    instance B.Types.TypedObject UnixMountMonitor where
        glibType :: IO GType
    glibType = IO GType
    c_g_unix_mount_monitor_get_type

    instance B.Types.GObject UnixMountMonitor

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

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

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

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

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

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

    #endif

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

    #endif

    -- signal UnixMountMonitor::mountpoints-changed
    -- | Emitted when the unix mount points have changed.
    type UnixMountMonitorMountpointsChangedCallback =
        IO ()

    type C_UnixMountMonitorMountpointsChangedCallback =
        Ptr UnixMountMonitor ->                 -- object
        Ptr () ->                               -- user_data
        IO ()

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

    wrap_UnixMountMonitorMountpointsChangedCallback ::
        GObject a => (a -> UnixMountMonitorMountpointsChangedCallback) ->
        C_UnixMountMonitorMountpointsChangedCallback
    wrap_UnixMountMonitorMountpointsChangedCallback :: forall a.
    GObject a =>
    (a -> IO ()) -> C_UnixMountMonitorMountpointsChangedCallback
    wrap_UnixMountMonitorMountpointsChangedCallback a -> IO ()
    gi'cb Ptr UnixMountMonitor
    gi'selfPtr Ptr ()
    _ = do
        Ptr UnixMountMonitor -> (UnixMountMonitor -> IO ()) -> IO ()
    forall o b.
    (HasCallStack, GObject o) =>
    Ptr o -> (o -> IO b) -> IO b
    B.ManagedPtr.withNewObject Ptr UnixMountMonitor
    gi'selfPtr ((UnixMountMonitor -> IO ()) -> IO ())
    -> (UnixMountMonitor -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \UnixMountMonitor
    gi'self -> a -> IO ()
    gi'cb (UnixMountMonitor -> a
    forall a b. Coercible a b => a -> b
    Coerce.coerce UnixMountMonitor
    gi'self)

    -- | Connect a signal handler for the [mountpointsChanged](#signal:mountpointsChanged) 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' unixMountMonitor #mountpointsChanged callback
    -- @
    --
    --
    onUnixMountMonitorMountpointsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> ((?self :: a) => UnixMountMonitorMountpointsChangedCallback) -> m SignalHandlerId
    onUnixMountMonitorMountpointsChanged :: forall a (m :: * -> *).
    (IsUnixMountMonitor a, MonadIO m) =>
    a -> ((?self::a) => IO ()) -> m SignalHandlerId
    onUnixMountMonitorMountpointsChanged 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_UnixMountMonitorMountpointsChangedCallback
    wrapped' = (a -> IO ()) -> C_UnixMountMonitorMountpointsChangedCallback
    forall a.
    GObject a =>
    (a -> IO ()) -> C_UnixMountMonitorMountpointsChangedCallback
    wrap_UnixMountMonitorMountpointsChangedCallback a -> IO ()
    wrapped
        FunPtr C_UnixMountMonitorMountpointsChangedCallback
    wrapped'' <- C_UnixMountMonitorMountpointsChangedCallback
    -> IO (FunPtr C_UnixMountMonitorMountpointsChangedCallback)
    mk_UnixMountMonitorMountpointsChangedCallback C_UnixMountMonitorMountpointsChangedCallback
    wrapped'
        a
    -> Text
    -> FunPtr C_UnixMountMonitorMountpointsChangedCallback
    -> SignalConnectMode
    -> Maybe Text
    -> IO SignalHandlerId
    forall o a.
    GObject o =>
    o
    -> Text
    -> FunPtr a
    -> SignalConnectMode
    -> Maybe Text
    -> IO SignalHandlerId
    connectSignalFunPtr a
    obj Text
    "mountpoints-changed" FunPtr C_UnixMountMonitorMountpointsChangedCallback
    wrapped'' SignalConnectMode
    SignalConnectBefore Maybe Text
    forall a. Maybe a
    Nothing

    -- | Connect a signal handler for the [mountpointsChanged](#signal:mountpointsChanged) 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' unixMountMonitor #mountpointsChanged 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.
    --
    afterUnixMountMonitorMountpointsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> ((?self :: a) => UnixMountMonitorMountpointsChangedCallback) -> m SignalHandlerId
    afterUnixMountMonitorMountpointsChanged :: forall a (m :: * -> *).
    (IsUnixMountMonitor a, MonadIO m) =>
    a -> ((?self::a) => IO ()) -> m SignalHandlerId
    afterUnixMountMonitorMountpointsChanged 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_UnixMountMonitorMountpointsChangedCallback
    wrapped' = (a -> IO ()) -> C_UnixMountMonitorMountpointsChangedCallback
    forall a.
    GObject a =>
    (a -> IO ()) -> C_UnixMountMonitorMountpointsChangedCallback
    wrap_UnixMountMonitorMountpointsChangedCallback a -> IO ()
    wrapped
        FunPtr C_UnixMountMonitorMountpointsChangedCallback
    wrapped'' <- C_UnixMountMonitorMountpointsChangedCallback
    -> IO (FunPtr C_UnixMountMonitorMountpointsChangedCallback)
    mk_UnixMountMonitorMountpointsChangedCallback C_UnixMountMonitorMountpointsChangedCallback
    wrapped'
        a
    -> Text
    -> FunPtr C_UnixMountMonitorMountpointsChangedCallback
    -> SignalConnectMode
    -> Maybe Text
    -> IO SignalHandlerId
    forall o a.
    GObject o =>
    o
    -> Text
    -> FunPtr a
    -> SignalConnectMode
    -> Maybe Text
    -> IO SignalHandlerId
    connectSignalFunPtr a
    obj Text
    "mountpoints-changed" FunPtr C_UnixMountMonitorMountpointsChangedCallback
    wrapped'' SignalConnectMode
    SignalConnectAfter Maybe Text
    forall a. Maybe a
    Nothing

    #if defined(ENABLE_OVERLOADING)
    data UnixMountMonitorMountpointsChangedSignalInfo
    instance SignalInfo UnixMountMonitorMountpointsChangedSignalInfo where
        type HaskellCallbackType UnixMountMonitorMountpointsChangedSignalInfo = UnixMountMonitorMountpointsChangedCallback
        connectSignal obj cb connectMode detail = do
            let cb' = wrap_UnixMountMonitorMountpointsChangedCallback cb
            cb'' <- mk_UnixMountMonitorMountpointsChangedCallback cb'
            connectSignalFunPtr obj "mountpoints-changed" cb'' connectMode detail
        dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Objects.UnixMountMonitor::mountpoints-changed"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Objects-UnixMountMonitor.html#g:signal:mountpointsChanged"})

    #endif

    -- signal UnixMountMonitor::mounts-changed
    -- | Emitted when the unix mounts have changed.
    type UnixMountMonitorMountsChangedCallback =
        IO ()

    type C_UnixMountMonitorMountsChangedCallback =
        Ptr UnixMountMonitor ->                 -- object
        Ptr () ->                               -- user_data
        IO ()

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

    wrap_UnixMountMonitorMountsChangedCallback ::
        GObject a => (a -> UnixMountMonitorMountsChangedCallback) ->
        C_UnixMountMonitorMountsChangedCallback
    wrap_UnixMountMonitorMountsChangedCallback :: forall a.
    GObject a =>
    (a -> IO ()) -> C_UnixMountMonitorMountpointsChangedCallback
    wrap_UnixMountMonitorMountsChangedCallback a -> IO ()
    gi'cb Ptr UnixMountMonitor
    gi'selfPtr Ptr ()
    _ = do
        Ptr UnixMountMonitor -> (UnixMountMonitor -> IO ()) -> IO ()
    forall o b.
    (HasCallStack, GObject o) =>
    Ptr o -> (o -> IO b) -> IO b
    B.ManagedPtr.withNewObject Ptr UnixMountMonitor
    gi'selfPtr ((UnixMountMonitor -> IO ()) -> IO ())
    -> (UnixMountMonitor -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \UnixMountMonitor
    gi'self -> a -> IO ()
    gi'cb (UnixMountMonitor -> a
    forall a b. Coercible a b => a -> b
    Coerce.coerce UnixMountMonitor
    gi'self)

    -- | Connect a signal handler for the [mountsChanged](#signal:mountsChanged) 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' unixMountMonitor #mountsChanged callback
    -- @
    --
    --
    onUnixMountMonitorMountsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> ((?self :: a) => UnixMountMonitorMountsChangedCallback) -> m SignalHandlerId
    onUnixMountMonitorMountsChanged :: forall a (m :: * -> *).
    (IsUnixMountMonitor a, MonadIO m) =>
    a -> ((?self::a) => IO ()) -> m SignalHandlerId
    onUnixMountMonitorMountsChanged 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_UnixMountMonitorMountpointsChangedCallback
    wrapped' = (a -> IO ()) -> C_UnixMountMonitorMountpointsChangedCallback
    forall a.
    GObject a =>
    (a -> IO ()) -> C_UnixMountMonitorMountpointsChangedCallback
    wrap_UnixMountMonitorMountsChangedCallback a -> IO ()
    wrapped
        FunPtr C_UnixMountMonitorMountpointsChangedCallback
    wrapped'' <- C_UnixMountMonitorMountpointsChangedCallback
    -> IO (FunPtr C_UnixMountMonitorMountpointsChangedCallback)
    mk_UnixMountMonitorMountsChangedCallback C_UnixMountMonitorMountpointsChangedCallback
    wrapped'
        a
    -> Text
    -> FunPtr C_UnixMountMonitorMountpointsChangedCallback
    -> SignalConnectMode
    -> Maybe Text
    -> IO SignalHandlerId
    forall o a.
    GObject o =>
    o
    -> Text
    -> FunPtr a
    -> SignalConnectMode
    -> Maybe Text
    -> IO SignalHandlerId
    connectSignalFunPtr a
    obj Text
    "mounts-changed" FunPtr C_UnixMountMonitorMountpointsChangedCallback
    wrapped'' SignalConnectMode
    SignalConnectBefore Maybe Text
    forall a. Maybe a
    Nothing

    -- | Connect a signal handler for the [mountsChanged](#signal:mountsChanged) 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' unixMountMonitor #mountsChanged 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.
    --
    afterUnixMountMonitorMountsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> ((?self :: a) => UnixMountMonitorMountsChangedCallback) -> m SignalHandlerId
    afterUnixMountMonitorMountsChanged :: forall a (m :: * -> *).
    (IsUnixMountMonitor a, MonadIO m) =>
    a -> ((?self::a) => IO ()) -> m SignalHandlerId
    afterUnixMountMonitorMountsChanged 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_UnixMountMonitorMountpointsChangedCallback
    wrapped' = (a -> IO ()) -> C_UnixMountMonitorMountpointsChangedCallback
    forall a.
    GObject a =>
    (a -> IO ()) -> C_UnixMountMonitorMountpointsChangedCallback
    wrap_UnixMountMonitorMountsChangedCallback a -> IO ()
    wrapped
        FunPtr C_UnixMountMonitorMountpointsChangedCallback
    wrapped'' <- C_UnixMountMonitorMountpointsChangedCallback
    -> IO (FunPtr C_UnixMountMonitorMountpointsChangedCallback)
    mk_UnixMountMonitorMountsChangedCallback C_UnixMountMonitorMountpointsChangedCallback
    wrapped'
        a
    -> Text
    -> FunPtr C_UnixMountMonitorMountpointsChangedCallback
    -> SignalConnectMode
    -> Maybe Text
    -> IO SignalHandlerId
    forall o a.
    GObject o =>
    o
    -> Text
    -> FunPtr a
    -> SignalConnectMode
    -> Maybe Text
    -> IO SignalHandlerId
    connectSignalFunPtr a
    obj Text
    "mounts-changed" FunPtr C_UnixMountMonitorMountpointsChangedCallback
    wrapped'' SignalConnectMode
    SignalConnectAfter Maybe Text
    forall a. Maybe a
    Nothing

    #if defined(ENABLE_OVERLOADING)
    data UnixMountMonitorMountsChangedSignalInfo
    instance SignalInfo UnixMountMonitorMountsChangedSignalInfo where
        type HaskellCallbackType UnixMountMonitorMountsChangedSignalInfo = UnixMountMonitorMountsChangedCallback
        connectSignal obj cb connectMode detail = do
            let cb' = wrap_UnixMountMonitorMountsChangedCallback cb
            cb'' <- mk_UnixMountMonitorMountsChangedCallback cb'
            connectSignalFunPtr obj "mounts-changed" cb'' connectMode detail
        dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Objects.UnixMountMonitor::mounts-changed"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Objects-UnixMountMonitor.html#g:signal:mountsChanged"})

    #endif

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

    #if defined(ENABLE_OVERLOADING)
    #endif

    #if defined(ENABLE_OVERLOADING)
    type instance O.SignalList UnixMountMonitor = UnixMountMonitorSignalList
    type UnixMountMonitorSignalList = ('[ '("mountpointsChanged", UnixMountMonitorMountpointsChangedSignalInfo), '("mountsChanged", UnixMountMonitorMountsChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])

    #endif

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

    foreign import ccall "g_unix_mount_monitor_new" g_unix_mount_monitor_new ::
        IO (Ptr UnixMountMonitor)

    {-# DEPRECATED unixMountMonitorNew ["(Since version 2.44)","Use 'GI.Gio.Objects.UnixMountMonitor.unixMountMonitorGet' instead."] #-}
    -- | Deprecated alias for 'GI.Gio.Objects.UnixMountMonitor.unixMountMonitorGet'.
    --
    -- This function was never a true constructor, which is why it was
    -- renamed.
    unixMountMonitorNew ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        m UnixMountMonitor
        -- ^ __Returns:__ a t'GI.Gio.Objects.UnixMountMonitor.UnixMountMonitor'.
    unixMountMonitorNew :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    m UnixMountMonitor
    unixMountMonitorNew  = IO UnixMountMonitor -> m UnixMountMonitor
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO UnixMountMonitor -> m UnixMountMonitor)
    -> IO UnixMountMonitor -> m UnixMountMonitor
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr UnixMountMonitor
    result <- IO (Ptr UnixMountMonitor)
    g_unix_mount_monitor_new
        Text -> Ptr UnixMountMonitor -> IO ()
    forall a. HasCallStack => Text -> Ptr a -> IO ()
    checkUnexpectedReturnNULL Text
    "unixMountMonitorNew" Ptr UnixMountMonitor
    result
        UnixMountMonitor
    result' <- ((ManagedPtr UnixMountMonitor -> UnixMountMonitor)
    -> Ptr UnixMountMonitor -> IO UnixMountMonitor
    forall a b.
    (HasCallStack, GObject a, GObject b) =>
    (ManagedPtr a -> a) -> Ptr b -> IO a
    wrapObject ManagedPtr UnixMountMonitor -> UnixMountMonitor
    UnixMountMonitor) Ptr UnixMountMonitor
    result
        UnixMountMonitor -> IO UnixMountMonitor
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return UnixMountMonitor
    result'

    #if defined(ENABLE_OVERLOADING)
    #endif

    -- method UnixMountMonitor::set_rate_limit
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "mount_monitor"
    --           , argType =
    --               TInterface Name { namespace = "Gio" , name = "UnixMountMonitor" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GUnixMountMonitor"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "limit_msec"
    --           , argType = TBasicType TInt
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "a integer with the limit in milliseconds to\n    poll for changes."
    --                 , 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 "g_unix_mount_monitor_set_rate_limit" g_unix_mount_monitor_set_rate_limit ::
        Ptr UnixMountMonitor ->                 -- mount_monitor : TInterface (Name {namespace = "Gio", name = "UnixMountMonitor"})
        Int32 ->                                -- limit_msec : TBasicType TInt
        IO ()

    {-# DEPRECATED unixMountMonitorSetRateLimit ["(Since version 2.44)","This function does nothing.  Don\\'t call it."] #-}
    -- | This function does nothing.
    --
    -- Before 2.44, this was a partially-effective way of controlling the
    -- rate at which events would be reported under some uncommon
    -- circumstances.  Since /@mountMonitor@/ is a singleton, it also meant
    -- that calling this function would have side effects for other users of
    -- the monitor.
    --
    -- /Since: 2.18/
    unixMountMonitorSetRateLimit ::
        (B.CallStack.HasCallStack, MonadIO m, IsUnixMountMonitor a) =>
        a
        -- ^ /@mountMonitor@/: a t'GI.Gio.Objects.UnixMountMonitor.UnixMountMonitor'
        -> Int32
        -- ^ /@limitMsec@/: a integer with the limit in milliseconds to
        --     poll for changes.
        -> m ()
    unixMountMonitorSetRateLimit :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsUnixMountMonitor a) =>
    a -> Int32 -> m ()
    unixMountMonitorSetRateLimit a
    mountMonitor Int32
    limitMsec = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr UnixMountMonitor
    mountMonitor' <- a -> IO (Ptr UnixMountMonitor)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    mountMonitor
        Ptr UnixMountMonitor -> Int32 -> IO ()
    g_unix_mount_monitor_set_rate_limit Ptr UnixMountMonitor
    mountMonitor' Int32
    limitMsec
        a -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr a
    mountMonitor
        () -> IO ()
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    #if defined(ENABLE_OVERLOADING)
    data UnixMountMonitorSetRateLimitMethodInfo
    instance (signature ~ (Int32 -> m ()), MonadIO m, IsUnixMountMonitor a) => O.OverloadedMethod UnixMountMonitorSetRateLimitMethodInfo a signature where
        overloadedMethod = unixMountMonitorSetRateLimit

    instance O.OverloadedMethodInfo UnixMountMonitorSetRateLimitMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Objects.UnixMountMonitor.unixMountMonitorSetRateLimit",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Objects-UnixMountMonitor.html#v:unixMountMonitorSetRateLimit"
            })

    #endif

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

    foreign import ccall "g_unix_mount_monitor_get" g_unix_mount_monitor_get ::
        IO (Ptr UnixMountMonitor)

    -- | Gets the t'GI.Gio.Objects.UnixMountMonitor.UnixMountMonitor' for the current thread-default main
    -- context.
    --
    -- The mount monitor can be used to monitor for changes to the list of
    -- mounted filesystems as well as the list of mount points (ie: fstab
    -- entries).
    --
    -- You must only call 'GI.GObject.Objects.Object.objectUnref' on the return value from under
    -- the same main context as you called this function.
    --
    -- /Since: 2.44/
    unixMountMonitorGet ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        m UnixMountMonitor
        -- ^ __Returns:__ the t'GI.Gio.Objects.UnixMountMonitor.UnixMountMonitor'.
    unixMountMonitorGet :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    m UnixMountMonitor
    unixMountMonitorGet  = IO UnixMountMonitor -> m UnixMountMonitor
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO UnixMountMonitor -> m UnixMountMonitor)
    -> IO UnixMountMonitor -> m UnixMountMonitor
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr UnixMountMonitor
    result <- IO (Ptr UnixMountMonitor)
    g_unix_mount_monitor_get
        Text -> Ptr UnixMountMonitor -> IO ()
    forall a. HasCallStack => Text -> Ptr a -> IO ()
    checkUnexpectedReturnNULL Text
    "unixMountMonitorGet" Ptr UnixMountMonitor
    result
        UnixMountMonitor
    result' <- ((ManagedPtr UnixMountMonitor -> UnixMountMonitor)
    -> Ptr UnixMountMonitor -> IO UnixMountMonitor
    forall a b.
    (HasCallStack, GObject a, GObject b) =>
    (ManagedPtr a -> a) -> Ptr b -> IO a
    wrapObject ManagedPtr UnixMountMonitor -> UnixMountMonitor
    UnixMountMonitor) Ptr UnixMountMonitor
    result
        UnixMountMonitor -> IO UnixMountMonitor
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return UnixMountMonitor
    result'

    #if defined(ENABLE_OVERLOADING)
    #endif