OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 VIEWS_TOUCHUI_TOUCH_FACTORY_H_ | 5 #ifndef UI_BASE_TOUCHUI_TOUCH_FACTORY_H_ |
6 #define VIEWS_TOUCHUI_TOUCH_FACTORY_H_ | 6 #define UI_BASE_TOUCHUI_TOUCH_FACTORY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <bitset> | 9 #include <bitset> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
13 #include "base/timer.h" | 13 #include "base/timer.h" |
14 #include "views/views_export.h" | 14 #include "ui/base/ui_export.h" |
15 | 15 |
16 typedef unsigned long Cursor; | 16 typedef unsigned long Cursor; |
17 typedef unsigned long Window; | 17 typedef unsigned long Window; |
18 typedef struct _XDisplay Display; | 18 typedef struct _XDisplay Display; |
19 typedef union _XEvent XEvent; | 19 typedef union _XEvent XEvent; |
20 | 20 |
21 namespace views { | 21 namespace ui { |
22 | 22 |
23 // Functions related to determining touch devices. | 23 // Functions related to determining touch devices. |
24 class VIEWS_EXPORT TouchFactory { | 24 class UI_EXPORT TouchFactory { |
25 public: | 25 public: |
26 // Define the touch params following the Multi-touch Protocol. | 26 // Define the touch params following the Multi-touch Protocol. |
27 enum TouchParam { | 27 enum TouchParam { |
28 TP_TOUCH_MAJOR = 0, // Length of the touch area. | 28 TP_TOUCH_MAJOR = 0, // Length of the touch area. |
29 TP_TOUCH_MINOR, // Width of the touch area. | 29 TP_TOUCH_MINOR, // Width of the touch area. |
30 TP_ORIENTATION, // Angle between the X-axis and the major axis of the | 30 TP_ORIENTATION, // Angle between the X-axis and the major axis of the |
31 // touch area. | 31 // touch area. |
32 TP_PRESSURE, // Pressure of the touch contact. | 32 TP_PRESSURE, // Pressure of the touch contact. |
33 | 33 |
34 // NOTE: A touch event can have multiple touch points. So when we receive a | 34 // NOTE: A touch event can have multiple touch points. So when we receive a |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 184 |
185 // Maximum simultaneous touch points. | 185 // Maximum simultaneous touch points. |
186 static const int kMaxTouchPoints = 32; | 186 static const int kMaxTouchPoints = 32; |
187 | 187 |
188 // A lookup table for slots in use for a touch event. | 188 // A lookup table for slots in use for a touch event. |
189 std::bitset<kMaxTouchPoints> slots_used_; | 189 std::bitset<kMaxTouchPoints> slots_used_; |
190 | 190 |
191 DISALLOW_COPY_AND_ASSIGN(TouchFactory); | 191 DISALLOW_COPY_AND_ASSIGN(TouchFactory); |
192 }; | 192 }; |
193 | 193 |
194 } // namespace views | 194 } // namespace ui |
195 | 195 |
196 #endif // VIEWS_TOUCHUI_TOUCH_FACTORY_H_ | 196 #endif // UI_BASE_TOUCHUI_TOUCH_FACTORY_H_ |
OLD | NEW |