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_EVENT_H_ | 5 #ifndef UI_BASE_EVENT_H_ |
6 #define UI_BASE_EVENT_H_ | 6 #define UI_BASE_EVENT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/event_types.h" | 10 #include "base/event_types.h" |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 radius_x_ = radius_x; | 234 radius_x_ = radius_x; |
235 radius_y_ = radius_y; | 235 radius_y_ = radius_y; |
236 } | 236 } |
237 | 237 |
238 void set_rotation_angle(float rotation_angle) { | 238 void set_rotation_angle(float rotation_angle) { |
239 rotation_angle_ = rotation_angle; | 239 rotation_angle_ = rotation_angle; |
240 } | 240 } |
241 | 241 |
242 void set_force(float force) { force_ = force; } | 242 void set_force(float force) { force_ = force; } |
243 | 243 |
244 protected: | |
245 void set_radius(float radius_x, float radius_y) { | |
246 radius_x_ = radius_x; | |
247 radius_y_ = radius_y; | |
248 } | |
249 | |
250 void set_rotation_angle(float rotation_angle) { | |
251 rotation_angle_ = rotation_angle; | |
252 } | |
253 | |
254 void set_force(float force) { force_ = force; } | |
255 | |
256 private: | 244 private: |
257 // The identity (typically finger) of the touch starting at 0 and incrementing | 245 // The identity (typically finger) of the touch starting at 0 and incrementing |
258 // for each separable additional touch that the hardware can detect. | 246 // for each separable additional touch that the hardware can detect. |
259 const int touch_id_; | 247 const int touch_id_; |
260 | 248 |
261 // Radius of the X (major) axis of the touch ellipse. 0.0 if unknown. | 249 // Radius of the X (major) axis of the touch ellipse. 0.0 if unknown. |
262 float radius_x_; | 250 float radius_x_; |
263 | 251 |
264 // Radius of the Y (minor) axis of the touch ellipse. 0.0 if unknown. | 252 // Radius of the Y (minor) axis of the touch ellipse. 0.0 if unknown. |
265 float radius_y_; | 253 float radius_y_; |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 // This value is stored as a bitfield because the number of touch ids varies, | 411 // This value is stored as a bitfield because the number of touch ids varies, |
424 // but we currently don't need more than 32 touches at a time. | 412 // but we currently don't need more than 32 touches at a time. |
425 const unsigned int touch_ids_bitfield_; | 413 const unsigned int touch_ids_bitfield_; |
426 | 414 |
427 DISALLOW_COPY_AND_ASSIGN(GestureEventImpl); | 415 DISALLOW_COPY_AND_ASSIGN(GestureEventImpl); |
428 }; | 416 }; |
429 | 417 |
430 } // namespace ui | 418 } // namespace ui |
431 | 419 |
432 #endif // UI_BASE_EVENT_H_ | 420 #endif // UI_BASE_EVENT_H_ |
OLD | NEW |