import type { NobjcObject } from "objc-js";
import type { _NSEvent } from "./NSEvent.js";
import type { _NSMenu } from "./NSMenu.js";
import type { _NSMenuItem } from "./NSMenuItem.js";
import type { _NSScreen } from "./NSScreen.js";
import type { CGRect } from "../structs/CGRect.js";
export interface _NSMenuDelegate {
    menuNeedsUpdate$?(menu: _NSMenu): void;
    numberOfItemsInMenu$?(menu: _NSMenu): number;
    menu$updateItem$atIndex$shouldCancel$?(menu: _NSMenu, item: _NSMenuItem, index: number, shouldCancel: boolean): boolean;
    /** implement either the first one or the next two to populate the menu */
    menuHasKeyEquivalent$forEvent$target$action$?(menu: _NSMenu, event: _NSEvent, target: NobjcObject | null, action: NobjcObject | null): boolean;
    /**
     * indicates that the menu is being opened (displayed) or closed (hidden). Do not modify the structure of the menu or the menu items from within these callbacks.
     */
    menuWillOpen$?(menu: _NSMenu): void;
    menuDidClose$?(menu: _NSMenu): void;
    /**
     * Indicates that menu is about to highlight item. Only one item per menu can be highlighted at a time. If item is nil, it means all items in the menu are about to be unhighlighted.
     */
    menu$willHighlightItem$?(menu: _NSMenu, item: _NSMenuItem | null): void;
    /**
     * Given a menu that is about to be opened on the given screen, return a rect, in screen coordinates, within which the menu will be positioned. If you return NSZeroRect, or if the delegate does not implement this method, the menu will be confined to the bounds appropriate for the given screen. The returned rect may not be honored in all cases, such as if it would force the menu to be too small.
     */
    confinementRectForMenu$onScreen$?(menu: _NSMenu, screen: _NSScreen | null): CGRect;
}
