{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Gio.Objects.NativeVolumeMonitor
    ( 

-- * Exported types
    NativeVolumeMonitor(..)                 ,
    IsNativeVolumeMonitor                   ,
    toNativeVolumeMonitor                   ,
    noNativeVolumeMonitor                   ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveNativeVolumeMonitorMethod        ,
#endif




    ) where

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

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL

import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Objects.VolumeMonitor as Gio.VolumeMonitor

-- | Memory-managed wrapper type.
newtype NativeVolumeMonitor = NativeVolumeMonitor (ManagedPtr NativeVolumeMonitor)
    deriving (NativeVolumeMonitor -> NativeVolumeMonitor -> Bool
(NativeVolumeMonitor -> NativeVolumeMonitor -> Bool)
-> (NativeVolumeMonitor -> NativeVolumeMonitor -> Bool)
-> Eq NativeVolumeMonitor
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NativeVolumeMonitor -> NativeVolumeMonitor -> Bool
$c/= :: NativeVolumeMonitor -> NativeVolumeMonitor -> Bool
== :: NativeVolumeMonitor -> NativeVolumeMonitor -> Bool
$c== :: NativeVolumeMonitor -> NativeVolumeMonitor -> Bool
Eq)
foreign import ccall "g_native_volume_monitor_get_type"
    c_g_native_volume_monitor_get_type :: IO GType

instance GObject NativeVolumeMonitor where
    gobjectType :: IO GType
gobjectType = IO GType
c_g_native_volume_monitor_get_type
    

-- | Convert 'NativeVolumeMonitor' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue NativeVolumeMonitor where
    toGValue :: NativeVolumeMonitor -> IO GValue
toGValue o :: NativeVolumeMonitor
o = do
        GType
gtype <- IO GType
c_g_native_volume_monitor_get_type
        NativeVolumeMonitor
-> (Ptr NativeVolumeMonitor -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr NativeVolumeMonitor
o (GType
-> (GValue -> Ptr NativeVolumeMonitor -> IO ())
-> Ptr NativeVolumeMonitor
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr NativeVolumeMonitor -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO NativeVolumeMonitor
fromGValue gv :: GValue
gv = do
        Ptr NativeVolumeMonitor
ptr <- GValue -> IO (Ptr NativeVolumeMonitor)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr NativeVolumeMonitor)
        (ManagedPtr NativeVolumeMonitor -> NativeVolumeMonitor)
-> Ptr NativeVolumeMonitor -> IO NativeVolumeMonitor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr NativeVolumeMonitor -> NativeVolumeMonitor
NativeVolumeMonitor Ptr NativeVolumeMonitor
ptr
        
    

-- | Type class for types which can be safely cast to `NativeVolumeMonitor`, for instance with `toNativeVolumeMonitor`.
class (GObject o, O.IsDescendantOf NativeVolumeMonitor o) => IsNativeVolumeMonitor o
instance (GObject o, O.IsDescendantOf NativeVolumeMonitor o) => IsNativeVolumeMonitor o

instance O.HasParentTypes NativeVolumeMonitor
type instance O.ParentTypes NativeVolumeMonitor = '[Gio.VolumeMonitor.VolumeMonitor, GObject.Object.Object]

-- | Cast to `NativeVolumeMonitor`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toNativeVolumeMonitor :: (MonadIO m, IsNativeVolumeMonitor o) => o -> m NativeVolumeMonitor
toNativeVolumeMonitor :: o -> m NativeVolumeMonitor
toNativeVolumeMonitor = IO NativeVolumeMonitor -> m NativeVolumeMonitor
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO NativeVolumeMonitor -> m NativeVolumeMonitor)
-> (o -> IO NativeVolumeMonitor) -> o -> m NativeVolumeMonitor
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr NativeVolumeMonitor -> NativeVolumeMonitor)
-> o -> IO NativeVolumeMonitor
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr NativeVolumeMonitor -> NativeVolumeMonitor
NativeVolumeMonitor

