19 #ifndef MIR_INPUT_DEFAULT_INPUT_DISPATCHER_H_ 20 #define MIR_INPUT_DEFAULT_INPUT_DISPATCHER_H_ 28 #include <unordered_map> 29 #include <unordered_set> 50 bool dispatch(
MirEvent const& event)
override;
51 void start()
override;
55 void set_focus(std::shared_ptr<input::Surface>
const& target)
override;
56 void clear_focus()
override;
59 void device_reset(
MirInputDeviceId reset_device_id, std::chrono::nanoseconds when);
64 void send_enter_exit_event(std::shared_ptr<input::Surface>
const& surface,
67 std::shared_ptr<input::Surface> find_target_surface(
geometry::Point const& target);
69 void set_focus_locked(std::lock_guard<std::mutex>
const&, std::shared_ptr<input::Surface>
const&);
83 std::unordered_map<MirInputDeviceId, std::unordered_set<int>> depressed_scancodes;
84 } focus_surface_key_state;
87 struct PointerInputState
89 std::shared_ptr<input::Surface> current_target;
90 std::shared_ptr<input::Surface> gesture_owner;
92 std::unordered_map<MirInputDeviceId, PointerInputState> pointer_state_by_id;
95 struct TouchInputState
97 std::shared_ptr<input::Surface> gesture_owner;
99 std::unordered_map<MirInputDeviceId, TouchInputState> touch_state_by_id;
102 std::shared_ptr<input::Scene>
const scene;
104 std::shared_ptr<scene::Observer> scene_observer;
106 std::mutex dispatcher_mutex;
107 std::weak_ptr<input::Surface> focus_surface;
114 #endif // MIR_INPUT_DEFAULT_INPUT_DISPATCHER_H_ All things Mir.
Definition: atomic_callback.h:25
Definition: event_private.h:51
surface_removed
Definition: scene_report_tp.h:46
std::promise< bool > stop
Definition: in.cpp:28
Definition: event_private.h:181