BInputServerMethod is a base class for input methods. These are instances of BInputServerMethod that act as an interface between the user and languages using character sets that can't be easily represented on standard keyboards, such as the Japanese input method that comes with BeOS.
Input methods generally handle B_KEY_DOWN messages in their Filter() function (see BInputServerFilter), keeping some sort of state around to translate these standard keyboard messages into new B_KEY_DOWN messages representing another character set. An input method can handle any input event, they're not limited to keyboard events.
- Note:
- Writing an input method is an involved process, even though the BInputMethod protocol is relatively simple. If you're working on an input method, please feel free to contact Be Developer Technical Support (devsupport@be.com) for additional information.
- See also:
- Messages from Input Methods
- To create a new input method, you must:
- create a subclass of BInputServerMethod
- implement the instantiate_input_method() C function to create an instance of your BInputServerMethod subclass
- compile the class and function as an add-on
- install the add-on in one of the input method directories
- At boot time (or whenever the Input Server is restarted; see "Dynamic Loading"), the Input Server loads the add-ons it finds in the input method directories. For each add-on it finds, the Server invokes instantiate_input_method() to get a pointer to the add-on's BInputServerMethod object. After constructing the object, the Server calls InitCheck() to give the add-on a chance to bail out if the constructor failed.
- The input server looks for input methods in the "input_server/methods" subdirectories of B_BEOS_ADDONS_DIRECTORY, B_COMMON_ADDONS_DIRECTORY, and B_USER_ADDONS_DIRECTORY.
- You can install your input devices in the latter two directories - i.e. those under B_COMMON_ADDONS_DIRECTORY, and B_USER_ADDONS_DIRECTORY.
- The B_BEOS_ADDONS_DIRECTORY is reserved for add-ons that are supplied by the BeOS.
Copyright 2005 by yellowTAB GmbH, Be Inc., Palm Source Inc. and their respective legal successors
All rights reserved.