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

Side by Side Diff: ui/events/android/motion_event_android.h

Issue 2860793003: Pass through tilt_x and tilt_y to blink (Closed)
Patch Set: Pass through tilt_x and tilt_y to blink Created 3 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
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_ANDROID_MOTION_EVENT_ANDROID_H_ 5 #ifndef UI_EVENTS_ANDROID_MOTION_EVENT_ANDROID_H_
6 #define UI_EVENTS_ANDROID_MOTION_EVENT_ANDROID_H_ 6 #define UI_EVENTS_ANDROID_MOTION_EVENT_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 22 matching lines...) Expand all
33 jfloat touch_minor_pixels, 33 jfloat touch_minor_pixels,
34 jfloat orientation_rad, 34 jfloat orientation_rad,
35 jfloat tilt_rad, 35 jfloat tilt_rad,
36 jint tool_type); 36 jint tool_type);
37 jint id; 37 jint id;
38 jfloat pos_x_pixels; 38 jfloat pos_x_pixels;
39 jfloat pos_y_pixels; 39 jfloat pos_y_pixels;
40 jfloat touch_major_pixels; 40 jfloat touch_major_pixels;
41 jfloat touch_minor_pixels; 41 jfloat touch_minor_pixels;
42 jfloat orientation_rad; 42 jfloat orientation_rad;
43 jfloat tilt_rad; 43 jfloat tilt_rad;
use mustaq_at_chromium.org 2017/05/15 19:46:53 Add a comment here: "Unlike the tilt angles in mot
44 jint tool_type; 44 jint tool_type;
45 }; 45 };
46 46
47 // Forcing the caller to provide all cached values upon construction 47 // Forcing the caller to provide all cached values upon construction
48 // eliminates the need to perform a JNI call to retrieve values individually. 48 // eliminates the need to perform a JNI call to retrieve values individually.
49 MotionEventAndroid(JNIEnv* env, 49 MotionEventAndroid(JNIEnv* env,
50 jobject event, 50 jobject event,
51 jfloat pix_to_dip, 51 jfloat pix_to_dip,
52 jfloat ticks_x, 52 jfloat ticks_x,
53 jfloat ticks_y, 53 jfloat ticks_y,
(...skipping 21 matching lines...) Expand all
75 size_t GetPointerCount() const override; 75 size_t GetPointerCount() const override;
76 int GetPointerId(size_t pointer_index) const override; 76 int GetPointerId(size_t pointer_index) const override;
77 float GetX(size_t pointer_index) const override; 77 float GetX(size_t pointer_index) const override;
78 float GetY(size_t pointer_index) const override; 78 float GetY(size_t pointer_index) const override;
79 float GetRawX(size_t pointer_index) const override; 79 float GetRawX(size_t pointer_index) const override;
80 float GetRawY(size_t pointer_index) const override; 80 float GetRawY(size_t pointer_index) const override;
81 float GetTouchMajor(size_t pointer_index) const override; 81 float GetTouchMajor(size_t pointer_index) const override;
82 float GetTouchMinor(size_t pointer_index) const override; 82 float GetTouchMinor(size_t pointer_index) const override;
83 float GetOrientation(size_t pointer_index) const override; 83 float GetOrientation(size_t pointer_index) const override;
84 float GetPressure(size_t pointer_index) const override; 84 float GetPressure(size_t pointer_index) const override;
85 float GetTilt(size_t pointer_index) const override; 85 float GetTiltX(size_t pointer_index) const override;
86 float GetTiltY(size_t pointer_index) const override;
86 base::TimeTicks GetEventTime() const override; 87 base::TimeTicks GetEventTime() const override;
87 size_t GetHistorySize() const override; 88 size_t GetHistorySize() const override;
88 base::TimeTicks GetHistoricalEventTime( 89 base::TimeTicks GetHistoricalEventTime(
89 size_t historical_index) const override; 90 size_t historical_index) const override;
90 float GetHistoricalTouchMajor(size_t pointer_index, 91 float GetHistoricalTouchMajor(size_t pointer_index,
91 size_t historical_index) const override; 92 size_t historical_index) const override;
92 float GetHistoricalX(size_t pointer_index, 93 float GetHistoricalX(size_t pointer_index,
93 size_t historical_index) const override; 94 size_t historical_index) const override;
94 float GetHistoricalY(size_t pointer_index, 95 float GetHistoricalY(size_t pointer_index,
95 size_t historical_index) const override; 96 size_t historical_index) const override;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 const int cached_button_state_; 142 const int cached_button_state_;
142 const int cached_flags_; 143 const int cached_flags_;
143 const gfx::Vector2dF cached_raw_position_offset_; 144 const gfx::Vector2dF cached_raw_position_offset_;
144 struct CachedPointer { 145 struct CachedPointer {
145 CachedPointer(); 146 CachedPointer();
146 int id; 147 int id;
147 gfx::PointF position; 148 gfx::PointF position;
148 float touch_major; 149 float touch_major;
149 float touch_minor; 150 float touch_minor;
150 float orientation; 151 float orientation;
151 float tilt; 152 float tilt_x;
153 float tilt_y;
152 ToolType tool_type; 154 ToolType tool_type;
153 } cached_pointers_[MAX_POINTERS_TO_CACHE]; 155 } cached_pointers_[MAX_POINTERS_TO_CACHE];
154 156
155 // A unique identifier for the Android motion event. 157 // A unique identifier for the Android motion event.
156 const uint32_t unique_event_id_; 158 const uint32_t unique_event_id_;
157 159
158 // Disallow copy/assign. 160 // Disallow copy/assign.
159 MotionEventAndroid(const MotionEventAndroid& e); // private ctor 161 MotionEventAndroid(const MotionEventAndroid& e); // private ctor
160 void operator=(const MotionEventAndroid&) = delete; 162 void operator=(const MotionEventAndroid&) = delete;
161 }; 163 };
162 164
163 } // namespace content 165 } // namespace content
164 166
165 #endif // UI_EVENTS_ANDROID_MOTION_EVENT_ANDROID_H_ 167 #endif // UI_EVENTS_ANDROID_MOTION_EVENT_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698