Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 1142 of file FlutterPlatformViews.mm.

1201 :(UIGestureRecognizer*)gestureRecognizer
1202 shouldRecognizeSimultaneouslyWithGestureRecognizer:
1203 (UIGestureRecognizer*)otherGestureRecognizer {
1204 return YES;
1205}

◆ initWithTarget:platformViewsController:

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

Definition at line 1142 of file FlutterPlatformViews.mm.

1145 :(id)target
1146 platformViewsController:
1147 (fml::WeakPtr<flutter::FlutterPlatformViewsController>)platformViewsController {
1148 self = [super initWithTarget:target action:nil];
1149 if (self) {
1150 self.delegate = self;
1151 FML_DCHECK(platformViewsController.get() != nullptr);
1152 _platformViewsController = std::move(platformViewsController);
1154 }
1155 return self;
1156}
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
auto WeakPtr(std::shared_ptr< T > pointer)
const uintptr_t id

◆ touchesBegan:withEvent:

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

Definition at line 1142 of file FlutterPlatformViews.mm.

1158 :(NSSet*)touches withEvent:(UIEvent*)event {
1160 if (_currentTouchPointersCount == 0) {
1161 // At the start of each gesture sequence, we reset the `_flutterViewController`,
1162 // so that all the touch events in the same sequence are forwarded to the same
1163 // `_flutterViewController`.
1164 _flutterViewController.reset([_platformViewsController->getFlutterViewController() retain]);
1165 }
1166 [_flutterViewController.get() touchesBegan:touches withEvent:event];
1168}
fml::scoped_nsobject< UIViewController< FlutterViewResponder > > _flutterViewController
int count
void reset(NST *object=Traits::InvalidValue(), scoped_policy::OwnershipPolicy policy=scoped_policy::OwnershipPolicy::kAssume)
FlKeyEvent * event

◆ touchesCancelled:withEvent:

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

Definition at line 1142 of file FlutterPlatformViews.mm.

1187 :(NSSet*)touches withEvent:(UIEvent*)event {
1188 // In the event of platform view is removed, iOS generates a "stationary" change type instead of
1189 // "cancelled" change type.
1190 // Flutter needs all the cancelled touches to be "cancelled" change types in order to correctly
1191 // handle gesture sequence.
1192 // We always override the change type to "cancelled".
1193 [_flutterViewController.get() forceTouchesCancelled:touches];
1195 if (_currentTouchPointersCount == 0) {
1196 self.state = UIGestureRecognizerStateFailed;
1198 }
1199}
const myers::Point & get(const myers::Segment &)
GdkModifierType state

◆ touchesEnded:withEvent:

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

Definition at line 1142 of file FlutterPlatformViews.mm.

1174 :(NSSet*)touches withEvent:(UIEvent*)event {
1175 [_flutterViewController.get() touchesEnded:touches withEvent:event];
1177 // Touches in one touch sequence are sent to the touchesEnded method separately if different
1178 // fingers stop touching the screen at different time. So one touchesEnded method triggering does
1179 // not necessarially mean the touch sequence has ended. We Only set the state to
1180 // UIGestureRecognizerStateFailed when all the touches in the current touch sequence is ended.
1181 if (_currentTouchPointersCount == 0) {
1182 self.state = UIGestureRecognizerStateFailed;
1184 }
1185}

◆ touchesMoved:withEvent:

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

Definition at line 1142 of file FlutterPlatformViews.mm.

1170 :(NSSet*)touches withEvent:(UIEvent*)event {
1171 [_flutterViewController.get() touchesMoved:touches withEvent:event];
1172}

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