19 #ifndef MIR_INPUT_DEFAULT_INPUT_DEVICE_HUB_H_ 20 #define MIR_INPUT_DEFAULT_INPUT_DEVICE_HUB_H_ 32 #include <linux/input.h> 39 class ServerActionQueue;
51 class MultiplexingDispatchable;
57 class InputDeviceObserver;
65 std::shared_ptr<Seat>
const& seat,
66 std::shared_ptr<dispatch::MultiplexingDispatchable>
const& input_multiplexer,
67 std::shared_ptr<ServerActionQueue>
const& observer_queue,
68 std::shared_ptr<cookie::Authority>
const& cookie_authority);
71 void add_device(std::shared_ptr<InputDevice>
const& device)
override;
72 void remove_device(std::shared_ptr<InputDevice>
const& device)
override;
75 void add_observer(std::shared_ptr<InputDeviceObserver>
const&)
override;
76 void remove_observer(std::weak_ptr<InputDeviceObserver>
const&)
override;
77 void for_each_input_device(std::function<
void(
Device const& device)>
const& callback)
override;
81 void add_device_handle(std::shared_ptr<DefaultDevice>
const& handle);
84 std::shared_ptr<Seat>
const seat;
85 std::shared_ptr<frontend::EventSink>
const sink;
86 std::shared_ptr<dispatch::MultiplexingDispatchable>
const input_dispatchable;
87 std::mutex observer_guard;
88 std::shared_ptr<ServerActionQueue>
const observer_queue;
89 std::shared_ptr<dispatch::ActionQueue>
const device_queue;
90 std::shared_ptr<cookie::Authority>
const cookie_authority;
92 struct RegisteredDevice :
public InputSink 95 RegisteredDevice(std::shared_ptr<InputDevice>
const& dev,
97 std::shared_ptr<dispatch::MultiplexingDispatchable>
const& multiplexer,
98 std::shared_ptr<cookie::Authority>
const& cookie_authority,
99 std::shared_ptr<DefaultDevice>
const& handle);
100 void handle_input(
MirEvent& event)
override;
102 bool device_matches(std::shared_ptr<InputDevice>
const& dev)
const;
103 void start(std::shared_ptr<Seat>
const& seat);
106 std::shared_ptr<Seat> seat;
107 const std::shared_ptr<DefaultDevice> handle;
111 std::shared_ptr<InputDevice>
const device;
112 std::shared_ptr<dispatch::MultiplexingDispatchable>
const multiplexer;
115 std::vector<std::shared_ptr<Device>> handles;
116 std::vector<std::unique_ptr<RegisteredDevice>> devices;
117 std::vector<std::shared_ptr<InputDeviceObserver>> observers;
All things Mir.
Definition: atomic_callback.h:25
std::promise< bool > stop
Definition: in.cpp:28
Definition: rectangle.h:33
Definition: event_private.h:181