2018-04-18 17:23:57 +02:00
|
|
|
//
|
2019-01-08 17:47:40 +01:00
|
|
|
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
2018-04-18 17:23:57 +02:00
|
|
|
//
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
2019-01-31 15:53:27 +01:00
|
|
|
extern NSString *const OWSWindowManagerCallDidChangeNotification;
|
|
|
|
|
|
|
|
extern NSString *const IsScreenBlockActiveDidChangeNotification;
|
|
|
|
|
2018-04-18 17:23:57 +02:00
|
|
|
// This VC can become first responder
|
|
|
|
// when presented to ensure that the input accessory is updated.
|
|
|
|
@interface OWSWindowRootViewController : UIViewController
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
#pragma mark -
|
|
|
|
|
2018-07-17 21:40:54 +02:00
|
|
|
const CGFloat OWSWindowManagerCallBannerHeight(void);
|
2018-05-16 18:02:15 +02:00
|
|
|
|
2018-04-18 17:23:57 +02:00
|
|
|
extern const UIWindowLevel UIWindowLevel_Background;
|
|
|
|
|
2018-07-11 01:02:43 +02:00
|
|
|
@interface OWSWindowManager : NSObject
|
2018-04-18 17:23:57 +02:00
|
|
|
|
|
|
|
- (instancetype)init NS_UNAVAILABLE;
|
2018-10-12 22:39:40 +02:00
|
|
|
- (instancetype)initDefault NS_DESIGNATED_INITIALIZER;
|
2018-04-18 17:23:57 +02:00
|
|
|
|
|
|
|
+ (instancetype)sharedManager;
|
|
|
|
|
|
|
|
- (void)setupWithRootWindow:(UIWindow *)rootWindow screenBlockingWindow:(UIWindow *)screenBlockingWindow;
|
|
|
|
|
2018-10-25 19:02:30 +02:00
|
|
|
@property (nonatomic, readonly) UIWindow *rootWindow;
|
2019-01-08 17:47:40 +01:00
|
|
|
@property (nonatomic, readonly) UIWindow *menuActionsWindow;
|
2019-01-31 15:53:27 +01:00
|
|
|
@property (nonatomic) BOOL isScreenBlockActive;
|
2018-04-18 17:23:57 +02:00
|
|
|
|
2019-01-09 20:32:52 +01:00
|
|
|
- (BOOL)isAppWindow:(UIWindow *)window;
|
|
|
|
|
2018-07-10 23:34:22 +02:00
|
|
|
#pragma mark - Message Actions
|
|
|
|
|
2018-07-12 20:47:54 +02:00
|
|
|
@property (nonatomic, readonly) BOOL isPresentingMenuActions;
|
2018-07-11 01:02:43 +02:00
|
|
|
|
2018-07-12 20:47:54 +02:00
|
|
|
- (void)showMenuActionsWindow:(UIViewController *)menuActionsViewController;
|
|
|
|
- (void)hideMenuActionsWindow;
|
2018-07-10 23:34:22 +02:00
|
|
|
|
2018-04-18 17:23:57 +02:00
|
|
|
#pragma mark - Calls
|
|
|
|
|
2018-06-13 21:40:50 +02:00
|
|
|
@property (nonatomic, readonly) BOOL shouldShowCallView;
|
|
|
|
|
2018-04-18 17:23:57 +02:00
|
|
|
- (void)startCall:(UIViewController *)callViewController;
|
|
|
|
- (void)endCall:(UIViewController *)callViewController;
|
|
|
|
- (void)leaveCallView;
|
2018-04-18 18:09:42 +02:00
|
|
|
- (BOOL)hasCall;
|
2018-04-18 17:23:57 +02:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|