Pull in enough structs and defines from XKBstr.h to only need XKB.h We want to move away from sharing implementation structs and let libX11 and libxkbcommon use each their own set of structs.
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 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522
diff --git a/include/X11/extensions/XKBcommon.h b/include/X11/extensions/XKBcommon.h
index f6641a1..ab67e6e 100644
--- a/include/X11/extensions/XKBcommon.h
+++ b/include/X11/extensions/XKBcommon.h
@@ -58,8 +58,149 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <stdint.h>
#include <stdio.h>
#include <X11/Xfuncproto.h>
-#include <X11/extensions/XKBstrcommon.h>
-#include <X11/extensions/XKBrulescommon.h>
+#include <X11/extensions/XKB.h>
+
+#ifndef X_PROTOCOL
+typedef unsigned char KeyCode;
+#endif
+
+#ifndef _XTYPEDEF_BOOL
+typedef int Bool;
+#endif
+
+/* From filecommon */
+
+#define XkbXKMFile 0
+#define XkbCFile 1
+#define XkbXKBFile 2
+#define XkbMessage 3
+
+#define XkbMapDefined (1 << 0)
+#define XkbStateDefined (1 << 1)
+
+/***====================================================================***/
+
+#define _XkbSuccess 0
+#define _XkbErrMissingNames 1
+#define _XkbErrMissingTypes 2
+#define _XkbErrMissingReqTypes 3
+#define _XkbErrMissingSymbols 4
+#define _XkbErrMissingVMods 5
+#define _XkbErrMissingIndicators 6
+#define _XkbErrMissingCompatMap 7
+#define _XkbErrMissingSymInterps 8
+#define _XkbErrMissingGeometry 9
+#define _XkbErrIllegalDoodad 10
+#define _XkbErrIllegalTOCType 11
+#define _XkbErrIllegalContents 12
+#define _XkbErrEmptyFile 13
+#define _XkbErrFileNotFound 14
+#define _XkbErrFileCannotOpen 15
+#define _XkbErrBadValue 16
+#define _XkbErrBadMatch 17
+#define _XkbErrBadTypeName 18
+#define _XkbErrBadTypeWidth 19
+#define _XkbErrBadFileType 20
+#define _XkbErrBadFileVersion 21
+#define _XkbErrBadFileFormat 22
+#define _XkbErrBadAlloc 23
+#define _XkbErrBadLength 24
+#define _XkbErrXReqFailure 25
+#define _XkbErrBadImplementation 26
+
+/* From rulescommon */
+
+#define _XkbKSLower (1 << 0)
+#define _XkbKSUpper (1 << 1)
+
+#define XkbKSIsKeypad(k) (((k) >= XK_KP_Space) && ((k) <= XK_KP_Equal))
+#define XkbKSIsDeadKey(k) \
+ (((k) >= XK_dead_grave) && ((k) <= XK_dead_semivoiced_sound))
+
+
+
+typedef struct _XkbRMLVOSet {
+ char * rules;
+ char * model;
+ char * layout;
+ char * variant;
+ char * options;
+} XkbRMLVOSet;
+
+typedef struct _XkbRF_VarDefs {
+ char * model;
+ char * layout;
+ char * variant;
+ char * options;
+ unsigned short sz_extra;
+ unsigned short num_extra;
+ char * extra_names;
+ char ** extra_values;
+} XkbRF_VarDefsRec,*XkbRF_VarDefsPtr;
+
+typedef struct _XkbRF_VarDesc {
+ char * name;
+ char * desc;
+} XkbRF_VarDescRec, *XkbRF_VarDescPtr;
+
+typedef struct _XkbRF_DescribeVars {
+ int sz_desc;
+ int num_desc;
+ XkbRF_VarDescPtr desc;
+} XkbRF_DescribeVarsRec,*XkbRF_DescribeVarsPtr;
+
+typedef struct _XkbRF_Rule {
+ int number;
+ int layout_num;
+ int variant_num;
+ char * model;
+ char * layout;
+ char * variant;
+ char * option;
+ /* yields */
+ char * keycodes;
+ char * symbols;
+ char * types;
+ char * compat;
+ char * geometry;
+ char * keymap;
+ unsigned flags;
+} XkbRF_RuleRec,*XkbRF_RulePtr;
+
+typedef struct _XkbRF_Group {
+ int number;
+ char * name;
+ char * words;
+} XkbRF_GroupRec, *XkbRF_GroupPtr;
+
+#define XkbRF_PendingMatch (1L<<1)
+#define XkbRF_Option (1L<<2)
+#define XkbRF_Append (1L<<3)
+#define XkbRF_Normal (1L<<4)
+#define XkbRF_Invalid (1L<<5)
+
+typedef struct _XkbRF_Rules {
+ XkbRF_DescribeVarsRec models;
+ XkbRF_DescribeVarsRec layouts;
+ XkbRF_DescribeVarsRec variants;
+ XkbRF_DescribeVarsRec options;
+ unsigned short sz_extra;
+ unsigned short num_extra;
+ char ** extra_names;
+ XkbRF_DescribeVarsPtr extra;
+
+ unsigned short sz_rules;
+ unsigned short num_rules;
+ XkbRF_RulePtr rules;
+ unsigned short sz_groups;
+ unsigned short num_groups;
+ XkbRF_GroupPtr groups;
+} XkbRF_RulesRec, *XkbRF_RulesPtr;
+
+#define _XKB_RF_NAMES_PROP_ATOM "_XKB_RULES_NAMES"
+#define _XKB_RF_NAMES_PROP_MAXLEN 1024
+
+
/* Action structures used in the server */
@@ -80,7 +221,7 @@ struct xkb_mod_action {
struct xkb_group_action {
unsigned char type;
unsigned char flags;
- int16_t group_XXX;
+ int16_t group;
};
struct xkb_iso_action {
@@ -123,13 +264,13 @@ struct xkb_pointer_default_action {
unsigned char type;
uint8_t flags;
uint8_t affect;
- uint8_t valueXXX;
+ uint8_t value;
};
struct xkb_switch_screen_action {
unsigned char type;
uint8_t flags;
- uint8_t screenXXX;
+ uint8_t screen;
};
struct xkb_redirect_key_action {
@@ -142,6 +283,15 @@ struct xkb_redirect_key_action {
unsigned char vmods0;
unsigned char vmods1;
};
+#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\
+ ((unsigned int)(a)->vmods0))
+#define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
+ ((a)->vmods_mask0=((m)&0xff)))
+#define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\
+ ((unsigned int)(a)->vmods_mask0))
+#define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
+ ((a)->vmods_mask0=((m)&0xff)))
+
struct xkb_pointer_action {
unsigned char type;
@@ -151,6 +301,11 @@ struct xkb_pointer_action {
unsigned char high_YYY;
unsigned char low_YYY;
};
+#define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff)))
+#define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX))
+#define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY))
+#define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX))
+#define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY))
struct xkb_message_action {
unsigned char type;
@@ -182,58 +337,87 @@ union xkb_action {
unsigned char type;
};
-typedef struct _XkbcMods {
+struct xkb_mods {
uint32_t mask; /* effective mods */
uint32_t vmods;
uint8_t real_mods;
-} XkbcModsRec, *XkbcModsPtr;
+};
-typedef struct _XkbcKTMapEntry {
+struct xkb_kt_map_entry {
Bool active;
uint16_t level;
- XkbcModsRec mods;
-} XkbcKTMapEntryRec, *XkbcKTMapEntryPtr;
+ struct xkb_mods mods;
+};
-typedef struct _XkbcKeyType {
- XkbcModsRec mods;
+struct xkb_key_type {
+ struct xkb_mods mods;
uint16_t num_levels;
unsigned char map_count;
- XkbcKTMapEntryPtr map;
- XkbcModsPtr preserve;
+ struct xkb_kt_map_entry * map;
+ struct xkb_mods * preserve;
uint32_t name;
uint32_t *level_names;
-} XkbcKeyTypeRec, *XkbcKeyTypePtr;
+};
-typedef struct _XkbcSymInterpretRec {
+struct xkb_sym_interpret {
uint32_t sym;
unsigned char flags;
unsigned char match;
uint8_t mods; /* XXX real or virt? */
uint32_t virtual_mod;
struct xkb_any_action act;
-} XkbcSymInterpretRec, *XkbcSymInterpretPtr;
+};
-typedef struct _XkbcCompatMapRec {
- XkbcSymInterpretPtr sym_interpret;
- XkbcModsRec groups[XkbNumKbdGroups];
+struct xkb_compat_map {
+ struct xkb_sym_interpret * sym_interpret;
+ struct xkb_mods groups[XkbNumKbdGroups];
unsigned short num_si;
unsigned short size_si;
-} XkbcCompatMapRec, *XkbcCompatMapPtr;
+};
-typedef struct _XkbcClientMapRec {
+struct xkb_sym_map {
+ unsigned char kt_index[XkbNumKbdGroups];
+ unsigned char group_info;
+ unsigned char width;
+ unsigned short offset;
+};
+
+#define XkbNumGroups(g) ((g)&0x0f)
+#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
+#define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
+#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
+#define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f))
+#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
+
+struct xkb_client_map {
unsigned char size_types;
unsigned char num_types;
- XkbcKeyTypePtr types;
+ struct xkb_key_type * types;
unsigned short size_syms;
unsigned short num_syms;
uint32_t *syms;
- XkbSymMapPtr key_sym_map;
+ struct xkb_sym_map * key_sym_map;
unsigned char *modmap;
-} XkbcClientMapRec, *XkbcClientMapPtr;
+};
+
+#define XkbCMKeyGroupInfo(m,k) ((m)->key_sym_map[k].group_info)
+#define XkbCMKeyNumGroups(m,k) (XkbNumGroups((m)->key_sym_map[k].group_info))
+#define XkbCMKeyGroupWidth(m,k,g) (XkbCMKeyType(m,k,g)->num_levels)
+#define XkbCMKeyGroupsWidth(m,k) ((m)->key_sym_map[k].width)
+#define XkbCMKeyTypeIndex(m,k,g) ((m)->key_sym_map[k].kt_index[g&0x3])
+#define XkbCMKeyType(m,k,g) (&(m)->types[XkbCMKeyTypeIndex(m,k,g)])
+#define XkbCMKeyNumSyms(m,k) (XkbCMKeyGroupsWidth(m,k)*XkbCMKeyNumGroups(m,k))
+#define XkbCMKeySymsOffset(m,k) ((m)->key_sym_map[k].offset)
+#define XkbCMKeySymsPtr(m,k) (&(m)->syms[XkbCMKeySymsOffset(m,k)])
+
+struct xkb_behavior {
+ unsigned char type;
+ unsigned char data;
+};
-typedef struct _XkbcServerMapRec {
+struct xkb_server_map {
unsigned short num_acts;
unsigned short size_acts;
@@ -245,14 +429,39 @@ typedef struct _XkbcServerMapRec {
#endif
union xkb_action *acts;
- XkbBehavior *behaviors;
+ struct xkb_behavior *behaviors;
unsigned short *key_acts;
unsigned char *explicits;
uint32_t vmods[XkbNumVirtualMods];
uint32_t *vmodmap;
-} XkbcServerMapRec, *XkbcServerMapPtr;
+};
+
+#define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]])
+
+struct xkb_indicator_map {
+ unsigned char flags;
+ unsigned char which_groups;
+ unsigned char groups;
+ unsigned char which_mods;
+ struct xkb_mods mods;
+ unsigned int ctrls;
+};
-typedef struct _XkbcNamesRec {
+struct xkb_indicator {
+ unsigned long phys_indicators;
+ struct xkb_indicator_map maps[XkbNumIndicators];
+};
+
+struct xkb_key_name {
+ char name[XkbKeyNameLength];
+};
+
+struct xkb_key_alias {
+ char real[XkbKeyNameLength];
+ char alias[XkbKeyNameLength];
+};
+
+struct xkb_names {
uint32_t keycodes;
uint32_t geometry;
uint32_t symbols;
@@ -261,57 +470,57 @@ typedef struct _XkbcNamesRec {
uint32_t vmods[XkbNumVirtualMods];
uint32_t indicators[XkbNumIndicators];
uint32_t groups[XkbNumKbdGroups];
- XkbKeyNamePtr keys;
- XkbKeyAliasPtr key_aliases;
+ struct xkb_key_name * keys;
+ struct xkb_key_alias * key_aliases;
uint32_t *radio_groups;
uint32_t phys_symbols;
unsigned char num_keys;
unsigned char num_key_aliases;
unsigned short num_rg;
-} XkbcNamesRec, *XkbcNamesPtr;
+};
-typedef struct _XkbcProperty {
+struct xkb_property {
char *name;
char *value;
-} XkbcPropertyRec, *XkbcPropertyPtr;
+};
-typedef struct _XkbcColor {
+struct xkb_color {
unsigned int pixel;
char * spec;
-} XkbcColorRec, *XkbcColorPtr;
+};
-typedef struct _XkbcPoint {
+struct xkb_point {
short x;
short y;
-} XkbcPointRec, *XkbcPointPtr;
+};
-typedef struct _XkbcBounds {
+struct xkb_bounds {
short x1,y1;
short x2,y2;
-} XkbcBoundsRec, *XkbcBoundsPtr;
+};
#define XkbBoundsWidth(b) (((b)->x2)-((b)->x1))
#define XkbBoundsHeight(b) (((b)->y2)-((b)->y1))
-typedef struct _XkbcOutline {
+struct xkb_outline {
unsigned short num_points;
unsigned short sz_points;
unsigned short corner_radius;
- XkbcPointPtr points;
-} XkbcOutlineRec, *XkbcOutlinePtr;
+ struct xkb_point * points;
+};
-typedef struct _XkbcShape {
+struct xkb_shape {
uint32_t name;
unsigned short num_outlines;
unsigned short sz_outlines;
- XkbcOutlinePtr outlines;
- XkbcOutlinePtr approx;
- XkbcOutlinePtr primary;
- XkbcBoundsRec bounds;
-} XkbcShapeRec, *XkbcShapePtr;
+ struct xkb_outline * outlines;
+ struct xkb_outline * approx;
+ struct xkb_outline * primary;
+ struct xkb_bounds bounds;
+};
#define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0]))
-typedef struct _XkbcShapeDoodad {
+struct xkb_shape_doodad {
uint32_t name;
unsigned char type;
unsigned char priority;
@@ -320,13 +529,13 @@ typedef struct _XkbcShapeDoodad {
short angle;
unsigned short color_ndx;
unsigned short shape_ndx;
-} XkbcShapeDoodadRec, *XkbcShapeDoodadPtr;
+};
#define XkbShapeDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
#define XkbShapeDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
#define XkbSetShapeDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
#define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
-typedef struct _XkbcTextDoodad {
+struct xkb_text_doodad {
uint32_t name;
unsigned char type;
unsigned char priority;
@@ -338,11 +547,11 @@ typedef struct _XkbcTextDoodad {
unsigned short color_ndx;
char * text;
char * font;
-} XkbcTextDoodadRec, *XkbcTextDoodadPtr;
+};
#define XkbTextDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
#define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
-typedef struct _XkbcIndicatorDoodad {
+struct xkb_indicator_doodad {
uint32_t name;
unsigned char type;
unsigned char priority;
@@ -352,7 +561,7 @@ typedef struct _XkbcIndicatorDoodad {
unsigned short shape_ndx;
unsigned short on_color_ndx;
unsigned short off_color_ndx;
-} XkbcIndicatorDoodadRec, *XkbcIndicatorDoodadPtr;
+};
#define XkbIndicatorDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
#define XkbIndicatorDoodadOnColor(g,d) (&(g)->colors[(d)->on_color_ndx])
#define XkbIndicatorDoodadOffColor(g,d) (&(g)->colors[(d)->off_color_ndx])
@@ -363,7 +572,7 @@ typedef struct _XkbcIndicatorDoodad {
#define XkbSetIndicatorDoodadShape(g,d,s) \
((d)->shape_ndx= (s)-&(g)->shapes[0])
-typedef struct _XkbcLogoDoodad {
+struct xkb_logo_doodad {
uint32_t name;
unsigned char type;
unsigned char priority;
@@ -373,28 +582,28 @@ typedef struct _XkbcLogoDoodad {
unsigned short color_ndx;
unsigned short shape_ndx;
char * logo_name;
-} XkbcLogoDoodadRec, *XkbcLogoDoodadPtr;
+};
#define XkbLogoDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
#define XkbLogoDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
#define XkbSetLogoDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
#define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
-typedef struct _XkbcAnyDoodad {
+struct xkb_any_doodad {
uint32_t name;
unsigned char type;
unsigned char priority;
short top;
short left;
short angle;
-} XkbcAnyDoodadRec, *XkbcAnyDoodadPtr;
+};
-typedef union _XkbcDoodad {
- XkbcAnyDoodadRec any;
- XkbcShapeDoodadRec shape;
- XkbcTextDoodadRec text;
- XkbcIndicatorDoodadRec indicator;
- XkbcLogoDoodadRec logo;
-} XkbcDoodadRec, *XkbcDoodadPtr;
+union xkb_doodad {
+ struct xkb_any_doodad any;
+ struct xkb_shape_doodad shape;
+ struct xkb_text_doodad text;
+ struct xkb_indicator_doodad indicator;
+ struct xkb_logo_doodad logo;
+};
#define XkbUnknownDoodad 0
#define XkbOutlineDoodad 1
@@ -403,28 +612,28 @@ typedef union _XkbcDoodad {
#define XkbIndicatorDoodad 4
#define XkbLogoDoodad 5
-typedef struct _XkbcKey {
- XkbKeyNameRec name;
+struct xkb_key {
+ struct xkb_key_name name;
short gap;
unsigned char shape_ndx;
unsigned char color_ndx;
-} XkbcKeyRec, *XkbcKeyPtr;
+};
#define XkbKeyShape(g,k) (&(g)->shapes[(k)->shape_ndx])
#define XkbKeyColor(g,k) (&(g)->colors[(k)->color_ndx])
#define XkbSetKeyShape(g,k,s) ((k)->shape_ndx= (s)-&(g)->shapes[0])
#define XkbSetKeyColor(g,k,c) ((k)->color_ndx= (c)-&(g)->colors[0])
-typedef struct _XkbRow {
+struct xkb_row {
short top;
short left;
unsigned short num_keys;
unsigned short sz_keys;
int vertical;
- XkbcKeyPtr keys;
- XkbcBoundsRec bounds;
-} XkbcRowRec, *XkbcRowPtr;
+ struct xkb_key * keys;
+ struct xkb_bounds bounds;
+};
-typedef struct _XkbcSection {
+struct xkb_section {
uint32_t name;
unsigned char priority;
short top;
@@ -438,40 +647,40 @@ typedef struct _XkbcSection {
unsigned short sz_rows;
unsigned short sz_doodads;
unsigned short sz_overlays;
- XkbcRowPtr rows;
- XkbcDoodadPtr doodads;
- XkbcBoundsRec bounds;
- struct _XkbOverlay *overlays;
-} XkbcSectionRec, *XkbcSectionPtr;
-
-typedef struct _XkbcOverlayKey {
- XkbKeyNameRec over;
- XkbKeyNameRec under;
-} XkbcOverlayKeyRec, *XkbcOverlayKeyPtr;
-
-typedef struct _XkbOverlayRow {
+ struct xkb_row * rows;
+ union xkb_doodad * doodads;
+ struct xkb_bounds bounds;
+ struct xkb_overlay *overlays;
+};
+
+struct xkb_overlay_key {
+ struct xkb_key_name over;
+ struct xkb_key_name under;
+};
+
+struct xkb_overlay_row {
unsigned short row_under;
unsigned short num_keys;
unsigned short sz_keys;
- XkbcOverlayKeyPtr keys;
-} XkbcOverlayRowRec, *XkbcOverlayRowPtr;
+ struct xkb_overlay_key * keys;
+};
-typedef struct _XkbOverlay {
+struct xkb_overlay {
uint32_t name;
- XkbcSectionPtr section_under;
+ struct xkb_section * section_under;
unsigned short num_rows;
unsigned short sz_rows;
- XkbcOverlayRowPtr rows;
- XkbcBoundsPtr bounds;
-} XkbcOverlayRec, *XkbcOverlayPtr;
+ struct xkb_overlay_row * rows;
+ struct xkb_bounds * bounds;
+};
-typedef struct _XkbcGeometry {
+struct xkb_geometry {
uint32_t name;
unsigned short width_mm;
unsigned short height_mm;
char * label_font;
- XkbcColorPtr label_color;
- XkbcColorPtr base_color;
+ struct xkb_color * label_color;
+ struct xkb_color * base_color;
unsigned short sz_properties;
unsigned short sz_colors;
unsigned short sz_shapes;
@@ -484,13 +693,13 @@ typedef struct _XkbcGeometry {
unsigned short num_sections;
unsigned short num_doodads;
unsigned short num_key_aliases;
- XkbcPropertyPtr properties;
- XkbcColorPtr colors;
- XkbcShapePtr shapes;
- XkbcSectionPtr sections;
- XkbcDoodadPtr doodads;
- XkbKeyAliasPtr key_aliases;
-} XkbcGeometryRec, *XkbcGeometryPtr;
+ struct xkb_property * properties;
+ struct xkb_color * colors;
+ struct xkb_shape * shapes;
+ struct xkb_section * sections;
+ union xkb_doodad * doodads;
+ struct xkb_key_alias * key_aliases;
+};
#define XkbGeomColorIndex(g,c) ((int)((c)-&(g)->colors[0]))
#define XkbGeomPropertiesMask (1<<0)
@@ -501,7 +710,7 @@ typedef struct _XkbcGeometry {
#define XkbGeomKeyAliasesMask (1<<5)
#define XkbGeomAllMask (0x3f)
-typedef struct _XkbcGeometrySizes {
+struct xkb_geometry_sizes {
unsigned int which;
unsigned short num_properties;
unsigned short num_colors;
@@ -509,24 +718,166 @@ typedef struct _XkbcGeometrySizes {
unsigned short num_sections;
unsigned short num_doodads;
unsigned short num_key_aliases;
-} XkbcGeometrySizesRec, *XkbcGeometrySizesPtr;
+};
+
+struct xkb_controls {
+ unsigned char mk_dflt_btn;
+ unsigned char num_groups;
+ unsigned char groups_wrap;
+ struct xkb_mods internal;
+ struct xkb_mods ignore_lock;
+ unsigned int enabled_ctrls;
+ unsigned short repeat_delay;
+ unsigned short repeat_interval;
+ unsigned short slow_keys_delay;
+ unsigned short debounce_delay;
+ unsigned short mk_delay;
+ unsigned short mk_interval;
+ unsigned short mk_time_to_max;
+ unsigned short mk_max_speed;
+ short mk_curve;
+ unsigned short ax_options;
+ unsigned short ax_timeout;
+ unsigned short axt_opts_mask;
+ unsigned short axt_opts_values;
+ unsigned int axt_ctrls_mask;
+ unsigned int axt_ctrls_values;
+ unsigned char per_key_repeat[XkbPerKeyBitArraySize];
+};
/* Common keyboard description structure */
-typedef struct _XkbcDesc {
+struct xkb_desc {
unsigned int defined;
unsigned short flags;
unsigned short device_spec;
KeyCode min_key_code;
KeyCode max_key_code;
- XkbControlsPtr ctrls;
- XkbcServerMapPtr server;
- XkbcClientMapPtr map;
- XkbIndicatorPtr indicators;
- XkbcNamesPtr names;
- XkbcCompatMapPtr compat;
- XkbcGeometryPtr geom;
-} XkbcDescRec, *XkbcDescPtr;
+ struct xkb_controls * ctrls;
+ struct xkb_server_map * server;
+ struct xkb_client_map * map;
+ struct xkb_indicator * indicators;
+ struct xkb_names * names;
+ struct xkb_compat_map * compat;
+ struct xkb_geometry * geom;
+};
+
+#define XkbKeyKeyTypeIndex(d,k,g) (XkbCMKeyTypeIndex((d)->map,k,g))
+#define XkbKeyKeyType(d,k,g) (XkbCMKeyType((d)->map,k,g))
+#define XkbKeyGroupWidth(d,k,g) (XkbCMKeyGroupWidth((d)->map,k,g))
+#define XkbKeyGroupsWidth(d,k) (XkbCMKeyGroupsWidth((d)->map,k))
+#define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k)))
+#define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k)))
+#define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k)))
+#define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k)))
+#define XkbKeySym(d,k,n) (XkbKeySymsPtr(d,k)[n])
+#define XkbKeySymEntry(d,k,sl,g) \
+ (XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))))
+#define XkbKeyAction(d,k,n) \
+ (XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL)
+#define XkbKeyActionEntry(d,k,sl,g) \
+ (XkbKeyHasActions(d,k)?\
+ XkbKeyAction(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))):NULL)
+
+#define XkbKeyHasActions(d,k) ((d)->server->key_acts[k]!=0)
+#define XkbKeyNumActions(d,k) (XkbKeyHasActions(d,k)?XkbKeyNumSyms(d,k):1)
+#define XkbKeyActionsPtr(d,k) (XkbSMKeyActionsPtr((d)->server,k))
+#define XkbKeycodeInRange(d,k) (((k)>=(d)->min_key_code)&&\
+ ((k)<=(d)->max_key_code))
+#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1)
+
+struct xkb_map_changes {
+ unsigned short changed;
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+ unsigned char first_type;
+ unsigned char num_types;
+ KeyCode first_key_sym;
+ unsigned char num_key_syms;
+ KeyCode first_key_act;
+ unsigned char num_key_acts;
+ KeyCode first_key_behavior;
+ unsigned char num_key_behaviors;
+ KeyCode first_key_explicit;
+ unsigned char num_key_explicit;
+ KeyCode first_modmap_key;
+ unsigned char num_modmap_keys;
+ KeyCode first_vmodmap_key;
+ unsigned char num_vmodmap_keys;
+ unsigned char pad;
+ unsigned short vmods;
+};
+
+struct xkb_controls_changes {
+ unsigned int changed_ctrls;
+ unsigned int enabled_ctrls_changes;
+ Bool num_groups_changed;
+};
+
+struct xkb_indicator_changes {
+ unsigned int state_changes;
+ unsigned int map_changes;
+};
+
+struct xkb_name_changes {
+ unsigned int changed;
+ unsigned char first_type;
+ unsigned char num_types;
+ unsigned char first_lvl;
+ unsigned char num_lvls;
+ unsigned char num_aliases;
+ unsigned char num_rg;
+ unsigned char first_key;
+ unsigned char num_keys;
+ unsigned short changed_vmods;
+ unsigned long changed_indicators;
+ unsigned char changed_groups;
+};
+
+struct xkb_compat_changes {
+ unsigned char changed_groups;
+ unsigned short first_si;
+ unsigned short num_si;
+};
+
+struct xkb_changes {
+ unsigned short device_spec;
+ unsigned short state_changes;
+ struct xkb_map_changes map;
+ struct xkb_controls_changes ctrls;
+ struct xkb_indicator_changes indicators;
+ struct xkb_name_changes names;
+ struct xkb_compat_changes compat;
+};
+
+struct xkb_component_names {
+ char * keymap;
+ char * keycodes;
+ char * types;
+ char * compat;
+ char * symbols;
+ char * geometry;
+};
+
+struct xkb_component_name {
+ unsigned short flags;
+ char * name;
+};
+
+struct xkb_component_list {
+ int num_keymaps;
+ int num_keycodes;
+ int num_types;
+ int num_compat;
+ int num_symbols;
+ int num_geometry;
+ struct xkb_component_name * keymaps;
+ struct xkb_component_name * keycodes;
+ struct xkb_component_name * types;
+ struct xkb_component_name * compat;
+ struct xkb_component_name * symbols;
+ struct xkb_component_name * geometry;
+};
_XFUNCPROTOBEGIN
@@ -536,17 +887,17 @@ typedef const char *(*GetAtomValueFuncPtr)(uint32_t atom);
extern void
XkbcInitAtoms(InternAtomFuncPtr intern, GetAtomValueFuncPtr get_atom_value);
-extern XkbcDescPtr
+extern struct xkb_desc *
XkbcCompileKeymapFromRules(const XkbRMLVOSet *rmlvo);
-extern XkbcDescPtr
-XkbcCompileKeymapFromComponents(const XkbComponentNamesPtr ktcsg);
+extern struct xkb_desc *
+XkbcCompileKeymapFromComponents(const struct xkb_component_names * ktcsg);
-extern XkbcDescPtr
+extern struct xkb_desc *
XkbcCompileKeymapFromFile(FILE *inputFile, const char *mapName);
-extern XkbComponentListPtr
-XkbcListComponents(XkbComponentNamesPtr ptrns, int *maxMatch);
+extern struct xkb_component_list *
+XkbcListComponents(struct xkb_component_names * ptrns, int *maxMatch);
/*
* Canonicalises component names by prepending the relevant component from
@@ -563,8 +914,8 @@ XkbcListComponents(XkbComponentNamesPtr ptrns, int *maxMatch);
* free()d, and a new one allocated with malloc().
*/
extern void
-XkbcCanonicaliseComponents(XkbComponentNamesPtr names,
- const XkbComponentNamesPtr old);
+XkbcCanonicaliseComponents(struct xkb_component_names * names,
+ const struct xkb_component_names * old);
/*
* Converts a keysym to a string; will return unknown Unicode codepoints
diff --git a/src/alloc.c b/src/alloc.c
index 355d10d..91b0b59 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -33,10 +33,10 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/extensions/XKB.h>
int
-XkbcAllocCompatMap(XkbcDescPtr xkb, unsigned which, unsigned nSI)
+XkbcAllocCompatMap(struct xkb_desc * xkb, unsigned which, unsigned nSI)
{
- XkbcCompatMapPtr compat;
- XkbcSymInterpretRec *prev_interpret;
+ struct xkb_compat_map * compat;
+ struct xkb_sym_interpret *prev_interpret;
if (!xkb)
return BadMatch;
@@ -52,7 +52,7 @@ XkbcAllocCompatMap(XkbcDescPtr xkb, unsigned which, unsigned nSI)
prev_interpret = compat->sym_interpret;
compat->sym_interpret = _XkbTypedRealloc(compat->sym_interpret,
- nSI, XkbcSymInterpretRec);
+ nSI, struct xkb_sym_interpret);
if (!compat->sym_interpret) {
free(prev_interpret);
compat->size_si = compat->num_si = 0;
@@ -61,17 +61,17 @@ XkbcAllocCompatMap(XkbcDescPtr xkb, unsigned which, unsigned nSI)
if (compat->num_si != 0)
_XkbClearElems(compat->sym_interpret, compat->num_si,
- compat->size_si - 1, XkbcSymInterpretRec);
+ compat->size_si - 1, struct xkb_sym_interpret);
return Success;
}
- compat = _XkbTypedCalloc(1, XkbcCompatMapRec);
+ compat = _XkbTypedCalloc(1, struct xkb_compat_map);
if (!compat)
return BadAlloc;
if (nSI > 0) {
- compat->sym_interpret = _XkbTypedCalloc(nSI, XkbcSymInterpretRec);
+ compat->sym_interpret = _XkbTypedCalloc(nSI, struct xkb_sym_interpret);
if (!compat->sym_interpret) {
free(compat);
return BadAlloc;
@@ -79,7 +79,7 @@ XkbcAllocCompatMap(XkbcDescPtr xkb, unsigned which, unsigned nSI)
}
compat->size_si = nSI;
compat->num_si = 0;
- bzero(&compat->groups[0], XkbNumKbdGroups * sizeof(XkbcModsRec));
+ bzero(&compat->groups[0], XkbNumKbdGroups * sizeof(struct xkb_mods));
xkb->compat = compat;
return Success;
@@ -87,9 +87,9 @@ XkbcAllocCompatMap(XkbcDescPtr xkb, unsigned which, unsigned nSI)
void
-XkbcFreeCompatMap(XkbcDescPtr xkb, unsigned which, Bool freeMap)
+XkbcFreeCompatMap(struct xkb_desc * xkb, unsigned which, Bool freeMap)
{
- XkbcCompatMapPtr compat;
+ struct xkb_compat_map * compat;
if (!xkb || !xkb->compat)
return;
@@ -99,7 +99,7 @@ XkbcFreeCompatMap(XkbcDescPtr xkb, unsigned which, Bool freeMap)
which = XkbAllCompatMask;
if (which & XkbGroupCompatMask)
- bzero(&compat->groups[0], XkbNumKbdGroups * sizeof(XkbcModsRec));
+ bzero(&compat->groups[0], XkbNumKbdGroups * sizeof(struct xkb_mods));
if (which & XkbSymInterpMask) {
if (compat->sym_interpret && (compat->size_si > 0))
@@ -115,15 +115,15 @@ XkbcFreeCompatMap(XkbcDescPtr xkb, unsigned which, Bool freeMap)
}
int
-XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG, int nTotalAliases)
+XkbcAllocNames(struct xkb_desc * xkb, unsigned which, int nTotalRG, int nTotalAliases)
{
- XkbcNamesPtr names;
+ struct xkb_names * names;
if (!xkb)
return BadMatch;
if (!xkb->names) {
- xkb->names = _XkbTypedCalloc(1, XkbcNamesRec);
+ xkb->names = _XkbTypedCalloc(1, struct xkb_names);
if (!xkb->names)
return BadAlloc;
}
@@ -131,7 +131,7 @@ XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG, int nTotalAliases)
if ((which & XkbKTLevelNamesMask) && xkb->map && xkb->map->types) {
int i;
- XkbcKeyTypePtr type;
+ struct xkb_key_type * type;
type = xkb->map->types;
for (i = 0; i < xkb->map->num_types; i++, type++) {
@@ -149,7 +149,7 @@ XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG, int nTotalAliases)
(xkb->max_key_code < xkb->min_key_code))
return BadValue;
- names->keys = _XkbTypedCalloc(xkb->max_key_code + 1, XkbKeyNameRec);
+ names->keys = _XkbTypedCalloc(xkb->max_key_code + 1, struct xkb_key_name);
if (!names->keys)
return BadAlloc;
}
@@ -157,16 +157,16 @@ XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG, int nTotalAliases)
if ((which & XkbKeyAliasesMask) && (nTotalAliases > 0)) {
if (!names->key_aliases)
names->key_aliases = _XkbTypedCalloc(nTotalAliases,
- XkbKeyAliasRec);
+ struct xkb_key_alias);
else if (nTotalAliases > names->num_key_aliases) {
- XkbKeyAliasRec *prev_aliases = names->key_aliases;
+ struct xkb_key_alias *prev_aliases = names->key_aliases;
names->key_aliases = _XkbTypedRealloc(names->key_aliases,
nTotalAliases,
- XkbKeyAliasRec);
+ struct xkb_key_alias);
if (names->key_aliases)
_XkbClearElems(names->key_aliases, names->num_key_aliases,
- nTotalAliases - 1, XkbKeyAliasRec);
+ nTotalAliases - 1, struct xkb_key_alias);
else
free(prev_aliases);
}
@@ -204,9 +204,9 @@ XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG, int nTotalAliases)
}
void
-XkbcFreeNames(XkbcDescPtr xkb, unsigned which, Bool freeMap)
+XkbcFreeNames(struct xkb_desc * xkb, unsigned which, Bool freeMap)
{
- XkbcNamesPtr names;
+ struct xkb_names * names;
if (!xkb || !xkb->names)
return;
@@ -216,11 +216,11 @@ XkbcFreeNames(XkbcDescPtr xkb, unsigned which, Bool freeMap)
which = XkbAllNamesMask;
if (which & XkbKTLevelNamesMask) {
- XkbcClientMapPtr map = xkb->map;
+ struct xkb_client_map * map = xkb->map;
if (map && map->types) {
int i;
- XkbcKeyTypePtr type = map->types;
+ struct xkb_key_type * type = map->types;
for (i = 0; i < map->num_types; i++, type++) {
if (type->level_names) {
@@ -256,13 +256,13 @@ XkbcFreeNames(XkbcDescPtr xkb, unsigned which, Bool freeMap)
}
int
-XkbcAllocControls(XkbcDescPtr xkb, unsigned which)
+XkbcAllocControls(struct xkb_desc * xkb, unsigned which)
{
if (!xkb)
return BadMatch;
if (!xkb->ctrls) {
- xkb->ctrls = _XkbTypedCalloc(1, XkbControlsRec);
+ xkb->ctrls = _XkbTypedCalloc(1, struct xkb_controls);
if (!xkb->ctrls)
return BadAlloc;
}
@@ -271,7 +271,7 @@ XkbcAllocControls(XkbcDescPtr xkb, unsigned which)
}
void
-XkbcFreeControls(XkbcDescPtr xkb, unsigned which, Bool freeMap)
+XkbcFreeControls(struct xkb_desc * xkb, unsigned which, Bool freeMap)
{
if (freeMap && xkb && xkb->ctrls) {
free(xkb->ctrls);
@@ -280,13 +280,13 @@ XkbcFreeControls(XkbcDescPtr xkb, unsigned which, Bool freeMap)
}
int
-XkbcAllocIndicatorMaps(XkbcDescPtr xkb)
+XkbcAllocIndicatorMaps(struct xkb_desc * xkb)
{
if (!xkb)
return BadMatch;
if (!xkb->indicators) {
- xkb->indicators = _XkbTypedCalloc(1, XkbIndicatorRec);
+ xkb->indicators = _XkbTypedCalloc(1, struct xkb_indicator);
if (!xkb->indicators)
return BadAlloc;
}
@@ -295,7 +295,7 @@ XkbcAllocIndicatorMaps(XkbcDescPtr xkb)
}
void
-XkbcFreeIndicatorMaps(XkbcDescPtr xkb)
+XkbcFreeIndicatorMaps(struct xkb_desc * xkb)
{
if (xkb && xkb->indicators) {
free(xkb->indicators);
@@ -303,19 +303,19 @@ XkbcFreeIndicatorMaps(XkbcDescPtr xkb)
}
}
-XkbcDescRec *
+struct xkb_desc *
XkbcAllocKeyboard(void)
{
- XkbcDescRec *xkb;
+ struct xkb_desc *xkb;
- xkb = _XkbTypedCalloc(1, XkbcDescRec);
+ xkb = _XkbTypedCalloc(1, struct xkb_desc);
if (xkb)
xkb->device_spec = XkbUseCoreKbd;
return xkb;
}
void
-XkbcFreeKeyboard(XkbcDescPtr xkb, unsigned which, Bool freeAll)
+XkbcFreeKeyboard(struct xkb_desc * xkb, unsigned which, Bool freeAll)
{
if (!xkb)
return;
diff --git a/src/galloc.c b/src/galloc.c
index eb3821a..88d11b4 100644
--- a/src/galloc.c
+++ b/src/galloc.c
@@ -115,7 +115,7 @@ _XkbFreeGeomNonLeafElems(Bool freeAll, int first, int count,
static void
_XkbClearProperty(char *prop_in)
{
- XkbcPropertyPtr prop = (XkbcPropertyPtr)prop_in;
+ struct xkb_property * prop = (struct xkb_property *)prop_in;
if (prop->name) {
free(prop->name);
@@ -128,113 +128,113 @@ _XkbClearProperty(char *prop_in)
}
void
-XkbcFreeGeomProperties(XkbcGeometryPtr geom, int first, int count, Bool freeAll)
+XkbcFreeGeomProperties(struct xkb_geometry * geom, int first, int count, Bool freeAll)
{
_XkbFreeGeomNonLeafElems(freeAll, first, count,
&geom->num_properties, &geom->sz_properties,
(char **)&geom->properties,
- sizeof(XkbcPropertyRec),
+ sizeof(struct xkb_property),
_XkbClearProperty);
}
void
-XkbcFreeGeomKeyAliases(XkbcGeometryPtr geom, int first, int count, Bool freeAll)
+XkbcFreeGeomKeyAliases(struct xkb_geometry * geom, int first, int count, Bool freeAll)
{
_XkbFreeGeomLeafElems(freeAll, first, count,
&geom->num_key_aliases, &geom->sz_key_aliases,
(char **)&geom->key_aliases,
- sizeof(XkbKeyAliasRec));
+ sizeof(struct xkb_key_alias));
}
static void
_XkbClearColor(char *color_in)
{
- XkbcColorPtr color = (XkbcColorPtr)color_in;
+ struct xkb_color * color = (struct xkb_color *)color_in;
if (color->spec)
free(color->spec);
}
void
-XkbcFreeGeomColors(XkbcGeometryPtr geom, int first, int count, Bool freeAll)
+XkbcFreeGeomColors(struct xkb_geometry * geom, int first, int count, Bool freeAll)
{
_XkbFreeGeomNonLeafElems(freeAll, first, count,
&geom->num_colors, &geom->sz_colors,
- (char **)&geom->colors, sizeof(XkbcColorRec),
+ (char **)&geom->colors, sizeof(struct xkb_color),
_XkbClearColor);
}
void
-XkbcFreeGeomPoints(XkbcOutlinePtr outline, int first, int count, Bool freeAll)
+XkbcFreeGeomPoints(struct xkb_outline * outline, int first, int count, Bool freeAll)
{
_XkbFreeGeomLeafElems(freeAll, first, count,
&outline->num_points, &outline->sz_points,
- (char **)&outline->points, sizeof(XkbcPointRec));
+ (char **)&outline->points, sizeof(struct xkb_point));
}
static void
_XkbClearOutline(char *outline_in)
{
- XkbcOutlinePtr outline = (XkbcOutlinePtr)outline_in;
+ struct xkb_outline * outline = (struct xkb_outline *)outline_in;
if (outline->points)
XkbcFreeGeomPoints(outline, 0, outline->num_points, True);
}
void
-XkbcFreeGeomOutlines(XkbcShapePtr shape, int first, int count, Bool freeAll)
+XkbcFreeGeomOutlines(struct xkb_shape * shape, int first, int count, Bool freeAll)
{
_XkbFreeGeomNonLeafElems(freeAll, first, count,
&shape->num_outlines, &shape->sz_outlines,
- (char **)&shape->outlines, sizeof(XkbcOutlineRec),
+ (char **)&shape->outlines, sizeof(struct xkb_outline),
_XkbClearOutline);
}
static void
_XkbClearShape(char *shape_in)
{
- XkbcShapePtr shape = (XkbcShapePtr)shape_in;
+ struct xkb_shape * shape = (struct xkb_shape *)shape_in;
if (shape->outlines)
XkbcFreeGeomOutlines(shape, 0, shape->num_outlines, True);
}
void
-XkbcFreeGeomShapes(XkbcGeometryPtr geom, int first, int count, Bool freeAll)
+XkbcFreeGeomShapes(struct xkb_geometry * geom, int first, int count, Bool freeAll)
{
_XkbFreeGeomNonLeafElems(freeAll, first, count,
&geom->num_shapes, &geom->sz_shapes,
- (char **)&geom->shapes, sizeof(XkbcShapeRec),
+ (char **)&geom->shapes, sizeof(struct xkb_shape),
_XkbClearShape);
}
void
-XkbcFreeGeomOverlayKeys(XkbcOverlayRowPtr row, int first, int count,
+XkbcFreeGeomOverlayKeys(struct xkb_overlay_row * row, int first, int count,
Bool freeAll)
{
_XkbFreeGeomLeafElems(freeAll, first, count,
&row->num_keys, &row->sz_keys,
- (char **)&row->keys, sizeof(XkbcOverlayKeyRec));
+ (char **)&row->keys, sizeof(struct xkb_overlay_key));
}
static void
_XkbClearOverlayRow(char *row_in)
{
- XkbcOverlayRowPtr row = (XkbcOverlayRowPtr)row_in;
+ struct xkb_overlay_row * row = (struct xkb_overlay_row *)row_in;
if (row->keys)
XkbcFreeGeomOverlayKeys(row, 0, row->num_keys, True);
}
void
-XkbcFreeGeomOverlayRows(XkbcOverlayPtr overlay, int first, int count,
+XkbcFreeGeomOverlayRows(struct xkb_overlay * overlay, int first, int count,
Bool freeAll)
{
_XkbFreeGeomNonLeafElems(freeAll, first, count,
&overlay->num_rows, &overlay->sz_rows,
(char **)&overlay->rows,
- sizeof(XkbcOverlayRowRec),
+ sizeof(struct xkb_overlay_row),
_XkbClearOverlayRow);
}
@@ -242,47 +242,47 @@ XkbcFreeGeomOverlayRows(XkbcOverlayPtr overlay, int first, int count,
static void
_XkbClearOverlay(char *overlay_in)
{
- XkbcOverlayPtr overlay = (XkbcOverlayPtr)overlay_in;
+ struct xkb_overlay * overlay = (struct xkb_overlay *)overlay_in;
if (overlay->rows)
XkbcFreeGeomOverlayRows(overlay, 0, overlay->num_rows, True);
}
void
-XkbcFreeGeomOverlays(XkbcSectionPtr section, int first, int count, Bool freeAll)
+XkbcFreeGeomOverlays(struct xkb_section * section, int first, int count, Bool freeAll)
{
_XkbFreeGeomNonLeafElems(freeAll, first, count,
§ion->num_overlays, §ion->sz_overlays,
(char **)§ion->overlays,
- sizeof(XkbcOverlayRec),
+ sizeof(struct xkb_overlay),
_XkbClearOverlay);
}
void
-XkbcFreeGeomKeys(XkbcRowPtr row, int first, int count, Bool freeAll)
+XkbcFreeGeomKeys(struct xkb_row * row, int first, int count, Bool freeAll)
{
_XkbFreeGeomLeafElems(freeAll, first, count,
&row->num_keys, &row->sz_keys,
- (char **)&row->keys, sizeof(XkbcKeyRec));
+ (char **)&row->keys, sizeof(struct xkb_key));
}
static void
_XkbClearRow(char *row_in)
{
- XkbcRowPtr row = (XkbcRowPtr)row_in;
+ struct xkb_row * row = (struct xkb_row *)row_in;
if (row->keys)
XkbcFreeGeomKeys(row, 0, row->num_keys, True);
}
void
-XkbcFreeGeomRows(XkbcSectionPtr section, int first, int count, Bool freeAll)
+XkbcFreeGeomRows(struct xkb_section * section, int first, int count, Bool freeAll)
{
_XkbFreeGeomNonLeafElems(freeAll, first, count,
§ion->num_rows, §ion->sz_rows,
- (char **)§ion->rows, sizeof(XkbcRowRec),
+ (char **)§ion->rows, sizeof(struct xkb_row),
_XkbClearRow);
}
@@ -290,7 +290,7 @@ XkbcFreeGeomRows(XkbcSectionPtr section, int first, int count, Bool freeAll)
static void
_XkbClearSection(char *section_in)
{
- XkbcSectionPtr section = (XkbcSectionPtr)section_in;
+ struct xkb_section * section = (struct xkb_section *)section_in;
if (section->rows)
XkbcFreeGeomRows(section, 0, section->num_rows, True);
@@ -301,11 +301,11 @@ _XkbClearSection(char *section_in)
}
void
-XkbcFreeGeomSections(XkbcGeometryPtr geom, int first, int count, Bool freeAll)
+XkbcFreeGeomSections(struct xkb_geometry * geom, int first, int count, Bool freeAll)
{
_XkbFreeGeomNonLeafElems(freeAll, first, count,
&geom->num_sections, &geom->sz_sections,
- (char **)&geom->sections, sizeof(XkbcSectionRec),
+ (char **)&geom->sections, sizeof(struct xkb_section),
_XkbClearSection);
}
@@ -313,7 +313,7 @@ XkbcFreeGeomSections(XkbcGeometryPtr geom, int first, int count, Bool freeAll)
static void
_XkbClearDoodad(char *doodad_in)
{
- XkbcDoodadPtr doodad = (XkbcDoodadPtr)doodad_in;
+ union xkb_doodad * doodad = (union xkb_doodad *)doodad_in;
switch (doodad->any.type) {
case XkbTextDoodad:
@@ -337,10 +337,10 @@ _XkbClearDoodad(char *doodad_in)
}
void
-XkbcFreeGeomDoodads(XkbcDoodadPtr doodads, int nDoodads, Bool freeAll)
+XkbcFreeGeomDoodads(union xkb_doodad * doodads, int nDoodads, Bool freeAll)
{
int i;
- XkbcDoodadPtr doodad;
+ union xkb_doodad * doodad;
if (doodads) {
for (i = 0, doodad = doodads; i < nDoodads; i++, doodad++)
@@ -351,7 +351,7 @@ XkbcFreeGeomDoodads(XkbcDoodadPtr doodads, int nDoodads, Bool freeAll)
}
void
-XkbcFreeGeometry(XkbcGeometryPtr geom, unsigned which, Bool freeMap)
+XkbcFreeGeometry(struct xkb_geometry * geom, unsigned which, Bool freeMap)
{
if (!geom)
return;
@@ -424,137 +424,137 @@ _XkbGeomAlloc(char **old, unsigned short *num, unsigned short *total,
#define _XkbAllocProps(g, n) _XkbGeomAlloc((char **)&(g)->properties, \
&(g)->num_properties, \
&(g)->sz_properties, \
- (n), sizeof(XkbcPropertyRec))
+ (n), sizeof(struct xkb_property))
#define _XkbAllocColors(g, n) _XkbGeomAlloc((char **)&(g)->colors, \
&(g)->num_colors, \
&(g)->sz_colors, \
- (n), sizeof(XkbcColorRec))
+ (n), sizeof(struct xkb_color))
#define _XkbAllocShapes(g, n) _XkbGeomAlloc((char **)&(g)->shapes, \
&(g)->num_shapes, \
&(g)->sz_shapes, \
- (n), sizeof(XkbcShapeRec))
+ (n), sizeof(struct xkb_shape))
#define _XkbAllocSections(g, n) _XkbGeomAlloc((char **)&(g)->sections, \
&(g)->num_sections, \
&(g)->sz_sections, \
- (n), sizeof(XkbcSectionRec))
+ (n), sizeof(struct xkb_section))
#define _XkbAllocDoodads(g, n) _XkbGeomAlloc((char **)&(g)->doodads, \
&(g)->num_doodads, \
&(g)->sz_doodads, \
- (n), sizeof(XkbcDoodadRec))
+ (n), sizeof(union xkb_doodad))
#define _XkbAllocKeyAliases(g, n) _XkbGeomAlloc((char **)&(g)->key_aliases, \
&(g)->num_key_aliases, \
&(g)->sz_key_aliases, \
- (n), sizeof(XkbKeyAliasRec))
+ (n), sizeof(struct xkb_key_alias))
#define _XkbAllocOutlines(s, n) _XkbGeomAlloc((char **)&(s)->outlines, \
&(s)->num_outlines, \
&(s)->sz_outlines, \
- (n), sizeof(XkbcOutlineRec))
+ (n), sizeof(struct xkb_outline))
#define _XkbAllocRows(s, n) _XkbGeomAlloc((char **)&(s)->rows, \
&(s)->num_rows, \
&(s)->sz_rows, \
- (n), sizeof(XkbcRowRec))
+ (n), sizeof(struct xkb_row))
#define _XkbAllocPoints(o, n) _XkbGeomAlloc((char **)&(o)->points, \
&(o)->num_points, \
&(o)->sz_points, \
- (n), sizeof(XkbcPointRec))
+ (n), sizeof(struct xkb_point))
#define _XkbAllocKeys(r, n) _XkbGeomAlloc((char **)&(r)->keys, \
&(r)->num_keys, \
&(r)->sz_keys, \
- (n), sizeof(XkbcKeyRec))
+ (n), sizeof(struct xkb_key))
#define _XkbAllocOverlays(s, n) _XkbGeomAlloc((char **)&(s)->overlays, \
&(s)->num_overlays, \
&(s)->sz_overlays, \
- (n), sizeof(XkbcOverlayRec))
+ (n), sizeof(struct xkb_overlay))
#define _XkbAllocOverlayRows(o, n) _XkbGeomAlloc((char **)&(o)->rows, \
&(o)->num_rows, \
&(o)->sz_rows, \
- (n), sizeof(XkbcOverlayRowRec))
+ (n), sizeof(struct xkb_overlay_row))
#define _XkbAllocOverlayKeys(r, n) _XkbGeomAlloc((char **)&(r)->keys, \
&(r)->num_keys, \
&(r)->sz_keys, \
- (n), sizeof(XkbcOverlayKeyRec))
+ (n), sizeof(struct xkb_overlay_key))
int
-XkbcAllocGeomProps(XkbcGeometryPtr geom, int nProps)
+XkbcAllocGeomProps(struct xkb_geometry * geom, int nProps)
{
return _XkbAllocProps(geom, nProps);
}
int
-XkbcAllocGeomColors(XkbcGeometryPtr geom, int nColors)
+XkbcAllocGeomColors(struct xkb_geometry * geom, int nColors)
{
return _XkbAllocColors(geom, nColors);
}
int
-XkbcAllocGeomKeyAliases(XkbcGeometryPtr geom, int nKeyAliases)
+XkbcAllocGeomKeyAliases(struct xkb_geometry * geom, int nKeyAliases)
{
return _XkbAllocKeyAliases(geom, nKeyAliases);
}
int
-XkbcAllocGeomShapes(XkbcGeometryPtr geom, int nShapes)
+XkbcAllocGeomShapes(struct xkb_geometry * geom, int nShapes)
{
return _XkbAllocShapes(geom, nShapes);
}
int
-XkbcAllocGeomSections(XkbcGeometryPtr geom, int nSections)
+XkbcAllocGeomSections(struct xkb_geometry * geom, int nSections)
{
return _XkbAllocSections(geom, nSections);
}
int
-XkbcAllocGeomOverlays(XkbcSectionPtr section, int nOverlays)
+XkbcAllocGeomOverlays(struct xkb_section * section, int nOverlays)
{
return _XkbAllocOverlays(section, nOverlays);
}
int
-XkbcAllocGeomOverlayRows(XkbcOverlayPtr overlay, int nRows)
+XkbcAllocGeomOverlayRows(struct xkb_overlay * overlay, int nRows)
{
return _XkbAllocOverlayRows(overlay, nRows);
}
int
-XkbcAllocGeomOverlayKeys(XkbcOverlayRowPtr row, int nKeys)
+XkbcAllocGeomOverlayKeys(struct xkb_overlay_row * row, int nKeys)
{
return _XkbAllocOverlayKeys(row, nKeys);
}
int
-XkbcAllocGeomDoodads(XkbcGeometryPtr geom, int nDoodads)
+XkbcAllocGeomDoodads(struct xkb_geometry * geom, int nDoodads)
{
return _XkbAllocDoodads(geom, nDoodads);
}
int
-XkbcAllocGeomSectionDoodads(XkbcSectionPtr section, int nDoodads)
+XkbcAllocGeomSectionDoodads(struct xkb_section * section, int nDoodads)
{
return _XkbAllocDoodads(section, nDoodads);
}
int
-XkbcAllocGeomOutlines(XkbcShapePtr shape, int nOL)
+XkbcAllocGeomOutlines(struct xkb_shape * shape, int nOL)
{
return _XkbAllocOutlines(shape, nOL);
}
int
-XkbcAllocGeomRows(XkbcSectionPtr section, int nRows)
+XkbcAllocGeomRows(struct xkb_section * section, int nRows)
{
return _XkbAllocRows(section, nRows);
}
int
-XkbcAllocGeomPoints(XkbcOutlinePtr ol, int nPts)
+XkbcAllocGeomPoints(struct xkb_outline * ol, int nPts)
{
return _XkbAllocPoints(ol, nPts);
}
int
-XkbcAllocGeomKeys(XkbcRowPtr row, int nKeys)
+XkbcAllocGeomKeys(struct xkb_row * row, int nKeys)
{
int ret = _XkbAllocKeys(row, nKeys);
fprintf(stderr, "!!! allocated %d keys at %p\n", nKeys, row->keys);
@@ -562,13 +562,13 @@ XkbcAllocGeomKeys(XkbcRowPtr row, int nKeys)
}
int
-XkbcAllocGeometry(XkbcDescPtr xkb, XkbcGeometrySizesPtr sizes)
+XkbcAllocGeometry(struct xkb_desc * xkb, struct xkb_geometry_sizes * sizes)
{
- XkbcGeometryPtr geom;
+ struct xkb_geometry * geom;
int rtrn;
if (!xkb->geom) {
- xkb->geom = _XkbTypedCalloc(1, XkbcGeometryRec);
+ xkb->geom = _XkbTypedCalloc(1, struct xkb_geometry);
if (!xkb->geom)
return BadAlloc;
}
@@ -605,11 +605,11 @@ bail:
return rtrn;
}
-XkbcPropertyPtr
-XkbcAddGeomProperty(XkbcGeometryPtr geom,const char *name,const char *value)
+struct xkb_property *
+XkbcAddGeomProperty(struct xkb_geometry * geom,const char *name,const char *value)
{
register int i;
-register XkbcPropertyPtr prop;
+register struct xkb_property * prop;
if ((!geom)||(!name)||(!value))
return NULL;
@@ -643,11 +643,11 @@ register XkbcPropertyPtr prop;
return prop;
}
-XkbKeyAliasPtr
-XkbcAddGeomKeyAlias(XkbcGeometryPtr geom,const char *aliasStr,const char *realStr)
+struct xkb_key_alias *
+XkbcAddGeomKeyAlias(struct xkb_geometry * geom,const char *aliasStr,const char *realStr)
{
register int i;
-register XkbKeyAliasPtr alias;
+register struct xkb_key_alias * alias;
if ((!geom)||(!aliasStr)||(!realStr)||(!aliasStr[0])||(!realStr[0]))
return NULL;
@@ -663,18 +663,18 @@ register XkbKeyAliasPtr alias;
return NULL;
}
alias= &geom->key_aliases[geom->num_key_aliases];
- bzero(alias,sizeof(XkbKeyAliasRec));
+ bzero(alias,sizeof(struct xkb_key_alias));
strncpy(alias->alias,aliasStr,XkbKeyNameLength);
strncpy(alias->real,realStr,XkbKeyNameLength);
geom->num_key_aliases++;
return alias;
}
-XkbcColorPtr
-XkbcAddGeomColor(XkbcGeometryPtr geom,const char *spec,unsigned int pixel)
+struct xkb_color *
+XkbcAddGeomColor(struct xkb_geometry * geom,const char *spec,unsigned int pixel)
{
register int i;
-register XkbcColorPtr color;
+register struct xkb_color * color;
if ((!geom)||(!spec))
return NULL;
@@ -698,10 +698,10 @@ register XkbcColorPtr color;
return color;
}
-XkbcOutlinePtr
-XkbcAddGeomOutline(XkbcShapePtr shape,int sz_points)
+struct xkb_outline *
+XkbcAddGeomOutline(struct xkb_shape * shape,int sz_points)
{
-XkbcOutlinePtr outline;
+struct xkb_outline * outline;
if ((!shape)||(sz_points<0))
return NULL;
@@ -710,17 +710,17 @@ XkbcOutlinePtr outline;
return NULL;
}
outline= &shape->outlines[shape->num_outlines];
- bzero(outline,sizeof(XkbcOutlineRec));
+ bzero(outline,sizeof(struct xkb_outline));
if ((sz_points>0)&&(_XkbAllocPoints(outline,sz_points)!=Success))
return NULL;
shape->num_outlines++;
return outline;
}
-XkbcShapePtr
-XkbcAddGeomShape(XkbcGeometryPtr geom,uint32_t name,int sz_outlines)
+struct xkb_shape *
+XkbcAddGeomShape(struct xkb_geometry * geom,uint32_t name,int sz_outlines)
{
-XkbcShapePtr shape;
+struct xkb_shape * shape;
register int i;
if ((!geom)||(!name)||(sz_outlines<0))
@@ -735,7 +735,7 @@ register int i;
(_XkbAllocShapes(geom,1)!=Success))
return NULL;
shape= &geom->shapes[geom->num_shapes];
- bzero(shape,sizeof(XkbcShapeRec));
+ bzero(shape,sizeof(struct xkb_shape));
if ((sz_outlines>0)&&(_XkbAllocOutlines(shape,sz_outlines)!=Success))
return NULL;
shape->name= name;
@@ -744,23 +744,23 @@ register int i;
return shape;
}
-XkbcKeyPtr
-XkbcAddGeomKey(XkbcRowPtr row)
+struct xkb_key *
+XkbcAddGeomKey(struct xkb_row * row)
{
-XkbcKeyPtr key;
+struct xkb_key * key;
if (!row)
return NULL;
if ((row->num_keys>=row->sz_keys)&&(_XkbAllocKeys(row,1)!=Success))
return NULL;
key= &row->keys[row->num_keys++];
- bzero(key,sizeof(XkbcKeyRec));
+ bzero(key,sizeof(struct xkb_key));
return key;
}
-XkbcRowPtr
-XkbcAddGeomRow(XkbcSectionPtr section,int sz_keys)
+struct xkb_row *
+XkbcAddGeomRow(struct xkb_section * section,int sz_keys)
{
-XkbcRowPtr row;
+struct xkb_row * row;
if ((!section)||(sz_keys<0))
return NULL;
@@ -768,22 +768,22 @@ XkbcRowPtr row;
(_XkbAllocRows(section,1)!=Success))
return NULL;
row= §ion->rows[section->num_rows];
- bzero(row,sizeof(XkbcRowRec));
+ bzero(row,sizeof(struct xkb_row));
if ((sz_keys>0)&&(_XkbAllocKeys(row,sz_keys)!=Success))
return NULL;
section->num_rows++;
return row;
}
-XkbcSectionPtr
-XkbcAddGeomSection( XkbcGeometryPtr geom,
+struct xkb_section *
+XkbcAddGeomSection( struct xkb_geometry * geom,
uint32_t name,
int sz_rows,
int sz_doodads,
int sz_over)
{
register int i;
-XkbcSectionPtr section;
+struct xkb_section * section;
if ((!geom)||(name==None)||(sz_rows<0))
return NULL;
@@ -815,10 +815,10 @@ XkbcSectionPtr section;
return section;
}
-XkbcDoodadPtr
-XkbcAddGeomDoodad(XkbcGeometryPtr geom,XkbcSectionPtr section,uint32_t name)
+union xkb_doodad *
+XkbcAddGeomDoodad(struct xkb_geometry * geom,struct xkb_section * section,uint32_t name)
{
-XkbcDoodadPtr old,doodad;
+union xkb_doodad *old, *doodad;
register int i,nDoodads;
if ((!geom)||(name==None))
@@ -848,21 +848,21 @@ register int i,nDoodads;
return NULL;
doodad= &geom->doodads[geom->num_doodads++];
}
- bzero(doodad,sizeof(XkbcDoodadRec));
+ bzero(doodad,sizeof(union xkb_doodad));
doodad->any.name= name;
return doodad;
}
-XkbcOverlayKeyPtr
-XkbcAddGeomOverlayKey( XkbcOverlayPtr overlay,
- XkbcOverlayRowPtr row,
+struct xkb_overlay_key *
+XkbcAddGeomOverlayKey( struct xkb_overlay * overlay,
+ struct xkb_overlay_row * row,
const char * over,
const char * under)
{
register int i;
-XkbcOverlayKeyPtr key;
-XkbcSectionPtr section;
-XkbcRowPtr row_under;
+struct xkb_overlay_key * key;
+struct xkb_section * section;
+struct xkb_row * row_under;
Bool found;
if ((!overlay)||(!row)||(!over)||(!under))
@@ -888,11 +888,11 @@ Bool found;
return key;
}
-XkbcOverlayRowPtr
-XkbcAddGeomOverlayRow(XkbcOverlayPtr overlay,int row_under,int sz_keys)
+struct xkb_overlay_row *
+XkbcAddGeomOverlayRow(struct xkb_overlay * overlay,int row_under,int sz_keys)
{
register int i;
-XkbcOverlayRowPtr row;
+struct xkb_overlay_row * row;
if ((!overlay)||(sz_keys<0))
return NULL;
@@ -912,7 +912,7 @@ XkbcOverlayRowPtr row;
(_XkbAllocOverlayRows(overlay,1)!=Success))
return NULL;
row= &overlay->rows[overlay->num_rows];
- bzero(row,sizeof(XkbcOverlayRowRec));
+ bzero(row,sizeof(struct xkb_overlay_row));
if ((sz_keys>0)&&(_XkbAllocOverlayKeys(row,sz_keys)!=Success))
return NULL;
row->row_under= row_under;
@@ -920,11 +920,11 @@ XkbcOverlayRowPtr row;
return row;
}
-XkbcOverlayPtr
-XkbcAddGeomOverlay(XkbcSectionPtr section,uint32_t name,int sz_rows)
+struct xkb_overlay *
+XkbcAddGeomOverlay(struct xkb_section * section,uint32_t name,int sz_rows)
{
register int i;
-XkbcOverlayPtr overlay;
+struct xkb_overlay * overlay;
if ((!section)||(name==None)||(sz_rows==0))
return NULL;
diff --git a/src/geom.c b/src/geom.c
index 4793692..6a40026 100644
--- a/src/geom.c
+++ b/src/geom.c
@@ -40,7 +40,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#endif
static void
-_XkbCheckBounds(XkbcBoundsPtr bounds, int x, int y)
+_XkbCheckBounds(struct xkb_bounds * bounds, int x, int y)
{
if (x < bounds->x1)
bounds->x1 = x;
@@ -53,11 +53,11 @@ _XkbCheckBounds(XkbcBoundsPtr bounds, int x, int y)
}
Bool
-XkbcComputeShapeBounds(XkbcShapePtr shape)
+XkbcComputeShapeBounds(struct xkb_shape * shape)
{
int o, p;
- XkbcOutlinePtr outline;
- XkbcPointPtr pt;
+ struct xkb_outline * outline;
+ struct xkb_point * pt;
if ((!shape) || (shape->num_outlines < 1))
return False;
@@ -77,11 +77,11 @@ XkbcComputeShapeBounds(XkbcShapePtr shape)
}
Bool
-XkbcComputeShapeTop(XkbcShapePtr shape, XkbcBoundsPtr bounds)
+XkbcComputeShapeTop(struct xkb_shape * shape, struct xkb_bounds * bounds)
{
int p;
- XkbcOutlinePtr outline;
- XkbcPointPtr pt;
+ struct xkb_outline * outline;
+ struct xkb_point * pt;
if ((!shape) || (shape->num_outlines < 1))
return False;
@@ -107,18 +107,18 @@ XkbcComputeShapeTop(XkbcShapePtr shape, XkbcBoundsPtr bounds)
}
Bool
-XkbcComputeRowBounds(XkbcGeometryPtr geom, XkbcSectionPtr section, XkbcRowPtr row)
+XkbcComputeRowBounds(struct xkb_geometry * geom, struct xkb_section * section, struct xkb_row * row)
{
int k, pos;
- XkbcKeyPtr key;
- XkbcBoundsPtr bounds, sbounds;
+ struct xkb_key * key;
+ struct xkb_bounds *bounds, *sbounds;
if (!geom || !section || !row)
return False;
pos = 0;
bounds = &row->bounds;
- bzero(bounds, sizeof(XkbcBoundsRec));
+ bzero(bounds, sizeof(struct xkb_bounds));
for (key = row->keys, pos = k = 0; k < row->num_keys; k++, key++) {
sbounds = &XkbKeyShape(geom, key)->bounds;
@@ -148,19 +148,19 @@ XkbcComputeRowBounds(XkbcGeometryPtr geom, XkbcSectionPtr section, XkbcRowPtr ro
}
Bool
-XkbcComputeSectionBounds(XkbcGeometryPtr geom, XkbcSectionPtr section)
+XkbcComputeSectionBounds(struct xkb_geometry * geom, struct xkb_section * section)
{
int i;
- XkbcShapePtr shape;
- XkbcRowPtr row;
- XkbcDoodadPtr doodad;
- XkbcBoundsPtr bounds, rbounds = NULL;
+ struct xkb_shape * shape;
+ struct xkb_row * row;
+ union xkb_doodad * doodad;
+ struct xkb_bounds * bounds, *rbounds = NULL;
if (!geom || !section)
return False;
bounds = §ion->bounds;
- bzero(bounds, sizeof(XkbcBoundsRec));
+ bzero(bounds, sizeof(struct xkb_bounds));
for (i = 0, row = section->rows; i < section->num_rows; i++, row++) {
if (!XkbcComputeRowBounds(geom, section, row))
@@ -175,7 +175,7 @@ XkbcComputeSectionBounds(XkbcGeometryPtr geom, XkbcSectionPtr section)
for (i = 0, doodad = section->doodads; i < section->num_doodads;
i++, doodad++)
{
- static XkbcBoundsRec tbounds;
+ static struct xkb_bounds tbounds;
switch (doodad->any.type) {
case XkbOutlineDoodad:
diff --git a/src/malloc.c b/src/malloc.c
index ac8a75b..5abdfb5 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -29,10 +29,10 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "XKBcommonint.h"
int
-XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes)
+XkbcAllocClientMap(struct xkb_desc * xkb, unsigned which, unsigned nTotalTypes)
{
int i;
- XkbcClientMapPtr map;
+ struct xkb_client_map * map;
if (!xkb || ((nTotalTypes > 0) && (nTotalTypes < XkbNumRequiredTypes)))
return BadValue;
@@ -49,7 +49,7 @@ XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes)
}
if (!xkb->map) {
- map = _XkbTypedCalloc(1, XkbcClientMapRec);
+ map = _XkbTypedCalloc(1, struct xkb_client_map);
if (!map)
return BadAlloc;
xkb->map = map;
@@ -59,7 +59,7 @@ XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes)
if ((which & XkbKeyTypesMask) && (nTotalTypes > 0)) {
if (!map->types) {
- map->types = _XkbTypedCalloc(nTotalTypes, XkbcKeyTypeRec);
+ map->types = _XkbTypedCalloc(nTotalTypes, struct xkb_key_type);
if (!map->types)
return BadAlloc;
@@ -67,10 +67,10 @@ XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes)
map->size_types = nTotalTypes;
}
else if (map->size_types < nTotalTypes) {
- XkbcKeyTypeRec *prev_types = map->types;
+ struct xkb_key_type *prev_types = map->types;
map->types = _XkbTypedRealloc(map->types, nTotalTypes,
- XkbcKeyTypeRec);
+ struct xkb_key_type);
if (!map->types) {
free(prev_types);
map->num_types = map->size_types = 0;
@@ -79,7 +79,7 @@ XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes)
map->size_types = nTotalTypes;
bzero(&map->types[map->num_types],
- (map->size_types - map->num_types) * sizeof(XkbcKeyTypeRec));
+ (map->size_types - map->num_types) * sizeof(struct xkb_key_type));
}
}
@@ -99,7 +99,7 @@ XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes)
if (!map->key_sym_map) {
i = xkb->max_key_code + 1;
- map->key_sym_map = _XkbTypedCalloc(i, XkbSymMapRec);
+ map->key_sym_map = _XkbTypedCalloc(i, struct xkb_sym_map);
if (!map->key_sym_map)
return BadAlloc;
}
@@ -123,16 +123,16 @@ XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes)
}
int
-XkbcAllocServerMap(XkbcDescPtr xkb, unsigned which, unsigned nNewActions)
+XkbcAllocServerMap(struct xkb_desc * xkb, unsigned which, unsigned nNewActions)
{
int i;
- XkbcServerMapPtr map;
+ struct xkb_server_map * map;
if (!xkb)
return BadMatch;
if (!xkb->server) {
- map = _XkbTypedCalloc(1, XkbcServerMapRec);
+ map = _XkbTypedCalloc(1, struct xkb_server_map);
if (!map)
return BadAlloc;
@@ -207,7 +207,7 @@ XkbcAllocServerMap(XkbcDescPtr xkb, unsigned which, unsigned nNewActions)
if (!map->behaviors) {
i = xkb->max_key_code + 1;
- map->behaviors = _XkbTypedCalloc(i, XkbBehavior);
+ map->behaviors = _XkbTypedCalloc(i, struct xkb_behavior);
if (!map->behaviors)
return BadAlloc;
}
@@ -231,7 +231,7 @@ XkbcAllocServerMap(XkbcDescPtr xkb, unsigned which, unsigned nNewActions)
}
int
-XkbcCopyKeyType(XkbcKeyTypePtr from, XkbcKeyTypePtr into)
+XkbcCopyKeyType(struct xkb_key_type * from, struct xkb_key_type * into)
{
if (!from || !into)
return BadMatch;
@@ -252,19 +252,19 @@ XkbcCopyKeyType(XkbcKeyTypePtr from, XkbcKeyTypePtr into)
*into = *from;
if (from->map && (into->map_count > 0)) {
- into->map = _XkbTypedCalloc(into->map_count, XkbcKTMapEntryRec);
+ into->map = _XkbTypedCalloc(into->map_count, struct xkb_kt_map_entry);
if (!into->map)
return BadAlloc;
memcpy(into->map, from->map,
- into->map_count * sizeof(XkbcKTMapEntryRec));
+ into->map_count * sizeof(struct xkb_kt_map_entry));
}
if (from->preserve && (into->map_count > 0)) {
- into->preserve = _XkbTypedCalloc(into->map_count, XkbcModsRec);
+ into->preserve = _XkbTypedCalloc(into->map_count, struct xkb_mods);
if (!into->preserve)
return BadAlloc;
memcpy(into->preserve, from->preserve,
- into->map_count * sizeof(XkbcModsRec));
+ into->map_count * sizeof(struct xkb_mods));
}
if (from->level_names && (into->num_levels > 0)) {
@@ -279,7 +279,7 @@ XkbcCopyKeyType(XkbcKeyTypePtr from, XkbcKeyTypePtr into)
}
int
-XkbcCopyKeyTypes(XkbcKeyTypePtr from, XkbcKeyTypePtr into, int num_types)
+XkbcCopyKeyTypes(struct xkb_key_type * from, struct xkb_key_type * into, int num_types)
{
int i, rtrn;
@@ -295,10 +295,10 @@ XkbcCopyKeyTypes(XkbcKeyTypePtr from, XkbcKeyTypePtr into, int num_types)
}
int
-XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
+XkbcResizeKeyType(struct xkb_desc * xkb, int type_ndx, int map_count,
Bool want_preserve, int new_num_lvls)
{
- XkbcKeyTypePtr type;
+ struct xkb_key_type * type;
KeyCode matchingKeys[XkbMaxKeyCount], nMatchingKeys;
if ((type_ndx < 0) || (type_ndx >= xkb->map->num_types) ||
@@ -330,11 +330,11 @@ XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
type->map_count = 0;
}
else {
- XkbcKTMapEntryRec *prev_map = type->map;
+ struct xkb_kt_map_entry *prev_map = type->map;
if ((map_count > type->map_count) || !type->map)
type->map = _XkbTypedRealloc(type->map, map_count,
- XkbcKTMapEntryRec);
+ struct xkb_kt_map_entry);
if (!type->map) {
if (prev_map)
free(prev_map);
@@ -342,11 +342,11 @@ XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
}
if (want_preserve) {
- XkbcModsRec *prev_preserve = type->preserve;
+ struct xkb_mods *prev_preserve = type->preserve;
if ((map_count > type->map_count) || !type->preserve)
type->preserve = _XkbTypedRealloc(type->preserve, map_count,
- XkbcModsRec);
+ struct xkb_mods);
if (!type->preserve) {
if (prev_preserve)
free(prev_preserve);
@@ -514,7 +514,7 @@ XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
}
uint32_t *
-XkbcResizeKeySyms(XkbcDescPtr xkb, int key, int needed)
+XkbcResizeKeySyms(struct xkb_desc * xkb, int key, int needed)
{
int i, nSyms, nKeySyms;
unsigned nOldSyms;
@@ -602,8 +602,8 @@ _ExtendRange(unsigned int old_flags, unsigned int flag, KeyCode newKC,
}
int
-XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
- XkbChangesPtr changes)
+XkbcChangeKeycodeRange(struct xkb_desc * xkb, int minKC, int maxKC,
+ struct xkb_changes * changes)
{
int tmp;
@@ -621,7 +621,7 @@ XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
if (xkb->map) {
if (xkb->map->key_sym_map) {
bzero(&xkb->map->key_sym_map[minKC],
- tmp * sizeof(XkbSymMapRec));
+ tmp * sizeof(struct xkb_sym_map));
if (changes)
changes->map.changed = _ExtendRange(changes->map.changed,
XkbKeySymsMask, minKC,
@@ -642,7 +642,7 @@ XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
if (xkb->server) {
if (xkb->server->behaviors) {
bzero(&xkb->server->behaviors[minKC],
- tmp * sizeof(XkbBehavior));
+ tmp * sizeof(struct xkb_behavior));
if (changes)
changes->map.changed = _ExtendRange(changes->map.changed,
XkbKeyBehaviorsMask, minKC,
@@ -672,7 +672,7 @@ XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
}
if (xkb->names && xkb->names->keys) {
- bzero(&xkb->names->keys[minKC], tmp * sizeof(XkbKeyNameRec));
+ bzero(&xkb->names->keys[minKC], tmp * sizeof(struct xkb_key_name));
if (changes)
changes->names.changed = _ExtendRange(changes->names.changed,
XkbKeyNamesMask, minKC,
@@ -690,18 +690,18 @@ XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
if (xkb->map) {
if (xkb->map->key_sym_map) {
- XkbSymMapRec *prev_key_sym_map = xkb->map->key_sym_map;
+ struct xkb_sym_map *prev_key_sym_map = xkb->map->key_sym_map;
xkb->map->key_sym_map = _XkbTypedRealloc(xkb->map->key_sym_map,
maxKC + 1,
- XkbSymMapRec);
+ struct xkb_sym_map);
if (!xkb->map->key_sym_map) {
free(prev_key_sym_map);
return BadAlloc;
}
bzero(&xkb->map->key_sym_map[xkb->max_key_code],
- tmp * sizeof(XkbSymMapRec));
+ tmp * sizeof(struct xkb_sym_map));
if (changes)
changes->map.changed = _ExtendRange(changes->map.changed,
XkbKeySymsMask, maxKC,
@@ -730,18 +730,18 @@ XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
if (xkb->server) {
if (xkb->server->behaviors) {
- XkbBehavior *prev_behaviors = xkb->server->behaviors;
+ struct xkb_behavior *prev_behaviors = xkb->server->behaviors;
xkb->server->behaviors = _XkbTypedRealloc(xkb->server->behaviors,
maxKC + 1,
- XkbBehavior);
+ struct xkb_behavior);
if (!xkb->server->behaviors) {
free(prev_behaviors);
return BadAlloc;
}
bzero(&xkb->server->behaviors[xkb->max_key_code],
- tmp * sizeof(XkbBehavior));
+ tmp * sizeof(struct xkb_behavior));
if (changes)
changes->map.changed = _ExtendRange(changes->map.changed,
XkbKeyBehaviorsMask, maxKC,
@@ -791,17 +791,17 @@ XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
}
if (xkb->names && xkb->names->keys ) {
- XkbKeyNameRec *prev_keys = xkb->names->keys;
+ struct xkb_key_name *prev_keys = xkb->names->keys;
xkb->names->keys = _XkbTypedRealloc(xkb->names->keys, maxKC + 1,
- XkbKeyNameRec);
+ struct xkb_key_name);
if (!xkb->names->keys) {
free(prev_keys);
return BadAlloc;
}
bzero(&xkb->names->keys[xkb->max_key_code],
- tmp * sizeof(XkbKeyNameRec));
+ tmp * sizeof(struct xkb_key_name));
if (changes)
changes->names.changed = _ExtendRange(changes->names.changed,
XkbKeyNamesMask, maxKC,
@@ -816,7 +816,7 @@ XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
}
union xkb_action *
-XkbcResizeKeyActions(XkbcDescPtr xkb, int key, int needed)
+XkbcResizeKeyActions(struct xkb_desc * xkb, int key, int needed)
{
int i, nActs;
union xkb_action *newActs;
@@ -876,9 +876,9 @@ XkbcResizeKeyActions(XkbcDescPtr xkb, int key, int needed)
}
void
-XkbcFreeClientMap(XkbcDescPtr xkb, unsigned what, Bool freeMap)
+XkbcFreeClientMap(struct xkb_desc * xkb, unsigned what, Bool freeMap)
{
- XkbcClientMapPtr map;
+ struct xkb_client_map * map;
if (!xkb || !xkb->map)
return;
@@ -891,7 +891,7 @@ XkbcFreeClientMap(XkbcDescPtr xkb, unsigned what, Bool freeMap)
if (map->types) {
if (map->num_types > 0) {
int i;
- XkbcKeyTypePtr type;
+ struct xkb_key_type * type;
for (i = 0, type = map->types; i < map->num_types; i++, type++) {
if (type->map) {
@@ -939,9 +939,9 @@ XkbcFreeClientMap(XkbcDescPtr xkb, unsigned what, Bool freeMap)
}
void
-XkbcFreeServerMap(XkbcDescPtr xkb, unsigned what, Bool freeMap)
+XkbcFreeServerMap(struct xkb_desc * xkb, unsigned what, Bool freeMap)
{
- XkbcServerMapPtr map;
+ struct xkb_server_map * map;
if (!xkb || !xkb->server)
return;
diff --git a/src/maprules.c b/src/maprules.c
index 326ed2b..e60f30a 100644
--- a/src/maprules.c
+++ b/src/maprules.c
@@ -600,7 +600,7 @@ Apply(char *src, char **dst)
static void
XkbRF_ApplyRule( XkbRF_RulePtr rule,
- XkbComponentNamesPtr names)
+ struct xkb_component_names * names)
{
rule->flags&= ~XkbRF_PendingMatch; /* clear the flag because it's applied */
@@ -639,7 +639,7 @@ CheckGroup( XkbRF_RulesPtr rules,
static int
XkbRF_CheckApplyRule( XkbRF_RulePtr rule,
XkbRF_MultiDefsPtr mdefs,
- XkbComponentNamesPtr names,
+ struct xkb_component_names * names,
XkbRF_RulesPtr rules)
{
Bool pending = False;
@@ -722,7 +722,7 @@ XkbRF_RulePtr rule;
}
static void
-XkbRF_ApplyPartialMatches(XkbRF_RulesPtr rules,XkbComponentNamesPtr names)
+XkbRF_ApplyPartialMatches(XkbRF_RulesPtr rules,struct xkb_component_names * names)
{
int i;
XkbRF_RulePtr rule;
@@ -737,7 +737,7 @@ XkbRF_RulePtr rule;
static void
XkbRF_CheckApplyRules( XkbRF_RulesPtr rules,
XkbRF_MultiDefsPtr mdefs,
- XkbComponentNamesPtr names,
+ struct xkb_component_names * names,
int flags)
{
int i;
@@ -856,13 +856,13 @@ int len, ndx;
Bool
XkbcRF_GetComponents( XkbRF_RulesPtr rules,
XkbRF_VarDefsPtr defs,
- XkbComponentNamesPtr names)
+ struct xkb_component_names * names)
{
XkbRF_MultiDefsRec mdefs;
MakeMultiDefs(&mdefs, defs);
- bzero((char *)names,sizeof(XkbComponentNamesRec));
+ bzero((char *)names,sizeof(struct xkb_component_names));
XkbRF_ClearPartialMatches(rules);
XkbRF_CheckApplyRules(rules, &mdefs, names, XkbRF_Normal);
XkbRF_ApplyPartialMatches(rules, names);
diff --git a/src/misc.c b/src/misc.c
index 7c7f010..370d012 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -33,30 +33,29 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "X11/extensions/XKBcommon.h"
#include "XKBcommonint.h"
#include <X11/keysym.h>
-#include <X11/extensions/XKBfilecommon.h>
-#define mapSize(m) (sizeof(m) / sizeof(XkbcKTMapEntryRec))
-static XkbcKTMapEntryRec map2Level[]= {
+#define mapSize(m) (sizeof(m) / sizeof(struct xkb_kt_map_entry))
+static struct xkb_kt_map_entry map2Level[]= {
{ True, ShiftMask, {1, ShiftMask, 0} }
};
-static XkbcKTMapEntryRec mapAlpha[]= {
+static struct xkb_kt_map_entry mapAlpha[]= {
{ True, ShiftMask, { 1, ShiftMask, 0 } },
{ True, LockMask, { 0, LockMask, 0 } }
};
-static XkbcModsRec preAlpha[]= {
+static struct xkb_mods preAlpha[]= {
{ 0, 0, 0 },
{ LockMask, LockMask, 0 }
};
#define NL_VMOD_MASK 0
-static XkbcKTMapEntryRec mapKeypad[]= {
+static struct xkb_kt_map_entry mapKeypad[]= {
{ True, ShiftMask, { 1, ShiftMask, 0 } },
{ False, 0, { 1, 0, NL_VMOD_MASK } }
};
-static XkbcKeyTypeRec canonicalTypes[XkbNumRequiredTypes] = {
+static struct xkb_key_type canonicalTypes[XkbNumRequiredTypes] = {
{ { 0, 0, 0 },
1, /* num_levels */
0, /* map_count */
@@ -84,10 +83,10 @@ static XkbcKeyTypeRec canonicalTypes[XkbNumRequiredTypes] = {
};
int
-XkbcInitCanonicalKeyTypes(XkbcDescPtr xkb, unsigned which, int keypadVMod)
+XkbcInitCanonicalKeyTypes(struct xkb_desc * xkb, unsigned which, int keypadVMod)
{
- XkbcClientMapPtr map;
- XkbcKeyTypePtr from,to;
+ struct xkb_client_map * map;
+ struct xkb_key_type *from, *to;
int rtrn;
if (!xkb)
@@ -116,7 +115,7 @@ XkbcInitCanonicalKeyTypes(XkbcDescPtr xkb, unsigned which, int keypadVMod)
&to[XkbAlphabeticIndex]);
if ((which & XkbKeypadMask) && (rtrn == Success)) {
- XkbcKeyTypePtr type;
+ struct xkb_key_type * type;
rtrn = XkbcCopyKeyType(&from[XkbKeypadIndex], &to[XkbKeypadIndex]);
type = &to[XkbKeypadIndex];
@@ -141,7 +140,7 @@ XkbcInitCanonicalKeyTypes(XkbcDescPtr xkb, unsigned which, int keypadVMod)
}
Bool
-XkbcVirtualModsToReal(XkbcDescPtr xkb, unsigned virtual_mask,
+XkbcVirtualModsToReal(struct xkb_desc * xkb, unsigned virtual_mask,
unsigned *mask_rtrn)
{
int i, bit;
diff --git a/src/text.c b/src/text.c
index b9d841b..4c47d12 100644
--- a/src/text.c
+++ b/src/text.c
@@ -57,7 +57,7 @@ tbGetBuffer(unsigned int size)
}
char *
-XkbcVModIndexText(XkbcDescPtr xkb, unsigned ndx)
+XkbcVModIndexText(struct xkb_desc * xkb, unsigned ndx)
{
int len;
uint32_t *vmodNames;
@@ -91,7 +91,7 @@ XkbcVModIndexText(XkbcDescPtr xkb, unsigned ndx)
}
char *
-XkbcVModMaskText(XkbcDescPtr xkb, unsigned modMask, unsigned mask)
+XkbcVModMaskText(struct xkb_desc * xkb, unsigned modMask, unsigned mask)
{
int i, bit, len, rem;
char *mm = NULL, *rtrn, *str;
diff --git a/src/xkb.c b/src/xkb.c
index 28b5cf4..0cc30df 100644
--- a/src/xkb.c
+++ b/src/xkb.c
@@ -82,8 +82,8 @@ XkbcCanonicaliseComponent(char *name, const char *old)
}
void
-XkbcCanonicaliseComponents(XkbComponentNamesPtr names,
- const XkbComponentNamesPtr old)
+XkbcCanonicaliseComponents(struct xkb_component_names * names,
+ const struct xkb_component_names * old)
{
names->keycodes = XkbcCanonicaliseComponent(names->keycodes,
old ? old->keycodes : NULL);
@@ -98,12 +98,12 @@ XkbcCanonicaliseComponents(XkbComponentNamesPtr names,
}
Bool
-XkbcComputeEffectiveMap(XkbcDescPtr xkb, XkbcKeyTypePtr type,
+XkbcComputeEffectiveMap(struct xkb_desc * xkb, struct xkb_key_type * type,
unsigned char *map_rtrn)
{
int i;
unsigned tmp;
- XkbcKTMapEntryPtr entry = NULL;
+ struct xkb_kt_map_entry * entry = NULL;
if (!xkb || !type || !xkb->server)
return False;
diff --git a/src/xkballoc.h b/src/xkballoc.h
index 7c4b2cf..84f7718 100644
--- a/src/xkballoc.h
+++ b/src/xkballoc.h
@@ -29,73 +29,71 @@ authorization from the authors.
#include <X11/X.h>
#include <X11/Xdefs.h>
-#include <X11/extensions/XKBstrcommon.h>
-#include <X11/extensions/XKBrulescommon.h>
#include "X11/extensions/XKBcommon.h"
extern int
-XkbcAllocCompatMap(XkbcDescPtr xkb, unsigned which, unsigned nSI);
+XkbcAllocCompatMap(struct xkb_desc * xkb, unsigned which, unsigned nSI);
extern void
-XkbcFreeCompatMap(XkbcDescPtr xkb, unsigned which, Bool freeMap);
+XkbcFreeCompatMap(struct xkb_desc * xkb, unsigned which, Bool freeMap);
extern int
-XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG,
+XkbcAllocNames(struct xkb_desc * xkb, unsigned which, int nTotalRG,
int nTotalAliases);
extern void
-XkbcFreeNames(XkbcDescPtr xkb, unsigned which, Bool freeMap);
+XkbcFreeNames(struct xkb_desc * xkb, unsigned which, Bool freeMap);
extern int
-XkbcAllocControls(XkbcDescPtr xkb, unsigned which);
+XkbcAllocControls(struct xkb_desc * xkb, unsigned which);
extern void
-XkbcFreeControls(XkbcDescPtr xkb, unsigned which, Bool freeMap);
+XkbcFreeControls(struct xkb_desc * xkb, unsigned which, Bool freeMap);
extern int
-XkbcAllocIndicatorMaps(XkbcDescPtr xkb);
+XkbcAllocIndicatorMaps(struct xkb_desc * xkb);
extern void
-XkbcFreeIndicatorMaps(XkbcDescPtr xkb);
+XkbcFreeIndicatorMaps(struct xkb_desc * xkb);
-extern XkbcDescRec *
+extern struct xkb_desc *
XkbcAllocKeyboard(void);
extern void
-XkbcFreeKeyboard(XkbcDescPtr xkb, unsigned which, Bool freeAll);
+XkbcFreeKeyboard(struct xkb_desc * xkb, unsigned which, Bool freeAll);
/***====================================================================***/
extern int
-XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes);
+XkbcAllocClientMap(struct xkb_desc * xkb, unsigned which, unsigned nTotalTypes);
extern int
-XkbcAllocServerMap(XkbcDescPtr xkb, unsigned which, unsigned nNewActions);
+XkbcAllocServerMap(struct xkb_desc * xkb, unsigned which, unsigned nNewActions);
extern int
-XkbcCopyKeyType(XkbcKeyTypePtr from, XkbcKeyTypePtr into);
+XkbcCopyKeyType(struct xkb_key_type * from, struct xkb_key_type *into);
extern int
-XkbcCopyKeyTypes(XkbcKeyTypePtr from, XkbcKeyTypePtr into, int num_types);
+XkbcCopyKeyTypes(struct xkb_key_type * from, struct xkb_key_type *into, int num_types);
extern int
-XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
+XkbcResizeKeyType(struct xkb_desc * xkb, int type_ndx, int map_count,
Bool want_preserve, int new_num_lvls);
extern uint32_t *
-XkbcResizeKeySyms(XkbcDescPtr xkb, int key, int needed);
+XkbcResizeKeySyms(struct xkb_desc * xkb, int key, int needed);
extern int
-XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
- XkbChangesPtr changes);
+XkbcChangeKeycodeRange(struct xkb_desc * xkb, int minKC, int maxKC,
+ struct xkb_changes * changes);
extern union xkb_action *
-XkbcResizeKeyActions(XkbcDescPtr xkb, int key, int needed);
+XkbcResizeKeyActions(struct xkb_desc * xkb, int key, int needed);
extern void
-XkbcFreeClientMap(XkbcDescPtr xkb, unsigned what, Bool freeMap);
+XkbcFreeClientMap(struct xkb_desc * xkb, unsigned what, Bool freeMap);
extern void
-XkbcFreeServerMap(XkbcDescPtr xkb, unsigned what, Bool freeMap);
+XkbcFreeServerMap(struct xkb_desc * xkb, unsigned what, Bool freeMap);
#endif /* _XKBALLOC_H_ */
diff --git a/src/xkbcomp/action.c b/src/xkbcomp/action.c
index 28e5219..a384e20 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(XkbcDescPtr xkb,
+HandleNoAction(struct xkb_desc * xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
@@ -363,7 +363,7 @@ CheckLatchLockFlags(unsigned action,
}
static Bool
-CheckModifierField(XkbcDescPtr xkb,
+CheckModifierField(struct xkb_desc * xkb,
unsigned action,
ExprDef * value,
unsigned *flags_inout, unsigned *mods_rtrn)
@@ -391,7 +391,7 @@ CheckModifierField(XkbcDescPtr xkb,
}
static Bool
-HandleSetLatchMods(XkbcDescPtr xkb,
+HandleSetLatchMods(struct xkb_desc * xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
@@ -436,7 +436,7 @@ HandleSetLatchMods(XkbcDescPtr xkb,
}
static Bool
-HandleLockMods(XkbcDescPtr xkb,
+HandleLockMods(struct xkb_desc * xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
@@ -511,7 +511,7 @@ CheckGroupField(unsigned action,
}
static Bool
-HandleSetLatchGroup(XkbcDescPtr xkb,
+HandleSetLatchGroup(struct xkb_desc * xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
@@ -547,7 +547,7 @@ HandleSetLatchGroup(XkbcDescPtr xkb,
if (CheckGroupField(action->type, value, &t1, &t2))
{
act->flags = t1;
- XkbSASetGroup(act, t2);
+ act->group = t2;
return True;
}
return False;
@@ -556,7 +556,7 @@ HandleSetLatchGroup(XkbcDescPtr xkb,
}
static Bool
-HandleLockGroup(XkbcDescPtr xkb,
+HandleLockGroup(struct xkb_desc * xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
@@ -573,7 +573,7 @@ HandleLockGroup(XkbcDescPtr xkb,
if (CheckGroupField(action->type, value, &t1, &t2))
{
act->flags = t1;
- XkbSASetGroup(act, t2);
+ act->group = t2;
return True;
}
return False;
@@ -582,7 +582,7 @@ HandleLockGroup(XkbcDescPtr xkb,
}
static Bool
-HandleMovePtr(XkbcDescPtr xkb,
+HandleMovePtr(struct xkb_desc * xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
@@ -647,7 +647,7 @@ static LookupEntry lockWhich[] = {
};
static Bool
-HandlePtrBtn(XkbcDescPtr xkb,
+HandlePtrBtn(struct xkb_desc * xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
@@ -709,7 +709,7 @@ static LookupEntry ptrDflts[] = {
};
static Bool
-HandleSetPtrDflt(XkbcDescPtr xkb,
+HandleSetPtrDflt(struct xkb_desc * xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
@@ -759,9 +759,9 @@ HandleSetPtrDflt(XkbcDescPtr xkb,
return False;
}
if (value->op == OpNegate)
- XkbSASetPtrDfltValue(act, -rtrn.ival);
+ act->value = -rtrn.ival;
else
- XkbSASetPtrDfltValue(act, rtrn.ival);
+ act->value = rtrn.ival;
return True;
}
return ReportIllegal(action->type, field);
@@ -782,7 +782,7 @@ static LookupEntry isoNames[] = {
};
static Bool
-HandleISOLock(XkbcDescPtr xkb,
+HandleISOLock(struct xkb_desc * xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
@@ -829,7 +829,7 @@ HandleISOLock(XkbcDescPtr xkb,
}
static Bool
-HandleSwitchScreen(XkbcDescPtr xkb,
+HandleSwitchScreen(struct xkb_desc * xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
@@ -862,9 +862,9 @@ HandleSwitchScreen(XkbcDescPtr xkb,
return False;
}
if (value->op == OpNegate)
- XkbSASetScreen(act, -rtrn.ival);
+ act->screen = -rtrn.ival;
else
- XkbSASetScreen(act, rtrn.ival);
+ act->screen = rtrn.ival;
return True;
}
else if (field == F_Same)
@@ -921,7 +921,7 @@ LookupEntry ctrlNames[] = {
};
static Bool
-HandleSetLockControls(XkbcDescPtr xkb,
+HandleSetLockControls(struct xkb_desc * xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
@@ -953,7 +953,7 @@ static LookupEntry evNames[] = {
};
static Bool
-HandleActionMessage(XkbcDescPtr xkb,
+HandleActionMessage(struct xkb_desc * xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
@@ -1031,7 +1031,7 @@ HandleActionMessage(XkbcDescPtr xkb,
}
static Bool
-HandleRedirectKey(XkbcDescPtr xkb,
+HandleRedirectKey(struct xkb_desc * xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
@@ -1082,7 +1082,7 @@ HandleRedirectKey(XkbcDescPtr xkb,
}
static Bool
-HandleDeviceBtn(XkbcDescPtr xkb,
+HandleDeviceBtn(struct xkb_desc * xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
@@ -1152,7 +1152,7 @@ HandleDeviceBtn(XkbcDescPtr xkb,
}
static Bool
-HandleDeviceValuator(XkbcDescPtr xkb,
+HandleDeviceValuator(struct xkb_desc * xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
@@ -1167,7 +1167,7 @@ HandleDeviceValuator(XkbcDescPtr xkb,
}
static Bool
-HandlePrivate(XkbcDescPtr xkb,
+HandlePrivate(struct xkb_desc * xkb,
struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value)
{
@@ -1236,7 +1236,7 @@ HandlePrivate(XkbcDescPtr xkb,
return ReportIllegal(PrivateAction, field);
}
-typedef Bool(*actionHandler) (XkbcDescPtr /* xkb */ ,
+typedef Bool(*actionHandler) (struct xkb_desc * /* xkb */ ,
struct xkb_any_action * /* action */ ,
unsigned /* field */ ,
ExprDef * /* array_ndx */ ,
@@ -1277,7 +1277,7 @@ ApplyActionFactoryDefaults(union xkb_action * action)
{ /* increment default button */
action->dflt.affect = XkbSA_AffectDfltBtn;
action->dflt.flags = 0;
- action->dflt.valueXXX = 1;
+ action->dflt.value = 1;
}
else if (action->type == XkbSA_ISOLock)
{
@@ -1289,7 +1289,7 @@ ApplyActionFactoryDefaults(union xkb_action * action)
int
HandleActionDef(ExprDef * def,
- XkbcDescPtr xkb,
+ struct xkb_desc * xkb,
struct xkb_any_action * action, unsigned mergeMode, ActionInfo * info)
{
ExprDef *arg;
@@ -1394,7 +1394,7 @@ HandleActionDef(ExprDef * def,
/***====================================================================***/
int
-SetActionField(XkbcDescPtr xkb,
+SetActionField(struct xkb_desc * 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 8a7027d..b2ca873 100644
--- a/src/xkbcomp/action.h
+++ b/src/xkbcomp/action.h
@@ -65,13 +65,13 @@ typedef struct _ActionInfo
} ActionInfo;
extern int HandleActionDef(ExprDef * /* def */ ,
- XkbcDescPtr /* xkb */ ,
+ struct xkb_desc * /* xkb */ ,
struct xkb_any_action * /* action */ ,
unsigned /* mergeMode */ ,
ActionInfo * /* info */
);
-extern int SetActionField(XkbcDescPtr /* xkb */ ,
+extern int SetActionField(struct xkb_desc * /* xkb */ ,
char * /* elem */ ,
char * /* field */ ,
ExprDef * /* index */ ,
diff --git a/src/xkbcomp/alias.c b/src/xkbcomp/alias.c
index 665c34f..e7f2fc1 100644
--- a/src/xkbcomp/alias.c
+++ b/src/xkbcomp/alias.c
@@ -155,10 +155,10 @@ MergeAliases(AliasInfo ** into, AliasInfo ** merge, unsigned how_merge)
}
int
-ApplyAliases(XkbcDescPtr xkb, Bool toGeom, AliasInfo ** info_in)
+ApplyAliases(struct xkb_desc * xkb, Bool toGeom, AliasInfo ** info_in)
{
register int i;
- XkbKeyAliasPtr old, a;
+ struct xkb_key_alias *old, *a;
AliasInfo *info;
int nNew, nOld;
int status;
@@ -235,8 +235,8 @@ ApplyAliases(XkbcDescPtr xkb, Bool toGeom, AliasInfo ** info_in)
{
if (!xkb->geom)
{
- XkbcGeometrySizesRec sizes;
- bzero((char *) &sizes, sizeof(XkbcGeometrySizesRec));
+ struct xkb_geometry_sizes sizes;
+ bzero((char *) &sizes, sizeof(struct xkb_geometry_sizes));
sizes.which = XkbGeomKeyAliasesMask;
sizes.num_key_aliases = nOld + nNew;
status = XkbcAllocGeometry(xkb, &sizes);
diff --git a/src/xkbcomp/alias.h b/src/xkbcomp/alias.h
index 877ac6c..bcc8439 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(XkbcDescPtr /* xkb */ ,
+extern int ApplyAliases(struct xkb_desc * /* xkb */ ,
Bool /* toGeom */ ,
AliasInfo ** /* info */
);
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index e26bf24..711d29d 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -40,7 +40,7 @@
typedef struct _SymInterpInfo
{
CommonInfo defs;
- XkbcSymInterpretRec interp;
+ struct xkb_sym_interpret interp;
} SymInterpInfo;
#define _SI_VirtualMod (1<<0)
@@ -70,7 +70,7 @@ typedef struct _CompatInfo
LEDInfo *leds;
VModInfo vmods;
ActionInfo *act;
- XkbcDescPtr xkb;
+ struct xkb_desc * xkb;
} CompatInfo;
/***====================================================================***/
@@ -102,7 +102,7 @@ siText(SymInterpInfo * si, CompatInfo * info)
}
static void
-InitCompatInfo(CompatInfo * info, XkbcDescPtr xkb)
+InitCompatInfo(CompatInfo * info, struct xkb_desc * xkb)
{
register int i;
@@ -135,7 +135,7 @@ InitCompatInfo(CompatInfo * info, XkbcDescPtr xkb)
}
static void
-ClearCompatInfo(CompatInfo * info, XkbcDescPtr xkb)
+ClearCompatInfo(CompatInfo * info, struct xkb_desc * xkb)
{
register int i;
@@ -394,14 +394,14 @@ MergeIncludedCompatMaps(CompatInfo * into, CompatInfo * from, unsigned merge)
}
typedef void (*FileHandler) (XkbFile * /* rtrn */ ,
- XkbcDescPtr /* xkb */ ,
+ struct xkb_desc * /* xkb */ ,
unsigned /* merge */ ,
CompatInfo * /* info */
);
static Bool
HandleIncludeCompatMap(IncludeStmt * stmt,
- XkbcDescPtr xkb, CompatInfo * info, FileHandler hndlr)
+ struct xkb_desc * xkb, CompatInfo * info, FileHandler hndlr)
{
unsigned newMerge;
XkbFile *rtrn;
@@ -494,7 +494,7 @@ static LookupEntry useModMapValues[] = {
static int
SetInterpField(SymInterpInfo * si,
- XkbcDescPtr xkb,
+ struct xkb_desc * xkb,
char *field,
ExprDef * arrayNdx, ExprDef * value, CompatInfo * info)
{
@@ -605,7 +605,7 @@ LookupEntry groupNames[] = {
};
static int
-HandleInterpVar(VarDef * stmt, XkbcDescPtr xkb, CompatInfo * info)
+HandleInterpVar(VarDef * stmt, struct xkb_desc * xkb, CompatInfo * info)
{
ExprResult elem, field;
ExprDef *ndx;
@@ -628,7 +628,7 @@ HandleInterpVar(VarDef * stmt, XkbcDescPtr xkb, CompatInfo * info)
}
static int
-HandleInterpBody(VarDef * def, XkbcDescPtr xkb, SymInterpInfo * si,
+HandleInterpBody(VarDef * def, struct xkb_desc * xkb, SymInterpInfo * si,
CompatInfo * info)
{
int ok = 1;
@@ -651,7 +651,7 @@ HandleInterpBody(VarDef * def, XkbcDescPtr xkb, SymInterpInfo * si,
}
static int
-HandleInterpDef(InterpDef * def, XkbcDescPtr xkb, unsigned merge,
+HandleInterpDef(InterpDef * def, struct xkb_desc * xkb, unsigned merge,
CompatInfo * info)
{
unsigned pred, mods;
@@ -692,7 +692,7 @@ HandleInterpDef(InterpDef * def, XkbcDescPtr xkb, unsigned merge,
static int
HandleGroupCompatDef(GroupCompatDef * def,
- XkbcDescPtr xkb, unsigned merge, CompatInfo * info)
+ struct xkb_desc * xkb, unsigned merge, CompatInfo * info)
{
ExprResult val;
GroupCompatInfo tmp;
@@ -723,7 +723,7 @@ HandleGroupCompatDef(GroupCompatDef * def,
static void
HandleCompatMapFile(XkbFile * file,
- XkbcDescPtr xkb, unsigned merge, CompatInfo * info)
+ struct xkb_desc * xkb, unsigned merge, CompatInfo * info)
{
ParseCommon *stmt;
@@ -793,7 +793,7 @@ HandleCompatMapFile(XkbFile * file,
static void
CopyInterps(CompatInfo * info,
- XkbcCompatMapPtr compat, Bool needSymbol, unsigned pred)
+ struct xkb_compat_map * compat, Bool needSymbol, unsigned pred)
{
SymInterpInfo *si;
@@ -815,7 +815,7 @@ CopyInterps(CompatInfo * info,
}
Bool
-CompileCompatMap(XkbFile *file, XkbcDescPtr xkb, unsigned merge,
+CompileCompatMap(XkbFile *file, struct xkb_desc * xkb, unsigned merge,
LEDInfoPtr *unboundLEDs)
{
int i;
@@ -848,7 +848,7 @@ CompileCompatMap(XkbFile *file, XkbcDescPtr xkb, unsigned merge,
scanFile, info.name);
}
}
- size = info.nInterps * sizeof(XkbcSymInterpretRec);
+ size = info.nInterps * sizeof(struct xkb_sym_interpret);
if (size > 0)
{
CopyInterps(&info, xkb->compat, True, XkbSI_Exactly);
diff --git a/src/xkbcomp/expr.h b/src/xkbcomp/expr.h
index aec0cfb..1fa9f76 100644
--- a/src/xkbcomp/expr.h
+++ b/src/xkbcomp/expr.h
@@ -32,7 +32,7 @@ typedef union _ExprResult
char *str;
int ival;
unsigned uval;
- XkbKeyNameRec keyName;
+ struct xkb_key_name keyName;
} ExprResult;
typedef Bool(*IdentLookupFunc) (char * /* priv */ ,
diff --git a/src/xkbcomp/geometry.c b/src/xkbcomp/geometry.c
index b4a95d3..af26942 100644
--- a/src/xkbcomp/geometry.c
+++ b/src/xkbcomp/geometry.c
@@ -62,9 +62,9 @@ typedef struct _ShapeInfo
short index;
unsigned short nOutlines;
unsigned short szOutlines;
- XkbcOutlinePtr outlines;
- XkbcOutlinePtr approx;
- XkbcOutlinePtr primary;
+ struct xkb_outline * outlines;
+ struct xkb_outline * approx;
+ struct xkb_outline * primary;
int dfltCornerRadius;
} ShapeInfo;
@@ -1317,13 +1317,13 @@ MergeIncludedGeometry(GeometryInfo * into, GeometryInfo * from,
}
typedef void (*FileHandler) (XkbFile * /* file */ ,
- XkbcDescPtr /* xkb */ ,
+ struct xkb_desc * /* xkb */ ,
unsigned /* merge */ ,
GeometryInfo * /* info */
);
static Bool
-HandleIncludeGeometry(IncludeStmt * stmt, XkbcDescPtr xkb, GeometryInfo * info,
+HandleIncludeGeometry(IncludeStmt * stmt, struct xkb_desc * xkb, GeometryInfo * info,
FileHandler hndlr)
{
unsigned newMerge;
@@ -2113,7 +2113,7 @@ SetGeometryProperty(GeometryInfo * info, char *property, ExprDef * value)
}
static int
-HandleGeometryVar(VarDef * stmt, XkbcDescPtr xkb, GeometryInfo * info)
+HandleGeometryVar(VarDef * stmt, struct xkb_desc * xkb, GeometryInfo * info)
{
ExprResult elem, field, tmp;
ExprDef *ndx;
@@ -2398,7 +2398,7 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
{
OutlineDef *ol;
int nOut, nPt;
- XkbcOutlinePtr outline;
+ struct xkb_outline * outline;
ExprDef *pt;
if (def->nOutlines < 1)
@@ -2408,7 +2408,7 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
return True;
}
si->nOutlines = def->nOutlines;
- si->outlines = uTypedCalloc(def->nOutlines, XkbcOutlineRec);
+ si->outlines = uTypedCalloc(def->nOutlines, struct xkb_outline);
if (!si->outlines)
{
ERROR("Couldn't allocate outlines for \"%s\"\n", shText(si));
@@ -2428,7 +2428,7 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
outline = &si->outlines[nOut++];
outline->num_points = ol->nPoints;
outline->corner_radius = si->dfltCornerRadius;
- outline->points = uTypedCalloc(ol->nPoints, XkbcPointRec);
+ outline->points = uTypedCalloc(ol->nPoints, struct xkb_point);
if (!outline->points)
{
ERROR("Can't allocate points for \"%s\"\n", shText(si));
@@ -2488,7 +2488,7 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
}
static int
-HandleShapeDef(ShapeDef * def, XkbcDescPtr xkb, unsigned merge,
+HandleShapeDef(ShapeDef * def, struct xkb_desc * xkb, unsigned merge,
GeometryInfo * info)
{
ShapeInfo si;
@@ -2822,7 +2822,7 @@ HandleSectionBody(SectionDef * def,
static int
HandleSectionDef(SectionDef * def,
- XkbcDescPtr xkb, unsigned merge, GeometryInfo * info)
+ struct xkb_desc * xkb, unsigned merge, GeometryInfo * info)
{
SectionInfo si;
@@ -2842,7 +2842,7 @@ HandleSectionDef(SectionDef * def,
static void
HandleGeometryFile(XkbFile * file,
- XkbcDescPtr xkb, unsigned merge, GeometryInfo * info)
+ struct xkb_desc * xkb, unsigned merge, GeometryInfo * info)
{
ParseCommon *stmt;
char *failWhat;
@@ -2922,11 +2922,11 @@ HandleGeometryFile(XkbFile * file,
/***====================================================================***/
static Bool
-CopyShapeDef(XkbcGeometryPtr geom, ShapeInfo * si)
+CopyShapeDef(struct xkb_geometry * geom, ShapeInfo * si)
{
register int i, n;
- XkbcShapePtr shape;
- XkbcOutlinePtr old_outline, outline;
+ struct xkb_shape * shape;
+ struct xkb_outline *old_outline, *outline;
uint32_t name;
si->index = geom->num_shapes;
@@ -2949,7 +2949,7 @@ CopyShapeDef(XkbcGeometryPtr geom, ShapeInfo * si)
return False;
}
n = old_outline->num_points;
- memcpy(outline->points, old_outline->points, n * sizeof(XkbcPointRec));
+ memcpy(outline->points, old_outline->points, n * sizeof(struct xkb_point));
outline->num_points = old_outline->num_points;
outline->corner_radius = old_outline->corner_radius;
}
@@ -3284,13 +3284,13 @@ FontFromParts(uint32_t fontTok,
}
static Bool
-CopyDoodadDef(XkbcGeometryPtr geom,
- XkbcSectionPtr section, DoodadInfo * di, GeometryInfo * info)
+CopyDoodadDef(struct xkb_geometry * geom,
+ struct xkb_section * section, DoodadInfo * di, GeometryInfo * info)
{
uint32_t name;
- XkbcDoodadPtr doodad;
- XkbcColorPtr color;
- XkbcShapePtr shape;
+ union xkb_doodad * doodad;
+ struct xkb_color * color;
+ struct xkb_shape * shape;
ShapeInfo *si;
if (!VerifyDoodadInfo(di, info))
@@ -3372,15 +3372,15 @@ CopyDoodadDef(XkbcGeometryPtr geom,
/***====================================================================***/
static Bool
-VerifyOverlayInfo(XkbcGeometryPtr geom,
- XkbcSectionPtr section,
+VerifyOverlayInfo(struct xkb_geometry * geom,
+ struct xkb_section * section,
OverlayInfo * oi,
GeometryInfo * info, short rowMap[256], short rowSize[256])
{
register OverlayKeyInfo *ki, *next;
unsigned long oKey, uKey, sKey;
- XkbcRowPtr row;
- XkbcKeyPtr key;
+ struct xkb_row * row;
+ struct xkb_key * key;
int r, k;
/* find out which row each key is in */
@@ -3469,13 +3469,13 @@ VerifyOverlayInfo(XkbcGeometryPtr geom,
}
static Bool
-CopyOverlayDef(XkbcGeometryPtr geom,
- XkbcSectionPtr section, OverlayInfo * oi, GeometryInfo * info)
+CopyOverlayDef(struct xkb_geometry * geom,
+ struct xkb_section * section, OverlayInfo * oi, GeometryInfo * info)
{
uint32_t name;
- XkbcOverlayPtr ol;
- XkbcOverlayRowPtr row;
- XkbcOverlayKeyPtr key;
+ struct xkb_overlay * ol;
+ struct xkb_overlay_row * row;
+ struct xkb_overlay_key * key;
OverlayKeyInfo *ki;
short rowMap[256], rowSize[256];
int i;
@@ -3511,7 +3511,7 @@ CopyOverlayDef(XkbcGeometryPtr geom,
{
row = &ol->rows[ki->overlayRow];
key = &row->keys[row->num_keys++];
- bzero(key, sizeof(XkbcOverlayKeyRec));
+ bzero(key, sizeof(struct xkb_overlay_key));
strncpy(key->over.name, ki->over, XkbKeyNameLength);
strncpy(key->under.name, ki->under, XkbKeyNameLength);
}
@@ -3521,11 +3521,11 @@ CopyOverlayDef(XkbcGeometryPtr geom,
/***====================================================================***/
static Bool
-CopySectionDef(XkbcGeometryPtr geom, SectionInfo * si, GeometryInfo * info)
+CopySectionDef(struct xkb_geometry * geom, SectionInfo * si, GeometryInfo * info)
{
- XkbcSectionPtr section;
- XkbcRowPtr row;
- XkbcKeyPtr key;
+ struct xkb_section * section;
+ struct xkb_row * row;
+ struct xkb_key * key;
KeyInfo *ki;
RowInfo *ri;
@@ -3557,7 +3557,7 @@ CopySectionDef(XkbcGeometryPtr geom, SectionInfo * si, GeometryInfo * info)
row->vertical = ri->vertical;
for (ki = ri->keys; ki != NULL; ki = (KeyInfo *) ki->defs.next)
{
- XkbcColorPtr color;
+ struct xkb_color * color;
if ((ki->defs.defined & _GK_Name) == 0)
{
ERROR("Key %d of row %d in section %s has no name\n",
@@ -3624,7 +3624,7 @@ CopySectionDef(XkbcGeometryPtr geom, SectionInfo * si, GeometryInfo * info)
/***====================================================================***/
Bool
-CompileGeometry(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
+CompileGeometry(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
{
GeometryInfo info;
@@ -3633,8 +3633,8 @@ CompileGeometry(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
if (info.errorCount == 0)
{
- XkbcGeometryPtr geom;
- XkbcGeometrySizesRec sizes;
+ struct xkb_geometry * geom;
+ struct xkb_geometry_sizes sizes;
bzero(&sizes, sizeof(sizes));
sizes.which = XkbGeomAllMask;
sizes.num_properties = info.nProps;
diff --git a/src/xkbcomp/indicators.c b/src/xkbcomp/indicators.c
index 28b7932..8e5781e 100644
--- a/src/xkbcomp/indicators.c
+++ b/src/xkbcomp/indicators.c
@@ -199,7 +199,7 @@ static LookupEntry groupComponentNames[] = {
int
SetIndicatorMapField(LEDInfo * led,
- XkbcDescPtr xkb,
+ struct xkb_desc * xkb,
char *field, ExprDef * arrayNdx, ExprDef * value)
{
ExprResult rtrn;
@@ -323,7 +323,7 @@ SetIndicatorMapField(LEDInfo * led,
LEDInfo *
HandleIndicatorMapDef(IndicatorMapDef * def,
- XkbcDescPtr xkb,
+ struct xkb_desc * xkb,
LEDInfo * dflt, LEDInfo * oldLEDs, unsigned merge)
{
LEDInfo led, *rtrn;
@@ -372,7 +372,7 @@ HandleIndicatorMapDef(IndicatorMapDef * def,
}
Bool
-CopyIndicatorMapDefs(XkbcDescPtr xkb, LEDInfo *leds, LEDInfo **unboundRtrn)
+CopyIndicatorMapDefs(struct xkb_desc * xkb, LEDInfo *leds, LEDInfo **unboundRtrn)
{
LEDInfo *led, *next;
LEDInfo *unbound, *last;
@@ -416,7 +416,7 @@ CopyIndicatorMapDefs(XkbcDescPtr xkb, LEDInfo *leds, LEDInfo **unboundRtrn)
}
else
{
- register XkbIndicatorMapPtr im;
+ register struct xkb_indicator_map * im;
im = &xkb->indicators->maps[led->indicator - 1];
im->flags = led->flags;
im->which_groups = led->which_groups;
@@ -439,7 +439,7 @@ CopyIndicatorMapDefs(XkbcDescPtr xkb, LEDInfo *leds, LEDInfo **unboundRtrn)
}
Bool
-BindIndicators(XkbcDescPtr xkb, Bool force, LEDInfo *unbound,
+BindIndicators(struct xkb_desc * xkb, Bool force, LEDInfo *unbound,
LEDInfo **unboundRtrn)
{
register int i;
@@ -536,7 +536,7 @@ BindIndicators(XkbcDescPtr xkb, Bool force, LEDInfo *unbound,
}
else
{
- XkbIndicatorMapPtr map;
+ struct xkb_indicator_map * map;
map = &xkb->indicators->maps[led->indicator - 1];
map->flags = led->flags;
map->which_groups = led->which_groups;
diff --git a/src/xkbcomp/indicators.h b/src/xkbcomp/indicators.h
index b9c3691..f4b38f1 100644
--- a/src/xkbcomp/indicators.h
+++ b/src/xkbcomp/indicators.h
@@ -60,24 +60,24 @@ extern LEDInfo *AddIndicatorMap(LEDInfo * /* oldLEDs */ ,
);
extern int SetIndicatorMapField(LEDInfo * /* led */ ,
- XkbcDescPtr /* xkb */ ,
+ struct xkb_desc * /* xkb */ ,
char * /* field */ ,
ExprDef * /* arrayNdx */ ,
ExprDef * /* value */
);
extern LEDInfo *HandleIndicatorMapDef(IndicatorMapDef * /* stmt */ ,
- XkbcDescPtr /* xkb */ ,
+ struct xkb_desc * /* xkb */ ,
LEDInfo * /* dflt */ ,
LEDInfo * /* oldLEDs */ ,
unsigned /* mergeMode */
);
extern Bool
-CopyIndicatorMapDefs(XkbcDescPtr xkb, LEDInfo *leds, LEDInfo **unboundRtrn);
+CopyIndicatorMapDefs(struct xkb_desc * xkb, LEDInfo *leds, LEDInfo **unboundRtrn);
extern Bool
-BindIndicators(XkbcDescPtr xkb, Bool force, LEDInfo *unbound,
+BindIndicators(struct xkb_desc * xkb, Bool force, LEDInfo *unbound,
LEDInfo **unboundRtrn);
#endif /* INDICATORS_H */
diff --git a/src/xkbcomp/keycodes.c b/src/xkbcomp/keycodes.c
index acffbf1..da6580f 100644
--- a/src/xkbcomp/keycodes.c
+++ b/src/xkbcomp/keycodes.c
@@ -84,7 +84,7 @@ typedef struct _KeyNamesInfo
} KeyNamesInfo;
static void HandleKeycodesFile(XkbFile * file,
- XkbcDescPtr xkb,
+ struct xkb_desc * xkb,
unsigned merge,
KeyNamesInfo * info);
@@ -495,7 +495,7 @@ MergeIncludedKeycodes(KeyNamesInfo * into, KeyNamesInfo * from,
* @param info Struct to store the key info in.
*/
static Bool
-HandleIncludeKeycodes(IncludeStmt * stmt, XkbcDescPtr xkb, KeyNamesInfo * info)
+HandleIncludeKeycodes(IncludeStmt * stmt, struct xkb_desc * xkb, KeyNamesInfo * info)
{
unsigned newMerge;
XkbFile *rtrn;
@@ -750,7 +750,7 @@ HandleIndicatorNameDef(IndicatorNameDef * def,
*/
static void
HandleKeycodesFile(XkbFile * file,
- XkbcDescPtr xkb, unsigned merge, KeyNamesInfo * info)
+ struct xkb_desc * xkb, unsigned merge, KeyNamesInfo * info)
{
ParseCommon *stmt;
@@ -822,7 +822,7 @@ HandleKeycodesFile(XkbFile * file,
* @return True on success, False otherwise.
*/
Bool
-CompileKeycodes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
+CompileKeycodes(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
{
KeyNamesInfo info; /* contains all the info after parsing */
@@ -857,7 +857,7 @@ CompileKeycodes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
}
else
{
- WSGO("Cannot create XkbcNamesRec in CompileKeycodes\n");
+ WSGO("Cannot create struct xkb_names in CompileKeycodes\n");
return False;
}
if (info.leds)
diff --git a/src/xkbcomp/keymap.c b/src/xkbcomp/keymap.c
index f850a83..874bf8e 100644
--- a/src/xkbcomp/keymap.c
+++ b/src/xkbcomp/keymap.c
@@ -48,7 +48,7 @@ static XkbFile *sections[MAX_SECTIONS];
* XkmKeyNamesIdx, etc.)
*/
Bool
-CompileKeymap(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
+CompileKeymap(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
{
unsigned have;
Bool ok;
diff --git a/src/xkbcomp/keytypes.c b/src/xkbcomp/keytypes.c
index ca0c396..2ad8693 100644
--- a/src/xkbcomp/keytypes.c
+++ b/src/xkbcomp/keytypes.c
@@ -60,7 +60,7 @@ typedef struct _KeyTypeInfo
int numLevels;
int nEntries;
int szEntries;
- XkbcKTMapEntryPtr entries;
+ struct xkb_kt_map_entry * entries;
PreserveInfo *preserve;
int szNames;
uint32_t *lvlNames;
@@ -92,14 +92,14 @@ uint32_t tok_KEYPAD;
/***====================================================================***/
-extern Bool AddMapEntry(XkbcDescPtr /* xkb */ ,
+extern Bool AddMapEntry(struct xkb_desc * /* xkb */ ,
KeyTypeInfo * /* type */ ,
- XkbcKTMapEntryPtr /* new */ ,
+ struct xkb_kt_map_entry * /* new */ ,
Bool /* clobber */ ,
Bool /* report */
);
-extern Bool AddPreserve(XkbcDescPtr /* xkb */ ,
+extern Bool AddPreserve(struct xkb_desc * /* xkb */ ,
KeyTypeInfo * /* type */ ,
PreserveInfo * /* new */ ,
Bool /* clobber */ ,
@@ -127,7 +127,7 @@ extern Bool AddLevelName(KeyTypeInfo * /* type */ ,
/***====================================================================***/
static void
-InitKeyTypesInfo(KeyTypesInfo * info, XkbcDescPtr xkb, KeyTypesInfo * from)
+InitKeyTypesInfo(KeyTypesInfo * info, struct xkb_desc * xkb, KeyTypesInfo * from)
{
tok_ONE_LEVEL = XkbcInternAtom("ONE_LEVEL", False);
tok_TWO_LEVEL = XkbcInternAtom("TWO_LEVEL", False);
@@ -159,10 +159,10 @@ InitKeyTypesInfo(KeyTypesInfo * info, XkbcDescPtr xkb, KeyTypesInfo * from)
if (from->dflt.entries)
{
info->dflt.entries = uTypedCalloc(from->dflt.szEntries,
- XkbcKTMapEntryRec);
+ struct xkb_kt_map_entry);
if (info->dflt.entries)
{
- unsigned sz = from->dflt.nEntries * sizeof(XkbcKTMapEntryRec);
+ unsigned sz = from->dflt.nEntries * sizeof(struct xkb_kt_map_entry);
memcpy(info->dflt.entries, from->dflt.entries, sz);
}
}
@@ -277,7 +277,7 @@ ReportTypeBadWidth(const char *type, int has, int needs)
}
static Bool
-AddKeyType(XkbcDescPtr xkb, KeyTypesInfo * info, KeyTypeInfo * new)
+AddKeyType(struct xkb_desc * xkb, KeyTypesInfo * info, KeyTypeInfo * new)
{
KeyTypeInfo *old;
@@ -363,7 +363,7 @@ AddKeyType(XkbcDescPtr xkb, KeyTypesInfo * info, KeyTypeInfo * new)
static void
MergeIncludedKeyTypes(KeyTypesInfo * into,
- KeyTypesInfo * from, unsigned merge, XkbcDescPtr xkb)
+ KeyTypesInfo * from, unsigned merge, struct xkb_desc * xkb)
{
KeyTypeInfo *type;
@@ -389,14 +389,14 @@ MergeIncludedKeyTypes(KeyTypesInfo * into,
}
typedef void (*FileHandler) (XkbFile * /* file */ ,
- XkbcDescPtr /* xkb */ ,
+ struct xkb_desc * /* xkb */ ,
unsigned /* merge */ ,
KeyTypesInfo * /* included */
);
static Bool
HandleIncludeKeyTypes(IncludeStmt * stmt,
- XkbcDescPtr xkb, KeyTypesInfo * info, FileHandler hndlr)
+ struct xkb_desc * xkb, KeyTypesInfo * info, FileHandler hndlr)
{
unsigned newMerge;
XkbFile *rtrn;
@@ -472,11 +472,11 @@ HandleIncludeKeyTypes(IncludeStmt * stmt,
/***====================================================================***/
-static XkbcKTMapEntryPtr
+static struct xkb_kt_map_entry *
FindMatchingMapEntry(KeyTypeInfo * type, unsigned mask, unsigned vmask)
{
register int i;
- XkbcKTMapEntryPtr entry;
+ struct xkb_kt_map_entry * entry;
for (i = 0, entry = type->entries; i < type->nEntries; i++, entry++)
{
@@ -509,12 +509,12 @@ DeleteLevel1MapEntries(KeyTypeInfo * type)
* Return a pointer to the next free XkbcKTMapEntry, reallocating space if
* necessary.
*/
-static XkbcKTMapEntryPtr
+static struct xkb_kt_map_entry *
NextMapEntry(KeyTypeInfo * type)
{
if (type->entries == NULL)
{
- type->entries = uTypedCalloc(2, XkbcKTMapEntryRec);
+ type->entries = uTypedCalloc(2, struct xkb_kt_map_entry);
if (type->entries == NULL)
{
ERROR("Couldn't allocate map entries for %s\n", TypeTxt(type));
@@ -529,7 +529,7 @@ NextMapEntry(KeyTypeInfo * type)
type->szEntries *= 2;
type->entries = uTypedRecalloc(type->entries,
type->nEntries, type->szEntries,
- XkbcKTMapEntryRec);
+ struct xkb_kt_map_entry);
if (type->entries == NULL)
{
ERROR("Couldn't reallocate map entries for %s\n", TypeTxt(type));
@@ -541,7 +541,7 @@ NextMapEntry(KeyTypeInfo * type)
}
Bool
-AddPreserve(XkbcDescPtr xkb,
+AddPreserve(struct xkb_desc * xkb,
KeyTypeInfo * type, PreserveInfo * new, Bool clobber, Bool report)
{
PreserveInfo *old;
@@ -613,11 +613,11 @@ AddPreserve(XkbcDescPtr xkb,
* @param report True if a warning is to be printed on.
*/
Bool
-AddMapEntry(XkbcDescPtr xkb,
+AddMapEntry(struct xkb_desc * xkb,
KeyTypeInfo * type,
- XkbcKTMapEntryPtr new, Bool clobber, Bool report)
+ struct xkb_kt_map_entry * new, Bool clobber, Bool report)
{
- XkbcKTMapEntryPtr old;
+ struct xkb_kt_map_entry * old;
if ((old =
FindMatchingMapEntry(type, new->mods.real_mods, new->mods.vmods)))
@@ -679,10 +679,10 @@ static LookupEntry lnames[] = {
static Bool
SetMapEntry(KeyTypeInfo * type,
- XkbcDescPtr xkb, ExprDef * arrayNdx, ExprDef * value)
+ struct xkb_desc * xkb, ExprDef * arrayNdx, ExprDef * value)
{
ExprResult rtrn;
- XkbcKTMapEntryRec entry;
+ struct xkb_kt_map_entry entry;
if (arrayNdx == NULL)
return ReportTypeShouldBeArray(type, "map entry");
@@ -725,7 +725,7 @@ SetMapEntry(KeyTypeInfo * type,
static Bool
SetPreserve(KeyTypeInfo * type,
- XkbcDescPtr xkb, ExprDef * arrayNdx, ExprDef * value)
+ struct xkb_desc * xkb, ExprDef * arrayNdx, ExprDef * value)
{
ExprResult rtrn;
PreserveInfo new;
@@ -874,7 +874,7 @@ SetLevelName(KeyTypeInfo * type, ExprDef * arrayNdx, ExprDef * value)
*/
static Bool
SetKeyTypeField(KeyTypeInfo * type,
- XkbcDescPtr xkb,
+ struct xkb_desc * xkb,
char *field,
ExprDef * arrayNdx, ExprDef * value, KeyTypesInfo * info)
{
@@ -932,7 +932,7 @@ SetKeyTypeField(KeyTypeInfo * type,
}
static Bool
-HandleKeyTypeVar(VarDef * stmt, XkbcDescPtr xkb, KeyTypesInfo * info)
+HandleKeyTypeVar(VarDef * stmt, struct xkb_desc * xkb, KeyTypesInfo * info)
{
ExprResult elem, field;
ExprDef *arrayNdx;
@@ -958,7 +958,7 @@ HandleKeyTypeVar(VarDef * stmt, XkbcDescPtr xkb, KeyTypesInfo * info)
static int
HandleKeyTypeBody(VarDef * def,
- XkbcDescPtr xkb, KeyTypeInfo * type, KeyTypesInfo * info)
+ struct xkb_desc * xkb, KeyTypeInfo * type, KeyTypesInfo * info)
{
int ok = 1;
ExprResult tmp, field;
@@ -985,7 +985,7 @@ HandleKeyTypeBody(VarDef * def,
*/
static int
HandleKeyTypeDef(KeyTypeDef * def,
- XkbcDescPtr xkb, unsigned merge, KeyTypesInfo * info)
+ struct xkb_desc * xkb, unsigned merge, KeyTypesInfo * info)
{
register int i;
KeyTypeInfo type;
@@ -1019,7 +1019,7 @@ HandleKeyTypeDef(KeyTypeDef * def,
/* default type */
for (i = 0; i < info->dflt.nEntries; i++)
{
- XkbcKTMapEntryPtr dflt;
+ struct xkb_kt_map_entry * dflt;
dflt = &info->dflt.entries[i];
if (((dflt->mods.real_mods & type.mask) == dflt->mods.real_mods) &&
((dflt->mods.vmods & type.vmask) == dflt->mods.vmods))
@@ -1065,7 +1065,7 @@ HandleKeyTypeDef(KeyTypeDef * def,
*/
static void
HandleKeyTypesFile(XkbFile * file,
- XkbcDescPtr xkb, unsigned merge, KeyTypesInfo * info)
+ struct xkb_desc * xkb, unsigned merge, KeyTypesInfo * info)
{
ParseCommon *stmt;
@@ -1126,7 +1126,7 @@ HandleKeyTypesFile(XkbFile * file,
}
static Bool
-CopyDefToKeyType(XkbcDescPtr xkb, XkbcKeyTypePtr type, KeyTypeInfo * def)
+CopyDefToKeyType(struct xkb_desc * xkb, struct xkb_key_type * type, KeyTypeInfo * def)
{
register int i;
PreserveInfo *pre;
@@ -1134,8 +1134,8 @@ CopyDefToKeyType(XkbcDescPtr xkb, XkbcKeyTypePtr type, KeyTypeInfo * def)
for (pre = def->preserve; pre != NULL;
pre = (PreserveInfo *) pre->defs.next)
{
- XkbcKTMapEntryPtr match;
- XkbcKTMapEntryRec tmp;
+ struct xkb_kt_map_entry * match;
+ struct xkb_kt_map_entry tmp;
tmp.mods.real_mods = pre->indexMods;
tmp.mods.vmods = pre->indexVMods;
tmp.level = 0;
@@ -1156,7 +1156,7 @@ CopyDefToKeyType(XkbcDescPtr xkb, XkbcKeyTypePtr type, KeyTypeInfo * def)
type->map = def->entries;
if (def->preserve)
{
- type->preserve = uTypedCalloc(type->map_count, XkbcModsRec);
+ type->preserve = uTypedCalloc(type->map_count, struct xkb_mods);
if (!type->preserve)
{
WARN("Couldn't allocate preserve array in CopyDefToKeyType\n");
@@ -1199,7 +1199,7 @@ CopyDefToKeyType(XkbcDescPtr xkb, XkbcKeyTypePtr type, KeyTypeInfo * def)
}
Bool
-CompileKeyTypes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
+CompileKeyTypes(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
{
KeyTypesInfo info;
@@ -1211,7 +1211,7 @@ CompileKeyTypes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
{
register int i;
register KeyTypeInfo *def;
- register XkbcKeyTypePtr type, next;
+ register struct xkb_key_type *type, *next;
if (info.name != NULL)
{
diff --git a/src/xkbcomp/listing.c b/src/xkbcomp/listing.c
index f84e59b..e52f96e 100644
--- a/src/xkbcomp/listing.c
+++ b/src/xkbcomp/listing.c
@@ -133,7 +133,7 @@ typedef struct _CompPair {
int num;
int sz;
- XkbComponentNamePtr comp;
+ struct xkb_component_name * comp;
} CompPair;
/***====================================================================***/
@@ -146,7 +146,7 @@ AddComponent(CompPair *cp, char *fileName, XkbFile *map, unsigned dirsToStrip)
if (cp->num >= cp->sz) {
int orig_sz = cp->sz;
- XkbComponentNamePtr orig_comp = cp->comp;
+ struct xkb_component_name * orig_comp = cp->comp;
if (cp->sz < 1)
cp->sz = 8;
@@ -154,7 +154,7 @@ AddComponent(CompPair *cp, char *fileName, XkbFile *map, unsigned dirsToStrip)
cp->sz *= 2;
cp->comp = realloc(cp->comp,
- cp->sz * sizeof(XkbComponentNameRec));
+ cp->sz * sizeof(struct xkb_component_name));
if (!cp->comp) {
ERROR("Failed reallocating component name list\n");
cp->sz = orig_sz;
@@ -366,7 +366,7 @@ AddDirectory(CompPair *cp, char *head, char *ptrn, char *rest, char *map,
/***====================================================================***/
static int
-GenerateComponent(XkbComponentListPtr complist, unsigned type, char *head_in,
+GenerateComponent(struct xkb_component_list * complist, unsigned type, char *head_in,
char *base, int *max)
{
char *str, *head, *ptrn = NULL, *rest = NULL;
@@ -439,7 +439,7 @@ GenerateComponent(XkbComponentListPtr complist, unsigned type, char *head_in,
/* Trim excess component slots */
if (cp.sz > 0 && cp.sz > cp.num) {
- if (realloc(cp.comp, cp.num * sizeof(XkbComponentNameRec)))
+ if (realloc(cp.comp, cp.num * sizeof(struct xkb_component_name)))
cp.sz = cp.num;
else
WARN("Could not reallocate component name list\n");
@@ -477,13 +477,13 @@ GenerateComponent(XkbComponentListPtr complist, unsigned type, char *head_in,
/***====================================================================***/
-XkbComponentListPtr
-XkbcListComponents(XkbComponentNamesPtr ptrns, int *maxMatch)
+struct xkb_component_list *
+XkbcListComponents(struct xkb_component_names * ptrns, int *maxMatch)
{
- XkbComponentListPtr complist = NULL;
+ struct xkb_component_list * complist = NULL;
int extra = 0;
- complist = _XkbTypedCalloc(1, XkbComponentListRec);
+ complist = _XkbTypedCalloc(1, struct xkb_component_list);
if (!complist) {
ERROR("could not allocate space for listing\n");
goto out;
diff --git a/src/xkbcomp/misc.c b/src/xkbcomp/misc.c
index df0e5b4..1de6319 100644
--- a/src/xkbcomp/misc.c
+++ b/src/xkbcomp/misc.c
@@ -373,7 +373,7 @@ static KeyNameDesc dfltKeys[] = {
};
int
-ComputeKbdDefaults(XkbcDescPtr xkb)
+ComputeKbdDefaults(struct xkb_desc * xkb)
{
int rtrn;
register int i, tmp, nUnknown;
@@ -459,7 +459,7 @@ ComputeKbdDefaults(XkbcDescPtr xkb)
* @return True if found, False otherwise.
*/
Bool
-FindNamedKey(XkbcDescPtr xkb,
+FindNamedKey(struct xkb_desc * xkb,
unsigned long name,
unsigned int *kc_rtrn,
Bool use_aliases, Bool create, int start_from)
@@ -532,7 +532,7 @@ FindNamedKey(XkbcDescPtr xkb,
}
Bool
-FindKeyNameForAlias(XkbcDescPtr xkb, unsigned long lname,
+FindKeyNameForAlias(struct xkb_desc * xkb, unsigned long lname,
unsigned long *real_name)
{
register int i;
@@ -540,7 +540,7 @@ FindKeyNameForAlias(XkbcDescPtr xkb, unsigned long lname,
if (xkb && xkb->geom && xkb->geom->key_aliases)
{
- XkbKeyAliasPtr a;
+ struct xkb_key_alias * a;
a = xkb->geom->key_aliases;
LongToKeyName(lname, name);
name[XkbKeyNameLength] = '\0';
@@ -555,7 +555,7 @@ FindKeyNameForAlias(XkbcDescPtr xkb, unsigned long lname,
}
if (xkb && xkb->names && xkb->names->key_aliases)
{
- XkbKeyAliasPtr a;
+ struct xkb_key_alias * a;
a = xkb->names->key_aliases;
LongToKeyName(lname, name);
name[XkbKeyNameLength] = '\0';
diff --git a/src/xkbcomp/misc.h b/src/xkbcomp/misc.h
index b1297da..513b089 100644
--- a/src/xkbcomp/misc.h
+++ b/src/xkbcomp/misc.h
@@ -92,10 +92,10 @@ extern Bool ProcessIncludeFile(IncludeStmt * /* stmt */ ,
unsigned * /* merge_rtrn */
);
-extern int ComputeKbdDefaults(XkbcDescPtr /* xkb */
+extern int ComputeKbdDefaults(struct xkb_desc * /* xkb */
);
-extern Bool FindNamedKey(XkbcDescPtr /* xkb */ ,
+extern Bool FindNamedKey(struct xkb_desc * /* xkb */ ,
unsigned long /* name */ ,
unsigned int * /* kc_rtrn */ ,
Bool /* use_aliases */ ,
@@ -103,7 +103,7 @@ extern Bool FindNamedKey(XkbcDescPtr /* xkb */ ,
int /* start_from */
);
-extern Bool FindKeyNameForAlias(XkbcDescPtr /* xkb */ ,
+extern Bool FindKeyNameForAlias(struct xkb_desc * /* xkb */ ,
unsigned long /* lname */ ,
unsigned long * /* real_name */
);
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index ca85a46..d1c2da2 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -31,7 +31,6 @@
#include "expr.h"
#include "parseutils.h"
-#include <X11/extensions/XKBfilecommon.h>
#include <X11/keysym.h>
#include <stdlib.h>
@@ -74,7 +73,7 @@ typedef struct _KeyInfo
union xkb_action *acts[XkbNumKbdGroups];
uint32_t types[XkbNumKbdGroups];
unsigned repeat;
- XkbBehavior behavior;
+ struct xkb_behavior behavior;
unsigned short vmodmap;
unsigned long nameForOverlayKey;
unsigned long allowNone;
@@ -241,7 +240,7 @@ typedef struct _SymbolsInfo
} SymbolsInfo;
static void
-InitSymbolsInfo(SymbolsInfo * info, XkbcDescPtr xkb)
+InitSymbolsInfo(SymbolsInfo * info, struct xkb_desc * xkb)
{
register int i;
@@ -603,7 +602,7 @@ MergeKeys(SymbolsInfo * info, KeyInfo * into, KeyInfo * from)
}
static Bool
-AddKeySymbols(SymbolsInfo * info, KeyInfo * key, XkbcDescPtr xkb)
+AddKeySymbols(SymbolsInfo * info, KeyInfo * key, struct xkb_desc * xkb)
{
register int i;
unsigned long real_name;
@@ -715,7 +714,7 @@ AddModMapEntry(SymbolsInfo * info, ModMapEntry * new)
static void
MergeIncludedSymbols(SymbolsInfo * into, SymbolsInfo * from,
- unsigned merge, XkbcDescPtr xkb)
+ unsigned merge, struct xkb_desc * xkb)
{
register int i;
KeyInfo *key;
@@ -765,14 +764,14 @@ MergeIncludedSymbols(SymbolsInfo * into, SymbolsInfo * from,
}
typedef void (*FileHandler) (XkbFile * /* rtrn */ ,
- XkbcDescPtr /* xkb */ ,
+ struct xkb_desc * /* xkb */ ,
unsigned /* merge */ ,
SymbolsInfo * /* included */
);
static Bool
HandleIncludeSymbols(IncludeStmt * stmt,
- XkbcDescPtr xkb, SymbolsInfo * info, FileHandler hndlr)
+ struct xkb_desc * xkb, SymbolsInfo * info, FileHandler hndlr)
{
unsigned newMerge;
XkbFile *rtrn;
@@ -932,7 +931,7 @@ GetGroupIndex(KeyInfo * key,
static Bool
AddSymbolsToKey(KeyInfo * key,
- XkbcDescPtr xkb,
+ struct xkb_desc * xkb,
char *field,
ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
{
@@ -986,7 +985,7 @@ AddSymbolsToKey(KeyInfo * key,
static Bool
AddActionsToKey(KeyInfo * key,
- XkbcDescPtr xkb,
+ struct xkb_desc * xkb,
char *field,
ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
{
@@ -1122,7 +1121,7 @@ static LookupEntry rgEntries[] = {
static Bool
SetSymbolsField(KeyInfo * key,
- XkbcDescPtr xkb,
+ struct xkb_desc * xkb,
char *field,
ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
{
@@ -1411,7 +1410,7 @@ SetGroupName(SymbolsInfo * info, ExprDef * arrayNdx, ExprDef * value)
}
static int
-HandleSymbolsVar(VarDef * stmt, XkbcDescPtr xkb, SymbolsInfo * info)
+HandleSymbolsVar(VarDef * stmt, struct xkb_desc * xkb, SymbolsInfo * info)
{
ExprResult elem, field, tmp;
ExprDef *arrayNdx;
@@ -1509,7 +1508,7 @@ HandleSymbolsVar(VarDef * stmt, XkbcDescPtr xkb, SymbolsInfo * info)
static Bool
HandleSymbolsBody(VarDef * def,
- XkbcDescPtr xkb, KeyInfo * key, SymbolsInfo * info)
+ struct xkb_desc * xkb, KeyInfo * key, SymbolsInfo * info)
{
Bool ok = True;
ExprResult tmp, field;
@@ -1587,7 +1586,7 @@ SetExplicitGroup(SymbolsInfo * info, KeyInfo * key)
static int
HandleSymbolsDef(SymbolsDef * stmt,
- XkbcDescPtr xkb, unsigned merge, SymbolsInfo * info)
+ struct xkb_desc * xkb, unsigned merge, SymbolsInfo * info)
{
KeyInfo key;
@@ -1617,7 +1616,7 @@ HandleSymbolsDef(SymbolsDef * stmt,
static Bool
HandleModMapDef(ModMapDef * def,
- XkbcDescPtr xkb, unsigned merge, SymbolsInfo * info)
+ struct xkb_desc * xkb, unsigned merge, SymbolsInfo * info)
{
ExprDef *key;
ModMapEntry tmp;
@@ -1660,7 +1659,7 @@ HandleModMapDef(ModMapDef * def,
static void
HandleSymbolsFile(XkbFile * file,
- XkbcDescPtr xkb, unsigned merge, SymbolsInfo * info)
+ struct xkb_desc * xkb, unsigned merge, SymbolsInfo * info)
{
ParseCommon *stmt;
@@ -1720,7 +1719,7 @@ HandleSymbolsFile(XkbFile * file,
}
static Bool
-FindKeyForSymbol(XkbcDescPtr xkb, uint32_t sym, unsigned int *kc_rtrn)
+FindKeyForSymbol(struct xkb_desc * xkb, uint32_t sym, unsigned int *kc_rtrn)
{
register int i, j;
register Bool gotOne;
@@ -1756,7 +1755,7 @@ FindKeyForSymbol(XkbcDescPtr xkb, uint32_t sym, unsigned int *kc_rtrn)
* @return True if found, False otherwise.
*/
static Bool
-FindNamedType(XkbcDescPtr xkb, uint32_t name, unsigned *type_rtrn)
+FindNamedType(struct xkb_desc * xkb, uint32_t name, unsigned *type_rtrn)
{
register unsigned n;
@@ -1951,11 +1950,11 @@ PrepareKeyDef(KeyInfo * key)
* This function recurses.
*/
static Bool
-CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
+CopySymbolsDef(struct xkb_desc * xkb, KeyInfo *key, int start_from)
{
register int i;
unsigned okc, kc, width, tmp, nGroups;
- XkbcKeyTypePtr type;
+ struct xkb_key_type * type;
Bool haveActions, autoType, useAlias;
uint32_t *outSyms;
union xkb_action *outActs;
@@ -2155,7 +2154,7 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
}
static Bool
-CopyModMapDef(XkbcDescPtr xkb, ModMapEntry *entry)
+CopyModMapDef(struct xkb_desc * xkb, ModMapEntry *entry)
{
unsigned kc;
@@ -2199,7 +2198,7 @@ CopyModMapDef(XkbcDescPtr xkb, ModMapEntry *entry)
* @param merge Merge strategy (e.g. MergeOverride).
*/
Bool
-CompileSymbols(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
+CompileSymbols(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
{
register int i;
SymbolsInfo info;
diff --git a/src/xkbcomp/vmod.c b/src/xkbcomp/vmod.c
index c959224..63fc560 100644
--- a/src/xkbcomp/vmod.c
+++ b/src/xkbcomp/vmod.c
@@ -34,12 +34,11 @@
#include "misc.h"
#include <X11/extensions/XKB.h>
-#include <X11/extensions/XKBstrcommon.h>
#include "vmod.h"
void
-InitVModInfo(VModInfo * info, XkbcDescPtr xkb)
+InitVModInfo(VModInfo * info, struct xkb_desc * xkb)
{
ClearVModInfo(info, xkb);
info->errorCount = 0;
@@ -47,7 +46,7 @@ InitVModInfo(VModInfo * info, XkbcDescPtr xkb)
}
void
-ClearVModInfo(VModInfo * info, XkbcDescPtr xkb)
+ClearVModInfo(VModInfo * info, struct xkb_desc * xkb)
{
register int i;
@@ -84,8 +83,8 @@ HandleVModDef(VModDef * stmt, unsigned mergeMode, VModInfo * info)
{
register int i, bit, nextFree;
ExprResult mod;
- XkbcServerMapPtr srv;
- XkbcNamesPtr names;
+ struct xkb_server_map * srv;
+ struct xkb_names * names;
srv = info->xkb->server;
names = info->xkb->names;
@@ -167,9 +166,9 @@ LookupVModIndex(char * priv,
uint32_t elem, uint32_t field, unsigned type, ExprResult * val_rtrn)
{
int i;
- XkbcDescPtr xkb;
+ struct xkb_desc * xkb;
- xkb = (XkbcDescPtr) priv;
+ xkb = (struct xkb_desc *) priv;
if ((xkb == NULL) || (xkb->names == NULL) || (elem != None)
|| (type != TypeInt))
{
@@ -215,7 +214,7 @@ LookupVModMask(char * priv,
}
int
-FindKeypadVMod(XkbcDescPtr xkb)
+FindKeypadVMod(struct xkb_desc * xkb)
{
uint32_t name;
ExprResult rtrn;
@@ -231,7 +230,7 @@ FindKeypadVMod(XkbcDescPtr xkb)
Bool
ResolveVirtualModifier(ExprDef * def, ExprResult * val_rtrn, VModInfo * info)
{
- XkbcNamesPtr names;
+ struct xkb_names * names;
names = info->xkb->names;
if (def->op == ExprIdent)
diff --git a/src/xkbcomp/vmod.h b/src/xkbcomp/vmod.h
index f494f48..13bd50c 100644
--- a/src/xkbcomp/vmod.h
+++ b/src/xkbcomp/vmod.h
@@ -29,7 +29,7 @@
typedef struct _VModInfo
{
- XkbcDescPtr xkb;
+ struct xkb_desc * xkb;
unsigned defined;
unsigned available;
unsigned newlyDefined;
@@ -37,11 +37,11 @@ typedef struct _VModInfo
} VModInfo;
extern void InitVModInfo(VModInfo * /* info */ ,
- XkbcDescPtr /* xkb */
+ struct xkb_desc * /* xkb */
);
extern void ClearVModInfo(VModInfo * /* info */ ,
- XkbcDescPtr /* xkb */
+ struct xkb_desc * /* xkb */
);
extern Bool HandleVModDef(VModDef * /* stmt */ ,
@@ -50,7 +50,7 @@ extern Bool HandleVModDef(VModDef * /* stmt */ ,
);
extern Bool ApplyVModDefs(VModInfo * /* info */ ,
- XkbcDescPtr /* xkb */
+ struct xkb_desc * /* xkb */
);
extern int LookupVModIndex(char * /* priv */ ,
@@ -67,7 +67,7 @@ extern int LookupVModMask(char * /* priv */ ,
ExprResult * /* val_rtrn */
);
-extern int FindKeypadVMod(XkbcDescPtr /* xkb */
+extern int FindKeypadVMod(struct xkb_desc * /* xkb */
);
extern Bool ResolveVirtualModifier(ExprDef * /* def */ ,
diff --git a/src/xkbcomp/xkbcomp.c b/src/xkbcomp/xkbcomp.c
index 88c9c91..4761921 100644
--- a/src/xkbcomp/xkbcomp.c
+++ b/src/xkbcomp/xkbcomp.c
@@ -40,7 +40,7 @@ unsigned int warningLevel = 0;
#define ISEMPTY(str) (!(str) || (strlen(str) == 0))
static XkbFile *
-XkbKeymapFileFromComponents(const XkbComponentNamesPtr ktcsg)
+XkbKeymapFileFromComponents(const struct xkb_component_names * ktcsg)
{
XkbFile *keycodes, *types, *compat, *symbols, *geometry;
IncludeStmt *inc;
@@ -73,14 +73,14 @@ XkbKeymapFileFromComponents(const XkbComponentNamesPtr ktcsg)
&keycodes->common, 0);
}
-static XkbComponentNamesPtr
+static struct xkb_component_names *
XkbComponentsFromRules(const char *rules, const XkbRF_VarDefsPtr defs)
{
FILE *rulesFile = NULL;
char *rulesPath = NULL;
static XkbRF_RulesPtr loaded = NULL;
static char *cached_name = NULL;
- XkbComponentNamesPtr names = NULL;
+ struct xkb_component_names * names = NULL;
if (!cached_name || strcmp(rules, cached_name) != 0) {
if (loaded)
@@ -110,7 +110,7 @@ XkbComponentsFromRules(const char *rules, const XkbRF_VarDefsPtr defs)
cached_name = strdup(rules);
}
- if (!(names = _XkbTypedCalloc(1, XkbComponentNamesRec))) {
+ if (!(names = _XkbTypedCalloc(1, struct xkb_component_names))) {
ERROR("failed to allocate XKB components\n");
goto unwind_file;
}
@@ -135,12 +135,12 @@ out:
return names;
}
-XkbcDescPtr
+struct xkb_desc *
XkbcCompileKeymapFromRules(const XkbRMLVOSet *rmlvo)
{
XkbRF_VarDefsRec defs;
- XkbComponentNamesPtr names;
- XkbcDescPtr xkb;
+ struct xkb_component_names * names;
+ struct xkb_desc * xkb;
if (!rmlvo || ISEMPTY(rmlvo->rules) || ISEMPTY(rmlvo->layout)) {
ERROR("rules and layout required to generate XKB keymap\n");
@@ -206,11 +206,11 @@ XkbChooseMap(XkbFile *file, const char *name)
return map;
}
-XkbcDescPtr
-XkbcCompileKeymapFromComponents(const XkbComponentNamesPtr ktcsg)
+struct xkb_desc *
+XkbcCompileKeymapFromComponents(const struct xkb_component_names * ktcsg)
{
XkbFile *file, *mapToUse;
- XkbcDescPtr xkb;
+ struct xkb_desc * xkb;
uSetErrorFile(NULL);
@@ -248,11 +248,11 @@ fail:
return NULL;
}
-XkbcDescPtr
+struct xkb_desc *
XkbcCompileKeymapFromFile(FILE *inputFile, const char *mapName)
{
XkbFile *file, *mapToUse;
- XkbcDescPtr xkb;
+ struct xkb_desc * xkb;
if (!inputFile) {
ERROR("no file specified to generate XKB keymap\n");
diff --git a/src/xkbcomp/xkbcomp.h b/src/xkbcomp/xkbcomp.h
index ed371cb..a27ab2e 100644
--- a/src/xkbcomp/xkbcomp.h
+++ b/src/xkbcomp/xkbcomp.h
@@ -37,8 +37,6 @@
#include "utils.h"
#include <X11/extensions/XKM.h>
-#include <X11/extensions/XKBstrcommon.h>
-#include <X11/extensions/XKBrulescommon.h>
#include "X11/extensions/XKBcommon.h"
#include "XKBcommonint.h"
@@ -340,24 +338,24 @@ typedef struct _XkbFile
} XkbFile;
extern Bool
-CompileKeymap(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
+CompileKeymap(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
extern Bool
-CompileKeycodes(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
+CompileKeycodes(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
extern Bool
-CompileGeometry(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
+CompileGeometry(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
extern Bool
-CompileKeyTypes(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
+CompileKeyTypes(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
typedef struct _LEDInfo *LEDInfoPtr;
extern Bool
-CompileCompatMap(XkbFile *file, XkbcDescPtr xkb, unsigned merge,
+CompileCompatMap(XkbFile *file, struct xkb_desc * xkb, unsigned merge,
LEDInfoPtr *unboundLEDs);
extern Bool
-CompileSymbols(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
+CompileSymbols(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
#endif /* XKBCOMP_H */
diff --git a/src/xkbgeom.h b/src/xkbgeom.h
index 7d495e0..3ab4311 100644
--- a/src/xkbgeom.h
+++ b/src/xkbgeom.h
@@ -29,149 +29,147 @@ authorization from the authors.
#include <X11/X.h>
#include <X11/Xdefs.h>
-#include <X11/extensions/XKBstrcommon.h>
-#include <X11/extensions/XKBrulescommon.h>
#include "X11/extensions/XKBcommon.h"
extern void
-XkbcFreeGeomProperties(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
+XkbcFreeGeomProperties(struct xkb_geometry * geom, int first, int count, Bool freeAll);
extern void
-XkbcFreeGeomKeyAliases(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
+XkbcFreeGeomKeyAliases(struct xkb_geometry * geom, int first, int count, Bool freeAll);
extern void
-XkbcFreeGeomColors(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
+XkbcFreeGeomColors(struct xkb_geometry * geom, int first, int count, Bool freeAll);
extern void
-XkbcFreeGeomPoints(XkbcOutlinePtr outline, int first, int count, Bool freeAll);
+XkbcFreeGeomPoints(struct xkb_outline * outline, int first, int count, Bool freeAll);
extern void
-XkbcFreeGeomOutlines(XkbcShapePtr shape, int first, int count, Bool freeAll);
+XkbcFreeGeomOutlines(struct xkb_shape * shape, int first, int count, Bool freeAll);
extern void
-XkbcFreeGeomShapes(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
+XkbcFreeGeomShapes(struct xkb_geometry * geom, int first, int count, Bool freeAll);
extern void
-XkbcFreeGeomOverlayKeys(XkbcOverlayRowPtr row, int first, int count,
+XkbcFreeGeomOverlayKeys(struct xkb_overlay_row * row, int first, int count,
Bool freeAll);
extern void
-XkbcFreeGeomOverlayRows(XkbcOverlayPtr overlay, int first, int count,
+XkbcFreeGeomOverlayRows(struct xkb_overlay * overlay, int first, int count,
Bool freeAll);
extern void
-XkbcFreeGeomOverlays(XkbcSectionPtr section, int first, int count, Bool freeAll);
+XkbcFreeGeomOverlays(struct xkb_section * section, int first, int count, Bool freeAll);
extern void
-XkbcFreeGeomKeys(XkbcRowPtr row, int first, int count, Bool freeAll);
+XkbcFreeGeomKeys(struct xkb_row * row, int first, int count, Bool freeAll);
extern void
-XkbcFreeGeomRows(XkbcSectionPtr section, int first, int count, Bool freeAll);
+XkbcFreeGeomRows(struct xkb_section * section, int first, int count, Bool freeAll);
extern void
-XkbcFreeGeomSections(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
+XkbcFreeGeomSections(struct xkb_geometry * geom, int first, int count, Bool freeAll);
extern void
-XkbcFreeGeomDoodads(XkbcDoodadPtr doodads, int nDoodads, Bool freeAll);
+XkbcFreeGeomDoodads(union xkb_doodad * doodads, int nDoodads, Bool freeAll);
extern void
-XkbcFreeGeometry(XkbcGeometryPtr geom, unsigned which, Bool freeMap);
+XkbcFreeGeometry(struct xkb_geometry * geom, unsigned which, Bool freeMap);
extern int
-XkbcAllocGeomProps(XkbcGeometryPtr geom, int nProps);
+XkbcAllocGeomProps(struct xkb_geometry * geom, int nProps);
extern int
-XkbcAllocGeomColors(XkbcGeometryPtr geom, int nColors);
+XkbcAllocGeomColors(struct xkb_geometry * geom, int nColors);
extern int
-XkbcAllocGeomKeyAliases(XkbcGeometryPtr geom, int nKeyAliases);
+XkbcAllocGeomKeyAliases(struct xkb_geometry * geom, int nKeyAliases);
extern int
-XkbcAllocGeomShapes(XkbcGeometryPtr geom, int nShapes);
+XkbcAllocGeomShapes(struct xkb_geometry * geom, int nShapes);
extern int
-XkbcAllocGeomSections(XkbcGeometryPtr geom, int nSections);
+XkbcAllocGeomSections(struct xkb_geometry * geom, int nSections);
extern int
-XkbcAllocGeomOverlays(XkbcSectionPtr section, int nOverlays);
+XkbcAllocGeomOverlays(struct xkb_section * section, int nOverlays);
extern int
-XkbcAllocGeomOverlayRows(XkbcOverlayPtr overlay, int nRows);
+XkbcAllocGeomOverlayRows(struct xkb_overlay * overlay, int nRows);
extern int
-XkbcAllocGeomOverlayKeys(XkbcOverlayRowPtr row, int nKeys);
+XkbcAllocGeomOverlayKeys(struct xkb_overlay_row * row, int nKeys);
extern int
-XkbcAllocGeomDoodads(XkbcGeometryPtr geom, int nDoodads);
+XkbcAllocGeomDoodads(struct xkb_geometry * geom, int nDoodads);
extern int
-XkbcAllocGeomSectionDoodads(XkbcSectionPtr section, int nDoodads);
+XkbcAllocGeomSectionDoodads(struct xkb_section * section, int nDoodads);
extern int
-XkbcAllocGeomOutlines(XkbcShapePtr shape, int nOL);
+XkbcAllocGeomOutlines(struct xkb_shape * shape, int nOL);
extern int
-XkbcAllocGeomRows(XkbcSectionPtr section, int nRows);
+XkbcAllocGeomRows(struct xkb_section * section, int nRows);
extern int
-XkbcAllocGeomPoints(XkbcOutlinePtr ol, int nPts);
+XkbcAllocGeomPoints(struct xkb_outline * ol, int nPts);
extern int
-XkbcAllocGeomKeys(XkbcRowPtr row, int nKeys);
+XkbcAllocGeomKeys(struct xkb_row * row, int nKeys);
extern int
-XkbcAllocGeometry(XkbcDescPtr xkb, XkbcGeometrySizesPtr sizes);
+XkbcAllocGeometry(struct xkb_desc * xkb, struct xkb_geometry_sizes * sizes);
-extern XkbcPropertyPtr
-XkbcAddGeomProperty(XkbcGeometryPtr geom, const char *name, const char *value);
+extern struct xkb_property *
+XkbcAddGeomProperty(struct xkb_geometry * geom, const char *name, const char *value);
-extern XkbKeyAliasPtr
-XkbcAddGeomKeyAlias(XkbcGeometryPtr geom, const char *aliasStr, const char *realStr);
+extern struct xkb_key_alias *
+XkbcAddGeomKeyAlias(struct xkb_geometry * geom, const char *aliasStr, const char *realStr);
-extern XkbcColorPtr
-XkbcAddGeomColor(XkbcGeometryPtr geom, const char *spec, unsigned int pixel);
+extern struct xkb_color *
+XkbcAddGeomColor(struct xkb_geometry * geom, const char *spec, unsigned int pixel);
-extern XkbcOutlinePtr
-XkbcAddGeomOutline(XkbcShapePtr shape, int sz_points);
+extern struct xkb_outline *
+XkbcAddGeomOutline(struct xkb_shape * shape, int sz_points);
-extern XkbcShapePtr
-XkbcAddGeomShape(XkbcGeometryPtr geom, uint32_t name, int sz_outlines);
+extern struct xkb_shape *
+XkbcAddGeomShape(struct xkb_geometry * geom, uint32_t name, int sz_outlines);
-extern XkbcKeyPtr
-XkbcAddGeomKey(XkbcRowPtr row);
+extern struct xkb_key *
+XkbcAddGeomKey(struct xkb_row * row);
-extern XkbcRowPtr
-XkbcAddGeomRow(XkbcSectionPtr section, int sz_keys);
+extern struct xkb_row *
+XkbcAddGeomRow(struct xkb_section * section, int sz_keys);
-extern XkbcSectionPtr
-XkbcAddGeomSection(XkbcGeometryPtr geom, uint32_t name,
+extern struct xkb_section *
+XkbcAddGeomSection(struct xkb_geometry * geom, uint32_t name,
int sz_rows, int sz_doodads, int sz_over);
-extern XkbcDoodadPtr
-XkbcAddGeomDoodad(XkbcGeometryPtr geom, XkbcSectionPtr section, uint32_t name);
+extern union xkb_doodad *
+XkbcAddGeomDoodad(struct xkb_geometry * geom, struct xkb_section * section, uint32_t name);
-extern XkbcOverlayKeyPtr
-XkbcAddGeomOverlayKey(XkbcOverlayPtr overlay, XkbcOverlayRowPtr row,
+extern struct xkb_overlay_key *
+XkbcAddGeomOverlayKey(struct xkb_overlay * overlay, struct xkb_overlay_row * row,
const char *over, const char *under);
-extern XkbcOverlayRowPtr
-XkbcAddGeomOverlayRow(XkbcOverlayPtr overlay, int row_under, int sz_keys);
+extern struct xkb_overlay_row *
+XkbcAddGeomOverlayRow(struct xkb_overlay * overlay, int row_under, int sz_keys);
-extern XkbcOverlayPtr
-XkbcAddGeomOverlay(XkbcSectionPtr section, uint32_t name, int sz_rows);
+extern struct xkb_overlay *
+XkbcAddGeomOverlay(struct xkb_section * section, uint32_t name, int sz_rows);
/***====================================================================***/
extern Bool
-XkbcComputeShapeBounds(XkbcShapePtr shape);
+XkbcComputeShapeBounds(struct xkb_shape * shape);
extern Bool
-XkbcComputeShapeTop(XkbcShapePtr shape, XkbcBoundsPtr bounds);
+XkbcComputeShapeTop(struct xkb_shape * shape, struct xkb_bounds * bounds);
extern Bool
-XkbcComputeRowBounds(XkbcGeometryPtr geom, XkbcSectionPtr section, XkbcRowPtr row);
+XkbcComputeRowBounds(struct xkb_geometry * geom, struct xkb_section * section, struct xkb_row * row);
extern Bool
-XkbcComputeSectionBounds(XkbcGeometryPtr geom, XkbcSectionPtr section);
+XkbcComputeSectionBounds(struct xkb_geometry * geom, struct xkb_section * section);
#endif /* _XKBGEOM_H_ */
diff --git a/src/xkbmisc.h b/src/xkbmisc.h
index 2096849..d19a695 100644
--- a/src/xkbmisc.h
+++ b/src/xkbmisc.h
@@ -29,23 +29,21 @@ authorization from the authors.
#include <X11/X.h>
#include <X11/Xdefs.h>
-#include <X11/extensions/XKBstrcommon.h>
-#include <X11/extensions/XKBrulescommon.h>
#include "X11/extensions/XKBcommon.h"
/***====================================================================***/
extern Bool
-XkbcComputeEffectiveMap(XkbcDescPtr xkb, XkbcKeyTypePtr type,
+XkbcComputeEffectiveMap(struct xkb_desc * xkb, struct xkb_key_type * type,
unsigned char *map_rtrn);
/***====================================================================***/
extern int
-XkbcInitCanonicalKeyTypes(XkbcDescPtr xkb, unsigned which, int keypadVMod);
+XkbcInitCanonicalKeyTypes(struct xkb_desc * xkb, unsigned which, int keypadVMod);
extern Bool
-XkbcVirtualModsToReal(XkbcDescPtr xkb, unsigned virtual_mask,
+XkbcVirtualModsToReal(struct xkb_desc * xkb, unsigned virtual_mask,
unsigned *mask_rtrn);
extern void
@@ -74,10 +72,10 @@ extern const char *
XkbcAtomText(uint32_t atm);
extern char *
-XkbcVModIndexText(XkbcDescPtr xkb, unsigned ndx);
+XkbcVModIndexText(struct xkb_desc * xkb, unsigned ndx);
extern char *
-XkbcVModMaskText(XkbcDescPtr xkb, unsigned modMask, unsigned mask);
+XkbcVModMaskText(struct xkb_desc * xkb, unsigned modMask, unsigned mask);
extern char *
XkbcModIndexText(unsigned ndx);
diff --git a/src/xkbrules.h b/src/xkbrules.h
index 87abf49..7c004c9 100644
--- a/src/xkbrules.h
+++ b/src/xkbrules.h
@@ -30,13 +30,11 @@ authorization from the authors.
#include <stdio.h>
#include <X11/X.h>
#include <X11/Xdefs.h>
-#include <X11/extensions/XKBstrcommon.h>
-#include <X11/extensions/XKBrulescommon.h>
#include "X11/extensions/XKBcommon.h"
extern Bool
XkbcRF_GetComponents(XkbRF_RulesPtr rules, XkbRF_VarDefsPtr defs,
- XkbComponentNamesPtr names);
+ struct xkb_component_names * names);
extern XkbRF_RulePtr
XkbcRF_AddRule(XkbRF_RulesPtr rules);
diff --git a/test/canonicalise.c b/test/canonicalise.c
index 5e96997..8691ef6 100644
--- a/test/canonicalise.c
+++ b/test/canonicalise.c
@@ -30,7 +30,7 @@
int main(int argc, char *argv[])
{
- XkbComponentNamesRec *new, *old = NULL;
+ struct xkb_component_names *new, *old = NULL;
if (argc != 6 && argc != 11) {
fprintf(stderr, "usage: canonicalise (new kccgst) [old kccgst]\n");
diff --git a/test/filecomp.c b/test/filecomp.c
index cd824c0..49c8394 100644
--- a/test/filecomp.c
+++ b/test/filecomp.c
@@ -30,8 +30,6 @@ authorization from the authors.
#include <errno.h>
#include <X11/X.h>
#include <X11/Xdefs.h>
-#include <X11/extensions/XKBstrcommon.h>
-#include <X11/extensions/XKBrulescommon.h>
#include "X11/extensions/XKBcommon.h"
#include "xkbcomp/utils.h"
@@ -39,7 +37,7 @@ int main(int argc, char *argv[])
{
char *path, *name;
FILE *file;
- XkbcDescPtr xkb;
+ struct xkb_desc * xkb;
/* Require xkb file */
if (argc < 2) {
diff --git a/test/namescomp.c b/test/namescomp.c
index f1ea4b5..72a8b35 100644
--- a/test/namescomp.c
+++ b/test/namescomp.c
@@ -28,15 +28,13 @@ authorization from the authors.
#include <stdio.h>
#include <X11/X.h>
#include <X11/Xdefs.h>
-#include <X11/extensions/XKBstrcommon.h>
-#include <X11/extensions/XKBrulescommon.h>
#include "X11/extensions/XKBcommon.h"
#include "xkbcomp/utils.h"
int main(int argc, char *argv[])
{
- XkbComponentNamesRec ktcsg;
- XkbcDescPtr xkb;
+ struct xkb_component_names ktcsg;
+ struct xkb_desc * xkb;
/* Require rmlvo */
if (argc < 6) {
diff --git a/test/rulescomp.c b/test/rulescomp.c
index 6368ab6..ccb59df 100644
--- a/test/rulescomp.c
+++ b/test/rulescomp.c
@@ -28,15 +28,13 @@ authorization from the authors.
#include <stdio.h>
#include <X11/X.h>
#include <X11/Xdefs.h>
-#include <X11/extensions/XKBstrcommon.h>
-#include <X11/extensions/XKBrulescommon.h>
#include "X11/extensions/XKBcommon.h"
#include "xkbcomp/utils.h"
int main(int argc, char *argv[])
{
XkbRMLVOSet rmlvo;
- XkbcDescPtr xkb;
+ struct xkb_desc * xkb;
/* Require rmlvo */
if (argc < 6) {