Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h

Issue 990483002: ozone: evdev: Fix possibility of stuck keys with libevdev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_INTERPRETER_LIBEVDEV_CROS _H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_INTERPRETER_LIBEVDEV_CROS _H_
6 #define UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_INTERPRETER_LIBEVDEV_CROS _H_ 6 #define UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_INTERPRETER_LIBEVDEV_CROS _H_
7 7
8 #include <gestures/gestures.h> 8 #include <gestures/gestures.h>
9 #include <libevdev/libevdev.h> 9 #include <libevdev/libevdev.h>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 CursorDelegateEvdev* cursor, 44 CursorDelegateEvdev* cursor,
45 GesturePropertyProvider* property_provider, 45 GesturePropertyProvider* property_provider,
46 DeviceEventDispatcherEvdev* dispatcher); 46 DeviceEventDispatcherEvdev* dispatcher);
47 ~GestureInterpreterLibevdevCros() override; 47 ~GestureInterpreterLibevdevCros() override;
48 48
49 // Overriden from ui::EventReaderLibevdevCros::Delegate 49 // Overriden from ui::EventReaderLibevdevCros::Delegate
50 void OnLibEvdevCrosOpen(Evdev* evdev, EventStateRec* evstate) override; 50 void OnLibEvdevCrosOpen(Evdev* evdev, EventStateRec* evstate) override;
51 void OnLibEvdevCrosEvent(Evdev* evdev, 51 void OnLibEvdevCrosEvent(Evdev* evdev,
52 EventStateRec* evstate, 52 EventStateRec* evstate,
53 const timeval& time) override; 53 const timeval& time) override;
54 void OnLibEvdevCrosStopped(Evdev* evdev, EventStateRec* state) override;
54 void SetAllowedKeys( 55 void SetAllowedKeys(
55 scoped_ptr<std::set<DomCode>> allowed_keys) override; 56 scoped_ptr<std::set<DomCode>> allowed_keys) override;
56 void AllowAllKeys() override; 57 void AllowAllKeys() override;
57 58
58 // Handler for gesture events generated from libgestures. 59 // Handler for gesture events generated from libgestures.
59 void OnGestureReady(const Gesture* gesture); 60 void OnGestureReady(const Gesture* gesture);
60 61
61 // Accessors. 62 // Accessors.
62 int id() { return id_; } 63 int id() { return id_; }
63 GesturePropertyProvider* property_provider() { return property_provider_; } 64 GesturePropertyProvider* property_provider() { return property_provider_; }
64 Evdev* evdev() { return evdev_; } 65 Evdev* evdev() { return evdev_; }
65 66
66 private: 67 private:
67 void OnGestureMove(const Gesture* gesture, const GestureMove* move); 68 void OnGestureMove(const Gesture* gesture, const GestureMove* move);
68 void OnGestureScroll(const Gesture* gesture, const GestureScroll* move); 69 void OnGestureScroll(const Gesture* gesture, const GestureScroll* move);
69 void OnGestureButtonsChange(const Gesture* gesture, 70 void OnGestureButtonsChange(const Gesture* gesture,
70 const GestureButtonsChange* move); 71 const GestureButtonsChange* move);
71 void OnGestureContactInitiated(const Gesture* gesture); 72 void OnGestureContactInitiated(const Gesture* gesture);
72 void OnGestureFling(const Gesture* gesture, const GestureFling* fling); 73 void OnGestureFling(const Gesture* gesture, const GestureFling* fling);
73 void OnGestureSwipe(const Gesture* gesture, const GestureSwipe* swipe); 74 void OnGestureSwipe(const Gesture* gesture, const GestureSwipe* swipe);
74 void OnGestureSwipeLift(const Gesture* gesture, 75 void OnGestureSwipeLift(const Gesture* gesture,
75 const GestureSwipeLift* swipelift); 76 const GestureSwipeLift* swipelift);
76 void OnGesturePinch(const Gesture* gesture, const GesturePinch* pinch); 77 void OnGesturePinch(const Gesture* gesture, const GesturePinch* pinch);
77 void OnGestureMetrics(const Gesture* gesture, const GestureMetrics* metrics); 78 void OnGestureMetrics(const Gesture* gesture, const GestureMetrics* metrics);
78 79
79 void DispatchMouseButton(unsigned int modifier, 80 void DispatchMouseButton(unsigned int modifier,
80 bool down, 81 bool down,
81 stime_t time); 82 stime_t time);
82 void DispatchChangedKeys(Evdev* evdev, const timeval& time); 83 void DispatchChangedKeys(unsigned long* changed_keys, stime_t timestamp);
84 void ReleaseKeys();
83 85
84 // The unique device id. 86 // The unique device id.
85 int id_; 87 int id_;
86 88
87 // True if the device may be regarded as a mouse. This includes normal mice 89 // True if the device may be regarded as a mouse. This includes normal mice
88 // and multi-touch mice. 90 // and multi-touch mice.
89 bool is_mouse_; 91 bool is_mouse_;
90 92
91 // The evdev codes of the keys which should be processed. nullptr if all keys 93 // The evdev codes of the keys which should be processed. nullptr if all keys
92 // should be processed. 94 // should be processed.
(...skipping 19 matching lines...) Expand all
112 114
113 // Gesture lib device properties. 115 // Gesture lib device properties.
114 scoped_ptr<GestureDeviceProperties> device_properties_; 116 scoped_ptr<GestureDeviceProperties> device_properties_;
115 117
116 DISALLOW_COPY_AND_ASSIGN(GestureInterpreterLibevdevCros); 118 DISALLOW_COPY_AND_ASSIGN(GestureInterpreterLibevdevCros);
117 }; 119 };
118 120
119 } // namspace ui 121 } // namspace ui
120 122
121 #endif // UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_INTERPRETER_LIBEVDEV_C ROS_H_ 123 #endif // UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_INTERPRETER_LIBEVDEV_C ROS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698