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

Side by Side Diff: ui/base/touch/touch_factory.h

Issue 7942004: Consolidate/cleanup event cracking code; single out GdkEvents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge removal of compact nav. Created 9 years, 2 months 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 | Annotate | Revision Log
« no previous file with comments | « ui/base/touch/OWNERS ('k') | ui/base/touch/touch_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_TOUCH_TOUCH_FACTORY_H_
6 #define VIEWS_TOUCHUI_TOUCH_FACTORY_H_ 6 #define UI_BASE_TOUCH_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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // Maximum simultaneous touch points. 194 // Maximum simultaneous touch points.
195 static const int kMaxTouchPoints = 32; 195 static const int kMaxTouchPoints = 32;
196 196
197 // A lookup table for slots in use for a touch event. 197 // A lookup table for slots in use for a touch event.
198 std::bitset<kMaxTouchPoints> slots_used_; 198 std::bitset<kMaxTouchPoints> slots_used_;
199 #endif 199 #endif
200 200
201 DISALLOW_COPY_AND_ASSIGN(TouchFactory); 201 DISALLOW_COPY_AND_ASSIGN(TouchFactory);
202 }; 202 };
203 203
204 } // namespace views 204 } // namespace ui
205 205
206 #endif // VIEWS_TOUCHUI_TOUCH_FACTORY_H_ 206 #endif // UI_BASE_TOUCH_TOUCH_FACTORY_H_
OLDNEW
« no previous file with comments | « ui/base/touch/OWNERS ('k') | ui/base/touch/touch_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698