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

Side by Side Diff: ui/events/x/events_x.cc

Issue 2647253002: Add tangentialPressure and twist properties to PointerEvent on Windows (Closed)
Patch Set: rotation Created 3 years, 11 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
« ui/events/event.h ('K') | « ui/events/win/events_win.cc ('k') | no next file » | 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 #include "ui/events/event_utils.h" 5 #include "ui/events/event_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 #include <X11/extensions/XInput.h> 9 #include <X11/extensions/XInput.h>
10 #include <X11/extensions/XInput2.h> 10 #include <X11/extensions/XInput2.h>
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 return GetTouchAngleFromXEvent(*native_event); 157 return GetTouchAngleFromXEvent(*native_event);
158 } 158 }
159 159
160 PointerDetails GetTouchPointerDetailsFromNative( 160 PointerDetails GetTouchPointerDetailsFromNative(
161 const base::NativeEvent& native_event) { 161 const base::NativeEvent& native_event) {
162 return PointerDetails(EventPointerType::POINTER_TYPE_TOUCH, 162 return PointerDetails(EventPointerType::POINTER_TYPE_TOUCH,
163 GetTouchRadiusXFromXEvent(*native_event), 163 GetTouchRadiusXFromXEvent(*native_event),
164 GetTouchRadiusYFromXEvent(*native_event), 164 GetTouchRadiusYFromXEvent(*native_event),
165 GetTouchForceFromXEvent(*native_event), 165 GetTouchForceFromXEvent(*native_event),
166 /* tilt_x */ 0.f, 166 /* tilt_x */ 0.f,
167 /* tilt_y */ 0.f); 167 /* tilt_y */ 0.f,
168 /* tangentialPressure */ 0.0f,
169 /* twist */ 0);
168 } 170 }
169 171
170 bool GetScrollOffsets(const base::NativeEvent& native_event, 172 bool GetScrollOffsets(const base::NativeEvent& native_event,
171 float* x_offset, 173 float* x_offset,
172 float* y_offset, 174 float* y_offset,
173 float* x_offset_ordinal, 175 float* x_offset_ordinal,
174 float* y_offset_ordinal, 176 float* y_offset_ordinal,
175 int* finger_count, 177 int* finger_count,
176 EventMomentumPhase* momentum_phase) { 178 EventMomentumPhase* momentum_phase) {
177 return GetScrollOffsetsFromXEvent(*native_event, x_offset, y_offset, 179 return GetScrollOffsetsFromXEvent(*native_event, x_offset, y_offset,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 xievent->detail = 234 xievent->detail =
233 UpdateX11EventButton(event->changed_button_flags(), xievent->detail); 235 UpdateX11EventButton(event->changed_button_flags(), xievent->detail);
234 break; 236 break;
235 } 237 }
236 default: 238 default:
237 break; 239 break;
238 } 240 }
239 } 241 }
240 242
241 } // namespace ui 243 } // namespace ui
OLDNEW
« ui/events/event.h ('K') | « ui/events/win/events_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698