import type { NobjcObject } from "objc-js";
import type { _NSAccessibility } from "./NSAccessibility.js";
import type { _NSAppearance } from "./NSAppearance.js";
import type { _NSApplicationDelegate } from "./NSApplicationDelegate.js";
import type { _NSDockTile } from "./NSDockTile.js";
import type { _NSEvent } from "./NSEvent.js";
import type { _NSGraphicsContext } from "./NSGraphicsContext.js";
import type { _NSImage } from "./NSImage.js";
import type { _NSMenu } from "./NSMenu.js";
import type { _NSMenuItemValidation } from "./NSMenuItemValidation.js";
import type { _NSResponder } from "./NSResponder.js";
import type { _NSRunningApplication } from "./NSRunningApplication.js";
import type { _NSUserInterfaceItemSearching } from "./NSUserInterfaceItemSearching.js";
import type { _NSUserInterfaceValidations } from "./NSUserInterfaceValidations.js";
import type { _NSWindow } from "./NSWindow.js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSCoder } from "../Foundation/NSCoder.js";
import type { _NSDate } from "../Foundation/NSDate.js";
import type { _NSDictionary } from "../Foundation/NSDictionary.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSException } from "../Foundation/NSException.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { NSRange } from "../structs/NSRange.js";
import type { NSApplicationActivationPolicy } from "./NSApplicationActivationPolicy.js";
import type { NSApplicationDelegateReply } from "./NSApplicationDelegateReply.js";
import type { NSApplicationOcclusionState } from "./NSApplicationOcclusionState.js";
import type { NSApplicationPresentationOptions } from "./NSApplicationPresentationOptions.js";
import type { NSRemoteNotificationType } from "./NSRemoteNotificationType.js";
import type { NSRequestUserAttentionType } from "./NSRequestUserAttentionType.js";
import type { NSUserInterfaceLayoutDirection } from "./NSUserInterfaceLayoutDirection.js";
import type { NSWindowListOptions } from "./NSWindowListOptions.js";
export declare class _NSApplication extends _NSResponder {
    static alloc(): _NSApplication;
    static new(): _NSApplication;
    init(): _NSApplication;
    static detachDrawingThread$toTarget$withObject$(selector: string, target: NobjcObject, argument: NobjcObject | null): void;
    static sharedApplication(): _NSApplication;
    hide$(sender: NobjcObject | null): void;
    unhide$(sender: NobjcObject | null): void;
    unhideWithoutActivation(): void;
    windowWithWindowNumber$(windowNum: number): _NSWindow | null;
    /**
     * @deprecated This method will be deprecated in a future release. Use NSApp.activate instead.
     */
    deactivate(): void;
    /**
     * Makes the receiver the active app. - Parameter ignoreOtherApps: If `NO`, the app is activated only if no other app is currently active. If `YES`, the app activates regardless.
     * @deprecated This method will be deprecated in a future release. Use NSApp.activate instead.
     */
    activateIgnoringOtherApps$(ignoreOtherApps: boolean): void;
    /**
     * Makes the receiver the active app, if possible. You shouldn’t assume the app will be active immediately after sending this message. The framework also does not guarantee that the app will be activated at all. For cooperative activation, the other application should call `-yieldActivationToApplication:` or equivalent prior to the target application invoking `-activate`. Invoking `-activate` on an already-active application cancels any pending activation yields by the receiver.
     */
    activate(): void;
    /**
     * Explicitly allows another application to make itself active. Calling this method will not deactivate the current app, nor will it activate the other app. For cooperative or coordinated activation, the other app should request to be activated at some point in the future by calling `activate` or equivalent.
     */
    yieldActivationToApplication$(application: _NSRunningApplication): void;
    /**
     * Same as `-yieldActivationToApplication:`, but the provided bundle identifier does not have to correspond to a currently running application. This method should be used to yield activation to apps that may not be running at the time of invoking it. If it is known that the target application is currently running, use `-yieldActivationToApplication:` instead.
     */
    yieldActivationToApplicationWithBundleIdentifier$(bundleIdentifier: _NSString): void;
    hideOtherApplications$(sender: NobjcObject | null): void;
    unhideAllApplications$(sender: NobjcObject | null): void;
    finishLaunching(): void;
    run(): void;
    runModalForWindow$(window: _NSWindow): number;
    stop$(sender: NobjcObject | null): void;
    stopModal(): void;
    stopModalWithCode$(returnCode: number): void;
    abortModal(): void;
    beginModalSessionForWindow$(window: _NSWindow): NobjcObject;
    runModalSession$(session: NobjcObject): number;
    endModalSession$(session: NobjcObject): void;
    terminate$(sender: NobjcObject | null): void;
    /**
     * Inform the user that this application needs attention - call this method only if your application is not already active.
     */
    requestUserAttention$(requestType: NSRequestUserAttentionType): number;
    cancelUserAttentionRequest$(request: number): void;
    /**
     * Execute a block for each of the app's windows. Set `*stop = YES` if desired, to halt the enumeration early.
     */
    enumerateWindowsWithOptions$usingBlock$(options: NSWindowListOptions, block: (window: _NSWindow, stop: NobjcObject) => void): void;
    preventWindowOrdering(): void;
    setWindowsNeedUpdate$(needUpdate: boolean): void;
    updateWindows(): void;
    /** @return The activation policy of the application. */
    activationPolicy(): NSApplicationActivationPolicy;
    /**
     * Attempts to modify the application's activation policy. In OS X 10.9, any policy may be set; prior to 10.9, the activation policy may be changed to @c NSApplicationActivationPolicyProhibited or @c NSApplicationActivationPolicyRegular, but may not be changed to @c NSApplicationActivationPolicyAccessory. This returns @c YES if setting the activation policy is successful, and @c NO if not.
     */
    setActivationPolicy$(activationPolicy: NSApplicationActivationPolicy): boolean;
    reportException$(exception: _NSException): void;
    /**
     * If an application delegate returns NSTerminateLater from -applicationShouldTerminate:, -replyToApplicationShouldTerminate: must be called with YES or NO once the application decides if it can terminate.
     */
    replyToApplicationShouldTerminate$(shouldTerminate: boolean): void;
    /**
     * If an application delegate encounters an error while handling `-application:openFiles:` or` -application:printFiles:`, `-replyToOpenOrPrint:` should be called with @c NSApplicationDelegateReplyFailure. If the user cancels the operation, @c NSApplicationDelegateReplyCancel should be used, and if the operation succeeds, @c NSApplicationDelegateReplySuccess should be used .
     */
    replyToOpenOrPrint$(reply: NSApplicationDelegateReply): void;
    /** Opens the character palette. */
    orderFrontCharacterPalette$(sender: NobjcObject | null): void;
    sendEvent$(event: _NSEvent): void;
    postEvent$atStart$(event: _NSEvent, atStart: boolean): void;
    nextEventMatchingMask$untilDate$inMode$dequeue$(mask: NobjcObject, expiration: _NSDate | null, mode: _NSString, deqFlag: boolean): _NSEvent | null;
    discardEventsMatchingMask$beforeEvent$(mask: NobjcObject, lastEvent: _NSEvent | null): void;
    sendAction$to$from$(action: string, target: NobjcObject | null, sender: NobjcObject | null): boolean;
    targetForAction$(action: string): NobjcObject | null;
    targetForAction$to$from$(action: string, target: NobjcObject | null, sender: NobjcObject | null): NobjcObject | null;
    tryToPerform$with$(action: string, object_: NobjcObject | null): boolean;
    validRequestorForSendType$returnType$(sendType: _NSString | null, returnType: _NSString | null): NobjcObject | null;
    arrangeInFront$(sender: NobjcObject | null): void;
    removeWindowsItem$(win: _NSWindow): void;
    addWindowsItem$title$filename$(win: _NSWindow, string_: _NSString, isFilename: boolean): void;
    changeWindowsItem$title$filename$(win: _NSWindow, string_: _NSString, isFilename: boolean): void;
    updateWindowsItem$(win: _NSWindow): void;
    miniaturizeAll$(sender: NobjcObject | null): void;
    registerServicesMenuSendTypes$returnTypes$(sendTypes: _NSArray, returnTypes: _NSArray): void;
    orderFrontStandardAboutPanel$(sender: NobjcObject | null): void;
    orderFrontStandardAboutPanelWithOptions$(optionsDictionary: _NSDictionary): void;
    /**
     * Disable or reenable relaunching this app on login, if the app was running at the time the user logged out. These methods increment and decrement a counter respectively; if the counter is 0 at the time the user logs out, then the app may be relaunched when the user logs back in. The counter is initially zero, so by default apps are relaunched. If your app should not be relaunched because it launches via some other mechanism (e.g. launchd), then the recommended usage is to call `-[NSApp disableRelaunchOnLogin]` once, and never pair it with an -enable call. If your app should not be relaunched because it triggers a restart (e.g. an installer), then the recommended usage is to call `-[NSApp disableRelaunchOnLogin]` immediately before you attempt to trigger a restart, and `-[NSApp enableRelaunchOnLogin]` immediately after. This is because the user may cancel restarting; if the user later restarts for another reason, then your app should be brought back. These methods are thread safe.
     */
    disableRelaunchOnLogin(): void;
    enableRelaunchOnLogin(): void;
    registerForRemoteNotifications(): void;
    unregisterForRemoteNotifications(): void;
    /**
     * The following are soft deprecated. Please use the `-registerForRemoteNotifications` above and `-requestAuthorizationWithOptions:` from `UserNotifications.framework`.
     */
    registerForRemoteNotificationTypes$(types: NSRemoteNotificationType): void;
    /**
     * `-runModalForWindow:relativeToWindow:` was deprecated in Mac OS X 10.0. Please use `-[NSWindow beginSheet:completionHandler:]` instead.
     * @deprecated Use -[NSWindow beginSheet:completionHandler:] instead
     */
    runModalForWindow$relativeToWindow$(window: _NSWindow, docWindow: _NSWindow): number;
    /**
     * `-beginModalSessionForWindow:relativeToWindow:` was deprecated in Mac OS X 10.0. Please use `-[NSWindow beginSheet:completionHandler:]` instead.
     * @deprecated Use -[NSWindow beginSheet:completionHandler:] instead
     */
    beginModalSessionForWindow$relativeToWindow$(window: _NSWindow, docWindow: _NSWindow): NobjcObject;
    /**
     * `-application:printFiles:` was deprecated in Mac OS X 10.4. Implement `-application:printFiles:withSettings:showPrintPanels:` in your application delegate instead.
     * @deprecated
     */
    application$printFiles$(sender: _NSApplication, filenames: _NSArray): void;
    /**
     * `NSWindow`'s `-beginSheet:completionHandler:` and `-endSheet:returnCode:` should be used instead. `NSApplication`'s `-beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:` will continue to work as it previously did, leaking contextInfo and failing when there is already an existing sheet.
     * @deprecated Use -[NSWindow beginSheet:completionHandler:] instead
     */
    beginSheet$modalForWindow$modalDelegate$didEndSelector$contextInfo$(sheet: _NSWindow, docWindow: _NSWindow, modalDelegate: NobjcObject | null, didEndSelector: string | null, contextInfo: Uint8Array): void;
    /** @deprecated Use -[NSWindow endSheet:] instead */
    endSheet$(sheet: _NSWindow): void;
    /** @deprecated Use -[NSWindow endSheet:returnCode:] instead */
    endSheet$returnCode$(sheet: _NSWindow, returnCode: number): void;
    /** @deprecated Use -enumerateWindowsWithOptions:usingBlock: instead */
    makeWindowsPerform$inOrder$(selector: string, inOrder: boolean): _NSWindow | null;
    /**
     * Show or dismiss the customization palette for the currently displayed NSTouchBars. NSApplication validates this selector against whether the current NSTouchBars are customizable and, if configured on a menu item, will standardize and localize the title. If the current system does not have Touch Bar support, the menu item will be automatically hidden.
     */
    toggleTouchBarCustomizationPalette$(sender: NobjcObject | null): void;
    orderFrontColorPanel$(sender: NobjcObject | null): void;
    activateContextHelpMode$(sender: NobjcObject | null): void;
    /** Target method cover for [NSHelpManager setContextHelpModeActive:YES]; */
    showHelp$(sender: NobjcObject | null): void;
    /** An action method that merely invokes [[NSPageLayout pageLayout] runModal]. */
    runPageLayout$(sender: NobjcObject | null): void;
    /**
     * Register an an object that conforms to NSUserInterfaceItemSearching with the application. You can register as many as you like. If you register the same instance more than once the subsequent registrations are ignored
     */
    registerUserInterfaceItemSearchHandler$(handler: _NSUserInterfaceItemSearching): void;
    /**
     * Unregister an object that conforms to NSUserInterfaceItemSearching with the application. If you unregister the same instance more than once the subsequent registrations are ignored. Also, unregistering an instance that was never registered is a NOP.
     */
    unregisterUserInterfaceItemSearchHandler$(handler: _NSUserInterfaceItemSearching): void;
    /**
     * returns YES if searchString matches the supplied range of stringToBeSearched according to Spotlight for Help default matching rules if found range is non null then the matching range is returned in it
     */
    searchString$inUserInterfaceItemString$searchRange$foundRange$(searchString: _NSString, stringToSearch: _NSString, searchRange: NSRange, foundRange: NobjcObject | null): boolean;
    /**
     * The following message is the funnel point for all window restoration. The default behavior is to "demux:" decode the restoration class and send it the class method restoreWindowWithIdentifier:state:completionHandler: above. You should not call this method, but you may override it. Generally it is not necessary to override this method: it is better to set a restoration class on each window and implement the class method above. However, if some version of an app removes a class that is set as the restoration class of a window, you can override this method to detect that case and restore the window differently. Thus this method can be used to "patch up" old persistent state across changes in the class hierarchy. Unlike the class-level counterpart, this method returns BOOL. A YES return means that the window is recognized and that the completion handler will be called (or has already been called). A NO return means that the window was not recognized and the completion handler will not be called. If you override this and return YES, it is important that the completion handler be called, even if the window you pass to it is nil; otherwise the app will never finish restoring its state.
     */
    restoreWindowWithIdentifier$state$completionHandler$(identifier: _NSString, state: _NSCoder, completionHandler: ((arg0: _NSWindow, arg1: _NSError) => void) | null): boolean;
    /**
     * These methods allow the app to extend the period of state restoration. If the app crashes before state restoration is complete, then it may offer to discard restorable state on the next launch. If a window has some state that may take a long time to restore, such as a web page, you may use the following methods to extend the period of this crash protection beyond the default. Typically you would call -extendStateRestoration within your implementation of +restoreWindowWithIdentifier:state:completionHandler:. You would then call -completeStateRestoration some time after the window is fully restored (e.g. the web page has loaded). If the app crashes in the interim, then it may offer to discard restorable state on the next launch. These methods act as a counter. Each call to -extend increments the counter, and must be matched with a corresponding call to -complete which decrements it. When the counter reaches zero, the app is considered to have been fully restored, and any further calls are silently ignored. These methods are thread safe.
     */
    extendStateRestoration(): void;
    completeStateRestoration(): void;
    delegate(): _NSApplicationDelegate | null;
    setDelegate$(value: _NSApplicationDelegate | null): void;
    mainWindow(): _NSWindow | null;
    keyWindow(): _NSWindow | null;
    active(): boolean;
    hidden(): boolean;
    running(): boolean;
    /**
     * A boolean value indicating whether your application should suppress HDR content based on established policy. Built-in AppKit components such as NSImageView will automatically behave correctly with HDR content. You should use this value in conjunction with notifications (`NSApplicationShouldBeginSuppressingHighDynamicRangeContentNotification` and `NSApplicationShouldEndSuppressingHighDynamicRangeContentNotification`) to suppress HDR content in your application when signaled to do so.
     */
    applicationShouldSuppressHighDynamicRangeContent(): boolean;
    modalWindow(): _NSWindow | null;
    windows(): _NSArray;
    mainMenu(): _NSMenu | null;
    setMainMenu$(value: _NSMenu | null): void;
    /**
     * Set or get the Help menu for the app. If a non-nil menu is set as the Help menu, Spotlight for Help will be installed in it; otherwise AppKit will install Spotlight for Help into a menu of its choosing (and that menu is not returned from `-helpMenu`). If you wish to completely suppress Spotlight for Help, you can set a menu that does not appear in the menu bar. @c NSApplication retains its Help menu and releases it when a different menu is set.
     */
    helpMenu(): _NSMenu;
    setHelpMenu$(value: _NSMenu): void;
    applicationIconImage(): _NSImage;
    setApplicationIconImage$(value: _NSImage): void;
    dockTile(): _NSDockTile;
    /**
     * Gets or sets the @c presentationOptions that should be in effect for the system when this application is the active application. Only certain combinations of @c NSApplicationPresentationOptions flags are allowed, as detailed in the AppKit Release Notes and the reference documentation for `-setPresentationOptions:`. When given an invalid combination of option flags, `-setPresentationOptions:` raises an exception.
     */
    presentationOptions(): NSApplicationPresentationOptions;
    setPresentationOptions$(value: NSApplicationPresentationOptions): void;
    /**
     * @return The set of application presentation options that are currently in effect for the system. These are the presentation options that have been put into effect by the currently active application.
     */
    currentSystemPresentationOptions(): NSApplicationPresentationOptions;
    occlusionState(): NSApplicationOcclusionState;
    protectedDataAvailable(): boolean;
    appearance(): _NSAppearance;
    setAppearance$(value: _NSAppearance): void;
    effectiveAppearance(): _NSAppearance;
    currentEvent(): _NSEvent | null;
    windowsMenu(): _NSMenu | null;
    setWindowsMenu$(value: _NSMenu | null): void;
    /**
     * A Boolean value indicating whether keyboard navigation is enabled in System Settings > Keyboard. - Note: The value of this property is `YES` if keyboard navigation is enabled or `NO` if it’s not. You might use this value to implement your own key loop or to implement in-control tabbing behavior similar to `NSTableView`. Because of the nature of the preference storage, you won’t be notified of changes to this property if you attempt to observe it through key-value observing; however, accessing this property is fairly inexpensive, so you can access it directly rather than caching it. - Note: This property’s value isn’t necessarily reflective of the separate accessibility setting named “Full Keyboard Access” in System Settings > Accessibility > Keyboard.
     */
    fullKeyboardAccessEnabled(): boolean;
    servicesMenu(): _NSMenu | null;
    setServicesMenu$(value: _NSMenu | null): void;
    servicesProvider(): NobjcObject | null;
    setServicesProvider$(value: NobjcObject | null): void;
    /** Returns the application-wide user interface layout direction. */
    userInterfaceLayoutDirection(): NSUserInterfaceLayoutDirection;
    /**
     * @return @c YES if the application is currently registered for remote notifications, taking into account any systemwide settings; doesn't relate to connectivity.
     */
    registeredForRemoteNotifications(): boolean;
    enabledRemoteNotificationTypes(): NSRemoteNotificationType;
    /**
     * This method is deprecated as of macOS 10.12. Beginning in OS X 10.11 it would always return nil. Prior to this it would return an undefined graphics context that was not generally suitable for drawing.
     * @deprecated This method always returns nil. If you need access to the current drawing context, use [NSGraphicsContext currentContext] inside of a draw operation.
     */
    context(): _NSGraphicsContext;
    /**
     * Whether or not a menu item to customize the NSTouchBar can be automatically added to the main menu. It will only actually be added when Touch Bar hardware or simulator is present. Defaults to NO. Setting this property to YES is the recommended way to add the customization menu item. But if non-standard placement of the menu item is needed, creating a menu item with an action of `toggleTouchBarCustomizationPalette:` can be used instead.
     */
    automaticCustomizeTouchBarMenuItemEnabled(): boolean;
    setAutomaticCustomizeTouchBarMenuItemEnabled$(value: boolean): void;
    /**
     * A key value coding compliant get-accessor for the orderedDocuments to-many-relationship declared in Cocoa's definition of the Standard Suite. Return an array of currently open scriptable documents, in a predictable order that will be meaningful to script writers. NSApplication's implementation of this method returns pointers to all NSDocuments in the front-to-back order of each document's frontmost window. NSDocuments that have no associated windows are at the end of the array.
     */
    orderedDocuments(): _NSArray;
    /**
     * A key value coding compliant get-accessor for the orderedWindows to-many-relationship declared in Cocoa's definition of the Standard Suite. Return an array of currently open scriptable windows, including hidden windows, but typically not includings things like panels.
     */
    orderedWindows(): _NSArray;
}
export interface _NSApplication extends _NSUserInterfaceValidations, _NSMenuItemValidation, _NSAccessibility {
}
