import type { NobjcObject } from "objc-js";
import type { _NSAttributedString } from "../Foundation/NSAttributedString.js";
import type { _NSDictionary } from "../Foundation/NSDictionary.js";
import type { _NSMutableDictionary } from "../Foundation/NSMutableDictionary.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _IMKMouseHandling } from "./IMKMouseHandling.js";
import type { _IMKServer } from "./IMKServer.js";
import type { _IMKStateSetting } from "./IMKStateSetting.js";
import type { _NSMenu } from "../AppKit/NSMenu.js";
import type { NSRange } from "../structs/NSRange.js";
export declare class _IMKInputController extends _NSObject {
    static alloc(): _IMKInputController;
    static new(): _IMKInputController;
    init(): _IMKInputController;
    /**
     * @method @abstract Initializes the controller class setting the delegate. The inputClient parameter is the client side object that will be sending messages to the controller via the IMKServer. The client object always conforms to the IMKTextInput protocol. Methods in the protocols that are implemented by the delegate object always include a client parameter. Methods in the IMKInputController class do not take a client. This is because the client is stored as an ivar in the IMKInputController.
     */
    initWithServer$delegate$client$(server: _IMKServer, delegate: NobjcObject, inputClient: NobjcObject): NobjcObject;
    /**
     * @method @abstract Called to inform the controller that the composition has changed. @discussion This method will call the protocol method composedString: to obtain the current composition. The current composition will be sent to the client by a call to the method setMarkedText:
     */
    updateComposition(): void;
    /**
     * @method @abstract Stops the current composition and replaces marked text with the original text. @discussion Calls the method originalString to obtain the original text and sends that to the client via a call to IMKInputSession protocol method insertText:
     */
    cancelComposition(): void;
    /**
     * @method @abstract Called to obtain a dictionary of text attributes. @discussion The default implementation returns an empty dictionary. You should override this method if your input method wants to provide font or glyphInformation. The returned object should be an autoreleased object.
     */
    compositionAttributesAtRange$(range: NSRange): _NSMutableDictionary;
    /**
     * @method @abstract Returns where the selection should be placed inside markedText. @discussion This method is called by updateComposition: to obtain the selection range for markedText. The default implementation sets the selection range at the end of the marked text.
     */
    selectionRange(): NSRange;
    /**
     * @method @abstract Returns the range in the client document that text should replace. @discussion This method is called by updateComposition to obtain the range in the client's document where markedText should be placed. The default implementation returns an NSRange whose location and length are NSNotFound. That indicates that the marked text should be placed at the current insertion point. Input methods that wish to insert marked text somewhere other than at the current insertion point should override this method. An example of an input method that might override this method would be one replaced words with synonyms. That input method would watch for certain words and when one of those words was seen it would be replaced by marked text that was a synonym of the word.
     */
    replacementRange(): NSRange;
    /**
     * @method @abstract Returns a dictionary of text attributes that can be used to mark a range of an attributed string that is going to be sent to a client. @discussion This utility function can be called by input methods to mark each range (i.e. clause ) of marked text. The style parameter should be one of the following values: kTSMHiliteSelectedRawText, kTSMHiliteConvertedText or kTSMHiliteSelectedConvertedText. See AERegistry.h for the definition of these values. The default implementation begins by calling compositionAttributesAtRange: to obtain extra attributes that an input method wants to include such as font or glyph information. Then the appropriate underline and underline color information is added to the attributes dictionary for the style parameter. Finally the style value is added as dictionary value. The key for the style value is NSMarkedClauseSegment. The returned object should be an autoreleased object.
     */
    markForStyle$atRange$(style: number, range: NSRange): _NSDictionary;
    /**
     * @method @abstract Called to pass commands that are not generated as part of the text input. @discussion The default implementation checks if the controller object (i.e. self) responds to the selector. If that is true the message performSelector:withObject is sent to the controller class. The object parameter in that case is the infoDictionary. This method is called when a user selects a command item from the text input menu. To support this an input method merely needs to provide actions for each menu item that will be placed in the menu. i.e. -(void)menuAction:(id)sender Note that the sender in this instance will be the infoDictionary. The dictionary contains two values: kIMKCommandMenuItemName NSMenuItem -- the NSMenuItem that was selected kIMKCommandClientName id<IMKTextInput, NSObject> - the current client
     */
    doCommandBySelector$commandDictionary$(aSelector: string, infoDictionary: _NSDictionary): void;
    /**
     * @method @abstract Called to inform an input method that any visible UI should be closed.
     */
    hidePalettes(): void;
    /**
     * @method @abstract Returns a menu of input method specific commands. @discussion This method is called whenever the menu needs to be drawn so that input methods can update the menu to reflect their current state. The returned NSMenu is an autoreleased object.
     */
    menu(): _NSMenu;
    /**
     * @method - (id)delegate; @abstract Returns the input controller's delegate object. The returned id is an autoreleased object.
     */
    delegate(): NobjcObject;
    /** @method @abstract Set the input controller's delegate object. */
    setDelegate$(newDelegate: NobjcObject): void;
    /**
     * @method @abstract Return the server object which is managing this input controller. The returned IMKServer is an autoreleased object.
     */
    server(): _IMKServer;
    /**
     * @method @abstract Returns this controller's client object. @discussion The client object will conform to the IMKTextInput protocol. The returned object is an autoreleased object.
     */
    client(): _NSObject;
    /**
     * @method @abstract Called to notify an input controller that it is about to be closed.
     */
    inputControllerWillClose(): void;
    /**
     * @method @abstract Called when a user has selected a annotation in a candidate window. @discussion When a candidate window is displayed and the user selects an annotation the selected annotation is sent to the input controller via this method. The currently selected candidateString is also sent to the input method.
     */
    annotationSelected$forCandidate$(annotationString: _NSAttributedString, candidateString: _NSAttributedString): void;
    /**
     * @method @abstract Informs an input controller that the current candidate selection in the candidate window has changed. @discussion The candidate parameter is the candidate string that the selection changed to. Note this method is called to indicate that the user is moving around in the candidate window. The candidate object is not a final selection.
     */
    candidateSelectionChanged$(candidateString: _NSAttributedString): void;
    /**
     * @method @abstract Called when a new candidate has been finally selected. @discussion The candidate parameter is the users final choice from the candidate window. The candidate window will have been closed before this method is called.
     */
    candidateSelected$(candidateString: _NSAttributedString): void;
}
export interface _IMKInputController extends _IMKStateSetting, _IMKMouseHandling {
}
