A. Common Extensions
Extension opcodes and packet names (e.g.
XIM_EXT_SET_EVENT_MASK
) for additional extensions may be registered with X Consortium.
The following is a commonly well-known extended packet.
(1) Extension to manipulate the event handling\fP
XIM_EXT_SET_EVENT_MASK
message specifies the set of event masks that the IM library should manipulate.
XIM_EXT_SET_EVENT_MASK (IM Server -> IM library)
2 CARD16 input-method-ID
2 CARD16 input-context-ID
4 EVENTMASK filter-event-mask (*1)
4 EVENTMASK intercept-event-mask (*2)
4 EVENTMASK select-event-mask (*3)
4 EVENTMASK forward-event-mask (*4)
4 EVENTMASK synchronous-event-mask (*5)
(*1) Specify the events to be neglected by the IM library via XFilterEvent.
(*2) Specify the events to be deselected by the IM library with XSelectInput.
(*3) Specify the events to be selected by the IM library with XSelectInput.
(*4) Specify all the events to be forwarded to the IM Server by the IM library.
(*5) Specify the events to be forwarded with synchronous flag on by the IM library.
The IM library must reply
XIM_SYNC_REPLY
message to the IM Server. This request is valid after the ic is created.
(2) Extension for improvement of performance.
The following requests may be used for improvement of performance.
XIM_EXT_FORWARD_KEYEVENT
message may be used instead of
XIM_FORWARD_EVENT
message.
XIM_EXT_FORWARD_KEYEVENT (IM Server <--> IM library)
2 CARD16 input-method-ID
2 CARD16 input-context-ID
2 BITMASK16 flag
#0001 synchronous
2 CARD16 sequence number
1 BYTE xEvent.u.u.type
1 BYTE keycode
2 CARD16 state
4 CARD32 time
4 CARD32 window
XIM_EXT_MOVE
message may be used to change the spot location instead of
XIM_SET_IC_VALUES
message.
It is effective only if the client specified XIMPreeditPosition.
XIM_EXT_MOVE (IM library -> IM Server)
2 CARD16 input-method-ID
2 CARD16 input-context-ID
2 INT16 X
2 INT16 Y
XIM_EXT_MOVE
message is a asynchronous request.