pub struct DBusProxy { /* private fields */ }
Expand description
GDBusProxy
is a base class used for proxies to access a D-Bus
interface on a remote object. A GDBusProxy
can be constructed for
both well-known and unique names.
By default, GDBusProxy
will cache all properties (and listen to
changes) of the remote object, and proxy all signals that get
emitted. This behaviour can be changed by passing suitable
DBusProxyFlags
when the proxy is created. If the proxy is for a
well-known name, the property cache is flushed when the name owner
vanishes and reloaded when a name owner appears.
The unique name owner of the proxy’s name is tracked and can be read from
g-name-owner
. Connect to the
notify
signal to get notified of changes.
Additionally, only signals and property changes emitted from the current name
owner are considered and calls are always sent to the current name owner.
This avoids a number of race conditions when the name is lost by one owner
and claimed by another. However, if no name owner currently exists,
then calls will be sent to the well-known name which may result in
the message bus launching an owner (unless
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START
is set).
If the proxy is for a stateless D-Bus service, where the name owner may
be started and stopped between calls, the
g-name-owner
tracking of GDBusProxy
will cause the
proxy to drop signal and property changes from the service after it has
restarted for the first time. When interacting with a stateless D-Bus
service, do not use GDBusProxy
— use direct D-Bus method calls and signal
connections.
The generic g-properties-changed
and
g-signal
signals are not very convenient to work
with. Therefore, the recommended way of working with proxies is to subclass
GDBusProxy
, and have more natural properties and signals in your derived
class. This example shows how
this can easily be done using the gdbus-codegen
tool.
A GDBusProxy
instance can be used from multiple threads but note
that all signals (e.g. g-signal
,
g-properties-changed
and
notify
) are emitted in the thread-default main
context (see [glib::MainContext::push_thread_default()
][crate::glib::MainContext::push_thread_default()]) of the thread
where the instance was constructed.
An example using a proxy for a well-known name can be found in
gdbus-example-watch-proxy.c
.
§Properties
§g-bus-type
If this property is not BusType::None
, then
#GDBusProxy:g-connection must be None
and will be set to the
#GDBusConnection obtained by calling g_bus_get() with the value
of this property.
Writeable | Construct Only
§g-connection
The #GDBusConnection the proxy is for.
Readable | Writeable | Construct Only
§g-default-timeout
The timeout to use if -1 (specifying default timeout) is passed as @timeout_msec in the g_dbus_proxy_call() and g_dbus_proxy_call_sync() functions.
This allows applications to set a proxy-wide timeout for all
remote method invocations on the proxy. If this property is -1,
the default timeout (typically 25 seconds) is used. If set to
G_MAXINT
, then no timeout is used.
Readable | Writeable | Construct
§g-flags
Flags from the #GDBusProxyFlags enumeration.
Readable | Writeable | Construct Only
§g-interface-info
Ensure that interactions with this proxy conform to the given interface. This is mainly to ensure that malformed data received from the other peer is ignored. The given #GDBusInterfaceInfo is said to be the “expected interface”.
The checks performed are:
-
When completing a method call, if the type signature of the reply message isn’t what’s expected, the reply is discarded and the #GError is set to
IOErrorEnum::InvalidArgument
. -
Received signals that have a type signature mismatch are dropped and a warning is logged via g_warning().
-
Properties received via the initial
GetAll()
call or via the::PropertiesChanged
signal (on the org.freedesktop.DBus.Properties interface) or set using g_dbus_proxy_set_cached_property() with a type signature mismatch are ignored and a warning is logged via g_warning().
Note that these checks are never done on methods, signals and properties that are not referenced in the given #GDBusInterfaceInfo, since extending a D-Bus interface on the service-side is not considered an ABI break.
Readable | Writeable
§g-interface-name
The D-Bus interface name the proxy is for.
Readable | Writeable | Construct Only
§g-name
The well-known or unique name that the proxy is for.
Readable | Writeable | Construct Only
§g-name-owner
The unique name that owns #GDBusProxy:g-name or None
if no-one
currently owns that name. You may connect to #GObject::notify signal to
track changes to this property.
Readable
§g-object-path
The object path the proxy is for.
Readable | Writeable | Construct Only
§Signals
§g-properties-changed
Emitted when one or more D-Bus properties on @proxy changes. The
local cache has already been updated when this signal fires. Note
that both @changed_properties and @invalidated_properties are
guaranteed to never be None
(either may be empty though).
If the proxy has the flag
DBusProxyFlags::GET_INVALIDATED_PROPERTIES
set, then
@invalidated_properties will always be empty.
This signal corresponds to the
PropertiesChanged
D-Bus signal on the
org.freedesktop.DBus.Properties
interface.
§g-signal
Emitted when a signal from the remote object and interface that @proxy is for, has been received.
Since 2.72 this signal supports detailed connections. You can connect to
the detailed signal g-signal::x
in order to receive callbacks only when
signal x
is received from the remote object.
Detailed
§Implements
DBusProxyExt
, [trait@glib::ObjectExt
], AsyncInitableExt
, DBusInterfaceExt
, InitableExt
, DBusProxyExtManual
GLib type: GObject with reference counted clone semantics.
Implementations§
Source§impl DBusProxy
impl DBusProxy
pub const NONE: Option<&'static DBusProxy> = None
Sourcepub fn for_bus_sync(
bus_type: BusType,
flags: DBusProxyFlags,
info: Option<&DBusInterfaceInfo>,
name: &str,
object_path: &str,
interface_name: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<DBusProxy, Error>
pub fn for_bus_sync( bus_type: BusType, flags: DBusProxyFlags, info: Option<&DBusInterfaceInfo>, name: &str, object_path: &str, interface_name: &str, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<DBusProxy, Error>
Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
#GDBusProxy is used in this [example][gdbus-wellknown-proxy].
§bus_type
A #GBusType.
§flags
Flags used when constructing the proxy.
§info
A #GDBusInterfaceInfo specifying the minimal interface
that @proxy conforms to or None
.
§name
A bus name (well-known or unique).
§object_path
An object path.
§interface_name
A D-Bus interface name.
§cancellable
A #GCancellable or None
.
§Returns
A #GDBusProxy or None
if error is set.
Free with g_object_unref().
Sourcepub fn new_sync(
connection: &DBusConnection,
flags: DBusProxyFlags,
info: Option<&DBusInterfaceInfo>,
name: Option<&str>,
object_path: &str,
interface_name: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<DBusProxy, Error>
pub fn new_sync( connection: &DBusConnection, flags: DBusProxyFlags, info: Option<&DBusInterfaceInfo>, name: Option<&str>, object_path: &str, interface_name: &str, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<DBusProxy, Error>
Creates a proxy for accessing @interface_name on the remote object
at @object_path owned by @name at @connection and synchronously
loads D-Bus properties unless the
DBusProxyFlags::DO_NOT_LOAD_PROPERTIES
flag is used.
If the DBusProxyFlags::DO_NOT_CONNECT_SIGNALS
flag is not set, also sets up
match rules for signals. Connect to the #GDBusProxy::g-signal signal
to handle signals from the remote object.
If both DBusProxyFlags::DO_NOT_LOAD_PROPERTIES
and
DBusProxyFlags::DO_NOT_CONNECT_SIGNALS
are set, this constructor is
guaranteed to return immediately without blocking.
If @name is a well-known name and the
DBusProxyFlags::DO_NOT_AUTO_START
and DBusProxyFlags::DO_NOT_AUTO_START_AT_CONSTRUCTION
flags aren’t set and no name owner currently exists, the message bus
will be requested to launch a name owner for the name.
This is a synchronous failable constructor. See g_dbus_proxy_new() and g_dbus_proxy_new_finish() for the asynchronous version.
#GDBusProxy is used in this [example][gdbus-wellknown-proxy].
§connection
A #GDBusConnection.
§flags
Flags used when constructing the proxy.
§info
A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or None
.
§name
A bus name (well-known or unique) or None
if @connection is not a message bus connection.
§object_path
An object path.
§interface_name
A D-Bus interface name.
§cancellable
A #GCancellable or None
.
§Returns
A #GDBusProxy or None
if error is set.
Free with g_object_unref().
Sourcepub fn new<P: FnOnce(Result<DBusProxy, Error>) + 'static>(
connection: &DBusConnection,
flags: DBusProxyFlags,
info: Option<&DBusInterfaceInfo>,
name: Option<&str>,
object_path: &str,
interface_name: &str,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
pub fn new<P: FnOnce(Result<DBusProxy, Error>) + 'static>( connection: &DBusConnection, flags: DBusProxyFlags, info: Option<&DBusInterfaceInfo>, name: Option<&str>, object_path: &str, interface_name: &str, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
Creates a proxy for accessing @interface_name on the remote object
at @object_path owned by @name at @connection and asynchronously
loads D-Bus properties unless the
DBusProxyFlags::DO_NOT_LOAD_PROPERTIES
flag is used. Connect to
the #GDBusProxy::g-properties-changed signal to get notified about
property changes.
If the DBusProxyFlags::DO_NOT_CONNECT_SIGNALS
flag is not set, also sets up
match rules for signals. Connect to the #GDBusProxy::g-signal signal
to handle signals from the remote object.
If both DBusProxyFlags::DO_NOT_LOAD_PROPERTIES
and
DBusProxyFlags::DO_NOT_CONNECT_SIGNALS
are set, this constructor is
guaranteed to complete immediately without blocking.
If @name is a well-known name and the
DBusProxyFlags::DO_NOT_AUTO_START
and DBusProxyFlags::DO_NOT_AUTO_START_AT_CONSTRUCTION
flags aren’t set and no name owner currently exists, the message bus
will be requested to launch a name owner for the name.
This is a failable asynchronous constructor - when the proxy is ready, @callback will be invoked and you can use g_dbus_proxy_new_finish() to get the result.
See g_dbus_proxy_new_sync() and for a synchronous version of this constructor.
#GDBusProxy is used in this [example][gdbus-wellknown-proxy].
§connection
A #GDBusConnection.
§flags
Flags used when constructing the proxy.
§info
A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or None
.
§name
A bus name (well-known or unique) or None
if @connection is not a message bus connection.
§object_path
An object path.
§interface_name
A D-Bus interface name.
§cancellable
A #GCancellable or None
.
§callback
Callback function to invoke when the proxy is ready.
pub fn new_future( connection: &DBusConnection, flags: DBusProxyFlags, info: Option<&DBusInterfaceInfo>, name: Option<&str>, object_path: &str, interface_name: &str, ) -> Pin<Box_<dyn Future<Output = Result<DBusProxy, Error>> + 'static>>
Sourcepub fn for_bus<P: FnOnce(Result<DBusProxy, Error>) + 'static>(
bus_type: BusType,
flags: DBusProxyFlags,
info: Option<&DBusInterfaceInfo>,
name: &str,
object_path: &str,
interface_name: &str,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
pub fn for_bus<P: FnOnce(Result<DBusProxy, Error>) + 'static>( bus_type: BusType, flags: DBusProxyFlags, info: Option<&DBusInterfaceInfo>, name: &str, object_path: &str, interface_name: &str, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
Like g_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
#GDBusProxy is used in this [example][gdbus-wellknown-proxy].
§bus_type
A #GBusType.
§flags
Flags used when constructing the proxy.
§info
A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or None
.
§name
A bus name (well-known or unique).
§object_path
An object path.
§interface_name
A D-Bus interface name.
§cancellable
A #GCancellable or None
.
§callback
Callback function to invoke when the proxy is ready.
pub fn for_bus_future( bus_type: BusType, flags: DBusProxyFlags, info: Option<&DBusInterfaceInfo>, name: &str, object_path: &str, interface_name: &str, ) -> Pin<Box_<dyn Future<Output = Result<DBusProxy, Error>> + 'static>>
Trait Implementations§
Source§impl HasParamSpec for DBusProxy
impl HasParamSpec for DBusProxy
Source§impl Ord for DBusProxy
impl Ord for DBusProxy
Source§fn cmp(&self, other: &Self) -> Ordering
fn cmp(&self, other: &Self) -> Ordering
Comparison for two GObjects.
Compares the memory addresses of the provided objects.
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<OT: ObjectType> PartialEq<OT> for DBusProxy
impl<OT: ObjectType> PartialEq<OT> for DBusProxy
Source§impl<OT: ObjectType> PartialOrd<OT> for DBusProxy
impl<OT: ObjectType> PartialOrd<OT> for DBusProxy
Source§impl StaticType for DBusProxy
impl StaticType for DBusProxy
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for DBusProxy
impl IsA<AsyncInitable> for DBusProxy
impl IsA<DBusInterface> for DBusProxy
impl IsA<Initable> for DBusProxy
impl Send for DBusProxy
impl Sync for DBusProxy
Auto Trait Implementations§
impl Freeze for DBusProxy
impl RefUnwindSafe for DBusProxy
impl Unpin for DBusProxy
impl UnwindSafe for DBusProxy
Blanket Implementations§
Source§impl<O> AsyncInitableExt for Owhere
O: IsA<AsyncInitable>,
impl<O> AsyncInitableExt for Owhere
O: IsA<AsyncInitable>,
Source§unsafe fn init_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
unsafe fn init_async<P: FnOnce(Result<(), Error>) + 'static>( &self, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
unsafe fn init_future( &self, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
Source§fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
T
. Read moreSource§fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
T
. Read moreSource§fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
T
. Read moreSource§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
T
. Read moreSource§fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while upcast
will do many checks at compile-time already. downcast
will
perform the same checks at runtime as dynamic_cast
, but will also ensure some amount of
compile-time safety. Read moreSource§fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read moreSource§unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
T
unconditionally. Read moreSource§unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
&T
unconditionally. Read moreSource§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<O> DBusInterfaceExt for Owhere
O: IsA<DBusInterface>,
impl<O> DBusInterfaceExt for Owhere
O: IsA<DBusInterface>,
Source§fn get(&self) -> Option<DBusObject>
fn get(&self) -> Option<DBusObject>
Source§fn info(&self) -> DBusInterfaceInfo
fn info(&self) -> DBusInterfaceInfo
Source§fn set_object(&self, object: Option<&impl IsA<DBusObject>>)
fn set_object(&self, object: Option<&impl IsA<DBusObject>>)
Source§impl<O> DBusProxyExt for O
impl<O> DBusProxyExt for O
Source§fn call<P: FnOnce(Result<Variant, Error>) + 'static>(
&self,
method_name: &str,
parameters: Option<&Variant>,
flags: DBusCallFlags,
timeout_msec: i32,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn call<P: FnOnce(Result<Variant, Error>) + 'static>( &self, method_name: &str, parameters: Option<&Variant>, flags: DBusCallFlags, timeout_msec: i32, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn call_future( &self, method_name: &str, parameters: Option<&Variant>, flags: DBusCallFlags, timeout_msec: i32, ) -> Pin<Box_<dyn Future<Output = Result<Variant, Error>> + 'static>>
Source§fn call_sync(
&self,
method_name: &str,
parameters: Option<&Variant>,
flags: DBusCallFlags,
timeout_msec: i32,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Variant, Error>
fn call_sync( &self, method_name: &str, parameters: Option<&Variant>, flags: DBusCallFlags, timeout_msec: i32, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<Variant, Error>
Source§fn call_with_unix_fd_list<P: FnOnce(Result<(Variant, Option<UnixFDList>), Error>) + 'static>(
&self,
method_name: &str,
parameters: Option<&Variant>,
flags: DBusCallFlags,
timeout_msec: i32,
fd_list: Option<&impl IsA<UnixFDList>>,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn call_with_unix_fd_list<P: FnOnce(Result<(Variant, Option<UnixFDList>), Error>) + 'static>( &self, method_name: &str, parameters: Option<&Variant>, flags: DBusCallFlags, timeout_msec: i32, fd_list: Option<&impl IsA<UnixFDList>>, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
Source§fn call_with_unix_fd_list_future(
&self,
method_name: &str,
parameters: Option<&Variant>,
flags: DBusCallFlags,
timeout_msec: i32,
fd_list: Option<&(impl IsA<UnixFDList> + Clone + 'static)>,
) -> Pin<Box_<dyn Future<Output = Result<(Variant, Option<UnixFDList>), Error>> + 'static>>
fn call_with_unix_fd_list_future( &self, method_name: &str, parameters: Option<&Variant>, flags: DBusCallFlags, timeout_msec: i32, fd_list: Option<&(impl IsA<UnixFDList> + Clone + 'static)>, ) -> Pin<Box_<dyn Future<Output = Result<(Variant, Option<UnixFDList>), Error>> + 'static>>
Source§fn call_with_unix_fd_list_sync(
&self,
method_name: &str,
parameters: Option<&Variant>,
flags: DBusCallFlags,
timeout_msec: i32,
fd_list: Option<&impl IsA<UnixFDList>>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(Variant, Option<UnixFDList>), Error>
fn call_with_unix_fd_list_sync( &self, method_name: &str, parameters: Option<&Variant>, flags: DBusCallFlags, timeout_msec: i32, fd_list: Option<&impl IsA<UnixFDList>>, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(Variant, Option<UnixFDList>), Error>
Source§fn cached_property(&self, property_name: &str) -> Option<Variant>
fn cached_property(&self, property_name: &str) -> Option<Variant>
Source§fn cached_property_names(&self) -> Vec<GString>
fn cached_property_names(&self) -> Vec<GString>
Source§fn connection(&self) -> DBusConnection
fn connection(&self) -> DBusConnection
Source§fn default_timeout(&self) -> i32
fn default_timeout(&self) -> i32
Source§fn flags(&self) -> DBusProxyFlags
fn flags(&self) -> DBusProxyFlags
Source§fn interface_info(&self) -> Option<DBusInterfaceInfo>
fn interface_info(&self) -> Option<DBusInterfaceInfo>
Source§fn interface_name(&self) -> GString
fn interface_name(&self) -> GString
Source§fn name_owner(&self) -> Option<GString>
fn name_owner(&self) -> Option<GString>
Source§fn object_path(&self) -> GString
fn object_path(&self) -> GString
Source§fn set_default_timeout(&self, timeout_msec: i32)
fn set_default_timeout(&self, timeout_msec: i32)
Source§fn set_interface_info(&self, info: Option<&DBusInterfaceInfo>)
fn set_interface_info(&self, info: Option<&DBusInterfaceInfo>)
Source§fn g_connection(&self) -> Option<DBusConnection>
fn g_connection(&self) -> Option<DBusConnection>
Source§fn g_default_timeout(&self) -> i32
fn g_default_timeout(&self) -> i32
Source§fn set_g_default_timeout(&self, g_default_timeout: i32)
fn set_g_default_timeout(&self, g_default_timeout: i32)
Source§fn g_flags(&self) -> DBusProxyFlags
fn g_flags(&self) -> DBusProxyFlags
Source§fn g_interface_info(&self) -> Option<DBusInterfaceInfo>
fn g_interface_info(&self) -> Option<DBusInterfaceInfo>
Source§fn set_g_interface_info(&self, g_interface_info: Option<&DBusInterfaceInfo>)
fn set_g_interface_info(&self, g_interface_info: Option<&DBusInterfaceInfo>)
Source§fn g_interface_name(&self) -> Option<GString>
fn g_interface_name(&self) -> Option<GString>
Source§fn g_name_owner(&self) -> Option<GString>
fn g_name_owner(&self) -> Option<GString>
None
if no-one
currently owns that name. You may connect to #GObject::notify signal to
track changes to this property.Source§fn g_object_path(&self) -> Option<GString>
fn g_object_path(&self) -> Option<GString>
fn connect_g_default_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_g_interface_info_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_g_name_owner_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
Source§impl<O> DBusProxyExtManual for O
impl<O> DBusProxyExtManual for O
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<O> InitableExt for O
impl<O> InitableExt for O
Source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
Source§impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
fn parent_class_init<T>(class: &mut Class<U>)
fn parent_instance_init<T>(instance: &mut InitializingObject<T>)
Source§impl<T> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
Source§fn is<U>(&self) -> boolwhere
U: StaticType,
fn is<U>(&self) -> boolwhere
U: StaticType,
true
if the object is an instance of (can be cast to) T
.Source§fn object_class(&self) -> &Class<Object>
fn object_class(&self) -> &Class<Object>
ObjectClass
of the object. Read moreSource§fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
T
. Read moreSource§fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
T
of the object. Read moreSource§fn set_property_from_value(&self, property_name: &str, value: &Value)
fn set_property_from_value(&self, property_name: &str, value: &Value)
Source§fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
Source§fn set_properties_from_value(&self, property_values: &[(&str, Value)])
fn set_properties_from_value(&self, property_values: &[(&str, Value)])
Source§fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
property_name
of the object and cast it to the type V. Read moreSource§fn property_value(&self, property_name: &str) -> Value
fn property_value(&self, property_name: &str) -> Value
property_name
of the object. Read moreSource§fn property_type(&self, property_name: &str) -> Option<Type>
fn property_type(&self, property_name: &str) -> Option<Type>
property_name
of this object. Read moreSource§fn find_property(&self, property_name: &str) -> Option<ParamSpec>
fn find_property(&self, property_name: &str) -> Option<ParamSpec>
ParamSpec
of the property property_name
of this object.Source§fn list_properties(&self) -> PtrSlice<ParamSpec>
fn list_properties(&self) -> PtrSlice<ParamSpec>
ParamSpec
of the properties of this object.Source§fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
Source§unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
key
. Read moreSource§unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
key
. Read moreSource§unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
key
. Read moreSource§unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
key
. Read moreSource§unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
key
. Read moreSource§unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
key
. Read moreSource§fn block_signal(&self, handler_id: &SignalHandlerId)
fn block_signal(&self, handler_id: &SignalHandlerId)
Source§fn unblock_signal(&self, handler_id: &SignalHandlerId)
fn unblock_signal(&self, handler_id: &SignalHandlerId)
Source§fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
Source§fn stop_signal_emission_by_name(&self, signal_name: &str)
fn stop_signal_emission_by_name(&self, signal_name: &str)
Source§fn connect<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name
on this object. Read moreSource§fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id
on this object. Read moreSource§fn connect_local<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name
on this object. Read moreSource§fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id
on this object. Read moreSource§unsafe fn connect_unsafe<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
signal_name
on this object. Read moreSource§unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
signal_id
on this object. Read moreSource§fn connect_closure(
&self,
signal_name: &str,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure, ) -> SignalHandlerId
signal_name
on this object. Read moreSource§fn connect_closure_id(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure, ) -> SignalHandlerId
signal_id
on this object. Read moreSource§fn watch_closure(&self, closure: &impl AsRef<Closure>)
fn watch_closure(&self, closure: &impl AsRef<Closure>)
closure
to the lifetime of the object. When
the object’s reference count drops to zero, the closure will be
invalidated. An invalidated closure will ignore any calls to
invoke_with_values
, or
invoke
when using Rust closures.Source§fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
Self::emit
but takes Value
for the arguments.Source§fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_by_name_with_values(
&self,
signal_name: &str,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value], ) -> Option<Value>
Source§fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_by_name_with_details_and_values(
&self,
signal_name: &str,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value], ) -> Option<Value>
Source§fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
Source§fn emit_with_details_and_values(
&self,
signal_id: SignalId,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value], ) -> Option<Value>
Source§fn disconnect(&self, handler_id: SignalHandlerId)
fn disconnect(&self, handler_id: SignalHandlerId)
Source§fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify
signal of the object. Read moreSource§fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify
signal of the object. Read moreSource§unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F,
) -> SignalHandlerId
unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
notify
signal of the object. Read moreSource§fn notify(&self, property_name: &str)
fn notify(&self, property_name: &str)
Source§fn notify_by_pspec(&self, pspec: &ParamSpec)
fn notify_by_pspec(&self, pspec: &ParamSpec)
Source§fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
Source§fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where
F: FnOnce() + 'static,
fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where
F: FnOnce() + 'static,
Source§fn bind_property<'a, 'f, 't, O>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str,
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
fn bind_property<'a, 'f, 't, O>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str,
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
Source§unsafe fn run_dispose(&self)
unsafe fn run_dispose(&self)
Source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
Source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
Source§fn ensure_type()
fn ensure_type()
Source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
Source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.