{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.VolumeMonitor
(
VolumeMonitor(..) ,
IsVolumeMonitor ,
toVolumeMonitor ,
#if defined(ENABLE_OVERLOADING)
ResolveVolumeMonitorMethod ,
#endif
volumeMonitorAdoptOrphanMount ,
volumeMonitorGet ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorGetConnectedDrivesMethodInfo,
#endif
volumeMonitorGetConnectedDrives ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorGetMountForUuidMethodInfo ,
#endif
volumeMonitorGetMountForUuid ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorGetMountsMethodInfo ,
#endif
volumeMonitorGetMounts ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorGetVolumeForUuidMethodInfo ,
#endif
volumeMonitorGetVolumeForUuid ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorGetVolumesMethodInfo ,
#endif
volumeMonitorGetVolumes ,
C_VolumeMonitorDriveChangedCallback ,
VolumeMonitorDriveChangedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorDriveChangedSignalInfo ,
#endif
afterVolumeMonitorDriveChanged ,
genClosure_VolumeMonitorDriveChanged ,
mk_VolumeMonitorDriveChangedCallback ,
noVolumeMonitorDriveChangedCallback ,
onVolumeMonitorDriveChanged ,
wrap_VolumeMonitorDriveChangedCallback ,
C_VolumeMonitorDriveConnectedCallback ,
VolumeMonitorDriveConnectedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorDriveConnectedSignalInfo ,
#endif
afterVolumeMonitorDriveConnected ,
genClosure_VolumeMonitorDriveConnected ,
mk_VolumeMonitorDriveConnectedCallback ,
noVolumeMonitorDriveConnectedCallback ,
onVolumeMonitorDriveConnected ,
wrap_VolumeMonitorDriveConnectedCallback,
C_VolumeMonitorDriveDisconnectedCallback,
VolumeMonitorDriveDisconnectedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorDriveDisconnectedSignalInfo,
#endif
afterVolumeMonitorDriveDisconnected ,
genClosure_VolumeMonitorDriveDisconnected,
mk_VolumeMonitorDriveDisconnectedCallback,
noVolumeMonitorDriveDisconnectedCallback,
onVolumeMonitorDriveDisconnected ,
wrap_VolumeMonitorDriveDisconnectedCallback,
C_VolumeMonitorDriveEjectButtonCallback ,
VolumeMonitorDriveEjectButtonCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorDriveEjectButtonSignalInfo ,
#endif
afterVolumeMonitorDriveEjectButton ,
genClosure_VolumeMonitorDriveEjectButton,
mk_VolumeMonitorDriveEjectButtonCallback,
noVolumeMonitorDriveEjectButtonCallback ,
onVolumeMonitorDriveEjectButton ,
wrap_VolumeMonitorDriveEjectButtonCallback,
C_VolumeMonitorDriveStopButtonCallback ,
VolumeMonitorDriveStopButtonCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorDriveStopButtonSignalInfo ,
#endif
afterVolumeMonitorDriveStopButton ,
genClosure_VolumeMonitorDriveStopButton ,
mk_VolumeMonitorDriveStopButtonCallback ,
noVolumeMonitorDriveStopButtonCallback ,
onVolumeMonitorDriveStopButton ,
wrap_VolumeMonitorDriveStopButtonCallback,
C_VolumeMonitorMountAddedCallback ,
VolumeMonitorMountAddedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorMountAddedSignalInfo ,
#endif
afterVolumeMonitorMountAdded ,
genClosure_VolumeMonitorMountAdded ,
mk_VolumeMonitorMountAddedCallback ,
noVolumeMonitorMountAddedCallback ,
onVolumeMonitorMountAdded ,
wrap_VolumeMonitorMountAddedCallback ,
C_VolumeMonitorMountChangedCallback ,
VolumeMonitorMountChangedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorMountChangedSignalInfo ,
#endif
afterVolumeMonitorMountChanged ,
genClosure_VolumeMonitorMountChanged ,
mk_VolumeMonitorMountChangedCallback ,
noVolumeMonitorMountChangedCallback ,
onVolumeMonitorMountChanged ,
wrap_VolumeMonitorMountChangedCallback ,
C_VolumeMonitorMountPreUnmountCallback ,
VolumeMonitorMountPreUnmountCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorMountPreUnmountSignalInfo ,
#endif
afterVolumeMonitorMountPreUnmount ,
genClosure_VolumeMonitorMountPreUnmount ,
mk_VolumeMonitorMountPreUnmountCallback ,
noVolumeMonitorMountPreUnmountCallback ,
onVolumeMonitorMountPreUnmount ,
wrap_VolumeMonitorMountPreUnmountCallback,
C_VolumeMonitorMountRemovedCallback ,
VolumeMonitorMountRemovedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorMountRemovedSignalInfo ,
#endif
afterVolumeMonitorMountRemoved ,
genClosure_VolumeMonitorMountRemoved ,
mk_VolumeMonitorMountRemovedCallback ,
noVolumeMonitorMountRemovedCallback ,
onVolumeMonitorMountRemoved ,
wrap_VolumeMonitorMountRemovedCallback ,
C_VolumeMonitorVolumeAddedCallback ,
VolumeMonitorVolumeAddedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorVolumeAddedSignalInfo ,
#endif
afterVolumeMonitorVolumeAdded ,
genClosure_VolumeMonitorVolumeAdded ,
mk_VolumeMonitorVolumeAddedCallback ,
noVolumeMonitorVolumeAddedCallback ,
onVolumeMonitorVolumeAdded ,
wrap_VolumeMonitorVolumeAddedCallback ,
C_VolumeMonitorVolumeChangedCallback ,
VolumeMonitorVolumeChangedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorVolumeChangedSignalInfo ,
#endif
afterVolumeMonitorVolumeChanged ,
genClosure_VolumeMonitorVolumeChanged ,
mk_VolumeMonitorVolumeChangedCallback ,
noVolumeMonitorVolumeChangedCallback ,
onVolumeMonitorVolumeChanged ,
wrap_VolumeMonitorVolumeChangedCallback ,
C_VolumeMonitorVolumeRemovedCallback ,
VolumeMonitorVolumeRemovedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorVolumeRemovedSignalInfo ,
#endif
afterVolumeMonitorVolumeRemoved ,
genClosure_VolumeMonitorVolumeRemoved ,
mk_VolumeMonitorVolumeRemovedCallback ,
noVolumeMonitorVolumeRemovedCallback ,
onVolumeMonitorVolumeRemoved ,
wrap_VolumeMonitorVolumeRemovedCallback ,
) 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.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 Control.Monad.IO.Class as MIO
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
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Drive as Gio.Drive
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Mount as Gio.Mount
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Volume as Gio.Volume
newtype VolumeMonitor = VolumeMonitor (SP.ManagedPtr VolumeMonitor)
deriving (VolumeMonitor -> VolumeMonitor -> Bool
(VolumeMonitor -> VolumeMonitor -> Bool)
-> (VolumeMonitor -> VolumeMonitor -> Bool) -> Eq VolumeMonitor
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VolumeMonitor -> VolumeMonitor -> Bool
$c/= :: VolumeMonitor -> VolumeMonitor -> Bool
== :: VolumeMonitor -> VolumeMonitor -> Bool
$c== :: VolumeMonitor -> VolumeMonitor -> Bool
Eq)
instance SP.ManagedPtrNewtype VolumeMonitor where
toManagedPtr :: VolumeMonitor -> ManagedPtr VolumeMonitor
toManagedPtr (VolumeMonitor ManagedPtr VolumeMonitor
p) = ManagedPtr VolumeMonitor
p
foreign import ccall "g_volume_monitor_get_type"
c_g_volume_monitor_get_type :: IO B.Types.GType
instance B.Types.TypedObject VolumeMonitor where
glibType :: IO GType
glibType = IO GType
c_g_volume_monitor_get_type
instance B.Types.GObject VolumeMonitor
instance B.GValue.IsGValue VolumeMonitor where
toGValue :: VolumeMonitor -> IO GValue
toGValue VolumeMonitor
o = do
GType
gtype <- IO GType
c_g_volume_monitor_get_type
VolumeMonitor -> (Ptr VolumeMonitor -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr VolumeMonitor
o (GType
-> (GValue -> Ptr VolumeMonitor -> IO ())
-> Ptr VolumeMonitor
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr VolumeMonitor -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO VolumeMonitor
fromGValue GValue
gv = do
Ptr VolumeMonitor
ptr <- GValue -> IO (Ptr VolumeMonitor)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr VolumeMonitor)
(ManagedPtr VolumeMonitor -> VolumeMonitor)
-> Ptr VolumeMonitor -> IO VolumeMonitor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr VolumeMonitor -> VolumeMonitor
VolumeMonitor Ptr VolumeMonitor
ptr
class (SP.GObject o, O.IsDescendantOf VolumeMonitor o) => IsVolumeMonitor o
instance (SP.GObject o, O.IsDescendantOf VolumeMonitor o) => IsVolumeMonitor o
instance O.HasParentTypes VolumeMonitor
type instance O.ParentTypes VolumeMonitor = '[GObject.Object.Object]
toVolumeMonitor :: (MonadIO m, IsVolumeMonitor o) => o -> m VolumeMonitor
toVolumeMonitor :: o -> m VolumeMonitor
toVolumeMonitor = IO VolumeMonitor -> m VolumeMonitor
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VolumeMonitor -> m VolumeMonitor)
-> (o -> IO VolumeMonitor) -> o -> m VolumeMonitor
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr VolumeMonitor -> VolumeMonitor)
-> o -> IO VolumeMonitor
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr VolumeMonitor -> VolumeMonitor
VolumeMonitor
#if defined(ENABLE_OVERLOADING)
type family ResolveVolumeMonitorMethod (t :: Symbol) (o :: *) :: * where
ResolveVolumeMonitorMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveVolumeMonitorMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveVolumeMonitorMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveVolumeMonitorMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveVolumeMonitorMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveVolumeMonitorMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveVolumeMonitorMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveVolumeMonitorMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveVolumeMonitorMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveVolumeMonitorMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveVolumeMonitorMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveVolumeMonitorMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveVolumeMonitorMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveVolumeMonitorMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveVolumeMonitorMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveVolumeMonitorMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveVolumeMonitorMethod "getConnectedDrives" o = VolumeMonitorGetConnectedDrivesMethodInfo
ResolveVolumeMonitorMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveVolumeMonitorMethod "getMountForUuid" o = VolumeMonitorGetMountForUuidMethodInfo
ResolveVolumeMonitorMethod "getMounts" o = VolumeMonitorGetMountsMethodInfo
ResolveVolumeMonitorMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveVolumeMonitorMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveVolumeMonitorMethod "getVolumeForUuid" o = VolumeMonitorGetVolumeForUuidMethodInfo
ResolveVolumeMonitorMethod "getVolumes" o = VolumeMonitorGetVolumesMethodInfo
ResolveVolumeMonitorMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveVolumeMonitorMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveVolumeMonitorMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveVolumeMonitorMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveVolumeMonitorMethod t VolumeMonitor, O.MethodInfo info VolumeMonitor p) => OL.IsLabel t (VolumeMonitor -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
type VolumeMonitorDriveChangedCallback =
Gio.Drive.Drive
-> IO ()
noVolumeMonitorDriveChangedCallback :: Maybe VolumeMonitorDriveChangedCallback
noVolumeMonitorDriveChangedCallback :: Maybe VolumeMonitorDriveChangedCallback
noVolumeMonitorDriveChangedCallback = Maybe VolumeMonitorDriveChangedCallback
forall a. Maybe a
Nothing
type C_VolumeMonitorDriveChangedCallback =
Ptr () ->
Ptr Gio.Drive.Drive ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorDriveChangedCallback :: C_VolumeMonitorDriveChangedCallback -> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
genClosure_VolumeMonitorDriveChanged :: MonadIO m => VolumeMonitorDriveChangedCallback -> m (GClosure C_VolumeMonitorDriveChangedCallback)
genClosure_VolumeMonitorDriveChanged :: VolumeMonitorDriveChangedCallback
-> m (GClosure C_VolumeMonitorDriveChangedCallback)
genClosure_VolumeMonitorDriveChanged VolumeMonitorDriveChangedCallback
cb = IO (GClosure C_VolumeMonitorDriveChangedCallback)
-> m (GClosure C_VolumeMonitorDriveChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_VolumeMonitorDriveChangedCallback)
-> m (GClosure C_VolumeMonitorDriveChangedCallback))
-> IO (GClosure C_VolumeMonitorDriveChangedCallback)
-> m (GClosure C_VolumeMonitorDriveChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_VolumeMonitorDriveChangedCallback
cb' = VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveChangedCallback VolumeMonitorDriveChangedCallback
cb
C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveChangedCallback C_VolumeMonitorDriveChangedCallback
cb' IO (FunPtr C_VolumeMonitorDriveChangedCallback)
-> (FunPtr C_VolumeMonitorDriveChangedCallback
-> IO (GClosure C_VolumeMonitorDriveChangedCallback))
-> IO (GClosure C_VolumeMonitorDriveChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_VolumeMonitorDriveChangedCallback
-> IO (GClosure C_VolumeMonitorDriveChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_VolumeMonitorDriveChangedCallback ::
VolumeMonitorDriveChangedCallback ->
C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveChangedCallback :: VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveChangedCallback VolumeMonitorDriveChangedCallback
_cb Ptr ()
_ Ptr Drive
drive Ptr ()
_ = do
Drive
drive' <- ((ManagedPtr Drive -> Drive) -> Ptr Drive -> IO Drive
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drive -> Drive
Gio.Drive.Drive) Ptr Drive
drive
VolumeMonitorDriveChangedCallback
_cb Drive
drive'
onVolumeMonitorDriveChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
onVolumeMonitorDriveChanged :: a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
onVolumeMonitorDriveChanged a
obj VolumeMonitorDriveChangedCallback
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_VolumeMonitorDriveChangedCallback
cb' = VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveChangedCallback VolumeMonitorDriveChangedCallback
cb
FunPtr C_VolumeMonitorDriveChangedCallback
cb'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveChangedCallback C_VolumeMonitorDriveChangedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorDriveChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"drive-changed" FunPtr C_VolumeMonitorDriveChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterVolumeMonitorDriveChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
afterVolumeMonitorDriveChanged :: a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
afterVolumeMonitorDriveChanged a
obj VolumeMonitorDriveChangedCallback
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_VolumeMonitorDriveChangedCallback
cb' = VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveChangedCallback VolumeMonitorDriveChangedCallback
cb
FunPtr C_VolumeMonitorDriveChangedCallback
cb'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveChangedCallback C_VolumeMonitorDriveChangedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorDriveChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"drive-changed" FunPtr C_VolumeMonitorDriveChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorDriveChangedSignalInfo
instance SignalInfo VolumeMonitorDriveChangedSignalInfo where
type HaskellCallbackType VolumeMonitorDriveChangedSignalInfo = VolumeMonitorDriveChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_VolumeMonitorDriveChangedCallback cb
cb'' <- mk_VolumeMonitorDriveChangedCallback cb'
connectSignalFunPtr obj "drive-changed" cb'' connectMode detail
#endif
type VolumeMonitorDriveConnectedCallback =
Gio.Drive.Drive
-> IO ()
noVolumeMonitorDriveConnectedCallback :: Maybe VolumeMonitorDriveConnectedCallback
noVolumeMonitorDriveConnectedCallback :: Maybe VolumeMonitorDriveChangedCallback
noVolumeMonitorDriveConnectedCallback = Maybe VolumeMonitorDriveChangedCallback
forall a. Maybe a
Nothing
type C_VolumeMonitorDriveConnectedCallback =
Ptr () ->
Ptr Gio.Drive.Drive ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorDriveConnectedCallback :: C_VolumeMonitorDriveConnectedCallback -> IO (FunPtr C_VolumeMonitorDriveConnectedCallback)
genClosure_VolumeMonitorDriveConnected :: MonadIO m => VolumeMonitorDriveConnectedCallback -> m (GClosure C_VolumeMonitorDriveConnectedCallback)
genClosure_VolumeMonitorDriveConnected :: VolumeMonitorDriveChangedCallback
-> m (GClosure C_VolumeMonitorDriveChangedCallback)
genClosure_VolumeMonitorDriveConnected VolumeMonitorDriveChangedCallback
cb = IO (GClosure C_VolumeMonitorDriveChangedCallback)
-> m (GClosure C_VolumeMonitorDriveChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_VolumeMonitorDriveChangedCallback)
-> m (GClosure C_VolumeMonitorDriveChangedCallback))
-> IO (GClosure C_VolumeMonitorDriveChangedCallback)
-> m (GClosure C_VolumeMonitorDriveChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_VolumeMonitorDriveChangedCallback
cb' = VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveConnectedCallback VolumeMonitorDriveChangedCallback
cb
C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveConnectedCallback C_VolumeMonitorDriveChangedCallback
cb' IO (FunPtr C_VolumeMonitorDriveChangedCallback)
-> (FunPtr C_VolumeMonitorDriveChangedCallback
-> IO (GClosure C_VolumeMonitorDriveChangedCallback))
-> IO (GClosure C_VolumeMonitorDriveChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_VolumeMonitorDriveChangedCallback
-> IO (GClosure C_VolumeMonitorDriveChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_VolumeMonitorDriveConnectedCallback ::
VolumeMonitorDriveConnectedCallback ->
C_VolumeMonitorDriveConnectedCallback
wrap_VolumeMonitorDriveConnectedCallback :: VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveConnectedCallback VolumeMonitorDriveChangedCallback
_cb Ptr ()
_ Ptr Drive
drive Ptr ()
_ = do
Drive
drive' <- ((ManagedPtr Drive -> Drive) -> Ptr Drive -> IO Drive
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drive -> Drive
Gio.Drive.Drive) Ptr Drive
drive
VolumeMonitorDriveChangedCallback
_cb Drive
drive'
onVolumeMonitorDriveConnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveConnectedCallback -> m SignalHandlerId
onVolumeMonitorDriveConnected :: a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
onVolumeMonitorDriveConnected a
obj VolumeMonitorDriveChangedCallback
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_VolumeMonitorDriveChangedCallback
cb' = VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveConnectedCallback VolumeMonitorDriveChangedCallback
cb
FunPtr C_VolumeMonitorDriveChangedCallback
cb'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveConnectedCallback C_VolumeMonitorDriveChangedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorDriveChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"drive-connected" FunPtr C_VolumeMonitorDriveChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterVolumeMonitorDriveConnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveConnectedCallback -> m SignalHandlerId
afterVolumeMonitorDriveConnected :: a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
afterVolumeMonitorDriveConnected a
obj VolumeMonitorDriveChangedCallback
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_VolumeMonitorDriveChangedCallback
cb' = VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveConnectedCallback VolumeMonitorDriveChangedCallback
cb
FunPtr C_VolumeMonitorDriveChangedCallback
cb'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveConnectedCallback C_VolumeMonitorDriveChangedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorDriveChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"drive-connected" FunPtr C_VolumeMonitorDriveChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorDriveConnectedSignalInfo
instance SignalInfo VolumeMonitorDriveConnectedSignalInfo where
type HaskellCallbackType VolumeMonitorDriveConnectedSignalInfo = VolumeMonitorDriveConnectedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_VolumeMonitorDriveConnectedCallback cb
cb'' <- mk_VolumeMonitorDriveConnectedCallback cb'
connectSignalFunPtr obj "drive-connected" cb'' connectMode detail
#endif
type VolumeMonitorDriveDisconnectedCallback =
Gio.Drive.Drive
-> IO ()
noVolumeMonitorDriveDisconnectedCallback :: Maybe VolumeMonitorDriveDisconnectedCallback
noVolumeMonitorDriveDisconnectedCallback :: Maybe VolumeMonitorDriveChangedCallback
noVolumeMonitorDriveDisconnectedCallback = Maybe VolumeMonitorDriveChangedCallback
forall a. Maybe a
Nothing
type C_VolumeMonitorDriveDisconnectedCallback =
Ptr () ->
Ptr Gio.Drive.Drive ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorDriveDisconnectedCallback :: C_VolumeMonitorDriveDisconnectedCallback -> IO (FunPtr C_VolumeMonitorDriveDisconnectedCallback)
genClosure_VolumeMonitorDriveDisconnected :: MonadIO m => VolumeMonitorDriveDisconnectedCallback -> m (GClosure C_VolumeMonitorDriveDisconnectedCallback)
genClosure_VolumeMonitorDriveDisconnected :: VolumeMonitorDriveChangedCallback
-> m (GClosure C_VolumeMonitorDriveChangedCallback)
genClosure_VolumeMonitorDriveDisconnected VolumeMonitorDriveChangedCallback
cb = IO (GClosure C_VolumeMonitorDriveChangedCallback)
-> m (GClosure C_VolumeMonitorDriveChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_VolumeMonitorDriveChangedCallback)
-> m (GClosure C_VolumeMonitorDriveChangedCallback))
-> IO (GClosure C_VolumeMonitorDriveChangedCallback)
-> m (GClosure C_VolumeMonitorDriveChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_VolumeMonitorDriveChangedCallback
cb' = VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveDisconnectedCallback VolumeMonitorDriveChangedCallback
cb
C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveDisconnectedCallback C_VolumeMonitorDriveChangedCallback
cb' IO (FunPtr C_VolumeMonitorDriveChangedCallback)
-> (FunPtr C_VolumeMonitorDriveChangedCallback
-> IO (GClosure C_VolumeMonitorDriveChangedCallback))
-> IO (GClosure C_VolumeMonitorDriveChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_VolumeMonitorDriveChangedCallback
-> IO (GClosure C_VolumeMonitorDriveChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_VolumeMonitorDriveDisconnectedCallback ::
VolumeMonitorDriveDisconnectedCallback ->
C_VolumeMonitorDriveDisconnectedCallback
wrap_VolumeMonitorDriveDisconnectedCallback :: VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveDisconnectedCallback VolumeMonitorDriveChangedCallback
_cb Ptr ()
_ Ptr Drive
drive Ptr ()
_ = do
Drive
drive' <- ((ManagedPtr Drive -> Drive) -> Ptr Drive -> IO Drive
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drive -> Drive
Gio.Drive.Drive) Ptr Drive
drive
VolumeMonitorDriveChangedCallback
_cb Drive
drive'
onVolumeMonitorDriveDisconnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveDisconnectedCallback -> m SignalHandlerId
onVolumeMonitorDriveDisconnected :: a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
onVolumeMonitorDriveDisconnected a
obj VolumeMonitorDriveChangedCallback
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_VolumeMonitorDriveChangedCallback
cb' = VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveDisconnectedCallback VolumeMonitorDriveChangedCallback
cb
FunPtr C_VolumeMonitorDriveChangedCallback
cb'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveDisconnectedCallback C_VolumeMonitorDriveChangedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorDriveChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"drive-disconnected" FunPtr C_VolumeMonitorDriveChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterVolumeMonitorDriveDisconnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveDisconnectedCallback -> m SignalHandlerId
afterVolumeMonitorDriveDisconnected :: a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
afterVolumeMonitorDriveDisconnected a
obj VolumeMonitorDriveChangedCallback
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_VolumeMonitorDriveChangedCallback
cb' = VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveDisconnectedCallback VolumeMonitorDriveChangedCallback
cb
FunPtr C_VolumeMonitorDriveChangedCallback
cb'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveDisconnectedCallback C_VolumeMonitorDriveChangedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorDriveChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"drive-disconnected" FunPtr C_VolumeMonitorDriveChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorDriveDisconnectedSignalInfo
instance SignalInfo VolumeMonitorDriveDisconnectedSignalInfo where
type HaskellCallbackType VolumeMonitorDriveDisconnectedSignalInfo = VolumeMonitorDriveDisconnectedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_VolumeMonitorDriveDisconnectedCallback cb
cb'' <- mk_VolumeMonitorDriveDisconnectedCallback cb'
connectSignalFunPtr obj "drive-disconnected" cb'' connectMode detail
#endif
type VolumeMonitorDriveEjectButtonCallback =
Gio.Drive.Drive
-> IO ()
noVolumeMonitorDriveEjectButtonCallback :: Maybe VolumeMonitorDriveEjectButtonCallback
noVolumeMonitorDriveEjectButtonCallback :: Maybe VolumeMonitorDriveChangedCallback
noVolumeMonitorDriveEjectButtonCallback = Maybe VolumeMonitorDriveChangedCallback
forall a. Maybe a
Nothing
type C_VolumeMonitorDriveEjectButtonCallback =
Ptr () ->
Ptr Gio.Drive.Drive ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorDriveEjectButtonCallback :: C_VolumeMonitorDriveEjectButtonCallback -> IO (FunPtr C_VolumeMonitorDriveEjectButtonCallback)
genClosure_VolumeMonitorDriveEjectButton :: MonadIO m => VolumeMonitorDriveEjectButtonCallback -> m (GClosure C_VolumeMonitorDriveEjectButtonCallback)
genClosure_VolumeMonitorDriveEjectButton :: VolumeMonitorDriveChangedCallback
-> m (GClosure C_VolumeMonitorDriveChangedCallback)
genClosure_VolumeMonitorDriveEjectButton VolumeMonitorDriveChangedCallback
cb = IO (GClosure C_VolumeMonitorDriveChangedCallback)
-> m (GClosure C_VolumeMonitorDriveChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_VolumeMonitorDriveChangedCallback)
-> m (GClosure C_VolumeMonitorDriveChangedCallback))
-> IO (GClosure C_VolumeMonitorDriveChangedCallback)
-> m (GClosure C_VolumeMonitorDriveChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_VolumeMonitorDriveChangedCallback
cb' = VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveEjectButtonCallback VolumeMonitorDriveChangedCallback
cb
C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveEjectButtonCallback C_VolumeMonitorDriveChangedCallback
cb' IO (FunPtr C_VolumeMonitorDriveChangedCallback)
-> (FunPtr C_VolumeMonitorDriveChangedCallback
-> IO (GClosure C_VolumeMonitorDriveChangedCallback))
-> IO (GClosure C_VolumeMonitorDriveChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_VolumeMonitorDriveChangedCallback
-> IO (GClosure C_VolumeMonitorDriveChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_VolumeMonitorDriveEjectButtonCallback ::
VolumeMonitorDriveEjectButtonCallback ->
C_VolumeMonitorDriveEjectButtonCallback
wrap_VolumeMonitorDriveEjectButtonCallback :: VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveEjectButtonCallback VolumeMonitorDriveChangedCallback
_cb Ptr ()
_ Ptr Drive
drive Ptr ()
_ = do
Drive
drive' <- ((ManagedPtr Drive -> Drive) -> Ptr Drive -> IO Drive
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drive -> Drive
Gio.Drive.Drive) Ptr Drive
drive
VolumeMonitorDriveChangedCallback
_cb Drive
drive'
onVolumeMonitorDriveEjectButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveEjectButtonCallback -> m SignalHandlerId
onVolumeMonitorDriveEjectButton :: a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
onVolumeMonitorDriveEjectButton a
obj VolumeMonitorDriveChangedCallback
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_VolumeMonitorDriveChangedCallback
cb' = VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveEjectButtonCallback VolumeMonitorDriveChangedCallback
cb
FunPtr C_VolumeMonitorDriveChangedCallback
cb'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveEjectButtonCallback C_VolumeMonitorDriveChangedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorDriveChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"drive-eject-button" FunPtr C_VolumeMonitorDriveChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterVolumeMonitorDriveEjectButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveEjectButtonCallback -> m SignalHandlerId
afterVolumeMonitorDriveEjectButton :: a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
afterVolumeMonitorDriveEjectButton a
obj VolumeMonitorDriveChangedCallback
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_VolumeMonitorDriveChangedCallback
cb' = VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveEjectButtonCallback VolumeMonitorDriveChangedCallback
cb
FunPtr C_VolumeMonitorDriveChangedCallback
cb'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveEjectButtonCallback C_VolumeMonitorDriveChangedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorDriveChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"drive-eject-button" FunPtr C_VolumeMonitorDriveChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorDriveEjectButtonSignalInfo
instance SignalInfo VolumeMonitorDriveEjectButtonSignalInfo where
type HaskellCallbackType VolumeMonitorDriveEjectButtonSignalInfo = VolumeMonitorDriveEjectButtonCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_VolumeMonitorDriveEjectButtonCallback cb
cb'' <- mk_VolumeMonitorDriveEjectButtonCallback cb'
connectSignalFunPtr obj "drive-eject-button" cb'' connectMode detail
#endif
type VolumeMonitorDriveStopButtonCallback =
Gio.Drive.Drive
-> IO ()
noVolumeMonitorDriveStopButtonCallback :: Maybe VolumeMonitorDriveStopButtonCallback
noVolumeMonitorDriveStopButtonCallback :: Maybe VolumeMonitorDriveChangedCallback
noVolumeMonitorDriveStopButtonCallback = Maybe VolumeMonitorDriveChangedCallback
forall a. Maybe a
Nothing
type C_VolumeMonitorDriveStopButtonCallback =
Ptr () ->
Ptr Gio.Drive.Drive ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorDriveStopButtonCallback :: C_VolumeMonitorDriveStopButtonCallback -> IO (FunPtr C_VolumeMonitorDriveStopButtonCallback)
genClosure_VolumeMonitorDriveStopButton :: MonadIO m => VolumeMonitorDriveStopButtonCallback -> m (GClosure C_VolumeMonitorDriveStopButtonCallback)
genClosure_VolumeMonitorDriveStopButton :: VolumeMonitorDriveChangedCallback
-> m (GClosure C_VolumeMonitorDriveChangedCallback)
genClosure_VolumeMonitorDriveStopButton VolumeMonitorDriveChangedCallback
cb = IO (GClosure C_VolumeMonitorDriveChangedCallback)
-> m (GClosure C_VolumeMonitorDriveChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_VolumeMonitorDriveChangedCallback)
-> m (GClosure C_VolumeMonitorDriveChangedCallback))
-> IO (GClosure C_VolumeMonitorDriveChangedCallback)
-> m (GClosure C_VolumeMonitorDriveChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_VolumeMonitorDriveChangedCallback
cb' = VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveStopButtonCallback VolumeMonitorDriveChangedCallback
cb
C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveStopButtonCallback C_VolumeMonitorDriveChangedCallback
cb' IO (FunPtr C_VolumeMonitorDriveChangedCallback)
-> (FunPtr C_VolumeMonitorDriveChangedCallback
-> IO (GClosure C_VolumeMonitorDriveChangedCallback))
-> IO (GClosure C_VolumeMonitorDriveChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_VolumeMonitorDriveChangedCallback
-> IO (GClosure C_VolumeMonitorDriveChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_VolumeMonitorDriveStopButtonCallback ::
VolumeMonitorDriveStopButtonCallback ->
C_VolumeMonitorDriveStopButtonCallback
wrap_VolumeMonitorDriveStopButtonCallback :: VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveStopButtonCallback VolumeMonitorDriveChangedCallback
_cb Ptr ()
_ Ptr Drive
drive Ptr ()
_ = do
Drive
drive' <- ((ManagedPtr Drive -> Drive) -> Ptr Drive -> IO Drive
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drive -> Drive
Gio.Drive.Drive) Ptr Drive
drive
VolumeMonitorDriveChangedCallback
_cb Drive
drive'
onVolumeMonitorDriveStopButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveStopButtonCallback -> m SignalHandlerId
onVolumeMonitorDriveStopButton :: a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
onVolumeMonitorDriveStopButton a
obj VolumeMonitorDriveChangedCallback
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_VolumeMonitorDriveChangedCallback
cb' = VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveStopButtonCallback VolumeMonitorDriveChangedCallback
cb
FunPtr C_VolumeMonitorDriveChangedCallback
cb'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveStopButtonCallback C_VolumeMonitorDriveChangedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorDriveChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"drive-stop-button" FunPtr C_VolumeMonitorDriveChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterVolumeMonitorDriveStopButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveStopButtonCallback -> m SignalHandlerId
afterVolumeMonitorDriveStopButton :: a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
afterVolumeMonitorDriveStopButton a
obj VolumeMonitorDriveChangedCallback
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_VolumeMonitorDriveChangedCallback
cb' = VolumeMonitorDriveChangedCallback
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveStopButtonCallback VolumeMonitorDriveChangedCallback
cb
FunPtr C_VolumeMonitorDriveChangedCallback
cb'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveStopButtonCallback C_VolumeMonitorDriveChangedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorDriveChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"drive-stop-button" FunPtr C_VolumeMonitorDriveChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorDriveStopButtonSignalInfo
instance SignalInfo VolumeMonitorDriveStopButtonSignalInfo where
type HaskellCallbackType VolumeMonitorDriveStopButtonSignalInfo = VolumeMonitorDriveStopButtonCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_VolumeMonitorDriveStopButtonCallback cb
cb'' <- mk_VolumeMonitorDriveStopButtonCallback cb'
connectSignalFunPtr obj "drive-stop-button" cb'' connectMode detail
#endif
type VolumeMonitorMountAddedCallback =
Gio.Mount.Mount
-> IO ()
noVolumeMonitorMountAddedCallback :: Maybe VolumeMonitorMountAddedCallback
noVolumeMonitorMountAddedCallback :: Maybe VolumeMonitorMountAddedCallback
noVolumeMonitorMountAddedCallback = Maybe VolumeMonitorMountAddedCallback
forall a. Maybe a
Nothing
type C_VolumeMonitorMountAddedCallback =
Ptr () ->
Ptr Gio.Mount.Mount ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorMountAddedCallback :: C_VolumeMonitorMountAddedCallback -> IO (FunPtr C_VolumeMonitorMountAddedCallback)
genClosure_VolumeMonitorMountAdded :: MonadIO m => VolumeMonitorMountAddedCallback -> m (GClosure C_VolumeMonitorMountAddedCallback)
genClosure_VolumeMonitorMountAdded :: VolumeMonitorMountAddedCallback
-> m (GClosure C_VolumeMonitorMountAddedCallback)
genClosure_VolumeMonitorMountAdded VolumeMonitorMountAddedCallback
cb = IO (GClosure C_VolumeMonitorMountAddedCallback)
-> m (GClosure C_VolumeMonitorMountAddedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_VolumeMonitorMountAddedCallback)
-> m (GClosure C_VolumeMonitorMountAddedCallback))
-> IO (GClosure C_VolumeMonitorMountAddedCallback)
-> m (GClosure C_VolumeMonitorMountAddedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_VolumeMonitorMountAddedCallback
cb' = VolumeMonitorMountAddedCallback
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountAddedCallback VolumeMonitorMountAddedCallback
cb
C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountAddedCallback C_VolumeMonitorMountAddedCallback
cb' IO (FunPtr C_VolumeMonitorMountAddedCallback)
-> (FunPtr C_VolumeMonitorMountAddedCallback
-> IO (GClosure C_VolumeMonitorMountAddedCallback))
-> IO (GClosure C_VolumeMonitorMountAddedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_VolumeMonitorMountAddedCallback
-> IO (GClosure C_VolumeMonitorMountAddedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_VolumeMonitorMountAddedCallback ::
VolumeMonitorMountAddedCallback ->
C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountAddedCallback :: VolumeMonitorMountAddedCallback
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountAddedCallback VolumeMonitorMountAddedCallback
_cb Ptr ()
_ Ptr Mount
mount Ptr ()
_ = do
Mount
mount' <- ((ManagedPtr Mount -> Mount) -> Ptr Mount -> IO Mount
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Mount -> Mount
Gio.Mount.Mount) Ptr Mount
mount
VolumeMonitorMountAddedCallback
_cb Mount
mount'
onVolumeMonitorMountAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId
onVolumeMonitorMountAdded :: a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId
onVolumeMonitorMountAdded a
obj VolumeMonitorMountAddedCallback
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_VolumeMonitorMountAddedCallback
cb' = VolumeMonitorMountAddedCallback
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountAddedCallback VolumeMonitorMountAddedCallback
cb
FunPtr C_VolumeMonitorMountAddedCallback
cb'' <- C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountAddedCallback C_VolumeMonitorMountAddedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorMountAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"mount-added" FunPtr C_VolumeMonitorMountAddedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterVolumeMonitorMountAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId
afterVolumeMonitorMountAdded :: a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId
afterVolumeMonitorMountAdded a
obj VolumeMonitorMountAddedCallback
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_VolumeMonitorMountAddedCallback
cb' = VolumeMonitorMountAddedCallback
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountAddedCallback VolumeMonitorMountAddedCallback
cb
FunPtr C_VolumeMonitorMountAddedCallback
cb'' <- C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountAddedCallback C_VolumeMonitorMountAddedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorMountAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"mount-added" FunPtr C_VolumeMonitorMountAddedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorMountAddedSignalInfo
instance SignalInfo VolumeMonitorMountAddedSignalInfo where
type HaskellCallbackType VolumeMonitorMountAddedSignalInfo = VolumeMonitorMountAddedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_VolumeMonitorMountAddedCallback cb
cb'' <- mk_VolumeMonitorMountAddedCallback cb'
connectSignalFunPtr obj "mount-added" cb'' connectMode detail
#endif
type VolumeMonitorMountChangedCallback =
Gio.Mount.Mount
-> IO ()
noVolumeMonitorMountChangedCallback :: Maybe VolumeMonitorMountChangedCallback
noVolumeMonitorMountChangedCallback :: Maybe VolumeMonitorMountAddedCallback
noVolumeMonitorMountChangedCallback = Maybe VolumeMonitorMountAddedCallback
forall a. Maybe a
Nothing
type C_VolumeMonitorMountChangedCallback =
Ptr () ->
Ptr Gio.Mount.Mount ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorMountChangedCallback :: C_VolumeMonitorMountChangedCallback -> IO (FunPtr C_VolumeMonitorMountChangedCallback)
genClosure_VolumeMonitorMountChanged :: MonadIO m => VolumeMonitorMountChangedCallback -> m (GClosure C_VolumeMonitorMountChangedCallback)
genClosure_VolumeMonitorMountChanged :: VolumeMonitorMountAddedCallback
-> m (GClosure C_VolumeMonitorMountAddedCallback)
genClosure_VolumeMonitorMountChanged VolumeMonitorMountAddedCallback
cb = IO (GClosure C_VolumeMonitorMountAddedCallback)
-> m (GClosure C_VolumeMonitorMountAddedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_VolumeMonitorMountAddedCallback)
-> m (GClosure C_VolumeMonitorMountAddedCallback))
-> IO (GClosure C_VolumeMonitorMountAddedCallback)
-> m (GClosure C_VolumeMonitorMountAddedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_VolumeMonitorMountAddedCallback
cb' = VolumeMonitorMountAddedCallback
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountChangedCallback VolumeMonitorMountAddedCallback
cb
C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountChangedCallback C_VolumeMonitorMountAddedCallback
cb' IO (FunPtr C_VolumeMonitorMountAddedCallback)
-> (FunPtr C_VolumeMonitorMountAddedCallback
-> IO (GClosure C_VolumeMonitorMountAddedCallback))
-> IO (GClosure C_VolumeMonitorMountAddedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_VolumeMonitorMountAddedCallback
-> IO (GClosure C_VolumeMonitorMountAddedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_VolumeMonitorMountChangedCallback ::
VolumeMonitorMountChangedCallback ->
C_VolumeMonitorMountChangedCallback
wrap_VolumeMonitorMountChangedCallback :: VolumeMonitorMountAddedCallback
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountChangedCallback VolumeMonitorMountAddedCallback
_cb Ptr ()
_ Ptr Mount
mount Ptr ()
_ = do
Mount
mount' <- ((ManagedPtr Mount -> Mount) -> Ptr Mount -> IO Mount
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Mount -> Mount
Gio.Mount.Mount) Ptr Mount
mount
VolumeMonitorMountAddedCallback
_cb Mount
mount'
onVolumeMonitorMountChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountChangedCallback -> m SignalHandlerId
onVolumeMonitorMountChanged :: a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId
onVolumeMonitorMountChanged a
obj VolumeMonitorMountAddedCallback
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_VolumeMonitorMountAddedCallback
cb' = VolumeMonitorMountAddedCallback
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountChangedCallback VolumeMonitorMountAddedCallback
cb
FunPtr C_VolumeMonitorMountAddedCallback
cb'' <- C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountChangedCallback C_VolumeMonitorMountAddedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorMountAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"mount-changed" FunPtr C_VolumeMonitorMountAddedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterVolumeMonitorMountChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountChangedCallback -> m SignalHandlerId
afterVolumeMonitorMountChanged :: a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId
afterVolumeMonitorMountChanged a
obj VolumeMonitorMountAddedCallback
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_VolumeMonitorMountAddedCallback
cb' = VolumeMonitorMountAddedCallback
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountChangedCallback VolumeMonitorMountAddedCallback
cb
FunPtr C_VolumeMonitorMountAddedCallback
cb'' <- C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountChangedCallback C_VolumeMonitorMountAddedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorMountAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"mount-changed" FunPtr C_VolumeMonitorMountAddedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorMountChangedSignalInfo
instance SignalInfo VolumeMonitorMountChangedSignalInfo where
type HaskellCallbackType VolumeMonitorMountChangedSignalInfo = VolumeMonitorMountChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_VolumeMonitorMountChangedCallback cb
cb'' <- mk_VolumeMonitorMountChangedCallback cb'
connectSignalFunPtr obj "mount-changed" cb'' connectMode detail
#endif
type VolumeMonitorMountPreUnmountCallback =
Gio.Mount.Mount
-> IO ()
noVolumeMonitorMountPreUnmountCallback :: Maybe VolumeMonitorMountPreUnmountCallback
noVolumeMonitorMountPreUnmountCallback :: Maybe VolumeMonitorMountAddedCallback
noVolumeMonitorMountPreUnmountCallback = Maybe VolumeMonitorMountAddedCallback
forall a. Maybe a
Nothing
type C_VolumeMonitorMountPreUnmountCallback =
Ptr () ->
Ptr Gio.Mount.Mount ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorMountPreUnmountCallback :: C_VolumeMonitorMountPreUnmountCallback -> IO (FunPtr C_VolumeMonitorMountPreUnmountCallback)
genClosure_VolumeMonitorMountPreUnmount :: MonadIO m => VolumeMonitorMountPreUnmountCallback -> m (GClosure C_VolumeMonitorMountPreUnmountCallback)
genClosure_VolumeMonitorMountPreUnmount :: VolumeMonitorMountAddedCallback
-> m (GClosure C_VolumeMonitorMountAddedCallback)
genClosure_VolumeMonitorMountPreUnmount VolumeMonitorMountAddedCallback
cb = IO (GClosure C_VolumeMonitorMountAddedCallback)
-> m (GClosure C_VolumeMonitorMountAddedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_VolumeMonitorMountAddedCallback)
-> m (GClosure C_VolumeMonitorMountAddedCallback))
-> IO (GClosure C_VolumeMonitorMountAddedCallback)
-> m (GClosure C_VolumeMonitorMountAddedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_VolumeMonitorMountAddedCallback
cb' = VolumeMonitorMountAddedCallback
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountPreUnmountCallback VolumeMonitorMountAddedCallback
cb
C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountPreUnmountCallback C_VolumeMonitorMountAddedCallback
cb' IO (FunPtr C_VolumeMonitorMountAddedCallback)
-> (FunPtr C_VolumeMonitorMountAddedCallback
-> IO (GClosure C_VolumeMonitorMountAddedCallback))
-> IO (GClosure C_VolumeMonitorMountAddedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_VolumeMonitorMountAddedCallback
-> IO (GClosure C_VolumeMonitorMountAddedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_VolumeMonitorMountPreUnmountCallback ::
VolumeMonitorMountPreUnmountCallback ->
C_VolumeMonitorMountPreUnmountCallback
wrap_VolumeMonitorMountPreUnmountCallback :: VolumeMonitorMountAddedCallback
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountPreUnmountCallback VolumeMonitorMountAddedCallback
_cb Ptr ()
_ Ptr Mount
mount Ptr ()
_ = do
Mount
mount' <- ((ManagedPtr Mount -> Mount) -> Ptr Mount -> IO Mount
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Mount -> Mount
Gio.Mount.Mount) Ptr Mount
mount
VolumeMonitorMountAddedCallback
_cb Mount
mount'
onVolumeMonitorMountPreUnmount :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountPreUnmountCallback -> m SignalHandlerId
onVolumeMonitorMountPreUnmount :: a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId
onVolumeMonitorMountPreUnmount a
obj VolumeMonitorMountAddedCallback
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_VolumeMonitorMountAddedCallback
cb' = VolumeMonitorMountAddedCallback
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountPreUnmountCallback VolumeMonitorMountAddedCallback
cb
FunPtr C_VolumeMonitorMountAddedCallback
cb'' <- C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountPreUnmountCallback C_VolumeMonitorMountAddedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorMountAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"mount-pre-unmount" FunPtr C_VolumeMonitorMountAddedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterVolumeMonitorMountPreUnmount :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountPreUnmountCallback -> m SignalHandlerId
afterVolumeMonitorMountPreUnmount :: a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId
afterVolumeMonitorMountPreUnmount a
obj VolumeMonitorMountAddedCallback
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_VolumeMonitorMountAddedCallback
cb' = VolumeMonitorMountAddedCallback
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountPreUnmountCallback VolumeMonitorMountAddedCallback
cb
FunPtr C_VolumeMonitorMountAddedCallback
cb'' <- C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountPreUnmountCallback C_VolumeMonitorMountAddedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorMountAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"mount-pre-unmount" FunPtr C_VolumeMonitorMountAddedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorMountPreUnmountSignalInfo
instance SignalInfo VolumeMonitorMountPreUnmountSignalInfo where
type HaskellCallbackType VolumeMonitorMountPreUnmountSignalInfo = VolumeMonitorMountPreUnmountCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_VolumeMonitorMountPreUnmountCallback cb
cb'' <- mk_VolumeMonitorMountPreUnmountCallback cb'
connectSignalFunPtr obj "mount-pre-unmount" cb'' connectMode detail
#endif
type VolumeMonitorMountRemovedCallback =
Gio.Mount.Mount
-> IO ()
noVolumeMonitorMountRemovedCallback :: Maybe VolumeMonitorMountRemovedCallback
noVolumeMonitorMountRemovedCallback :: Maybe VolumeMonitorMountAddedCallback
noVolumeMonitorMountRemovedCallback = Maybe VolumeMonitorMountAddedCallback
forall a. Maybe a
Nothing
type C_VolumeMonitorMountRemovedCallback =
Ptr () ->
Ptr Gio.Mount.Mount ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorMountRemovedCallback :: C_VolumeMonitorMountRemovedCallback -> IO (FunPtr C_VolumeMonitorMountRemovedCallback)
genClosure_VolumeMonitorMountRemoved :: MonadIO m => VolumeMonitorMountRemovedCallback -> m (GClosure C_VolumeMonitorMountRemovedCallback)
genClosure_VolumeMonitorMountRemoved :: VolumeMonitorMountAddedCallback
-> m (GClosure C_VolumeMonitorMountAddedCallback)
genClosure_VolumeMonitorMountRemoved VolumeMonitorMountAddedCallback
cb = IO (GClosure C_VolumeMonitorMountAddedCallback)
-> m (GClosure C_VolumeMonitorMountAddedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_VolumeMonitorMountAddedCallback)
-> m (GClosure C_VolumeMonitorMountAddedCallback))
-> IO (GClosure C_VolumeMonitorMountAddedCallback)
-> m (GClosure C_VolumeMonitorMountAddedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_VolumeMonitorMountAddedCallback
cb' = VolumeMonitorMountAddedCallback
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountRemovedCallback VolumeMonitorMountAddedCallback
cb
C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountRemovedCallback C_VolumeMonitorMountAddedCallback
cb' IO (FunPtr C_VolumeMonitorMountAddedCallback)
-> (FunPtr C_VolumeMonitorMountAddedCallback
-> IO (GClosure C_VolumeMonitorMountAddedCallback))
-> IO (GClosure C_VolumeMonitorMountAddedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_VolumeMonitorMountAddedCallback
-> IO (GClosure C_VolumeMonitorMountAddedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_VolumeMonitorMountRemovedCallback ::
VolumeMonitorMountRemovedCallback ->
C_VolumeMonitorMountRemovedCallback
wrap_VolumeMonitorMountRemovedCallback :: VolumeMonitorMountAddedCallback
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountRemovedCallback VolumeMonitorMountAddedCallback
_cb Ptr ()
_ Ptr Mount
mount Ptr ()
_ = do
Mount
mount' <- ((ManagedPtr Mount -> Mount) -> Ptr Mount -> IO Mount
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Mount -> Mount
Gio.Mount.Mount) Ptr Mount
mount
VolumeMonitorMountAddedCallback
_cb Mount
mount'
onVolumeMonitorMountRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountRemovedCallback -> m SignalHandlerId
onVolumeMonitorMountRemoved :: a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId
onVolumeMonitorMountRemoved a
obj VolumeMonitorMountAddedCallback
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_VolumeMonitorMountAddedCallback
cb' = VolumeMonitorMountAddedCallback
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountRemovedCallback VolumeMonitorMountAddedCallback
cb
FunPtr C_VolumeMonitorMountAddedCallback
cb'' <- C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountRemovedCallback C_VolumeMonitorMountAddedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorMountAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"mount-removed" FunPtr C_VolumeMonitorMountAddedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterVolumeMonitorMountRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountRemovedCallback -> m SignalHandlerId
afterVolumeMonitorMountRemoved :: a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId
afterVolumeMonitorMountRemoved a
obj VolumeMonitorMountAddedCallback
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_VolumeMonitorMountAddedCallback
cb' = VolumeMonitorMountAddedCallback
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountRemovedCallback VolumeMonitorMountAddedCallback
cb
FunPtr C_VolumeMonitorMountAddedCallback
cb'' <- C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountRemovedCallback C_VolumeMonitorMountAddedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorMountAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"mount-removed" FunPtr C_VolumeMonitorMountAddedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorMountRemovedSignalInfo
instance SignalInfo VolumeMonitorMountRemovedSignalInfo where
type HaskellCallbackType VolumeMonitorMountRemovedSignalInfo = VolumeMonitorMountRemovedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_VolumeMonitorMountRemovedCallback cb
cb'' <- mk_VolumeMonitorMountRemovedCallback cb'
connectSignalFunPtr obj "mount-removed" cb'' connectMode detail
#endif
type VolumeMonitorVolumeAddedCallback =
Gio.Volume.Volume
-> IO ()
noVolumeMonitorVolumeAddedCallback :: Maybe VolumeMonitorVolumeAddedCallback
noVolumeMonitorVolumeAddedCallback :: Maybe VolumeMonitorVolumeAddedCallback
noVolumeMonitorVolumeAddedCallback = Maybe VolumeMonitorVolumeAddedCallback
forall a. Maybe a
Nothing
type C_VolumeMonitorVolumeAddedCallback =
Ptr () ->
Ptr Gio.Volume.Volume ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorVolumeAddedCallback :: C_VolumeMonitorVolumeAddedCallback -> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
genClosure_VolumeMonitorVolumeAdded :: MonadIO m => VolumeMonitorVolumeAddedCallback -> m (GClosure C_VolumeMonitorVolumeAddedCallback)
genClosure_VolumeMonitorVolumeAdded :: VolumeMonitorVolumeAddedCallback
-> m (GClosure C_VolumeMonitorVolumeAddedCallback)
genClosure_VolumeMonitorVolumeAdded VolumeMonitorVolumeAddedCallback
cb = IO (GClosure C_VolumeMonitorVolumeAddedCallback)
-> m (GClosure C_VolumeMonitorVolumeAddedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_VolumeMonitorVolumeAddedCallback)
-> m (GClosure C_VolumeMonitorVolumeAddedCallback))
-> IO (GClosure C_VolumeMonitorVolumeAddedCallback)
-> m (GClosure C_VolumeMonitorVolumeAddedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_VolumeMonitorVolumeAddedCallback
cb' = VolumeMonitorVolumeAddedCallback
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeAddedCallback VolumeMonitorVolumeAddedCallback
cb
C_VolumeMonitorVolumeAddedCallback
-> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
mk_VolumeMonitorVolumeAddedCallback C_VolumeMonitorVolumeAddedCallback
cb' IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
-> (FunPtr C_VolumeMonitorVolumeAddedCallback
-> IO (GClosure C_VolumeMonitorVolumeAddedCallback))
-> IO (GClosure C_VolumeMonitorVolumeAddedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_VolumeMonitorVolumeAddedCallback
-> IO (GClosure C_VolumeMonitorVolumeAddedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_VolumeMonitorVolumeAddedCallback ::
VolumeMonitorVolumeAddedCallback ->
C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeAddedCallback :: VolumeMonitorVolumeAddedCallback
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeAddedCallback VolumeMonitorVolumeAddedCallback
_cb Ptr ()
_ Ptr Volume
volume Ptr ()
_ = do
Volume
volume' <- ((ManagedPtr Volume -> Volume) -> Ptr Volume -> IO Volume
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Volume -> Volume
Gio.Volume.Volume) Ptr Volume
volume
VolumeMonitorVolumeAddedCallback
_cb Volume
volume'
onVolumeMonitorVolumeAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId
onVolumeMonitorVolumeAdded :: a -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId
onVolumeMonitorVolumeAdded a
obj VolumeMonitorVolumeAddedCallback
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_VolumeMonitorVolumeAddedCallback
cb' = VolumeMonitorVolumeAddedCallback
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeAddedCallback VolumeMonitorVolumeAddedCallback
cb
FunPtr C_VolumeMonitorVolumeAddedCallback
cb'' <- C_VolumeMonitorVolumeAddedCallback
-> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
mk_VolumeMonitorVolumeAddedCallback C_VolumeMonitorVolumeAddedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorVolumeAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"volume-added" FunPtr C_VolumeMonitorVolumeAddedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterVolumeMonitorVolumeAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId
afterVolumeMonitorVolumeAdded :: a -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId
afterVolumeMonitorVolumeAdded a
obj VolumeMonitorVolumeAddedCallback
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_VolumeMonitorVolumeAddedCallback
cb' = VolumeMonitorVolumeAddedCallback
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeAddedCallback VolumeMonitorVolumeAddedCallback
cb
FunPtr C_VolumeMonitorVolumeAddedCallback
cb'' <- C_VolumeMonitorVolumeAddedCallback
-> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
mk_VolumeMonitorVolumeAddedCallback C_VolumeMonitorVolumeAddedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorVolumeAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"volume-added" FunPtr C_VolumeMonitorVolumeAddedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorVolumeAddedSignalInfo
instance SignalInfo VolumeMonitorVolumeAddedSignalInfo where
type HaskellCallbackType VolumeMonitorVolumeAddedSignalInfo = VolumeMonitorVolumeAddedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_VolumeMonitorVolumeAddedCallback cb
cb'' <- mk_VolumeMonitorVolumeAddedCallback cb'
connectSignalFunPtr obj "volume-added" cb'' connectMode detail
#endif
type VolumeMonitorVolumeChangedCallback =
Gio.Volume.Volume
-> IO ()
noVolumeMonitorVolumeChangedCallback :: Maybe VolumeMonitorVolumeChangedCallback
noVolumeMonitorVolumeChangedCallback :: Maybe VolumeMonitorVolumeAddedCallback
noVolumeMonitorVolumeChangedCallback = Maybe VolumeMonitorVolumeAddedCallback
forall a. Maybe a
Nothing
type C_VolumeMonitorVolumeChangedCallback =
Ptr () ->
Ptr Gio.Volume.Volume ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorVolumeChangedCallback :: C_VolumeMonitorVolumeChangedCallback -> IO (FunPtr C_VolumeMonitorVolumeChangedCallback)
genClosure_VolumeMonitorVolumeChanged :: MonadIO m => VolumeMonitorVolumeChangedCallback -> m (GClosure C_VolumeMonitorVolumeChangedCallback)
genClosure_VolumeMonitorVolumeChanged :: VolumeMonitorVolumeAddedCallback
-> m (GClosure C_VolumeMonitorVolumeAddedCallback)
genClosure_VolumeMonitorVolumeChanged VolumeMonitorVolumeAddedCallback
cb = IO (GClosure C_VolumeMonitorVolumeAddedCallback)
-> m (GClosure C_VolumeMonitorVolumeAddedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_VolumeMonitorVolumeAddedCallback)
-> m (GClosure C_VolumeMonitorVolumeAddedCallback))
-> IO (GClosure C_VolumeMonitorVolumeAddedCallback)
-> m (GClosure C_VolumeMonitorVolumeAddedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_VolumeMonitorVolumeAddedCallback
cb' = VolumeMonitorVolumeAddedCallback
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeChangedCallback VolumeMonitorVolumeAddedCallback
cb
C_VolumeMonitorVolumeAddedCallback
-> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
mk_VolumeMonitorVolumeChangedCallback C_VolumeMonitorVolumeAddedCallback
cb' IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
-> (FunPtr C_VolumeMonitorVolumeAddedCallback
-> IO (GClosure C_VolumeMonitorVolumeAddedCallback))
-> IO (GClosure C_VolumeMonitorVolumeAddedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_VolumeMonitorVolumeAddedCallback
-> IO (GClosure C_VolumeMonitorVolumeAddedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_VolumeMonitorVolumeChangedCallback ::
VolumeMonitorVolumeChangedCallback ->
C_VolumeMonitorVolumeChangedCallback
wrap_VolumeMonitorVolumeChangedCallback :: VolumeMonitorVolumeAddedCallback
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeChangedCallback VolumeMonitorVolumeAddedCallback
_cb Ptr ()
_ Ptr Volume
volume Ptr ()
_ = do
Volume
volume' <- ((ManagedPtr Volume -> Volume) -> Ptr Volume -> IO Volume
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Volume -> Volume
Gio.Volume.Volume) Ptr Volume
volume
VolumeMonitorVolumeAddedCallback
_cb Volume
volume'
onVolumeMonitorVolumeChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeChangedCallback -> m SignalHandlerId
onVolumeMonitorVolumeChanged :: a -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId
onVolumeMonitorVolumeChanged a
obj VolumeMonitorVolumeAddedCallback
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_VolumeMonitorVolumeAddedCallback
cb' = VolumeMonitorVolumeAddedCallback
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeChangedCallback VolumeMonitorVolumeAddedCallback
cb
FunPtr C_VolumeMonitorVolumeAddedCallback
cb'' <- C_VolumeMonitorVolumeAddedCallback
-> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
mk_VolumeMonitorVolumeChangedCallback C_VolumeMonitorVolumeAddedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorVolumeAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"volume-changed" FunPtr C_VolumeMonitorVolumeAddedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterVolumeMonitorVolumeChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeChangedCallback -> m SignalHandlerId
afterVolumeMonitorVolumeChanged :: a -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId
afterVolumeMonitorVolumeChanged a
obj VolumeMonitorVolumeAddedCallback
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_VolumeMonitorVolumeAddedCallback
cb' = VolumeMonitorVolumeAddedCallback
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeChangedCallback VolumeMonitorVolumeAddedCallback
cb
FunPtr C_VolumeMonitorVolumeAddedCallback
cb'' <- C_VolumeMonitorVolumeAddedCallback
-> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
mk_VolumeMonitorVolumeChangedCallback C_VolumeMonitorVolumeAddedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorVolumeAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"volume-changed" FunPtr C_VolumeMonitorVolumeAddedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorVolumeChangedSignalInfo
instance SignalInfo VolumeMonitorVolumeChangedSignalInfo where
type HaskellCallbackType VolumeMonitorVolumeChangedSignalInfo = VolumeMonitorVolumeChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_VolumeMonitorVolumeChangedCallback cb
cb'' <- mk_VolumeMonitorVolumeChangedCallback cb'
connectSignalFunPtr obj "volume-changed" cb'' connectMode detail
#endif
type VolumeMonitorVolumeRemovedCallback =
Gio.Volume.Volume
-> IO ()
noVolumeMonitorVolumeRemovedCallback :: Maybe VolumeMonitorVolumeRemovedCallback
noVolumeMonitorVolumeRemovedCallback :: Maybe VolumeMonitorVolumeAddedCallback
noVolumeMonitorVolumeRemovedCallback = Maybe VolumeMonitorVolumeAddedCallback
forall a. Maybe a
Nothing
type C_VolumeMonitorVolumeRemovedCallback =
Ptr () ->
Ptr Gio.Volume.Volume ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorVolumeRemovedCallback :: C_VolumeMonitorVolumeRemovedCallback -> IO (FunPtr C_VolumeMonitorVolumeRemovedCallback)
genClosure_VolumeMonitorVolumeRemoved :: MonadIO m => VolumeMonitorVolumeRemovedCallback -> m (GClosure C_VolumeMonitorVolumeRemovedCallback)
genClosure_VolumeMonitorVolumeRemoved :: VolumeMonitorVolumeAddedCallback
-> m (GClosure C_VolumeMonitorVolumeAddedCallback)
genClosure_VolumeMonitorVolumeRemoved VolumeMonitorVolumeAddedCallback
cb = IO (GClosure C_VolumeMonitorVolumeAddedCallback)
-> m (GClosure C_VolumeMonitorVolumeAddedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_VolumeMonitorVolumeAddedCallback)
-> m (GClosure C_VolumeMonitorVolumeAddedCallback))
-> IO (GClosure C_VolumeMonitorVolumeAddedCallback)
-> m (GClosure C_VolumeMonitorVolumeAddedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_VolumeMonitorVolumeAddedCallback
cb' = VolumeMonitorVolumeAddedCallback
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeRemovedCallback VolumeMonitorVolumeAddedCallback
cb
C_VolumeMonitorVolumeAddedCallback
-> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
mk_VolumeMonitorVolumeRemovedCallback C_VolumeMonitorVolumeAddedCallback
cb' IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
-> (FunPtr C_VolumeMonitorVolumeAddedCallback
-> IO (GClosure C_VolumeMonitorVolumeAddedCallback))
-> IO (GClosure C_VolumeMonitorVolumeAddedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_VolumeMonitorVolumeAddedCallback
-> IO (GClosure C_VolumeMonitorVolumeAddedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_VolumeMonitorVolumeRemovedCallback ::
VolumeMonitorVolumeRemovedCallback ->
C_VolumeMonitorVolumeRemovedCallback
wrap_VolumeMonitorVolumeRemovedCallback :: VolumeMonitorVolumeAddedCallback
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeRemovedCallback VolumeMonitorVolumeAddedCallback
_cb Ptr ()
_ Ptr Volume
volume Ptr ()
_ = do
Volume
volume' <- ((ManagedPtr Volume -> Volume) -> Ptr Volume -> IO Volume
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Volume -> Volume
Gio.Volume.Volume) Ptr Volume
volume
VolumeMonitorVolumeAddedCallback
_cb Volume
volume'
onVolumeMonitorVolumeRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeRemovedCallback -> m SignalHandlerId
onVolumeMonitorVolumeRemoved :: a -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId
onVolumeMonitorVolumeRemoved a
obj VolumeMonitorVolumeAddedCallback
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_VolumeMonitorVolumeAddedCallback
cb' = VolumeMonitorVolumeAddedCallback
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeRemovedCallback VolumeMonitorVolumeAddedCallback
cb
FunPtr C_VolumeMonitorVolumeAddedCallback
cb'' <- C_VolumeMonitorVolumeAddedCallback
-> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
mk_VolumeMonitorVolumeRemovedCallback C_VolumeMonitorVolumeAddedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorVolumeAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"volume-removed" FunPtr C_VolumeMonitorVolumeAddedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterVolumeMonitorVolumeRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeRemovedCallback -> m SignalHandlerId
afterVolumeMonitorVolumeRemoved :: a -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId
afterVolumeMonitorVolumeRemoved a
obj VolumeMonitorVolumeAddedCallback
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_VolumeMonitorVolumeAddedCallback
cb' = VolumeMonitorVolumeAddedCallback
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeRemovedCallback VolumeMonitorVolumeAddedCallback
cb
FunPtr C_VolumeMonitorVolumeAddedCallback
cb'' <- C_VolumeMonitorVolumeAddedCallback
-> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
mk_VolumeMonitorVolumeRemovedCallback C_VolumeMonitorVolumeAddedCallback
cb'
a
-> Text
-> FunPtr C_VolumeMonitorVolumeAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"volume-removed" FunPtr C_VolumeMonitorVolumeAddedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorVolumeRemovedSignalInfo
instance SignalInfo VolumeMonitorVolumeRemovedSignalInfo where
type HaskellCallbackType VolumeMonitorVolumeRemovedSignalInfo = VolumeMonitorVolumeRemovedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_VolumeMonitorVolumeRemovedCallback cb
cb'' <- mk_VolumeMonitorVolumeRemovedCallback cb'
connectSignalFunPtr obj "volume-removed" cb'' connectMode detail
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList VolumeMonitor
type instance O.AttributeList VolumeMonitor = VolumeMonitorAttributeList
type VolumeMonitorAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList VolumeMonitor = VolumeMonitorSignalList
type VolumeMonitorSignalList = ('[ '("driveChanged", VolumeMonitorDriveChangedSignalInfo), '("driveConnected", VolumeMonitorDriveConnectedSignalInfo), '("driveDisconnected", VolumeMonitorDriveDisconnectedSignalInfo), '("driveEjectButton", VolumeMonitorDriveEjectButtonSignalInfo), '("driveStopButton", VolumeMonitorDriveStopButtonSignalInfo), '("mountAdded", VolumeMonitorMountAddedSignalInfo), '("mountChanged", VolumeMonitorMountChangedSignalInfo), '("mountPreUnmount", VolumeMonitorMountPreUnmountSignalInfo), '("mountRemoved", VolumeMonitorMountRemovedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("volumeAdded", VolumeMonitorVolumeAddedSignalInfo), '("volumeChanged", VolumeMonitorVolumeChangedSignalInfo), '("volumeRemoved", VolumeMonitorVolumeRemovedSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_volume_monitor_get_connected_drives" g_volume_monitor_get_connected_drives ::
Ptr VolumeMonitor ->
IO (Ptr (GList (Ptr Gio.Drive.Drive)))
volumeMonitorGetConnectedDrives ::
(B.CallStack.HasCallStack, MonadIO m, IsVolumeMonitor a) =>
a
-> m [Gio.Drive.Drive]
volumeMonitorGetConnectedDrives :: a -> m [Drive]
volumeMonitorGetConnectedDrives a
volumeMonitor = IO [Drive] -> m [Drive]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Drive] -> m [Drive]) -> IO [Drive] -> m [Drive]
forall a b. (a -> b) -> a -> b
$ do
Ptr VolumeMonitor
volumeMonitor' <- a -> IO (Ptr VolumeMonitor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
volumeMonitor
Ptr (GList (Ptr Drive))
result <- Ptr VolumeMonitor -> IO (Ptr (GList (Ptr Drive)))
g_volume_monitor_get_connected_drives Ptr VolumeMonitor
volumeMonitor'
[Ptr Drive]
result' <- Ptr (GList (Ptr Drive)) -> IO [Ptr Drive]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Drive))
result
[Drive]
result'' <- (Ptr Drive -> IO Drive) -> [Ptr Drive] -> IO [Drive]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Drive -> Drive) -> Ptr Drive -> IO Drive
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Drive -> Drive
Gio.Drive.Drive) [Ptr Drive]
result'
Ptr (GList (Ptr Drive)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Drive))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
volumeMonitor
[Drive] -> IO [Drive]
forall (m :: * -> *) a. Monad m => a -> m a
return [Drive]
result''
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorGetConnectedDrivesMethodInfo
instance (signature ~ (m [Gio.Drive.Drive]), MonadIO m, IsVolumeMonitor a) => O.MethodInfo VolumeMonitorGetConnectedDrivesMethodInfo a signature where
overloadedMethod = volumeMonitorGetConnectedDrives
#endif
foreign import ccall "g_volume_monitor_get_mount_for_uuid" g_volume_monitor_get_mount_for_uuid ::
Ptr VolumeMonitor ->
CString ->
IO (Ptr Gio.Mount.Mount)
volumeMonitorGetMountForUuid ::
(B.CallStack.HasCallStack, MonadIO m, IsVolumeMonitor a) =>
a
-> T.Text
-> m Gio.Mount.Mount
volumeMonitorGetMountForUuid :: a -> Text -> m Mount
volumeMonitorGetMountForUuid a
volumeMonitor Text
uuid = IO Mount -> m Mount
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Mount -> m Mount) -> IO Mount -> m Mount
forall a b. (a -> b) -> a -> b
$ do
Ptr VolumeMonitor
volumeMonitor' <- a -> IO (Ptr VolumeMonitor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
volumeMonitor
CString
uuid' <- Text -> IO CString
textToCString Text
uuid
Ptr Mount
result <- Ptr VolumeMonitor -> CString -> IO (Ptr Mount)
g_volume_monitor_get_mount_for_uuid Ptr VolumeMonitor
volumeMonitor' CString
uuid'
Text -> Ptr Mount -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"volumeMonitorGetMountForUuid" Ptr Mount
result
Mount
result' <- ((ManagedPtr Mount -> Mount) -> Ptr Mount -> IO Mount
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Mount -> Mount
Gio.Mount.Mount) Ptr Mount
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
volumeMonitor
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uuid'
Mount -> IO Mount
forall (m :: * -> *) a. Monad m => a -> m a
return Mount
result'
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorGetMountForUuidMethodInfo
instance (signature ~ (T.Text -> m Gio.Mount.Mount), MonadIO m, IsVolumeMonitor a) => O.MethodInfo VolumeMonitorGetMountForUuidMethodInfo a signature where
overloadedMethod = volumeMonitorGetMountForUuid
#endif
foreign import ccall "g_volume_monitor_get_mounts" g_volume_monitor_get_mounts ::
Ptr VolumeMonitor ->
IO (Ptr (GList (Ptr Gio.Mount.Mount)))
volumeMonitorGetMounts ::
(B.CallStack.HasCallStack, MonadIO m, IsVolumeMonitor a) =>
a
-> m [Gio.Mount.Mount]
volumeMonitorGetMounts :: a -> m [Mount]
volumeMonitorGetMounts a
volumeMonitor = IO [Mount] -> m [Mount]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Mount] -> m [Mount]) -> IO [Mount] -> m [Mount]
forall a b. (a -> b) -> a -> b
$ do
Ptr VolumeMonitor
volumeMonitor' <- a -> IO (Ptr VolumeMonitor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
volumeMonitor
Ptr (GList (Ptr Mount))
result <- Ptr VolumeMonitor -> IO (Ptr (GList (Ptr Mount)))
g_volume_monitor_get_mounts Ptr VolumeMonitor
volumeMonitor'
[Ptr Mount]
result' <- Ptr (GList (Ptr Mount)) -> IO [Ptr Mount]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Mount))
result
[Mount]
result'' <- (Ptr Mount -> IO Mount) -> [Ptr Mount] -> IO [Mount]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Mount -> Mount) -> Ptr Mount -> IO Mount
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Mount -> Mount
Gio.Mount.Mount) [Ptr Mount]
result'
Ptr (GList (Ptr Mount)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Mount))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
volumeMonitor
[Mount] -> IO [Mount]
forall (m :: * -> *) a. Monad m => a -> m a
return [Mount]
result''
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorGetMountsMethodInfo
instance (signature ~ (m [Gio.Mount.Mount]), MonadIO m, IsVolumeMonitor a) => O.MethodInfo VolumeMonitorGetMountsMethodInfo a signature where
overloadedMethod = volumeMonitorGetMounts
#endif
foreign import ccall "g_volume_monitor_get_volume_for_uuid" g_volume_monitor_get_volume_for_uuid ::
Ptr VolumeMonitor ->
CString ->
IO (Ptr Gio.Volume.Volume)
volumeMonitorGetVolumeForUuid ::
(B.CallStack.HasCallStack, MonadIO m, IsVolumeMonitor a) =>
a
-> T.Text
-> m Gio.Volume.Volume
volumeMonitorGetVolumeForUuid :: a -> Text -> m Volume
volumeMonitorGetVolumeForUuid a
volumeMonitor Text
uuid = IO Volume -> m Volume
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Volume -> m Volume) -> IO Volume -> m Volume
forall a b. (a -> b) -> a -> b
$ do
Ptr VolumeMonitor
volumeMonitor' <- a -> IO (Ptr VolumeMonitor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
volumeMonitor
CString
uuid' <- Text -> IO CString
textToCString Text
uuid
Ptr Volume
result <- Ptr VolumeMonitor -> CString -> IO (Ptr Volume)
g_volume_monitor_get_volume_for_uuid Ptr VolumeMonitor
volumeMonitor' CString
uuid'
Text -> Ptr Volume -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"volumeMonitorGetVolumeForUuid" Ptr Volume
result
Volume
result' <- ((ManagedPtr Volume -> Volume) -> Ptr Volume -> IO Volume
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Volume -> Volume
Gio.Volume.Volume) Ptr Volume
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
volumeMonitor
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uuid'
Volume -> IO Volume
forall (m :: * -> *) a. Monad m => a -> m a
return Volume
result'
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorGetVolumeForUuidMethodInfo
instance (signature ~ (T.Text -> m Gio.Volume.Volume), MonadIO m, IsVolumeMonitor a) => O.MethodInfo VolumeMonitorGetVolumeForUuidMethodInfo a signature where
overloadedMethod = volumeMonitorGetVolumeForUuid
#endif
foreign import ccall "g_volume_monitor_get_volumes" g_volume_monitor_get_volumes ::
Ptr VolumeMonitor ->
IO (Ptr (GList (Ptr Gio.Volume.Volume)))
volumeMonitorGetVolumes ::
(B.CallStack.HasCallStack, MonadIO m, IsVolumeMonitor a) =>
a
-> m [Gio.Volume.Volume]
volumeMonitorGetVolumes :: a -> m [Volume]
volumeMonitorGetVolumes a
volumeMonitor = IO [Volume] -> m [Volume]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Volume] -> m [Volume]) -> IO [Volume] -> m [Volume]
forall a b. (a -> b) -> a -> b
$ do
Ptr VolumeMonitor
volumeMonitor' <- a -> IO (Ptr VolumeMonitor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
volumeMonitor
Ptr (GList (Ptr Volume))
result <- Ptr VolumeMonitor -> IO (Ptr (GList (Ptr Volume)))
g_volume_monitor_get_volumes Ptr VolumeMonitor
volumeMonitor'
[Ptr Volume]
result' <- Ptr (GList (Ptr Volume)) -> IO [Ptr Volume]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Volume))
result
[Volume]
result'' <- (Ptr Volume -> IO Volume) -> [Ptr Volume] -> IO [Volume]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Volume -> Volume) -> Ptr Volume -> IO Volume
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Volume -> Volume
Gio.Volume.Volume) [Ptr Volume]
result'
Ptr (GList (Ptr Volume)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Volume))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
volumeMonitor
[Volume] -> IO [Volume]
forall (m :: * -> *) a. Monad m => a -> m a
return [Volume]
result''
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorGetVolumesMethodInfo
instance (signature ~ (m [Gio.Volume.Volume]), MonadIO m, IsVolumeMonitor a) => O.MethodInfo VolumeMonitorGetVolumesMethodInfo a signature where
overloadedMethod = volumeMonitorGetVolumes
#endif
foreign import ccall "g_volume_monitor_adopt_orphan_mount" g_volume_monitor_adopt_orphan_mount ::
Ptr Gio.Mount.Mount ->
IO (Ptr Gio.Volume.Volume)
{-# DEPRECATED volumeMonitorAdoptOrphanMount ["(Since version 2.20)","Instead of using this function, t'GI.Gio.Objects.VolumeMonitor.VolumeMonitor'","implementations should instead create shadow mounts with the URI of","the mount they intend to adopt. See the proxy volume monitor in","gvfs for an example of this. Also see 'GI.Gio.Interfaces.Mount.mountIsShadowed',","'GI.Gio.Interfaces.Mount.mountShadow' and 'GI.Gio.Interfaces.Mount.mountUnshadow' functions."] #-}
volumeMonitorAdoptOrphanMount ::
(B.CallStack.HasCallStack, MonadIO m, Gio.Mount.IsMount a) =>
a
-> m Gio.Volume.Volume
volumeMonitorAdoptOrphanMount :: a -> m Volume
volumeMonitorAdoptOrphanMount a
mount = IO Volume -> m Volume
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Volume -> m Volume) -> IO Volume -> m Volume
forall a b. (a -> b) -> a -> b
$ do
Ptr Mount
mount' <- a -> IO (Ptr Mount)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
mount
Ptr Volume
result <- Ptr Mount -> IO (Ptr Volume)
g_volume_monitor_adopt_orphan_mount Ptr Mount
mount'
Text -> Ptr Volume -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"volumeMonitorAdoptOrphanMount" Ptr Volume
result
Volume
result' <- ((ManagedPtr Volume -> Volume) -> Ptr Volume -> IO Volume
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Volume -> Volume
Gio.Volume.Volume) Ptr Volume
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
mount
Volume -> IO Volume
forall (m :: * -> *) a. Monad m => a -> m a
return Volume
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_volume_monitor_get" g_volume_monitor_get ::
IO (Ptr VolumeMonitor)
volumeMonitorGet ::
(B.CallStack.HasCallStack, MonadIO m) =>
m VolumeMonitor
volumeMonitorGet :: m VolumeMonitor
volumeMonitorGet = IO VolumeMonitor -> m VolumeMonitor
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VolumeMonitor -> m VolumeMonitor)
-> IO VolumeMonitor -> m VolumeMonitor
forall a b. (a -> b) -> a -> b
$ do
Ptr VolumeMonitor
result <- IO (Ptr VolumeMonitor)
g_volume_monitor_get
Text -> Ptr VolumeMonitor -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"volumeMonitorGet" Ptr VolumeMonitor
result
VolumeMonitor
result' <- ((ManagedPtr VolumeMonitor -> VolumeMonitor)
-> Ptr VolumeMonitor -> IO VolumeMonitor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr VolumeMonitor -> VolumeMonitor
VolumeMonitor) Ptr VolumeMonitor
result
VolumeMonitor -> IO VolumeMonitor
forall (m :: * -> *) a. Monad m => a -> m a
return VolumeMonitor
result'
#if defined(ENABLE_OVERLOADING)
#endif