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/Xlib.h> | 9 #include <X11/Xlib.h> |
10 #endif | 10 #endif |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 CASE_TYPE(ET_GESTURE_TAP_DOWN); | 60 CASE_TYPE(ET_GESTURE_TAP_DOWN); |
61 CASE_TYPE(ET_GESTURE_TAP_CANCEL); | 61 CASE_TYPE(ET_GESTURE_TAP_CANCEL); |
62 CASE_TYPE(ET_GESTURE_BEGIN); | 62 CASE_TYPE(ET_GESTURE_BEGIN); |
63 CASE_TYPE(ET_GESTURE_END); | 63 CASE_TYPE(ET_GESTURE_END); |
64 CASE_TYPE(ET_GESTURE_TWO_FINGER_TAP); | 64 CASE_TYPE(ET_GESTURE_TWO_FINGER_TAP); |
65 CASE_TYPE(ET_GESTURE_PINCH_BEGIN); | 65 CASE_TYPE(ET_GESTURE_PINCH_BEGIN); |
66 CASE_TYPE(ET_GESTURE_PINCH_END); | 66 CASE_TYPE(ET_GESTURE_PINCH_END); |
67 CASE_TYPE(ET_GESTURE_PINCH_UPDATE); | 67 CASE_TYPE(ET_GESTURE_PINCH_UPDATE); |
68 CASE_TYPE(ET_GESTURE_LONG_PRESS); | 68 CASE_TYPE(ET_GESTURE_LONG_PRESS); |
69 CASE_TYPE(ET_GESTURE_LONG_TAP); | 69 CASE_TYPE(ET_GESTURE_LONG_TAP); |
70 CASE_TYPE(ET_GESTURE_MULTIFINGER_SWIPE); | 70 CASE_TYPE(ET_GESTURE_SWIPE); |
71 CASE_TYPE(ET_GESTURE_TAP_UNCONFIRMED); | 71 CASE_TYPE(ET_GESTURE_TAP_UNCONFIRMED); |
72 CASE_TYPE(ET_GESTURE_DOUBLE_TAP); | 72 CASE_TYPE(ET_GESTURE_DOUBLE_TAP); |
73 CASE_TYPE(ET_SCROLL); | 73 CASE_TYPE(ET_SCROLL); |
74 CASE_TYPE(ET_SCROLL_FLING_START); | 74 CASE_TYPE(ET_SCROLL_FLING_START); |
75 CASE_TYPE(ET_SCROLL_FLING_CANCEL); | 75 CASE_TYPE(ET_SCROLL_FLING_CANCEL); |
76 CASE_TYPE(ET_CANCEL_MODE); | 76 CASE_TYPE(ET_CANCEL_MODE); |
77 CASE_TYPE(ET_UMA_DATA); | 77 CASE_TYPE(ET_UMA_DATA); |
78 case ui::ET_LAST: NOTREACHED(); return std::string(); | 78 case ui::ET_LAST: NOTREACHED(); return std::string(); |
79 // Don't include default, so that we get an error when new type is added. | 79 // Don't include default, so that we get an error when new type is added. |
80 } | 80 } |
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 int GestureEvent::GetLowestTouchId() const { | 688 int GestureEvent::GetLowestTouchId() const { |
689 if (touch_ids_bitfield_ == 0) | 689 if (touch_ids_bitfield_ == 0) |
690 return -1; | 690 return -1; |
691 int i = -1; | 691 int i = -1; |
692 // Find the index of the least significant 1 bit | 692 // Find the index of the least significant 1 bit |
693 while (!(1 << ++i & touch_ids_bitfield_)); | 693 while (!(1 << ++i & touch_ids_bitfield_)); |
694 return i; | 694 return i; |
695 } | 695 } |
696 | 696 |
697 } // namespace ui | 697 } // namespace ui |
OLD | NEW |