pub trait DeviceExt:
IsA<Device>
+ Sealed
+ 'static {
// Provided methods
fn create_element(&self, name: Option<&str>) -> Result<Element, BoolError> { ... }
fn caps(&self) -> Option<Caps> { ... }
fn device_class(&self) -> GString { ... }
fn display_name(&self) -> GString { ... }
fn properties(&self) -> Option<Structure> { ... }
fn has_classes(&self, classes: &str) -> bool { ... }
fn has_classesv(&self, classes: &[&str]) -> bool { ... }
fn reconfigure_element(
&self,
element: &impl IsA<Element>,
) -> Result<(), BoolError> { ... }
fn connect_removed<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Provided Methods§
sourcefn device_class(&self) -> GString
fn device_class(&self) -> GString
Gets the “class” of a device. This is a “/” separated list of
classes that represent this device. They are a subset of the
classes of the DeviceProvider
that produced this device.
§Returns
The device class. Free with g_free()
after use.
sourcefn display_name(&self) -> GString
fn display_name(&self) -> GString
sourcefn properties(&self) -> Option<Structure>
fn properties(&self) -> Option<Structure>
sourcefn has_classes(&self, classes: &str) -> bool
fn has_classes(&self, classes: &str) -> bool
sourcefn has_classesv(&self, classes: &[&str]) -> bool
fn has_classesv(&self, classes: &[&str]) -> bool
sourcefn reconfigure_element(
&self,
element: &impl IsA<Element>,
) -> Result<(), BoolError>
fn reconfigure_element( &self, element: &impl IsA<Element>, ) -> Result<(), BoolError>
Tries to reconfigure an existing element to use the device. If this
function fails, then one must destroy the element and create a new one
using create_element()
.
Note: This should only be implemented for elements can change their device in the PLAYING state.
§element
a Element
§Returns
true
if the element could be reconfigured to use this device,
false
otherwise.
fn connect_removed<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
Object Safety§
This trait is not object safe.