-- | A convenience alias for `Nothing` :: `Maybe` `NativeVolumeMonitor`.
noNativeVolumeMonitor :: Maybe NativeVolumeMonitor
noNativeVolumeMonitor :: Maybe NativeVolumeMonitor
noNativeVolumeMonitor = Maybe NativeVolumeMonitor
forall a. Maybe a
Nothing

#if defined(ENABLE_OVERLOADING)
type family ResolveNativeVolumeMonitorMethod (t :: Symbol) (o :: *) :: * where
    ResolveNativeVolumeMonitorMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveNativeVolumeMonitorMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveNativeVolumeMonitorMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveNativeVolumeMonitorMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveNativeVolumeMonitorMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveNativeVolumeMonitorMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveNativeVolumeMonitorMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveNativeVolumeMonitorMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveNativeVolumeMonitorMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveNativeVolumeMonitorMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveNativeVolumeMonitorMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveNativeVolumeMonitorMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveNativeVolumeMonitorMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveNativeVolumeMonitorMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveNativeVolumeMonitorMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveNativeVolumeMonitorMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveNativeVolumeMonitorMethod "getConnectedDrives" o = Gio.VolumeMonitor.VolumeMonitorGetConnectedDrivesMethodInfo
    ResolveNativeVolumeMonitorMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveNativeVolumeMonitorMethod "getMountForUuid" o = Gio.VolumeMonitor.VolumeMonitorGetMountForUuidMethodInfo
    ResolveNativeVolumeMonitorMethod "getMounts" o = Gio.VolumeMonitor.VolumeMonitorGetMountsMethodInfo
    ResolveNativeVolumeMonitorMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveNativeVolumeMonitorMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveNativeVolumeMonitorMethod "getVolumeForUuid" o = Gio.VolumeMonitor.VolumeMonitorGetVolumeForUuidMethodInfo
    ResolveNativeVolumeMonitorMethod "getVolumes" o = Gio.VolumeMonitor.VolumeMonitorGetVolumesMethodInfo
    ResolveNativeVolumeMonitorMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveNativeVolumeMonitorMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveNativeVolumeMonitorMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveNativeVolumeMonitorMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveNativeVolumeMonitorMethod t NativeVolumeMonitor, O.MethodInfo info NativeVolumeMonitor p) => OL.IsLabel t (NativeVolumeMonitor -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList NativeVolumeMonitor
type instance O.AttributeList NativeVolumeMonitor = NativeVolumeMonitorAttributeList
type NativeVolumeMonitorAttributeList = ('[ ] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList NativeVolumeMonitor = NativeVolumeMonitorSignalList
type NativeVolumeMonitorSignalList = ('[ '("driveChanged", Gio.VolumeMonitor.VolumeMonitorDriveChangedSignalInfo), '("driveConnected", Gio.VolumeMonitor.VolumeMonitorDriveConnectedSignalInfo), '("driveDisconnected", Gio.VolumeMonitor.VolumeMonitorDriveDisconnectedSignalInfo), '("driveEjectButton", Gio.VolumeMonitor.VolumeMonitorDriveEjectButtonSignalInfo), '("driveStopButton", Gio.VolumeMonitor.VolumeMonitorDriveStopButtonSignalInfo), '("mountAdded", Gio.VolumeMonitor.VolumeMonitorMountAddedSignalInfo), '("mountChanged", Gio.VolumeMonitor.VolumeMonitorMountChangedSignalInfo), '("mountPreUnmount", Gio.VolumeMonitor.VolumeMonitorMountPreUnmountSignalInfo), '("mountRemoved", Gio.VolumeMonitor.VolumeMonitorMountRemovedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("volumeAdded", Gio.VolumeMonitor.VolumeMonitorVolumeAddedSignalInfo), '("volumeChanged", Gio.VolumeMonitor.VolumeMonitorVolumeChangedSignalInfo), '("volumeRemoved", Gio.VolumeMonitor.VolumeMonitorVolumeRemovedSignalInfo)] :: [(Symbol, *)])

#endif