19 #ifndef MIR_INPUT_EVDEV_LIBINPUT_DEVICE_H_
20 #define MIR_INPUT_EVDEV_LIBINPUT_DEVICE_H_
31 #include <unordered_map>
33 struct libinput_event;
34 struct libinput_event_keyboard;
35 struct libinput_event_touch;
36 struct libinput_event_pointer;
37 struct libinput_device_group;
59 ::libinput_device*
device()
const;
60 ::libinput_device_group*
group();
66 EventUPtr convert_motion_event(libinput_event_pointer* pointer);
67 EventUPtr convert_absolute_motion_event(libinput_event_pointer* pointer);
68 EventUPtr convert_axis_event(libinput_event_pointer* pointer);
69 void add_touch_down_event(libinput_event_touch* touch);
70 void add_touch_up_event(libinput_event_touch* touch);
71 void add_touch_motion_event(libinput_event_touch* touch);
72 MirEvent& get_accumulated_touch_event(std::chrono::nanoseconds timestamp);
73 void update_device_info();
75 std::shared_ptr<InputReport> report;
76 std::shared_ptr<::libinput> lib;
77 std::vector<std::string> paths;
78 std::vector<LibInputDevicePtr> devices;
79 std::shared_ptr<dispatch::Dispatchable> dispatchable_fd;
93 float x{0}, y{0}, major{0}, minor{0}, pressure{0};
95 std::unordered_map<MirTouchId,ContactData> last_seen_properties;
97 void update_contact_data(ContactData &data, libinput_event_touch* touch);
All things Mir.
Definition: atomic_callback.h:25
std::unique_ptr< MirEvent, void(*)(MirEvent *)> EventUPtr
Definition: event_builders.h:33
Definition: event_private.h:178