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

Side by Side Diff: ui/aura/event.h

Issue 10383249: touch: Make sure the correct radius values are used for touch events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
OLDNEW
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_AURA_EVENT_H_ 5 #ifndef UI_AURA_EVENT_H_
6 #define UI_AURA_EVENT_H_ 6 #define UI_AURA_EVENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 virtual int GetTouchId() const OVERRIDE; 215 virtual int GetTouchId() const OVERRIDE;
216 virtual int GetEventFlags() const OVERRIDE; 216 virtual int GetEventFlags() const OVERRIDE;
217 virtual base::TimeDelta GetTimestamp() const OVERRIDE; 217 virtual base::TimeDelta GetTimestamp() const OVERRIDE;
218 virtual TouchEvent* Copy() const OVERRIDE; 218 virtual TouchEvent* Copy() const OVERRIDE;
219 219
220 private: 220 private:
221 // The identity (typically finger) of the touch starting at 0 and incrementing 221 // The identity (typically finger) of the touch starting at 0 and incrementing
222 // for each separable additional touch that the hardware can detect. 222 // for each separable additional touch that the hardware can detect.
223 const int touch_id_; 223 const int touch_id_;
224 224
225 // Radius of the X (major) axis of the touch ellipse. 1.0 if unknown. 225 // Radius of the X (major) axis of the touch ellipse. 0.0 if unknown.
226 float radius_x_; 226 float radius_x_;
227 227
228 // Radius of the Y (minor) axis of the touch ellipse. 1.0 if unknown. 228 // Radius of the Y (minor) axis of the touch ellipse. 0.0 if unknown.
229 float radius_y_; 229 float radius_y_;
230 230
231 // Angle of the major axis away from the X axis. Default 0.0. 231 // Angle of the major axis away from the X axis. Default 0.0.
232 const float rotation_angle_; 232 const float rotation_angle_;
233 233
234 // Force (pressure) of the touch. Normalized to be [0, 1]. Default to be 0.0. 234 // Force (pressure) of the touch. Normalized to be [0, 1]. Default to be 0.0.
235 const float force_; 235 const float force_;
236 236
237 DISALLOW_COPY_AND_ASSIGN(TouchEvent); 237 DISALLOW_COPY_AND_ASSIGN(TouchEvent);
238 }; 238 };
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 // This value is stored as a bitfield because the number of touch ids varies, 387 // This value is stored as a bitfield because the number of touch ids varies,
388 // but we currently don't need more than 32 touches at a time. 388 // but we currently don't need more than 32 touches at a time.
389 const unsigned int touch_ids_bitfield_; 389 const unsigned int touch_ids_bitfield_;
390 390
391 DISALLOW_COPY_AND_ASSIGN(GestureEvent); 391 DISALLOW_COPY_AND_ASSIGN(GestureEvent);
392 }; 392 };
393 393
394 } // namespace aura 394 } // namespace aura
395 395
396 #endif // UI_AURA_EVENT_H_ 396 #endif // UI_AURA_EVENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698