Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(489)

Side by Side Diff: remoting/ios/client_gestures.h

Issue 2904703003: [CRD iOS] Add support for three-finger gestures (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/ios/app/host_view_controller.mm ('k') | remoting/ios/client_gestures.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_IOS_CLIENT_GESTURES_H_ 5 #ifndef REMOTING_IOS_CLIENT_GESTURES_H_
6 #define REMOTING_IOS_CLIENT_GESTURES_H_ 6 #define REMOTING_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 10
11 @class HostViewController;
11 @class RemotingClient; 12 @class RemotingClient;
12 13
13 typedef NS_ENUM(NSInteger, HostInputScheme) { 14 typedef NS_ENUM(NSInteger, HostInputScheme) {
14 // Mouse cursor is shown 15 // Mouse cursor is shown
15 // Dragging or Panning, moves the mouse cursor 16 // Dragging or Panning, moves the mouse cursor
16 // Tapping causes mouse input at the cursor location 17 // Tapping causes mouse input at the cursor location
17 HostInputSchemeTrackpad = 0, // Default 18 HostInputSchemeTrackpad = 0, // Default
18 // Mouse cursor is not shown 19 // Mouse cursor is not shown
19 // Dragging or Panning is similar to a map 20 // Dragging or Panning is similar to a map
20 // Tapping causes mouse input at the tap location 21 // Tapping causes mouse input at the tap location
(...skipping 16 matching lines...) Expand all
37 UIPanGestureRecognizer* _threeFingerPanRecognizer; 38 UIPanGestureRecognizer* _threeFingerPanRecognizer;
38 UIPinchGestureRecognizer* _pinchRecognizer; 39 UIPinchGestureRecognizer* _pinchRecognizer;
39 UITapGestureRecognizer* _singleTapRecognizer; 40 UITapGestureRecognizer* _singleTapRecognizer;
40 UITapGestureRecognizer* _twoFingerTapRecognizer; 41 UITapGestureRecognizer* _twoFingerTapRecognizer;
41 UITapGestureRecognizer* _threeFingerTapRecognizer; 42 UITapGestureRecognizer* _threeFingerTapRecognizer;
42 UIScreenEdgePanGestureRecognizer* _edgeGesture; 43 UIScreenEdgePanGestureRecognizer* _edgeGesture;
43 UISwipeGestureRecognizer* _swipeGesture; 44 UISwipeGestureRecognizer* _swipeGesture;
44 45
45 __weak UIView* _view; 46 __weak UIView* _view;
46 __weak RemotingClient* _client; 47 __weak RemotingClient* _client;
48 __weak HostViewController* _controller;
47 49
48 HostInputScheme _inputScheme; 50 HostInputScheme _inputScheme;
49 } 51 }
50 52
51 - (instancetype)initWithView:(UIView*)view client:(RemotingClient*)client; 53 - (instancetype)initWithHostViewController:(HostViewController*)controller;
nicholss 2017/05/24 14:36:49 I don't think this is a good pattern in Obj-C, you
Yuwei 2017/05/24 19:52:09 Done.
52 54
53 // Zoom in/out 55 // Zoom in/out
54 - (IBAction)pinchGestureTriggered:(UIPinchGestureRecognizer*)sender; 56 - (IBAction)pinchGestureTriggered:(UIPinchGestureRecognizer*)sender;
55 // Left mouse click, moves cursor 57 // Left mouse click, moves cursor
56 - (IBAction)tapGestureTriggered:(UITapGestureRecognizer*)sender; 58 - (IBAction)tapGestureTriggered:(UITapGestureRecognizer*)sender;
57 // Scroll the view in 2d 59 // Scroll the view in 2d
58 - (IBAction)panGestureTriggered:(UIPanGestureRecognizer*)sender; 60 - (IBAction)panGestureTriggered:(UIPanGestureRecognizer*)sender;
59 // Handle one finger fling gesture 61 // Handle one finger fling gesture
60 - (IBAction)flingGestureTriggered:(UIPanGestureRecognizer*)sender; 62 - (IBAction)flingGestureTriggered:(UIPanGestureRecognizer*)sender;
61 // Handle two finger scroll gesture 63 // Handle two finger scroll gesture
62 - (IBAction)scrollGestureTriggered:(UIPanGestureRecognizer*)sender; 64 - (IBAction)scrollGestureTriggered:(UIPanGestureRecognizer*)sender;
63 // Right mouse click and drag, moves cursor 65 // Right mouse click and drag, moves cursor
64 - (IBAction)longPressGestureTriggered:(UILongPressGestureRecognizer*)sender; 66 - (IBAction)longPressGestureTriggered:(UILongPressGestureRecognizer*)sender;
65 // Right mouse click 67 // Right mouse click
66 - (IBAction)twoFingerTapGestureTriggered:(UITapGestureRecognizer*)sender; 68 - (IBAction)twoFingerTapGestureTriggered:(UITapGestureRecognizer*)sender;
67 // Middle mouse click 69 // Middle mouse click
68 - (IBAction)threeFingerTapGestureTriggered:(UITapGestureRecognizer*)sender; 70 - (IBAction)threeFingerTapGestureTriggered:(UITapGestureRecognizer*)sender;
69 // Show hidden menus. Swipe up for keyboard, swipe down for navigation menu 71 // Show hidden menus. Swipe up for keyboard, swipe down for navigation menu
70 - (IBAction)threeFingerPanGestureTriggered:(UIPanGestureRecognizer*)sender; 72 - (IBAction)threeFingerPanGestureTriggered:(UIPanGestureRecognizer*)sender;
71 73
72 @end 74 @end
73 75
74 #endif // REMOTING_IOS_CLIENT_GESTURES_H_ 76 #endif // REMOTING_IOS_CLIENT_GESTURES_H_
OLDNEW
« no previous file with comments | « remoting/ios/app/host_view_controller.mm ('k') | remoting/ios/client_gestures.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698