11.6 Input Context Attributes

The behavior of an input method for a particular stream of input is controlled by the attributes of the input context of that stream. There is an attribute, for example, that specifies the interaction style (which must be one of the styles supported by the IM), there are attributes that specify the pre-edit callbacks to be called by the input method when over-the-spot interaction is being used, and there are attributes that specify the foreground and background pixels and colormap for the IM to use when drawing in its Preedit area.

Some attributes are used for communication in the other direction. One is used by the input method to tell the client which types of X events it requires, and another is used by the input method to request a new size for its Preedit and Status areas. Most attributes may be freely modified, but note that some must be set when the IC is created, others must be set exactly once, and others still are read-only and must never be set.

The attributes are listed below. Most attributes provide default values, but recall that some must be specified, either when the IC is created or at some later time before it is used.

11.6.1 XNInputStyle

The XNInputStyle attribute specifies the interaction style to be used by the input method for this input context. It is of type XIMStyle. It must be one of the supported styles queried from the input method with XGetIMValues(). This attribute must be specified when the IC is created. It may be queried ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.