2014 snapchat source code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.4 KiB

  1. //
  2. // SCFeatureCoordinator.h
  3. // SCCamera
  4. //
  5. // Created by Kristian Bauer on 1/4/18.
  6. //
  7. #import "SCFeature.h"
  8. #import <SCBase/SCMacros.h>
  9. @protocol SCFeatureProvider;
  10. @class SCCameraOverlayView;
  11. /**
  12. * Handles creation of SCFeatures and communication between owner and features.
  13. */
  14. @interface SCFeatureCoordinator : NSObject
  15. SC_INIT_AND_NEW_UNAVAILABLE;
  16. - (instancetype)initWithFeatureContainerView:(SCCameraOverlayView *)containerView
  17. provider:(id<SCFeatureProvider>)provider;
  18. /**
  19. * Asks provider for features with given featureTypes specified in initializer.
  20. */
  21. - (void)reloadFeatures;
  22. /**
  23. * Eventually won't need this, but in order to use new framework w/ existing architecture, need a way to forward
  24. * gestures to individual features.
  25. */
  26. - (void)forwardCameraTimerGesture:(UIGestureRecognizer *)gestureRecognizer;
  27. - (void)forwardCameraOverlayTapGesture:(UIGestureRecognizer *)gestureRecognizer;
  28. - (void)forwardLongPressGesture:(UIGestureRecognizer *)gestureRecognizer;
  29. - (void)forwardPinchGesture:(UIPinchGestureRecognizer *)recognizer;
  30. - (void)forwardPanGesture:(UIPanGestureRecognizer *)recognizer;
  31. /**
  32. * To prevent gestures on AVCameraViewController from triggering at the same time as feature controls, need to provide a
  33. * way for features to indicate that they will block a touch with given point.
  34. */
  35. - (BOOL)shouldBlockTouchAtPoint:(CGPoint)point;
  36. @end