/* R6 IMProtocol */
The type of the callback request must be set in major_code and
minor_code members in the IMProtocol structure, e.g., you can start
geometry management callback as follows;
回调请求类型必须在IMProtocol结构里的主码和次码成员里设置,例如,你能够开启
位置管理回调象下面这样:
IMGeometryCBStruct geometry;
...
geometry.major_code = XIM_GEOMETRY;
geometry.connect_id = previous_request->any.connect_id;
...
IMCallCallback(ims, (IMProtocol)&geometry);
The structures for R6 IMProtocol callbacks contain:
这个适用R6输入法协议IMProtocol的回调的结构内容如下:
/* for Geometry Callback */
typedef struct {
int major_code;
int minor_code;
CARD16 connect_id;
CARD16 icid;
} IMGeometryCBStruct;
/* for Preedit Callback */
typedef struct {
int major_code;
int minor_code;
CARD16 connect_id;
CARD16 icid;
union {
int return_value; /* PreeditStart */
XIMPreeditDrawCallbackStruct draw; /* PreeditDraw */
XIMPreeditCaretCallbackStruct caret; /* PreeditCaret */
} todo;
} IMPreeditCBStruct;
/* for Status Callback */
typedef struct {
int major_code;
int minor_code;
CARD16 connect_id;
CARD16 icid;
union {
XIMStatusDrawCallbackStruct draw;
} todo;
} IMStatusCBStruct;
The structures for R5 Ximp callbacks contain:
这个适用R5的X输入法协议Ximp的回调的结构内容如下:
/* for Geometry Callback */
typedef struct {
INT32 type;
CARD32 icid;
Window focus_win;
long fwin_sel_mask;
CARD32 ximp_type_mask;
Window client_win;
} XIMPAnyStruct;
/* for Preedit Callback */
typedef struct {
INT32 type;
CARD32 icid;
Window focus_win;
long fwin_sel_mask;
CARD32 ximp_type_mask;
Window client_win;
union {
int return_value; /* PreeditStart */
XIMPreeditDrawCallbackStruct draw; /* PreeditDraw */
XIMPreeditCaretCallbackStruct caret; /* PreeditCaret */
} todo;
} XIMPPreeditCBStruct;
/* for Status Callback */
typedef struct {
INT32 type;
CARD32 icid;
Window focus_win;
long fwin_sel_mask;
CARD32 ximp_type_mask;
Window client_win;
union {
XIMStatusDrawCallbackStruct draw; /* StatusDraw */
} todo;
} XIMPStatusCBStruct;
The type of the callback request must be set in major_code and
minor_code members in the IMProtocol structure, e.g., you can start
geometry management callback as follows;
回调请求类型必须在IMProtocol结构里的主码和次码成员里设置,例如,你能够开启
位置管理回调象下面这样:
IMGeometryCBStruct geometry;
...
geometry.major_code = XIM_GEOMETRY;
geometry.connect_id = previous_request->any.connect_id;
...
IMCallCallback(ims, (IMProtocol)&geometry);
The structures for R6 IMProtocol callbacks contain:
这个适用R6输入法协议IMProtocol的回调的结构内容如下:
/* for Geometry Callback */
typedef struct {
int major_code;
int minor_code;
CARD16 connect_id;
CARD16 icid;
} IMGeometryCBStruct;
/* for Preedit Callback */
typedef struct {
int major_code;
int minor_code;
CARD16 connect_id;
CARD16 icid;
union {
int return_value; /* PreeditStart */
XIMPreeditDrawCallbackStruct draw; /* PreeditDraw */
XIMPreeditCaretCallbackStruct caret; /* PreeditCaret */
} todo;
} IMPreeditCBStruct;
/* for Status Callback */
typedef struct {
int major_code;
int minor_code;
CARD16 connect_id;
CARD16 icid;
union {
XIMStatusDrawCallbackStruct draw;
} todo;
} IMStatusCBStruct;
The structures for R5 Ximp callbacks contain:
这个适用R5的X输入法协议Ximp的回调的结构内容如下:
/* for Geometry Callback */
typedef struct {
INT32 type;
CARD32 icid;
Window focus_win;
long fwin_sel_mask;
CARD32 ximp_type_mask;
Window client_win;
} XIMPAnyStruct;
/* for Preedit Callback */
typedef struct {
INT32 type;
CARD32 icid;
Window focus_win;
long fwin_sel_mask;
CARD32 ximp_type_mask;
Window client_win;
union {
int return_value; /* PreeditStart */
XIMPreeditDrawCallbackStruct draw; /* PreeditDraw */
XIMPreeditCaretCallbackStruct caret; /* PreeditCaret */
} todo;
} XIMPPreeditCBStruct;
/* for Status Callback */
typedef struct {
INT32 type;
CARD32 icid;
Window focus_win;
long fwin_sel_mask;
CARD32 ximp_type_mask;
Window client_win;
union {
XIMStatusDrawCallbackStruct draw; /* StatusDraw */
} todo;
} XIMPStatusCBStruct;