{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.UnixMountMonitor
(
UnixMountMonitor(..) ,
IsUnixMountMonitor ,
toUnixMountMonitor ,
noUnixMountMonitor ,
#if defined(ENABLE_OVERLOADING)
ResolveUnixMountMonitorMethod ,
#endif
unixMountMonitorGet ,
unixMountMonitorNew ,
#if defined(ENABLE_OVERLOADING)
UnixMountMonitorSetRateLimitMethodInfo ,
#endif
unixMountMonitorSetRateLimit ,
C_UnixMountMonitorMountpointsChangedCallback,
UnixMountMonitorMountpointsChangedCallback,
#if defined(ENABLE_OVERLOADING)
UnixMountMonitorMountpointsChangedSignalInfo,
#endif
afterUnixMountMonitorMountpointsChanged ,
genClosure_UnixMountMonitorMountpointsChanged,
mk_UnixMountMonitorMountpointsChangedCallback,
noUnixMountMonitorMountpointsChangedCallback,
onUnixMountMonitorMountpointsChanged ,
wrap_UnixMountMonitorMountpointsChangedCallback,
C_UnixMountMonitorMountsChangedCallback ,
UnixMountMonitorMountsChangedCallback ,
#if defined(ENABLE_OVERLOADING)
UnixMountMonitorMountsChangedSignalInfo ,
#endif
afterUnixMountMonitorMountsChanged ,
genClosure_UnixMountMonitorMountsChanged,
mk_UnixMountMonitorMountsChangedCallback,
noUnixMountMonitorMountsChangedCallback ,
onUnixMountMonitorMountsChanged ,
wrap_UnixMountMonitorMountsChangedCallback,
) 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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
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 Data.Text as T
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 GI.GObject.Objects.Object as GObject.Object
newtype UnixMountMonitor = UnixMountMonitor (ManagedPtr UnixMountMonitor)
deriving (UnixMountMonitor -> UnixMountMonitor -> Bool
(UnixMountMonitor -> UnixMountMonitor -> Bool)
-> (UnixMountMonitor -> UnixMountMonitor -> Bool)
-> Eq UnixMountMonitor
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnixMountMonitor -> UnixMountMonitor -> Bool
$c/= :: UnixMountMonitor -> UnixMountMonitor -> Bool
== :: UnixMountMonitor -> UnixMountMonitor -> Bool
$c== :: UnixMountMonitor -> UnixMountMonitor -> Bool
Eq)
foreign import ccall "g_unix_mount_monitor_get_type"
c_g_unix_mount_monitor_get_type :: IO GType
instance GObject UnixMountMonitor where
gobjectType :: IO GType
gobjectType = IO GType
c_g_unix_mount_monitor_get_type
instance B.GValue.IsGValue UnixMountMonitor where
toGValue :: UnixMountMonitor -> IO GValue
toGValue o :: UnixMountMonitor
o = do
GType
gtype <- IO GType
c_g_unix_mount_monitor_get_type
UnixMountMonitor
-> (Ptr UnixMountMonitor -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr UnixMountMonitor
o (GType
-> (GValue -> Ptr UnixMountMonitor -> IO ())
-> Ptr UnixMountMonitor
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr UnixMountMonitor -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO UnixMountMonitor
fromGValue gv :: GValue
gv = do
Ptr UnixMountMonitor
ptr <- GValue -> IO (Ptr UnixMountMonitor)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr UnixMountMonitor)
(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
class (GObject o, O.IsDescendantOf UnixMountMonitor o) => IsUnixMountMonitor o
instance (GObject o, O.IsDescendantOf UnixMountMonitor o) => IsUnixMountMonitor o
instance O.HasParentTypes UnixMountMonitor
type instance O.ParentTypes UnixMountMonitor = '[GObject.Object.Object]
toUnixMountMonitor :: (MonadIO m, IsUnixMountMonitor o) => o -> m UnixMountMonitor
toUnixMountMonitor :: o -> m UnixMountMonitor
toUnixMountMonitor = IO UnixMountMonitor -> m UnixMountMonitor
forall (m :: * -> *) a. MonadIO m => IO a -> m a
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, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr UnixMountMonitor -> UnixMountMonitor
UnixMountMonitor
noUnixMountMonitor :: Maybe UnixMountMonitor
noUnixMountMonitor :: Maybe UnixMountMonitor
noUnixMountMonitor = Maybe UnixMountMonitor
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveUnixMountMonitorMethod (t :: Symbol) (o :: *) :: * 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.MethodInfo 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
#endif
type UnixMountMonitorMountpointsChangedCallback =
IO ()
noUnixMountMonitorMountpointsChangedCallback :: Maybe UnixMountMonitorMountpointsChangedCallback
noUnixMountMonitorMountpointsChangedCallback :: Maybe (IO ())
noUnixMountMonitorMountpointsChangedCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_UnixMountMonitorMountpointsChangedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_UnixMountMonitorMountpointsChangedCallback :: C_UnixMountMonitorMountpointsChangedCallback -> IO (FunPtr C_UnixMountMonitorMountpointsChangedCallback)
genClosure_UnixMountMonitorMountpointsChanged :: MonadIO m => UnixMountMonitorMountpointsChangedCallback -> m (GClosure C_UnixMountMonitorMountpointsChangedCallback)
genClosure_UnixMountMonitorMountpointsChanged :: IO () -> m (GClosure C_UnixMountMonitorMountpointsChangedCallback)
genClosure_UnixMountMonitorMountpointsChanged cb :: IO ()
cb = IO (GClosure C_UnixMountMonitorMountpointsChangedCallback)
-> m (GClosure C_UnixMountMonitorMountpointsChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UnixMountMonitorMountpointsChangedCallback)
-> m (GClosure C_UnixMountMonitorMountpointsChangedCallback))
-> IO (GClosure C_UnixMountMonitorMountpointsChangedCallback)
-> m (GClosure C_UnixMountMonitorMountpointsChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_UnixMountMonitorMountpointsChangedCallback
cb' = IO () -> C_UnixMountMonitorMountpointsChangedCallback
wrap_UnixMountMonitorMountpointsChangedCallback IO ()
cb
C_UnixMountMonitorMountpointsChangedCallback
-> IO (FunPtr C_UnixMountMonitorMountpointsChangedCallback)
mk_UnixMountMonitorMountpointsChangedCallback C_UnixMountMonitorMountpointsChangedCallback
cb' IO (FunPtr C_UnixMountMonitorMountpointsChangedCallback)
-> (FunPtr C_UnixMountMonitorMountpointsChangedCallback
-> IO (GClosure C_UnixMountMonitorMountpointsChangedCallback))
-> IO (GClosure C_UnixMountMonitorMountpointsChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UnixMountMonitorMountpointsChangedCallback
-> IO (GClosure C_UnixMountMonitorMountpointsChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UnixMountMonitorMountpointsChangedCallback ::
UnixMountMonitorMountpointsChangedCallback ->
C_UnixMountMonitorMountpointsChangedCallback
wrap_UnixMountMonitorMountpointsChangedCallback :: IO () -> C_UnixMountMonitorMountpointsChangedCallback
wrap_UnixMountMonitorMountpointsChangedCallback _cb :: IO ()
_cb _ _ = do
IO ()
_cb
onUnixMountMonitorMountpointsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> UnixMountMonitorMountpointsChangedCallback -> m SignalHandlerId
onUnixMountMonitorMountpointsChanged :: a -> IO () -> m SignalHandlerId
onUnixMountMonitorMountpointsChanged obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_UnixMountMonitorMountpointsChangedCallback
cb' = IO () -> C_UnixMountMonitorMountpointsChangedCallback
wrap_UnixMountMonitorMountpointsChangedCallback IO ()
cb
FunPtr C_UnixMountMonitorMountpointsChangedCallback
cb'' <- C_UnixMountMonitorMountpointsChangedCallback
-> IO (FunPtr C_UnixMountMonitorMountpointsChangedCallback)
mk_UnixMountMonitorMountpointsChangedCallback C_UnixMountMonitorMountpointsChangedCallback
cb'
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 "mountpoints-changed" FunPtr C_UnixMountMonitorMountpointsChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterUnixMountMonitorMountpointsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> UnixMountMonitorMountpointsChangedCallback -> m SignalHandlerId
afterUnixMountMonitorMountpointsChanged :: a -> IO () -> m SignalHandlerId
afterUnixMountMonitorMountpointsChanged obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_UnixMountMonitorMountpointsChangedCallback
cb' = IO () -> C_UnixMountMonitorMountpointsChangedCallback
wrap_UnixMountMonitorMountpointsChangedCallback IO ()
cb
FunPtr C_UnixMountMonitorMountpointsChangedCallback
cb'' <- C_UnixMountMonitorMountpointsChangedCallback
-> IO (FunPtr C_UnixMountMonitorMountpointsChangedCallback)
mk_UnixMountMonitorMountpointsChangedCallback C_UnixMountMonitorMountpointsChangedCallback
cb'
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 "mountpoints-changed" FunPtr C_UnixMountMonitorMountpointsChangedCallback
cb'' 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
#endif
type UnixMountMonitorMountsChangedCallback =
IO ()
noUnixMountMonitorMountsChangedCallback :: Maybe UnixMountMonitorMountsChangedCallback
noUnixMountMonitorMountsChangedCallback :: Maybe (IO ())
noUnixMountMonitorMountsChangedCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_UnixMountMonitorMountsChangedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_UnixMountMonitorMountsChangedCallback :: C_UnixMountMonitorMountsChangedCallback -> IO (FunPtr C_UnixMountMonitorMountsChangedCallback)
genClosure_UnixMountMonitorMountsChanged :: MonadIO m => UnixMountMonitorMountsChangedCallback -> m (GClosure C_UnixMountMonitorMountsChangedCallback)
genClosure_UnixMountMonitorMountsChanged :: IO () -> m (GClosure C_UnixMountMonitorMountpointsChangedCallback)
genClosure_UnixMountMonitorMountsChanged cb :: IO ()
cb = IO (GClosure C_UnixMountMonitorMountpointsChangedCallback)
-> m (GClosure C_UnixMountMonitorMountpointsChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UnixMountMonitorMountpointsChangedCallback)
-> m (GClosure C_UnixMountMonitorMountpointsChangedCallback))
-> IO (GClosure C_UnixMountMonitorMountpointsChangedCallback)
-> m (GClosure C_UnixMountMonitorMountpointsChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_UnixMountMonitorMountpointsChangedCallback
cb' = IO () -> C_UnixMountMonitorMountpointsChangedCallback
wrap_UnixMountMonitorMountsChangedCallback IO ()
cb
C_UnixMountMonitorMountpointsChangedCallback
-> IO (FunPtr C_UnixMountMonitorMountpointsChangedCallback)
mk_UnixMountMonitorMountsChangedCallback C_UnixMountMonitorMountpointsChangedCallback
cb' IO (FunPtr C_UnixMountMonitorMountpointsChangedCallback)
-> (FunPtr C_UnixMountMonitorMountpointsChangedCallback
-> IO (GClosure C_UnixMountMonitorMountpointsChangedCallback))
-> IO (GClosure C_UnixMountMonitorMountpointsChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UnixMountMonitorMountpointsChangedCallback
-> IO (GClosure C_UnixMountMonitorMountpointsChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UnixMountMonitorMountsChangedCallback ::
UnixMountMonitorMountsChangedCallback ->
C_UnixMountMonitorMountsChangedCallback
wrap_UnixMountMonitorMountsChangedCallback :: IO () -> C_UnixMountMonitorMountpointsChangedCallback
wrap_UnixMountMonitorMountsChangedCallback _cb :: IO ()
_cb _ _ = do
IO ()
_cb
onUnixMountMonitorMountsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> UnixMountMonitorMountsChangedCallback -> m SignalHandlerId
onUnixMountMonitorMountsChanged :: a -> IO () -> m SignalHandlerId
onUnixMountMonitorMountsChanged obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_UnixMountMonitorMountpointsChangedCallback
cb' = IO () -> C_UnixMountMonitorMountpointsChangedCallback
wrap_UnixMountMonitorMountsChangedCallback IO ()
cb
FunPtr C_UnixMountMonitorMountpointsChangedCallback
cb'' <- C_UnixMountMonitorMountpointsChangedCallback
-> IO (FunPtr C_UnixMountMonitorMountpointsChangedCallback)
mk_UnixMountMonitorMountsChangedCallback C_UnixMountMonitorMountpointsChangedCallback
cb'
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 "mounts-changed" FunPtr C_UnixMountMonitorMountpointsChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterUnixMountMonitorMountsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> UnixMountMonitorMountsChangedCallback -> m SignalHandlerId
afterUnixMountMonitorMountsChanged :: a -> IO () -> m SignalHandlerId
afterUnixMountMonitorMountsChanged obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_UnixMountMonitorMountpointsChangedCallback
cb' = IO () -> C_UnixMountMonitorMountpointsChangedCallback
wrap_UnixMountMonitorMountsChangedCallback IO ()
cb
FunPtr C_UnixMountMonitorMountpointsChangedCallback
cb'' <- C_UnixMountMonitorMountpointsChangedCallback
-> IO (FunPtr C_UnixMountMonitorMountpointsChangedCallback)
mk_UnixMountMonitorMountsChangedCallback C_UnixMountMonitorMountpointsChangedCallback
cb'
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 "mounts-changed" FunPtr C_UnixMountMonitorMountpointsChangedCallback
cb'' 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
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList UnixMountMonitor
type instance O.AttributeList UnixMountMonitor = UnixMountMonitorAttributeList
type UnixMountMonitorAttributeList = ('[ ] :: [(Symbol, *)])
#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, *)])
#endif
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."] #-}
unixMountMonitorNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m UnixMountMonitor
unixMountMonitorNew :: m UnixMountMonitor
unixMountMonitorNew = IO UnixMountMonitor -> m UnixMountMonitor
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 "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 (m :: * -> *) a. Monad m => a -> m a
return UnixMountMonitor
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_unix_mount_monitor_set_rate_limit" g_unix_mount_monitor_set_rate_limit ::
Ptr UnixMountMonitor ->
Int32 ->
IO ()
{-# DEPRECATED unixMountMonitorSetRateLimit ["(Since version 2.44)","This function does nothing. Don\\'t call it."] #-}
unixMountMonitorSetRateLimit ::
(B.CallStack.HasCallStack, MonadIO m, IsUnixMountMonitor a) =>
a
-> Int32
-> m ()
unixMountMonitorSetRateLimit :: a -> Int32 -> m ()
unixMountMonitorSetRateLimit mountMonitor :: a
mountMonitor limitMsec :: Int32
limitMsec = IO () -> m ()
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 (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UnixMountMonitorSetRateLimitMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsUnixMountMonitor a) => O.MethodInfo UnixMountMonitorSetRateLimitMethodInfo a signature where
overloadedMethod = unixMountMonitorSetRateLimit
#endif
foreign import ccall "g_unix_mount_monitor_get" g_unix_mount_monitor_get ::
IO (Ptr UnixMountMonitor)
unixMountMonitorGet ::
(B.CallStack.HasCallStack, MonadIO m) =>
m UnixMountMonitor
unixMountMonitorGet :: m UnixMountMonitor
unixMountMonitorGet = IO UnixMountMonitor -> m UnixMountMonitor
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 "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 (m :: * -> *) a. Monad m => a -> m a
return UnixMountMonitor
result'
#if defined(ENABLE_OVERLOADING)
#endif