#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Objects.UnixMountMonitor
(
UnixMountMonitor(..) ,
IsUnixMountMonitor ,
toUnixMountMonitor ,
noUnixMountMonitor ,
unixMountMonitorGet ,
unixMountMonitorNew ,
#if ENABLE_OVERLOADING
UnixMountMonitorSetRateLimitMethodInfo ,
#endif
unixMountMonitorSetRateLimit ,
C_UnixMountMonitorMountpointsChangedCallback,
UnixMountMonitorMountpointsChangedCallback,
#if ENABLE_OVERLOADING
UnixMountMonitorMountpointsChangedSignalInfo,
#endif
afterUnixMountMonitorMountpointsChanged ,
genClosure_UnixMountMonitorMountpointsChanged,
mk_UnixMountMonitorMountpointsChangedCallback,
noUnixMountMonitorMountpointsChangedCallback,
onUnixMountMonitorMountpointsChanged ,
wrap_UnixMountMonitorMountpointsChangedCallback,
C_UnixMountMonitorMountsChangedCallback ,
UnixMountMonitorMountsChangedCallback ,
#if 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.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)
foreign import ccall "g_unix_mount_monitor_get_type"
c_g_unix_mount_monitor_get_type :: IO GType
instance GObject UnixMountMonitor where
gobjectType = c_g_unix_mount_monitor_get_type
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 = liftIO . unsafeCastTo UnixMountMonitor
noUnixMountMonitor :: Maybe UnixMountMonitor
noUnixMountMonitor = Nothing
#if 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 (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
type UnixMountMonitorMountpointsChangedCallback =
IO ()
noUnixMountMonitorMountpointsChangedCallback :: Maybe UnixMountMonitorMountpointsChangedCallback
noUnixMountMonitorMountpointsChangedCallback = 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 cb = liftIO $ do
let cb' = wrap_UnixMountMonitorMountpointsChangedCallback cb
mk_UnixMountMonitorMountpointsChangedCallback cb' >>= B.GClosure.newGClosure
wrap_UnixMountMonitorMountpointsChangedCallback ::
UnixMountMonitorMountpointsChangedCallback ->
C_UnixMountMonitorMountpointsChangedCallback
wrap_UnixMountMonitorMountpointsChangedCallback _cb _ _ = do
_cb
onUnixMountMonitorMountpointsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> UnixMountMonitorMountpointsChangedCallback -> m SignalHandlerId
onUnixMountMonitorMountpointsChanged obj cb = liftIO $ do
let cb' = wrap_UnixMountMonitorMountpointsChangedCallback cb
cb'' <- mk_UnixMountMonitorMountpointsChangedCallback cb'
connectSignalFunPtr obj "mountpoints-changed" cb'' SignalConnectBefore
afterUnixMountMonitorMountpointsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> UnixMountMonitorMountpointsChangedCallback -> m SignalHandlerId
afterUnixMountMonitorMountpointsChanged obj cb = liftIO $ do
let cb' = wrap_UnixMountMonitorMountpointsChangedCallback cb
cb'' <- mk_UnixMountMonitorMountpointsChangedCallback cb'
connectSignalFunPtr obj "mountpoints-changed" cb'' SignalConnectAfter
type UnixMountMonitorMountsChangedCallback =
IO ()
noUnixMountMonitorMountsChangedCallback :: Maybe UnixMountMonitorMountsChangedCallback
noUnixMountMonitorMountsChangedCallback = 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 cb = liftIO $ do
let cb' = wrap_UnixMountMonitorMountsChangedCallback cb
mk_UnixMountMonitorMountsChangedCallback cb' >>= B.GClosure.newGClosure
wrap_UnixMountMonitorMountsChangedCallback ::
UnixMountMonitorMountsChangedCallback ->
C_UnixMountMonitorMountsChangedCallback
wrap_UnixMountMonitorMountsChangedCallback _cb _ _ = do
_cb
onUnixMountMonitorMountsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> UnixMountMonitorMountsChangedCallback -> m SignalHandlerId
onUnixMountMonitorMountsChanged obj cb = liftIO $ do
let cb' = wrap_UnixMountMonitorMountsChangedCallback cb
cb'' <- mk_UnixMountMonitorMountsChangedCallback cb'
connectSignalFunPtr obj "mounts-changed" cb'' SignalConnectBefore
afterUnixMountMonitorMountsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> UnixMountMonitorMountsChangedCallback -> m SignalHandlerId
afterUnixMountMonitorMountsChanged obj cb = liftIO $ do
let cb' = wrap_UnixMountMonitorMountsChangedCallback cb
cb'' <- mk_UnixMountMonitorMountsChangedCallback cb'
connectSignalFunPtr obj "mounts-changed" cb'' SignalConnectAfter
#if ENABLE_OVERLOADING
instance O.HasAttributeList UnixMountMonitor
type instance O.AttributeList UnixMountMonitor = UnixMountMonitorAttributeList
type UnixMountMonitorAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
data UnixMountMonitorMountpointsChangedSignalInfo
instance SignalInfo UnixMountMonitorMountpointsChangedSignalInfo where
type HaskellCallbackType UnixMountMonitorMountpointsChangedSignalInfo = UnixMountMonitorMountpointsChangedCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_UnixMountMonitorMountpointsChangedCallback cb
cb'' <- mk_UnixMountMonitorMountpointsChangedCallback cb'
connectSignalFunPtr obj "mountpoints-changed" cb'' connectMode
data UnixMountMonitorMountsChangedSignalInfo
instance SignalInfo UnixMountMonitorMountsChangedSignalInfo where
type HaskellCallbackType UnixMountMonitorMountsChangedSignalInfo = UnixMountMonitorMountsChangedCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_UnixMountMonitorMountsChangedCallback cb
cb'' <- mk_UnixMountMonitorMountsChangedCallback cb'
connectSignalFunPtr obj "mounts-changed" cb'' connectMode
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 = liftIO $ do
result <- g_unix_mount_monitor_new
checkUnexpectedReturnNULL "unixMountMonitorNew" result
result' <- (wrapObject UnixMountMonitor) result
return result'
#if 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 mountMonitor limitMsec = liftIO $ do
mountMonitor' <- unsafeManagedPtrCastPtr mountMonitor
g_unix_mount_monitor_set_rate_limit mountMonitor' limitMsec
touchManagedPtr mountMonitor
return ()
#if 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 = liftIO $ do
result <- g_unix_mount_monitor_get
checkUnexpectedReturnNULL "unixMountMonitorGet" result
result' <- (wrapObject UnixMountMonitor) result
return result'
#if ENABLE_OVERLOADING
#endif