Trait ux::DeviceManagerExt [−][src]
pub trait DeviceManagerExt: 'static { pub fn get_core_device(
&self,
device_type: InputDeviceType
) -> Option<InputDevice>; pub fn get_device(&self, device_id: i32) -> Option<InputDevice>; pub fn list_devices(&self) -> Vec<InputDevice, Global>ⓘ; pub fn peek_devices(&self) -> Vec<InputDevice, Global>ⓘ; pub fn get_property_backend(&self) -> Option<Backend>; pub fn connect_device_added<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &InputDevice); pub fn connect_device_removed<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &InputDevice); }
Required methods
pub fn get_core_device(
&self,
device_type: InputDeviceType
) -> Option<InputDevice>
[src]
&self,
device_type: InputDeviceType
) -> Option<InputDevice>
Retrieves the core InputDevice
of type device_type
Core devices are devices created automatically by the default backend
device_type
the type of the core device
Returns
a InputDevice
or None
. The
returned device is owned by the DeviceManager
and should
not be modified or freed
pub fn get_device(&self, device_id: i32) -> Option<InputDevice>
[src]
Retrieves the InputDevice
with the given device_id
device_id
the integer id of a device
Returns
a InputDevice
or None
. The
returned device is owned by the DeviceManager
and should
never be modified or freed
pub fn list_devices(&self) -> Vec<InputDevice, Global>ⓘ
[src]
Lists all currently registered input devices
Returns
a newly allocated list of InputDevice
objects. Use
glib::SList::free
to deallocate it when done
pub fn peek_devices(&self) -> Vec<InputDevice, Global>ⓘ
[src]
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
pub fn get_property_backend(&self) -> Option<Backend>
[src]
pub fn connect_device_added<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &InputDevice),
[src]
F: 'static + Fn(&Self, &InputDevice),
The ::device-added signal is emitted each time a device has been
added to the DeviceManager
device
the newly added InputDevice
pub fn connect_device_removed<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &InputDevice),
[src]
F: 'static + Fn(&Self, &InputDevice),
The ::device-removed signal is emitted each time a device has been
removed from the DeviceManager
device
the removed InputDevice
Implementors
impl<O> DeviceManagerExt for O where
O: IsA<DeviceManager>,
[src]
impl<O> DeviceManagerExt for O where
O: IsA<DeviceManager>,
[src]pub fn get_core_device(
&self,
device_type: InputDeviceType
) -> Option<InputDevice>
[src]
&self,
device_type: InputDeviceType
) -> Option<InputDevice>
pub fn get_device(&self, device_id: i32) -> Option<InputDevice>
[src]
pub fn list_devices(&self) -> Vec<InputDevice, Global>ⓘ
[src]
pub fn peek_devices(&self) -> Vec<InputDevice, Global>ⓘ
[src]
pub fn get_property_backend(&self) -> Option<Backend>
[src]
pub fn connect_device_added<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &InputDevice),
[src]
F: 'static + Fn(&O, &InputDevice),
pub fn connect_device_removed<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &InputDevice),
[src]
F: 'static + Fn(&O, &InputDevice),