11.2 Overview of the X Input Method Architecture

The sections below present an overview of the concepts, datatypes, and functions used in R5 to support input methods. An understanding of material presented here will make the implementation details presented in later sections easier to follow.

11.2.1 Input Methods and Input Servers

An internationalized X application gets user text input by communicating with an input method. At application startup, the application is localized by opening the particular input method appropriate for the locale. Often, opening an input method causes Xlib to establish a connection to another process known as the “input manager” or “input server.” The input manager can provide input method service to multiple X clients that use the same locale. Sometimes an input manager will connect to a third process, the translation server, which performs dictionary lookup and translation from pre-edit text (often phonetic) to composed text (often ideographic). The details of input method architecture are of course implementation dependent. Simple input methods, for example, can be implemented directly in Xlib, without need of other processes. The default Xsi implementation shipped with the MIT distribution does just this for European compose methods that do not require any dictionary lookup or graphical feedback. Figure 11-1 diagrams several possible connections between a client and its input method.

Figure 11-1. Possible input method architectures

The XIM architecture ...

Get XLIB Programming Manual, Rel. 5, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.