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

Side by Side Diff: ui/events/ozone/evdev/tablet_event_converter_evdev.h

Issue 1456063003: ozone: evdev: Fix tilt calculation for tablets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix some parens Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_EVENTS_OZONE_TABLET_EVENT_CONVERTER_EVDEV_H_ 5 #ifndef UI_EVENTS_OZONE_TABLET_EVENT_CONVERTER_EVDEV_H_
6 #define UI_EVENTS_OZONE_TABLET_EVENT_CONVERTER_EVDEV_H_ 6 #define UI_EVENTS_OZONE_TABLET_EVENT_CONVERTER_EVDEV_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/message_loop/message_pump_libevent.h" 9 #include "base/message_loop/message_pump_libevent.h"
10 #include "ui/events/event.h" 10 #include "ui/events/event.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // Dispatcher for events. 56 // Dispatcher for events.
57 DeviceEventDispatcherEvdev* dispatcher_; 57 DeviceEventDispatcherEvdev* dispatcher_;
58 58
59 int y_abs_location_ = 0; 59 int y_abs_location_ = 0;
60 int x_abs_location_ = 0; 60 int x_abs_location_ = 0;
61 int x_abs_min_; 61 int x_abs_min_;
62 int y_abs_min_; 62 int y_abs_min_;
63 int x_abs_range_; 63 int x_abs_range_;
64 int y_abs_range_; 64 int y_abs_range_;
65 65
66 int tilt_x_min_;
67 int tilt_x_range_;
68 int tilt_y_min_;
69 int tilt_y_range_;
70
66 float tilt_x_ = 0.0f; 71 float tilt_x_ = 0.0f;
67 float tilt_y_ = 0.0f; 72 float tilt_y_ = 0.0f;
68 float pressure_ = 0.0f; 73 float pressure_ = 0.0f;
69 int tilt_x_max_;
70 int tilt_y_max_;
71 int pressure_max_; 74 int pressure_max_;
72 75
73 // BTN_TOOL_ code for the active device 76 // BTN_TOOL_ code for the active device
74 int stylus_ = 0; 77 int stylus_ = 0;
75 78
76 // Whether we need to move the cursor 79 // Whether we need to move the cursor
77 bool abs_value_dirty_ = false; 80 bool abs_value_dirty_ = false;
78 81
79 // Set if we drop events in kernel (SYN_DROPPED) or in process. 82 // Set if we drop events in kernel (SYN_DROPPED) or in process.
80 bool dropped_events_ = false; 83 bool dropped_events_ = false;
81 84
82 DISALLOW_COPY_AND_ASSIGN(TabletEventConverterEvdev); 85 DISALLOW_COPY_AND_ASSIGN(TabletEventConverterEvdev);
83 }; 86 };
84 87
85 } // namespace ui 88 } // namespace ui
86 89
87 #endif // UI_EVENTS_OZONE_TABLET_EVENT_CONVERTER_EVDEV_H_ 90 #endif // UI_EVENTS_OZONE_TABLET_EVENT_CONVERTER_EVDEV_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698