Flutter Engine
The Flutter Engine
Instance Methods | List of all members
ForwardingGestureRecognizer Class Reference
Inheritance diagram for ForwardingGestureRecognizer:

Instance Methods

(instancetype) - initWithTarget:platformViewsController:
 
(void) - touchesBegan:withEvent: [implementation]
 
(void) - touchesMoved:withEvent: [implementation]
 
(void) - touchesEnded:withEvent: [implementation]
 
(void) - touchesCancelled:withEvent: [implementation]
 
(BOOL- gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer: [implementation]
 

Detailed Description

Definition at line 974 of file FlutterPlatformViews.mm.

Method Documentation

◆ gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:

- (BOOL) gestureRecognizer: (UIGestureRecognizer*)  gestureRecognizer
shouldRecognizeSimultaneouslyWithGestureRecognizer: (UIGestureRecognizer*)  otherGestureRecognizer 
implementation

Definition at line 1129 of file FlutterPlatformViews.mm.

1188 :(UIGestureRecognizer*)gestureRecognizer
1189 shouldRecognizeSimultaneouslyWithGestureRecognizer:
1190 (UIGestureRecognizer*)otherGestureRecognizer {
1191 return YES;
1192}

◆ initWithTarget:platformViewsController:

- (instancetype) initWithTarget: (id target
platformViewsController: (fml::WeakPtr<flutter::FlutterPlatformViewsController>)  platformViewsController 

Definition at line 1129 of file FlutterPlatformViews.mm.

1132 :(id)target
1133 platformViewsController:
1135 self = [super initWithTarget:target action:nil];
1136 if (self) {
1137 self.delegate = self;
1138 FML_DCHECK(platformViewsController.get() != nullptr);
1139 _platformViewsController = std::move(platformViewsController);
1141 }
1142 return self;
1143}
NSInteger _currentTouchPointersCount
T * get() const
Definition: weak_ptr.h:87
uint32_t * target
#define FML_DCHECK(condition)
Definition: logging.h:103
std::shared_ptr< flutter::FlutterPlatformViewsController > _platformViewsController
const uintptr_t id

◆ touchesBegan:withEvent:

- (void) touchesBegan: (NSSet*)  touches
withEvent: (UIEvent*)  event 
implementation

Definition at line 1129 of file FlutterPlatformViews.mm.

1145 :(NSSet*)touches withEvent:(UIEvent*)event {
1147 if (_currentTouchPointersCount == 0) {
1148 // At the start of each gesture sequence, we reset the `_flutterViewController`,
1149 // so that all the touch events in the same sequence are forwarded to the same
1150 // `_flutterViewController`.
1151 _flutterViewController.reset(_platformViewsController->getFlutterViewController());
1152 }
1153 [_flutterViewController.get() touchesBegan:touches withEvent:event];
1155}
fml::scoped_nsobject< UIViewController< FlutterViewResponder > > _flutterViewController
int count
Definition: FontMgrTest.cpp:50

◆ touchesCancelled:withEvent:

- (void) touchesCancelled: (NSSet*)  touches
withEvent: (UIEvent*)  event 
implementation

Definition at line 1129 of file FlutterPlatformViews.mm.

1174 :(NSSet*)touches withEvent:(UIEvent*)event {
1175 // In the event of platform view is removed, iOS generates a "stationary" change type instead of
1176 // "cancelled" change type.
1177 // Flutter needs all the cancelled touches to be "cancelled" change types in order to correctly
1178 // handle gesture sequence.
1179 // We always override the change type to "cancelled".
1180 [_flutterViewController.get() forceTouchesCancelled:touches];
1182 if (_currentTouchPointersCount == 0) {
1183 self.state = UIGestureRecognizerStateFailed;
1184 _flutterViewController.reset(nil);
1185 }
1186}

◆ touchesEnded:withEvent:

- (void) touchesEnded: (NSSet*)  touches
withEvent: (UIEvent*)  event 
implementation

Definition at line 1129 of file FlutterPlatformViews.mm.

1161 :(NSSet*)touches withEvent:(UIEvent*)event {
1162 [_flutterViewController.get() touchesEnded:touches withEvent:event];
1164 // Touches in one touch sequence are sent to the touchesEnded method separately if different
1165 // fingers stop touching the screen at different time. So one touchesEnded method triggering does
1166 // not necessarially mean the touch sequence has ended. We Only set the state to
1167 // UIGestureRecognizerStateFailed when all the touches in the current touch sequence is ended.
1168 if (_currentTouchPointersCount == 0) {
1169 self.state = UIGestureRecognizerStateFailed;
1170 _flutterViewController.reset(nil);
1171 }
1172}

◆ touchesMoved:withEvent:

- (void) touchesMoved: (NSSet*)  touches
withEvent: (UIEvent*)  event 
implementation

Definition at line 1129 of file FlutterPlatformViews.mm.

1157 :(NSSet*)touches withEvent:(UIEvent*)event {
1158 [_flutterViewController.get() touchesMoved:touches withEvent:event];
1159}

The documentation for this class was generated from the following file: