Struct cognitive_device_manager::device_manager::DeviceManager
[−]
[src]
pub struct DeviceManager<C> where
C: EventHandling + StatePublishing + HwGraphics + Clone, { /* fields omitted */ }
Device Manager manages searching input and output devices and monitoring them.
It packs all the functionality from cognitive-device-manager
in in single, easy to use
structure.
Methods
impl<C> DeviceManager<C> where
C: 'static + EventHandling + StatePublishing + HwGraphics + Send + Clone,
[src]
C: 'static + EventHandling + StatePublishing + HwGraphics + Send + Clone,
fn new(
input_handler: Box<InputHandling>,
input_forwarder: Box<InputForwarding>,
input_config: InputConfig,
coordinator: C
) -> Self
input_handler: Box<InputHandling>,
input_forwarder: Box<InputForwarding>,
input_config: InputConfig,
coordinator: C
) -> Self
Constructs new DeviceManager
.
impl<C> DeviceManager<C> where
C: 'static + EventHandling + StatePublishing + HwGraphics + Send + Clone,
[src]
C: 'static + EventHandling + StatePublishing + HwGraphics + Send + Clone,
Event handlers
fn on_suspend(&mut self)
This method is called when application is going to suspend (e.g. virtual terminal was switched).
fn on_wakeup(&mut self)
This method is called when application is going to wake up from suspension.
fn on_inputs_changed(&mut self)
This method is called when state of one of input devices changed (was added or removed).
fn on_outputs_changed(&mut self)
This method is called when state of one of output devices changed (was added or removed).