1 // Copyright 2015-present 650 Industries. All rights reserved. 2 3 #import <Foundation/Foundation.h> 4 5 #import "EXDevMenuDelegateProtocol.h" 6 #import "EXDevMenuGestureRecognizer.h" 7 8 @interface EXDevMenuManager : NSObject 9 10 @property (nullable, nonatomic, strong) id<EXDevMenuDelegateProtocol> delegate; 11 @property (readwrite, nonatomic, assign) BOOL interceptMotionGesture; 12 @property (readwrite, nonatomic, assign) BOOL interceptTouchGesture; 13 14 /** 15 * Returns singleton instance of the manager. 16 */ 17 + (nonnull instancetype)sharedInstance; 18 19 /** 20 * Returns the bridge to which the dev menu is hooked. 21 * TODO: (@tsapeta) It's gonna be removed once the dev menu moves to have its own bridge. 22 */ 23 - (nullable RCTBridge *)mainBridge; 24 25 /** 26 * Returns bool value whether the dev menu is visible. 27 */ 28 - (BOOL)isVisible; 29 30 /** 31 * Opens the dev menu. Returns `YES` if it succeeded or `NO` if the desired state is already set or its change has been rejected by the delegate. 32 */ 33 - (BOOL)open; 34 35 /** 36 * Closes the dev menu with the animation applied on the JS side. Returns `YES` if it succeeded or `NO` if the desired state is already set or its change has been rejected by the delegate. 37 */ 38 - (BOOL)close; 39 40 /** 41 * Toggles the visibility of the dev menu. Returns `YES` if it succeeded or `NO` if the desired state is already set or its change has been rejected by the delegate. 42 */ 43 - (BOOL)toggle; 44 45 /** 46 * Closes the dev menu but skips JS animation and doesn't return any value as it always succeeds - the delegate can't reject it. 47 */ 48 - (void)closeWithoutAnimation; 49 50 @end 51