pub trait DeviceManagerExt: 'static {
// Required methods
fn get_core_device(
&self,
device_type: InputDeviceType,
) -> Option<InputDevice>;
fn get_device(&self, device_id: i32) -> Option<InputDevice>;
fn list_devices(&self) -> Vec<InputDevice>;
fn peek_devices(&self) -> Vec<InputDevice>;
fn get_property_backend(&self) -> Option<Backend>;
fn connect_device_added<F: Fn(&Self, &InputDevice) + 'static>(
&self,
f: F,
) -> SignalHandlerId;
fn connect_device_removed<F: Fn(&Self, &InputDevice) + 'static>(
&self,
f: F,
) -> SignalHandlerId;
}Expand description
Required Methods§
Sourcefn get_core_device(&self, device_type: InputDeviceType) -> Option<InputDevice>
fn get_core_device(&self, device_type: InputDeviceType) -> Option<InputDevice>
Sourcefn get_device(&self, device_id: i32) -> Option<InputDevice>
fn get_device(&self, device_id: i32) -> Option<InputDevice>
Sourcefn list_devices(&self) -> Vec<InputDevice>
fn list_devices(&self) -> Vec<InputDevice>
Lists all currently registered input devices
§Returns
a newly allocated list of InputDevice objects. Use
glib::SList::free to deallocate it when done
Sourcefn peek_devices(&self) -> Vec<InputDevice>
fn peek_devices(&self) -> Vec<InputDevice>
Lists all currently registered input devices
§Returns
a pointer to the internal list of InputDevice objects. The
returned list is owned by the DeviceManager and should never
be modified or freed
fn get_property_backend(&self) -> Option<Backend>
Sourcefn connect_device_added<F: Fn(&Self, &InputDevice) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_device_added<F: Fn(&Self, &InputDevice) + 'static>( &self, f: F, ) -> SignalHandlerId
The ::device-added signal is emitted each time a device has been
added to the DeviceManager
§device
the newly added InputDevice
Sourcefn connect_device_removed<F: Fn(&Self, &InputDevice) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_device_removed<F: Fn(&Self, &InputDevice) + 'static>( &self, f: F, ) -> SignalHandlerId
The ::device-removed signal is emitted each time a device has been
removed from the DeviceManager
§device
the removed InputDevice
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".