{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Interfaces.DBusObjectManager
(
DBusObjectManager(..) ,
IsDBusObjectManager ,
toDBusObjectManager ,
#if defined(ENABLE_OVERLOADING)
ResolveDBusObjectManagerMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DBusObjectManagerGetInterfaceMethodInfo ,
#endif
dBusObjectManagerGetInterface ,
#if defined(ENABLE_OVERLOADING)
DBusObjectManagerGetObjectMethodInfo ,
#endif
dBusObjectManagerGetObject ,
#if defined(ENABLE_OVERLOADING)
DBusObjectManagerGetObjectPathMethodInfo,
#endif
dBusObjectManagerGetObjectPath ,
#if defined(ENABLE_OVERLOADING)
DBusObjectManagerGetObjectsMethodInfo ,
#endif
dBusObjectManagerGetObjects ,
DBusObjectManagerInterfaceAddedCallback ,
#if defined(ENABLE_OVERLOADING)
DBusObjectManagerInterfaceAddedSignalInfo,
#endif
afterDBusObjectManagerInterfaceAdded ,
onDBusObjectManagerInterfaceAdded ,
DBusObjectManagerInterfaceRemovedCallback,
#if defined(ENABLE_OVERLOADING)
DBusObjectManagerInterfaceRemovedSignalInfo,
#endif
afterDBusObjectManagerInterfaceRemoved ,
onDBusObjectManagerInterfaceRemoved ,
DBusObjectManagerObjectAddedCallback ,
#if defined(ENABLE_OVERLOADING)
DBusObjectManagerObjectAddedSignalInfo ,
#endif
afterDBusObjectManagerObjectAdded ,
onDBusObjectManagerObjectAdded ,
DBusObjectManagerObjectRemovedCallback ,
#if defined(ENABLE_OVERLOADING)
DBusObjectManagerObjectRemovedSignalInfo,
#endif
afterDBusObjectManagerObjectRemoved ,
onDBusObjectManagerObjectRemoved ,
) 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.Structs.String as GLib.String
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Interfaces.DBusInterface as Gio.DBusInterface
import {-# SOURCE #-} qualified GI.Gio.Interfaces.DBusObject as Gio.DBusObject
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusAnnotationInfo as Gio.DBusAnnotationInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusArgInfo as Gio.DBusArgInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusInterfaceInfo as Gio.DBusInterfaceInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusMethodInfo as Gio.DBusMethodInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusPropertyInfo as Gio.DBusPropertyInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusSignalInfo as Gio.DBusSignalInfo
#else
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Interfaces.DBusInterface as Gio.DBusInterface
import {-# SOURCE #-} qualified GI.Gio.Interfaces.DBusObject as Gio.DBusObject
#endif
newtype DBusObjectManager = DBusObjectManager (SP.ManagedPtr DBusObjectManager)
deriving (DBusObjectManager -> DBusObjectManager -> Bool
(DBusObjectManager -> DBusObjectManager -> Bool)
-> (DBusObjectManager -> DBusObjectManager -> Bool)
-> Eq DBusObjectManager
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DBusObjectManager -> DBusObjectManager -> Bool
== :: DBusObjectManager -> DBusObjectManager -> Bool
$c/= :: DBusObjectManager -> DBusObjectManager -> Bool
/= :: DBusObjectManager -> DBusObjectManager -> Bool
Eq)
instance SP.ManagedPtrNewtype DBusObjectManager where
toManagedPtr :: DBusObjectManager -> ManagedPtr DBusObjectManager
toManagedPtr (DBusObjectManager ManagedPtr DBusObjectManager
p) = ManagedPtr DBusObjectManager
p
foreign import ccall "g_dbus_object_manager_get_type"
c_g_dbus_object_manager_get_type :: IO B.Types.GType
instance B.Types.TypedObject DBusObjectManager where
glibType :: IO GType
glibType = IO GType
c_g_dbus_object_manager_get_type
instance B.Types.GObject DBusObjectManager
class (SP.GObject o, O.IsDescendantOf DBusObjectManager o) => IsDBusObjectManager o
instance (SP.GObject o, O.IsDescendantOf DBusObjectManager o) => IsDBusObjectManager o
instance O.HasParentTypes DBusObjectManager
type instance O.ParentTypes DBusObjectManager = '[GObject.Object.Object]
toDBusObjectManager :: (MIO.MonadIO m, IsDBusObjectManager o) => o -> m DBusObjectManager
toDBusObjectManager :: forall (m :: * -> *) o.
(MonadIO m, IsDBusObjectManager o) =>
o -> m DBusObjectManager
toDBusObjectManager = IO DBusObjectManager -> m DBusObjectManager
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DBusObjectManager -> m DBusObjectManager)
-> (o -> IO DBusObjectManager) -> o -> m DBusObjectManager
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DBusObjectManager -> DBusObjectManager)
-> o -> IO DBusObjectManager
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr DBusObjectManager -> DBusObjectManager
DBusObjectManager
instance B.GValue.IsGValue (Maybe DBusObjectManager) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_dbus_object_manager_get_type
gvalueSet_ :: Ptr GValue -> Maybe DBusObjectManager -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DBusObjectManager
P.Nothing = Ptr GValue -> Ptr DBusObjectManager -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr DBusObjectManager
forall a. Ptr a
FP.nullPtr :: FP.Ptr DBusObjectManager)
gvalueSet_ Ptr GValue
gv (P.Just DBusObjectManager
obj) = DBusObjectManager -> (Ptr DBusObjectManager -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DBusObjectManager
obj (Ptr GValue -> Ptr DBusObjectManager -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DBusObjectManager)
gvalueGet_ Ptr GValue
gv = do
Ptr DBusObjectManager
ptr <- Ptr GValue -> IO (Ptr DBusObjectManager)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr DBusObjectManager)
if Ptr DBusObjectManager
ptr Ptr DBusObjectManager -> Ptr DBusObjectManager -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr DBusObjectManager
forall a. Ptr a
FP.nullPtr
then DBusObjectManager -> Maybe DBusObjectManager
forall a. a -> Maybe a
P.Just (DBusObjectManager -> Maybe DBusObjectManager)
-> IO DBusObjectManager -> IO (Maybe DBusObjectManager)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr DBusObjectManager -> DBusObjectManager)
-> Ptr DBusObjectManager -> IO DBusObjectManager
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr DBusObjectManager -> DBusObjectManager
DBusObjectManager Ptr DBusObjectManager
ptr
else Maybe DBusObjectManager -> IO (Maybe DBusObjectManager)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe DBusObjectManager
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DBusObjectManager
type instance O.AttributeList DBusObjectManager = DBusObjectManagerAttributeList
type DBusObjectManagerAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveDBusObjectManagerMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDBusObjectManagerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDBusObjectManagerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDBusObjectManagerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDBusObjectManagerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDBusObjectManagerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDBusObjectManagerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDBusObjectManagerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDBusObjectManagerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDBusObjectManagerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDBusObjectManagerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDBusObjectManagerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDBusObjectManagerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDBusObjectManagerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDBusObjectManagerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDBusObjectManagerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDBusObjectManagerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDBusObjectManagerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDBusObjectManagerMethod "getInterface" o = DBusObjectManagerGetInterfaceMethodInfo
ResolveDBusObjectManagerMethod "getObject" o = DBusObjectManagerGetObjectMethodInfo
ResolveDBusObjectManagerMethod "getObjectPath" o = DBusObjectManagerGetObjectPathMethodInfo
ResolveDBusObjectManagerMethod "getObjects" o = DBusObjectManagerGetObjectsMethodInfo
ResolveDBusObjectManagerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDBusObjectManagerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDBusObjectManagerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDBusObjectManagerMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDBusObjectManagerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDBusObjectManagerMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDBusObjectManagerMethod t DBusObjectManager, O.OverloadedMethod info DBusObjectManager p) => OL.IsLabel t (DBusObjectManager -> 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 ~ ResolveDBusObjectManagerMethod t DBusObjectManager, O.OverloadedMethod info DBusObjectManager p, R.HasField t DBusObjectManager p) => R.HasField t DBusObjectManager p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDBusObjectManagerMethod t DBusObjectManager, O.OverloadedMethodInfo info DBusObjectManager) => OL.IsLabel t (O.MethodProxy info DBusObjectManager) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
foreign import ccall "g_dbus_object_manager_get_interface" g_dbus_object_manager_get_interface ::
Ptr DBusObjectManager ->
CString ->
CString ->
IO (Ptr Gio.DBusInterface.DBusInterface)
dBusObjectManagerGetInterface ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectManager a) =>
a
-> T.Text
-> T.Text
-> m (Maybe Gio.DBusInterface.DBusInterface)
dBusObjectManagerGetInterface :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusObjectManager a) =>
a -> Text -> Text -> m (Maybe DBusInterface)
dBusObjectManagerGetInterface a
manager Text
objectPath Text
interfaceName = IO (Maybe DBusInterface) -> m (Maybe DBusInterface)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe DBusInterface) -> m (Maybe DBusInterface))
-> IO (Maybe DBusInterface) -> m (Maybe DBusInterface)
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusObjectManager
manager' <- a -> IO (Ptr DBusObjectManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
objectPath' <- Text -> IO CString
textToCString Text
objectPath
CString
interfaceName' <- Text -> IO CString
textToCString Text
interfaceName
Ptr DBusInterface
result <- Ptr DBusObjectManager
-> CString -> CString -> IO (Ptr DBusInterface)
g_dbus_object_manager_get_interface Ptr DBusObjectManager
manager' CString
objectPath' CString
interfaceName'
Maybe DBusInterface
maybeResult <- Ptr DBusInterface
-> (Ptr DBusInterface -> IO DBusInterface)
-> IO (Maybe DBusInterface)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr DBusInterface
result ((Ptr DBusInterface -> IO DBusInterface)
-> IO (Maybe DBusInterface))
-> (Ptr DBusInterface -> IO DBusInterface)
-> IO (Maybe DBusInterface)
forall a b. (a -> b) -> a -> b
$ \Ptr DBusInterface
result' -> do
DBusInterface
result'' <- ((ManagedPtr DBusInterface -> DBusInterface)
-> Ptr DBusInterface -> IO DBusInterface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DBusInterface -> DBusInterface
Gio.DBusInterface.DBusInterface) Ptr DBusInterface
result'
DBusInterface -> IO DBusInterface
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DBusInterface
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
objectPath'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
interfaceName'
Maybe DBusInterface -> IO (Maybe DBusInterface)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe DBusInterface
maybeResult
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerGetInterfaceMethodInfo
instance (signature ~ (T.Text -> T.Text -> m (Maybe Gio.DBusInterface.DBusInterface)), MonadIO m, IsDBusObjectManager a) => O.OverloadedMethod DBusObjectManagerGetInterfaceMethodInfo a signature where
overloadedMethod = dBusObjectManagerGetInterface
instance O.OverloadedMethodInfo DBusObjectManagerGetInterfaceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.DBusObjectManager.dBusObjectManagerGetInterface",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.33/docs/GI-Gio-Interfaces-DBusObjectManager.html#v:dBusObjectManagerGetInterface"
})
#endif
foreign import ccall "g_dbus_object_manager_get_object" g_dbus_object_manager_get_object ::
Ptr DBusObjectManager ->
CString ->
IO (Ptr Gio.DBusObject.DBusObject)
dBusObjectManagerGetObject ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectManager a) =>
a
-> T.Text
-> m (Maybe Gio.DBusObject.DBusObject)
dBusObjectManagerGetObject :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusObjectManager a) =>
a -> Text -> m (Maybe DBusObject)
dBusObjectManagerGetObject a
manager Text
objectPath = IO (Maybe DBusObject) -> m (Maybe DBusObject)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe DBusObject) -> m (Maybe DBusObject))
-> IO (Maybe DBusObject) -> m (Maybe DBusObject)
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusObjectManager
manager' <- a -> IO (Ptr DBusObjectManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
objectPath' <- Text -> IO CString
textToCString Text
objectPath
Ptr DBusObject
result <- Ptr DBusObjectManager -> CString -> IO (Ptr DBusObject)
g_dbus_object_manager_get_object Ptr DBusObjectManager
manager' CString
objectPath'
Maybe DBusObject
maybeResult <- Ptr DBusObject
-> (Ptr DBusObject -> IO DBusObject) -> IO (Maybe DBusObject)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr DBusObject
result ((Ptr DBusObject -> IO DBusObject) -> IO (Maybe DBusObject))
-> (Ptr DBusObject -> IO DBusObject) -> IO (Maybe DBusObject)
forall a b. (a -> b) -> a -> b
$ \Ptr DBusObject
result' -> do
DBusObject
result'' <- ((ManagedPtr DBusObject -> DBusObject)
-> Ptr DBusObject -> IO DBusObject
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DBusObject -> DBusObject
Gio.DBusObject.DBusObject) Ptr DBusObject
result'
DBusObject -> IO DBusObject
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DBusObject
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
objectPath'
Maybe DBusObject -> IO (Maybe DBusObject)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe DBusObject
maybeResult
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerGetObjectMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gio.DBusObject.DBusObject)), MonadIO m, IsDBusObjectManager a) => O.OverloadedMethod DBusObjectManagerGetObjectMethodInfo a signature where
overloadedMethod = dBusObjectManagerGetObject
instance O.OverloadedMethodInfo DBusObjectManagerGetObjectMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.DBusObjectManager.dBusObjectManagerGetObject",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.33/docs/GI-Gio-Interfaces-DBusObjectManager.html#v:dBusObjectManagerGetObject"
})
#endif
foreign import ccall "g_dbus_object_manager_get_object_path" g_dbus_object_manager_get_object_path ::
Ptr DBusObjectManager ->
IO CString
dBusObjectManagerGetObjectPath ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectManager a) =>
a
-> m T.Text
dBusObjectManagerGetObjectPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusObjectManager a) =>
a -> m Text
dBusObjectManagerGetObjectPath a
manager = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusObjectManager
manager' <- a -> IO (Ptr DBusObjectManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
result <- Ptr DBusObjectManager -> IO CString
g_dbus_object_manager_get_object_path Ptr DBusObjectManager
manager'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"dBusObjectManagerGetObjectPath" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerGetObjectPathMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDBusObjectManager a) => O.OverloadedMethod DBusObjectManagerGetObjectPathMethodInfo a signature where
overloadedMethod = dBusObjectManagerGetObjectPath
instance O.OverloadedMethodInfo DBusObjectManagerGetObjectPathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.DBusObjectManager.dBusObjectManagerGetObjectPath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.33/docs/GI-Gio-Interfaces-DBusObjectManager.html#v:dBusObjectManagerGetObjectPath"
})
#endif
foreign import ccall "g_dbus_object_manager_get_objects" g_dbus_object_manager_get_objects ::
Ptr DBusObjectManager ->
IO (Ptr (GList (Ptr Gio.DBusObject.DBusObject)))
dBusObjectManagerGetObjects ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectManager a) =>
a
-> m [Gio.DBusObject.DBusObject]
dBusObjectManagerGetObjects :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusObjectManager a) =>
a -> m [DBusObject]
dBusObjectManagerGetObjects a
manager = IO [DBusObject] -> m [DBusObject]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [DBusObject] -> m [DBusObject])
-> IO [DBusObject] -> m [DBusObject]
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusObjectManager
manager' <- a -> IO (Ptr DBusObjectManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr (GList (Ptr DBusObject))
result <- Ptr DBusObjectManager -> IO (Ptr (GList (Ptr DBusObject)))
g_dbus_object_manager_get_objects Ptr DBusObjectManager
manager'
[Ptr DBusObject]
result' <- Ptr (GList (Ptr DBusObject)) -> IO [Ptr DBusObject]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr DBusObject))
result
[DBusObject]
result'' <- (Ptr DBusObject -> IO DBusObject)
-> [Ptr DBusObject] -> IO [DBusObject]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr DBusObject -> DBusObject)
-> Ptr DBusObject -> IO DBusObject
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DBusObject -> DBusObject
Gio.DBusObject.DBusObject) [Ptr DBusObject]
result'
Ptr (GList (Ptr DBusObject)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr DBusObject))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
[DBusObject] -> IO [DBusObject]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [DBusObject]
result''
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerGetObjectsMethodInfo
instance (signature ~ (m [Gio.DBusObject.DBusObject]), MonadIO m, IsDBusObjectManager a) => O.OverloadedMethod DBusObjectManagerGetObjectsMethodInfo a signature where
overloadedMethod = dBusObjectManagerGetObjects
instance O.OverloadedMethodInfo DBusObjectManagerGetObjectsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.DBusObjectManager.dBusObjectManagerGetObjects",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.33/docs/GI-Gio-Interfaces-DBusObjectManager.html#v:dBusObjectManagerGetObjects"
})
#endif
type DBusObjectManagerInterfaceAddedCallback =
Gio.DBusObject.DBusObject
-> Gio.DBusInterface.DBusInterface
-> IO ()
type C_DBusObjectManagerInterfaceAddedCallback =
Ptr DBusObjectManager ->
Ptr Gio.DBusObject.DBusObject ->
Ptr Gio.DBusInterface.DBusInterface ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DBusObjectManagerInterfaceAddedCallback :: C_DBusObjectManagerInterfaceAddedCallback -> IO (FunPtr C_DBusObjectManagerInterfaceAddedCallback)
wrap_DBusObjectManagerInterfaceAddedCallback ::
GObject a => (a -> DBusObjectManagerInterfaceAddedCallback) ->
C_DBusObjectManagerInterfaceAddedCallback
wrap_DBusObjectManagerInterfaceAddedCallback :: forall a.
GObject a =>
(a -> DBusObjectManagerInterfaceAddedCallback)
-> C_DBusObjectManagerInterfaceAddedCallback
wrap_DBusObjectManagerInterfaceAddedCallback a -> DBusObjectManagerInterfaceAddedCallback
gi'cb Ptr DBusObjectManager
gi'selfPtr Ptr DBusObject
object Ptr DBusInterface
interface Ptr ()
_ = do
DBusObject
object' <- ((ManagedPtr DBusObject -> DBusObject)
-> Ptr DBusObject -> IO DBusObject
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusObject -> DBusObject
Gio.DBusObject.DBusObject) Ptr DBusObject
object
DBusInterface
interface' <- ((ManagedPtr DBusInterface -> DBusInterface)
-> Ptr DBusInterface -> IO DBusInterface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusInterface -> DBusInterface
Gio.DBusInterface.DBusInterface) Ptr DBusInterface
interface
Ptr DBusObjectManager -> (DBusObjectManager -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr DBusObjectManager
gi'selfPtr ((DBusObjectManager -> IO ()) -> IO ())
-> (DBusObjectManager -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \DBusObjectManager
gi'self -> a -> DBusObjectManagerInterfaceAddedCallback
gi'cb (DBusObjectManager -> a
forall a b. Coercible a b => a -> b
Coerce.coerce DBusObjectManager
gi'self) DBusObject
object' DBusInterface
interface'
onDBusObjectManagerInterfaceAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceAddedCallback) -> m SignalHandlerId
onDBusObjectManagerInterfaceAdded :: forall a (m :: * -> *).
(IsDBusObjectManager a, MonadIO m) =>
a
-> ((?self::a) => DBusObjectManagerInterfaceAddedCallback)
-> m SignalHandlerId
onDBusObjectManagerInterfaceAdded a
obj (?self::a) => DBusObjectManagerInterfaceAddedCallback
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 -> DBusObjectManagerInterfaceAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DBusObjectManagerInterfaceAddedCallback
DBusObjectManagerInterfaceAddedCallback
cb
let wrapped' :: C_DBusObjectManagerInterfaceAddedCallback
wrapped' = (a -> DBusObjectManagerInterfaceAddedCallback)
-> C_DBusObjectManagerInterfaceAddedCallback
forall a.
GObject a =>
(a -> DBusObjectManagerInterfaceAddedCallback)
-> C_DBusObjectManagerInterfaceAddedCallback
wrap_DBusObjectManagerInterfaceAddedCallback a -> DBusObjectManagerInterfaceAddedCallback
wrapped
FunPtr C_DBusObjectManagerInterfaceAddedCallback
wrapped'' <- C_DBusObjectManagerInterfaceAddedCallback
-> IO (FunPtr C_DBusObjectManagerInterfaceAddedCallback)
mk_DBusObjectManagerInterfaceAddedCallback C_DBusObjectManagerInterfaceAddedCallback
wrapped'
a
-> Text
-> FunPtr C_DBusObjectManagerInterfaceAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"interface-added" FunPtr C_DBusObjectManagerInterfaceAddedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterDBusObjectManagerInterfaceAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceAddedCallback) -> m SignalHandlerId
afterDBusObjectManagerInterfaceAdded :: forall a (m :: * -> *).
(IsDBusObjectManager a, MonadIO m) =>
a
-> ((?self::a) => DBusObjectManagerInterfaceAddedCallback)
-> m SignalHandlerId
afterDBusObjectManagerInterfaceAdded a
obj (?self::a) => DBusObjectManagerInterfaceAddedCallback
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 -> DBusObjectManagerInterfaceAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DBusObjectManagerInterfaceAddedCallback
DBusObjectManagerInterfaceAddedCallback
cb
let wrapped' :: C_DBusObjectManagerInterfaceAddedCallback
wrapped' = (a -> DBusObjectManagerInterfaceAddedCallback)
-> C_DBusObjectManagerInterfaceAddedCallback
forall a.
GObject a =>
(a -> DBusObjectManagerInterfaceAddedCallback)
-> C_DBusObjectManagerInterfaceAddedCallback
wrap_DBusObjectManagerInterfaceAddedCallback a -> DBusObjectManagerInterfaceAddedCallback
wrapped
FunPtr C_DBusObjectManagerInterfaceAddedCallback
wrapped'' <- C_DBusObjectManagerInterfaceAddedCallback
-> IO (FunPtr C_DBusObjectManagerInterfaceAddedCallback)
mk_DBusObjectManagerInterfaceAddedCallback C_DBusObjectManagerInterfaceAddedCallback
wrapped'
a
-> Text
-> FunPtr C_DBusObjectManagerInterfaceAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"interface-added" FunPtr C_DBusObjectManagerInterfaceAddedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerInterfaceAddedSignalInfo
instance SignalInfo DBusObjectManagerInterfaceAddedSignalInfo where
type HaskellCallbackType DBusObjectManagerInterfaceAddedSignalInfo = DBusObjectManagerInterfaceAddedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DBusObjectManagerInterfaceAddedCallback cb
cb'' <- mk_DBusObjectManagerInterfaceAddedCallback cb'
connectSignalFunPtr obj "interface-added" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.DBusObjectManager::interface-added"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.33/docs/GI-Gio-Interfaces-DBusObjectManager.html#g:signal:interfaceAdded"})
#endif
type DBusObjectManagerInterfaceRemovedCallback =
Gio.DBusObject.DBusObject
-> Gio.DBusInterface.DBusInterface
-> IO ()
type C_DBusObjectManagerInterfaceRemovedCallback =
Ptr DBusObjectManager ->
Ptr Gio.DBusObject.DBusObject ->
Ptr Gio.DBusInterface.DBusInterface ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DBusObjectManagerInterfaceRemovedCallback :: C_DBusObjectManagerInterfaceRemovedCallback -> IO (FunPtr C_DBusObjectManagerInterfaceRemovedCallback)
wrap_DBusObjectManagerInterfaceRemovedCallback ::
GObject a => (a -> DBusObjectManagerInterfaceRemovedCallback) ->
C_DBusObjectManagerInterfaceRemovedCallback
wrap_DBusObjectManagerInterfaceRemovedCallback :: forall a.
GObject a =>
(a -> DBusObjectManagerInterfaceAddedCallback)
-> C_DBusObjectManagerInterfaceAddedCallback
wrap_DBusObjectManagerInterfaceRemovedCallback a -> DBusObjectManagerInterfaceAddedCallback
gi'cb Ptr DBusObjectManager
gi'selfPtr Ptr DBusObject
object Ptr DBusInterface
interface Ptr ()
_ = do
DBusObject
object' <- ((ManagedPtr DBusObject -> DBusObject)
-> Ptr DBusObject -> IO DBusObject
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusObject -> DBusObject
Gio.DBusObject.DBusObject) Ptr DBusObject
object
DBusInterface
interface' <- ((ManagedPtr DBusInterface -> DBusInterface)
-> Ptr DBusInterface -> IO DBusInterface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusInterface -> DBusInterface
Gio.DBusInterface.DBusInterface) Ptr DBusInterface
interface
Ptr DBusObjectManager -> (DBusObjectManager -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr DBusObjectManager
gi'selfPtr ((DBusObjectManager -> IO ()) -> IO ())
-> (DBusObjectManager -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \DBusObjectManager
gi'self -> a -> DBusObjectManagerInterfaceAddedCallback
gi'cb (DBusObjectManager -> a
forall a b. Coercible a b => a -> b
Coerce.coerce DBusObjectManager
gi'self) DBusObject
object' DBusInterface
interface'
onDBusObjectManagerInterfaceRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceRemovedCallback) -> m SignalHandlerId
onDBusObjectManagerInterfaceRemoved :: forall a (m :: * -> *).
(IsDBusObjectManager a, MonadIO m) =>
a
-> ((?self::a) => DBusObjectManagerInterfaceAddedCallback)
-> m SignalHandlerId
onDBusObjectManagerInterfaceRemoved a
obj (?self::a) => DBusObjectManagerInterfaceAddedCallback
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 -> DBusObjectManagerInterfaceAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DBusObjectManagerInterfaceAddedCallback
DBusObjectManagerInterfaceAddedCallback
cb
let wrapped' :: C_DBusObjectManagerInterfaceAddedCallback
wrapped' = (a -> DBusObjectManagerInterfaceAddedCallback)
-> C_DBusObjectManagerInterfaceAddedCallback
forall a.
GObject a =>
(a -> DBusObjectManagerInterfaceAddedCallback)
-> C_DBusObjectManagerInterfaceAddedCallback
wrap_DBusObjectManagerInterfaceRemovedCallback a -> DBusObjectManagerInterfaceAddedCallback
wrapped
FunPtr C_DBusObjectManagerInterfaceAddedCallback
wrapped'' <- C_DBusObjectManagerInterfaceAddedCallback
-> IO (FunPtr C_DBusObjectManagerInterfaceAddedCallback)
mk_DBusObjectManagerInterfaceRemovedCallback C_DBusObjectManagerInterfaceAddedCallback
wrapped'
a
-> Text
-> FunPtr C_DBusObjectManagerInterfaceAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"interface-removed" FunPtr C_DBusObjectManagerInterfaceAddedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterDBusObjectManagerInterfaceRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceRemovedCallback) -> m SignalHandlerId
afterDBusObjectManagerInterfaceRemoved :: forall a (m :: * -> *).
(IsDBusObjectManager a, MonadIO m) =>
a
-> ((?self::a) => DBusObjectManagerInterfaceAddedCallback)
-> m SignalHandlerId
afterDBusObjectManagerInterfaceRemoved a
obj (?self::a) => DBusObjectManagerInterfaceAddedCallback
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 -> DBusObjectManagerInterfaceAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DBusObjectManagerInterfaceAddedCallback
DBusObjectManagerInterfaceAddedCallback
cb
let wrapped' :: C_DBusObjectManagerInterfaceAddedCallback
wrapped' = (a -> DBusObjectManagerInterfaceAddedCallback)
-> C_DBusObjectManagerInterfaceAddedCallback
forall a.
GObject a =>
(a -> DBusObjectManagerInterfaceAddedCallback)
-> C_DBusObjectManagerInterfaceAddedCallback
wrap_DBusObjectManagerInterfaceRemovedCallback a -> DBusObjectManagerInterfaceAddedCallback
wrapped
FunPtr C_DBusObjectManagerInterfaceAddedCallback
wrapped'' <- C_DBusObjectManagerInterfaceAddedCallback
-> IO (FunPtr C_DBusObjectManagerInterfaceAddedCallback)
mk_DBusObjectManagerInterfaceRemovedCallback C_DBusObjectManagerInterfaceAddedCallback
wrapped'
a
-> Text
-> FunPtr C_DBusObjectManagerInterfaceAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"interface-removed" FunPtr C_DBusObjectManagerInterfaceAddedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerInterfaceRemovedSignalInfo
instance SignalInfo DBusObjectManagerInterfaceRemovedSignalInfo where
type HaskellCallbackType DBusObjectManagerInterfaceRemovedSignalInfo = DBusObjectManagerInterfaceRemovedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DBusObjectManagerInterfaceRemovedCallback cb
cb'' <- mk_DBusObjectManagerInterfaceRemovedCallback cb'
connectSignalFunPtr obj "interface-removed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.DBusObjectManager::interface-removed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.33/docs/GI-Gio-Interfaces-DBusObjectManager.html#g:signal:interfaceRemoved"})
#endif
type DBusObjectManagerObjectAddedCallback =
Gio.DBusObject.DBusObject
-> IO ()
type C_DBusObjectManagerObjectAddedCallback =
Ptr DBusObjectManager ->
Ptr Gio.DBusObject.DBusObject ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DBusObjectManagerObjectAddedCallback :: C_DBusObjectManagerObjectAddedCallback -> IO (FunPtr C_DBusObjectManagerObjectAddedCallback)
wrap_DBusObjectManagerObjectAddedCallback ::
GObject a => (a -> DBusObjectManagerObjectAddedCallback) ->
C_DBusObjectManagerObjectAddedCallback
wrap_DBusObjectManagerObjectAddedCallback :: forall a.
GObject a =>
(a -> DBusObjectManagerObjectAddedCallback)
-> C_DBusObjectManagerObjectAddedCallback
wrap_DBusObjectManagerObjectAddedCallback a -> DBusObjectManagerObjectAddedCallback
gi'cb Ptr DBusObjectManager
gi'selfPtr Ptr DBusObject
object Ptr ()
_ = do
DBusObject
object' <- ((ManagedPtr DBusObject -> DBusObject)
-> Ptr DBusObject -> IO DBusObject
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusObject -> DBusObject
Gio.DBusObject.DBusObject) Ptr DBusObject
object
Ptr DBusObjectManager -> (DBusObjectManager -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr DBusObjectManager
gi'selfPtr ((DBusObjectManager -> IO ()) -> IO ())
-> (DBusObjectManager -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \DBusObjectManager
gi'self -> a -> DBusObjectManagerObjectAddedCallback
gi'cb (DBusObjectManager -> a
forall a b. Coercible a b => a -> b
Coerce.coerce DBusObjectManager
gi'self) DBusObject
object'
onDBusObjectManagerObjectAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectAddedCallback) -> m SignalHandlerId
onDBusObjectManagerObjectAdded :: forall a (m :: * -> *).
(IsDBusObjectManager a, MonadIO m) =>
a
-> ((?self::a) => DBusObjectManagerObjectAddedCallback)
-> m SignalHandlerId
onDBusObjectManagerObjectAdded a
obj (?self::a) => DBusObjectManagerObjectAddedCallback
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 -> DBusObjectManagerObjectAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DBusObjectManagerObjectAddedCallback
DBusObjectManagerObjectAddedCallback
cb
let wrapped' :: C_DBusObjectManagerObjectAddedCallback
wrapped' = (a -> DBusObjectManagerObjectAddedCallback)
-> C_DBusObjectManagerObjectAddedCallback
forall a.
GObject a =>
(a -> DBusObjectManagerObjectAddedCallback)
-> C_DBusObjectManagerObjectAddedCallback
wrap_DBusObjectManagerObjectAddedCallback a -> DBusObjectManagerObjectAddedCallback
wrapped
FunPtr C_DBusObjectManagerObjectAddedCallback
wrapped'' <- C_DBusObjectManagerObjectAddedCallback
-> IO (FunPtr C_DBusObjectManagerObjectAddedCallback)
mk_DBusObjectManagerObjectAddedCallback C_DBusObjectManagerObjectAddedCallback
wrapped'
a
-> Text
-> FunPtr C_DBusObjectManagerObjectAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"object-added" FunPtr C_DBusObjectManagerObjectAddedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterDBusObjectManagerObjectAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectAddedCallback) -> m SignalHandlerId
afterDBusObjectManagerObjectAdded :: forall a (m :: * -> *).
(IsDBusObjectManager a, MonadIO m) =>
a
-> ((?self::a) => DBusObjectManagerObjectAddedCallback)
-> m SignalHandlerId
afterDBusObjectManagerObjectAdded a
obj (?self::a) => DBusObjectManagerObjectAddedCallback
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 -> DBusObjectManagerObjectAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DBusObjectManagerObjectAddedCallback
DBusObjectManagerObjectAddedCallback
cb
let wrapped' :: C_DBusObjectManagerObjectAddedCallback
wrapped' = (a -> DBusObjectManagerObjectAddedCallback)
-> C_DBusObjectManagerObjectAddedCallback
forall a.
GObject a =>
(a -> DBusObjectManagerObjectAddedCallback)
-> C_DBusObjectManagerObjectAddedCallback
wrap_DBusObjectManagerObjectAddedCallback a -> DBusObjectManagerObjectAddedCallback
wrapped
FunPtr C_DBusObjectManagerObjectAddedCallback
wrapped'' <- C_DBusObjectManagerObjectAddedCallback
-> IO (FunPtr C_DBusObjectManagerObjectAddedCallback)
mk_DBusObjectManagerObjectAddedCallback C_DBusObjectManagerObjectAddedCallback
wrapped'
a
-> Text
-> FunPtr C_DBusObjectManagerObjectAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"object-added" FunPtr C_DBusObjectManagerObjectAddedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerObjectAddedSignalInfo
instance SignalInfo DBusObjectManagerObjectAddedSignalInfo where
type HaskellCallbackType DBusObjectManagerObjectAddedSignalInfo = DBusObjectManagerObjectAddedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DBusObjectManagerObjectAddedCallback cb
cb'' <- mk_DBusObjectManagerObjectAddedCallback cb'
connectSignalFunPtr obj "object-added" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.DBusObjectManager::object-added"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.33/docs/GI-Gio-Interfaces-DBusObjectManager.html#g:signal:objectAdded"})
#endif
type DBusObjectManagerObjectRemovedCallback =
Gio.DBusObject.DBusObject
-> IO ()
type C_DBusObjectManagerObjectRemovedCallback =
Ptr DBusObjectManager ->
Ptr Gio.DBusObject.DBusObject ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DBusObjectManagerObjectRemovedCallback :: C_DBusObjectManagerObjectRemovedCallback -> IO (FunPtr C_DBusObjectManagerObjectRemovedCallback)
wrap_DBusObjectManagerObjectRemovedCallback ::
GObject a => (a -> DBusObjectManagerObjectRemovedCallback) ->
C_DBusObjectManagerObjectRemovedCallback
wrap_DBusObjectManagerObjectRemovedCallback :: forall a.
GObject a =>
(a -> DBusObjectManagerObjectAddedCallback)
-> C_DBusObjectManagerObjectAddedCallback
wrap_DBusObjectManagerObjectRemovedCallback a -> DBusObjectManagerObjectAddedCallback
gi'cb Ptr DBusObjectManager
gi'selfPtr Ptr DBusObject
object Ptr ()
_ = do
DBusObject
object' <- ((ManagedPtr DBusObject -> DBusObject)
-> Ptr DBusObject -> IO DBusObject
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusObject -> DBusObject
Gio.DBusObject.DBusObject) Ptr DBusObject
object
Ptr DBusObjectManager -> (DBusObjectManager -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr DBusObjectManager
gi'selfPtr ((DBusObjectManager -> IO ()) -> IO ())
-> (DBusObjectManager -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \DBusObjectManager
gi'self -> a -> DBusObjectManagerObjectAddedCallback
gi'cb (DBusObjectManager -> a
forall a b. Coercible a b => a -> b
Coerce.coerce DBusObjectManager
gi'self) DBusObject
object'
onDBusObjectManagerObjectRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectRemovedCallback) -> m SignalHandlerId
onDBusObjectManagerObjectRemoved :: forall a (m :: * -> *).
(IsDBusObjectManager a, MonadIO m) =>
a
-> ((?self::a) => DBusObjectManagerObjectAddedCallback)
-> m SignalHandlerId
onDBusObjectManagerObjectRemoved a
obj (?self::a) => DBusObjectManagerObjectAddedCallback
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 -> DBusObjectManagerObjectAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DBusObjectManagerObjectAddedCallback
DBusObjectManagerObjectAddedCallback
cb
let wrapped' :: C_DBusObjectManagerObjectAddedCallback
wrapped' = (a -> DBusObjectManagerObjectAddedCallback)
-> C_DBusObjectManagerObjectAddedCallback
forall a.
GObject a =>
(a -> DBusObjectManagerObjectAddedCallback)
-> C_DBusObjectManagerObjectAddedCallback
wrap_DBusObjectManagerObjectRemovedCallback a -> DBusObjectManagerObjectAddedCallback
wrapped
FunPtr C_DBusObjectManagerObjectAddedCallback
wrapped'' <- C_DBusObjectManagerObjectAddedCallback
-> IO (FunPtr C_DBusObjectManagerObjectAddedCallback)
mk_DBusObjectManagerObjectRemovedCallback C_DBusObjectManagerObjectAddedCallback
wrapped'
a
-> Text
-> FunPtr C_DBusObjectManagerObjectAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"object-removed" FunPtr C_DBusObjectManagerObjectAddedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterDBusObjectManagerObjectRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectRemovedCallback) -> m SignalHandlerId
afterDBusObjectManagerObjectRemoved :: forall a (m :: * -> *).
(IsDBusObjectManager a, MonadIO m) =>
a
-> ((?self::a) => DBusObjectManagerObjectAddedCallback)
-> m SignalHandlerId
afterDBusObjectManagerObjectRemoved a
obj (?self::a) => DBusObjectManagerObjectAddedCallback
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 -> DBusObjectManagerObjectAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DBusObjectManagerObjectAddedCallback
DBusObjectManagerObjectAddedCallback
cb
let wrapped' :: C_DBusObjectManagerObjectAddedCallback
wrapped' = (a -> DBusObjectManagerObjectAddedCallback)
-> C_DBusObjectManagerObjectAddedCallback
forall a.
GObject a =>
(a -> DBusObjectManagerObjectAddedCallback)
-> C_DBusObjectManagerObjectAddedCallback
wrap_DBusObjectManagerObjectRemovedCallback a -> DBusObjectManagerObjectAddedCallback
wrapped
FunPtr C_DBusObjectManagerObjectAddedCallback
wrapped'' <- C_DBusObjectManagerObjectAddedCallback
-> IO (FunPtr C_DBusObjectManagerObjectAddedCallback)
mk_DBusObjectManagerObjectRemovedCallback C_DBusObjectManagerObjectAddedCallback
wrapped'
a
-> Text
-> FunPtr C_DBusObjectManagerObjectAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"object-removed" FunPtr C_DBusObjectManagerObjectAddedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerObjectRemovedSignalInfo
instance SignalInfo DBusObjectManagerObjectRemovedSignalInfo where
type HaskellCallbackType DBusObjectManagerObjectRemovedSignalInfo = DBusObjectManagerObjectRemovedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DBusObjectManagerObjectRemovedCallback cb
cb'' <- mk_DBusObjectManagerObjectRemovedCallback cb'
connectSignalFunPtr obj "object-removed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.DBusObjectManager::object-removed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.33/docs/GI-Gio-Interfaces-DBusObjectManager.html#g:signal:objectRemoved"})
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DBusObjectManager = DBusObjectManagerSignalList
type DBusObjectManagerSignalList = ('[ '("interfaceAdded", DBusObjectManagerInterfaceAddedSignalInfo), '("interfaceRemoved", DBusObjectManagerInterfaceRemovedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("objectAdded", DBusObjectManagerObjectAddedSignalInfo), '("objectRemoved", DBusObjectManagerObjectRemovedSignalInfo)] :: [(Symbol, DK.Type)])
#endif