OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef UI_EVENTS_TOUCH_TRANSFORMER_H_ | |
6 #define UI_EVENTS_TOUCH_TRANSFORMER_H_ | |
7 | |
8 #include "ui/events/events_base_export.h" | |
9 | |
10 namespace ui { | |
11 | |
12 // TouchTransformer is used to map touch events coordinate from screen space | |
13 // to root window space. | |
14 // When touch events are reported from kernel, its coordinate is in device | |
15 // space. After passing through X, its coordinate gets mapped to screen | |
16 // space, e.g. the framebuffer space that is the combination of multiple | |
17 // display outputs. | |
18 // In Chrome, we use TouchTransformer to remap the touch event's location from | |
19 // the screen space to the root window space. | |
20 class EVENTS_BASE_EXPORT TouchTransformer { | |
oshima
2014/05/01 09:35:42
does this have to be class? can be struct?
Yufeng Shen (Slow to review)
2014/05/01 22:43:48
Done.
| |
21 public: | |
22 TouchTransformer(); | |
23 | |
24 float x_scale; | |
25 float x_offset; | |
26 float y_scale; | |
27 float y_offset; | |
28 }; | |
29 | |
30 } // namespace ui | |
31 | |
32 #endif // UI_EVENTS_TOUCH_TRANSFORMER_H_ | |
OLD | NEW |