Asian Application Developer's Guide

Architecture of XIM

This section describes how XIM works.

Figure 5-3 XIM Server Model

Graphic

XIM Protocol Interface

The current XIMP in Solaris software supports the following key event handling solutions:

Front-End IM Server Type1: XIMP_FE_TYPE1

All key events go through the IM server only when input conversion mode is ON to compose text.

The Conversion ON key is recognized in the IM library.

The Conversion OFF key is recognized in the IM server.

Figure 5-4 Event Flow in XIMP_FE_TYPE1

Graphic

Back-End IM Server Type2: XIMP_BE_TYPE2

All key events are sent first to the IM library and then to the IM server. The IM server is responsible for sending unused key events back to the IM library.

The Conversion ON/OFF key is recognized in IM server.

Figure 5-5 Event flow in XIMP_BE_TYPE2

Graphic

For XIMP_SYNC_BE_TYPE2, extra synchronization is done on XIMP_KEYPRESS.

IM Server

The IM server is implemented as a separate process. The Sun IM server, named htt, supports the following Asian locales:

For Korean or Chinese htt usage and options, refer to the htt(1) man pages and to the input methods chapter in the Asian Solaris user's guide appropriate to your product.

The IM server comprises the following functional components:

  1. XIMP

    XIMP is one of the most commonly used protocol interfaces between the IM server and the application side of the X library. Sun's implementation supports the latest version of XIMP, which is XIMP4.0.

  1. Event Handling

    Event-handling routines handle all key events coming to the IM server directly from the X server.

  1. Language Engine Interface

    htt communicates with language engines through its internal interface.

  1. Rendering

    Rendering routines support the lookup choice region, non-callback status style, and various preedit area styles:

    • Lookup Choice Region

      Support for lookup choice region

    • Status Area Style

      Support for status callbacks (XIMStatusCallbacks)

      Support for geometry management of status (XIMStatusArea)

      Support for root window status (XIMStatusNothing)

    • Preedit Style

      Support for "on-the-spot" style preedit area (XIMPreeditCallbacks)

      Support for "over-the-spot" style preedit area (XIMPreeditPosition)

      Support for "off-the-spot" style preedit area (XIMPreeditArea)

      Support for "root window" style preedit area (XIMPreeditNothing)