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

Side by Side Diff: ui/base/events/event.h

Issue 10905163: aura-x11: Fix touch-calibration for multi-monitor setups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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/aura/root_window_host_linux.cc ('k') | ui/base/events/event.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) 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_EVENTS_EVENT_H_ 5 #ifndef UI_BASE_EVENTS_EVENT_H_
6 #define UI_BASE_EVENTS_EVENT_H_ 6 #define UI_BASE_EVENTS_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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 base::TimeDelta time_stamp); 395 base::TimeDelta time_stamp);
396 396
397 virtual ~TouchEvent(); 397 virtual ~TouchEvent();
398 398
399 int touch_id() const { return touch_id_; } 399 int touch_id() const { return touch_id_; }
400 float radius_x() const { return radius_x_; } 400 float radius_x() const { return radius_x_; }
401 float radius_y() const { return radius_y_; } 401 float radius_y() const { return radius_y_; }
402 float rotation_angle() const { return rotation_angle_; } 402 float rotation_angle() const { return rotation_angle_; }
403 float force() const { return force_; } 403 float force() const { return force_; }
404 404
405 // Calibrate the touch-point. This is useful when the touch-surface that
406 // generates the events need to be remapped to a surface of a different
407 // size. |from| is the size of the native surface, and |to| is the size
408 // of the target surface.
409 void CalibrateLocation(const gfx::Size& from, const gfx::Size& to);
410
405 // Used for unit tests. 411 // Used for unit tests.
406 void set_radius_x(const float r) { radius_x_ = r; } 412 void set_radius_x(const float r) { radius_x_ = r; }
407 void set_radius_y(const float r) { radius_y_ = r; } 413 void set_radius_y(const float r) { radius_y_ = r; }
408 414
409 // Overridden from LocatedEvent. 415 // Overridden from LocatedEvent.
410 virtual void UpdateForRootTransform(const Transform& root_transform) OVERRIDE; 416 virtual void UpdateForRootTransform(const Transform& root_transform) OVERRIDE;
411 417
412 protected: 418 protected:
413 void set_radius(float radius_x, float radius_y) { 419 void set_radius(float radius_x, float radius_y) {
414 radius_x_ = radius_x; 420 radius_x_ = radius_x;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 // This value is stored as a bitfield because the number of touch ids varies, 620 // This value is stored as a bitfield because the number of touch ids varies,
615 // but we currently don't need more than 32 touches at a time. 621 // but we currently don't need more than 32 touches at a time.
616 const unsigned int touch_ids_bitfield_; 622 const unsigned int touch_ids_bitfield_;
617 623
618 DISALLOW_COPY_AND_ASSIGN(GestureEvent); 624 DISALLOW_COPY_AND_ASSIGN(GestureEvent);
619 }; 625 };
620 626
621 } // namespace ui 627 } // namespace ui
622 628
623 #endif // UI_BASE_EVENTS_EVENT_H_ 629 #endif // UI_BASE_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « ui/aura/root_window_host_linux.cc ('k') | ui/base/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698