0
|
1 /*
|
|
2 * $XConsortium: XIMproto.h,v 1.4 91/06/05 08:24:13 rws Exp $
|
|
3 */
|
|
4
|
|
5 /*
|
|
6 * FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
|
7 * This file is part of FreeWnn.
|
|
8 *
|
|
9 * Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
|
10 * Copyright 1991 by the Massachusetts Institute of Technology
|
|
11 *
|
|
12 * Author: OMRON SOFTWARE Co., Ltd. <freewnn@rd.kyoto.omronsoft.co.jp>
|
|
13 *
|
|
14 * This program is free software; you can redistribute it and/or modify
|
|
15 * it under the terms of the GNU General Public License as published by
|
|
16 * the Free Software Foundation; either version 2, or (at your option)
|
|
17 * any later version.
|
|
18 *
|
|
19 * This program is distributed in the hope that it will be useful,
|
|
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
22 * GNU General Public License for more details.
|
|
23 *
|
|
24 * You should have received a copy of the GNU General Public License
|
|
25 * along with GNU Emacs; see the file COPYING. If not, write to the
|
|
26 * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
27 *
|
|
28 * Commentary:
|
|
29 *
|
|
30 * Change log:
|
|
31 *
|
|
32 * Last modified date: 8,Feb.1999
|
|
33 *
|
|
34 * Code:
|
|
35 *
|
|
36 */
|
|
37
|
|
38 #ifndef XIMPROTO_H
|
|
39 #define XIMPROTO_H
|
|
40
|
|
41 #include <X11/Xmd.h>
|
|
42
|
|
43 /*
|
|
44 * Define constants for the sizes of the network packets. The sz_ prefix is
|
|
45 * used instead of something more descriptive so that the symbols are no more
|
|
46 * than 32 characters in length (which causes problems for some compilers).
|
|
47 */
|
|
48
|
|
49 #define XIM_MAJOR_VERSION 4
|
|
50 #define XIM_MINOR_VERSION 0
|
|
51
|
|
52 #define sz_ximRequestHeader 4
|
|
53 #define sz_ximNormalReply 4
|
|
54
|
|
55 #define sz_ximConnClient 4
|
|
56 #define sz_ximGetIMReq 8
|
|
57 #define sz_ximGetIMReply 8
|
|
58 #define sz_ximCreateICReq 4
|
|
59 #define sz_ximCreateICReply 8
|
|
60 #define sz_ximChangeICReq 8
|
|
61 #define sz_ximChangeICReply sz_ximNormalReply
|
|
62 #define sz_ximGetICReq 12
|
|
63 #define sz_ximGetICReply sz_ximNormalReply
|
|
64 #define sz_ximICValuesReq 28
|
|
65 #define sz_ximICAttributesReq 48
|
|
66 #define sz_ximDestroyICReq 8
|
|
67 #define sz_ximICFocusReq 8
|
|
68 #define sz_ximResetICReq 8
|
|
69
|
|
70 #define sz_ximEventReq 8
|
|
71 #define sz_ximEventReply 8
|
|
72 #define sz_ximReturnReply 8
|
|
73
|
|
74 /* For Callback */
|
|
75 #define sz_ximPreDrawReply 16
|
|
76 #define sz_ximPreCaretReply 8
|
|
77 #define sz_ximStatusDrawReply 12
|
|
78
|
|
79 #define Window CARD32
|
|
80 #define Atom CARD32
|
|
81 #define Colormap CARD32
|
|
82 #define Pixmap CARD32
|
|
83 #define Cursor CARD32
|
|
84
|
|
85 typedef struct
|
|
86 { /* 4 */
|
|
87 CARD8 reqType;
|
|
88 BYTE pad;
|
|
89 CARD16 length B16;
|
|
90 }
|
|
91 ximRequestHeader;
|
|
92
|
|
93 typedef struct
|
|
94 { /* 4 */
|
|
95 CARD16 state B16;
|
|
96 CARD16 detail B16;
|
|
97 }
|
|
98 ximNormalReply;
|
|
99
|
|
100 typedef struct
|
|
101 { /* 4 */
|
|
102 CARD8 byteOrder;
|
|
103 BYTE pad;
|
|
104 CARD16 length B16;
|
|
105 }
|
|
106 ximConnClient;
|
|
107
|
|
108 typedef struct
|
|
109 { /* 8 */
|
|
110 CARD8 reqType;
|
|
111 BYTE pad;
|
|
112 CARD16 length B16;
|
|
113 CARD32 mask B32;
|
|
114 }
|
|
115 ximGetIMReq;
|
|
116
|
|
117 typedef struct
|
|
118 { /* 8 */
|
|
119 CARD16 state B16;
|
|
120 INT16 num_styles B16;
|
|
121 INT16 nbytes B16;
|
|
122 CARD16 pad B16;
|
|
123 }
|
|
124 ximGetIMReply;
|
|
125
|
|
126 typedef struct
|
|
127 { /* 4 */
|
|
128 CARD8 reqType;
|
|
129 BYTE pad;
|
|
130 CARD16 length B16;
|
|
131 }
|
|
132 ximCreateICReq;
|
|
133
|
|
134 typedef struct
|
|
135 { /* 8 */
|
|
136 CARD16 state B16;
|
|
137 CARD16 detail B16;
|
|
138 CARD32 xic B32;
|
|
139 }
|
|
140 ximCreateICReply;
|
|
141
|
|
142 typedef struct
|
|
143 { /* 8 */
|
|
144 CARD8 reqType;
|
|
145 BYTE pad;
|
|
146 CARD16 length B16;
|
|
147 CARD32 xic B32;
|
|
148 }
|
|
149 ximChangeICReq;
|
|
150
|
|
151 typedef ximNormalReply ximChangeICReply;
|
|
152
|
|
153 typedef struct
|
|
154 { /* 12 */
|
|
155 CARD8 reqType;
|
|
156 BYTE pad;
|
|
157 CARD16 length B16;
|
|
158 CARD32 xic B32;
|
|
159 CARD32 mask B32;
|
|
160 }
|
|
161 ximGetICReq;
|
|
162
|
|
163 typedef ximNormalReply ximGetICReply;
|
|
164
|
|
165 typedef struct
|
|
166 { /* 28 */
|
|
167 CARD32 mask B32;
|
|
168 INT32 input_style B32;
|
|
169 Window c_window B32;
|
|
170 Window focus_window B32;
|
|
171 CARD32 filter_events B32;
|
|
172 INT32 max_keycode B32;
|
|
173 INT16 nbytes B16;
|
|
174 INT16 nbytes2 B16;
|
|
175 }
|
|
176 ximICValuesReq;
|
|
177
|
|
178 typedef struct
|
|
179 { /* 48 */
|
|
180 INT16 area_x B16, area_y B16;
|
|
181 CARD16 area_width B16, area_height B16;
|
|
182 CARD16 areaneeded_width B16, areaneeded_height B16;
|
|
183 INT16 spot_x B16, spot_y B16;
|
|
184 Colormap colormap B32;
|
|
185 Atom std_colormap B32;
|
|
186 CARD32 foreground B32, background B32;
|
|
187 Pixmap pixmap B32;
|
|
188 INT16 line_space B16;
|
|
189 CARD16 pad1 B16;
|
|
190 Cursor cursor B32;
|
|
191 CARD16 nfonts B16;
|
|
192 INT16 nbytes B16;
|
|
193 }
|
|
194 ximICAttributesReq;
|
|
195
|
|
196 typedef struct
|
|
197 { /* 8 */
|
|
198 CARD8 reqType;
|
|
199 BYTE pad;
|
|
200 CARD16 length B16;
|
|
201 CARD32 xic B32;
|
|
202 }
|
|
203 ximDestroyICReq;
|
|
204
|
|
205 typedef struct
|
|
206 { /* 8 */
|
|
207 CARD8 reqType;
|
|
208 BYTE pad;
|
|
209 CARD16 length B16;
|
|
210 CARD32 xic B32;
|
|
211 }
|
|
212 ximICFocusReq;
|
|
213
|
|
214 typedef struct
|
|
215 { /* 8 */
|
|
216 CARD8 reqType;
|
|
217 BYTE pad;
|
|
218 CARD16 length B16;
|
|
219 CARD32 xic B32;
|
|
220 }
|
|
221 ximResetICReq;
|
|
222
|
|
223 typedef struct
|
|
224 { /* 8 */
|
|
225 CARD8 reqType;
|
|
226 BYTE pad;
|
|
227 CARD16 length B16;
|
|
228 CARD32 xic B32;
|
|
229 }
|
|
230 ximEventReq;
|
|
231
|
|
232 typedef struct
|
|
233 { /* 8 */
|
|
234 CARD16 state B16;
|
|
235 CARD16 detail B16;
|
|
236 INT16 number B16;
|
|
237 CARD16 pad B16;
|
|
238 }
|
|
239 ximEventReply;
|
|
240
|
|
241 typedef struct
|
|
242 { /* 8 */
|
|
243 CARD16 type B16;
|
|
244 INT16 length B16;
|
|
245 KeySym keysym B32;
|
|
246 }
|
|
247 ximReturnReply;
|
|
248
|
|
249 /* For Callback */
|
|
250 typedef struct
|
|
251 { /* 16 */
|
|
252 INT16 caret B16;
|
|
253 INT16 chg_first B16;
|
|
254 INT16 chg_length B16;
|
|
255 INT16 encoding_is_wchar B16;
|
|
256 INT16 length B16;
|
|
257 CARD16 pad B16;
|
|
258 INT32 feedback B32;
|
|
259 }
|
|
260 ximPreDrawReply;
|
|
261
|
|
262 typedef struct
|
|
263 { /* 8 */
|
|
264 INT16 position B16;
|
|
265 CARD16 direction B16;
|
|
266 CARD16 style B16;
|
|
267 CARD16 pad B16;
|
|
268 }
|
|
269 ximPreCaretReply;
|
|
270
|
|
271 typedef struct
|
|
272 { /* 12 */
|
|
273 CARD16 type B16;
|
|
274 INT16 encoding_is_wchar B16;
|
|
275 INT16 length B16;
|
|
276 INT16 feedback B16;
|
|
277 Pixmap bitmap B32;
|
|
278 }
|
|
279 ximStatusDrawReply;
|
|
280
|
|
281 #define XIM_GetIM 1
|
|
282 #define XIM_CreateIC 2
|
|
283 #define XIM_ChangeIC 3
|
|
284 #define XIM_GetIC 4
|
|
285 #define XIM_DestroyIC 5
|
|
286 #define XIM_SetICFocus 6
|
|
287 #define XIM_UnsetICFocus 7
|
|
288 #define XIM_ResetIC 8
|
|
289 #define XIM_Event 9
|
|
290
|
|
291 #define XIM_NOTHING 1
|
|
292 #define XIM_NOFILTER 2
|
|
293 #define XIM_RETURN 3
|
|
294 #define XIM_CALLBACK 4
|
|
295 #define XIM_IC 5
|
|
296 #ifdef XML
|
|
297 #define XIM_CH_LOCALE 6
|
|
298 #endif /* XML */
|
|
299
|
|
300
|
|
301 #define XIM_STRING (short)1
|
|
302 #define XIM_KEYSYM (short)2
|
|
303
|
|
304 /* For Callback */
|
|
305 #define XIM_CB_PRE_START 1
|
|
306 #define XIM_CB_PRE_DONE 2
|
|
307 #define XIM_CB_PRE_DRAW 3
|
|
308 #define XIM_CB_PRE_CARET 4
|
|
309 #define XIM_CB_ST_START 5
|
|
310 #define XIM_CB_ST_DONE 6
|
|
311 #define XIM_CB_ST_DRAW 7
|
|
312
|
|
313 #define XIM_CB_FW_CHAR 1
|
|
314 #define XIM_CB_BW_CHAR 2
|
|
315 #define XIM_CB_FW_WORD 3
|
|
316 #define XIM_CB_BW_WORD 4
|
|
317 #define XIM_CB_CARET_UP 5
|
|
318 #define XIM_CB_CARET_DOWN 6
|
|
319 #define XIM_CB_NEXT_LINE 7
|
|
320 #define XIM_CB_PREV_LINE 8
|
|
321 #define XIM_CB_LINE_START 9
|
|
322 #define XIM_CB_LINE_END 10
|
|
323 #define XIM_CB_ABS_POS 11
|
|
324 #define XIM_CB_DONT_CHANGE 12
|
|
325
|
|
326 #define XIM_ST_TEXT 1
|
|
327 #define XIM_ST_BITMAP 2
|
|
328
|
|
329 #undef Window
|
|
330 #undef Atom
|
|
331 #undef Colormap
|
|
332 #undef Pixmap
|
|
333 #undef Cursor
|
|
334
|
|
335 #define _Read(fd, data, size) read((fd), (data), (size))
|
|
336 #define _Write(fd, data, size) write((fd), (data), (size))
|
|
337
|
|
338 #endif /* XIMPROTO_H */
|