{-# LANGUAGE ImplicitParams, RankNTypes, 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 ,
VolumeMonitorDriveChangedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorDriveChangedSignalInfo ,
#endif
afterVolumeMonitorDriveChanged ,
onVolumeMonitorDriveChanged ,
VolumeMonitorDriveConnectedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorDriveConnectedSignalInfo ,
#endif
afterVolumeMonitorDriveConnected ,
onVolumeMonitorDriveConnected ,
VolumeMonitorDriveDisconnectedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorDriveDisconnectedSignalInfo,
#endif
afterVolumeMonitorDriveDisconnected ,
onVolumeMonitorDriveDisconnected ,
VolumeMonitorDriveEjectButtonCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorDriveEjectButtonSignalInfo ,
#endif
afterVolumeMonitorDriveEjectButton ,
onVolumeMonitorDriveEjectButton ,
VolumeMonitorDriveStopButtonCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorDriveStopButtonSignalInfo ,
#endif
afterVolumeMonitorDriveStopButton ,
onVolumeMonitorDriveStopButton ,
VolumeMonitorMountAddedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorMountAddedSignalInfo ,
#endif
afterVolumeMonitorMountAdded ,
onVolumeMonitorMountAdded ,
VolumeMonitorMountChangedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorMountChangedSignalInfo ,
#endif
afterVolumeMonitorMountChanged ,
onVolumeMonitorMountChanged ,
VolumeMonitorMountPreUnmountCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorMountPreUnmountSignalInfo ,
#endif
afterVolumeMonitorMountPreUnmount ,
onVolumeMonitorMountPreUnmount ,
VolumeMonitorMountRemovedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorMountRemovedSignalInfo ,
#endif
afterVolumeMonitorMountRemoved ,
onVolumeMonitorMountRemoved ,
VolumeMonitorVolumeAddedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorVolumeAddedSignalInfo ,
#endif
afterVolumeMonitorVolumeAdded ,
onVolumeMonitorVolumeAdded ,
VolumeMonitorVolumeChangedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorVolumeChangedSignalInfo ,
#endif
afterVolumeMonitorVolumeChanged ,
onVolumeMonitorVolumeChanged ,
VolumeMonitorVolumeRemovedCallback ,
#if defined(ENABLE_OVERLOADING)
VolumeMonitorVolumeRemovedSignalInfo ,
#endif
afterVolumeMonitorVolumeRemoved ,
onVolumeMonitorVolumeRemoved ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Enums as GLib.Enums
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.DateTime as GLib.DateTime
import qualified GI.GLib.Structs.PollFD as GLib.PollFD
import qualified GI.GLib.Structs.Source as GLib.Source
import qualified GI.GLib.Structs.TimeVal as GLib.TimeVal
import qualified GI.GObject.Callbacks as GObject.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import {-# SOURCE #-} qualified GI.Gio.Enums as Gio.Enums
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AppInfo as Gio.AppInfo
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Drive as Gio.Drive
import {-# SOURCE #-} qualified GI.Gio.Interfaces.File as Gio.File
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Icon as Gio.Icon
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Mount as Gio.Mount
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Seekable as Gio.Seekable
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Volume as Gio.Volume
import {-# SOURCE #-} qualified GI.Gio.Objects.AppLaunchContext as Gio.AppLaunchContext
import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Gio.Objects.FileEnumerator as Gio.FileEnumerator
import {-# SOURCE #-} qualified GI.Gio.Objects.FileIOStream as Gio.FileIOStream
import {-# SOURCE #-} qualified GI.Gio.Objects.FileInfo as Gio.FileInfo
import {-# SOURCE #-} qualified GI.Gio.Objects.FileInputStream as Gio.FileInputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.FileMonitor as Gio.FileMonitor
import {-# SOURCE #-} qualified GI.Gio.Objects.FileOutputStream as Gio.FileOutputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.IOStream as Gio.IOStream
import {-# SOURCE #-} qualified GI.Gio.Objects.InputStream as Gio.InputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.MountOperation as Gio.MountOperation
import {-# SOURCE #-} qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
import {-# SOURCE #-} qualified GI.Gio.Structs.FileAttributeInfo as Gio.FileAttributeInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.FileAttributeInfoList as Gio.FileAttributeInfoList
import {-# SOURCE #-} qualified GI.Gio.Structs.FileAttributeMatcher as Gio.FileAttributeMatcher
import {-# SOURCE #-} qualified GI.Gio.Structs.OutputVector as Gio.OutputVector
#else
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
#endif
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
$c== :: VolumeMonitor -> VolumeMonitor -> Bool
== :: VolumeMonitor -> VolumeMonitor -> Bool
$c/= :: VolumeMonitor -> VolumeMonitor -> Bool
/= :: 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
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 :: (MIO.MonadIO m, IsVolumeMonitor o) => o -> m VolumeMonitor
toVolumeMonitor :: forall (m :: * -> *) o.
(MonadIO m, IsVolumeMonitor o) =>
o -> m VolumeMonitor
toVolumeMonitor = IO VolumeMonitor -> m VolumeMonitor
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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'
B.ManagedPtr.unsafeCastTo ManagedPtr VolumeMonitor -> VolumeMonitor
VolumeMonitor
instance B.GValue.IsGValue (Maybe VolumeMonitor) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_volume_monitor_get_type
gvalueSet_ :: Ptr GValue -> Maybe VolumeMonitor -> IO ()
gvalueSet_ Ptr GValue
gv Maybe VolumeMonitor
P.Nothing = Ptr GValue -> Ptr VolumeMonitor -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr VolumeMonitor
forall a. Ptr a
FP.nullPtr :: FP.Ptr VolumeMonitor)
gvalueSet_ Ptr GValue
gv (P.Just VolumeMonitor
obj) = VolumeMonitor -> (Ptr VolumeMonitor -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr VolumeMonitor
obj (Ptr GValue -> Ptr VolumeMonitor -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe VolumeMonitor)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr VolumeMonitor)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr VolumeMonitor)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject VolumeMonitor ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveVolumeMonitorMethod (t :: Symbol) (o :: DK.Type) :: DK.Type 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.OverloadedMethod 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
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveVolumeMonitorMethod t VolumeMonitor, O.OverloadedMethod info VolumeMonitor p, R.HasField t VolumeMonitor p) => R.HasField t VolumeMonitor p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveVolumeMonitorMethod t VolumeMonitor, O.OverloadedMethodInfo info VolumeMonitor) => OL.IsLabel t (O.MethodProxy info VolumeMonitor) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type VolumeMonitorDriveChangedCallback =
Gio.Drive.Drive
-> IO ()
type C_VolumeMonitorDriveChangedCallback =
Ptr VolumeMonitor ->
Ptr Gio.Drive.Drive ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorDriveChangedCallback :: C_VolumeMonitorDriveChangedCallback -> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
wrap_VolumeMonitorDriveChangedCallback ::
GObject a => (a -> VolumeMonitorDriveChangedCallback) ->
C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveChangedCallback :: forall a.
GObject a =>
(a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveChangedCallback a -> VolumeMonitorDriveChangedCallback
gi'cb Ptr VolumeMonitor
gi'selfPtr Ptr Drive
drive Ptr ()
_ = do
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
B.ManagedPtr.withNewObject gi'selfPtr $ \VolumeMonitor
gi'self -> a -> VolumeMonitorDriveChangedCallback
gi'cb (VolumeMonitor -> a
forall a b. Coercible a b => a -> b
Coerce.coerce VolumeMonitor
gi'self) Drive
drive'
onVolumeMonitorDriveChanged :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveChangedCallback) -> m SignalHandlerId
onVolumeMonitorDriveChanged :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorDriveChangedCallback)
-> m SignalHandlerId
onVolumeMonitorDriveChanged a
obj (?self::a) => VolumeMonitorDriveChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorDriveChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorDriveChangedCallback
VolumeMonitorDriveChangedCallback
cb
let wrapped' :: C_VolumeMonitorDriveChangedCallback
wrapped' = (a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
forall a.
GObject a =>
(a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveChangedCallback a -> VolumeMonitorDriveChangedCallback
wrapped
wrapped'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveChangedCallback C_VolumeMonitorDriveChangedCallback
wrapped'
connectSignalFunPtr obj "drive-changed" wrapped'' SignalConnectBefore Nothing
afterVolumeMonitorDriveChanged :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveChangedCallback) -> m SignalHandlerId
afterVolumeMonitorDriveChanged :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorDriveChangedCallback)
-> m SignalHandlerId
afterVolumeMonitorDriveChanged a
obj (?self::a) => VolumeMonitorDriveChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorDriveChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorDriveChangedCallback
VolumeMonitorDriveChangedCallback
cb
let wrapped' :: C_VolumeMonitorDriveChangedCallback
wrapped' = (a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
forall a.
GObject a =>
(a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveChangedCallback a -> VolumeMonitorDriveChangedCallback
wrapped
wrapped'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveChangedCallback C_VolumeMonitorDriveChangedCallback
wrapped'
connectSignalFunPtr obj "drive-changed" wrapped'' SignalConnectAfter 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
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.VolumeMonitor::drive-changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-VolumeMonitor.html#g:signal:driveChanged"})
#endif
type VolumeMonitorDriveConnectedCallback =
Gio.Drive.Drive
-> IO ()
type C_VolumeMonitorDriveConnectedCallback =
Ptr VolumeMonitor ->
Ptr Gio.Drive.Drive ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorDriveConnectedCallback :: C_VolumeMonitorDriveConnectedCallback -> IO (FunPtr C_VolumeMonitorDriveConnectedCallback)
wrap_VolumeMonitorDriveConnectedCallback ::
GObject a => (a -> VolumeMonitorDriveConnectedCallback) ->
C_VolumeMonitorDriveConnectedCallback
wrap_VolumeMonitorDriveConnectedCallback :: forall a.
GObject a =>
(a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveConnectedCallback a -> VolumeMonitorDriveChangedCallback
gi'cb Ptr VolumeMonitor
gi'selfPtr Ptr Drive
drive Ptr ()
_ = do
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
B.ManagedPtr.withNewObject gi'selfPtr $ \VolumeMonitor
gi'self -> a -> VolumeMonitorDriveChangedCallback
gi'cb (VolumeMonitor -> a
forall a b. Coercible a b => a -> b
Coerce.coerce VolumeMonitor
gi'self) Drive
drive'
onVolumeMonitorDriveConnected :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveConnectedCallback) -> m SignalHandlerId
onVolumeMonitorDriveConnected :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorDriveChangedCallback)
-> m SignalHandlerId
onVolumeMonitorDriveConnected a
obj (?self::a) => VolumeMonitorDriveChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorDriveChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorDriveChangedCallback
VolumeMonitorDriveChangedCallback
cb
let wrapped' :: C_VolumeMonitorDriveChangedCallback
wrapped' = (a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
forall a.
GObject a =>
(a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveConnectedCallback a -> VolumeMonitorDriveChangedCallback
wrapped
wrapped'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveConnectedCallback C_VolumeMonitorDriveChangedCallback
wrapped'
connectSignalFunPtr obj "drive-connected" wrapped'' SignalConnectBefore Nothing
afterVolumeMonitorDriveConnected :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveConnectedCallback) -> m SignalHandlerId
afterVolumeMonitorDriveConnected :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorDriveChangedCallback)
-> m SignalHandlerId
afterVolumeMonitorDriveConnected a
obj (?self::a) => VolumeMonitorDriveChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorDriveChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorDriveChangedCallback
VolumeMonitorDriveChangedCallback
cb
let wrapped' :: C_VolumeMonitorDriveChangedCallback
wrapped' = (a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
forall a.
GObject a =>
(a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveConnectedCallback a -> VolumeMonitorDriveChangedCallback
wrapped
wrapped'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveConnectedCallback C_VolumeMonitorDriveChangedCallback
wrapped'
connectSignalFunPtr obj "drive-connected" wrapped'' SignalConnectAfter 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
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.VolumeMonitor::drive-connected"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-VolumeMonitor.html#g:signal:driveConnected"})
#endif
type VolumeMonitorDriveDisconnectedCallback =
Gio.Drive.Drive
-> IO ()
type C_VolumeMonitorDriveDisconnectedCallback =
Ptr VolumeMonitor ->
Ptr Gio.Drive.Drive ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorDriveDisconnectedCallback :: C_VolumeMonitorDriveDisconnectedCallback -> IO (FunPtr C_VolumeMonitorDriveDisconnectedCallback)
wrap_VolumeMonitorDriveDisconnectedCallback ::
GObject a => (a -> VolumeMonitorDriveDisconnectedCallback) ->
C_VolumeMonitorDriveDisconnectedCallback
wrap_VolumeMonitorDriveDisconnectedCallback :: forall a.
GObject a =>
(a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveDisconnectedCallback a -> VolumeMonitorDriveChangedCallback
gi'cb Ptr VolumeMonitor
gi'selfPtr Ptr Drive
drive Ptr ()
_ = do
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
B.ManagedPtr.withNewObject gi'selfPtr $ \VolumeMonitor
gi'self -> a -> VolumeMonitorDriveChangedCallback
gi'cb (VolumeMonitor -> a
forall a b. Coercible a b => a -> b
Coerce.coerce VolumeMonitor
gi'self) Drive
drive'
onVolumeMonitorDriveDisconnected :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveDisconnectedCallback) -> m SignalHandlerId
onVolumeMonitorDriveDisconnected :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorDriveChangedCallback)
-> m SignalHandlerId
onVolumeMonitorDriveDisconnected a
obj (?self::a) => VolumeMonitorDriveChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorDriveChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorDriveChangedCallback
VolumeMonitorDriveChangedCallback
cb
let wrapped' :: C_VolumeMonitorDriveChangedCallback
wrapped' = (a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
forall a.
GObject a =>
(a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveDisconnectedCallback a -> VolumeMonitorDriveChangedCallback
wrapped
wrapped'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveDisconnectedCallback C_VolumeMonitorDriveChangedCallback
wrapped'
connectSignalFunPtr obj "drive-disconnected" wrapped'' SignalConnectBefore Nothing
afterVolumeMonitorDriveDisconnected :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveDisconnectedCallback) -> m SignalHandlerId
afterVolumeMonitorDriveDisconnected :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorDriveChangedCallback)
-> m SignalHandlerId
afterVolumeMonitorDriveDisconnected a
obj (?self::a) => VolumeMonitorDriveChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorDriveChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorDriveChangedCallback
VolumeMonitorDriveChangedCallback
cb
let wrapped' :: C_VolumeMonitorDriveChangedCallback
wrapped' = (a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
forall a.
GObject a =>
(a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveDisconnectedCallback a -> VolumeMonitorDriveChangedCallback
wrapped
wrapped'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveDisconnectedCallback C_VolumeMonitorDriveChangedCallback
wrapped'
connectSignalFunPtr obj "drive-disconnected" wrapped'' SignalConnectAfter 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
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.VolumeMonitor::drive-disconnected"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-VolumeMonitor.html#g:signal:driveDisconnected"})
#endif
type VolumeMonitorDriveEjectButtonCallback =
Gio.Drive.Drive
-> IO ()
type C_VolumeMonitorDriveEjectButtonCallback =
Ptr VolumeMonitor ->
Ptr Gio.Drive.Drive ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorDriveEjectButtonCallback :: C_VolumeMonitorDriveEjectButtonCallback -> IO (FunPtr C_VolumeMonitorDriveEjectButtonCallback)
wrap_VolumeMonitorDriveEjectButtonCallback ::
GObject a => (a -> VolumeMonitorDriveEjectButtonCallback) ->
C_VolumeMonitorDriveEjectButtonCallback
wrap_VolumeMonitorDriveEjectButtonCallback :: forall a.
GObject a =>
(a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveEjectButtonCallback a -> VolumeMonitorDriveChangedCallback
gi'cb Ptr VolumeMonitor
gi'selfPtr Ptr Drive
drive Ptr ()
_ = do
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
B.ManagedPtr.withNewObject gi'selfPtr $ \VolumeMonitor
gi'self -> a -> VolumeMonitorDriveChangedCallback
gi'cb (VolumeMonitor -> a
forall a b. Coercible a b => a -> b
Coerce.coerce VolumeMonitor
gi'self) Drive
drive'
onVolumeMonitorDriveEjectButton :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveEjectButtonCallback) -> m SignalHandlerId
onVolumeMonitorDriveEjectButton :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorDriveChangedCallback)
-> m SignalHandlerId
onVolumeMonitorDriveEjectButton a
obj (?self::a) => VolumeMonitorDriveChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorDriveChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorDriveChangedCallback
VolumeMonitorDriveChangedCallback
cb
let wrapped' :: C_VolumeMonitorDriveChangedCallback
wrapped' = (a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
forall a.
GObject a =>
(a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveEjectButtonCallback a -> VolumeMonitorDriveChangedCallback
wrapped
wrapped'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveEjectButtonCallback C_VolumeMonitorDriveChangedCallback
wrapped'
connectSignalFunPtr obj "drive-eject-button" wrapped'' SignalConnectBefore Nothing
afterVolumeMonitorDriveEjectButton :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveEjectButtonCallback) -> m SignalHandlerId
afterVolumeMonitorDriveEjectButton :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorDriveChangedCallback)
-> m SignalHandlerId
afterVolumeMonitorDriveEjectButton a
obj (?self::a) => VolumeMonitorDriveChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorDriveChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorDriveChangedCallback
VolumeMonitorDriveChangedCallback
cb
let wrapped' :: C_VolumeMonitorDriveChangedCallback
wrapped' = (a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
forall a.
GObject a =>
(a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveEjectButtonCallback a -> VolumeMonitorDriveChangedCallback
wrapped
wrapped'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveEjectButtonCallback C_VolumeMonitorDriveChangedCallback
wrapped'
connectSignalFunPtr obj "drive-eject-button" wrapped'' SignalConnectAfter 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
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.VolumeMonitor::drive-eject-button"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-VolumeMonitor.html#g:signal:driveEjectButton"})
#endif
type VolumeMonitorDriveStopButtonCallback =
Gio.Drive.Drive
-> IO ()
type C_VolumeMonitorDriveStopButtonCallback =
Ptr VolumeMonitor ->
Ptr Gio.Drive.Drive ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorDriveStopButtonCallback :: C_VolumeMonitorDriveStopButtonCallback -> IO (FunPtr C_VolumeMonitorDriveStopButtonCallback)
wrap_VolumeMonitorDriveStopButtonCallback ::
GObject a => (a -> VolumeMonitorDriveStopButtonCallback) ->
C_VolumeMonitorDriveStopButtonCallback
wrap_VolumeMonitorDriveStopButtonCallback :: forall a.
GObject a =>
(a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveStopButtonCallback a -> VolumeMonitorDriveChangedCallback
gi'cb Ptr VolumeMonitor
gi'selfPtr Ptr Drive
drive Ptr ()
_ = do
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
B.ManagedPtr.withNewObject gi'selfPtr $ \VolumeMonitor
gi'self -> a -> VolumeMonitorDriveChangedCallback
gi'cb (VolumeMonitor -> a
forall a b. Coercible a b => a -> b
Coerce.coerce VolumeMonitor
gi'self) Drive
drive'
onVolumeMonitorDriveStopButton :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveStopButtonCallback) -> m SignalHandlerId
onVolumeMonitorDriveStopButton :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorDriveChangedCallback)
-> m SignalHandlerId
onVolumeMonitorDriveStopButton a
obj (?self::a) => VolumeMonitorDriveChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorDriveChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorDriveChangedCallback
VolumeMonitorDriveChangedCallback
cb
let wrapped' :: C_VolumeMonitorDriveChangedCallback
wrapped' = (a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
forall a.
GObject a =>
(a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveStopButtonCallback a -> VolumeMonitorDriveChangedCallback
wrapped
wrapped'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveStopButtonCallback C_VolumeMonitorDriveChangedCallback
wrapped'
connectSignalFunPtr obj "drive-stop-button" wrapped'' SignalConnectBefore Nothing
afterVolumeMonitorDriveStopButton :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveStopButtonCallback) -> m SignalHandlerId
afterVolumeMonitorDriveStopButton :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorDriveChangedCallback)
-> m SignalHandlerId
afterVolumeMonitorDriveStopButton a
obj (?self::a) => VolumeMonitorDriveChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorDriveChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorDriveChangedCallback
VolumeMonitorDriveChangedCallback
cb
let wrapped' :: C_VolumeMonitorDriveChangedCallback
wrapped' = (a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
forall a.
GObject a =>
(a -> VolumeMonitorDriveChangedCallback)
-> C_VolumeMonitorDriveChangedCallback
wrap_VolumeMonitorDriveStopButtonCallback a -> VolumeMonitorDriveChangedCallback
wrapped
wrapped'' <- C_VolumeMonitorDriveChangedCallback
-> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
mk_VolumeMonitorDriveStopButtonCallback C_VolumeMonitorDriveChangedCallback
wrapped'
connectSignalFunPtr obj "drive-stop-button" wrapped'' SignalConnectAfter 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
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.VolumeMonitor::drive-stop-button"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-VolumeMonitor.html#g:signal:driveStopButton"})
#endif
type VolumeMonitorMountAddedCallback =
Gio.Mount.Mount
-> IO ()
type C_VolumeMonitorMountAddedCallback =
Ptr VolumeMonitor ->
Ptr Gio.Mount.Mount ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorMountAddedCallback :: C_VolumeMonitorMountAddedCallback -> IO (FunPtr C_VolumeMonitorMountAddedCallback)
wrap_VolumeMonitorMountAddedCallback ::
GObject a => (a -> VolumeMonitorMountAddedCallback) ->
C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountAddedCallback :: forall a.
GObject a =>
(a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountAddedCallback a -> VolumeMonitorMountAddedCallback
gi'cb Ptr VolumeMonitor
gi'selfPtr Ptr Mount
mount Ptr ()
_ = do
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
B.ManagedPtr.withNewObject gi'selfPtr $ \VolumeMonitor
gi'self -> a -> VolumeMonitorMountAddedCallback
gi'cb (VolumeMonitor -> a
forall a b. Coercible a b => a -> b
Coerce.coerce VolumeMonitor
gi'self) Mount
mount'
onVolumeMonitorMountAdded :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountAddedCallback) -> m SignalHandlerId
onVolumeMonitorMountAdded :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorMountAddedCallback)
-> m SignalHandlerId
onVolumeMonitorMountAdded a
obj (?self::a) => VolumeMonitorMountAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorMountAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorMountAddedCallback
VolumeMonitorMountAddedCallback
cb
let wrapped' :: C_VolumeMonitorMountAddedCallback
wrapped' = (a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
forall a.
GObject a =>
(a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountAddedCallback a -> VolumeMonitorMountAddedCallback
wrapped
wrapped'' <- C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountAddedCallback C_VolumeMonitorMountAddedCallback
wrapped'
connectSignalFunPtr obj "mount-added" wrapped'' SignalConnectBefore Nothing
afterVolumeMonitorMountAdded :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountAddedCallback) -> m SignalHandlerId
afterVolumeMonitorMountAdded :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorMountAddedCallback)
-> m SignalHandlerId
afterVolumeMonitorMountAdded a
obj (?self::a) => VolumeMonitorMountAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorMountAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorMountAddedCallback
VolumeMonitorMountAddedCallback
cb
let wrapped' :: C_VolumeMonitorMountAddedCallback
wrapped' = (a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
forall a.
GObject a =>
(a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountAddedCallback a -> VolumeMonitorMountAddedCallback
wrapped
wrapped'' <- C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountAddedCallback C_VolumeMonitorMountAddedCallback
wrapped'
connectSignalFunPtr obj "mount-added" wrapped'' SignalConnectAfter 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
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.VolumeMonitor::mount-added"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-VolumeMonitor.html#g:signal:mountAdded"})
#endif
type VolumeMonitorMountChangedCallback =
Gio.Mount.Mount
-> IO ()
type C_VolumeMonitorMountChangedCallback =
Ptr VolumeMonitor ->
Ptr Gio.Mount.Mount ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorMountChangedCallback :: C_VolumeMonitorMountChangedCallback -> IO (FunPtr C_VolumeMonitorMountChangedCallback)
wrap_VolumeMonitorMountChangedCallback ::
GObject a => (a -> VolumeMonitorMountChangedCallback) ->
C_VolumeMonitorMountChangedCallback
wrap_VolumeMonitorMountChangedCallback :: forall a.
GObject a =>
(a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountChangedCallback a -> VolumeMonitorMountAddedCallback
gi'cb Ptr VolumeMonitor
gi'selfPtr Ptr Mount
mount Ptr ()
_ = do
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
B.ManagedPtr.withNewObject gi'selfPtr $ \VolumeMonitor
gi'self -> a -> VolumeMonitorMountAddedCallback
gi'cb (VolumeMonitor -> a
forall a b. Coercible a b => a -> b
Coerce.coerce VolumeMonitor
gi'self) Mount
mount'
onVolumeMonitorMountChanged :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountChangedCallback) -> m SignalHandlerId
onVolumeMonitorMountChanged :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorMountAddedCallback)
-> m SignalHandlerId
onVolumeMonitorMountChanged a
obj (?self::a) => VolumeMonitorMountAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorMountAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorMountAddedCallback
VolumeMonitorMountAddedCallback
cb
let wrapped' :: C_VolumeMonitorMountAddedCallback
wrapped' = (a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
forall a.
GObject a =>
(a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountChangedCallback a -> VolumeMonitorMountAddedCallback
wrapped
wrapped'' <- C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountChangedCallback C_VolumeMonitorMountAddedCallback
wrapped'
connectSignalFunPtr obj "mount-changed" wrapped'' SignalConnectBefore Nothing
afterVolumeMonitorMountChanged :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountChangedCallback) -> m SignalHandlerId
afterVolumeMonitorMountChanged :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorMountAddedCallback)
-> m SignalHandlerId
afterVolumeMonitorMountChanged a
obj (?self::a) => VolumeMonitorMountAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorMountAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorMountAddedCallback
VolumeMonitorMountAddedCallback
cb
let wrapped' :: C_VolumeMonitorMountAddedCallback
wrapped' = (a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
forall a.
GObject a =>
(a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountChangedCallback a -> VolumeMonitorMountAddedCallback
wrapped
wrapped'' <- C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountChangedCallback C_VolumeMonitorMountAddedCallback
wrapped'
connectSignalFunPtr obj "mount-changed" wrapped'' SignalConnectAfter 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
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.VolumeMonitor::mount-changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-VolumeMonitor.html#g:signal:mountChanged"})
#endif
type VolumeMonitorMountPreUnmountCallback =
Gio.Mount.Mount
-> IO ()
type C_VolumeMonitorMountPreUnmountCallback =
Ptr VolumeMonitor ->
Ptr Gio.Mount.Mount ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorMountPreUnmountCallback :: C_VolumeMonitorMountPreUnmountCallback -> IO (FunPtr C_VolumeMonitorMountPreUnmountCallback)
wrap_VolumeMonitorMountPreUnmountCallback ::
GObject a => (a -> VolumeMonitorMountPreUnmountCallback) ->
C_VolumeMonitorMountPreUnmountCallback
wrap_VolumeMonitorMountPreUnmountCallback :: forall a.
GObject a =>
(a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountPreUnmountCallback a -> VolumeMonitorMountAddedCallback
gi'cb Ptr VolumeMonitor
gi'selfPtr Ptr Mount
mount Ptr ()
_ = do
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
B.ManagedPtr.withNewObject gi'selfPtr $ \VolumeMonitor
gi'self -> a -> VolumeMonitorMountAddedCallback
gi'cb (VolumeMonitor -> a
forall a b. Coercible a b => a -> b
Coerce.coerce VolumeMonitor
gi'self) Mount
mount'
onVolumeMonitorMountPreUnmount :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountPreUnmountCallback) -> m SignalHandlerId
onVolumeMonitorMountPreUnmount :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorMountAddedCallback)
-> m SignalHandlerId
onVolumeMonitorMountPreUnmount a
obj (?self::a) => VolumeMonitorMountAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorMountAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorMountAddedCallback
VolumeMonitorMountAddedCallback
cb
let wrapped' :: C_VolumeMonitorMountAddedCallback
wrapped' = (a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
forall a.
GObject a =>
(a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountPreUnmountCallback a -> VolumeMonitorMountAddedCallback
wrapped
wrapped'' <- C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountPreUnmountCallback C_VolumeMonitorMountAddedCallback
wrapped'
connectSignalFunPtr obj "mount-pre-unmount" wrapped'' SignalConnectBefore Nothing
afterVolumeMonitorMountPreUnmount :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountPreUnmountCallback) -> m SignalHandlerId
afterVolumeMonitorMountPreUnmount :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorMountAddedCallback)
-> m SignalHandlerId
afterVolumeMonitorMountPreUnmount a
obj (?self::a) => VolumeMonitorMountAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorMountAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorMountAddedCallback
VolumeMonitorMountAddedCallback
cb
let wrapped' :: C_VolumeMonitorMountAddedCallback
wrapped' = (a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
forall a.
GObject a =>
(a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountPreUnmountCallback a -> VolumeMonitorMountAddedCallback
wrapped
wrapped'' <- C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountPreUnmountCallback C_VolumeMonitorMountAddedCallback
wrapped'
connectSignalFunPtr obj "mount-pre-unmount" wrapped'' SignalConnectAfter 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
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.VolumeMonitor::mount-pre-unmount"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-VolumeMonitor.html#g:signal:mountPreUnmount"})
#endif
type VolumeMonitorMountRemovedCallback =
Gio.Mount.Mount
-> IO ()
type C_VolumeMonitorMountRemovedCallback =
Ptr VolumeMonitor ->
Ptr Gio.Mount.Mount ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorMountRemovedCallback :: C_VolumeMonitorMountRemovedCallback -> IO (FunPtr C_VolumeMonitorMountRemovedCallback)
wrap_VolumeMonitorMountRemovedCallback ::
GObject a => (a -> VolumeMonitorMountRemovedCallback) ->
C_VolumeMonitorMountRemovedCallback
wrap_VolumeMonitorMountRemovedCallback :: forall a.
GObject a =>
(a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountRemovedCallback a -> VolumeMonitorMountAddedCallback
gi'cb Ptr VolumeMonitor
gi'selfPtr Ptr Mount
mount Ptr ()
_ = do
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
B.ManagedPtr.withNewObject gi'selfPtr $ \VolumeMonitor
gi'self -> a -> VolumeMonitorMountAddedCallback
gi'cb (VolumeMonitor -> a
forall a b. Coercible a b => a -> b
Coerce.coerce VolumeMonitor
gi'self) Mount
mount'
onVolumeMonitorMountRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountRemovedCallback) -> m SignalHandlerId
onVolumeMonitorMountRemoved :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorMountAddedCallback)
-> m SignalHandlerId
onVolumeMonitorMountRemoved a
obj (?self::a) => VolumeMonitorMountAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorMountAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorMountAddedCallback
VolumeMonitorMountAddedCallback
cb
let wrapped' :: C_VolumeMonitorMountAddedCallback
wrapped' = (a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
forall a.
GObject a =>
(a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountRemovedCallback a -> VolumeMonitorMountAddedCallback
wrapped
wrapped'' <- C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountRemovedCallback C_VolumeMonitorMountAddedCallback
wrapped'
connectSignalFunPtr obj "mount-removed" wrapped'' SignalConnectBefore Nothing
afterVolumeMonitorMountRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountRemovedCallback) -> m SignalHandlerId
afterVolumeMonitorMountRemoved :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorMountAddedCallback)
-> m SignalHandlerId
afterVolumeMonitorMountRemoved a
obj (?self::a) => VolumeMonitorMountAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorMountAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorMountAddedCallback
VolumeMonitorMountAddedCallback
cb
let wrapped' :: C_VolumeMonitorMountAddedCallback
wrapped' = (a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
forall a.
GObject a =>
(a -> VolumeMonitorMountAddedCallback)
-> C_VolumeMonitorMountAddedCallback
wrap_VolumeMonitorMountRemovedCallback a -> VolumeMonitorMountAddedCallback
wrapped
wrapped'' <- C_VolumeMonitorMountAddedCallback
-> IO (FunPtr C_VolumeMonitorMountAddedCallback)
mk_VolumeMonitorMountRemovedCallback C_VolumeMonitorMountAddedCallback
wrapped'
connectSignalFunPtr obj "mount-removed" wrapped'' SignalConnectAfter 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
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.VolumeMonitor::mount-removed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-VolumeMonitor.html#g:signal:mountRemoved"})
#endif
type VolumeMonitorVolumeAddedCallback =
Gio.Volume.Volume
-> IO ()
type C_VolumeMonitorVolumeAddedCallback =
Ptr VolumeMonitor ->
Ptr Gio.Volume.Volume ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorVolumeAddedCallback :: C_VolumeMonitorVolumeAddedCallback -> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
wrap_VolumeMonitorVolumeAddedCallback ::
GObject a => (a -> VolumeMonitorVolumeAddedCallback) ->
C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeAddedCallback :: forall a.
GObject a =>
(a -> VolumeMonitorVolumeAddedCallback)
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeAddedCallback a -> VolumeMonitorVolumeAddedCallback
gi'cb Ptr VolumeMonitor
gi'selfPtr Ptr Volume
volume Ptr ()
_ = do
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
B.ManagedPtr.withNewObject gi'selfPtr $ \VolumeMonitor
gi'self -> a -> VolumeMonitorVolumeAddedCallback
gi'cb (VolumeMonitor -> a
forall a b. Coercible a b => a -> b
Coerce.coerce VolumeMonitor
gi'self) Volume
volume'
onVolumeMonitorVolumeAdded :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorVolumeAddedCallback) -> m SignalHandlerId
onVolumeMonitorVolumeAdded :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorVolumeAddedCallback)
-> m SignalHandlerId
onVolumeMonitorVolumeAdded a
obj (?self::a) => VolumeMonitorVolumeAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorVolumeAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorVolumeAddedCallback
VolumeMonitorVolumeAddedCallback
cb
let wrapped' :: C_VolumeMonitorVolumeAddedCallback
wrapped' = (a -> VolumeMonitorVolumeAddedCallback)
-> C_VolumeMonitorVolumeAddedCallback
forall a.
GObject a =>
(a -> VolumeMonitorVolumeAddedCallback)
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeAddedCallback a -> VolumeMonitorVolumeAddedCallback
wrapped
wrapped'' <- C_VolumeMonitorVolumeAddedCallback
-> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
mk_VolumeMonitorVolumeAddedCallback C_VolumeMonitorVolumeAddedCallback
wrapped'
connectSignalFunPtr obj "volume-added" wrapped'' SignalConnectBefore Nothing
afterVolumeMonitorVolumeAdded :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorVolumeAddedCallback) -> m SignalHandlerId
afterVolumeMonitorVolumeAdded :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorVolumeAddedCallback)
-> m SignalHandlerId
afterVolumeMonitorVolumeAdded a
obj (?self::a) => VolumeMonitorVolumeAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorVolumeAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorVolumeAddedCallback
VolumeMonitorVolumeAddedCallback
cb
let wrapped' :: C_VolumeMonitorVolumeAddedCallback
wrapped' = (a -> VolumeMonitorVolumeAddedCallback)
-> C_VolumeMonitorVolumeAddedCallback
forall a.
GObject a =>
(a -> VolumeMonitorVolumeAddedCallback)
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeAddedCallback a -> VolumeMonitorVolumeAddedCallback
wrapped
wrapped'' <- C_VolumeMonitorVolumeAddedCallback
-> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
mk_VolumeMonitorVolumeAddedCallback C_VolumeMonitorVolumeAddedCallback
wrapped'
connectSignalFunPtr obj "volume-added" wrapped'' SignalConnectAfter 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
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.VolumeMonitor::volume-added"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-VolumeMonitor.html#g:signal:volumeAdded"})
#endif
type VolumeMonitorVolumeChangedCallback =
Gio.Volume.Volume
-> IO ()
type C_VolumeMonitorVolumeChangedCallback =
Ptr VolumeMonitor ->
Ptr Gio.Volume.Volume ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorVolumeChangedCallback :: C_VolumeMonitorVolumeChangedCallback -> IO (FunPtr C_VolumeMonitorVolumeChangedCallback)
wrap_VolumeMonitorVolumeChangedCallback ::
GObject a => (a -> VolumeMonitorVolumeChangedCallback) ->
C_VolumeMonitorVolumeChangedCallback
wrap_VolumeMonitorVolumeChangedCallback :: forall a.
GObject a =>
(a -> VolumeMonitorVolumeAddedCallback)
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeChangedCallback a -> VolumeMonitorVolumeAddedCallback
gi'cb Ptr VolumeMonitor
gi'selfPtr Ptr Volume
volume Ptr ()
_ = do
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
B.ManagedPtr.withNewObject gi'selfPtr $ \VolumeMonitor
gi'self -> a -> VolumeMonitorVolumeAddedCallback
gi'cb (VolumeMonitor -> a
forall a b. Coercible a b => a -> b
Coerce.coerce VolumeMonitor
gi'self) Volume
volume'
onVolumeMonitorVolumeChanged :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorVolumeChangedCallback) -> m SignalHandlerId
onVolumeMonitorVolumeChanged :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorVolumeAddedCallback)
-> m SignalHandlerId
onVolumeMonitorVolumeChanged a
obj (?self::a) => VolumeMonitorVolumeAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorVolumeAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorVolumeAddedCallback
VolumeMonitorVolumeAddedCallback
cb
let wrapped' :: C_VolumeMonitorVolumeAddedCallback
wrapped' = (a -> VolumeMonitorVolumeAddedCallback)
-> C_VolumeMonitorVolumeAddedCallback
forall a.
GObject a =>
(a -> VolumeMonitorVolumeAddedCallback)
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeChangedCallback a -> VolumeMonitorVolumeAddedCallback
wrapped
wrapped'' <- C_VolumeMonitorVolumeAddedCallback
-> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
mk_VolumeMonitorVolumeChangedCallback C_VolumeMonitorVolumeAddedCallback
wrapped'
connectSignalFunPtr obj "volume-changed" wrapped'' SignalConnectBefore Nothing
afterVolumeMonitorVolumeChanged :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorVolumeChangedCallback) -> m SignalHandlerId
afterVolumeMonitorVolumeChanged :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorVolumeAddedCallback)
-> m SignalHandlerId
afterVolumeMonitorVolumeChanged a
obj (?self::a) => VolumeMonitorVolumeAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorVolumeAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorVolumeAddedCallback
VolumeMonitorVolumeAddedCallback
cb
let wrapped' :: C_VolumeMonitorVolumeAddedCallback
wrapped' = (a -> VolumeMonitorVolumeAddedCallback)
-> C_VolumeMonitorVolumeAddedCallback
forall a.
GObject a =>
(a -> VolumeMonitorVolumeAddedCallback)
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeChangedCallback a -> VolumeMonitorVolumeAddedCallback
wrapped
wrapped'' <- C_VolumeMonitorVolumeAddedCallback
-> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
mk_VolumeMonitorVolumeChangedCallback C_VolumeMonitorVolumeAddedCallback
wrapped'
connectSignalFunPtr obj "volume-changed" wrapped'' SignalConnectAfter 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
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.VolumeMonitor::volume-changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-VolumeMonitor.html#g:signal:volumeChanged"})
#endif
type VolumeMonitorVolumeRemovedCallback =
Gio.Volume.Volume
-> IO ()
type C_VolumeMonitorVolumeRemovedCallback =
Ptr VolumeMonitor ->
Ptr Gio.Volume.Volume ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_VolumeMonitorVolumeRemovedCallback :: C_VolumeMonitorVolumeRemovedCallback -> IO (FunPtr C_VolumeMonitorVolumeRemovedCallback)
wrap_VolumeMonitorVolumeRemovedCallback ::
GObject a => (a -> VolumeMonitorVolumeRemovedCallback) ->
C_VolumeMonitorVolumeRemovedCallback
wrap_VolumeMonitorVolumeRemovedCallback :: forall a.
GObject a =>
(a -> VolumeMonitorVolumeAddedCallback)
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeRemovedCallback a -> VolumeMonitorVolumeAddedCallback
gi'cb Ptr VolumeMonitor
gi'selfPtr Ptr Volume
volume Ptr ()
_ = do
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
B.ManagedPtr.withNewObject gi'selfPtr $ \VolumeMonitor
gi'self -> a -> VolumeMonitorVolumeAddedCallback
gi'cb (VolumeMonitor -> a
forall a b. Coercible a b => a -> b
Coerce.coerce VolumeMonitor
gi'self) Volume
volume'
onVolumeMonitorVolumeRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorVolumeRemovedCallback) -> m SignalHandlerId
onVolumeMonitorVolumeRemoved :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorVolumeAddedCallback)
-> m SignalHandlerId
onVolumeMonitorVolumeRemoved a
obj (?self::a) => VolumeMonitorVolumeAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorVolumeAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorVolumeAddedCallback
VolumeMonitorVolumeAddedCallback
cb
let wrapped' :: C_VolumeMonitorVolumeAddedCallback
wrapped' = (a -> VolumeMonitorVolumeAddedCallback)
-> C_VolumeMonitorVolumeAddedCallback
forall a.
GObject a =>
(a -> VolumeMonitorVolumeAddedCallback)
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeRemovedCallback a -> VolumeMonitorVolumeAddedCallback
wrapped
wrapped'' <- C_VolumeMonitorVolumeAddedCallback
-> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
mk_VolumeMonitorVolumeRemovedCallback C_VolumeMonitorVolumeAddedCallback
wrapped'
connectSignalFunPtr obj "volume-removed" wrapped'' SignalConnectBefore Nothing
afterVolumeMonitorVolumeRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorVolumeRemovedCallback) -> m SignalHandlerId
afterVolumeMonitorVolumeRemoved :: forall a (m :: * -> *).
(IsVolumeMonitor a, MonadIO m) =>
a
-> ((?self::a) => VolumeMonitorVolumeAddedCallback)
-> m SignalHandlerId
afterVolumeMonitorVolumeRemoved a
obj (?self::a) => VolumeMonitorVolumeAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> VolumeMonitorVolumeAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => VolumeMonitorVolumeAddedCallback
VolumeMonitorVolumeAddedCallback
cb
let wrapped' :: C_VolumeMonitorVolumeAddedCallback
wrapped' = (a -> VolumeMonitorVolumeAddedCallback)
-> C_VolumeMonitorVolumeAddedCallback
forall a.
GObject a =>
(a -> VolumeMonitorVolumeAddedCallback)
-> C_VolumeMonitorVolumeAddedCallback
wrap_VolumeMonitorVolumeRemovedCallback a -> VolumeMonitorVolumeAddedCallback
wrapped
wrapped'' <- C_VolumeMonitorVolumeAddedCallback
-> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
mk_VolumeMonitorVolumeRemovedCallback C_VolumeMonitorVolumeAddedCallback
wrapped'
connectSignalFunPtr obj "volume-removed" wrapped'' SignalConnectAfter 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
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.VolumeMonitor::volume-removed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-VolumeMonitor.html#g:signal:volumeRemoved"})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList VolumeMonitor
type instance O.AttributeList VolumeMonitor = VolumeMonitorAttributeList
type VolumeMonitorAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#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, DK.Type)])
#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVolumeMonitor a) =>
a -> m [Drive]
volumeMonitorGetConnectedDrives a
volumeMonitor = IO [Drive] -> m [Drive]
forall a. IO a -> m a
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
volumeMonitor' <- a -> IO (Ptr VolumeMonitor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
volumeMonitor
result <- g_volume_monitor_get_connected_drives volumeMonitor'
result' <- unpackGList result
result'' <- mapM (wrapObject Gio.Drive.Drive) result'
g_list_free result
touchManagedPtr volumeMonitor
return result''
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorGetConnectedDrivesMethodInfo
instance (signature ~ (m [Gio.Drive.Drive]), MonadIO m, IsVolumeMonitor a) => O.OverloadedMethod VolumeMonitorGetConnectedDrivesMethodInfo a signature where
overloadedMethod = volumeMonitorGetConnectedDrives
instance O.OverloadedMethodInfo VolumeMonitorGetConnectedDrivesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.VolumeMonitor.volumeMonitorGetConnectedDrives",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-VolumeMonitor.html#v: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 (Maybe Gio.Mount.Mount)
volumeMonitorGetMountForUuid :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVolumeMonitor a) =>
a -> Text -> m (Maybe Mount)
volumeMonitorGetMountForUuid a
volumeMonitor Text
uuid = IO (Maybe Mount) -> m (Maybe Mount)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Mount) -> m (Maybe Mount))
-> IO (Maybe Mount) -> m (Maybe Mount)
forall a b. (a -> b) -> a -> b
$ do
volumeMonitor' <- a -> IO (Ptr VolumeMonitor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
volumeMonitor
uuid' <- textToCString uuid
result <- g_volume_monitor_get_mount_for_uuid volumeMonitor' uuid'
maybeResult <- convertIfNonNull result $ \Ptr Mount
result' -> do
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'
return result''
touchManagedPtr volumeMonitor
freeMem uuid'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorGetMountForUuidMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gio.Mount.Mount)), MonadIO m, IsVolumeMonitor a) => O.OverloadedMethod VolumeMonitorGetMountForUuidMethodInfo a signature where
overloadedMethod = volumeMonitorGetMountForUuid
instance O.OverloadedMethodInfo VolumeMonitorGetMountForUuidMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.VolumeMonitor.volumeMonitorGetMountForUuid",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-VolumeMonitor.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVolumeMonitor a) =>
a -> m [Mount]
volumeMonitorGetMounts a
volumeMonitor = IO [Mount] -> m [Mount]
forall a. IO a -> m a
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
volumeMonitor' <- a -> IO (Ptr VolumeMonitor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
volumeMonitor
result <- g_volume_monitor_get_mounts volumeMonitor'
result' <- unpackGList result
result'' <- mapM (wrapObject Gio.Mount.Mount) result'
g_list_free result
touchManagedPtr volumeMonitor
return result''
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorGetMountsMethodInfo
instance (signature ~ (m [Gio.Mount.Mount]), MonadIO m, IsVolumeMonitor a) => O.OverloadedMethod VolumeMonitorGetMountsMethodInfo a signature where
overloadedMethod = volumeMonitorGetMounts
instance O.OverloadedMethodInfo VolumeMonitorGetMountsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.VolumeMonitor.volumeMonitorGetMounts",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-VolumeMonitor.html#v: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 (Maybe Gio.Volume.Volume)
volumeMonitorGetVolumeForUuid :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVolumeMonitor a) =>
a -> Text -> m (Maybe Volume)
volumeMonitorGetVolumeForUuid a
volumeMonitor Text
uuid = IO (Maybe Volume) -> m (Maybe Volume)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Volume) -> m (Maybe Volume))
-> IO (Maybe Volume) -> m (Maybe Volume)
forall a b. (a -> b) -> a -> b
$ do
volumeMonitor' <- a -> IO (Ptr VolumeMonitor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
volumeMonitor
uuid' <- textToCString uuid
result <- g_volume_monitor_get_volume_for_uuid volumeMonitor' uuid'
maybeResult <- convertIfNonNull result $ \Ptr Volume
result' -> do
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'
return result''
touchManagedPtr volumeMonitor
freeMem uuid'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorGetVolumeForUuidMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gio.Volume.Volume)), MonadIO m, IsVolumeMonitor a) => O.OverloadedMethod VolumeMonitorGetVolumeForUuidMethodInfo a signature where
overloadedMethod = volumeMonitorGetVolumeForUuid
instance O.OverloadedMethodInfo VolumeMonitorGetVolumeForUuidMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.VolumeMonitor.volumeMonitorGetVolumeForUuid",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-VolumeMonitor.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVolumeMonitor a) =>
a -> m [Volume]
volumeMonitorGetVolumes a
volumeMonitor = IO [Volume] -> m [Volume]
forall a. IO a -> m a
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
volumeMonitor' <- a -> IO (Ptr VolumeMonitor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
volumeMonitor
result <- g_volume_monitor_get_volumes volumeMonitor'
result' <- unpackGList result
result'' <- mapM (wrapObject Gio.Volume.Volume) result'
g_list_free result
touchManagedPtr volumeMonitor
return result''
#if defined(ENABLE_OVERLOADING)
data VolumeMonitorGetVolumesMethodInfo
instance (signature ~ (m [Gio.Volume.Volume]), MonadIO m, IsVolumeMonitor a) => O.OverloadedMethod VolumeMonitorGetVolumesMethodInfo a signature where
overloadedMethod = volumeMonitorGetVolumes
instance O.OverloadedMethodInfo VolumeMonitorGetVolumesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.VolumeMonitor.volumeMonitorGetVolumes",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-VolumeMonitor.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsMount a) =>
a -> m Volume
volumeMonitorAdoptOrphanMount a
mount = IO Volume -> m Volume
forall a. IO a -> m a
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
mount' <- a -> IO (Ptr Mount)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
mount
result <- g_volume_monitor_adopt_orphan_mount mount'
checkUnexpectedReturnNULL "volumeMonitorAdoptOrphanMount" result
result' <- (wrapObject Gio.Volume.Volume) result
touchManagedPtr mount
return 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 :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m VolumeMonitor
volumeMonitorGet = IO VolumeMonitor -> m VolumeMonitor
forall a. IO a -> m a
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
result <- IO (Ptr VolumeMonitor)
g_volume_monitor_get
checkUnexpectedReturnNULL "volumeMonitorGet" result
result' <- (wrapObject VolumeMonitor) result
return result'
#if defined(ENABLE_OVERLOADING)
#endif