OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_AURA_GESTURES_GESTURE_RECOGNIZER_GRAIL_H_ |
| 6 #define UI_AURA_GESTURES_GESTURE_RECOGNIZER_GRAIL_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <map> |
| 10 #include <queue> |
| 11 #include <vector> |
| 12 |
| 13 #include "base/compiler_specific.h" |
| 14 #include "base/memory/linked_ptr.h" |
| 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "ui/aura/aura_export.h" |
| 17 #include "ui/aura/gestures/gesture_recognizer.h" |
| 18 #include "ui/base/events.h" |
| 19 |
| 20 namespace aura { |
| 21 class GestureEvent; |
| 22 class TouchEvent; |
| 23 class Window; |
| 24 |
| 25 // A GestureRecognizer is an abstract base class for |
| 26 // conversion of touch events into gestures. |
| 27 class AURA_EXPORT GestureRecognizerGrail : public GestureRecognizer { |
| 28 public: |
| 29 explicit GestureRecognizerGrail(RootWindow* window = NULL); |
| 30 |
| 31 // Invoked for each touch event that could contribute to |
| 32 // the current gesture. |
| 33 // Returns list of zero or more GestureEvents identified after processing |
| 34 // TouchEvent. |
| 35 // Caller would be responsible for freeing up Gestures. |
| 36 virtual GestureRecognizer::Gestures* |
| 37 ProcessTouchEventForGesture(const TouchEvent& event, |
| 38 ui::TouchStatus status) OVERRIDE; |
| 39 |
| 40 void QueueTouchEventForGesture(Window* window, |
| 41 const TouchEvent& event) OVERRIDE; |
| 42 |
| 43 void FlushTouchQueue(Window* window) OVERRIDE; |
| 44 |
| 45 Gestures* AdvanceTouchQueue(Window* window, bool processed) OVERRIDE; |
| 46 |
| 47 private: |
| 48 struct Private; |
| 49 scoped_ptr<Private> d_; |
| 50 |
| 51 DISALLOW_COPY_AND_ASSIGN(GestureRecognizerGrail); |
| 52 }; |
| 53 |
| 54 } // namespace aura |
| 55 |
| 56 #endif // UI_AURA_GESTURES_GESTURE_RECOGNIZER_GRAIL_H_ |
| 57 |
OLD | NEW |