import { ContinueActivityDetails, Details, RenderProcessGoneDetails } from "@todesktop/client-electron-types"; import { type Ref } from "../invoke.js"; import { type NamespaceEvents } from "../utils.js"; export declare type AppEvents = NamespaceEvents<{ "will-finish-launching": () => void; ready: (launchInfo: Record) => void; "window-all-closed": () => void; "before-quit": () => void; "will-quit": () => void; quit: () => void; "open-url": (url: string) => void; activate: (hasVisibleWindows: boolean) => void; "did-become-active": () => void; "continue-activity": (type: string, userInfo: unknown, details: ContinueActivityDetails) => void; "will-continue-activity": () => void; "continue-activity-error": (type: string, error: string) => void; "activity-was-continued": (type: string, userInfo: unknown) => void; "update-activity-state": (type: string, userInfo: unknown) => void; "new-window-for-tab": () => void; "browser-window-blur": (window: Ref) => void; "browser-window-focus": (window: Ref) => void; "browser-window-created": (window: Ref) => void; "web-contents-created": (webContents: Ref) => void; "gpu-info-update": () => void; "gpu-process-crashed": (killed: boolean) => void; "renderer-process-crashed": (webContents: Ref, killed: boolean) => void; "render-process-gone": (webContents: Ref, details: RenderProcessGoneDetails) => void; "child-process-gone": (details: Details) => void; "accessibility-support-changed": (accessibilitySupportEnabled: boolean) => void; "session-created": (session: Ref) => void; "second-instance": (argv: string[], workingDirectory: string, additionalData: unknown) => void; "desktop-capturer-get-sources": () => void; }>; /** * Subcribes to an event on the app object. * * @param eventName - The event name to subscribe to. * @param callback - The callback function to execute when the event occurs. * @param options - ref: Reference for the Tray. * @returns unsubscribe callback. * @public */ export declare const on: (eventName: E, callback: NamespaceEvents<{ "will-finish-launching": () => void; ready: (launchInfo: Record) => void; "window-all-closed": () => void; "before-quit": () => void; "will-quit": () => void; quit: () => void; "open-url": (url: string) => void; activate: (hasVisibleWindows: boolean) => void; "did-become-active": () => void; "continue-activity": (type: string, userInfo: unknown, details: ContinueActivityDetails) => void; "will-continue-activity": () => void; "continue-activity-error": (type: string, error: string) => void; "activity-was-continued": (type: string, userInfo: unknown) => void; "update-activity-state": (type: string, userInfo: unknown) => void; "new-window-for-tab": () => void; "browser-window-blur": (window: Ref) => void; "browser-window-focus": (window: Ref) => void; "browser-window-created": (window: Ref) => void; "web-contents-created": (webContents: Ref) => void; "gpu-info-update": () => void; "gpu-process-crashed": (killed: boolean) => void; "renderer-process-crashed": (webContents: Ref, killed: boolean) => void; "render-process-gone": (webContents: Ref, details: RenderProcessGoneDetails) => void; "child-process-gone": (details: Details) => void; "accessibility-support-changed": (accessibilitySupportEnabled: boolean) => void; "session-created": (session: Ref) => void; "second-instance": (argv: string[], workingDirectory: string, additionalData: unknown) => void; "desktop-capturer-get-sources": () => void; }>[E], args_0?: { ref?: import("@todesktop/client-util").InstanceRefObject; preventDefault?: boolean; }) => Promise<() => Promise>; /** * Unsubscribes all listeners from the event name. * * @param options - ref: Reference for the Tray; eventName: The event name to unsubscribe from; * @returns Reference for the tray. * @public */ export declare const removeAllListeners: (eventName: E, args_0?: { ref?: import("@todesktop/client-util").InstanceRefObject; }) => Promise;