master
ブランチ master
ShaderPlayground / deps / xlibre / include / X11 / extensions / XKBfile.h
10.9 KB、490行 生 Blame 履歴
1
2#ifndef _XKBFILE_H_
3#define _XKBFILE_H_ 1
4
5/************************************************************
6 Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
7
8 Permission to use, copy, modify, and distribute this
9 software and its documentation for any purpose and without
10 fee is hereby granted, provided that the above copyright
11 notice appear in all copies and that both that copyright
12 notice and this permission notice appear in supporting
13 documentation, and that the name of Silicon Graphics not be
14 used in advertising or publicity pertaining to distribution
15 of the software without specific prior written permission.
16 Silicon Graphics makes no representation about the suitability
17 of this software for any purpose. It is provided "as is"
18 without any express or implied warranty.
19
20 SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
21 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
22 AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
23 GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
24 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
25 DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
26 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
27 THE USE OR PERFORMANCE OF THIS SOFTWARE.
28
29 ********************************************************/
30
31/***====================================================================***/
32
33#define XkbXKMFile 0
34#define XkbCFile 1
35#define XkbXKBFile 2
36#define XkbMessage 3
37
38#define XkbMapDefined (1<<0)
39#define XkbStateDefined (1<<1)
40
41typedef struct _XkbFileInfo {
42 unsigned type;
43 unsigned defined;
44 XkbDescPtr xkb;
45} XkbFileInfo,*XkbFileInfoPtr;
46
47typedef void (*XkbFileAddOnFunc)(
48 FILE * /* file */,
49 XkbFileInfo * /* result */,
50 Bool /* topLevel */,
51 Bool /* showImplicit */,
52 int /* fileSection */,
53 void * /* priv */
54);
55
56/***====================================================================***/
57
58#define _XkbSuccess 0
59#define _XkbErrMissingNames 1
60#define _XkbErrMissingTypes 2
61#define _XkbErrMissingReqTypes 3
62#define _XkbErrMissingSymbols 4
63#define _XkbErrMissingVMods 5
64#define _XkbErrMissingIndicators 6
65#define _XkbErrMissingCompatMap 7
66#define _XkbErrMissingSymInterps 8
67#define _XkbErrMissingGeometry 9
68#define _XkbErrIllegalDoodad 10
69#define _XkbErrIllegalTOCType 11
70#define _XkbErrIllegalContents 12
71#define _XkbErrEmptyFile 13
72#define _XkbErrFileNotFound 14
73#define _XkbErrFileCannotOpen 15
74#define _XkbErrBadValue 16
75#define _XkbErrBadMatch 17
76#define _XkbErrBadTypeName 18
77#define _XkbErrBadTypeWidth 19
78#define _XkbErrBadFileType 20
79#define _XkbErrBadFileVersion 21
80#define _XkbErrBadFileFormat 22
81#define _XkbErrBadAlloc 23
82#define _XkbErrBadLength 24
83#define _XkbErrXReqFailure 25
84#define _XkbErrBadImplementation 26
85
86extern const char * _XkbErrMessages[];
87extern unsigned _XkbErrCode;
88extern const char * _XkbErrLocation;
89extern unsigned _XkbErrData;
90
91/***====================================================================***/
92
93_XFUNCPROTOBEGIN
94
95extern char * XkbIndentText(
96 unsigned /* size */
97);
98
99extern char * XkbAtomText(
100 Display * /* dpy */,
101 Atom /* atm */,
102 unsigned /* format */
103);
104
105extern char * XkbKeysymText(
106 KeySym /* sym */,
107 unsigned /* format */
108);
109
110extern char * XkbStringText(
111 char * /* str */,
112 unsigned /* format */
113);
114
115extern char * XkbKeyNameText(
116 char * /* name */,
117 unsigned /* format */
118);
119
120extern char *
121XkbModIndexText(
122 unsigned /* ndx */,
123 unsigned /* format */
124);
125
126extern char *
127XkbModMaskText(
128 unsigned /* mask */,
129 unsigned /* format */
130);
131
132extern char * XkbVModIndexText(
133 Display * /* dpy */,
134 XkbDescPtr /* xkb */,
135 unsigned /* ndx */,
136 unsigned /* format */
137);
138
139extern char * XkbVModMaskText(
140 Display * /* dpy */,
141 XkbDescPtr /* xkb */,
142 unsigned /* modMask */,
143 unsigned /* mask */,
144 unsigned /* format */
145);
146
147extern char * XkbConfigText(
148 unsigned /* config */,
149 unsigned /* format */
150);
151
152extern char * XkbSIMatchText(
153 unsigned /* type */,
154 unsigned /* format */
155);
156
157extern char * XkbIMWhichStateMaskText(
158 unsigned /* use_which */,
159 unsigned /* format */
160);
161
162extern char * XkbAccessXDetailText(
163 unsigned /* state */,
164 unsigned /* format */
165);
166
167extern char * XkbNKNDetailMaskText(
168 unsigned /* detail */,
169 unsigned /* format */
170);
171
172extern char * XkbControlsMaskText(
173 unsigned /* ctrls */,
174 unsigned /* format */
175);
176
177extern char * XkbGeomFPText(
178 int /* val */,
179 unsigned /* format */
180);
181
182extern char * XkbDoodadTypeText(
183 unsigned /* type */,
184 unsigned /* format */
185);
186
187extern char * XkbActionTypeText(
188 unsigned /* type */,
189 unsigned /* format */
190);
191
192extern char * XkbActionText(
193 Display * /* dpy */,
194 XkbDescPtr /* xkb */,
195 XkbAction * /* action */,
196 unsigned /* format */
197);
198
199extern char * XkbBehaviorText(
200 XkbDescPtr /* xkb */,
201 XkbBehavior * /* behavior */,
202 unsigned /* format */
203);
204
205/***====================================================================***/
206
207#define _XkbKSLower (1<<0)
208#define _XkbKSUpper (1<<1)
209
210#define XkbKSIsLower(k) (_XkbKSCheckCase(k)&_XkbKSLower)
211#define XkbKSIsUpper(k) (_XkbKSCheckCase(k)&_XkbKSUpper)
212#define XkbKSIsKeypad(k) (((k)>=XK_KP_Space)&&((k)<=XK_KP_Equal))
213#define XkbKSIsDeadKey(k) \
214 (((k)>=XK_dead_grave)&&((k)<=XK_dead_semivoiced_sound))
215
216extern unsigned _XkbKSCheckCase(
217 KeySym /* sym */
218);
219
220extern int XkbFindKeycodeByName(
221 XkbDescPtr /* xkb */,
222 char * /* name */,
223 Bool /* use_aliases */
224);
225
226extern Bool XkbLookupGroupAndLevel(
227 XkbDescPtr /* xkb */,
228 int /* key */,
229 int * /* mods_inout */,
230 int * /* grp_inout */,
231 int * /* lvl_rtrn */
232);
233
234/***====================================================================***/
235
236
237extern Bool XkbLookupCanonicalRGBColor(
238 char * /* def */,
239 XColor * /* color */
240);
241
242
243/***====================================================================***/
244
245extern char * XkbAtomGetString(
246 Display * /* dpy */,
247 Atom /* atm */
248);
249
250extern Atom XkbInternAtom(
251 Display * /* dpy */,
252 const char */* name */,
253 Bool /* onlyIfExists */
254);
255
256extern Status XkbChangeKbdDisplay(
257 Display * /* newDpy */,
258 XkbFileInfo * /* result */
259);
260
261extern Atom XkbChangeAtomDisplay(
262 Display * /* oldDpy */,
263 Display * /* newDpy */,
264 Atom /* atm */
265);
266
267extern void XkbInitAtoms(
268 Display * /* dpy */
269);
270
271/***====================================================================***/
272
273#ifdef _XKBGEOM_H_
274
275#define XkbDW_Unknown 0
276#define XkbDW_Doodad 1
277#define XkbDW_Section 2
278typedef struct _XkbDrawable {
279 int type;
280 int priority;
281 union {
282 XkbDoodadPtr doodad;
283 XkbSectionPtr section;
284 } u;
285 struct _XkbDrawable * next;
286} XkbDrawableRec,*XkbDrawablePtr;
287
288extern XkbDrawablePtr
289XkbGetOrderedDrawables(
290 XkbGeometryPtr /* geom */,
291 XkbSectionPtr /* section */
292);
293
294extern void
295XkbFreeOrderedDrawables(
296 XkbDrawablePtr /* draw */
297);
298
299#endif
300
301/***====================================================================***/
302
303extern unsigned XkbConvertGetByNameComponents(
304 Bool /* toXkm */,
305 unsigned /* orig */
306);
307
308extern unsigned XkbConvertXkbComponents(
309 Bool /* toXkm */,
310 unsigned /* orig */
311);
312
313extern Bool XkbDetermineFileType(
314 XkbFileInfo * /* xkb */,
315 int /* format */,
316 int * /* opts_missing */
317);
318
319extern Bool XkbNameMatchesPattern(
320 char * /* name */,
321 char * /* pattern */
322);
323
324/***====================================================================***/
325
326extern Bool XkbWriteXKBKeycodes(
327 FILE * /* file */,
328 XkbFileInfo * /* result */,
329 Bool /* topLevel */,
330 Bool /* showImplicit */,
331 XkbFileAddOnFunc /* addOn */,
332 void * /* priv */
333);
334
335extern Bool XkbWriteXKBKeyTypes(
336 FILE * /* file */,
337 XkbFileInfo * /* result */,
338 Bool /* topLevel */,
339 Bool /* showImplicit */,
340 XkbFileAddOnFunc /* addOn */,
341 void * /* priv */
342);
343
344extern Bool XkbWriteXKBCompatMap(
345 FILE * /* file */,
346 XkbFileInfo * /* result */,
347 Bool /* topLevel */,
348 Bool /* showImplicit */,
349 XkbFileAddOnFunc /* addOn */,
350 void * /* priv */
351);
352
353extern Bool XkbWriteXKBSymbols(
354 FILE * /* file */,
355 XkbFileInfo * /* result */,
356 Bool /* topLevel */,
357 Bool /* showImplicit */,
358 XkbFileAddOnFunc /* addOn */,
359 void * /* priv */
360);
361
362extern Bool XkbWriteXKBGeometry(
363 FILE * /* file */,
364 XkbFileInfo * /* result */,
365 Bool /* topLevel */,
366 Bool /* showImplicit */,
367 XkbFileAddOnFunc /* addOn */,
368 void * /* priv */
369);
370
371extern Bool XkbWriteXKBSemantics(
372 FILE * /* file */,
373 XkbFileInfo * /* result */,
374 Bool /* topLevel */,
375 Bool /* showImplicit */,
376 XkbFileAddOnFunc /* addOn */,
377 void * /* priv */
378);
379
380extern Bool XkbWriteXKBLayout(
381 FILE * /* file */,
382 XkbFileInfo * /* result */,
383 Bool /* topLevel */,
384 Bool /* showImplicit */,
385 XkbFileAddOnFunc /* addOn */,
386 void * /* priv */
387);
388
389extern Bool XkbWriteXKBKeymap(
390 FILE * /* file */,
391 XkbFileInfo * /* result */,
392 Bool /* topLevel */,
393 Bool /* showImplicit */,
394 XkbFileAddOnFunc /* addOn */,
395 void * /* priv */
396);
397
398extern Bool XkbWriteXKBFile(
399 FILE * /* file */,
400 XkbFileInfo * /* result */,
401 Bool /* showImplicit */,
402 XkbFileAddOnFunc /* addOn */,
403 void * /* priv */
404);
405
406extern Bool XkbWriteCFile(
407 FILE * /* file */,
408 char * /* name */,
409 XkbFileInfo * /* info */
410);
411
412extern Bool XkbWriteXKMFile(
413 FILE * /* file */,
414 XkbFileInfo * /* result */
415);
416
417extern Bool XkbWriteToServer(
418 XkbFileInfo * /* result */
419);
420
421extern void XkbEnsureSafeMapName(
422 char * /* name */
423);
424
425extern Bool XkbWriteXKBKeymapForNames(
426 FILE * /* file */,
427 XkbComponentNamesPtr /* names */,
428 Display * /* dpy */,
429 XkbDescPtr /* xkb */,
430 unsigned /* want */,
431 unsigned /* need */
432);
433
434extern Status XkbMergeFile(
435 XkbDescPtr /* xkb */,
436 XkbFileInfo /* finfo */
437);
438
439/***====================================================================***/
440
441extern Bool XkmProbe(
442 FILE * /* file */
443);
444
445extern unsigned XkbReadFromServer(
446 Display * /* dpy */,
447 unsigned /* need */,
448 unsigned /* want */,
449 XkbFileInfo * /* result */
450);
451
452extern unsigned XkmReadFile(
453 FILE * /* file */,
454 unsigned /* need */,
455 unsigned /* want */,
456 XkbFileInfo * /* result */
457);
458
459#ifdef _XKMFORMAT_H_
460
461extern Bool XkmReadTOC(
462 FILE * /* file */,
463 xkmFileInfo * /* file_info */,
464 int /* max_toc */,
465 xkmSectionInfo * /* toc */
466);
467
468extern xkmSectionInfo *XkmFindTOCEntry(
469 xkmFileInfo * /* finfo */,
470 xkmSectionInfo * /* toc */,
471 unsigned /* type */
472);
473
474extern Bool XkmReadFileSection(
475 FILE * /* file */,
476 xkmSectionInfo * /* toc */,
477 XkbFileInfo * /* result */,
478 unsigned * /* loaded_rtrn */
479);
480
481extern char * XkmReadFileSectionName(
482 FILE * /* file */,
483 xkmSectionInfo * /* toc */
484);
485
486#endif /* _XKMFORMAT_H */
487
488_XFUNCPROTOEND
489
490#endif /* _XKBFILE_H_ */