Meego Input Method Architecture

Source: Internet
Author: User

The meego Input Method Framework is similar to the well-known scim Input Method Framework. If you do not know about scim, see the previous reprinting. meego input methods are mainly divided into front-end plug-ins, input method engines, and input method plug-ins, and the input method plug-in management service module, configuration module, process communication module.

The front-end plug-in of the input method implements the qinputcontext object. These objects are packaged in the qinputcontextplugin plug-in and placed in the/usr/lib/qt4/plugins/inpputmethods directory, when the program starts, it loads all the plug-ins in the directory. When the program uses the input method, it creates the specified qinputcontext object. The qinputcontext object does not perform any actual logical operations. It is loaded by applications as a lightweight module, intercepts user input events, and forwards events to the input method plug-in management service module through the D-bus mechanism.

Meego seems to have borrowed code from other systems. The plug-ins here actually do not allow third-party development plug-ins. meego only loads plug-ins written by itself and does not load other plug-ins. Therefore, the plug-ins here, is virtual.

The input method engine implements the mimenginewordinterface object, which mainly manages the dictionary, keyboard layout, and other information. The module is stored in the/usr/lib/meego-imengines/Drivers/directory, the Default Input Method of the meego system only implements the English input method. The input method engine is not implemented, even the/usr/lib/meego-imengines directory is not.

In meego, the input method is loaded and managed as a plug-in. The interface of the plug-in is minputmethodplugin, which includes the setting of the Input Method minputmethodsettingbase. The Directory of the Input Method plug-in is/usr/lib/meego-im-plugins. The plug-ins under this directory are loaded by the System Service. Therefore, if a new plug-in is added, the system must be restarted. This plug-in is a solid plug-in mechanism.

Input Method plug-in management service, which is a system service process named meego-im-uiserver. It loads, activates, and switches the input method plug-in when the system starts, and communicates with the process at the front-end of the input method, and forward the information to the currently activated plug-in.

The configuration management module is responsible for configuring input methods.

In the process communication module, meego uses the D-bus mechanism to communicate with the input method frontend and the input method plug-in Management Service. The D-bus can implement a two-way call mechanism similar to that of COM.

In QT, You can implement the qinputcontext class to complete the input method module of the program.

Qapplication: setinputcontext is used to set the pointer of the object to a program. The program enables the input method. meego claims to support QT. Is this class supported? Based on actual development, meego supports qinputcontext.

In QT, You can implement the qwsmethodinput class to complete the third-party input method module, and set the object pointer of this class to the system through qwsswever. The system enables the input method, meego claims to support QT. Is this class supported?

By looking at the SDK, we found that the meego SDK was blocked through the macro qt_no_qws_inputmethods, that is, meego does not support qwsmethodinput, so QT is supported only by a subset.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.