Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
The DBusObject
type is the base type for D-Bus objects on both
the service side (see DBusObjectSkeleton
) and the client side
(see DBusObjectProxy
). It is essentially just a container of
interfaces.
Synopsis
- newtype DBusObject = DBusObject (ManagedPtr DBusObject)
- noDBusObject :: Maybe DBusObject
- class GObject o => IsDBusObject o
- toDBusObject :: (MonadIO m, IsDBusObject o) => o -> m DBusObject
- dBusObjectGetInterface :: (HasCallStack, MonadIO m, IsDBusObject a) => a -> Text -> m DBusInterface
- dBusObjectGetInterfaces :: (HasCallStack, MonadIO m, IsDBusObject a) => a -> m [DBusInterface]
- dBusObjectGetObjectPath :: (HasCallStack, MonadIO m, IsDBusObject a) => a -> m Text
- type C_DBusObjectInterfaceAddedCallback = Ptr () -> Ptr DBusInterface -> Ptr () -> IO ()
- type DBusObjectInterfaceAddedCallback = DBusInterface -> IO ()
- afterDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceAddedCallback -> m SignalHandlerId
- genClosure_DBusObjectInterfaceAdded :: DBusObjectInterfaceAddedCallback -> IO Closure
- mk_DBusObjectInterfaceAddedCallback :: C_DBusObjectInterfaceAddedCallback -> IO (FunPtr C_DBusObjectInterfaceAddedCallback)
- noDBusObjectInterfaceAddedCallback :: Maybe DBusObjectInterfaceAddedCallback
- onDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceAddedCallback -> m SignalHandlerId
- wrap_DBusObjectInterfaceAddedCallback :: DBusObjectInterfaceAddedCallback -> C_DBusObjectInterfaceAddedCallback
- type C_DBusObjectInterfaceRemovedCallback = Ptr () -> Ptr DBusInterface -> Ptr () -> IO ()
- type DBusObjectInterfaceRemovedCallback = DBusInterface -> IO ()
- afterDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceRemovedCallback -> m SignalHandlerId
- genClosure_DBusObjectInterfaceRemoved :: DBusObjectInterfaceRemovedCallback -> IO Closure
- mk_DBusObjectInterfaceRemovedCallback :: C_DBusObjectInterfaceRemovedCallback -> IO (FunPtr C_DBusObjectInterfaceRemovedCallback)
- noDBusObjectInterfaceRemovedCallback :: Maybe DBusObjectInterfaceRemovedCallback
- onDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceRemovedCallback -> m SignalHandlerId
- wrap_DBusObjectInterfaceRemovedCallback :: DBusObjectInterfaceRemovedCallback -> C_DBusObjectInterfaceRemovedCallback
Exported types
newtype DBusObject Source #
Memory-managed wrapper type.
Instances
GObject DBusObject Source # | |
Defined in GI.Gio.Interfaces.DBusObject gobjectType :: DBusObject -> IO GType # | |
IsObject DBusObject Source # | |
Defined in GI.Gio.Interfaces.DBusObject | |
IsDBusObject DBusObject Source # | |
Defined in GI.Gio.Interfaces.DBusObject |
noDBusObject :: Maybe DBusObject Source #
A convenience alias for Nothing
:: Maybe
DBusObject
.
class GObject o => IsDBusObject o Source #
Type class for types which can be safely cast to DBusObject
, for instance with toDBusObject
.
Instances
(GObject a, (UnknownAncestorError DBusObject a :: Constraint)) => IsDBusObject a Source # | |
Defined in GI.Gio.Interfaces.DBusObject | |
IsDBusObject DBusObject Source # | |
Defined in GI.Gio.Interfaces.DBusObject | |
IsDBusObject DBusObjectProxy Source # | |
Defined in GI.Gio.Objects.DBusObjectProxy | |
IsDBusObject DBusObjectSkeleton Source # | |
Defined in GI.Gio.Objects.DBusObjectSkeleton |
toDBusObject :: (MonadIO m, IsDBusObject o) => o -> m DBusObject Source #
Cast to DBusObject
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
getInterface
dBusObjectGetInterface Source #
:: (HasCallStack, MonadIO m, IsDBusObject a) | |
=> a |
|
-> Text |
|
-> m DBusInterface | Returns: |
Gets the D-Bus interface with name interfaceName
associated with
object
, if any.
Since: 2.30
getInterfaces
dBusObjectGetInterfaces Source #
:: (HasCallStack, MonadIO m, IsDBusObject a) | |
=> a |
|
-> m [DBusInterface] | Returns: A list of |
Gets the D-Bus interfaces associated with object
.
Since: 2.30
getObjectPath
dBusObjectGetObjectPath Source #
:: (HasCallStack, MonadIO m, IsDBusObject a) | |
=> a |
|
-> m Text | Returns: A string owned by |
Gets the object path for object
.
Since: 2.30
Signals
interfaceAdded
type C_DBusObjectInterfaceAddedCallback = Ptr () -> Ptr DBusInterface -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type DBusObjectInterfaceAddedCallback Source #
= DBusInterface |
|
-> IO () |
Emitted when interface
is added to object
.
Since: 2.30
afterDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceAddedCallback -> m SignalHandlerId Source #
Connect a signal handler for the “interface-added
” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after
dBusObject #interfaceAdded callback
genClosure_DBusObjectInterfaceAdded :: DBusObjectInterfaceAddedCallback -> IO Closure Source #
Wrap the callback into a Closure
.
mk_DBusObjectInterfaceAddedCallback :: C_DBusObjectInterfaceAddedCallback -> IO (FunPtr C_DBusObjectInterfaceAddedCallback) Source #
Generate a function pointer callable from C code, from a C_DBusObjectInterfaceAddedCallback
.
noDBusObjectInterfaceAddedCallback :: Maybe DBusObjectInterfaceAddedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
DBusObjectInterfaceAddedCallback
onDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceAddedCallback -> m SignalHandlerId Source #
Connect a signal handler for the “interface-added
” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on
dBusObject #interfaceAdded callback
wrap_DBusObjectInterfaceAddedCallback :: DBusObjectInterfaceAddedCallback -> C_DBusObjectInterfaceAddedCallback Source #
interfaceRemoved
type C_DBusObjectInterfaceRemovedCallback = Ptr () -> Ptr DBusInterface -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type DBusObjectInterfaceRemovedCallback Source #
= DBusInterface |
|
-> IO () |
Emitted when interface
is removed from object
.
Since: 2.30
afterDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceRemovedCallback -> m SignalHandlerId Source #
Connect a signal handler for the “interface-removed
” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after
dBusObject #interfaceRemoved callback
genClosure_DBusObjectInterfaceRemoved :: DBusObjectInterfaceRemovedCallback -> IO Closure Source #
Wrap the callback into a Closure
.
mk_DBusObjectInterfaceRemovedCallback :: C_DBusObjectInterfaceRemovedCallback -> IO (FunPtr C_DBusObjectInterfaceRemovedCallback) Source #
Generate a function pointer callable from C code, from a C_DBusObjectInterfaceRemovedCallback
.
noDBusObjectInterfaceRemovedCallback :: Maybe DBusObjectInterfaceRemovedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
DBusObjectInterfaceRemovedCallback
onDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceRemovedCallback -> m SignalHandlerId Source #
Connect a signal handler for the “interface-removed
” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on
dBusObject #interfaceRemoved callback