| OLD | NEW |
| 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.h" | 5 #include "ui/events/event.h" |
| 6 | 6 |
| 7 #if defined(USE_X11) | 7 #if defined(USE_X11) |
| 8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
| 9 #include <X11/keysym.h> | 9 #include <X11/keysym.h> |
| 10 #include <X11/Xlib.h> | 10 #include <X11/Xlib.h> |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 location_ = p.AsPointF(); | 313 location_ = p.AsPointF(); |
| 314 root_location_ = location_; | 314 root_location_ = location_; |
| 315 } | 315 } |
| 316 | 316 |
| 317 //////////////////////////////////////////////////////////////////////////////// | 317 //////////////////////////////////////////////////////////////////////////////// |
| 318 // MouseEvent | 318 // MouseEvent |
| 319 | 319 |
| 320 MouseEvent::MouseEvent(const base::NativeEvent& native_event) | 320 MouseEvent::MouseEvent(const base::NativeEvent& native_event) |
| 321 : LocatedEvent(native_event), | 321 : LocatedEvent(native_event), |
| 322 changed_button_flags_(GetChangedMouseButtonFlagsFromNative(native_event)), | 322 changed_button_flags_(GetChangedMouseButtonFlagsFromNative(native_event)), |
| 323 pointer_details_(PointerDetails(EventPointerType::POINTER_TYPE_MOUSE)) { | 323 pointer_details_(GetMousePointerDetailsFromNative(native_event)) { |
| 324 if (type() == ET_MOUSE_PRESSED || type() == ET_MOUSE_RELEASED) | 324 if (type() == ET_MOUSE_PRESSED || type() == ET_MOUSE_RELEASED) |
| 325 SetClickCount(GetRepeatCount(*this)); | 325 SetClickCount(GetRepeatCount(*this)); |
| 326 } | 326 } |
| 327 | 327 |
| 328 MouseEvent::MouseEvent(EventType type, | 328 MouseEvent::MouseEvent(EventType type, |
| 329 const gfx::Point& location, | 329 const gfx::Point& location, |
| 330 const gfx::Point& root_location, | 330 const gfx::Point& root_location, |
| 331 base::TimeDelta time_stamp, | 331 base::TimeDelta time_stamp, |
| 332 int flags, | 332 int flags, |
| 333 int changed_button_flags) | 333 int changed_button_flags) |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 gfx::PointF(x, y), | 974 gfx::PointF(x, y), |
| 975 time_stamp, | 975 time_stamp, |
| 976 flags | EF_FROM_TOUCH), | 976 flags | EF_FROM_TOUCH), |
| 977 details_(details) { | 977 details_(details) { |
| 978 } | 978 } |
| 979 | 979 |
| 980 GestureEvent::~GestureEvent() { | 980 GestureEvent::~GestureEvent() { |
| 981 } | 981 } |
| 982 | 982 |
| 983 } // namespace ui | 983 } // namespace ui |
| OLD | NEW |