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

Side by Side Diff: ui/events/ozone/evdev/event_device_info.h

Issue 797483002: ozone: evdev: Populate keyboard list on DeviceDataManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_EVENT_DEVICE_INFO_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_INFO_H_
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_INFO_H_ 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_INFO_H_
7 7
8 #include <limits.h> 8 #include <limits.h>
9 #include <linux/input.h> 9 #include <linux/input.h>
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 // Check input device properties. 59 // Check input device properties.
60 bool HasProp(unsigned int code) const; 60 bool HasProp(unsigned int code) const;
61 61
62 // Has absolute X & Y axes (excludes MT) 62 // Has absolute X & Y axes (excludes MT)
63 bool HasAbsXY() const; 63 bool HasAbsXY() const;
64 64
65 // Has MT absolute events 65 // Has MT absolute events
66 bool HasMTAbsXY() const; 66 bool HasMTAbsXY() const;
67 67
68 // Has relativeX & Y axes. 68 // Has relative X & Y axes.
69 bool HasRelXY() const; 69 bool HasRelXY() const;
70 70
71 // Determine whether absolute device X/Y coordinates are mapped onto the 71 // Determine whether absolute device X/Y coordinates are mapped onto the
72 // screen. This is the case for touchscreens and tablets but not touchpads. 72 // screen. This is the case for touchscreens and tablets but not touchpads.
73 bool IsMappedToScreen() const; 73 bool IsMappedToScreen() const;
74 74
75 // Determine whether there's a keyboard on this device.
76 bool HasKeyboard() const;
77
75 private: 78 private:
76 // Return the slot vector in |slot_values_| for |code|. 79 // Return the slot vector in |slot_values_| for |code|.
77 const std::vector<int32_t>& GetMtSlotsForCode(int code) const; 80 const std::vector<int32_t>& GetMtSlotsForCode(int code) const;
78 81
79 unsigned long ev_bits_[EVDEV_BITS_TO_LONGS(EV_CNT)]; 82 unsigned long ev_bits_[EVDEV_BITS_TO_LONGS(EV_CNT)];
80 unsigned long key_bits_[EVDEV_BITS_TO_LONGS(KEY_CNT)]; 83 unsigned long key_bits_[EVDEV_BITS_TO_LONGS(KEY_CNT)];
81 unsigned long rel_bits_[EVDEV_BITS_TO_LONGS(REL_CNT)]; 84 unsigned long rel_bits_[EVDEV_BITS_TO_LONGS(REL_CNT)];
82 unsigned long abs_bits_[EVDEV_BITS_TO_LONGS(ABS_CNT)]; 85 unsigned long abs_bits_[EVDEV_BITS_TO_LONGS(ABS_CNT)];
83 unsigned long msc_bits_[EVDEV_BITS_TO_LONGS(MSC_CNT)]; 86 unsigned long msc_bits_[EVDEV_BITS_TO_LONGS(MSC_CNT)];
84 unsigned long sw_bits_[EVDEV_BITS_TO_LONGS(SW_CNT)]; 87 unsigned long sw_bits_[EVDEV_BITS_TO_LONGS(SW_CNT)];
85 unsigned long led_bits_[EVDEV_BITS_TO_LONGS(LED_CNT)]; 88 unsigned long led_bits_[EVDEV_BITS_TO_LONGS(LED_CNT)];
86 unsigned long prop_bits_[EVDEV_BITS_TO_LONGS(INPUT_PROP_CNT)]; 89 unsigned long prop_bits_[EVDEV_BITS_TO_LONGS(INPUT_PROP_CNT)];
87 90
88 struct input_absinfo abs_info_[ABS_CNT]; 91 struct input_absinfo abs_info_[ABS_CNT];
89 92
90 // Store the values for the multi-touch properties for each slot. 93 // Store the values for the multi-touch properties for each slot.
91 std::vector<int32_t> slot_values_[EVDEV_ABS_MT_COUNT]; 94 std::vector<int32_t> slot_values_[EVDEV_ABS_MT_COUNT];
92 95
93 DISALLOW_COPY_AND_ASSIGN(EventDeviceInfo); 96 DISALLOW_COPY_AND_ASSIGN(EventDeviceInfo);
94 }; 97 };
95 98
96 } // namspace ui 99 } // namspace ui
97 100
98 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_INFO_H_ 101 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698