19 #ifndef MIR_INPUT_DEFAULT_INPUT_DEVICE_HUB_H_
20 #define MIR_INPUT_DEFAULT_INPUT_DEVICE_HUB_H_
32 #include <linux/input.h>
38 class ServerActionQueue;
42 class MultiplexingDispatchable;
46 class InputDispatcher;
48 class InputDeviceObserver;
49 class TouchVisualizer;
58 std::shared_ptr<dispatch::MultiplexingDispatchable>
const& input_multiplexer,
59 std::shared_ptr<ServerActionQueue>
const& observer_queue,
60 std::shared_ptr<TouchVisualizer>
const& touch_visualizer,
61 std::shared_ptr<CursorListener>
const& cursor_listener,
62 std::shared_ptr<InputRegion>
const& input_region);
65 void add_device(std::shared_ptr<InputDevice>
const& device)
override;
66 void remove_device(std::shared_ptr<InputDevice>
const& device)
override;
69 void add_observer(std::shared_ptr<InputDeviceObserver>
const&)
override;
70 void remove_observer(std::weak_ptr<InputDeviceObserver>
const&)
override;
74 void add_device_handle(std::shared_ptr<DefaultDevice>
const& handle);
77 std::shared_ptr<InputDispatcher>
const input_dispatcher;
78 std::shared_ptr<dispatch::MultiplexingDispatchable>
const input_dispatchable;
79 std::shared_ptr<ServerActionQueue>
const observer_queue;
80 std::shared_ptr<TouchVisualizer>
const touch_visualizer;
81 std::shared_ptr<CursorListener>
const cursor_listener;
82 std::shared_ptr<InputRegion>
const input_region;
84 struct RegisteredDevice :
public InputSink
87 RegisteredDevice(std::shared_ptr<InputDevice>
const& dev,
MirInputDeviceId dev_id, std::shared_ptr<InputDispatcher>
const& dispatcher, std::shared_ptr<dispatch::MultiplexingDispatchable>
const& multiplexer,
DefaultInputDeviceHub * hub);
88 void handle_input(
MirEvent& event)
override;
91 bool device_matches(std::shared_ptr<InputDevice>
const& dev)
const;
95 std::vector<TouchVisualizer::Spot>
const& spots()
const;
101 std::shared_ptr<InputDevice>
const device;
102 std::shared_ptr<InputDispatcher>
const dispatcher;
103 std::shared_ptr<dispatch::MultiplexingDispatchable>
const multiplexer;
105 std::vector<TouchVisualizer::Spot> touch_spots;
109 std::vector<std::shared_ptr<DefaultDevice>> handles;
110 std::vector<std::unique_ptr<RegisteredDevice>> devices;
111 std::vector<std::shared_ptr<InputDeviceObserver>> observers;
All things Mir.
Definition: atomic_callback.h:25
Definition: rectangle.h:33
Definition: event_private.h:178