20 #ifndef MIR_INPUT_SEAT_INPUT_DEVICE_TRACKER_H 21 #define MIR_INPUT_SEAT_INPUT_DEVICE_TRACKER_H 27 #include <unordered_map> 32 using EventUPtr = std::unique_ptr<MirEvent, void(*)(MirEvent*)>;
41 class InputDispatcher;
55 std::shared_ptr<TouchVisualizer>
const& touch_visualizer,
56 std::shared_ptr<CursorListener>
const& cursor_listener,
57 std::shared_ptr<InputRegion>
const& input_region,
58 std::shared_ptr<KeyMapper>
const& key_mapper,
59 std::shared_ptr<time::Clock>
const& clock);
69 void set_key_state(
MirInputDeviceId id, std::vector<uint32_t>
const& scan_codes);
73 void reset_confinement_regions();
80 void confine_pointer();
82 std::shared_ptr<InputDispatcher>
const dispatcher;
83 std::shared_ptr<TouchVisualizer>
const touch_visualizer;
84 std::shared_ptr<CursorListener>
const cursor_listener;
85 std::shared_ptr<InputRegion>
const input_region;
86 std::shared_ptr<KeyMapper>
const key_mapper;
87 std::shared_ptr<time::Clock>
const clock;
98 std::vector<TouchVisualizer::Spot> spots;
99 std::vector<uint32_t> scan_codes;
104 float cursor_x = 0.0f, cursor_y = 0.0f;
107 std::unordered_map<MirInputDeviceId, DeviceData> device_data;
108 std::vector<TouchVisualizer::Spot> spots;
109 std::function<void(mir::geometry::Point&)> confine_function;
All things Mir.
Definition: atomic_callback.h:25
A collection of rectangles (with possible duplicates).
Definition: rectangles.h:34
Definition: keyboard_event.h:28
Definition: motion_event.h:143
void set_cursor_position(MirEvent &event, mir::geometry::Point const &pos)
Definition: event_builders.cpp:213
std::unique_ptr< MirEvent, void(*)(MirEvent *)> EventUPtr
Definition: seat.h:32
Definition: motion_event.h:147