Commit 37769b5a100498aa19926dff9517a3bc5a606183

Dan Nicholson 2009-03-27T20:01:32

libxkbcomp: s/XkbDescPtr/XkbcDescPtr/ We need to use the keyboard description structure from XKBcommon.h since it doesn't have the Display field.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
diff --git a/src/xkbcomp/action.c b/src/xkbcomp/action.c
index 3b82e64..6b27ac9 100644
--- a/src/xkbcomp/action.c
+++ b/src/xkbcomp/action.c
@@ -333,7 +333,7 @@ ReportNotFound(unsigned action, unsigned field, const char *what, char *bad)
 }
 
 static Bool
-HandleNoAction(XkbDescPtr xkb,
+HandleNoAction(XkbcDescPtr xkb,
                XkbAnyAction * action,
                unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -363,7 +363,7 @@ CheckLatchLockFlags(unsigned action,
 }
 
 static Bool
-CheckModifierField(XkbDescPtr xkb,
+CheckModifierField(XkbcDescPtr xkb,
                    unsigned action,
                    ExprDef * value,
                    unsigned *flags_inout, unsigned *mods_rtrn)
@@ -391,7 +391,7 @@ CheckModifierField(XkbDescPtr xkb,
 }
 
 static Bool
-HandleSetLatchMods(XkbDescPtr xkb,
+HandleSetLatchMods(XkbcDescPtr xkb,
                    XkbAnyAction * action,
                    unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -437,7 +437,7 @@ HandleSetLatchMods(XkbDescPtr xkb,
 }
 
 static Bool
-HandleLockMods(XkbDescPtr xkb,
+HandleLockMods(XkbcDescPtr xkb,
                XkbAnyAction * action,
                unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -514,7 +514,7 @@ CheckGroupField(unsigned action,
 }
 
 static Bool
-HandleSetLatchGroup(XkbDescPtr xkb,
+HandleSetLatchGroup(XkbcDescPtr xkb,
                     XkbAnyAction * action,
                     unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -559,7 +559,7 @@ HandleSetLatchGroup(XkbDescPtr xkb,
 }
 
 static Bool
-HandleLockGroup(XkbDescPtr xkb,
+HandleLockGroup(XkbcDescPtr xkb,
                 XkbAnyAction * action,
                 unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -585,7 +585,7 @@ HandleLockGroup(XkbDescPtr xkb,
 }
 
 static Bool
-HandleMovePtr(XkbDescPtr xkb,
+HandleMovePtr(XkbcDescPtr xkb,
               XkbAnyAction * action,
               unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -650,7 +650,7 @@ static LookupEntry lockWhich[] = {
 };
 
 static Bool
-HandlePtrBtn(XkbDescPtr xkb,
+HandlePtrBtn(XkbcDescPtr xkb,
              XkbAnyAction * action,
              unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -712,7 +712,7 @@ static LookupEntry ptrDflts[] = {
 };
 
 static Bool
-HandleSetPtrDflt(XkbDescPtr xkb,
+HandleSetPtrDflt(XkbcDescPtr xkb,
                  XkbAnyAction * action,
                  unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -785,7 +785,7 @@ static LookupEntry isoNames[] = {
 };
 
 static Bool
-HandleISOLock(XkbDescPtr xkb,
+HandleISOLock(XkbcDescPtr xkb,
               XkbAnyAction * action,
               unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -833,7 +833,7 @@ HandleISOLock(XkbDescPtr xkb,
 }
 
 static Bool
-HandleSwitchScreen(XkbDescPtr xkb,
+HandleSwitchScreen(XkbcDescPtr xkb,
                    XkbAnyAction * action,
                    unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -925,7 +925,7 @@ LookupEntry ctrlNames[] = {
 };
 
 static Bool
-HandleSetLockControls(XkbDescPtr xkb,
+HandleSetLockControls(XkbcDescPtr xkb,
                       XkbAnyAction * action,
                       unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -957,7 +957,7 @@ static LookupEntry evNames[] = {
 };
 
 static Bool
-HandleActionMessage(XkbDescPtr xkb,
+HandleActionMessage(XkbcDescPtr xkb,
                     XkbAnyAction * action,
                     unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -1035,7 +1035,7 @@ HandleActionMessage(XkbDescPtr xkb,
 }
 
 static Bool
-HandleRedirectKey(XkbDescPtr xkb,
+HandleRedirectKey(XkbcDescPtr xkb,
                   XkbAnyAction * action,
                   unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -1091,7 +1091,7 @@ HandleRedirectKey(XkbDescPtr xkb,
 }
 
 static Bool
-HandleDeviceBtn(XkbDescPtr xkb,
+HandleDeviceBtn(XkbcDescPtr xkb,
                 XkbAnyAction * action,
                 unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -1161,7 +1161,7 @@ HandleDeviceBtn(XkbDescPtr xkb,
 }
 
 static Bool
-HandleDeviceValuator(XkbDescPtr xkb,
+HandleDeviceValuator(XkbcDescPtr xkb,
                      XkbAnyAction * action,
                      unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -1176,7 +1176,7 @@ HandleDeviceValuator(XkbDescPtr xkb,
 }
 
 static Bool
-HandlePrivate(XkbDescPtr xkb,
+HandlePrivate(XkbcDescPtr xkb,
               XkbAnyAction * action,
               unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -1244,7 +1244,7 @@ HandlePrivate(XkbDescPtr xkb,
     return ReportIllegal(PrivateAction, field);
 }
 
-typedef Bool(*actionHandler) (XkbDescPtr /* xkb */ ,
+typedef Bool(*actionHandler) (XkbcDescPtr /* xkb */ ,
                               XkbAnyAction * /* action */ ,
                               unsigned /* field */ ,
                               ExprDef * /* array_ndx */ ,
@@ -1297,7 +1297,7 @@ ApplyActionFactoryDefaults(XkbAction * action)
 
 int
 HandleActionDef(ExprDef * def,
-                XkbDescPtr xkb,
+                XkbcDescPtr xkb,
                 XkbAnyAction * action, unsigned mergeMode, ActionInfo * info)
 {
     ExprDef *arg;
@@ -1396,7 +1396,7 @@ HandleActionDef(ExprDef * def,
 /***====================================================================***/
 
 int
-SetActionField(XkbDescPtr xkb,
+SetActionField(XkbcDescPtr xkb,
                char *elem,
                char *field,
                ExprDef * array_ndx, ExprDef * value, ActionInfo ** info_rtrn)
diff --git a/src/xkbcomp/action.h b/src/xkbcomp/action.h
index 2fb7a5e..d60f616 100644
--- a/src/xkbcomp/action.h
+++ b/src/xkbcomp/action.h
@@ -65,13 +65,13 @@ typedef struct _ActionInfo
 } ActionInfo;
 
 extern int HandleActionDef(ExprDef * /* def */ ,
-                           XkbDescPtr /* xkb */ ,
+                           XkbcDescPtr /* xkb */ ,
                            XkbAnyAction * /* action */ ,
                            unsigned /* mergeMode */ ,
                            ActionInfo * /* info */
     );
 
-extern int SetActionField(XkbDescPtr /* xkb */ ,
+extern int SetActionField(XkbcDescPtr /* xkb */ ,
                           char * /* elem */ ,
                           char * /* field */ ,
                           ExprDef * /* index */ ,
diff --git a/src/xkbcomp/alias.c b/src/xkbcomp/alias.c
index aadf535..3b88d72 100644
--- a/src/xkbcomp/alias.c
+++ b/src/xkbcomp/alias.c
@@ -156,7 +156,7 @@ MergeAliases(AliasInfo ** into, AliasInfo ** merge, unsigned how_merge)
 }
 
 int
-ApplyAliases(XkbDescPtr xkb, Bool toGeom, AliasInfo ** info_in)
+ApplyAliases(XkbcDescPtr xkb, Bool toGeom, AliasInfo ** info_in)
 {
     register int i;
     XkbKeyAliasPtr old, a;
diff --git a/src/xkbcomp/alias.h b/src/xkbcomp/alias.h
index b6fac5b..019ecc6 100644
--- a/src/xkbcomp/alias.h
+++ b/src/xkbcomp/alias.h
@@ -48,7 +48,7 @@ extern Bool MergeAliases(AliasInfo ** /* into */ ,
                          unsigned       /* how_merge */
     );
 
-extern int ApplyAliases(XkbDescPtr /* xkb */ ,
+extern int ApplyAliases(XkbcDescPtr /* xkb */ ,
                         Bool /* toGeom */ ,
                         AliasInfo **    /* info */
     );
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index dc06ebe..061578d 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -67,7 +67,7 @@ typedef struct _CompatInfo
     LEDInfo *leds;
     VModInfo vmods;
     ActionInfo *act;
-    XkbDescPtr xkb;
+    XkbcDescPtr xkb;
 } CompatInfo;
 
 /***====================================================================***/
@@ -99,7 +99,7 @@ siText(SymInterpInfo * si, CompatInfo * info)
 }
 
 static void
-InitCompatInfo(CompatInfo * info, XkbDescPtr xkb)
+InitCompatInfo(CompatInfo * info, XkbcDescPtr xkb)
 {
     register int i;
 
@@ -132,7 +132,7 @@ InitCompatInfo(CompatInfo * info, XkbDescPtr xkb)
 }
 
 static void
-ClearCompatInfo(CompatInfo * info, XkbDescPtr xkb)
+ClearCompatInfo(CompatInfo * info, XkbcDescPtr xkb)
 {
     register int i;
 
@@ -392,14 +392,14 @@ MergeIncludedCompatMaps(CompatInfo * into, CompatInfo * from, unsigned merge)
 }
 
 typedef void (*FileHandler) (XkbFile * /* rtrn */ ,
-                             XkbDescPtr /* xkb */ ,
+                             XkbcDescPtr /* xkb */ ,
                              unsigned /* merge */ ,
                              CompatInfo *       /* info */
     );
 
 static Bool
 HandleIncludeCompatMap(IncludeStmt * stmt,
-                       XkbDescPtr xkb, CompatInfo * info, FileHandler hndlr)
+                       XkbcDescPtr xkb, CompatInfo * info, FileHandler hndlr)
 {
     unsigned newMerge;
     XkbFile *rtrn;
@@ -492,7 +492,7 @@ static LookupEntry useModMapValues[] = {
 
 static int
 SetInterpField(SymInterpInfo * si,
-               XkbDescPtr xkb,
+               XkbcDescPtr xkb,
                char *field,
                ExprDef * arrayNdx, ExprDef * value, CompatInfo * info)
 {
@@ -603,7 +603,7 @@ LookupEntry groupNames[] = {
 };
 
 static int
-HandleInterpVar(VarDef * stmt, XkbDescPtr xkb, CompatInfo * info)
+HandleInterpVar(VarDef * stmt, XkbcDescPtr xkb, CompatInfo * info)
 {
     ExprResult elem, field;
     ExprDef *ndx;
@@ -623,7 +623,7 @@ HandleInterpVar(VarDef * stmt, XkbDescPtr xkb, CompatInfo * info)
 }
 
 static int
-HandleInterpBody(VarDef * def, XkbDescPtr xkb, SymInterpInfo * si,
+HandleInterpBody(VarDef * def, XkbcDescPtr xkb, SymInterpInfo * si,
                  CompatInfo * info)
 {
     int ok = 1;
@@ -646,7 +646,7 @@ HandleInterpBody(VarDef * def, XkbDescPtr xkb, SymInterpInfo * si,
 }
 
 static int
-HandleInterpDef(InterpDef * def, XkbDescPtr xkb, unsigned merge,
+HandleInterpDef(InterpDef * def, XkbcDescPtr xkb, unsigned merge,
                 CompatInfo * info)
 {
     unsigned pred, mods;
@@ -682,7 +682,7 @@ HandleInterpDef(InterpDef * def, XkbDescPtr xkb, unsigned merge,
 
 static int
 HandleGroupCompatDef(GroupCompatDef * def,
-                     XkbDescPtr xkb, unsigned merge, CompatInfo * info)
+                     XkbcDescPtr xkb, unsigned merge, CompatInfo * info)
 {
     ExprResult val;
     GroupCompatInfo tmp;
@@ -713,7 +713,7 @@ HandleGroupCompatDef(GroupCompatDef * def,
 
 static void
 HandleCompatMapFile(XkbFile * file,
-                    XkbDescPtr xkb, unsigned merge, CompatInfo * info)
+                    XkbcDescPtr xkb, unsigned merge, CompatInfo * info)
 {
     ParseCommon *stmt;
 
diff --git a/src/xkbcomp/geometry.c b/src/xkbcomp/geometry.c
index d203ec9..9d09cb7 100644
--- a/src/xkbcomp/geometry.c
+++ b/src/xkbcomp/geometry.c
@@ -1324,13 +1324,13 @@ MergeIncludedGeometry(GeometryInfo * into, GeometryInfo * from,
 }
 
 typedef void (*FileHandler) (XkbFile * /* file */ ,
-                             XkbDescPtr /* xkb */ ,
+                             XkbcDescPtr /* xkb */ ,
                              unsigned /* merge */ ,
                              GeometryInfo *     /* info */
     );
 
 static Bool
-HandleIncludeGeometry(IncludeStmt * stmt, XkbDescPtr xkb, GeometryInfo * info,
+HandleIncludeGeometry(IncludeStmt * stmt, XkbcDescPtr xkb, GeometryInfo * info,
                       FileHandler hndlr)
 {
     unsigned newMerge;
@@ -2140,7 +2140,7 @@ SetGeometryProperty(GeometryInfo * info, char *property, ExprDef * value)
 }
 
 static int
-HandleGeometryVar(VarDef * stmt, XkbDescPtr xkb, GeometryInfo * info)
+HandleGeometryVar(VarDef * stmt, XkbcDescPtr xkb, GeometryInfo * info)
 {
     ExprResult elem, field, tmp;
     ExprDef *ndx;
@@ -2488,7 +2488,7 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
 }
 
 static int
-HandleShapeDef(ShapeDef * def, XkbDescPtr xkb, unsigned merge,
+HandleShapeDef(ShapeDef * def, XkbcDescPtr xkb, unsigned merge,
                GeometryInfo * info)
 {
     ShapeInfo si;
@@ -2809,7 +2809,7 @@ HandleSectionBody(SectionDef * def,
 
 static int
 HandleSectionDef(SectionDef * def,
-                 XkbDescPtr xkb, unsigned merge, GeometryInfo * info)
+                 XkbcDescPtr xkb, unsigned merge, GeometryInfo * info)
 {
     SectionInfo si;
     char *str;
@@ -2838,7 +2838,7 @@ HandleSectionDef(SectionDef * def,
 
 static void
 HandleGeometryFile(XkbFile * file,
-                   XkbDescPtr xkb, unsigned merge, GeometryInfo * info)
+                   XkbcDescPtr xkb, unsigned merge, GeometryInfo * info)
 {
     ParseCommon *stmt;
     char *failWhat;
diff --git a/src/xkbcomp/indicators.c b/src/xkbcomp/indicators.c
index 57811d3..4cc301f 100644
--- a/src/xkbcomp/indicators.c
+++ b/src/xkbcomp/indicators.c
@@ -199,7 +199,7 @@ static LookupEntry groupComponentNames[] = {
 
 int
 SetIndicatorMapField(LEDInfo * led,
-                     XkbDescPtr xkb,
+                     XkbcDescPtr xkb,
                      char *field, ExprDef * arrayNdx, ExprDef * value)
 {
     ExprResult rtrn;
@@ -324,7 +324,7 @@ SetIndicatorMapField(LEDInfo * led,
 
 LEDInfo *
 HandleIndicatorMapDef(IndicatorMapDef * def,
-                      XkbDescPtr xkb,
+                      XkbcDescPtr xkb,
                       LEDInfo * dflt, LEDInfo * oldLEDs, unsigned merge)
 {
     LEDInfo led, *rtrn;
diff --git a/src/xkbcomp/indicators.h b/src/xkbcomp/indicators.h
index f70ea90..5f07af3 100644
--- a/src/xkbcomp/indicators.h
+++ b/src/xkbcomp/indicators.h
@@ -61,14 +61,14 @@ extern LEDInfo *AddIndicatorMap(LEDInfo * /* oldLEDs */ ,
     );
 
 extern int SetIndicatorMapField(LEDInfo * /* led */ ,
-                                XkbDescPtr /* xkb */ ,
+                                XkbcDescPtr /* xkb */ ,
                                 char * /* field */ ,
                                 ExprDef * /* arrayNdx */ ,
                                 ExprDef *       /* value */
     );
 
 extern LEDInfo *HandleIndicatorMapDef(IndicatorMapDef * /* stmt */ ,
-                                      XkbDescPtr /* xkb */ ,
+                                      XkbcDescPtr /* xkb */ ,
                                       LEDInfo * /* dflt */ ,
                                       LEDInfo * /* oldLEDs */ ,
                                       unsigned  /* mergeMode */
diff --git a/src/xkbcomp/keycodes.c b/src/xkbcomp/keycodes.c
index d1dbd52..4802bac 100644
--- a/src/xkbcomp/keycodes.c
+++ b/src/xkbcomp/keycodes.c
@@ -82,7 +82,7 @@ typedef struct _KeyNamesInfo
 } KeyNamesInfo;
 
 static void HandleKeycodesFile(XkbFile * file,
-                               XkbDescPtr xkb,
+                               XkbcDescPtr xkb,
                                unsigned merge,
                                KeyNamesInfo * info);
 
@@ -496,7 +496,7 @@ MergeIncludedKeycodes(KeyNamesInfo * into, KeyNamesInfo * from,
  * @param info Struct to store the key info in.
  */
 static Bool
-HandleIncludeKeycodes(IncludeStmt * stmt, XkbDescPtr xkb, KeyNamesInfo * info)
+HandleIncludeKeycodes(IncludeStmt * stmt, XkbcDescPtr xkb, KeyNamesInfo * info)
 {
     unsigned newMerge;
     XkbFile *rtrn;
@@ -750,7 +750,7 @@ HandleIndicatorNameDef(IndicatorNameDef * def,
  */
 static void
 HandleKeycodesFile(XkbFile * file,
-                   XkbDescPtr xkb, unsigned merge, KeyNamesInfo * info)
+                   XkbcDescPtr xkb, unsigned merge, KeyNamesInfo * info)
 {
     ParseCommon *stmt;
 
diff --git a/src/xkbcomp/keytypes.c b/src/xkbcomp/keytypes.c
index 65ee19e..b27bc9d 100644
--- a/src/xkbcomp/keytypes.c
+++ b/src/xkbcomp/keytypes.c
@@ -92,14 +92,14 @@ Atom tok_KEYPAD;
 
 /***====================================================================***/
 
-extern Bool AddMapEntry(XkbDescPtr /* xkb */ ,
+extern Bool AddMapEntry(XkbcDescPtr /* xkb */ ,
                         KeyTypeInfo * /* type */ ,
                         XkbKTMapEntryPtr /* new */ ,
                         Bool /* clobber */ ,
                         Bool    /* report */
     );
 
-extern Bool AddPreserve(XkbDescPtr /* xkb */ ,
+extern Bool AddPreserve(XkbcDescPtr /* xkb */ ,
                         KeyTypeInfo * /* type */ ,
                         PreserveInfo * /* new */ ,
                         Bool /* clobber */ ,
@@ -126,7 +126,7 @@ extern Bool AddLevelName(KeyTypeInfo * /* type */ ,
 /***====================================================================***/
 
 static void
-InitKeyTypesInfo(KeyTypesInfo * info, XkbDescPtr xkb, KeyTypesInfo * from)
+InitKeyTypesInfo(KeyTypesInfo * info, XkbcDescPtr xkb, KeyTypesInfo * from)
 {
     tok_ONE_LEVEL = XkbInternAtom(NULL, "ONE_LEVEL", False);
     tok_TWO_LEVEL = XkbInternAtom(NULL, "TWO_LEVEL", False);
@@ -280,7 +280,7 @@ ReportTypeBadWidth(const char *type, int has, int needs)
 }
 
 static Bool
-AddKeyType(XkbDescPtr xkb, KeyTypesInfo * info, KeyTypeInfo * new)
+AddKeyType(XkbcDescPtr xkb, KeyTypesInfo * info, KeyTypeInfo * new)
 {
     KeyTypeInfo *old;
 
@@ -366,7 +366,7 @@ AddKeyType(XkbDescPtr xkb, KeyTypesInfo * info, KeyTypeInfo * new)
 
 static void
 MergeIncludedKeyTypes(KeyTypesInfo * into,
-                      KeyTypesInfo * from, unsigned merge, XkbDescPtr xkb)
+                      KeyTypesInfo * from, unsigned merge, XkbcDescPtr xkb)
 {
     KeyTypeInfo *type;
 
@@ -392,14 +392,14 @@ MergeIncludedKeyTypes(KeyTypesInfo * into,
 }
 
 typedef void (*FileHandler) (XkbFile * /* file */ ,
-                             XkbDescPtr /* xkb */ ,
+                             XkbcDescPtr /* xkb */ ,
                              unsigned /* merge */ ,
                              KeyTypesInfo *     /* included */
     );
 
 static Bool
 HandleIncludeKeyTypes(IncludeStmt * stmt,
-                      XkbDescPtr xkb, KeyTypesInfo * info, FileHandler hndlr)
+                      XkbcDescPtr xkb, KeyTypesInfo * info, FileHandler hndlr)
 {
     unsigned newMerge;
     XkbFile *rtrn;
@@ -544,7 +544,7 @@ NextMapEntry(KeyTypeInfo * type)
 }
 
 Bool
-AddPreserve(XkbDescPtr xkb,
+AddPreserve(XkbcDescPtr xkb,
             KeyTypeInfo * type, PreserveInfo * new, Bool clobber, Bool report)
 {
     PreserveInfo *old;
@@ -616,7 +616,7 @@ AddPreserve(XkbDescPtr xkb,
  * @param report True if a warning is to be printed on.
  */
 Bool
-AddMapEntry(XkbDescPtr xkb,
+AddMapEntry(XkbcDescPtr xkb,
             KeyTypeInfo * type,
             XkbKTMapEntryPtr new, Bool clobber, Bool report)
 {
@@ -682,7 +682,7 @@ static LookupEntry lnames[] = {
 
 static Bool
 SetMapEntry(KeyTypeInfo * type,
-            XkbDescPtr xkb, ExprDef * arrayNdx, ExprDef * value)
+            XkbcDescPtr xkb, ExprDef * arrayNdx, ExprDef * value)
 {
     ExprResult rtrn;
     XkbKTMapEntryRec entry;
@@ -729,7 +729,7 @@ SetMapEntry(KeyTypeInfo * type,
 
 static Bool
 SetPreserve(KeyTypeInfo * type,
-            XkbDescPtr xkb, ExprDef * arrayNdx, ExprDef * value)
+            XkbcDescPtr xkb, ExprDef * arrayNdx, ExprDef * value)
 {
     ExprResult rtrn;
     PreserveInfo new;
@@ -878,7 +878,7 @@ SetLevelName(KeyTypeInfo * type, ExprDef * arrayNdx, ExprDef * value)
  */
 static Bool
 SetKeyTypeField(KeyTypeInfo * type,
-                XkbDescPtr xkb,
+                XkbcDescPtr xkb,
                 char *field,
                 ExprDef * arrayNdx, ExprDef * value, KeyTypesInfo * info)
 {
@@ -937,7 +937,7 @@ SetKeyTypeField(KeyTypeInfo * type,
 }
 
 static Bool
-HandleKeyTypeVar(VarDef * stmt, XkbDescPtr xkb, KeyTypesInfo * info)
+HandleKeyTypeVar(VarDef * stmt, XkbcDescPtr xkb, KeyTypesInfo * info)
 {
     ExprResult elem, field;
     ExprDef *arrayNdx;
@@ -963,7 +963,7 @@ HandleKeyTypeVar(VarDef * stmt, XkbDescPtr xkb, KeyTypesInfo * info)
 
 static int
 HandleKeyTypeBody(VarDef * def,
-                  XkbDescPtr xkb, KeyTypeInfo * type, KeyTypesInfo * info)
+                  XkbcDescPtr xkb, KeyTypeInfo * type, KeyTypesInfo * info)
 {
     int ok = 1;
     ExprResult tmp, field;
@@ -990,7 +990,7 @@ HandleKeyTypeBody(VarDef * def,
  */
 static int
 HandleKeyTypeDef(KeyTypeDef * def,
-                 XkbDescPtr xkb, unsigned merge, KeyTypesInfo * info)
+                 XkbcDescPtr xkb, unsigned merge, KeyTypesInfo * info)
 {
     register int i;
     KeyTypeInfo type;
@@ -1071,7 +1071,7 @@ HandleKeyTypeDef(KeyTypeDef * def,
  */
 static void
 HandleKeyTypesFile(XkbFile * file,
-                   XkbDescPtr xkb, unsigned merge, KeyTypesInfo * info)
+                   XkbcDescPtr xkb, unsigned merge, KeyTypesInfo * info)
 {
     ParseCommon *stmt;
 
@@ -1132,7 +1132,7 @@ HandleKeyTypesFile(XkbFile * file,
 }
 
 static Bool
-CopyDefToKeyType(XkbDescPtr xkb, XkbKeyTypePtr type, KeyTypeInfo * def)
+CopyDefToKeyType(XkbcDescPtr xkb, XkbKeyTypePtr type, KeyTypeInfo * def)
 {
     register int i;
     PreserveInfo *pre;
diff --git a/src/xkbcomp/misc.c b/src/xkbcomp/misc.c
index 993c62f..b653b12 100644
--- a/src/xkbcomp/misc.c
+++ b/src/xkbcomp/misc.c
@@ -377,7 +377,7 @@ static KeyNameDesc dfltKeys[] = {
 };
 
 Status
-ComputeKbdDefaults(XkbDescPtr xkb)
+ComputeKbdDefaults(XkbcDescPtr xkb)
 {
     Status rtrn;
     register int i, tmp, nUnknown;
@@ -463,7 +463,7 @@ ComputeKbdDefaults(XkbDescPtr xkb)
  * @return True if found, False otherwise.
  */
 Bool
-FindNamedKey(XkbDescPtr xkb,
+FindNamedKey(XkbcDescPtr xkb,
              unsigned long name,
              unsigned int *kc_rtrn,
              Bool use_aliases, Bool create, int start_from)
@@ -536,7 +536,7 @@ FindNamedKey(XkbDescPtr xkb,
 }
 
 Bool
-FindKeyNameForAlias(XkbDescPtr xkb, unsigned long lname,
+FindKeyNameForAlias(XkbcDescPtr xkb, unsigned long lname,
                     unsigned long *real_name)
 {
     register int i;
diff --git a/src/xkbcomp/misc.h b/src/xkbcomp/misc.h
index 4a802d8..7d6d349 100644
--- a/src/xkbcomp/misc.h
+++ b/src/xkbcomp/misc.h
@@ -92,10 +92,10 @@ extern Bool ProcessIncludeFile(IncludeStmt * /* stmt */ ,
                                unsigned *       /* merge_rtrn */
     );
 
-extern Status ComputeKbdDefaults(XkbDescPtr     /* xkb */
+extern Status ComputeKbdDefaults(XkbcDescPtr     /* xkb */
     );
 
-extern Bool FindNamedKey(XkbDescPtr /* xkb */ ,
+extern Bool FindNamedKey(XkbcDescPtr /* xkb */ ,
                          unsigned long /* name */ ,
                          unsigned int * /* kc_rtrn */ ,
                          Bool /* use_aliases */ ,
@@ -103,7 +103,7 @@ extern Bool FindNamedKey(XkbDescPtr /* xkb */ ,
                          int    /* start_from */
     );
 
-extern Bool FindKeyNameForAlias(XkbDescPtr /* xkb */ ,
+extern Bool FindKeyNameForAlias(XkbcDescPtr /* xkb */ ,
                                 unsigned long /* lname */ ,
                                 unsigned long * /* real_name */
     );
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index 5d28282..64a1be4 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -238,7 +238,7 @@ typedef struct _SymbolsInfo
 } SymbolsInfo;
 
 static void
-InitSymbolsInfo(SymbolsInfo * info, XkbDescPtr xkb)
+InitSymbolsInfo(SymbolsInfo * info, XkbcDescPtr xkb)
 {
     register int i;
 
@@ -601,7 +601,7 @@ MergeKeys(SymbolsInfo * info, KeyInfo * into, KeyInfo * from)
 }
 
 static Bool
-AddKeySymbols(SymbolsInfo * info, KeyInfo * key, XkbDescPtr xkb)
+AddKeySymbols(SymbolsInfo * info, KeyInfo * key, XkbcDescPtr xkb)
 {
     register int i;
     unsigned long real_name;
@@ -713,7 +713,7 @@ AddModMapEntry(SymbolsInfo * info, ModMapEntry * new)
 
 static void
 MergeIncludedSymbols(SymbolsInfo * into, SymbolsInfo * from,
-                     unsigned merge, XkbDescPtr xkb)
+                     unsigned merge, XkbcDescPtr xkb)
 {
     register int i;
     KeyInfo *key;
@@ -763,14 +763,14 @@ MergeIncludedSymbols(SymbolsInfo * into, SymbolsInfo * from,
 }
 
 typedef void (*FileHandler) (XkbFile * /* rtrn */ ,
-                             XkbDescPtr /* xkb */ ,
+                             XkbcDescPtr /* xkb */ ,
                              unsigned /* merge */ ,
                              SymbolsInfo *      /* included */
     );
 
 static Bool
 HandleIncludeSymbols(IncludeStmt * stmt,
-                     XkbDescPtr xkb, SymbolsInfo * info, FileHandler hndlr)
+                     XkbcDescPtr xkb, SymbolsInfo * info, FileHandler hndlr)
 {
     unsigned newMerge;
     XkbFile *rtrn;
@@ -930,7 +930,7 @@ GetGroupIndex(KeyInfo * key,
 
 static Bool
 AddSymbolsToKey(KeyInfo * key,
-                XkbDescPtr xkb,
+                XkbcDescPtr xkb,
                 char *field,
                 ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
 {
@@ -980,7 +980,7 @@ AddSymbolsToKey(KeyInfo * key,
 
 static Bool
 AddActionsToKey(KeyInfo * key,
-                XkbDescPtr xkb,
+                XkbcDescPtr xkb,
                 char *field,
                 ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
 {
@@ -1116,7 +1116,7 @@ static LookupEntry rgEntries[] = {
 
 static Bool
 SetSymbolsField(KeyInfo * key,
-                XkbDescPtr xkb,
+                XkbcDescPtr xkb,
                 char *field,
                 ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
 {
@@ -1402,7 +1402,7 @@ SetGroupName(SymbolsInfo * info, ExprDef * arrayNdx, ExprDef * value)
 }
 
 static int
-HandleSymbolsVar(VarDef * stmt, XkbDescPtr xkb, SymbolsInfo * info)
+HandleSymbolsVar(VarDef * stmt, XkbcDescPtr xkb, SymbolsInfo * info)
 {
     ExprResult elem, field, tmp;
     ExprDef *arrayNdx;
@@ -1484,7 +1484,7 @@ HandleSymbolsVar(VarDef * stmt, XkbDescPtr xkb, SymbolsInfo * info)
 
 static Bool
 HandleSymbolsBody(VarDef * def,
-                  XkbDescPtr xkb, KeyInfo * key, SymbolsInfo * info)
+                  XkbcDescPtr xkb, KeyInfo * key, SymbolsInfo * info)
 {
     Bool ok = True;
     ExprResult tmp, field;
@@ -1562,7 +1562,7 @@ SetExplicitGroup(SymbolsInfo * info, KeyInfo * key)
 
 static int
 HandleSymbolsDef(SymbolsDef * stmt,
-                 XkbDescPtr xkb, unsigned merge, SymbolsInfo * info)
+                 XkbcDescPtr xkb, unsigned merge, SymbolsInfo * info)
 {
     KeyInfo key;
 
@@ -1592,7 +1592,7 @@ HandleSymbolsDef(SymbolsDef * stmt,
 
 static Bool
 HandleModMapDef(ModMapDef * def,
-                XkbDescPtr xkb, unsigned merge, SymbolsInfo * info)
+                XkbcDescPtr xkb, unsigned merge, SymbolsInfo * info)
 {
     ExprDef *key;
     ModMapEntry tmp;
@@ -1635,7 +1635,7 @@ HandleModMapDef(ModMapDef * def,
 
 static void
 HandleSymbolsFile(XkbFile * file,
-                  XkbDescPtr xkb, unsigned merge, SymbolsInfo * info)
+                  XkbcDescPtr xkb, unsigned merge, SymbolsInfo * info)
 {
     ParseCommon *stmt;
 
@@ -1695,7 +1695,7 @@ HandleSymbolsFile(XkbFile * file,
 }
 
 static Bool
-FindKeyForSymbol(XkbDescPtr xkb, KeySym sym, unsigned int *kc_rtrn)
+FindKeyForSymbol(XkbcDescPtr xkb, KeySym sym, unsigned int *kc_rtrn)
 {
     register int i, j;
     register Bool gotOne;
@@ -1731,7 +1731,7 @@ FindKeyForSymbol(XkbDescPtr xkb, KeySym sym, unsigned int *kc_rtrn)
  * @return True if found, False otherwise.
  */
 static Bool
-FindNamedType(XkbDescPtr xkb, Atom name, unsigned *type_rtrn)
+FindNamedType(XkbcDescPtr xkb, Atom name, unsigned *type_rtrn)
 {
     register unsigned n;
 
diff --git a/src/xkbcomp/vmod.c b/src/xkbcomp/vmod.c
index c912a84..aa6ddec 100644
--- a/src/xkbcomp/vmod.c
+++ b/src/xkbcomp/vmod.c
@@ -37,7 +37,7 @@
 #include "vmod.h"
 
 void
-InitVModInfo(VModInfo * info, XkbDescPtr xkb)
+InitVModInfo(VModInfo * info, XkbcDescPtr xkb)
 {
     ClearVModInfo(info, xkb);
     info->errorCount = 0;
@@ -45,7 +45,7 @@ InitVModInfo(VModInfo * info, XkbDescPtr xkb)
 }
 
 void
-ClearVModInfo(VModInfo * info, XkbDescPtr xkb)
+ClearVModInfo(VModInfo * info, XkbcDescPtr xkb)
 {
     register int i;
 
@@ -173,9 +173,9 @@ LookupVModIndex(XPointer priv,
     register int i;
     register char *fieldStr;
     register char *modStr;
-    XkbDescPtr xkb;
+    XkbcDescPtr xkb;
 
-    xkb = (XkbDescPtr) priv;
+    xkb = (XkbcDescPtr) priv;
     if ((xkb == NULL) || (xkb->names == NULL) || (elem != None)
         || (type != TypeInt))
     {
@@ -226,7 +226,7 @@ LookupVModMask(XPointer priv,
 }
 
 int
-FindKeypadVMod(XkbDescPtr xkb)
+FindKeypadVMod(XkbcDescPtr xkb)
 {
     Atom name;
     ExprResult rtrn;
diff --git a/src/xkbcomp/vmod.h b/src/xkbcomp/vmod.h
index 559b9d5..f03bb4e 100644
--- a/src/xkbcomp/vmod.h
+++ b/src/xkbcomp/vmod.h
@@ -29,7 +29,7 @@
 
 typedef struct _VModInfo
 {
-    XkbDescPtr xkb;
+    XkbcDescPtr xkb;
     unsigned defined;
     unsigned available;
     unsigned newlyDefined;
@@ -37,11 +37,11 @@ typedef struct _VModInfo
 } VModInfo;
 
 extern void InitVModInfo(VModInfo * /* info */ ,
-                         XkbDescPtr     /* xkb */
+                         XkbcDescPtr     /* xkb */
     );
 
 extern void ClearVModInfo(VModInfo * /* info */ ,
-                          XkbDescPtr    /* xkb */
+                          XkbcDescPtr    /* xkb */
     );
 
 extern Bool HandleVModDef(VModDef * /* stmt */ ,
@@ -50,7 +50,7 @@ extern Bool HandleVModDef(VModDef * /* stmt */ ,
     );
 
 extern Bool ApplyVModDefs(VModInfo * /* info */ ,
-                          XkbDescPtr    /* xkb */
+                          XkbcDescPtr    /* xkb */
     );
 
 extern int LookupVModIndex(XPointer /* priv */ ,
@@ -67,7 +67,7 @@ extern int LookupVModMask(XPointer /* priv */ ,
                           ExprResult *  /* val_rtrn */
     );
 
-extern int FindKeypadVMod(XkbDescPtr    /* xkb */
+extern int FindKeypadVMod(XkbcDescPtr    /* xkb */
     );
 
 extern Bool ResolveVirtualModifier(ExprDef * /* def */ ,
diff --git a/src/xkbcomp/xkbcomp.h b/src/xkbcomp/xkbcomp.h
index e544808..e9ce3e8 100644
--- a/src/xkbcomp/xkbcomp.h
+++ b/src/xkbcomp/xkbcomp.h
@@ -37,6 +37,7 @@
 #include "utils.h"
 
 #include <X11/extensions/XKM.h>
+#include "X11/extensions/XKBcommon.h"
 
 extern char *scanFile;