mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Clean up the window manager and its protocols
This commit is contained in:
committed by
Stefan Ceriu
parent
bb61db285b
commit
b7333b9b5f
@@ -29,13 +29,16 @@ protocol SecureWindowManagerProtocol: WindowManagerProtocol {
|
||||
|
||||
func handleRoute(_ appRoute: AppRoute, windowType: WindowManagerWindowType)
|
||||
|
||||
func windowForType(_ type: WindowManagerWindowType) -> AnyView
|
||||
|
||||
/// Shows the main and overlay window combo, hiding the alternate window.
|
||||
func switchToMain()
|
||||
|
||||
/// Shows the alternate window, hiding the main and overlay combo.
|
||||
func switchToAlternate()
|
||||
|
||||
// MARK: - Auxiliary window support
|
||||
|
||||
/// Used by the Application to retrieve the root view for an auxiliary window
|
||||
func windowForType(_ type: WindowManagerWindowType) -> AnyView
|
||||
}
|
||||
|
||||
/// A window manager that supports switching between a main app window with an overlay and
|
||||
@@ -54,15 +57,22 @@ protocol WindowManagerProtocol: AnyObject, OrientationManagerProtocol {
|
||||
/// All the windows being managed
|
||||
var windows: [UIWindow] { get }
|
||||
|
||||
func registerCoordinator(_ coordinator: CoordinatorProtocol, flowCoordinator: FlowCoordinatorProtocol?, forWindowType type: WindowManagerWindowType)
|
||||
|
||||
func closeAllAuxiliaryWindows()
|
||||
|
||||
/// Makes the global search window key. Used to get automatic text field focus.
|
||||
func showGlobalSearch()
|
||||
|
||||
func hideGlobalSearch()
|
||||
|
||||
// MARK: - Auxiliary window support
|
||||
|
||||
/// Register a coordinator and it's respective flow (if any) within the WindowManager which in turn
|
||||
/// invokes the Application's `OpenWindowAction`
|
||||
func registerCoordinator(_ coordinator: CoordinatorProtocol,
|
||||
flowCoordinator: FlowCoordinatorProtocol?,
|
||||
forWindowType type: WindowManagerWindowType)
|
||||
|
||||
/// Closes any window previously opened by registering a coordinator
|
||||
func closeAllAuxiliaryWindows()
|
||||
|
||||
/// Closes a previously opened window for the given type.
|
||||
func closeAuxiliaryWindow(forType type: WindowManagerWindowType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user