import React, { FC } from "react"; import { Field, IDataHook, Observer } from "model-react"; import { KeyHandler } from "../keyHandler/KeyHandler"; import { AppletManager } from "./applets/AppletManager"; import { SessionManager } from "./LMSession/SessionManager"; import { SettingsManager } from "./settings/SettingsManager"; import { IApplet } from "./applets/_types/IApplet"; import { GlobalKeyHandler } from "../keyHandler/globalKeyHandler/GlobalKeyHandler"; import { IWindowFrameProps } from "./components/_types/IWindowFrameProps"; import { IApplicationConfig } from "../windowController/_types/IApplicationConfig"; /** * The main LM class */ export declare class LaunchMenu { protected devMode: Field; protected dataDirectory: string; protected settingsDirectory: string; view: JSX.Element; protected keyHandler: KeyHandler; protected globalKeyHandler: GlobalKeyHandler; protected appletManager: AppletManager; protected sessionManager: SessionManager; protected settingsManager: SettingsManager; protected appletObserver: Observer; protected windowVisible: Field; protected windowWrapper: Field>; /*** * Creates a new instance of the LaunchMenu application, * requires setup to be called before doing anything. * @param config The application configuration */ constructor(config: IApplicationConfig); /** * Disposes of all runtime data */ destroy(): void; /** * A method to initialize LaunchMenu */ setup(): Promise; /** * Initializes the theme */ protected setupTheme(): void; /** * Initializes the key handler for the application */ protected setupKeyHandler(): void; /** * Initializes the the view */ protected setupView(): void; /** * Initializes the applets manager */ protected setupApplets(): void; /** * Initializes the settings */ protected setupSettings(): void; /** * Initialized the global key handler */ protected setupGlobalKeyHandler(): void; /** * Changes whether LaunchMenu is running in dev-mode * @param enabled Whether in dev-mode */ setDevMode(enabled: boolean): void; /** * Retrieves whether LaunchMenu is running in dev-mode * @param hook The hook to subscribe to changes * @returns Whether dev mode is enabled */ isInDevMode(hook?: IDataHook): boolean; /** * Retrieves whether the LaunchMenu window is currently opened * @param hook The hook to subscribe to changes * @returns Whether the window should be opened */ isWindowOpen(hook?: IDataHook): boolean; /** * Sets whether the window should be opened * @param open Whether the window should be opened */ setWindowOpen(open: boolean): Promise; /** * Sets the frame component to wrap all LM sessions in * @param frame The component to use */ setWindowFrame(frame: FC): void; /** * Retrieves the currently used frame component * @param hook The hook to subscribe to changes * @returns The functional component to use as the window frame */ getWindowFrame(hook?: IDataHook): FC; /** * Fully restarts the LaunchMenu window */ restart(): void; /** * Fully shutdown LaunchMenu */ shutdown(): void; /** * Retrieves the key handler that listens for keyboard events and dispatches them * @returns The key handler */ getKeyHandler(): KeyHandler; /** * Retrieves the directory that all settings are stored in * @returns The settings directory path */ getSettingsDirectory(): string; /** * Retrieves the applet manager that loads all applets * @returns The applet manager */ getAppletManager(): AppletManager; /** * Retrieves the session manager that manages the opened sessions * @returns The session manager */ getSessionManager(): SessionManager; /** * Retrieves the settings manager that manages all applet and global settings * @returns The settings manager */ getSettingsManager(): SettingsManager; /** * Retrieves the global key handler that can be used to register keyboard callbacks even when LM is hidden * @returns The global keyboard handler */ getGlobalKeyHandler(): GlobalKeyHandler; } //# sourceMappingURL=LaunchMenu.d.ts.map