| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AppKit.framework |
| Availability | Available in Mac OS X v10.6 and later. |
| Declared in | NSTextInputContext.h |
An NSTextInputContext object represents the Cocoa text input system. The text input system communicates primarily with the client of the activated input context via the NSTextInputClient protocol.
+ currentInputContext
client property
acceptsGlyphInfo property
allowedInputSourceLocales property
For more about Objective-C properties, see “Properties” in The Objective-C Programming Language.
A Boolean value that indicates whether the client handles NSGlyphInfoAttributeName or not.
@property BOOL acceptsGlyphInfo;
The default value is determined by examining the return value from sending a validAttributesForMarkedText message to the client at initialization.
NSTextInputContext.hThe set of keyboard input source locales allowed when this input context is active.
@property(copy) NSArray *allowedInputSourceLocales;
NSAllRomanInputSourcesLocaleIdentifier can be specified as a valid locale.
NSTextInputContext.hThe owner of this input context. (read-only)
@property(readonly) id <NSTextInputClient> client;
The client (owner) of the input context, typically an NSView instance, retains its NSTextInputContext instance. The NSTextInputContext instance doesn't retain its client.
NSTextInputContext.hThe array of keyboard text input source identifier strings available to the receiver. (read-only)
@property(readonly) NSArray *keyboardInputSources;
The Text Input Source Services API identifies text input sources with text input source identifier strings (for example, com.apple.inputmethod.Kotoeri.Japanese) supplied by the underlying text input sources framework. The ID corresponds to the kTISPropertyInputSourceID attribute.
For more information on the Text Input Source Services API, see Text Input Source Services Reference.
NSTextInputContext.hThe identifier string for the selected keyboard text input source.
@property(copy) NSString *selectedKeyboardInputSource;
NSTextInputContext.hReturns the current, activated, text input context object.
+ (NSTextInputContext *)currentInputContext;
NSTextInputContext.hReturns the display name for the given text input source identifier.
+ (NSString *)localizedNameForInputSource:(NSString *)inputSourceIdentifier;
The text input source identifier.
The localized display name for inputSourceIdentifier.
NSTextInputContext.hActivates the receiver.
- (void)activate;
You should not call this method directly; it is invoked by the system. It is provided as an override point for subclasses.
NSTextInputContext.hDeactivates the receiver.
- (void)deactivate;
You should not call this method directly; it is invoked by the system. It is provided as an override point for subclasses.
NSTextInputContext.hTells the Cocoa test input system to discard the current conversion session.
- (void)discardMarkedText;
The client should clear its marked range when sending this message.
NSTextInputContext.hTells the Cocoa text input system to handle mouse or key events.
- (BOOL)handleEvent:(NSEvent *)theEvent;
The event to handle.
YES if the system consumed the event; otherwise NO.
NSTextInputContext.hThe designated initializer
- (id)initWithClient:(id <NSTextInputClient>)theClient;
NSTextInputContext.hNotifies the Cocoa text input system that the position information previously queried via methods like firstRectForCharacterRange:actualRange: needs to be updated.
- (void)invalidateCharacterCoordinates;
NSTextInputContext.hPosted after the selected text input source changes.
NSTextInputContext.hLast updated: 2008-10-13