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&);
74 struct PointerInputState
76 std::shared_ptr<input::Surface> current_target;
77 std::shared_ptr<input::Surface> gesture_owner;
79 std::unordered_map<MirInputDeviceId, PointerInputState> pointer_state_by_id;
82 struct TouchInputState
84 std::shared_ptr<input::Surface> gesture_owner;
86 std::unordered_map<MirInputDeviceId, TouchInputState> touch_state_by_id;
89 std::shared_ptr<input::Scene>
const scene;
91 std::shared_ptr<scene::Observer> scene_observer;
93 std::mutex dispatcher_mutex;
94 std::weak_ptr<input::Surface> focus_surface;
101 #endif // MIR_INPUT_DEFAULT_INPUT_DISPATCHER_H_ All things Mir.
Definition: atomic_callback.h:25
Definition: keyboard_event.h:28
Definition: motion_event.h:143
surface_removed
Definition: scene_report_tp.h:46
std::promise< bool > stop
Definition: in.cpp:28
Definition: motion_event.h:147