| OLD | NEW |
| 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_PROPERTY_PROVIDER_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_PROPERTY_PROVIDER_H_ |
| 6 #define UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_PROPERTY_PROVIDER_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_PROPERTY_PROVIDER_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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 // Get the GesturesProp object. Returns NULL if not found. | 90 // Get the GesturesProp object. Returns NULL if not found. |
| 91 // | 91 // |
| 92 // The user may use the object returned to set/get the property value in the | 92 // The user may use the object returned to set/get the property value in the |
| 93 // gesture library's memory. Note that the values in preferences are not | 93 // gesture library's memory. Note that the values in preferences are not |
| 94 // synced with the ones here in realtime - they are only applied from the | 94 // synced with the ones here in realtime - they are only applied from the |
| 95 // preference side in a single way once appropriate (e.g., when the user | 95 // preference side in a single way once appropriate (e.g., when the user |
| 96 // clicked "OK"). | 96 // clicked "OK"). |
| 97 GesturesProp* GetProperty(const DeviceId device_id, const std::string& name); | 97 GesturesProp* GetProperty(const DeviceId device_id, const std::string& name); |
| 98 | 98 |
| 99 // Get the names of all properties of one device. Mostly used for the logging | |
| 100 // purpose. | |
| 101 std::vector<std::string> GetPropertyNamesById(const DeviceId device_id); | |
| 102 | |
| 103 // Get the (Evdev) device name. Mostly used for the logging purpose. | |
| 104 std::string GetDeviceNameById(const DeviceId device_id); | |
| 105 | |
| 106 private: | 99 private: |
| 107 friend class GesturesPropFunctionsWrapper; | 100 friend class GesturesPropFunctionsWrapper; |
| 108 | 101 |
| 109 // Mapping table from a device id to its device pointer. | 102 // Mapping table from a device id to its device pointer. |
| 110 typedef std::map<DeviceId, DevicePtr> DeviceMap; | 103 typedef std::map<DeviceId, DevicePtr> DeviceMap; |
| 111 | 104 |
| 112 // Mapping table from a device id to its property data. | 105 // Mapping table from a device id to its property data. |
| 113 // GestureDevicePropertyData contains both properties in use and default | 106 // GestureDevicePropertyData contains both properties in use and default |
| 114 // properties whose values will be applied upon the device attachment. | 107 // properties whose values will be applied upon the device attachment. |
| 115 typedef base::ScopedPtrHashMap<DeviceId, internal::GestureDevicePropertyData> | 108 typedef base::ScopedPtrHashMap<DeviceId, internal::GestureDevicePropertyData> |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 // Handler function pointers and the data to be passed to them when the | 324 // Handler function pointers and the data to be passed to them when the |
| 332 // property is accessed. | 325 // property is accessed. |
| 333 GesturesPropGetHandler get_; | 326 GesturesPropGetHandler get_; |
| 334 GesturesPropSetHandler set_; | 327 GesturesPropSetHandler set_; |
| 335 void* handler_data_; | 328 void* handler_data_; |
| 336 | 329 |
| 337 DISALLOW_COPY_AND_ASSIGN(GesturesProp); | 330 DISALLOW_COPY_AND_ASSIGN(GesturesProp); |
| 338 }; | 331 }; |
| 339 | 332 |
| 340 #endif // UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_PROPERTY_PROVIDER_H_ | 333 #endif // UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_PROPERTY_PROVIDER_H_ |
| OLD | NEW |