| 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_constants.h" | 5 #include "ui/events/event_constants.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 #include <X11/extensions/XInput.h> | 8 #include <X11/extensions/XInput.h> |
| 9 #include <X11/extensions/XInput2.h> | 9 #include <X11/extensions/XInput2.h> |
| 10 #include <X11/XKBlib.h> | 10 #include <X11/XKBlib.h> |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 default: | 668 default: |
| 669 break; | 669 break; |
| 670 } | 670 } |
| 671 } | 671 } |
| 672 default: | 672 default: |
| 673 break; | 673 break; |
| 674 } | 674 } |
| 675 return 0; | 675 return 0; |
| 676 } | 676 } |
| 677 | 677 |
| 678 PointerDetails GetMousePointerDetailsFromNative( |
| 679 const base::NativeEvent& native_event) { |
| 680 return PointerDetails(EventPointerType::POINTER_TYPE_MOUSE); |
| 681 } |
| 682 |
| 678 gfx::Vector2d GetMouseWheelOffset(const base::NativeEvent& native_event) { | 683 gfx::Vector2d GetMouseWheelOffset(const base::NativeEvent& native_event) { |
| 679 float x_offset, y_offset; | 684 float x_offset, y_offset; |
| 680 if (GetScrollOffsets( | 685 if (GetScrollOffsets( |
| 681 native_event, &x_offset, &y_offset, NULL, NULL, NULL)) { | 686 native_event, &x_offset, &y_offset, NULL, NULL, NULL)) { |
| 682 return gfx::Vector2d(static_cast<int>(x_offset), | 687 return gfx::Vector2d(static_cast<int>(x_offset), |
| 683 static_cast<int>(y_offset)); | 688 static_cast<int>(y_offset)); |
| 684 } | 689 } |
| 685 | 690 |
| 686 int button = native_event->type == GenericEvent ? | 691 int button = native_event->type == GenericEvent ? |
| 687 EventButtonFromNative(native_event) : native_event->xbutton.button; | 692 EventButtonFromNative(native_event) : native_event->xbutton.button; |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 xievent->detail = | 880 xievent->detail = |
| 876 UpdateX11EventButton(event->changed_button_flags(), xievent->detail); | 881 UpdateX11EventButton(event->changed_button_flags(), xievent->detail); |
| 877 break; | 882 break; |
| 878 } | 883 } |
| 879 default: | 884 default: |
| 880 break; | 885 break; |
| 881 } | 886 } |
| 882 } | 887 } |
| 883 | 888 |
| 884 } // namespace ui | 889 } // namespace ui |
| OLD | NEW |