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
|
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file was automatically generated with:
// ../../ui/gfx/x/gen_xproto.py \
// ../../third_party/xcbproto/src \
// gen/ui/gfx/x \
// bigreq \
// dri3 \
// glx \
// randr \
// render \
// screensaver \
// shape \
// shm \
// sync \
// xfixes \
// xinput \
// xkb \
// xproto \
// xtest
#ifndef UI_GFX_X_GENERATED_PROTOS_XINPUT_H_
#define UI_GFX_X_GENERATED_PROTOS_XINPUT_H_
#include <array>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <optional>
#include <vector>
#include "base/component_export.h"
#include "base/files/scoped_file.h"
#include "base/memory/scoped_refptr.h"
#include "ui/gfx/x/error.h"
#include "ui/gfx/x/ref_counted_fd.h"
#include "ui/gfx/x/xproto_types.h"
#include "xfixes.h"
#include "xproto.h"
namespace x11 {
class Connection;
template <typename Reply>
struct Response;
template <typename Reply>
class Future;
class COMPONENT_EXPORT(X11) Input {
public:
static constexpr unsigned major_version = 2;
static constexpr unsigned minor_version = 4;
Input(Connection* connection, const x11::QueryExtensionReply& info);
uint8_t present() const { return info_.present; }
uint8_t major_opcode() const { return info_.major_opcode; }
uint8_t first_event() const { return info_.first_event; }
uint8_t first_error() const { return info_.first_error; }
Connection* connection() const { return connection_; }
enum class EventClass : uint32_t {};
enum class KeyCode : uint8_t {};
enum class Fp1616 : int32_t {};
enum class DeviceUse : int {
IsXPointer = 0,
IsXKeyboard = 1,
IsXExtensionDevice = 2,
IsXExtensionKeyboard = 3,
IsXExtensionPointer = 4,
};
enum class InputClass : int {
Key = 0,
Button = 1,
Valuator = 2,
Feedback = 3,
Proximity = 4,
Focus = 5,
Other = 6,
};
enum class ValuatorMode : int {
Relative = 0,
Absolute = 1,
};
enum class EventTypeBase : uint8_t {};
enum class PropagateMode : int {
AddToList = 0,
DeleteFromList = 1,
};
enum class ModifierDevice : int {
UseXKeyboard = 255,
};
enum class DeviceInputMode : int {
AsyncThisDevice = 0,
SyncThisDevice = 1,
ReplayThisDevice = 2,
AsyncOtherDevices = 3,
AsyncAll = 4,
SyncAll = 5,
};
enum class FeedbackClass : int {
Keyboard = 0,
Pointer = 1,
String = 2,
Integer = 3,
Led = 4,
Bell = 5,
};
enum class ChangeFeedbackControlMask : int {
KeyClickPercent = 1 << 0,
Percent = 1 << 1,
Pitch = 1 << 2,
Duration = 1 << 3,
Led = 1 << 4,
LedMode = 1 << 5,
Key = 1 << 6,
AutoRepeatMode = 1 << 7,
String = 1 << 0,
Integer = 1 << 0,
AccelNum = 1 << 0,
AccelDenom = 1 << 1,
Threshold = 1 << 2,
};
enum class ValuatorStateModeMask : int {
DeviceModeAbsolute = 1 << 0,
OutOfProximity = 1 << 1,
};
enum class DeviceControl : int {
resolution = 1,
abs_calib = 2,
core = 3,
enable = 4,
abs_area = 5,
};
enum class PropertyFormat : int {
c_8Bits = 8,
c_16Bits = 16,
c_32Bits = 32,
};
enum class DeviceId : uint16_t {
All = 0,
AllMaster = 1,
};
enum class HierarchyChangeType : int {
AddMaster = 1,
RemoveMaster = 2,
AttachSlave = 3,
DetachSlave = 4,
};
enum class ChangeMode : int {
Attach = 1,
Float = 2,
};
enum class XIEventMask : int {
DeviceChanged = 1 << 1,
KeyPress = 1 << 2,
KeyRelease = 1 << 3,
ButtonPress = 1 << 4,
ButtonRelease = 1 << 5,
Motion = 1 << 6,
Enter = 1 << 7,
Leave = 1 << 8,
FocusIn = 1 << 9,
FocusOut = 1 << 10,
Hierarchy = 1 << 11,
Property = 1 << 12,
RawKeyPress = 1 << 13,
RawKeyRelease = 1 << 14,
RawButtonPress = 1 << 15,
RawButtonRelease = 1 << 16,
RawMotion = 1 << 17,
TouchBegin = 1 << 18,
TouchUpdate = 1 << 19,
TouchEnd = 1 << 20,
TouchOwnership = 1 << 21,
RawTouchBegin = 1 << 22,
RawTouchUpdate = 1 << 23,
RawTouchEnd = 1 << 24,
BarrierHit = 1 << 25,
BarrierLeave = 1 << 26,
};
enum class DeviceClassType : int {
Key = 0,
Button = 1,
Valuator = 2,
Scroll = 3,
Touch = 8,
Gesture = 9,
};
enum class DeviceType : int {
MasterPointer = 1,
MasterKeyboard = 2,
SlavePointer = 3,
SlaveKeyboard = 4,
FloatingSlave = 5,
};
enum class ScrollFlags : int {
NoEmulation = 1 << 0,
Preferred = 1 << 1,
};
enum class ScrollType : int {
Vertical = 1,
Horizontal = 2,
};
enum class TouchMode : int {
Direct = 1,
Dependent = 2,
};
enum class GrabOwner : int {
NoOwner = 0,
Owner = 1,
};
enum class EventMode : int {
AsyncDevice = 0,
SyncDevice = 1,
ReplayDevice = 2,
AsyncPairedDevice = 3,
AsyncPair = 4,
SyncPair = 5,
AcceptTouch = 6,
RejectTouch = 7,
};
enum class GrabMode22 : int {
Sync = 0,
Async = 1,
Touch = 2,
};
enum class GrabType : int {
Button = 0,
Keycode = 1,
Enter = 2,
FocusIn = 3,
TouchBegin = 4,
GesturePinchBegin = 5,
GestureSwipeBegin = 6,
};
enum class ModifierMask : int {
Any = 1 << 31,
};
enum class MoreEventsMask : int {
MoreEvents = 1 << 7,
};
enum class ClassesReportedMask : int {
OutOfProximity = 1 << 7,
DeviceModeAbsolute = 1 << 6,
ReportingValuators = 1 << 2,
ReportingButtons = 1 << 1,
ReportingKeys = 1 << 0,
};
enum class ChangeDevice : int {
NewPointer = 0,
NewKeyboard = 1,
};
enum class DeviceChange : int {
Added = 0,
Removed = 1,
Enabled = 2,
Disabled = 3,
Unrecoverable = 4,
ControlChanged = 5,
};
enum class ChangeReason : int {
SlaveSwitch = 1,
DeviceChange = 2,
};
enum class KeyEventFlags : int {
KeyRepeat = 1 << 16,
};
enum class PointerEventFlags : int {
PointerEmulated = 1 << 16,
};
enum class NotifyMode : int {
Normal = 0,
Grab = 1,
Ungrab = 2,
WhileGrabbed = 3,
PassiveGrab = 4,
PassiveUngrab = 5,
};
enum class NotifyDetail : int {
Ancestor = 0,
Virtual = 1,
Inferior = 2,
Nonlinear = 3,
NonlinearVirtual = 4,
Pointer = 5,
PointerRoot = 6,
None = 7,
};
enum class HierarchyMask : int {
MasterAdded = 1 << 0,
MasterRemoved = 1 << 1,
SlaveAdded = 1 << 2,
SlaveRemoved = 1 << 3,
SlaveAttached = 1 << 4,
SlaveDetached = 1 << 5,
DeviceEnabled = 1 << 6,
DeviceDisabled = 1 << 7,
};
enum class PropertyFlag : int {
Deleted = 0,
Created = 1,
Modified = 2,
};
enum class TouchEventFlags : int {
TouchPendingEnd = 1 << 16,
TouchEmulatingPointer = 1 << 17,
};
enum class TouchOwnershipFlags : int {
None = 0,
};
enum class BarrierFlags : int {
PointerReleased = 1 << 0,
DeviceIsGrabbed = 1 << 1,
};
enum class GesturePinchEventFlags : int {
GesturePinchCancelled = 1 << 0,
};
enum class GestureSwipeEventFlags : int {
GestureSwipeCancelled = 1 << 0,
};
struct Fp3232 {
bool operator==(const Fp3232& other) const {
return integral == other.integral && frac == other.frac;
}
int32_t integral{};
uint32_t frac{};
};
struct DeviceInfo {
bool operator==(const DeviceInfo& other) const {
return device_type == other.device_type && device_id == other.device_id &&
num_class_info == other.num_class_info &&
device_use == other.device_use;
}
Atom device_type{};
uint8_t device_id{};
uint8_t num_class_info{};
DeviceUse device_use{};
};
struct KeyInfo {
bool operator==(const KeyInfo& other) const {
return class_id == other.class_id && len == other.len &&
min_keycode == other.min_keycode &&
max_keycode == other.max_keycode && num_keys == other.num_keys;
}
InputClass class_id{};
uint8_t len{};
KeyCode min_keycode{};
KeyCode max_keycode{};
uint16_t num_keys{};
};
struct ButtonInfo {
bool operator==(const ButtonInfo& other) const {
return class_id == other.class_id && len == other.len &&
num_buttons == other.num_buttons;
}
InputClass class_id{};
uint8_t len{};
uint16_t num_buttons{};
};
struct AxisInfo {
bool operator==(const AxisInfo& other) const {
return resolution == other.resolution && minimum == other.minimum &&
maximum == other.maximum;
}
uint32_t resolution{};
int32_t minimum{};
int32_t maximum{};
};
struct ValuatorInfo {
bool operator==(const ValuatorInfo& other) const {
return class_id == other.class_id && len == other.len &&
mode == other.mode && motion_size == other.motion_size &&
axes == other.axes;
}
InputClass class_id{};
uint8_t len{};
ValuatorMode mode{};
uint32_t motion_size{};
std::vector<AxisInfo> axes{};
};
struct InputInfo {
uint8_t len{};
struct Key {
KeyCode min_keycode{};
KeyCode max_keycode{};
uint16_t num_keys{};
};
struct Button {
uint16_t num_buttons{};
};
struct Valuator {
ValuatorMode mode{};
uint32_t motion_size{};
std::vector<AxisInfo> axes{};
};
std::optional<Key> key{};
std::optional<Button> button{};
std::optional<Valuator> valuator{};
};
struct DeviceName {
bool operator==(const DeviceName& other) const {
return string == other.string;
}
std::string string{};
};
struct InputClassInfo {
bool operator==(const InputClassInfo& other) const {
return class_id == other.class_id &&
event_type_base == other.event_type_base;
}
InputClass class_id{};
EventTypeBase event_type_base{};
};
struct DeviceTimeCoord {
bool operator==(const DeviceTimeCoord& other) const {
return time == other.time && axisvalues == other.axisvalues;
}
Time time{};
std::vector<int32_t> axisvalues{};
};
struct KbdFeedbackState {
bool operator==(const KbdFeedbackState& other) const {
return class_id == other.class_id && feedback_id == other.feedback_id &&
len == other.len && pitch == other.pitch &&
duration == other.duration && led_mask == other.led_mask &&
led_values == other.led_values &&
global_auto_repeat == other.global_auto_repeat &&
click == other.click && percent == other.percent &&
auto_repeats == other.auto_repeats;
}
FeedbackClass class_id{};
uint8_t feedback_id{};
uint16_t len{};
uint16_t pitch{};
uint16_t duration{};
uint32_t led_mask{};
uint32_t led_values{};
uint8_t global_auto_repeat{};
uint8_t click{};
uint8_t percent{};
std::array<uint8_t, 32> auto_repeats{};
};
struct PtrFeedbackState {
bool operator==(const PtrFeedbackState& other) const {
return class_id == other.class_id && feedback_id == other.feedback_id &&
len == other.len && accel_num == other.accel_num &&
accel_denom == other.accel_denom && threshold == other.threshold;
}
FeedbackClass class_id{};
uint8_t feedback_id{};
uint16_t len{};
uint16_t accel_num{};
uint16_t accel_denom{};
uint16_t threshold{};
};
struct IntegerFeedbackState {
bool operator==(const IntegerFeedbackState& other) const {
return class_id == other.class_id && feedback_id == other.feedback_id &&
len == other.len && resolution == other.resolution &&
min_value == other.min_value && max_value == other.max_value;
}
FeedbackClass class_id{};
uint8_t feedback_id{};
uint16_t len{};
uint32_t resolution{};
int32_t min_value{};
int32_t max_value{};
};
struct StringFeedbackState {
bool operator==(const StringFeedbackState& other) const {
return class_id == other.class_id && feedback_id == other.feedback_id &&
len == other.len && max_symbols == other.max_symbols &&
keysyms == other.keysyms;
}
FeedbackClass class_id{};
uint8_t feedback_id{};
uint16_t len{};
uint16_t max_symbols{};
std::vector<KeySym> keysyms{};
};
struct BellFeedbackState {
bool operator==(const BellFeedbackState& other) const {
return class_id == other.class_id && feedback_id == other.feedback_id &&
len == other.len && percent == other.percent &&
pitch == other.pitch && duration == other.duration;
}
FeedbackClass class_id{};
uint8_t feedback_id{};
uint16_t len{};
uint8_t percent{};
uint16_t pitch{};
uint16_t duration{};
};
struct LedFeedbackState {
bool operator==(const LedFeedbackState& other) const {
return class_id == other.class_id && feedback_id == other.feedback_id &&
len == other.len && led_mask == other.led_mask &&
led_values == other.led_values;
}
FeedbackClass class_id{};
uint8_t feedback_id{};
uint16_t len{};
uint32_t led_mask{};
uint32_t led_values{};
};
struct FeedbackState {
uint8_t feedback_id{};
uint16_t len{};
struct Keyboard {
uint16_t pitch{};
uint16_t duration{};
uint32_t led_mask{};
uint32_t led_values{};
uint8_t global_auto_repeat{};
uint8_t click{};
uint8_t percent{};
std::array<uint8_t, 32> auto_repeats{};
};
struct Pointer {
uint16_t accel_num{};
uint16_t accel_denom{};
uint16_t threshold{};
};
struct String {
uint16_t max_symbols{};
std::vector<KeySym> keysyms{};
};
struct Integer {
uint32_t resolution{};
int32_t min_value{};
int32_t max_value{};
};
struct Led {
uint32_t led_mask{};
uint32_t led_values{};
};
struct Bell {
uint8_t percent{};
uint16_t pitch{};
uint16_t duration{};
};
std::optional<Keyboard> keyboard{};
std::optional<Pointer> pointer{};
std::optional<String> string{};
std::optional<Integer> integer{};
std::optional<Led> led{};
std::optional<Bell> bell{};
};
struct KbdFeedbackCtl {
bool operator==(const KbdFeedbackCtl& other) const {
return class_id == other.class_id && feedback_id == other.feedback_id &&
len == other.len && key == other.key &&
auto_repeat_mode == other.auto_repeat_mode &&
key_click_percent == other.key_click_percent &&
bell_percent == other.bell_percent &&
bell_pitch == other.bell_pitch &&
bell_duration == other.bell_duration &&
led_mask == other.led_mask && led_values == other.led_values;
}
FeedbackClass class_id{};
uint8_t feedback_id{};
uint16_t len{};
KeyCode key{};
uint8_t auto_repeat_mode{};
int8_t key_click_percent{};
int8_t bell_percent{};
int16_t bell_pitch{};
int16_t bell_duration{};
uint32_t led_mask{};
uint32_t led_values{};
};
struct PtrFeedbackCtl {
bool operator==(const PtrFeedbackCtl& other) const {
return class_id == other.class_id && feedback_id == other.feedback_id &&
len == other.len && num == other.num && denom == other.denom &&
threshold == other.threshold;
}
FeedbackClass class_id{};
uint8_t feedback_id{};
uint16_t len{};
int16_t num{};
int16_t denom{};
int16_t threshold{};
};
struct IntegerFeedbackCtl {
bool operator==(const IntegerFeedbackCtl& other) const {
return class_id == other.class_id && feedback_id == other.feedback_id &&
len == other.len && int_to_display == other.int_to_display;
}
FeedbackClass class_id{};
uint8_t feedback_id{};
uint16_t len{};
int32_t int_to_display{};
};
struct StringFeedbackCtl {
bool operator==(const StringFeedbackCtl& other) const {
return class_id == other.class_id && feedback_id == other.feedback_id &&
len == other.len && keysyms == other.keysyms;
}
FeedbackClass class_id{};
uint8_t feedback_id{};
uint16_t len{};
std::vector<KeySym> keysyms{};
};
struct BellFeedbackCtl {
bool operator==(const BellFeedbackCtl& other) const {
return class_id == other.class_id && feedback_id == other.feedback_id &&
len == other.len && percent == other.percent &&
pitch == other.pitch && duration == other.duration;
}
FeedbackClass class_id{};
uint8_t feedback_id{};
uint16_t len{};
int8_t percent{};
int16_t pitch{};
int16_t duration{};
};
struct LedFeedbackCtl {
bool operator==(const LedFeedbackCtl& other) const {
return class_id == other.class_id && feedback_id == other.feedback_id &&
len == other.len && led_mask == other.led_mask &&
led_values == other.led_values;
}
FeedbackClass class_id{};
uint8_t feedback_id{};
uint16_t len{};
uint32_t led_mask{};
uint32_t led_values{};
};
struct FeedbackCtl {
uint8_t feedback_id{};
uint16_t len{};
struct Keyboard {
KeyCode key{};
uint8_t auto_repeat_mode{};
int8_t key_click_percent{};
int8_t bell_percent{};
int16_t bell_pitch{};
int16_t bell_duration{};
uint32_t led_mask{};
uint32_t led_values{};
};
struct Pointer {
int16_t num{};
int16_t denom{};
int16_t threshold{};
};
struct String {
std::vector<KeySym> keysyms{};
};
struct Integer {
int32_t int_to_display{};
};
struct Led {
uint32_t led_mask{};
uint32_t led_values{};
};
struct Bell {
int8_t percent{};
int16_t pitch{};
int16_t duration{};
};
std::optional<Keyboard> keyboard{};
std::optional<Pointer> pointer{};
std::optional<String> string{};
std::optional<Integer> integer{};
std::optional<Led> led{};
std::optional<Bell> bell{};
};
struct KeyState {
bool operator==(const KeyState& other) const {
return class_id == other.class_id && len == other.len &&
num_keys == other.num_keys && keys == other.keys;
}
InputClass class_id{};
uint8_t len{};
uint8_t num_keys{};
std::array<uint8_t, 32> keys{};
};
struct ButtonState {
bool operator==(const ButtonState& other) const {
return class_id == other.class_id && len == other.len &&
num_buttons == other.num_buttons && buttons == other.buttons;
}
InputClass class_id{};
uint8_t len{};
uint8_t num_buttons{};
std::array<uint8_t, 32> buttons{};
};
struct ValuatorState {
bool operator==(const ValuatorState& other) const {
return class_id == other.class_id && len == other.len &&
mode == other.mode && valuators == other.valuators;
}
InputClass class_id{};
uint8_t len{};
ValuatorStateModeMask mode{};
std::vector<int32_t> valuators{};
};
struct InputState {
uint8_t len{};
struct Key {
uint8_t num_keys{};
std::array<uint8_t, 32> keys{};
};
struct Button {
uint8_t num_buttons{};
std::array<uint8_t, 32> buttons{};
};
struct Valuator {
ValuatorStateModeMask mode{};
std::vector<int32_t> valuators{};
};
std::optional<Key> key{};
std::optional<Button> button{};
std::optional<Valuator> valuator{};
};
struct DeviceResolutionState {
bool operator==(const DeviceResolutionState& other) const {
return control_id == other.control_id && len == other.len &&
resolution_values == other.resolution_values &&
resolution_min == other.resolution_min &&
resolution_max == other.resolution_max;
}
DeviceControl control_id{};
uint16_t len{};
std::vector<uint32_t> resolution_values{};
std::vector<uint32_t> resolution_min{};
std::vector<uint32_t> resolution_max{};
};
struct DeviceAbsCalibState {
bool operator==(const DeviceAbsCalibState& other) const {
return control_id == other.control_id && len == other.len &&
min_x == other.min_x && max_x == other.max_x &&
min_y == other.min_y && max_y == other.max_y &&
flip_x == other.flip_x && flip_y == other.flip_y &&
rotation == other.rotation &&
button_threshold == other.button_threshold;
}
DeviceControl control_id{};
uint16_t len{};
int32_t min_x{};
int32_t max_x{};
int32_t min_y{};
int32_t max_y{};
uint32_t flip_x{};
uint32_t flip_y{};
uint32_t rotation{};
uint32_t button_threshold{};
};
struct DeviceAbsAreaState {
bool operator==(const DeviceAbsAreaState& other) const {
return control_id == other.control_id && len == other.len &&
offset_x == other.offset_x && offset_y == other.offset_y &&
width == other.width && height == other.height &&
screen == other.screen && following == other.following;
}
DeviceControl control_id{};
uint16_t len{};
uint32_t offset_x{};
uint32_t offset_y{};
uint32_t width{};
uint32_t height{};
uint32_t screen{};
uint32_t following{};
};
struct DeviceCoreState {
bool operator==(const DeviceCoreState& other) const {
return control_id == other.control_id && len == other.len &&
status == other.status && iscore == other.iscore;
}
DeviceControl control_id{};
uint16_t len{};
uint8_t status{};
uint8_t iscore{};
};
struct DeviceEnableState {
bool operator==(const DeviceEnableState& other) const {
return control_id == other.control_id && len == other.len &&
enable == other.enable;
}
DeviceControl control_id{};
uint16_t len{};
uint8_t enable{};
};
struct DeviceState {
uint16_t len{};
struct Resolution {
std::vector<uint32_t> resolution_values{};
std::vector<uint32_t> resolution_min{};
std::vector<uint32_t> resolution_max{};
};
struct AbsCalib {
int32_t min_x{};
int32_t max_x{};
int32_t min_y{};
int32_t max_y{};
uint32_t flip_x{};
uint32_t flip_y{};
uint32_t rotation{};
uint32_t button_threshold{};
};
struct Core {
uint8_t status{};
uint8_t iscore{};
};
struct Enable {
uint8_t enable{};
};
struct AbsArea {
uint32_t offset_x{};
uint32_t offset_y{};
uint32_t width{};
uint32_t height{};
uint32_t screen{};
uint32_t following{};
};
std::optional<Resolution> resolution{};
std::optional<AbsCalib> abs_calib{};
std::optional<Core> core{};
std::optional<Enable> enable{};
std::optional<AbsArea> abs_area{};
};
struct DeviceResolutionCtl {
bool operator==(const DeviceResolutionCtl& other) const {
return control_id == other.control_id && len == other.len &&
first_valuator == other.first_valuator &&
resolution_values == other.resolution_values;
}
DeviceControl control_id{};
uint16_t len{};
uint8_t first_valuator{};
std::vector<uint32_t> resolution_values{};
};
struct DeviceAbsCalibCtl {
bool operator==(const DeviceAbsCalibCtl& other) const {
return control_id == other.control_id && len == other.len &&
min_x == other.min_x && max_x == other.max_x &&
min_y == other.min_y && max_y == other.max_y &&
flip_x == other.flip_x && flip_y == other.flip_y &&
rotation == other.rotation &&
button_threshold == other.button_threshold;
}
DeviceControl control_id{};
uint16_t len{};
int32_t min_x{};
int32_t max_x{};
int32_t min_y{};
int32_t max_y{};
uint32_t flip_x{};
uint32_t flip_y{};
uint32_t rotation{};
uint32_t button_threshold{};
};
struct DeviceAbsAreaCtrl {
bool operator==(const DeviceAbsAreaCtrl& other) const {
return control_id == other.control_id && len == other.len &&
offset_x == other.offset_x && offset_y == other.offset_y &&
width == other.width && height == other.height &&
screen == other.screen && following == other.following;
}
DeviceControl control_id{};
uint16_t len{};
uint32_t offset_x{};
uint32_t offset_y{};
int32_t width{};
int32_t height{};
int32_t screen{};
uint32_t following{};
};
struct DeviceCoreCtrl {
bool operator==(const DeviceCoreCtrl& other) const {
return control_id == other.control_id && len == other.len &&
status == other.status;
}
DeviceControl control_id{};
uint16_t len{};
uint8_t status{};
};
struct DeviceEnableCtrl {
bool operator==(const DeviceEnableCtrl& other) const {
return control_id == other.control_id && len == other.len &&
enable == other.enable;
}
DeviceControl control_id{};
uint16_t len{};
uint8_t enable{};
};
struct DeviceCtl {
uint16_t len{};
struct Resolution {
uint8_t first_valuator{};
std::vector<uint32_t> resolution_values{};
};
struct AbsCalib {
int32_t min_x{};
int32_t max_x{};
int32_t min_y{};
int32_t max_y{};
uint32_t flip_x{};
uint32_t flip_y{};
uint32_t rotation{};
uint32_t button_threshold{};
};
struct Core {
uint8_t status{};
};
struct Enable {
uint8_t enable{};
};
struct AbsArea {
uint32_t offset_x{};
uint32_t offset_y{};
int32_t width{};
int32_t height{};
int32_t screen{};
uint32_t following{};
};
std::optional<Resolution> resolution{};
std::optional<AbsCalib> abs_calib{};
std::optional<Core> core{};
std::optional<Enable> enable{};
std::optional<AbsArea> abs_area{};
};
struct GroupInfo {
bool operator==(const GroupInfo& other) const {
return base == other.base && latched == other.latched &&
locked == other.locked && effective == other.effective;
}
uint8_t base{};
uint8_t latched{};
uint8_t locked{};
uint8_t effective{};
};
struct ModifierInfo {
bool operator==(const ModifierInfo& other) const {
return base == other.base && latched == other.latched &&
locked == other.locked && effective == other.effective;
}
uint32_t base{};
uint32_t latched{};
uint32_t locked{};
uint32_t effective{};
};
struct AddMaster {
bool operator==(const AddMaster& other) const {
return type == other.type && len == other.len &&
send_core == other.send_core && enable == other.enable &&
name == other.name;
}
HierarchyChangeType type{};
uint16_t len{};
uint8_t send_core{};
uint8_t enable{};
std::string name{};
};
struct RemoveMaster {
bool operator==(const RemoveMaster& other) const {
return type == other.type && len == other.len &&
deviceid == other.deviceid && return_mode == other.return_mode &&
return_pointer == other.return_pointer &&
return_keyboard == other.return_keyboard;
}
HierarchyChangeType type{};
uint16_t len{};
DeviceId deviceid{};
ChangeMode return_mode{};
DeviceId return_pointer{};
DeviceId return_keyboard{};
};
struct AttachSlave {
bool operator==(const AttachSlave& other) const {
return type == other.type && len == other.len &&
deviceid == other.deviceid && master == other.master;
}
HierarchyChangeType type{};
uint16_t len{};
DeviceId deviceid{};
DeviceId master{};
};
struct DetachSlave {
bool operator==(const DetachSlave& other) const {
return type == other.type && len == other.len &&
deviceid == other.deviceid;
}
HierarchyChangeType type{};
uint16_t len{};
DeviceId deviceid{};
};
struct HierarchyChange {
uint16_t len{};
struct AddMaster {
uint8_t send_core{};
uint8_t enable{};
std::string name{};
};
struct RemoveMaster {
DeviceId deviceid{};
ChangeMode return_mode{};
DeviceId return_pointer{};
DeviceId return_keyboard{};
};
struct AttachSlave {
DeviceId deviceid{};
DeviceId master{};
};
struct DetachSlave {
DeviceId deviceid{};
};
std::optional<AddMaster> add_master{};
std::optional<RemoveMaster> remove_master{};
std::optional<AttachSlave> attach_slave{};
std::optional<DetachSlave> detach_slave{};
};
struct EventMask {
bool operator==(const EventMask& other) const {
return deviceid == other.deviceid && mask == other.mask;
}
DeviceId deviceid{};
std::vector<XIEventMask> mask{};
};
struct ButtonClass {
bool operator==(const ButtonClass& other) const {
return type == other.type && len == other.len &&
sourceid == other.sourceid && state == other.state &&
labels == other.labels;
}
DeviceClassType type{};
uint16_t len{};
DeviceId sourceid{};
std::vector<uint32_t> state{};
std::vector<Atom> labels{};
};
struct KeyClass {
bool operator==(const KeyClass& other) const {
return type == other.type && len == other.len &&
sourceid == other.sourceid && keys == other.keys;
}
DeviceClassType type{};
uint16_t len{};
DeviceId sourceid{};
std::vector<uint32_t> keys{};
};
struct ScrollClass {
bool operator==(const ScrollClass& other) const {
return type == other.type && len == other.len &&
sourceid == other.sourceid && number == other.number &&
scroll_type == other.scroll_type && flags == other.flags &&
increment == other.increment;
}
DeviceClassType type{};
uint16_t len{};
DeviceId sourceid{};
uint16_t number{};
ScrollType scroll_type{};
ScrollFlags flags{};
Fp3232 increment{};
};
struct TouchClass {
bool operator==(const TouchClass& other) const {
return type == other.type && len == other.len &&
sourceid == other.sourceid && mode == other.mode &&
num_touches == other.num_touches;
}
DeviceClassType type{};
uint16_t len{};
DeviceId sourceid{};
TouchMode mode{};
uint8_t num_touches{};
};
struct GestureClass {
bool operator==(const GestureClass& other) const {
return type == other.type && len == other.len &&
sourceid == other.sourceid && num_touches == other.num_touches;
}
DeviceClassType type{};
uint16_t len{};
DeviceId sourceid{};
uint8_t num_touches{};
};
struct ValuatorClass {
bool operator==(const ValuatorClass& other) const {
return type == other.type && len == other.len &&
sourceid == other.sourceid && number == other.number &&
label == other.label && min == other.min && max == other.max &&
value == other.value && resolution == other.resolution &&
mode == other.mode;
}
DeviceClassType type{};
uint16_t len{};
DeviceId sourceid{};
uint16_t number{};
Atom label{};
Fp3232 min{};
Fp3232 max{};
Fp3232 value{};
uint32_t resolution{};
ValuatorMode mode{};
};
struct DeviceClass {
uint16_t len{};
DeviceId sourceid{};
struct Key {
std::vector<uint32_t> keys{};
};
struct Button {
std::vector<uint32_t> state{};
std::vector<Atom> labels{};
};
struct Valuator {
uint16_t number{};
Atom label{};
Fp3232 min{};
Fp3232 max{};
Fp3232 value{};
uint32_t resolution{};
ValuatorMode mode{};
};
struct Scroll {
uint16_t number{};
ScrollType scroll_type{};
ScrollFlags flags{};
Fp3232 increment{};
};
struct Touch {
TouchMode mode{};
uint8_t num_touches{};
};
struct Gesture {
uint8_t num_touches{};
};
std::optional<Key> key{};
std::optional<Button> button{};
std::optional<Valuator> valuator{};
std::optional<Scroll> scroll{};
std::optional<Touch> touch{};
std::optional<Gesture> gesture{};
};
struct XIDeviceInfo {
DeviceId deviceid{};
DeviceType type{};
DeviceId attachment{};
uint8_t enabled{};
std::string name{};
std::vector<DeviceClass> classes{};
};
struct GrabModifierInfo {
bool operator==(const GrabModifierInfo& other) const {
return modifiers == other.modifiers && status == other.status;
}
uint32_t modifiers{};
GrabStatus status{};
};
struct BarrierReleasePointerInfo {
bool operator==(const BarrierReleasePointerInfo& other) const {
return deviceid == other.deviceid && barrier == other.barrier &&
eventid == other.eventid;
}
DeviceId deviceid{};
XFixes::Barrier barrier{};
uint32_t eventid{};
};
struct DeviceValuatorEvent {
static constexpr uint8_t type_id = 12;
static constexpr uint8_t opcode = 0;
uint8_t device_id{};
uint16_t sequence{};
uint16_t device_state{};
uint8_t num_valuators{};
uint8_t first_valuator{};
std::array<int32_t, 6> valuators{};
};
struct LegacyDeviceEvent {
static constexpr uint8_t type_id = 13;
enum Opcode {
DeviceKeyPress = 1,
DeviceKeyRelease = 2,
DeviceButtonPress = 3,
DeviceButtonRelease = 4,
DeviceMotionNotify = 5,
ProximityIn = 8,
ProximityOut = 9,
} opcode{};
uint8_t detail{};
uint16_t sequence{};
Time time{};
Window root{};
Window event{};
Window child{};
int16_t root_x{};
int16_t root_y{};
int16_t event_x{};
int16_t event_y{};
KeyButMask state{};
uint8_t same_screen{};
uint8_t device_id{};
};
struct DeviceFocusEvent {
static constexpr uint8_t type_id = 14;
enum Opcode {
In = 6,
Out = 7,
} opcode{};
x11::NotifyDetail detail{};
uint16_t sequence{};
Time time{};
Window window{};
x11::NotifyMode mode{};
uint8_t device_id{};
};
struct DeviceStateNotifyEvent {
static constexpr uint8_t type_id = 15;
static constexpr uint8_t opcode = 10;
uint8_t device_id{};
uint16_t sequence{};
Time time{};
uint8_t num_keys{};
uint8_t num_buttons{};
uint8_t num_valuators{};
ClassesReportedMask classes_reported{};
std::array<uint8_t, 4> buttons{};
std::array<uint8_t, 4> keys{};
std::array<uint32_t, 3> valuators{};
};
struct DeviceMappingNotifyEvent {
static constexpr uint8_t type_id = 16;
static constexpr uint8_t opcode = 11;
uint8_t device_id{};
uint16_t sequence{};
Mapping request{};
KeyCode first_keycode{};
uint8_t count{};
Time time{};
};
struct ChangeDeviceNotifyEvent {
static constexpr uint8_t type_id = 17;
static constexpr uint8_t opcode = 12;
uint8_t device_id{};
uint16_t sequence{};
Time time{};
ChangeDevice request{};
};
struct DeviceKeyStateNotifyEvent {
static constexpr uint8_t type_id = 18;
static constexpr uint8_t opcode = 13;
uint8_t device_id{};
uint16_t sequence{};
std::array<uint8_t, 28> keys{};
};
struct DeviceButtonStateNotifyEvent {
static constexpr uint8_t type_id = 19;
static constexpr uint8_t opcode = 14;
uint8_t device_id{};
uint16_t sequence{};
std::array<uint8_t, 28> buttons{};
};
struct DevicePresenceNotifyEvent {
static constexpr uint8_t type_id = 20;
static constexpr uint8_t opcode = 15;
uint16_t sequence{};
Time time{};
DeviceChange devchange{};
uint8_t device_id{};
uint16_t control{};
};
struct DevicePropertyNotifyEvent {
static constexpr uint8_t type_id = 21;
static constexpr uint8_t opcode = 16;
Property state{};
uint16_t sequence{};
Time time{};
Atom property{};
uint8_t device_id{};
};
struct DeviceChangedEvent {
static constexpr uint8_t type_id = 22;
static constexpr uint8_t opcode = 1;
uint16_t sequence{};
DeviceId deviceid{};
Time time{};
DeviceId sourceid{};
ChangeReason reason{};
std::vector<DeviceClass> classes{};
};
struct DeviceEvent {
static constexpr uint8_t type_id = 23;
enum Opcode {
KeyPress = 2,
KeyRelease = 3,
ButtonPress = 4,
ButtonRelease = 5,
Motion = 6,
TouchBegin = 18,
TouchUpdate = 19,
TouchEnd = 20,
} opcode{};
uint16_t sequence{};
DeviceId deviceid{};
Time time{};
uint32_t detail{};
Window root{};
Window event{};
Window child{};
Fp1616 root_x{};
Fp1616 root_y{};
Fp1616 event_x{};
Fp1616 event_y{};
DeviceId sourceid{};
KeyEventFlags flags{};
ModifierInfo mods{};
GroupInfo group{};
std::vector<uint32_t> button_mask{};
std::vector<uint32_t> valuator_mask{};
std::vector<Fp3232> axisvalues{};
};
struct CrossingEvent {
static constexpr uint8_t type_id = 24;
enum Opcode {
Enter = 7,
Leave = 8,
FocusIn = 9,
FocusOut = 10,
} opcode{};
uint16_t sequence{};
DeviceId deviceid{};
Time time{};
DeviceId sourceid{};
NotifyMode mode{};
NotifyDetail detail{};
Window root{};
Window event{};
Window child{};
Fp1616 root_x{};
Fp1616 root_y{};
Fp1616 event_x{};
Fp1616 event_y{};
uint8_t same_screen{};
uint8_t focus{};
ModifierInfo mods{};
GroupInfo group{};
std::vector<uint32_t> buttons{};
};
struct HierarchyInfo {
bool operator==(const HierarchyInfo& other) const {
return deviceid == other.deviceid && attachment == other.attachment &&
type == other.type && enabled == other.enabled &&
flags == other.flags;
}
DeviceId deviceid{};
DeviceId attachment{};
DeviceType type{};
uint8_t enabled{};
HierarchyMask flags{};
};
struct HierarchyEvent {
static constexpr uint8_t type_id = 25;
static constexpr uint8_t opcode = 11;
uint16_t sequence{};
DeviceId deviceid{};
Time time{};
HierarchyMask flags{};
std::vector<HierarchyInfo> infos{};
};
struct PropertyEvent {
static constexpr uint8_t type_id = 26;
static constexpr uint8_t opcode = 12;
uint16_t sequence{};
DeviceId deviceid{};
Time time{};
Atom property{};
PropertyFlag what{};
};
struct RawDeviceEvent {
static constexpr uint8_t type_id = 27;
enum Opcode {
RawKeyPress = 13,
RawKeyRelease = 14,
RawButtonPress = 15,
RawButtonRelease = 16,
RawMotion = 17,
RawTouchBegin = 22,
RawTouchUpdate = 23,
RawTouchEnd = 24,
} opcode{};
uint16_t sequence{};
DeviceId deviceid{};
Time time{};
uint32_t detail{};
DeviceId sourceid{};
KeyEventFlags flags{};
std::vector<uint32_t> valuator_mask{};
std::vector<Fp3232> axisvalues{};
std::vector<Fp3232> axisvalues_raw{};
};
struct TouchOwnershipEvent {
static constexpr uint8_t type_id = 28;
static constexpr uint8_t opcode = 21;
uint16_t sequence{};
DeviceId deviceid{};
Time time{};
uint32_t touchid{};
Window root{};
Window event{};
Window child{};
DeviceId sourceid{};
TouchOwnershipFlags flags{};
};
struct BarrierEvent {
static constexpr uint8_t type_id = 29;
enum Opcode {
Hit = 25,
Leave = 26,
} opcode{};
uint16_t sequence{};
DeviceId deviceid{};
Time time{};
uint32_t eventid{};
Window root{};
Window event{};
XFixes::Barrier barrier{};
uint32_t dtime{};
BarrierFlags flags{};
DeviceId sourceid{};
Fp1616 root_x{};
Fp1616 root_y{};
Fp3232 dx{};
Fp3232 dy{};
};
struct GesturePinchEvent {
static constexpr uint8_t type_id = 30;
enum Opcode {
Begin = 27,
Update = 28,
End = 29,
} opcode{};
uint16_t sequence{};
DeviceId deviceid{};
Time time{};
uint32_t detail{};
Window root{};
Window event{};
Window child{};
Fp1616 root_x{};
Fp1616 root_y{};
Fp1616 event_x{};
Fp1616 event_y{};
Fp1616 delta_x{};
Fp1616 delta_y{};
Fp1616 delta_unaccel_x{};
Fp1616 delta_unaccel_y{};
Fp1616 scale{};
Fp1616 delta_angle{};
DeviceId sourceid{};
ModifierInfo mods{};
GroupInfo group{};
GesturePinchEventFlags flags{};
};
struct GestureSwipeEvent {
static constexpr uint8_t type_id = 31;
enum Opcode {
Begin = 30,
Update = 31,
End = 32,
} opcode{};
uint16_t sequence{};
DeviceId deviceid{};
Time time{};
uint32_t detail{};
Window root{};
Window event{};
Window child{};
Fp1616 root_x{};
Fp1616 root_y{};
Fp1616 event_x{};
Fp1616 event_y{};
Fp1616 delta_x{};
Fp1616 delta_y{};
Fp1616 delta_unaccel_x{};
Fp1616 delta_unaccel_y{};
DeviceId sourceid{};
ModifierInfo mods{};
GroupInfo group{};
GestureSwipeEventFlags flags{};
};
using EventForSend = std::array<uint8_t, 32>;
struct DeviceError : public x11::Error {
uint16_t sequence{};
uint32_t bad_value{};
uint16_t minor_opcode{};
uint8_t major_opcode{};
std::string ToString() const override;
};
struct EventError : public x11::Error {
uint16_t sequence{};
uint32_t bad_value{};
uint16_t minor_opcode{};
uint8_t major_opcode{};
std::string ToString() const override;
};
struct ModeError : public x11::Error {
uint16_t sequence{};
uint32_t bad_value{};
uint16_t minor_opcode{};
uint8_t major_opcode{};
std::string ToString() const override;
};
struct DeviceBusyError : public x11::Error {
uint16_t sequence{};
uint32_t bad_value{};
uint16_t minor_opcode{};
uint8_t major_opcode{};
std::string ToString() const override;
};
struct ClassError : public x11::Error {
uint16_t sequence{};
uint32_t bad_value{};
uint16_t minor_opcode{};
uint8_t major_opcode{};
std::string ToString() const override;
};
struct GetExtensionVersionRequest {
std::string name{};
};
struct GetExtensionVersionReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
uint16_t server_major{};
uint16_t server_minor{};
uint8_t present{};
};
using GetExtensionVersionResponse = Response<GetExtensionVersionReply>;
Future<GetExtensionVersionReply> GetExtensionVersion(
const GetExtensionVersionRequest& request);
Future<GetExtensionVersionReply> GetExtensionVersion(
const std::string& name = {});
struct ListInputDevicesRequest {};
struct ListInputDevicesReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
std::vector<DeviceInfo> devices{};
std::vector<InputInfo> infos{};
std::vector<Str> names{};
};
using ListInputDevicesResponse = Response<ListInputDevicesReply>;
Future<ListInputDevicesReply> ListInputDevices(
const ListInputDevicesRequest& request);
Future<ListInputDevicesReply> ListInputDevices();
struct OpenDeviceRequest {
uint8_t device_id{};
};
struct OpenDeviceReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
std::vector<InputClassInfo> class_info{};
};
using OpenDeviceResponse = Response<OpenDeviceReply>;
Future<OpenDeviceReply> OpenDevice(const OpenDeviceRequest& request);
Future<OpenDeviceReply> OpenDevice(const uint8_t& device_id = {});
struct CloseDeviceRequest {
uint8_t device_id{};
};
using CloseDeviceResponse = Response<void>;
Future<void> CloseDevice(const CloseDeviceRequest& request);
Future<void> CloseDevice(const uint8_t& device_id = {});
struct SetDeviceModeRequest {
uint8_t device_id{};
ValuatorMode mode{};
};
struct SetDeviceModeReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
GrabStatus status{};
};
using SetDeviceModeResponse = Response<SetDeviceModeReply>;
Future<SetDeviceModeReply> SetDeviceMode(const SetDeviceModeRequest& request);
Future<SetDeviceModeReply> SetDeviceMode(const uint8_t& device_id = {},
const ValuatorMode& mode = {});
struct SelectExtensionEventRequest {
Window window{};
std::vector<EventClass> classes{};
};
using SelectExtensionEventResponse = Response<void>;
Future<void> SelectExtensionEvent(const SelectExtensionEventRequest& request);
Future<void> SelectExtensionEvent(
const Window& window = {},
const std::vector<EventClass>& classes = {});
struct GetSelectedExtensionEventsRequest {
Window window{};
};
struct GetSelectedExtensionEventsReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
std::vector<EventClass> this_classes{};
std::vector<EventClass> all_classes{};
};
using GetSelectedExtensionEventsResponse =
Response<GetSelectedExtensionEventsReply>;
Future<GetSelectedExtensionEventsReply> GetSelectedExtensionEvents(
const GetSelectedExtensionEventsRequest& request);
Future<GetSelectedExtensionEventsReply> GetSelectedExtensionEvents(
const Window& window = {});
struct ChangeDeviceDontPropagateListRequest {
Window window{};
PropagateMode mode{};
std::vector<EventClass> classes{};
};
using ChangeDeviceDontPropagateListResponse = Response<void>;
Future<void> ChangeDeviceDontPropagateList(
const ChangeDeviceDontPropagateListRequest& request);
Future<void> ChangeDeviceDontPropagateList(
const Window& window = {},
const PropagateMode& mode = {},
const std::vector<EventClass>& classes = {});
struct GetDeviceDontPropagateListRequest {
Window window{};
};
struct GetDeviceDontPropagateListReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
std::vector<EventClass> classes{};
};
using GetDeviceDontPropagateListResponse =
Response<GetDeviceDontPropagateListReply>;
Future<GetDeviceDontPropagateListReply> GetDeviceDontPropagateList(
const GetDeviceDontPropagateListRequest& request);
Future<GetDeviceDontPropagateListReply> GetDeviceDontPropagateList(
const Window& window = {});
struct GetDeviceMotionEventsRequest {
Time start{};
Time stop{};
uint8_t device_id{};
};
struct GetDeviceMotionEventsReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
uint8_t num_axes{};
ValuatorMode device_mode{};
std::vector<DeviceTimeCoord> events{};
};
using GetDeviceMotionEventsResponse = Response<GetDeviceMotionEventsReply>;
Future<GetDeviceMotionEventsReply> GetDeviceMotionEvents(
const GetDeviceMotionEventsRequest& request);
Future<GetDeviceMotionEventsReply> GetDeviceMotionEvents(
const Time& start = {},
const Time& stop = {},
const uint8_t& device_id = {});
struct ChangeKeyboardDeviceRequest {
uint8_t device_id{};
};
struct ChangeKeyboardDeviceReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
GrabStatus status{};
};
using ChangeKeyboardDeviceResponse = Response<ChangeKeyboardDeviceReply>;
Future<ChangeKeyboardDeviceReply> ChangeKeyboardDevice(
const ChangeKeyboardDeviceRequest& request);
Future<ChangeKeyboardDeviceReply> ChangeKeyboardDevice(
const uint8_t& device_id = {});
struct ChangePointerDeviceRequest {
uint8_t x_axis{};
uint8_t y_axis{};
uint8_t device_id{};
};
struct ChangePointerDeviceReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
GrabStatus status{};
};
using ChangePointerDeviceResponse = Response<ChangePointerDeviceReply>;
Future<ChangePointerDeviceReply> ChangePointerDevice(
const ChangePointerDeviceRequest& request);
Future<ChangePointerDeviceReply> ChangePointerDevice(
const uint8_t& x_axis = {},
const uint8_t& y_axis = {},
const uint8_t& device_id = {});
struct GrabDeviceRequest {
Window grab_window{};
Time time{};
GrabMode this_device_mode{};
GrabMode other_device_mode{};
uint8_t owner_events{};
uint8_t device_id{};
std::vector<EventClass> classes{};
};
struct GrabDeviceReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
GrabStatus status{};
};
using GrabDeviceResponse = Response<GrabDeviceReply>;
Future<GrabDeviceReply> GrabDevice(const GrabDeviceRequest& request);
Future<GrabDeviceReply> GrabDevice(
const Window& grab_window = {},
const Time& time = {},
const GrabMode& this_device_mode = {},
const GrabMode& other_device_mode = {},
const uint8_t& owner_events = {},
const uint8_t& device_id = {},
const std::vector<EventClass>& classes = {});
struct UngrabDeviceRequest {
Time time{};
uint8_t device_id{};
};
using UngrabDeviceResponse = Response<void>;
Future<void> UngrabDevice(const UngrabDeviceRequest& request);
Future<void> UngrabDevice(const Time& time = {},
const uint8_t& device_id = {});
struct GrabDeviceKeyRequest {
Window grab_window{};
ModMask modifiers{};
uint8_t modifier_device{};
uint8_t grabbed_device{};
uint8_t key{};
GrabMode this_device_mode{};
GrabMode other_device_mode{};
uint8_t owner_events{};
std::vector<EventClass> classes{};
};
using GrabDeviceKeyResponse = Response<void>;
Future<void> GrabDeviceKey(const GrabDeviceKeyRequest& request);
Future<void> GrabDeviceKey(const Window& grab_window = {},
const ModMask& modifiers = {},
const uint8_t& modifier_device = {},
const uint8_t& grabbed_device = {},
const uint8_t& key = {},
const GrabMode& this_device_mode = {},
const GrabMode& other_device_mode = {},
const uint8_t& owner_events = {},
const std::vector<EventClass>& classes = {});
struct UngrabDeviceKeyRequest {
Window grabWindow{};
ModMask modifiers{};
uint8_t modifier_device{};
uint8_t key{};
uint8_t grabbed_device{};
};
using UngrabDeviceKeyResponse = Response<void>;
Future<void> UngrabDeviceKey(const UngrabDeviceKeyRequest& request);
Future<void> UngrabDeviceKey(const Window& grabWindow = {},
const ModMask& modifiers = {},
const uint8_t& modifier_device = {},
const uint8_t& key = {},
const uint8_t& grabbed_device = {});
struct GrabDeviceButtonRequest {
Window grab_window{};
uint8_t grabbed_device{};
uint8_t modifier_device{};
ModMask modifiers{};
GrabMode this_device_mode{};
GrabMode other_device_mode{};
uint8_t button{};
uint8_t owner_events{};
std::vector<EventClass> classes{};
};
using GrabDeviceButtonResponse = Response<void>;
Future<void> GrabDeviceButton(const GrabDeviceButtonRequest& request);
Future<void> GrabDeviceButton(const Window& grab_window = {},
const uint8_t& grabbed_device = {},
const uint8_t& modifier_device = {},
const ModMask& modifiers = {},
const GrabMode& this_device_mode = {},
const GrabMode& other_device_mode = {},
const uint8_t& button = {},
const uint8_t& owner_events = {},
const std::vector<EventClass>& classes = {});
struct UngrabDeviceButtonRequest {
Window grab_window{};
ModMask modifiers{};
uint8_t modifier_device{};
uint8_t button{};
uint8_t grabbed_device{};
};
using UngrabDeviceButtonResponse = Response<void>;
Future<void> UngrabDeviceButton(const UngrabDeviceButtonRequest& request);
Future<void> UngrabDeviceButton(const Window& grab_window = {},
const ModMask& modifiers = {},
const uint8_t& modifier_device = {},
const uint8_t& button = {},
const uint8_t& grabbed_device = {});
struct AllowDeviceEventsRequest {
Time time{};
DeviceInputMode mode{};
uint8_t device_id{};
};
using AllowDeviceEventsResponse = Response<void>;
Future<void> AllowDeviceEvents(const AllowDeviceEventsRequest& request);
Future<void> AllowDeviceEvents(const Time& time = {},
const DeviceInputMode& mode = {},
const uint8_t& device_id = {});
struct GetDeviceFocusRequest {
uint8_t device_id{};
};
struct GetDeviceFocusReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
Window focus{};
Time time{};
InputFocus revert_to{};
};
using GetDeviceFocusResponse = Response<GetDeviceFocusReply>;
Future<GetDeviceFocusReply> GetDeviceFocus(
const GetDeviceFocusRequest& request);
Future<GetDeviceFocusReply> GetDeviceFocus(const uint8_t& device_id = {});
struct SetDeviceFocusRequest {
Window focus{};
Time time{};
InputFocus revert_to{};
uint8_t device_id{};
};
using SetDeviceFocusResponse = Response<void>;
Future<void> SetDeviceFocus(const SetDeviceFocusRequest& request);
Future<void> SetDeviceFocus(const Window& focus = {},
const Time& time = {},
const InputFocus& revert_to = {},
const uint8_t& device_id = {});
struct GetFeedbackControlRequest {
uint8_t device_id{};
};
struct GetFeedbackControlReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
std::vector<FeedbackState> feedbacks{};
};
using GetFeedbackControlResponse = Response<GetFeedbackControlReply>;
Future<GetFeedbackControlReply> GetFeedbackControl(
const GetFeedbackControlRequest& request);
Future<GetFeedbackControlReply> GetFeedbackControl(
const uint8_t& device_id = {});
struct ChangeFeedbackControlRequest {
ChangeFeedbackControlMask mask{};
uint8_t device_id{};
uint8_t feedback_id{};
FeedbackCtl feedback{};
};
using ChangeFeedbackControlResponse = Response<void>;
Future<void> ChangeFeedbackControl(
const ChangeFeedbackControlRequest& request);
struct Keyboard {
KeyCode key{};
uint8_t auto_repeat_mode{};
int8_t key_click_percent{};
int8_t bell_percent{};
int16_t bell_pitch{};
int16_t bell_duration{};
uint32_t led_mask{};
uint32_t led_values{};
};
struct Pointer {
int16_t num{};
int16_t denom{};
int16_t threshold{};
};
struct String {
std::vector<KeySym> keysyms{};
};
struct Integer {
int32_t int_to_display{};
};
struct Led {
uint32_t led_mask{};
uint32_t led_values{};
};
struct Bell {
int8_t percent{};
int16_t pitch{};
int16_t duration{};
};
Future<void> ChangeFeedbackControl(const ChangeFeedbackControlMask& mask = {},
const uint8_t& device_id = {},
const uint8_t& feedback_id = {},
const FeedbackCtl& feedback = {
{},
{},
std::nullopt,
std::nullopt,
std::nullopt,
std::nullopt,
std::nullopt,
std::nullopt});
struct GetDeviceKeyMappingRequest {
uint8_t device_id{};
KeyCode first_keycode{};
uint8_t count{};
};
struct GetDeviceKeyMappingReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
uint8_t keysyms_per_keycode{};
std::vector<KeySym> keysyms{};
};
using GetDeviceKeyMappingResponse = Response<GetDeviceKeyMappingReply>;
Future<GetDeviceKeyMappingReply> GetDeviceKeyMapping(
const GetDeviceKeyMappingRequest& request);
Future<GetDeviceKeyMappingReply> GetDeviceKeyMapping(
const uint8_t& device_id = {},
const KeyCode& first_keycode = {},
const uint8_t& count = {});
struct ChangeDeviceKeyMappingRequest {
uint8_t device_id{};
KeyCode first_keycode{};
uint8_t keysyms_per_keycode{};
uint8_t keycode_count{};
std::vector<KeySym> keysyms{};
};
using ChangeDeviceKeyMappingResponse = Response<void>;
Future<void> ChangeDeviceKeyMapping(
const ChangeDeviceKeyMappingRequest& request);
Future<void> ChangeDeviceKeyMapping(const uint8_t& device_id = {},
const KeyCode& first_keycode = {},
const uint8_t& keysyms_per_keycode = {},
const uint8_t& keycode_count = {},
const std::vector<KeySym>& keysyms = {});
struct GetDeviceModifierMappingRequest {
uint8_t device_id{};
};
struct GetDeviceModifierMappingReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
uint8_t keycodes_per_modifier{};
std::vector<uint8_t> keymaps{};
};
using GetDeviceModifierMappingResponse =
Response<GetDeviceModifierMappingReply>;
Future<GetDeviceModifierMappingReply> GetDeviceModifierMapping(
const GetDeviceModifierMappingRequest& request);
Future<GetDeviceModifierMappingReply> GetDeviceModifierMapping(
const uint8_t& device_id = {});
struct SetDeviceModifierMappingRequest {
uint8_t device_id{};
uint8_t keycodes_per_modifier{};
std::vector<uint8_t> keymaps{};
};
struct SetDeviceModifierMappingReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
MappingStatus status{};
};
using SetDeviceModifierMappingResponse =
Response<SetDeviceModifierMappingReply>;
Future<SetDeviceModifierMappingReply> SetDeviceModifierMapping(
const SetDeviceModifierMappingRequest& request);
Future<SetDeviceModifierMappingReply> SetDeviceModifierMapping(
const uint8_t& device_id = {},
const uint8_t& keycodes_per_modifier = {},
const std::vector<uint8_t>& keymaps = {});
struct GetDeviceButtonMappingRequest {
uint8_t device_id{};
};
struct GetDeviceButtonMappingReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
std::vector<uint8_t> map{};
};
using GetDeviceButtonMappingResponse = Response<GetDeviceButtonMappingReply>;
Future<GetDeviceButtonMappingReply> GetDeviceButtonMapping(
const GetDeviceButtonMappingRequest& request);
Future<GetDeviceButtonMappingReply> GetDeviceButtonMapping(
const uint8_t& device_id = {});
struct SetDeviceButtonMappingRequest {
uint8_t device_id{};
std::vector<uint8_t> map{};
};
struct SetDeviceButtonMappingReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
MappingStatus status{};
};
using SetDeviceButtonMappingResponse = Response<SetDeviceButtonMappingReply>;
Future<SetDeviceButtonMappingReply> SetDeviceButtonMapping(
const SetDeviceButtonMappingRequest& request);
Future<SetDeviceButtonMappingReply> SetDeviceButtonMapping(
const uint8_t& device_id = {},
const std::vector<uint8_t>& map = {});
struct QueryDeviceStateRequest {
uint8_t device_id{};
};
struct QueryDeviceStateReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
std::vector<InputState> classes{};
};
using QueryDeviceStateResponse = Response<QueryDeviceStateReply>;
Future<QueryDeviceStateReply> QueryDeviceState(
const QueryDeviceStateRequest& request);
Future<QueryDeviceStateReply> QueryDeviceState(const uint8_t& device_id = {});
struct DeviceBellRequest {
uint8_t device_id{};
uint8_t feedback_id{};
uint8_t feedback_class{};
int8_t percent{};
};
using DeviceBellResponse = Response<void>;
Future<void> DeviceBell(const DeviceBellRequest& request);
Future<void> DeviceBell(const uint8_t& device_id = {},
const uint8_t& feedback_id = {},
const uint8_t& feedback_class = {},
const int8_t& percent = {});
struct SetDeviceValuatorsRequest {
uint8_t device_id{};
uint8_t first_valuator{};
std::vector<int32_t> valuators{};
};
struct SetDeviceValuatorsReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
GrabStatus status{};
};
using SetDeviceValuatorsResponse = Response<SetDeviceValuatorsReply>;
Future<SetDeviceValuatorsReply> SetDeviceValuators(
const SetDeviceValuatorsRequest& request);
Future<SetDeviceValuatorsReply> SetDeviceValuators(
const uint8_t& device_id = {},
const uint8_t& first_valuator = {},
const std::vector<int32_t>& valuators = {});
struct GetDeviceControlRequest {
DeviceControl control_id{};
uint8_t device_id{};
};
struct GetDeviceControlReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
uint8_t status{};
DeviceState control{};
};
using GetDeviceControlResponse = Response<GetDeviceControlReply>;
Future<GetDeviceControlReply> GetDeviceControl(
const GetDeviceControlRequest& request);
Future<GetDeviceControlReply> GetDeviceControl(
const DeviceControl& control_id = {},
const uint8_t& device_id = {});
struct ChangeDeviceControlRequest {
DeviceControl control_id{};
uint8_t device_id{};
DeviceCtl control{};
};
struct ChangeDeviceControlReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
uint8_t status{};
};
using ChangeDeviceControlResponse = Response<ChangeDeviceControlReply>;
Future<ChangeDeviceControlReply> ChangeDeviceControl(
const ChangeDeviceControlRequest& request);
struct Resolution {
uint8_t first_valuator{};
std::vector<uint32_t> resolution_values{};
};
struct AbsCalib {
int32_t min_x{};
int32_t max_x{};
int32_t min_y{};
int32_t max_y{};
uint32_t flip_x{};
uint32_t flip_y{};
uint32_t rotation{};
uint32_t button_threshold{};
};
struct Core {
uint8_t status{};
};
struct Enable {
uint8_t enable{};
};
struct AbsArea {
uint32_t offset_x{};
uint32_t offset_y{};
int32_t width{};
int32_t height{};
int32_t screen{};
uint32_t following{};
};
Future<ChangeDeviceControlReply> ChangeDeviceControl(
const DeviceControl& control_id = {},
const uint8_t& device_id = {},
const DeviceCtl& control = {{},
std::nullopt,
std::nullopt,
std::nullopt,
std::nullopt,
std::nullopt});
struct ListDevicePropertiesRequest {
uint8_t device_id{};
};
struct ListDevicePropertiesReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
std::vector<Atom> atoms{};
};
using ListDevicePropertiesResponse = Response<ListDevicePropertiesReply>;
Future<ListDevicePropertiesReply> ListDeviceProperties(
const ListDevicePropertiesRequest& request);
Future<ListDevicePropertiesReply> ListDeviceProperties(
const uint8_t& device_id = {});
struct ChangeDevicePropertyRequest {
Atom property{};
Atom type{};
uint8_t device_id{};
PropMode mode{};
uint32_t num_items{};
std::optional<std::vector<uint8_t>> data8{};
std::optional<std::vector<uint16_t>> data16{};
std::optional<std::vector<uint32_t>> data32{};
};
using ChangeDevicePropertyResponse = Response<void>;
Future<void> ChangeDeviceProperty(const ChangeDevicePropertyRequest& request);
Future<void> ChangeDeviceProperty(
const Atom& property = {},
const Atom& type = {},
const uint8_t& device_id = {},
const PropMode& mode = {},
const uint32_t& num_items = {},
const std::optional<std::vector<uint8_t>>& data8 = std::nullopt,
const std::optional<std::vector<uint16_t>>& data16 = std::nullopt,
const std::optional<std::vector<uint32_t>>& data32 = std::nullopt);
struct DeleteDevicePropertyRequest {
Atom property{};
uint8_t device_id{};
};
using DeleteDevicePropertyResponse = Response<void>;
Future<void> DeleteDeviceProperty(const DeleteDevicePropertyRequest& request);
Future<void> DeleteDeviceProperty(const Atom& property = {},
const uint8_t& device_id = {});
struct GetDevicePropertyRequest {
Atom property{};
Atom type{};
uint32_t offset{};
uint32_t len{};
uint8_t device_id{};
uint8_t c_delete{};
};
struct GetDevicePropertyReply {
uint8_t xi_reply_type{};
uint16_t sequence{};
Atom type{};
uint32_t bytes_after{};
uint32_t num_items{};
uint8_t device_id{};
std::optional<std::vector<uint8_t>> data8{};
std::optional<std::vector<uint16_t>> data16{};
std::optional<std::vector<uint32_t>> data32{};
};
using GetDevicePropertyResponse = Response<GetDevicePropertyReply>;
Future<GetDevicePropertyReply> GetDeviceProperty(
const GetDevicePropertyRequest& request);
Future<GetDevicePropertyReply> GetDeviceProperty(
const Atom& property = {},
const Atom& type = {},
const uint32_t& offset = {},
const uint32_t& len = {},
const uint8_t& device_id = {},
const uint8_t& c_delete = {});
struct XIQueryPointerRequest {
Window window{};
DeviceId deviceid{};
};
struct XIQueryPointerReply {
uint16_t sequence{};
Window root{};
Window child{};
Fp1616 root_x{};
Fp1616 root_y{};
Fp1616 win_x{};
Fp1616 win_y{};
uint8_t same_screen{};
ModifierInfo mods{};
GroupInfo group{};
std::vector<uint32_t> buttons{};
};
using XIQueryPointerResponse = Response<XIQueryPointerReply>;
Future<XIQueryPointerReply> XIQueryPointer(
const XIQueryPointerRequest& request);
Future<XIQueryPointerReply> XIQueryPointer(const Window& window = {},
const DeviceId& deviceid = {});
struct XIWarpPointerRequest {
Window src_win{};
Window dst_win{};
Fp1616 src_x{};
Fp1616 src_y{};
uint16_t src_width{};
uint16_t src_height{};
Fp1616 dst_x{};
Fp1616 dst_y{};
DeviceId deviceid{};
};
using XIWarpPointerResponse = Response<void>;
Future<void> XIWarpPointer(const XIWarpPointerRequest& request);
Future<void> XIWarpPointer(const Window& src_win = {},
const Window& dst_win = {},
const Fp1616& src_x = {},
const Fp1616& src_y = {},
const uint16_t& src_width = {},
const uint16_t& src_height = {},
const Fp1616& dst_x = {},
const Fp1616& dst_y = {},
const DeviceId& deviceid = {});
struct XIChangeCursorRequest {
Window window{};
Cursor cursor{};
DeviceId deviceid{};
};
using XIChangeCursorResponse = Response<void>;
Future<void> XIChangeCursor(const XIChangeCursorRequest& request);
Future<void> XIChangeCursor(const Window& window = {},
const Cursor& cursor = {},
const DeviceId& deviceid = {});
struct XIChangeHierarchyRequest {
std::vector<HierarchyChange> changes{};
};
using XIChangeHierarchyResponse = Response<void>;
Future<void> XIChangeHierarchy(const XIChangeHierarchyRequest& request);
Future<void> XIChangeHierarchy(
const std::vector<HierarchyChange>& changes = {});
struct XISetClientPointerRequest {
Window window{};
DeviceId deviceid{};
};
using XISetClientPointerResponse = Response<void>;
Future<void> XISetClientPointer(const XISetClientPointerRequest& request);
Future<void> XISetClientPointer(const Window& window = {},
const DeviceId& deviceid = {});
struct XIGetClientPointerRequest {
Window window{};
};
struct XIGetClientPointerReply {
uint16_t sequence{};
uint8_t set{};
DeviceId deviceid{};
};
using XIGetClientPointerResponse = Response<XIGetClientPointerReply>;
Future<XIGetClientPointerReply> XIGetClientPointer(
const XIGetClientPointerRequest& request);
Future<XIGetClientPointerReply> XIGetClientPointer(const Window& window = {});
struct XISelectEventsRequest {
Window window{};
std::vector<EventMask> masks{};
};
using XISelectEventsResponse = Response<void>;
Future<void> XISelectEvents(const XISelectEventsRequest& request);
Future<void> XISelectEvents(const Window& window = {},
const std::vector<EventMask>& masks = {});
struct XIQueryVersionRequest {
uint16_t major_version{};
uint16_t minor_version{};
};
struct XIQueryVersionReply {
uint16_t sequence{};
uint16_t major_version{};
uint16_t minor_version{};
};
using XIQueryVersionResponse = Response<XIQueryVersionReply>;
Future<XIQueryVersionReply> XIQueryVersion(
const XIQueryVersionRequest& request);
Future<XIQueryVersionReply> XIQueryVersion(
const uint16_t& major_version = {},
const uint16_t& minor_version = {});
struct XIQueryDeviceRequest {
DeviceId deviceid{};
};
struct XIQueryDeviceReply {
uint16_t sequence{};
std::vector<XIDeviceInfo> infos{};
};
using XIQueryDeviceResponse = Response<XIQueryDeviceReply>;
Future<XIQueryDeviceReply> XIQueryDevice(const XIQueryDeviceRequest& request);
Future<XIQueryDeviceReply> XIQueryDevice(const DeviceId& deviceid = {});
struct XISetFocusRequest {
Window window{};
Time time{};
DeviceId deviceid{};
};
using XISetFocusResponse = Response<void>;
Future<void> XISetFocus(const XISetFocusRequest& request);
Future<void> XISetFocus(const Window& window = {},
const Time& time = {},
const DeviceId& deviceid = {});
struct XIGetFocusRequest {
DeviceId deviceid{};
};
struct XIGetFocusReply {
uint16_t sequence{};
Window focus{};
};
using XIGetFocusResponse = Response<XIGetFocusReply>;
Future<XIGetFocusReply> XIGetFocus(const XIGetFocusRequest& request);
Future<XIGetFocusReply> XIGetFocus(const DeviceId& deviceid = {});
struct XIGrabDeviceRequest {
Window window{};
Time time{};
Cursor cursor{};
DeviceId deviceid{};
GrabMode mode{};
GrabMode paired_device_mode{};
GrabOwner owner_events{};
std::vector<uint32_t> mask{};
};
struct XIGrabDeviceReply {
uint16_t sequence{};
GrabStatus status{};
};
using XIGrabDeviceResponse = Response<XIGrabDeviceReply>;
Future<XIGrabDeviceReply> XIGrabDevice(const XIGrabDeviceRequest& request);
Future<XIGrabDeviceReply> XIGrabDevice(
const Window& window = {},
const Time& time = {},
const Cursor& cursor = {},
const DeviceId& deviceid = {},
const GrabMode& mode = {},
const GrabMode& paired_device_mode = {},
const GrabOwner& owner_events = {},
const std::vector<uint32_t>& mask = {});
struct XIUngrabDeviceRequest {
Time time{};
DeviceId deviceid{};
};
using XIUngrabDeviceResponse = Response<void>;
Future<void> XIUngrabDevice(const XIUngrabDeviceRequest& request);
Future<void> XIUngrabDevice(const Time& time = {},
const DeviceId& deviceid = {});
struct XIAllowEventsRequest {
Time time{};
DeviceId deviceid{};
EventMode event_mode{};
uint32_t touchid{};
Window grab_window{};
};
using XIAllowEventsResponse = Response<void>;
Future<void> XIAllowEvents(const XIAllowEventsRequest& request);
Future<void> XIAllowEvents(const Time& time = {},
const DeviceId& deviceid = {},
const EventMode& event_mode = {},
const uint32_t& touchid = {},
const Window& grab_window = {});
struct XIPassiveGrabDeviceRequest {
Time time{};
Window grab_window{};
Cursor cursor{};
uint32_t detail{};
DeviceId deviceid{};
GrabType grab_type{};
GrabMode22 grab_mode{};
GrabMode paired_device_mode{};
GrabOwner owner_events{};
std::vector<uint32_t> mask{};
std::vector<uint32_t> modifiers{};
};
struct XIPassiveGrabDeviceReply {
uint16_t sequence{};
std::vector<GrabModifierInfo> modifiers{};
};
using XIPassiveGrabDeviceResponse = Response<XIPassiveGrabDeviceReply>;
Future<XIPassiveGrabDeviceReply> XIPassiveGrabDevice(
const XIPassiveGrabDeviceRequest& request);
Future<XIPassiveGrabDeviceReply> XIPassiveGrabDevice(
const Time& time = {},
const Window& grab_window = {},
const Cursor& cursor = {},
const uint32_t& detail = {},
const DeviceId& deviceid = {},
const GrabType& grab_type = {},
const GrabMode22& grab_mode = {},
const GrabMode& paired_device_mode = {},
const GrabOwner& owner_events = {},
const std::vector<uint32_t>& mask = {},
const std::vector<uint32_t>& modifiers = {});
struct XIPassiveUngrabDeviceRequest {
Window grab_window{};
uint32_t detail{};
DeviceId deviceid{};
GrabType grab_type{};
std::vector<uint32_t> modifiers{};
};
using XIPassiveUngrabDeviceResponse = Response<void>;
Future<void> XIPassiveUngrabDevice(
const XIPassiveUngrabDeviceRequest& request);
Future<void> XIPassiveUngrabDevice(
const Window& grab_window = {},
const uint32_t& detail = {},
const DeviceId& deviceid = {},
const GrabType& grab_type = {},
const std::vector<uint32_t>& modifiers = {});
struct XIListPropertiesRequest {
DeviceId deviceid{};
};
struct XIListPropertiesReply {
uint16_t sequence{};
std::vector<Atom> properties{};
};
using XIListPropertiesResponse = Response<XIListPropertiesReply>;
Future<XIListPropertiesReply> XIListProperties(
const XIListPropertiesRequest& request);
Future<XIListPropertiesReply> XIListProperties(const DeviceId& deviceid = {});
struct XIChangePropertyRequest {
DeviceId deviceid{};
PropMode mode{};
Atom property{};
Atom type{};
uint32_t num_items{};
std::optional<std::vector<uint8_t>> data8{};
std::optional<std::vector<uint16_t>> data16{};
std::optional<std::vector<uint32_t>> data32{};
};
using XIChangePropertyResponse = Response<void>;
Future<void> XIChangeProperty(const XIChangePropertyRequest& request);
Future<void> XIChangeProperty(
const DeviceId& deviceid = {},
const PropMode& mode = {},
const Atom& property = {},
const Atom& type = {},
const uint32_t& num_items = {},
const std::optional<std::vector<uint8_t>>& data8 = std::nullopt,
const std::optional<std::vector<uint16_t>>& data16 = std::nullopt,
const std::optional<std::vector<uint32_t>>& data32 = std::nullopt);
struct XIDeletePropertyRequest {
DeviceId deviceid{};
Atom property{};
};
using XIDeletePropertyResponse = Response<void>;
Future<void> XIDeleteProperty(const XIDeletePropertyRequest& request);
Future<void> XIDeleteProperty(const DeviceId& deviceid = {},
const Atom& property = {});
struct XIGetPropertyRequest {
DeviceId deviceid{};
uint8_t c_delete{};
Atom property{};
Atom type{};
uint32_t offset{};
uint32_t len{};
};
struct XIGetPropertyReply {
uint16_t sequence{};
Atom type{};
uint32_t bytes_after{};
uint32_t num_items{};
std::optional<std::vector<uint8_t>> data8{};
std::optional<std::vector<uint16_t>> data16{};
std::optional<std::vector<uint32_t>> data32{};
};
using XIGetPropertyResponse = Response<XIGetPropertyReply>;
Future<XIGetPropertyReply> XIGetProperty(const XIGetPropertyRequest& request);
Future<XIGetPropertyReply> XIGetProperty(const DeviceId& deviceid = {},
const uint8_t& c_delete = {},
const Atom& property = {},
const Atom& type = {},
const uint32_t& offset = {},
const uint32_t& len = {});
struct XIGetSelectedEventsRequest {
Window window{};
};
struct XIGetSelectedEventsReply {
uint16_t sequence{};
std::vector<EventMask> masks{};
};
using XIGetSelectedEventsResponse = Response<XIGetSelectedEventsReply>;
Future<XIGetSelectedEventsReply> XIGetSelectedEvents(
const XIGetSelectedEventsRequest& request);
Future<XIGetSelectedEventsReply> XIGetSelectedEvents(
const Window& window = {});
struct XIBarrierReleasePointerRequest {
std::vector<BarrierReleasePointerInfo> barriers{};
};
using XIBarrierReleasePointerResponse = Response<void>;
Future<void> XIBarrierReleasePointer(
const XIBarrierReleasePointerRequest& request);
Future<void> XIBarrierReleasePointer(
const std::vector<BarrierReleasePointerInfo>& barriers = {});
struct SendExtensionEventRequest {
Window destination{};
uint8_t device_id{};
uint8_t propagate{};
std::vector<EventForSend> events{};
std::vector<EventClass> classes{};
};
using SendExtensionEventResponse = Response<void>;
Future<void> SendExtensionEvent(const SendExtensionEventRequest& request);
Future<void> SendExtensionEvent(const Window& destination = {},
const uint8_t& device_id = {},
const uint8_t& propagate = {},
const std::vector<EventForSend>& events = {},
const std::vector<EventClass>& classes = {});
private:
Connection* const connection_;
x11::QueryExtensionReply info_{};
};
} // namespace x11
inline constexpr x11::Input::DeviceUse operator|(x11::Input::DeviceUse l,
x11::Input::DeviceUse r) {
using T = std::underlying_type_t<x11::Input::DeviceUse>;
return static_cast<x11::Input::DeviceUse>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::DeviceUse operator&(x11::Input::DeviceUse l,
x11::Input::DeviceUse r) {
using T = std::underlying_type_t<x11::Input::DeviceUse>;
return static_cast<x11::Input::DeviceUse>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::InputClass operator|(x11::Input::InputClass l,
x11::Input::InputClass r) {
using T = std::underlying_type_t<x11::Input::InputClass>;
return static_cast<x11::Input::InputClass>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::InputClass operator&(x11::Input::InputClass l,
x11::Input::InputClass r) {
using T = std::underlying_type_t<x11::Input::InputClass>;
return static_cast<x11::Input::InputClass>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::ValuatorMode operator|(
x11::Input::ValuatorMode l,
x11::Input::ValuatorMode r) {
using T = std::underlying_type_t<x11::Input::ValuatorMode>;
return static_cast<x11::Input::ValuatorMode>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::ValuatorMode operator&(
x11::Input::ValuatorMode l,
x11::Input::ValuatorMode r) {
using T = std::underlying_type_t<x11::Input::ValuatorMode>;
return static_cast<x11::Input::ValuatorMode>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::PropagateMode operator|(
x11::Input::PropagateMode l,
x11::Input::PropagateMode r) {
using T = std::underlying_type_t<x11::Input::PropagateMode>;
return static_cast<x11::Input::PropagateMode>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::PropagateMode operator&(
x11::Input::PropagateMode l,
x11::Input::PropagateMode r) {
using T = std::underlying_type_t<x11::Input::PropagateMode>;
return static_cast<x11::Input::PropagateMode>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::ModifierDevice operator|(
x11::Input::ModifierDevice l,
x11::Input::ModifierDevice r) {
using T = std::underlying_type_t<x11::Input::ModifierDevice>;
return static_cast<x11::Input::ModifierDevice>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::ModifierDevice operator&(
x11::Input::ModifierDevice l,
x11::Input::ModifierDevice r) {
using T = std::underlying_type_t<x11::Input::ModifierDevice>;
return static_cast<x11::Input::ModifierDevice>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::DeviceInputMode operator|(
x11::Input::DeviceInputMode l,
x11::Input::DeviceInputMode r) {
using T = std::underlying_type_t<x11::Input::DeviceInputMode>;
return static_cast<x11::Input::DeviceInputMode>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::DeviceInputMode operator&(
x11::Input::DeviceInputMode l,
x11::Input::DeviceInputMode r) {
using T = std::underlying_type_t<x11::Input::DeviceInputMode>;
return static_cast<x11::Input::DeviceInputMode>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::FeedbackClass operator|(
x11::Input::FeedbackClass l,
x11::Input::FeedbackClass r) {
using T = std::underlying_type_t<x11::Input::FeedbackClass>;
return static_cast<x11::Input::FeedbackClass>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::FeedbackClass operator&(
x11::Input::FeedbackClass l,
x11::Input::FeedbackClass r) {
using T = std::underlying_type_t<x11::Input::FeedbackClass>;
return static_cast<x11::Input::FeedbackClass>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::ChangeFeedbackControlMask operator|(
x11::Input::ChangeFeedbackControlMask l,
x11::Input::ChangeFeedbackControlMask r) {
using T = std::underlying_type_t<x11::Input::ChangeFeedbackControlMask>;
return static_cast<x11::Input::ChangeFeedbackControlMask>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::ChangeFeedbackControlMask operator&(
x11::Input::ChangeFeedbackControlMask l,
x11::Input::ChangeFeedbackControlMask r) {
using T = std::underlying_type_t<x11::Input::ChangeFeedbackControlMask>;
return static_cast<x11::Input::ChangeFeedbackControlMask>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::ValuatorStateModeMask operator|(
x11::Input::ValuatorStateModeMask l,
x11::Input::ValuatorStateModeMask r) {
using T = std::underlying_type_t<x11::Input::ValuatorStateModeMask>;
return static_cast<x11::Input::ValuatorStateModeMask>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::ValuatorStateModeMask operator&(
x11::Input::ValuatorStateModeMask l,
x11::Input::ValuatorStateModeMask r) {
using T = std::underlying_type_t<x11::Input::ValuatorStateModeMask>;
return static_cast<x11::Input::ValuatorStateModeMask>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::DeviceControl operator|(
x11::Input::DeviceControl l,
x11::Input::DeviceControl r) {
using T = std::underlying_type_t<x11::Input::DeviceControl>;
return static_cast<x11::Input::DeviceControl>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::DeviceControl operator&(
x11::Input::DeviceControl l,
x11::Input::DeviceControl r) {
using T = std::underlying_type_t<x11::Input::DeviceControl>;
return static_cast<x11::Input::DeviceControl>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::PropertyFormat operator|(
x11::Input::PropertyFormat l,
x11::Input::PropertyFormat r) {
using T = std::underlying_type_t<x11::Input::PropertyFormat>;
return static_cast<x11::Input::PropertyFormat>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::PropertyFormat operator&(
x11::Input::PropertyFormat l,
x11::Input::PropertyFormat r) {
using T = std::underlying_type_t<x11::Input::PropertyFormat>;
return static_cast<x11::Input::PropertyFormat>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::DeviceId operator|(x11::Input::DeviceId l,
x11::Input::DeviceId r) {
using T = std::underlying_type_t<x11::Input::DeviceId>;
return static_cast<x11::Input::DeviceId>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::DeviceId operator&(x11::Input::DeviceId l,
x11::Input::DeviceId r) {
using T = std::underlying_type_t<x11::Input::DeviceId>;
return static_cast<x11::Input::DeviceId>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::HierarchyChangeType operator|(
x11::Input::HierarchyChangeType l,
x11::Input::HierarchyChangeType r) {
using T = std::underlying_type_t<x11::Input::HierarchyChangeType>;
return static_cast<x11::Input::HierarchyChangeType>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::HierarchyChangeType operator&(
x11::Input::HierarchyChangeType l,
x11::Input::HierarchyChangeType r) {
using T = std::underlying_type_t<x11::Input::HierarchyChangeType>;
return static_cast<x11::Input::HierarchyChangeType>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::ChangeMode operator|(x11::Input::ChangeMode l,
x11::Input::ChangeMode r) {
using T = std::underlying_type_t<x11::Input::ChangeMode>;
return static_cast<x11::Input::ChangeMode>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::ChangeMode operator&(x11::Input::ChangeMode l,
x11::Input::ChangeMode r) {
using T = std::underlying_type_t<x11::Input::ChangeMode>;
return static_cast<x11::Input::ChangeMode>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::XIEventMask operator|(x11::Input::XIEventMask l,
x11::Input::XIEventMask r) {
using T = std::underlying_type_t<x11::Input::XIEventMask>;
return static_cast<x11::Input::XIEventMask>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::XIEventMask operator&(x11::Input::XIEventMask l,
x11::Input::XIEventMask r) {
using T = std::underlying_type_t<x11::Input::XIEventMask>;
return static_cast<x11::Input::XIEventMask>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::DeviceClassType operator|(
x11::Input::DeviceClassType l,
x11::Input::DeviceClassType r) {
using T = std::underlying_type_t<x11::Input::DeviceClassType>;
return static_cast<x11::Input::DeviceClassType>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::DeviceClassType operator&(
x11::Input::DeviceClassType l,
x11::Input::DeviceClassType r) {
using T = std::underlying_type_t<x11::Input::DeviceClassType>;
return static_cast<x11::Input::DeviceClassType>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::DeviceType operator|(x11::Input::DeviceType l,
x11::Input::DeviceType r) {
using T = std::underlying_type_t<x11::Input::DeviceType>;
return static_cast<x11::Input::DeviceType>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::DeviceType operator&(x11::Input::DeviceType l,
x11::Input::DeviceType r) {
using T = std::underlying_type_t<x11::Input::DeviceType>;
return static_cast<x11::Input::DeviceType>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::ScrollFlags operator|(x11::Input::ScrollFlags l,
x11::Input::ScrollFlags r) {
using T = std::underlying_type_t<x11::Input::ScrollFlags>;
return static_cast<x11::Input::ScrollFlags>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::ScrollFlags operator&(x11::Input::ScrollFlags l,
x11::Input::ScrollFlags r) {
using T = std::underlying_type_t<x11::Input::ScrollFlags>;
return static_cast<x11::Input::ScrollFlags>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::ScrollType operator|(x11::Input::ScrollType l,
x11::Input::ScrollType r) {
using T = std::underlying_type_t<x11::Input::ScrollType>;
return static_cast<x11::Input::ScrollType>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::ScrollType operator&(x11::Input::ScrollType l,
x11::Input::ScrollType r) {
using T = std::underlying_type_t<x11::Input::ScrollType>;
return static_cast<x11::Input::ScrollType>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::TouchMode operator|(x11::Input::TouchMode l,
x11::Input::TouchMode r) {
using T = std::underlying_type_t<x11::Input::TouchMode>;
return static_cast<x11::Input::TouchMode>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::TouchMode operator&(x11::Input::TouchMode l,
x11::Input::TouchMode r) {
using T = std::underlying_type_t<x11::Input::TouchMode>;
return static_cast<x11::Input::TouchMode>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::GrabOwner operator|(x11::Input::GrabOwner l,
x11::Input::GrabOwner r) {
using T = std::underlying_type_t<x11::Input::GrabOwner>;
return static_cast<x11::Input::GrabOwner>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::GrabOwner operator&(x11::Input::GrabOwner l,
x11::Input::GrabOwner r) {
using T = std::underlying_type_t<x11::Input::GrabOwner>;
return static_cast<x11::Input::GrabOwner>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::EventMode operator|(x11::Input::EventMode l,
x11::Input::EventMode r) {
using T = std::underlying_type_t<x11::Input::EventMode>;
return static_cast<x11::Input::EventMode>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::EventMode operator&(x11::Input::EventMode l,
x11::Input::EventMode r) {
using T = std::underlying_type_t<x11::Input::EventMode>;
return static_cast<x11::Input::EventMode>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::GrabMode22 operator|(x11::Input::GrabMode22 l,
x11::Input::GrabMode22 r) {
using T = std::underlying_type_t<x11::Input::GrabMode22>;
return static_cast<x11::Input::GrabMode22>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::GrabMode22 operator&(x11::Input::GrabMode22 l,
x11::Input::GrabMode22 r) {
using T = std::underlying_type_t<x11::Input::GrabMode22>;
return static_cast<x11::Input::GrabMode22>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::GrabType operator|(x11::Input::GrabType l,
x11::Input::GrabType r) {
using T = std::underlying_type_t<x11::Input::GrabType>;
return static_cast<x11::Input::GrabType>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::GrabType operator&(x11::Input::GrabType l,
x11::Input::GrabType r) {
using T = std::underlying_type_t<x11::Input::GrabType>;
return static_cast<x11::Input::GrabType>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::ModifierMask operator|(
x11::Input::ModifierMask l,
x11::Input::ModifierMask r) {
using T = std::underlying_type_t<x11::Input::ModifierMask>;
return static_cast<x11::Input::ModifierMask>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::ModifierMask operator&(
x11::Input::ModifierMask l,
x11::Input::ModifierMask r) {
using T = std::underlying_type_t<x11::Input::ModifierMask>;
return static_cast<x11::Input::ModifierMask>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::MoreEventsMask operator|(
x11::Input::MoreEventsMask l,
x11::Input::MoreEventsMask r) {
using T = std::underlying_type_t<x11::Input::MoreEventsMask>;
return static_cast<x11::Input::MoreEventsMask>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::MoreEventsMask operator&(
x11::Input::MoreEventsMask l,
x11::Input::MoreEventsMask r) {
using T = std::underlying_type_t<x11::Input::MoreEventsMask>;
return static_cast<x11::Input::MoreEventsMask>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::ClassesReportedMask operator|(
x11::Input::ClassesReportedMask l,
x11::Input::ClassesReportedMask r) {
using T = std::underlying_type_t<x11::Input::ClassesReportedMask>;
return static_cast<x11::Input::ClassesReportedMask>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::ClassesReportedMask operator&(
x11::Input::ClassesReportedMask l,
x11::Input::ClassesReportedMask r) {
using T = std::underlying_type_t<x11::Input::ClassesReportedMask>;
return static_cast<x11::Input::ClassesReportedMask>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::ChangeDevice operator|(
x11::Input::ChangeDevice l,
x11::Input::ChangeDevice r) {
using T = std::underlying_type_t<x11::Input::ChangeDevice>;
return static_cast<x11::Input::ChangeDevice>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::ChangeDevice operator&(
x11::Input::ChangeDevice l,
x11::Input::ChangeDevice r) {
using T = std::underlying_type_t<x11::Input::ChangeDevice>;
return static_cast<x11::Input::ChangeDevice>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::DeviceChange operator|(
x11::Input::DeviceChange l,
x11::Input::DeviceChange r) {
using T = std::underlying_type_t<x11::Input::DeviceChange>;
return static_cast<x11::Input::DeviceChange>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::DeviceChange operator&(
x11::Input::DeviceChange l,
x11::Input::DeviceChange r) {
using T = std::underlying_type_t<x11::Input::DeviceChange>;
return static_cast<x11::Input::DeviceChange>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::ChangeReason operator|(
x11::Input::ChangeReason l,
x11::Input::ChangeReason r) {
using T = std::underlying_type_t<x11::Input::ChangeReason>;
return static_cast<x11::Input::ChangeReason>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::ChangeReason operator&(
x11::Input::ChangeReason l,
x11::Input::ChangeReason r) {
using T = std::underlying_type_t<x11::Input::ChangeReason>;
return static_cast<x11::Input::ChangeReason>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::KeyEventFlags operator|(
x11::Input::KeyEventFlags l,
x11::Input::KeyEventFlags r) {
using T = std::underlying_type_t<x11::Input::KeyEventFlags>;
return static_cast<x11::Input::KeyEventFlags>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::KeyEventFlags operator&(
x11::Input::KeyEventFlags l,
x11::Input::KeyEventFlags r) {
using T = std::underlying_type_t<x11::Input::KeyEventFlags>;
return static_cast<x11::Input::KeyEventFlags>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::PointerEventFlags operator|(
x11::Input::PointerEventFlags l,
x11::Input::PointerEventFlags r) {
using T = std::underlying_type_t<x11::Input::PointerEventFlags>;
return static_cast<x11::Input::PointerEventFlags>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::PointerEventFlags operator&(
x11::Input::PointerEventFlags l,
x11::Input::PointerEventFlags r) {
using T = std::underlying_type_t<x11::Input::PointerEventFlags>;
return static_cast<x11::Input::PointerEventFlags>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::NotifyMode operator|(x11::Input::NotifyMode l,
x11::Input::NotifyMode r) {
using T = std::underlying_type_t<x11::Input::NotifyMode>;
return static_cast<x11::Input::NotifyMode>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::NotifyMode operator&(x11::Input::NotifyMode l,
x11::Input::NotifyMode r) {
using T = std::underlying_type_t<x11::Input::NotifyMode>;
return static_cast<x11::Input::NotifyMode>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::NotifyDetail operator|(
x11::Input::NotifyDetail l,
x11::Input::NotifyDetail r) {
using T = std::underlying_type_t<x11::Input::NotifyDetail>;
return static_cast<x11::Input::NotifyDetail>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::NotifyDetail operator&(
x11::Input::NotifyDetail l,
x11::Input::NotifyDetail r) {
using T = std::underlying_type_t<x11::Input::NotifyDetail>;
return static_cast<x11::Input::NotifyDetail>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::HierarchyMask operator|(
x11::Input::HierarchyMask l,
x11::Input::HierarchyMask r) {
using T = std::underlying_type_t<x11::Input::HierarchyMask>;
return static_cast<x11::Input::HierarchyMask>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::HierarchyMask operator&(
x11::Input::HierarchyMask l,
x11::Input::HierarchyMask r) {
using T = std::underlying_type_t<x11::Input::HierarchyMask>;
return static_cast<x11::Input::HierarchyMask>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::PropertyFlag operator|(
x11::Input::PropertyFlag l,
x11::Input::PropertyFlag r) {
using T = std::underlying_type_t<x11::Input::PropertyFlag>;
return static_cast<x11::Input::PropertyFlag>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::PropertyFlag operator&(
x11::Input::PropertyFlag l,
x11::Input::PropertyFlag r) {
using T = std::underlying_type_t<x11::Input::PropertyFlag>;
return static_cast<x11::Input::PropertyFlag>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::TouchEventFlags operator|(
x11::Input::TouchEventFlags l,
x11::Input::TouchEventFlags r) {
using T = std::underlying_type_t<x11::Input::TouchEventFlags>;
return static_cast<x11::Input::TouchEventFlags>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::TouchEventFlags operator&(
x11::Input::TouchEventFlags l,
x11::Input::TouchEventFlags r) {
using T = std::underlying_type_t<x11::Input::TouchEventFlags>;
return static_cast<x11::Input::TouchEventFlags>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::TouchOwnershipFlags operator|(
x11::Input::TouchOwnershipFlags l,
x11::Input::TouchOwnershipFlags r) {
using T = std::underlying_type_t<x11::Input::TouchOwnershipFlags>;
return static_cast<x11::Input::TouchOwnershipFlags>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::TouchOwnershipFlags operator&(
x11::Input::TouchOwnershipFlags l,
x11::Input::TouchOwnershipFlags r) {
using T = std::underlying_type_t<x11::Input::TouchOwnershipFlags>;
return static_cast<x11::Input::TouchOwnershipFlags>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::BarrierFlags operator|(
x11::Input::BarrierFlags l,
x11::Input::BarrierFlags r) {
using T = std::underlying_type_t<x11::Input::BarrierFlags>;
return static_cast<x11::Input::BarrierFlags>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::BarrierFlags operator&(
x11::Input::BarrierFlags l,
x11::Input::BarrierFlags r) {
using T = std::underlying_type_t<x11::Input::BarrierFlags>;
return static_cast<x11::Input::BarrierFlags>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::GesturePinchEventFlags operator|(
x11::Input::GesturePinchEventFlags l,
x11::Input::GesturePinchEventFlags r) {
using T = std::underlying_type_t<x11::Input::GesturePinchEventFlags>;
return static_cast<x11::Input::GesturePinchEventFlags>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::GesturePinchEventFlags operator&(
x11::Input::GesturePinchEventFlags l,
x11::Input::GesturePinchEventFlags r) {
using T = std::underlying_type_t<x11::Input::GesturePinchEventFlags>;
return static_cast<x11::Input::GesturePinchEventFlags>(static_cast<T>(l) &
static_cast<T>(r));
}
inline constexpr x11::Input::GestureSwipeEventFlags operator|(
x11::Input::GestureSwipeEventFlags l,
x11::Input::GestureSwipeEventFlags r) {
using T = std::underlying_type_t<x11::Input::GestureSwipeEventFlags>;
return static_cast<x11::Input::GestureSwipeEventFlags>(static_cast<T>(l) |
static_cast<T>(r));
}
inline constexpr x11::Input::GestureSwipeEventFlags operator&(
x11::Input::GestureSwipeEventFlags l,
x11::Input::GestureSwipeEventFlags r) {
using T = std::underlying_type_t<x11::Input::GestureSwipeEventFlags>;
return static_cast<x11::Input::GestureSwipeEventFlags>(static_cast<T>(l) &
static_cast<T>(r));
}
#endif // UI_GFX_X_GENERATED_PROTOS_XINPUT_H_
|