~ubuntu-branches/ubuntu/trusty/maliit-framework/trusty-proposed

« back to all changes in this revision

Viewing changes to doc/src/pluginsystem.dox

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2013-01-31 13:26:48 UTC
  • Revision ID: package-import@ubuntu.com-20130131132648-w1u9d2279tppxcft
Tags: upstream-0.94.1
ImportĀ upstreamĀ versionĀ 0.94.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*! \page pluginsystem Plugin System 
 
2
\section Overview Overview
 
3
This document describes the plugin system of MeeGo Input Method Framework. The system consists of:
 
4
- Plugin manager
 
5
- Input method connection
 
6
 
 
7
The whole system is running inside the input method server process.
 
8
 
 
9
\subsection PluginManager Plugin Manager
 
10
Plugin Manager is responsible to load the plugins and to activate them. It also activates a specific view of a plugin.
 
11
 
 
12
\sa MIMPluginManager
 
13
 
 
14
\subsection InputMethodConnection Input Method Connection
 
15
Input Method Connection as the name states, functions as the connector between input method server and the application. The connection handles the protocol and data transport between the two ends.
 
16
 
 
17
\sa MInputContextConnection
 
18
 
 
19
\section management Plugin Management
 
20
\subsection Handlers Handlers 
 
21
 
 
22
Handlers are components which handle the input method function. They are essentially plugins and activated by Plugin manager.
 
23
 
 
24
There are three types of handlers:
 
25
- On-screen handler, which is used with touchscreen
 
26
- Hardware keyboard handler, which is used with hardware keyboard (perhaps also external keyboard)
 
27
- Accessory handler, which is used with other means of input (eg. Bluetooth pens)
 
28
 
 
29
A single plugin could act as multiple handlers. 
 
30
 
 
31
A plugin has to expose it's handling capabilities so it can be listed in MSettings. User can set a plugin to be the default
 
32
plugin handling a specific handler by selecting it in MSettings.
 
33
 
 
34
When a handler is activated, the following will be carried out:
 
35
- Plugin Manager loads the plugin stated in the settings (see below) and passing the handler code
 
36
- Plugin Manager rewired the input method connection to the loaded plugin
 
37
- If plugin does not recognize or incapable to handle the handler code, the loading fails
 
38
- The plugin update it's UI reflecting the handler code
 
39
- Record the plugin name to settings
 
40
 
 
41
\subsection Settings Settings
 
42
\subsubsection SettingsHandler Handler 
 
43
Plugin Manager selects the active plugin based on the settings. GConf stores the settings of the plugin names which will be selected whenever the handler or language is changed or run in the first time. The settings hierarchy looks like this, where handler is either onscreen or hardware:
 
44
 
 
45
\code
 
46
/meegotouch/inputmethods/plugins/<HANDLER> = <PLUGIN-NAME>
 
47
\endcode
 
48
 
 
49
\subsection PluginMap Plugin Map
 
50
When input method server is started, Plugin Manager reads the available plugins in the system and collects the handler information from the plugins. It then generates an in-memory map to be used whenever the handler is changed. The map is refreshed whenever a new plugin is installed or removed.
 
51
 
 
52
Each handler will have a list of plugins in the map.
 
53
 
 
54
\subsection PluginChange Plugin Change
 
55
Plugin Manager subscribes to Context Framework events to change handler. E.g. when Plugin Manager receive a signal from context framework that a keyboard is attached or slided out the Hardware keyboard handler is activated.
 
56
 
 
57
Plugin Manager then tries to find the plugin from the Settings, and if it fails it tries to find it from the map. If Plugin Manager finds a name from Settings but the plugin is no longer exist it continues to find a new value from the map and clears the Settings for that particular handler.
 
58
 
 
59
Plugin change could also happen because of user's manual intervention. There are two places where user can change the plugin for a handler:
 
60
- MSettings: user can select a plugin as handler in the UI
 
61
- Swipe gesture in On-screen handler: On-screen handler plugin should change it's writing language when receiving swipe gesture. If there is no more language to switch, it should ask Plugin Manager to be replaced with another handler on the map. If there is none, the writing language switching cycles back.
 
62
 
 
63
*/