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 #ifndef UI_BASE_GESTURES_GESTURE_TYPES_H_ | 5 #ifndef UI_BASE_GESTURES_GESTURE_TYPES_H_ |
6 #define UI_BASE_GESTURES_GESTURE_TYPES_H_ | 6 #define UI_BASE_GESTURES_GESTURE_TYPES_H_ |
7 | 7 |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "ui/base/events.h" | 10 #include "ui/base/events.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 const bool ignores_events_; | 138 const bool ignores_events_; |
139 }; | 139 }; |
140 | 140 |
141 // GestureEventHelper creates implementation-specific gesture events and | 141 // GestureEventHelper creates implementation-specific gesture events and |
142 // can dispatch them. | 142 // can dispatch them. |
143 class UI_EXPORT GestureEventHelper { | 143 class UI_EXPORT GestureEventHelper { |
144 public: | 144 public: |
145 virtual ~GestureEventHelper() { | 145 virtual ~GestureEventHelper() { |
146 } | 146 } |
147 | 147 |
148 // |flags| is ui::EventFlags. The meaning of |param_first| and |param_second| | |
149 // depends on the specific gesture type (|type|). | |
150 virtual GestureEvent* CreateGestureEvent(const GestureEventDetails& details, | |
151 const gfx::Point& location, | |
152 int flags, | |
153 base::Time time, | |
154 unsigned int touch_id_bitfield) = 0; | |
155 | |
156 virtual TouchEvent* CreateTouchEvent(EventType type, | |
157 const gfx::Point& location, | |
158 int touch_id, | |
159 base::TimeDelta time_stamp) = 0; | |
160 | |
161 virtual bool DispatchLongPressGestureEvent(GestureEvent* event) = 0; | 148 virtual bool DispatchLongPressGestureEvent(GestureEvent* event) = 0; |
162 virtual bool DispatchCancelTouchEvent(TouchEvent* event) = 0; | 149 virtual bool DispatchCancelTouchEvent(TouchEvent* event) = 0; |
163 }; | 150 }; |
164 | 151 |
165 } // namespace ui | 152 } // namespace ui |
166 | 153 |
167 #endif // UI_BASE_GESTURES_GESTURE_TYPES_H_ | 154 #endif // UI_BASE_GESTURES_GESTURE_TYPES_H_ |
OLD | NEW |