| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BASE_TOUCH_TOUCH_DEVICE_H_ | 5 #ifndef UI_BASE_TOUCH_TOUCH_DEVICE_H_ |
| 6 #define UI_BASE_TOUCH_TOUCH_DEVICE_H_ | 6 #define UI_BASE_TOUCH_TOUCH_DEVICE_H_ |
| 7 | 7 |
| 8 #include <tuple> | 8 #include <tuple> |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // Returns the maximum number of simultaneous touch contacts supported | 30 // Returns the maximum number of simultaneous touch contacts supported |
| 31 // by the device. In the case of devices with multiple digitizers (e.g. | 31 // by the device. In the case of devices with multiple digitizers (e.g. |
| 32 // multiple touchscreens), the value MUST be the maximum of the set of | 32 // multiple touchscreens), the value MUST be the maximum of the set of |
| 33 // maximum supported contacts by each individual digitizer. | 33 // maximum supported contacts by each individual digitizer. |
| 34 // For example, suppose a device has 3 touchscreens, which support 2, 5, | 34 // For example, suppose a device has 3 touchscreens, which support 2, 5, |
| 35 // and 10 simultaneous touch contacts, respectively. This returns 10. | 35 // and 10 simultaneous touch contacts, respectively. This returns 10. |
| 36 // http://www.w3.org/TR/pointerevents/#widl-Navigator-maxTouchPoints | 36 // http://www.w3.org/TR/pointerevents/#widl-Navigator-maxTouchPoints |
| 37 UI_BASE_EXPORT int MaxTouchPoints(); | 37 UI_BASE_EXPORT int MaxTouchPoints(); |
| 38 | 38 |
| 39 // Bit field values indicating available pointer types. Identical to | 39 // Bit field values indicating available pointer types. Identical to |
| 40 // blink::WebSettings::PointerType enums, enforced by compile-time assertions | 40 // blink::PointerType enums, enforced by compile-time assertions in |
| 41 // in content/public/common/web_preferences.cc . | 41 // content/public/common/web_preferences.cc . |
| 42 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.ui.base | 42 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.ui.base |
| 43 // GENERATED_JAVA_PREFIX_TO_STRIP: POINTER_TYPE_ | 43 // GENERATED_JAVA_PREFIX_TO_STRIP: POINTER_TYPE_ |
| 44 enum PointerType { | 44 enum PointerType { |
| 45 POINTER_TYPE_NONE = 1 << 0, | 45 POINTER_TYPE_NONE = 1 << 0, |
| 46 POINTER_TYPE_FIRST = POINTER_TYPE_NONE, | 46 POINTER_TYPE_FIRST = POINTER_TYPE_NONE, |
| 47 POINTER_TYPE_COARSE = 1 << 1, | 47 POINTER_TYPE_COARSE = 1 << 1, |
| 48 POINTER_TYPE_FINE = 1 << 2, | 48 POINTER_TYPE_FINE = 1 << 2, |
| 49 POINTER_TYPE_LAST = POINTER_TYPE_FINE | 49 POINTER_TYPE_LAST = POINTER_TYPE_FINE |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 // Bit field values indicating available hover types. Identical to | 52 // Bit field values indicating available hover types. Identical to |
| 53 // blink::WebSettings::HoverType enums, enforced by compile-time assertions | 53 // blink::HoverType enums, enforced by compile-time assertions in |
| 54 // in content/public/common/web_preferences.cc . | 54 // content/public/common/web_preferences.cc . |
| 55 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.ui.base | 55 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.ui.base |
| 56 // GENERATED_JAVA_PREFIX_TO_STRIP: HOVER_TYPE_ | 56 // GENERATED_JAVA_PREFIX_TO_STRIP: HOVER_TYPE_ |
| 57 enum HoverType { | 57 enum HoverType { |
| 58 HOVER_TYPE_NONE = 1 << 0, | 58 HOVER_TYPE_NONE = 1 << 0, |
| 59 HOVER_TYPE_FIRST = HOVER_TYPE_NONE, | 59 HOVER_TYPE_FIRST = HOVER_TYPE_NONE, |
| 60 HOVER_TYPE_ON_DEMAND = 1 << 1, | 60 HOVER_TYPE_HOVER = 1 << 1, |
| 61 HOVER_TYPE_HOVER = 1 << 2, | |
| 62 HOVER_TYPE_LAST = HOVER_TYPE_HOVER | 61 HOVER_TYPE_LAST = HOVER_TYPE_HOVER |
| 63 }; | 62 }; |
| 64 | 63 |
| 65 UI_BASE_EXPORT std::pair<int, int> GetAvailablePointerAndHoverTypes(); | 64 UI_BASE_EXPORT std::pair<int, int> GetAvailablePointerAndHoverTypes(); |
| 66 UI_BASE_EXPORT PointerType GetPrimaryPointerType(int available_pointer_types); | 65 UI_BASE_EXPORT PointerType GetPrimaryPointerType(int available_pointer_types); |
| 67 UI_BASE_EXPORT HoverType GetPrimaryHoverType(int available_hover_types); | 66 UI_BASE_EXPORT HoverType GetPrimaryHoverType(int available_hover_types); |
| 68 | 67 |
| 69 } // namespace ui | 68 } // namespace ui |
| 70 | 69 |
| 71 #endif // UI_BASE_TOUCH_TOUCH_DEVICE_H_ | 70 #endif // UI_BASE_TOUCH_TOUCH_DEVICE_H_ |
| OLD | NEW |