OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 REMOTING_CLIENT_GESTURE_INTERPRETER_H_ |
| 6 #define REMOTING_CLIENT_GESTURE_INTERPRETER_H_ |
| 7 |
| 8 #include "remoting/client/desktop_viewport.h" |
| 9 |
| 10 namespace remoting { |
| 11 |
| 12 // This is a class for interpreting a raw touch input into actions like moving |
| 13 // the viewport and injecting mouse clicks. |
| 14 class GestureInterpreter { |
| 15 public: |
| 16 GestureInterpreter( |
| 17 const DesktopViewport::TransformationCallback& on_transformation_changed); |
| 18 ~GestureInterpreter(); |
| 19 |
| 20 // Coordinates of the OpenGL view surface will be used. |
| 21 void Pinch(float pivot_x, float pivot_y, float scale); |
| 22 void Pan(float translation_x, float translation_y); |
| 23 void Tap(float x, float y); |
| 24 void LongPress(float x, float y); |
| 25 |
| 26 void OnSurfaceSizeChanged(int width, int height); |
| 27 void OnDesktopSizeChanged(int width, int height); |
| 28 |
| 29 private: |
| 30 DesktopViewport viewport_; |
| 31 |
| 32 // GestureInterpreter is neither copyable nor movable. |
| 33 GestureInterpreter(const GestureInterpreter&) = delete; |
| 34 GestureInterpreter& operator=(const GestureInterpreter&) = delete; |
| 35 }; |
| 36 |
| 37 } // namespace remoting |
| 38 #endif // REMOTING_CLIENT_GESTURE_INTERPRETER_H_ |
OLD | NEW |