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

Unified Diff: ui/events/ozone/evdev/event_device_util.h

Issue 641113004: ozone: evdev: Factor keyboard into KeyboardEvdev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/events/ozone/evdev/event_factory_evdev.h » ('j') | ui/events/ozone/evdev/keyboard_evdev.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/event_device_util.h
diff --git a/ui/events/ozone/evdev/event_device_util.h b/ui/events/ozone/evdev/event_device_util.h
index 2b65b3bb27c5090cca8470cabef561dd254d1bee..bdd8cca7a0b16f4d7196941593d00911e788da6b 100644
--- a/ui/events/ozone/evdev/event_device_util.h
+++ b/ui/events/ozone/evdev/event_device_util.h
@@ -16,6 +16,14 @@ static inline bool EvdevBitIsSet(const unsigned long* data, int bit) {
return data[bit / EVDEV_LONG_BITS] & (1UL << (bit % EVDEV_LONG_BITS));
}
+static inline void EvdevSetBit(unsigned long* data, int bit) {
+ data[bit / EVDEV_LONG_BITS] |= (1UL << (bit % EVDEV_LONG_BITS));
+}
+
+static inline void EvdevClearBit(unsigned long* data, int bit) {
+ data[bit / EVDEV_LONG_BITS] &= ~(1UL << (bit % EVDEV_LONG_BITS));
+}
+
} // namespace ui
#endif // UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_UTIL_H_
« no previous file with comments | « no previous file | ui/events/ozone/evdev/event_factory_evdev.h » ('j') | ui/events/ozone/evdev/keyboard_evdev.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698