Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
The GDBusObject
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)
- class (GObject o, IsDescendantOf DBusObject o) => IsDBusObject o
- toDBusObject :: (MonadIO m, IsDBusObject o) => o -> m DBusObject
- dBusObjectGetInterface :: (HasCallStack, MonadIO m, IsDBusObject a) => a -> Text -> m (Maybe DBusInterface)
- dBusObjectGetInterfaces :: (HasCallStack, MonadIO m, IsDBusObject a) => a -> m [DBusInterface]
- dBusObjectGetObjectPath :: (HasCallStack, MonadIO m, IsDBusObject a) => a -> m Text
- type DBusObjectInterfaceAddedCallback = DBusInterface -> IO ()
- afterDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceAddedCallback) -> m SignalHandlerId
- onDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceAddedCallback) -> m SignalHandlerId
- type DBusObjectInterfaceRemovedCallback = DBusInterface -> IO ()
- afterDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceRemovedCallback) -> m SignalHandlerId
- onDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceRemovedCallback) -> m SignalHandlerId
Exported types
newtype DBusObject Source #
Memory-managed wrapper type.
Instances
Eq DBusObject Source # | |
Defined in GI.Gio.Interfaces.DBusObject (==) :: DBusObject -> DBusObject -> Bool # (/=) :: DBusObject -> DBusObject -> Bool # | |
GObject DBusObject Source # | |
Defined in GI.Gio.Interfaces.DBusObject | |
ManagedPtrNewtype DBusObject Source # | |
Defined in GI.Gio.Interfaces.DBusObject | |
TypedObject DBusObject Source # | |
Defined in GI.Gio.Interfaces.DBusObject | |
HasParentTypes DBusObject Source # | |
Defined in GI.Gio.Interfaces.DBusObject | |
IsGValue (Maybe DBusObject) Source # | Convert |
Defined in GI.Gio.Interfaces.DBusObject gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe DBusObject -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe DBusObject) # | |
type ParentTypes DBusObject Source # | |
Defined in GI.Gio.Interfaces.DBusObject type ParentTypes DBusObject = '[Object] |
class (GObject o, IsDescendantOf DBusObject o) => IsDBusObject o Source #
Type class for types which can be safely cast to DBusObject
, for instance with toDBusObject
.
Instances
(GObject o, IsDescendantOf DBusObject o) => IsDBusObject o Source # | |
Defined in GI.Gio.Interfaces.DBusObject |
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
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getInterface, getInterfaces, getObjectPath, getProperty, getQdata.
Setters
getInterface
dBusObjectGetInterface Source #
:: (HasCallStack, MonadIO m, IsDBusObject a) | |
=> a |
|
-> Text |
|
-> m (Maybe 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 DBusObjectInterfaceAddedCallback Source #
= DBusInterface |
|
-> IO () |
Emitted when interface
is added to object
.
Since: 2.30
afterDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceAddedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the interfaceAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
dBusObject #interfaceAdded callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceAddedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the interfaceAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
dBusObject #interfaceAdded callback
interfaceRemoved
type DBusObjectInterfaceRemovedCallback Source #
= DBusInterface |
|
-> IO () |
Emitted when interface
is removed from object
.
Since: 2.30
afterDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceRemovedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the interfaceRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
dBusObject #interfaceRemoved callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceRemovedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the interfaceRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
dBusObject #interfaceRemoved callback