Architecture

him-arch.png

hildon-input-method-framework

This component defines the Hildon Input Method protocol, a set of messages that are exchanged between the client application and the hildon-input-method process via X Client Messages. This protocol is detailed in hildon-im-protocol.[hc]. The use of this messaging system makes the Hildon Input Method usable from any visual toolkit that can interact with X, such as Qt, but has the big drawback that each individual message is too small and therefore sending around big amounts of text is not efficient.

This component also provides the HildonIMContext, an implementation of GtkIMContext that can communicate with the hildon-input-method process using the aforementioned protocol. The HildonIMContext is the responsible of:

  • handling the different input modes (i.e. only numeric) and input states (i.e. Shift is locked)
  • updating the hildon-input-method process with the current state of the widget (i.e. a key was pressed)
  • providing the hildon-input-method process with on-request information (i.e. text surrounding the cursor)
  • applying commands sent by the hildon-input-method process to the widget (i.e. enter text that comes from a plugin)

hildon-input-method

This is the standalone process that provides the main functionality and holds the input plugins. In Maemo 5, the actual user interface has been completely removed, and it's up to each plugin to provide a graphical interface (or not).

There are several kinds of plugins:

  • Persistent plugins: plugins that are always loaded and enabled. They can be used to i.e. monitor the keyboard state.

  • Fullscreen plugins: used to implement virtual keyboards, like the ones in the examples.

  • Hidden plugins: plugins that don't have a graphical UI. They can be used to i.e. provide word suggestions using the preedit text in the client widget.

  • Special plugins: these plugins are linked to another one, and complement its functionality. For example, they can provide a means to enter less used characters.

Plugins are shared libraries in /usr/lib/hildon-input-methods. See Extending Hildon Input Methods (Maemo 4.1). (Update that link if a new version appears at some URL in future. Previous versions: Maemo 4.0)

The plugin API reference is not yet online.

hildon-input-method-plugins-example

The example plugins. This currently provides two examples of virtual keyboards.

svn co https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-input-method-plugins-example/

Attic/Hildon/HildonInputMethod/Architecture (last edited 2013-11-20 08:03:06 by WilliamJonMcCann)