| OLD | NEW |
| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // Has relative X & 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. | 75 // Determine whether there's a keyboard on this device. |
| 76 bool HasKeyboard() const; | 76 bool HasKeyboard() const; |
| 77 | 77 |
| 78 // Determine whether there's a mouse on this device. |
| 79 bool HasMouse() const; |
| 80 |
| 78 // Determine whether there's a touchpad on this device. | 81 // Determine whether there's a touchpad on this device. |
| 79 bool HasTouchpad() const; | 82 bool HasTouchpad() const; |
| 80 | 83 |
| 81 private: | 84 private: |
| 82 // Return the slot vector in |slot_values_| for |code|. | 85 // Return the slot vector in |slot_values_| for |code|. |
| 83 const std::vector<int32_t>& GetMtSlotsForCode(int code) const; | 86 const std::vector<int32_t>& GetMtSlotsForCode(int code) const; |
| 84 | 87 |
| 85 unsigned long ev_bits_[EVDEV_BITS_TO_LONGS(EV_CNT)]; | 88 unsigned long ev_bits_[EVDEV_BITS_TO_LONGS(EV_CNT)]; |
| 86 unsigned long key_bits_[EVDEV_BITS_TO_LONGS(KEY_CNT)]; | 89 unsigned long key_bits_[EVDEV_BITS_TO_LONGS(KEY_CNT)]; |
| 87 unsigned long rel_bits_[EVDEV_BITS_TO_LONGS(REL_CNT)]; | 90 unsigned long rel_bits_[EVDEV_BITS_TO_LONGS(REL_CNT)]; |
| 88 unsigned long abs_bits_[EVDEV_BITS_TO_LONGS(ABS_CNT)]; | 91 unsigned long abs_bits_[EVDEV_BITS_TO_LONGS(ABS_CNT)]; |
| 89 unsigned long msc_bits_[EVDEV_BITS_TO_LONGS(MSC_CNT)]; | 92 unsigned long msc_bits_[EVDEV_BITS_TO_LONGS(MSC_CNT)]; |
| 90 unsigned long sw_bits_[EVDEV_BITS_TO_LONGS(SW_CNT)]; | 93 unsigned long sw_bits_[EVDEV_BITS_TO_LONGS(SW_CNT)]; |
| 91 unsigned long led_bits_[EVDEV_BITS_TO_LONGS(LED_CNT)]; | 94 unsigned long led_bits_[EVDEV_BITS_TO_LONGS(LED_CNT)]; |
| 92 unsigned long prop_bits_[EVDEV_BITS_TO_LONGS(INPUT_PROP_CNT)]; | 95 unsigned long prop_bits_[EVDEV_BITS_TO_LONGS(INPUT_PROP_CNT)]; |
| 93 | 96 |
| 94 struct input_absinfo abs_info_[ABS_CNT]; | 97 struct input_absinfo abs_info_[ABS_CNT]; |
| 95 | 98 |
| 96 // Store the values for the multi-touch properties for each slot. | 99 // Store the values for the multi-touch properties for each slot. |
| 97 std::vector<int32_t> slot_values_[EVDEV_ABS_MT_COUNT]; | 100 std::vector<int32_t> slot_values_[EVDEV_ABS_MT_COUNT]; |
| 98 | 101 |
| 99 DISALLOW_COPY_AND_ASSIGN(EventDeviceInfo); | 102 DISALLOW_COPY_AND_ASSIGN(EventDeviceInfo); |
| 100 }; | 103 }; |
| 101 | 104 |
| 102 } // namspace ui | 105 } // namspace ui |
| 103 | 106 |
| 104 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_INFO_H_ | 107 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_INFO_H_ |
| OLD | NEW |