AkiraTagoh/IMSettings

From FedoraProject

Jump to: navigation, search

Contents

IMSettings

What's IMSettings?

IMSettings is a framework that delivers input method settings and applies changes immediately without needing to restart applications and the desktop.

Background

Input Method is used to input some dozens of characters that can't be represented with ASCII characters, with some framework, such as XIM and SCIM via GTK+/Qt immodule. particularly which to handle languages that is a bit complex to do the same thing with the keyboard layout. In the past, those frameworks has been applied through the environment variables, such as XMODIFIERS and GTK_IM_MODULE. and can't be influenced immediately and can't be without restarting the desktop because of its nature - it's being inherited from the parent process unless it's being brought up with the obvious thing from the terminal say. Also, there are no such framework to bring up the necessary process at the runtime - of course anyone could runs it manually though, it's totally out of focus on this project.

Features

Scope

IMSettings may helps when...

Process Overview

AkiraTagoh IMSettings IMSettings small.png [[[Image:AkiraTagoh_IMSettings_IMSettings.png]] full size]

Information files for Input Method

To make Input Methods available from IMSettings, every Input Methods that hopes so has to have the information file to let IMSettings know. it's usually put under /etc/X11/xinit/xinput.d/ in Fedora. those has to have .conf as suffix. otherwise im-info-daemon will just ignores them. however you shouldn't have .conf for XIM server say, because it basically just works for the specific locale only. and xim.conf will provide such information alternatively according to current locale.

Available Parameters

They are described as the shell environment variables like FOO=BAR.

AUXILIARY_PROGRAM:: An optional program that may want to bring up for Input Method. such as the panel and the toolbar.

AUXILIARY_ARGS:: A command line options for AUXILIARY_PROGRAM.

GTK_IM_MODULE:: GTK+ immodule name that want to use.

IMSETTINGS_IGNORE_ME:: A parameter to hide Input Method from the inventory. you however can still take an action against such Input Method.

LONG_DESC:: An optional long description to explain what this Input Method is.

PREFERENCE_PROGRAM:: An optional program that set up Input Method. IMSettings itself do nothing on this parameter. but other tools, such as im-chooser will take an action for that.

PREFERENCE_ARGS:: A command line options for PREFERENCE_PROGRAM.

QT_IM_MODULE:: Qt immodule name that want to use.

SHORT_DESC:: An optional short description to explain What this Input Method is. this variable is also used for the key to do something on IMSettings. e.g. to start/stop Input Method and get the information etc.

XIM:: This variable is used for XIM. actually it looks like XMODIFIERS=@IM=$XIM.

XIM_PROGRAM:: A XIM server be brought up to communicate through XIM protocol.

XIM_ARGS:: A command line options for XIM_PROGRAM.


D-Bus APIs

com.redhat.imsettings

Core interface for IMSettings. this interface could be supposed to be invoked from other applications. but other interface may not. This interface is to communicate im-settings-daemon.

a method to bring up the necessary processes for im_name input method with lang language if necessary. also send a request to change the settings for GTK+ say. if update_xinputrc is FALSE, .xinputrc won't be modified after invoking this method.

a method to stop the processes for im_name input method. it may be failed due to any reasons. it won't changes the settings completely then. in that case, you can give force option to do all the procedures anyway. if update_xinputrc is FALSE, .xinputrc won't be modified after invoking this method, otherwise it points to none.

com.redhat.imsettings.IMInfo

Information provider interface. This is to communicate im-info-daemon.

a method to get the input methods list that currently is available on the system. each items could be usually used as the key to do something through IMSettings for other methods.

a method to get various immodule name, including XIM. which one you want could be specified by type. currently IMSETTINGS_IMM_GTK for GTK+ immodule, IMSETTINGS_IMM_QT for Qt immodule and IMSETTINGS_IMM_XIM is supported.

a method to get the XIM server program and its command line options for im_name input method.

a method to get the preferences program and its command line options for im_name input method.

a method to get the auxiliary program and its command line options for im_name input method. this may be used to bring up the kind of toolbar etc.

a method to get a short description for im_name input method.

a method to get a long description for im_name input method.

a method to see if im_name input method is recommended for your system.

a method to see if im_name input method is brought up by default for your desktop session.

a method to see if im_name input method is XIM or not.

com.redhat.imsettings.GConf

XSETTINGS for GTK+ interface. this assumes that gnome-settings-daemon or similar XSETTINGS manager is running, which deals with XSETTINGS through GConf. Usually you don't need to invoke methods on this interface. This is to communicate gconf-im-settings-daemon.

a method to change the GTK+ immodule to im_name immodule.


Comments