| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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 REMOTING_CLIENT_IOS_CLIENT_GESTURES_H_ | 5 #ifndef REMOTING_CLIENT_IOS_CLIENT_GESTURES_H_ |
| 6 #define REMOTING_CLIENT_IOS_CLIENT_GESTURES_H_ | 6 #define REMOTING_CLIENT_IOS_CLIENT_GESTURES_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 #import <UIKit/UIKit.h> | 9 #import <UIKit/UIKit.h> |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #import "remoting/client/ios/key_input.h" | 11 #import "remoting/client/ios/key_input.h" |
| 12 | 12 |
| 13 @class RemotingClient; |
| 14 |
| 13 typedef NS_ENUM(NSInteger, HostInputScheme) { | 15 typedef NS_ENUM(NSInteger, HostInputScheme) { |
| 14 // Mouse cursor is shown | 16 // Mouse cursor is shown |
| 15 // Dragging or Panning, moves the mouse cursor | 17 // Dragging or Panning, moves the mouse cursor |
| 16 // Tapping causes mouse input at the cursor location | 18 // Tapping causes mouse input at the cursor location |
| 17 HostInputSchemeTrackpad = 0, // Default | 19 HostInputSchemeTrackpad = 0, // Default |
| 18 // Mouse cursor is not shown | 20 // Mouse cursor is not shown |
| 19 // Dragging or Panning is similar to a map | 21 // Dragging or Panning is similar to a map |
| 20 // Tapping causes mouse input at the tap location | 22 // Tapping causes mouse input at the tap location |
| 21 HostInputSchemeTouch = 1 | 23 HostInputSchemeTouch = 1 |
| 22 }; | 24 }; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 35 UILongPressGestureRecognizer* _longPressRecognizer; | 37 UILongPressGestureRecognizer* _longPressRecognizer; |
| 36 UIPanGestureRecognizer* _panRecognizer; | 38 UIPanGestureRecognizer* _panRecognizer; |
| 37 UIPanGestureRecognizer* _threeFingerPanRecognizer; | 39 UIPanGestureRecognizer* _threeFingerPanRecognizer; |
| 38 UIPinchGestureRecognizer* _pinchRecognizer; | 40 UIPinchGestureRecognizer* _pinchRecognizer; |
| 39 UITapGestureRecognizer* _singleTapRecognizer; | 41 UITapGestureRecognizer* _singleTapRecognizer; |
| 40 UITapGestureRecognizer* _twoFingerTapRecognizer; | 42 UITapGestureRecognizer* _twoFingerTapRecognizer; |
| 41 UITapGestureRecognizer* _threeFingerTapRecognizer; | 43 UITapGestureRecognizer* _threeFingerTapRecognizer; |
| 42 UIScreenEdgePanGestureRecognizer* _edgeGesture; | 44 UIScreenEdgePanGestureRecognizer* _edgeGesture; |
| 43 UISwipeGestureRecognizer* _swipeGesture; | 45 UISwipeGestureRecognizer* _swipeGesture; |
| 44 | 46 |
| 47 __weak UIView* _view; |
| 48 __weak RemotingClient* _client; |
| 49 |
| 45 HostInputScheme _inputScheme; | 50 HostInputScheme _inputScheme; |
| 46 } | 51 } |
| 47 | 52 |
| 48 - (instancetype)initWithView:(UIView*)view; | 53 - (instancetype)initWithView:(UIView*)view client:(RemotingClient*)client; |
| 49 | 54 |
| 50 // Zoom in/out | 55 // Zoom in/out |
| 51 - (IBAction)pinchGestureTriggered:(UIPinchGestureRecognizer*)sender; | 56 - (IBAction)pinchGestureTriggered:(UIPinchGestureRecognizer*)sender; |
| 52 // Left mouse click, moves cursor | 57 // Left mouse click, moves cursor |
| 53 - (IBAction)tapGestureTriggered:(UITapGestureRecognizer*)sender; | 58 - (IBAction)tapGestureTriggered:(UITapGestureRecognizer*)sender; |
| 54 // Scroll the view in 2d | 59 // Scroll the view in 2d |
| 55 - (IBAction)panGestureTriggered:(UIPanGestureRecognizer*)sender; | 60 - (IBAction)panGestureTriggered:(UIPanGestureRecognizer*)sender; |
| 56 // Right mouse click and drag, moves cursor | 61 // Right mouse click and drag, moves cursor |
| 57 - (IBAction)longPressGestureTriggered:(UILongPressGestureRecognizer*)sender; | 62 - (IBAction)longPressGestureTriggered:(UILongPressGestureRecognizer*)sender; |
| 58 // Right mouse click | 63 // Right mouse click |
| 59 - (IBAction)twoFingerTapGestureTriggered:(UITapGestureRecognizer*)sender; | 64 - (IBAction)twoFingerTapGestureTriggered:(UITapGestureRecognizer*)sender; |
| 60 // Middle mouse click | 65 // Middle mouse click |
| 61 - (IBAction)threeFingerTapGestureTriggered:(UITapGestureRecognizer*)sender; | 66 - (IBAction)threeFingerTapGestureTriggered:(UITapGestureRecognizer*)sender; |
| 62 // Show hidden menus. Swipe up for keyboard, swipe down for navigation menu | 67 // Show hidden menus. Swipe up for keyboard, swipe down for navigation menu |
| 63 - (IBAction)threeFingerPanGestureTriggered:(UIPanGestureRecognizer*)sender; | 68 - (IBAction)threeFingerPanGestureTriggered:(UIPanGestureRecognizer*)sender; |
| 64 | 69 |
| 65 @end | 70 @end |
| 66 | 71 |
| 67 #endif // REMOTING_CLIENT_IOS_CLIENT_GESTURES_H_ | 72 #endif // REMOTING_CLIENT_IOS_CLIENT_GESTURES_H_ |
| OLD | NEW |