Adopted by | |
Framework | System/Library/Frameworks/InputMethodKit.framework |
Availability | Available in Mac OS X v10.5 and later. |
Declared in | IMKInputController.h |
The IMKStateSetting
protocol defines methods for setting or accessing values that indicate the state of an input method.
Activates the input method server.
- (void)activateServer:(id)sender
The object sending the activation message.
IMKInputController.h
Deactivates the input method server.
- (void)deactivateServer:(id)sender
The object sending the deactivation message.
IMKInputController.h
Returns the modes dictionary associated with the input method.
- (NSDictionary*)modes:(id)sender
The client object requesting the modes dictionary.
The modes dictionary associated with the input method. The dictionary should be an autoreleased object.
Typically a client object calls this method to to build the text input menu. By calling the input method rather than reading the modes from the Info.plist
file, the input method can dynamically modify the modes supported.
IMKInputController.h
Returns an unsigned integer that contains a union of event masks
- (NSUInteger)recognizedEvents:(id)sender
The client object requesting the supported events.
An unsigned integer that contains a union of event masks (See the NSEvent.h
header file.
A client calls this method to check whether an input method supports an event. The default implementation returns NSKeyDownMask
. If your input method handles only key down events, the Input Method Kit provides the default mouse handling. The default mouse-down handling behavior is as follows: If there is an active composition area and the user clicks in the text but outside of the composition area, the Input Method Kit sends your input method a commitComposition:
message. This happens only for input methods that return only the default value—NSKeyDownMask
.
IMKInputController.h
Set the value for the provided key.
- (void)setValue:(id)value forTag:(long)tag client:(id)sender
The value, specified as the appropriate object (such as NSNumber
), to set.
The key whose value you want to set.
The client setting the value.
IMKInputController.h
Displays a preferences window.
- (void)showPreferences:(id)sender
The object sending the message to show the preference window.
This method looks for a nib file that contains a window controller class and a preferences utility. If found, it displays the window. To use this method you must create a menu item in your input method menu whose action is showPreferences:
. When a user selects that item, the Input Method Kit invokes your showPreferences:
method. The default implementation looks for a nib file named preferences.nib
. If found, it allocates a window controller class loads the nib file. You can provide a custom window controller class by naming the class in your input method info.plist
file, providing a key-value pair. The key must be InputMethodServerPreferencesWindowControllerClass
and the associated value must be the name of your custom class.
IMKInputController.h
Returns a value object whose key is the provided tag.
- (id)valueForTag:(long)tag client:(id)sender
The key whose value you want to retrieve.
The client requesting the value.
The value object. The returned object should be autoreleased.
IMKInputController.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-06-05)