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

Side by Side Diff: sky/engine/public/platform/WebInputEvent.h

Issue 823873004: Add basic PointerEvent support in NewEventHandler (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Actually add NewEventHandler Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 class WebPointerEvent : public WebInputEvent { 227 class WebPointerEvent : public WebInputEvent {
228 public: 228 public:
229 enum Kind { 229 enum Kind {
230 Touch, 230 Touch,
231 Mouse, 231 Mouse,
232 Stylus, 232 Stylus,
233 }; 233 };
234 234
235 int pointer = 0; 235 int pointer = 0;
236 Kind kind = Touch; 236 Kind kind = Touch;
237 double x = 0; 237 float x = 0;
238 double y = 0; 238 float y = 0;
239 double dx = 0; 239 float dx = 0;
240 double dy = 0; 240 float dy = 0;
241 int buttons = 0; 241 int buttons = 0;
242 double pressure = 0; 242 float pressure = 0;
243 double pressureMin = 0; 243 float pressureMin = 0;
244 double pressureMax = 0; 244 float pressureMax = 0;
245 double distance = 0; 245 float distance = 0;
246 double distanceMin = 0; 246 float distanceMin = 0;
247 double distanceMax = 0; 247 float distanceMax = 0;
248 double radiusMajor = 0; 248 float radiusMajor = 0;
249 double radiusMinor = 0; 249 float radiusMinor = 0;
250 double radiusMin = 0; 250 float radiusMin = 0;
251 double radiusMax = 0; 251 float radiusMax = 0;
252 double orientation = 0; 252 float orientation = 0;
253 double tilt = 0; 253 float tilt = 0;
esprehn 2015/01/20 18:14:33 Why do we not want double precision?
abarth-chromium 2015/01/20 18:26:54 My understanding is that |float| is more consisten
esprehn 2015/01/21 02:47:51 Float seems fine then.
254 254
255 WebPointerEvent() : WebInputEvent(sizeof(WebPointerEvent)) {} 255 WebPointerEvent() : WebInputEvent(sizeof(WebPointerEvent)) {}
256 }; 256 };
257 257
258 // WebKeyboardEvent ----------------------------------------------------------- 258 // WebKeyboardEvent -----------------------------------------------------------
259 259
260 class WebKeyboardEvent : public WebInputEvent { 260 class WebKeyboardEvent : public WebInputEvent {
261 public: 261 public:
262 // Caps on string lengths so we can make them static arrays and keep 262 // Caps on string lengths so we can make them static arrays and keep
263 // them PODs. 263 // them PODs.
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 , cancelable(true) 549 , cancelable(true)
550 { 550 {
551 } 551 }
552 }; 552 };
553 553
554 #pragma pack(pop) 554 #pragma pack(pop)
555 555
556 } // namespace blink 556 } // namespace blink
557 557
558 #endif // SKY_ENGINE_PUBLIC_PLATFORM_WEBINPUTEVENT_H_ 558 #endif // SKY_ENGINE_PUBLIC_PLATFORM_WEBINPUTEVENT_H_
OLDNEW
« sky/engine/core/frame/NewEventHandler.cpp ('K') | « sky/engine/core/frame/NewEventHandler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698