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
|
/*
* Copyright © 2007 Novell, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without
* fee, provided that the above copyright notice appear in all copies
* and that both that copyright notice and this permission notice
* appear in supporting documentation, and that the name of
* Novell, Inc. not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior permission.
* Novell, Inc. makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* NOVELL, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
* NO EVENT SHALL NOVELL, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: David Reveman <davidr@novell.com>
*/
#ifndef _COMPIZ_CORE_H
#define _COMPIZ_CORE_H
#include <compiz-plugin.h>
#include <dlfcn.h>
#define CORE_ABIVERSION 20180927
#include <stdio.h>
#include <sys/time.h>
#include <X11/Xutil.h>
#include <X11/extensions/Xdamage.h>
#include <X11/extensions/Xcomposite.h>
#include <X11/extensions/Xinerama.h>
#include <X11/extensions/sync.h>
#include <X11/Xregion.h>
#include <X11/XKBlib.h>
#define SN_API_NOT_YET_FROZEN
#include <libsn/sn.h>
#include <GL/gl.h>
#include <GL/glx.h>
COMPIZ_BEGIN_DECLS
#if COMPOSITE_MAJOR > 0 || COMPOSITE_MINOR > 2
#define USE_COW
#endif
/*
* WORDS_BIGENDIAN should be defined before including this file for
* IMAGE_BYTE_ORDER and BITMAP_BIT_ORDER to be set correctly.
*/
#define LSBFirst 0
#define MSBFirst 1
#ifdef WORDS_BIGENDIAN
# define IMAGE_BYTE_ORDER MSBFirst
# define BITMAP_BIT_ORDER MSBFirst
#else
# define IMAGE_BYTE_ORDER LSBFirst
# define BITMAP_BIT_ORDER LSBFirst
#endif
typedef struct _CompTexture CompTexture;
typedef struct _CompIcon CompIcon;
typedef struct _CompWindowExtents CompWindowExtents;
typedef struct _CompWindowExtents CompFullscreenMonitorSet;
typedef struct _CompProgram CompProgram;
typedef struct _CompFunction CompFunction;
typedef struct _CompFunctionData CompFunctionData;
typedef struct _FragmentAttrib FragmentAttrib;
typedef struct _CompCursor CompCursor;
typedef struct _CompMatch CompMatch;
typedef struct _CompOutput CompOutput;
typedef struct _CompWalker CompWalker;
/* virtual modifiers */
#define CompModAlt 0
#define CompModMeta 1
#define CompModSuper 2
#define CompModHyper 3
#define CompModModeSwitch 4
#define CompModNumLock 5
#define CompModScrollLock 6
#define CompModNum 7
#define CompAltMask (1 << 16)
#define CompMetaMask (1 << 17)
#define CompSuperMask (1 << 18)
#define CompHyperMask (1 << 19)
#define CompModeSwitchMask (1 << 20)
#define CompNumLockMask (1 << 21)
#define CompScrollLockMask (1 << 22)
#define CompNoMask (1 << 25)
#define CompWindowProtocolDeleteMask (1 << 0)
#define CompWindowProtocolTakeFocusMask (1 << 1)
#define CompWindowProtocolPingMask (1 << 2)
#define CompWindowProtocolSyncRequestMask (1 << 3)
#define CompWindowTypeDesktopMask (1 << 0)
#define CompWindowTypeDockMask (1 << 1)
#define CompWindowTypeToolbarMask (1 << 2)
#define CompWindowTypeMenuMask (1 << 3)
#define CompWindowTypeUtilMask (1 << 4)
#define CompWindowTypeSplashMask (1 << 5)
#define CompWindowTypeDialogMask (1 << 6)
#define CompWindowTypeNormalMask (1 << 7)
#define CompWindowTypeDropdownMenuMask (1 << 8)
#define CompWindowTypePopupMenuMask (1 << 9)
#define CompWindowTypeTooltipMask (1 << 10)
#define CompWindowTypeNotificationMask (1 << 11)
#define CompWindowTypeComboMask (1 << 12)
#define CompWindowTypeDndMask (1 << 13)
#define CompWindowTypeModalDialogMask (1 << 14)
#define CompWindowTypeFullscreenMask (1 << 15)
#define CompWindowTypeUnknownMask (1 << 16)
#define NO_FOCUS_MASK (CompWindowTypeDesktopMask | \
CompWindowTypeDockMask | \
CompWindowTypeSplashMask)
#define APPEAR_FOCUSED_MASK (CompWindowTypeDockMask | \
CompWindowTypeSplashMask)
#define CompWindowStateModalMask (1 << 0)
#define CompWindowStateStickyMask (1 << 1)
#define CompWindowStateMaximizedVertMask (1 << 2)
#define CompWindowStateMaximizedHorzMask (1 << 3)
#define CompWindowStateShadedMask (1 << 4)
#define CompWindowStateSkipTaskbarMask (1 << 5)
#define CompWindowStateSkipPagerMask (1 << 6)
#define CompWindowStateHiddenMask (1 << 7)
#define CompWindowStateFullscreenMask (1 << 8)
#define CompWindowStateAboveMask (1 << 9)
#define CompWindowStateBelowMask (1 << 10)
#define CompWindowStateDemandsAttentionMask (1 << 11)
#define CompWindowStateDisplayModalMask (1 << 12)
#define CompWindowStateFocusedMask (1 << 13)
#define MAXIMIZE_STATE (CompWindowStateMaximizedHorzMask | \
CompWindowStateMaximizedVertMask)
#define CompWindowActionMoveMask (1 << 0)
#define CompWindowActionResizeMask (1 << 1)
#define CompWindowActionStickMask (1 << 2)
#define CompWindowActionMinimizeMask (1 << 3)
#define CompWindowActionMaximizeHorzMask (1 << 4)
#define CompWindowActionMaximizeVertMask (1 << 5)
#define CompWindowActionFullscreenMask (1 << 6)
#define CompWindowActionCloseMask (1 << 7)
#define CompWindowActionShadeMask (1 << 8)
#define CompWindowActionChangeDesktopMask (1 << 9)
#define CompWindowActionAboveMask (1 << 10)
#define CompWindowActionBelowMask (1 << 11)
#define MwmFuncAll (1L << 0)
#define MwmFuncResize (1L << 1)
#define MwmFuncMove (1L << 2)
#define MwmFuncIconify (1L << 3)
#define MwmFuncMaximize (1L << 4)
#define MwmFuncClose (1L << 5)
#define MwmDecorAll (1L << 0)
#define MwmDecorBorder (1L << 1)
#define MwmDecorHandle (1L << 2)
#define MwmDecorTitle (1L << 3)
#define MwmDecorMenu (1L << 4)
#define MwmDecorMinimize (1L << 5)
#define MwmDecorMaximize (1L << 6)
#define WmMoveResizeSizeTopLeft 0
#define WmMoveResizeSizeTop 1
#define WmMoveResizeSizeTopRight 2
#define WmMoveResizeSizeRight 3
#define WmMoveResizeSizeBottomRight 4
#define WmMoveResizeSizeBottom 5
#define WmMoveResizeSizeBottomLeft 6
#define WmMoveResizeSizeLeft 7
#define WmMoveResizeMove 8
#define WmMoveResizeSizeKeyboard 9
#define WmMoveResizeMoveKeyboard 10
#define WmMoveResizeCancel 11
/* EWMH source indication client types */
#define ClientTypeUnknown 0
#define ClientTypeApplication 1
#define ClientTypePager 2
#define OPAQUE 0xffff
#define COLOR 0xffff
#define BRIGHT 0xffff
#define RED_SATURATION_WEIGHT 0.30f
#define GREEN_SATURATION_WEIGHT 0.59f
#define BLUE_SATURATION_WEIGHT 0.11f
extern char *programName;
extern char **programArgv;
extern int programArgc;
extern char *backgroundImage;
extern REGION emptyRegion;
extern REGION infiniteRegion;
extern GLushort defaultColor[4];
extern Window currentRoot;
extern Bool shutDown;
extern Bool restartSignal;
extern CompWindow *lastFoundWindow;
extern CompWindow *lastDamagedWindow;
extern Bool replaceCurrentWm;
extern Bool indirectRendering;
extern Bool strictBinding;
extern Bool useCow;
extern Bool noDetection;
extern Bool useDesktopHints;
extern Bool onlyCurrentScreen;
extern Bool noFBO;
extern char **initialPlugins;
extern int nInitialPlugins;
extern int defaultRefreshRate;
extern char *defaultTextureFilter;
extern int lastPointerX;
extern int lastPointerY;
extern int pointerX;
extern int pointerY;
extern CompCore core;
extern CompMetadata coreMetadata;
#define RESTRICT_VALUE(value, min, max) \
(((value) < (min)) ? (min): ((value) > (max)) ? (max) : (value))
#define MOD(a,b) ((a) < 0 ? ((b) - ((-(a) - 1) % (b))) - 1 : (a) % (b))
/* privates.c */
#define WRAP(priv, real, func, wrapFunc) \
(priv)->func = (real)->func; \
(real)->func = (wrapFunc)
#define UNWRAP(priv, real, func) \
(real)->func = (priv)->func
typedef union _CompPrivate {
void *ptr;
long val;
unsigned long uval;
void *(*fptr) (void);
} CompPrivate;
typedef int (*ReallocPrivatesProc) (int size, void *closure);
int
allocatePrivateIndex (int *len,
char **indices,
ReallocPrivatesProc reallocProc,
void *closure);
void
freePrivateIndex (int len,
char *indices,
int index);
/* object.c */
typedef unsigned int CompObjectType;
#define COMP_OBJECT_TYPE_CORE 0
#define COMP_OBJECT_TYPE_DISPLAY 1
#define COMP_OBJECT_TYPE_SCREEN 2
#define COMP_OBJECT_TYPE_WINDOW 3
struct _CompObject {
CompObjectType type;
CompPrivate *privates;
CompObject *parent;
};
typedef CompBool (*ObjectCallBackProc) (CompObject *object,
void *closure);
typedef CompBool (*ObjectTypeCallBackProc) (CompObjectType type,
CompObject *parent,
void *closure);
void
compObjectInit (CompObject *object,
CompPrivate *privates,
CompObjectType type);
void
compObjectFini (CompObject *object);
int
compObjectAllocatePrivateIndex (CompObject *parent,
CompObjectType type);
void
compObjectFreePrivateIndex (CompObject *parent,
CompObjectType type,
int index);
CompBool
compObjectForEach (CompObject *parent,
CompObjectType type,
ObjectCallBackProc proc,
void *closure);
CompBool
compObjectForEachType (CompObject *parent,
ObjectTypeCallBackProc proc,
void *closure);
const char *
compObjectTypeName (CompObjectType type);
char *
compObjectName (CompObject *object);
CompObject *
compObjectFind (CompObject *parent,
CompObjectType type,
const char *name);
#define ARRAY_SIZE(array) \
(sizeof (array) / sizeof (array[0]))
#define DISPATCH_CHECK(object, dispTab, tabSize) \
((object)->type < (tabSize) && (dispTab)[(object)->type])
#define DISPATCH(object, dispTab, tabSize, args) \
if (DISPATCH_CHECK (object, dispTab, tabSize)) \
(*(dispTab)[(object)->type]) args
#define RETURN_DISPATCH(object, dispTab, tabSize, def, args) \
if (DISPATCH_CHECK (object, dispTab, tabSize)) \
return (*(dispTab)[(object)->type]) args; \
else \
return (def)
/* session.c */
typedef enum {
CompSessionEventSaveYourself = 0,
CompSessionEventSaveComplete,
CompSessionEventDie,
CompSessionEventShutdownCancelled
} CompSessionEvent;
typedef enum {
CompSessionClientId = 0,
CompSessionPrevClientId
} CompSessionClientIdType;
typedef void (*SessionEventProc) (CompCore *c,
CompSessionEvent event,
CompOption *arguments,
unsigned int nArguments);
void
initSession (char *smPrevClientId);
void
closeSession (void);
void
sessionEvent (CompCore *c,
CompSessionEvent event,
CompOption *arguments,
unsigned int nArguments);
char *
getSessionClientId (CompSessionClientIdType type);
/* option.c */
typedef enum {
CompBindingTypeNone = 0,
CompBindingTypeKey = 1 << 0,
CompBindingTypeButton = 1 << 1,
CompBindingTypeEdgeButton = 1 << 2
} CompBindingType;
typedef enum {
CompActionStateInitKey = 1 << 0,
CompActionStateTermKey = 1 << 1,
CompActionStateInitButton = 1 << 2,
CompActionStateTermButton = 1 << 3,
CompActionStateInitBell = 1 << 4,
CompActionStateInitEdge = 1 << 5,
CompActionStateTermEdge = 1 << 6,
CompActionStateInitEdgeDnd = 1 << 7,
CompActionStateTermEdgeDnd = 1 << 8,
CompActionStateCommit = 1 << 9,
CompActionStateCancel = 1 << 10,
CompActionStateAutoGrab = 1 << 11,
CompActionStateNoEdgeDelay = 1 << 12
} CompActionState;
typedef enum {
CompLogLevelFatal = 0,
CompLogLevelError,
CompLogLevelWarn,
CompLogLevelInfo,
CompLogLevelDebug
} CompLogLevel;
typedef struct _CompKeyBinding {
int keycode;
unsigned int modifiers;
} CompKeyBinding;
typedef struct _CompButtonBinding {
int button;
unsigned int modifiers;
} CompButtonBinding;
typedef struct _CompAction CompAction;
typedef Bool (*CompActionCallBackProc) (CompDisplay *d,
CompAction *action,
CompActionState state,
CompOption *option,
int nOption);
struct _CompAction {
CompActionCallBackProc initiate;
CompActionCallBackProc terminate;
CompActionState state;
CompBindingType type;
CompKeyBinding key;
CompButtonBinding button;
Bool bell;
unsigned int edgeMask;
/* When enabled, key events will be reported even while a keyboard grab
* is ongoing. This allows shortcuts to work while a menu is open, but
* also while xlock is running, so this should not be set lightly, and
* notably not in a plugin which could commands and thus override xlock.
*/
Bool ignoreGrabs;
CompPrivate priv;
};
typedef union _CompMatchOp CompMatchOp;
struct _CompMatch {
CompDisplay *display;
CompMatchOp *op;
int nOp;
};
typedef struct {
CompOptionType type;
CompOptionValue *value;
int nValue;
} CompListValue;
union _CompOptionValue {
Bool b;
int i;
float f;
char *s;
unsigned short c[4];
CompAction action;
CompMatch match;
CompListValue list;
};
typedef struct _CompOptionIntRestriction {
int min;
int max;
} CompOptionIntRestriction;
typedef struct _CompOptionFloatRestriction {
float min;
float max;
float precision;
} CompOptionFloatRestriction;
typedef union {
CompOptionIntRestriction i;
CompOptionFloatRestriction f;
} CompOptionRestriction;
struct _CompOption {
char *name;
CompOptionType type;
CompOptionValue value;
CompOptionRestriction rest;
};
typedef CompOption *(*DisplayOptionsProc) (CompDisplay *display, int *count);
typedef CompOption *(*ScreenOptionsProc) (CompScreen *screen, int *count);
Bool
getBoolOptionNamed (CompOption *option,
int nOption,
const char *name,
Bool defaultValue);
int
getIntOptionNamed (CompOption *option,
int nOption,
const char *name,
int defaultValue);
float
getFloatOptionNamed (CompOption *option,
int nOption,
const char *name,
float defaultValue);
char *
getStringOptionNamed (CompOption *option,
int nOption,
const char *name,
char *defaultValue);
unsigned short *
getColorOptionNamed (CompOption *option,
int nOption,
const char *name,
unsigned short *defaultValue);
CompMatch *
getMatchOptionNamed (CompOption *option,
int nOption,
const char *name,
CompMatch *defaultValue);
char *
keyBindingToString (CompDisplay *d,
CompKeyBinding *key);
char *
buttonBindingToString (CompDisplay *d,
CompButtonBinding *button);
char *
keyActionToString (CompDisplay *d,
CompAction *action);
char *
buttonActionToString (CompDisplay *d,
CompAction *action);
Bool
stringToKeyBinding (CompDisplay *d,
const char *binding,
CompKeyBinding *key);
Bool
stringToButtonBinding (CompDisplay *d,
const char *binding,
CompButtonBinding *button);
void
stringToKeyAction (CompDisplay *d,
const char *binding,
CompAction *action);
void
stringToButtonAction (CompDisplay *d,
const char *binding,
CompAction *action);
const char *
edgeToString (unsigned int edge);
unsigned int
stringToEdgeMask (const char *edge);
char *
edgeMaskToString (unsigned int edgeMask);
Bool
stringToColor (const char *color,
unsigned short *rgba);
char *
colorToString (unsigned short *rgba);
const char *
optionTypeToString (CompOptionType type);
Bool
isActionOption (CompOption *option);
/* core.c */
typedef CompBool (*InitPluginForObjectProc) (CompPlugin *plugin,
CompObject *object);
typedef void (*FiniPluginForObjectProc) (CompPlugin *plugin,
CompObject *object);
typedef CompBool (*SetOptionForPluginProc) (CompObject *object,
const char *plugin,
const char *name,
CompOptionValue *value);
typedef void (*ObjectAddProc) (CompObject *parent,
CompObject *object);
typedef void (*ObjectRemoveProc) (CompObject *parent,
CompObject *object);
#define NOTIFY_CREATE_MASK (1 << 0)
#define NOTIFY_DELETE_MASK (1 << 1)
#define NOTIFY_MOVE_MASK (1 << 2)
#define NOTIFY_MODIFY_MASK (1 << 3)
typedef void (*FileWatchCallBackProc) (const char *name,
void *closure);
typedef int CompFileWatchHandle;
typedef struct _CompFileWatch {
struct _CompFileWatch *next;
char *path;
int mask;
FileWatchCallBackProc callBack;
void *closure;
CompFileWatchHandle handle;
} CompFileWatch;
typedef void (*FileWatchAddedProc) (CompCore *core,
CompFileWatch *fileWatch);
typedef void (*FileWatchRemovedProc) (CompCore *core,
CompFileWatch *fileWatch);
typedef struct _CompTimeout {
struct _CompTimeout *next;
int minTime;
int maxTime;
int minLeft;
int maxLeft;
CallBackProc callBack;
void *closure;
CompTimeoutHandle handle;
} CompTimeout;
typedef struct _CompWatchFd {
struct _CompWatchFd *next;
int fd;
CallBackProc callBack;
void *closure;
CompWatchFdHandle handle;
} CompWatchFd;
typedef void (*LogMessageProc) (const char *componentName,
CompLogLevel level,
const char *message);
struct _CompCore {
CompObject base;
CompDisplay *displays;
Region tmpRegion;
Region outputRegion;
CompFileWatch *fileWatch;
CompFileWatchHandle lastFileWatchHandle;
CompTimeout *timeouts;
struct timeval lastTimeout;
CompTimeoutHandle lastTimeoutHandle;
CompWatchFd *watchFds;
CompWatchFdHandle lastWatchFdHandle;
struct pollfd *watchPollFds;
int nWatchFds;
InitPluginForObjectProc initPluginForObject;
FiniPluginForObjectProc finiPluginForObject;
SetOptionForPluginProc setOptionForPlugin;
ObjectAddProc objectAdd;
ObjectRemoveProc objectRemove;
FileWatchAddedProc fileWatchAdded;
FileWatchRemovedProc fileWatchRemoved;
SessionEventProc sessionEvent;
LogMessageProc logMessage;
};
int
allocCoreObjectPrivateIndex (CompObject *parent);
void
freeCoreObjectPrivateIndex (CompObject *parent,
int index);
CompBool
forEachCoreObject (CompObject *parent,
ObjectCallBackProc proc,
void *closure);
char *
nameCoreObject (CompObject *object);
CompObject *
findCoreObject (CompObject *parent,
const char *name);
CompBool
initCore (void);
void
finiCore (void);
int
allocateCorePrivateIndex (void);
void
freeCorePrivateIndex (int index);
void
addDisplayToCore (CompDisplay *d);
CompFileWatchHandle
addFileWatch (const char *path,
int mask,
FileWatchCallBackProc callBack,
void *closure);
void
removeFileWatch (CompFileWatchHandle handle);
/* display.c */
#define COMP_DISPLAY_OPTION_ABI 0
#define COMP_DISPLAY_OPTION_ACTIVE_PLUGINS 1
#define COMP_DISPLAY_OPTION_TEXTURE_FILTER 2
#define COMP_DISPLAY_OPTION_CLICK_TO_FOCUS 3
#define COMP_DISPLAY_OPTION_AUTORAISE 4
#define COMP_DISPLAY_OPTION_AUTORAISE_DELAY 5
#define COMP_DISPLAY_OPTION_CLOSE_WINDOW_KEY 6
#define COMP_DISPLAY_OPTION_CLOSE_WINDOW_BUTTON 7
#define COMP_DISPLAY_OPTION_SLOW_ANIMATIONS_KEY 8
#define COMP_DISPLAY_OPTION_RAISE_WINDOW_KEY 9
#define COMP_DISPLAY_OPTION_RAISE_WINDOW_BUTTON 10
#define COMP_DISPLAY_OPTION_LOWER_WINDOW_KEY 11
#define COMP_DISPLAY_OPTION_LOWER_WINDOW_BUTTON 12
#define COMP_DISPLAY_OPTION_UNMAXIMIZE_WINDOW_KEY 13
#define COMP_DISPLAY_OPTION_MINIMIZE_WINDOW_KEY 14
#define COMP_DISPLAY_OPTION_MINIMIZE_WINDOW_BUTTON 15
#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_KEY 16
#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ_KEY 17
#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT_KEY 18
#define COMP_DISPLAY_OPTION_WINDOW_MENU_BUTTON 19
#define COMP_DISPLAY_OPTION_WINDOW_MENU_KEY 20
#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_KEY 21
#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_EDGE 22
#define COMP_DISPLAY_OPTION_RAISE_ON_CLICK 23
#define COMP_DISPLAY_OPTION_AUDIBLE_BELL 24
#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_KEY 25
#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_BUTTON 26
#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ_KEY 27
#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT_KEY 28
#define COMP_DISPLAY_OPTION_HIDE_SKIP_TASKBAR_WINDOWS 29
#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_SHADED_KEY 30
#define COMP_DISPLAY_OPTION_IGNORE_HINTS_WHEN_MAXIMIZED 31
#define COMP_DISPLAY_OPTION_PING_DELAY 32
#define COMP_DISPLAY_OPTION_EDGE_DELAY 33
#define COMP_DISPLAY_OPTION_CURSOR_THEME 34
#define COMP_DISPLAY_OPTION_CURSOR_SIZE 35
#define COMP_DISPLAY_OPTION_NUM 36
typedef void (*HandleEventProc) (CompDisplay *display,
XEvent *event);
typedef void (*HandleCompizEventProc) (CompDisplay *display,
const char *pluginName,
const char *eventName,
CompOption *option,
int nOption);
typedef void (*ForEachWindowProc) (CompWindow *window,
void *closure);
typedef Bool (*FileToImageProc) (CompDisplay *display,
const char *path,
const char *name,
int *width,
int *height,
int *stride,
void **data);
typedef Bool (*ImageToFileProc) (CompDisplay *display,
const char *path,
const char *name,
const char *format,
int width,
int height,
int stride,
void *data);
#define MATCH_OP_AND_MASK (1 << 0)
#define MATCH_OP_NOT_MASK (1 << 1)
typedef enum {
CompMatchOpTypeGroup,
CompMatchOpTypeExp
} CompMatchOpType;
typedef struct _CompMatchAnyOp {
CompMatchOpType type;
int flags;
} CompMatchAnyOp;
typedef struct _CompMatchGroupOp {
CompMatchOpType type;
int flags;
CompMatchOp *op;
int nOp;
} CompMatchGroupOp;
typedef void (*CompMatchExpFiniProc) (CompDisplay *display,
CompPrivate priv);
typedef Bool (*CompMatchExpEvalProc) (CompDisplay *display,
CompWindow *window,
CompPrivate priv);
typedef struct _CompMatchExp {
CompMatchExpFiniProc fini;
CompMatchExpEvalProc eval;
CompPrivate priv;
} CompMatchExp;
typedef struct _CompMatchExpOp {
CompMatchOpType type;
int flags;
char *value;
CompMatchExp e;
} CompMatchExpOp;
union _CompMatchOp {
CompMatchOpType type;
CompMatchAnyOp any;
CompMatchGroupOp group;
CompMatchExpOp exp;
};
typedef void (*MatchInitExpProc) (CompDisplay *display,
CompMatchExp *exp,
const char *value);
typedef void (*MatchExpHandlerChangedProc) (CompDisplay *display);
typedef void (*MatchPropertyChangedProc) (CompDisplay *display,
CompWindow *window);
struct _CompDisplay {
CompObject base;
CompDisplay *next;
Display *display;
CompScreen *screens;
CompWatchFdHandle watchFdHandle;
char *screenPrivateIndices;
int screenPrivateLen;
int compositeEvent, compositeError, compositeOpcode;
int damageEvent, damageError;
int syncEvent, syncError;
int fixesEvent, fixesError, fixesVersion;
Bool randrExtension;
int randrEvent, randrError;
Bool shapeExtension;
int shapeEvent, shapeError;
Bool xkbExtension;
int xkbEvent, xkbError;
Bool xi2Extension;
int xi2Event, xi2Error;
Bool xineramaExtension;
int xineramaEvent, xineramaError;
XineramaScreenInfo *screenInfo;
int nScreenInfo;
SnDisplay *snDisplay;
Atom supportedAtom;
Atom supportingWmCheckAtom;
Atom utf8StringAtom;
Atom wmNameAtom;
Atom winTypeAtom;
Atom winTypeDesktopAtom;
Atom winTypeDockAtom;
Atom winTypeToolbarAtom;
Atom winTypeMenuAtom;
Atom winTypeUtilAtom;
Atom winTypeSplashAtom;
Atom winTypeDialogAtom;
Atom winTypeNormalAtom;
Atom winTypeDropdownMenuAtom;
Atom winTypePopupMenuAtom;
Atom winTypeTooltipAtom;
Atom winTypeNotificationAtom;
Atom winTypeComboAtom;
Atom winTypeDndAtom;
Atom winOpacityAtom;
Atom winBrightnessAtom;
Atom winSaturationAtom;
Atom winActiveAtom;
Atom winDesktopAtom;
Atom workareaAtom;
Atom desktopViewportAtom;
Atom desktopGeometryAtom;
Atom currentDesktopAtom;
Atom numberOfDesktopsAtom;
Atom winStateAtom;
Atom winStateModalAtom;
Atom winStateFocusedAtom;
Atom winStateStickyAtom;
Atom winStateMaximizedVertAtom;
Atom winStateMaximizedHorzAtom;
Atom winStateShadedAtom;
Atom winStateSkipTaskbarAtom;
Atom winStateSkipPagerAtom;
Atom winStateHiddenAtom;
Atom winStateFullscreenAtom;
Atom winStateAboveAtom;
Atom winStateBelowAtom;
Atom winStateDemandsAttentionAtom;
Atom winStateDisplayModalAtom;
Atom winActionMoveAtom;
Atom winActionResizeAtom;
Atom winActionStickAtom;
Atom winActionMinimizeAtom;
Atom winActionMaximizeHorzAtom;
Atom winActionMaximizeVertAtom;
Atom winActionFullscreenAtom;
Atom winActionCloseAtom;
Atom winActionShadeAtom;
Atom winActionChangeDesktopAtom;
Atom winActionAboveAtom;
Atom winActionBelowAtom;
Atom wmAllowedActionsAtom;
Atom wmStrutAtom;
Atom wmStrutPartialAtom;
Atom wmUserTimeAtom;
Atom wmIconAtom;
Atom wmIconGeometryAtom;
Atom clientListAtom;
Atom clientListStackingAtom;
Atom frameExtentsAtom;
Atom gtkFrameExtentsAtom;
Atom frameWindowAtom;
Atom wmStateAtom;
Atom wmChangeStateAtom;
Atom wmProtocolsAtom;
Atom wmClientLeaderAtom;
Atom wmDeleteWindowAtom;
Atom wmTakeFocusAtom;
Atom wmPingAtom;
Atom wmSyncRequestAtom;
Atom wmSyncRequestCounterAtom;
Atom wmFullscreenMonitorsAtom;
Atom closeWindowAtom;
Atom wmMoveResizeAtom;
Atom moveResizeWindowAtom;
Atom restackWindowAtom;
Atom showingDesktopAtom;
Atom xBackgroundAtom[2];
Atom toolkitActionAtom;
Atom toolkitActionWindowMenuAtom;
Atom toolkitActionForceQuitDialogAtom;
Atom mwmHintsAtom;
Atom xdndAwareAtom;
Atom xdndEnterAtom;
Atom xdndLeaveAtom;
Atom xdndPositionAtom;
Atom xdndStatusAtom;
Atom xdndDropAtom;
Atom managerAtom;
Atom targetsAtom;
Atom multipleAtom;
Atom timestampAtom;
Atom versionAtom;
Atom atomPairAtom;
Atom startupIdAtom;
unsigned int lastPing;
CompTimeoutHandle pingHandle;
GLenum textureFilter;
Window activeWindow;
Window nextActiveWindow;
CompWindow *focused_window;
Window below;
char displayString[256];
XModifierKeymap *modMap;
unsigned int modMask[CompModNum];
unsigned int ignoredModMask;
KeyCode escapeKeyCode;
KeyCode returnKeyCode;
CompOption opt[COMP_DISPLAY_OPTION_NUM];
CompTimeoutHandle autoRaiseHandle;
Window autoRaiseWindow;
CompTimeoutHandle edgeDelayHandle;
CompOptionValue plugin;
Bool dirtyPluginList;
HandleEventProc handleEvent;
HandleCompizEventProc handleCompizEvent;
FileToImageProc fileToImage;
ImageToFileProc imageToFile;
MatchInitExpProc matchInitExp;
MatchExpHandlerChangedProc matchExpHandlerChanged;
MatchPropertyChangedProc matchPropertyChanged;
LogMessageProc logMessage;
Bool grabbed;
void *reserved;
};
#define GET_CORE_DISPLAY(object) ((CompDisplay *) (object))
#define CORE_DISPLAY(object) CompDisplay *d = GET_CORE_DISPLAY (object)
CompBool
allocDisplayObjectPrivates (CompObject *object,
CompObject *parent);
int
allocDisplayObjectPrivateIndex (CompObject *parent);
void
freeDisplayObjectPrivateIndex (CompObject *parent,
int index);
CompBool
forEachDisplayObject (CompObject *parent,
ObjectCallBackProc proc,
void *closure);
char *
nameDisplayObject (CompObject *object);
CompObject *
findDisplayObject (CompObject *parent,
const char *name);
int
allocateDisplayPrivateIndex (void);
void
freeDisplayPrivateIndex (int index);
CompOption *
getDisplayOptions (CompPlugin *plugin,
CompDisplay *display,
int *count);
Bool
setDisplayOption (CompPlugin *plugin,
CompDisplay *display,
const char *name,
CompOptionValue *value);
void
compLogMessage (const char *componentName,
CompLogLevel level,
const char *format,
...);
void
logMessage (const char *componentName,
CompLogLevel level,
const char *message);
const char *
logLevelToString (CompLogLevel level);
void
launchFallbackWM (void);
int
compCheckForError (Display *dpy);
void
addScreenToDisplay (CompDisplay *display,
CompScreen *s);
Bool
addDisplay (const char *name);
void
removeDisplay (CompDisplay *d);
Time
getCurrentTimeFromDisplay (CompDisplay *d);
void
forEachWindowOnDisplay (CompDisplay *display,
ForEachWindowProc proc,
void *closure);
CompScreen *
findScreenAtDisplay (CompDisplay *d,
Window root);
CompWindow *
findWindowAtDisplay (CompDisplay *display,
Window id);
CompWindow *
findTopLevelWindowAtDisplay (CompDisplay *d,
Window id);
unsigned int
virtualToRealModMask (CompDisplay *d,
unsigned int modMask);
void
updateModifierMappings (CompDisplay *d);
unsigned int
keycodeToModifiers (CompDisplay *d,
int keycode);
void
eventLoop (void);
void
xi2SelectNoInput (CompDisplay *d,
Window id);
void
handleSelectionRequest (CompDisplay *display,
XEvent *event);
void
handleSelectionClear (CompDisplay *display,
XEvent *event);
void
warpPointer (CompScreen *screen,
int dx,
int dy);
Bool
setDisplayAction (CompDisplay *display,
CompOption *o,
CompOptionValue *value);
Bool
readImageFromFile (CompDisplay *display,
const char *name,
int *width,
int *height,
void **data);
Bool
writeImageToFile (CompDisplay *display,
const char *path,
const char *name,
const char *format,
int width,
int height,
void *data);
Bool
fileToImage (CompDisplay *display,
const char *path,
const char *name,
int *width,
int *height,
int *stride,
void **data);
Bool
imageToFile (CompDisplay *display,
const char *path,
const char *name,
const char *format,
int width,
int height,
int stride,
void *data);
CompCursor *
findCursorAtDisplay (CompDisplay *display);
/* event.c */
typedef struct _CompDelayedEdgeSettings
{
CompDisplay *d;
unsigned int edge;
unsigned int state;
CompOption option[7];
unsigned int nOption;
} CompDelayedEdgeSettings;
void
handleEvent (CompDisplay *display,
XEvent *event);
void
handleCompizEvent (CompDisplay *display,
const char *pluginName,
const char *eventName,
CompOption *option,
int nOption);
void
handleSyncAlarm (CompWindow *w);
Bool
eventMatches (CompDisplay *display,
XEvent *event,
CompOption *option);
Bool
eventTerminates (CompDisplay *display,
XEvent *event,
CompOption *option);
void
clearTargetOutput (CompDisplay *display,
unsigned int mask);
/* paint.c */
#define MULTIPLY_USHORT(us1, us2) \
(((GLuint) (us1) * (GLuint) (us2)) / 0xffff)
/* camera distance from screen, 0.5 * tan (FOV) */
#define DEFAULT_Z_CAMERA 0.866025404f
#define DEG2RAD (M_PI / 180.0f)
typedef struct _CompTransform {
float m[16];
} CompTransform;
typedef union _CompVector {
float v[4];
struct {
float x;
float y;
float z;
float w;
};
} CompVector;
/* XXX: ScreenPaintAttrib will be removed */
typedef struct _ScreenPaintAttrib {
GLfloat xRotate;
GLfloat yRotate;
GLfloat vRotate;
GLfloat xTranslate;
GLfloat yTranslate;
GLfloat zTranslate;
GLfloat zCamera;
} ScreenPaintAttrib;
/* XXX: scale and translate fields will be removed */
typedef struct _WindowPaintAttrib {
GLushort opacity;
GLushort brightness;
GLushort saturation;
GLfloat xScale;
GLfloat yScale;
GLfloat xTranslate;
GLfloat yTranslate;
} WindowPaintAttrib;
extern ScreenPaintAttrib defaultScreenPaintAttrib;
extern WindowPaintAttrib defaultWindowPaintAttrib;
typedef struct _CompMatrix {
float xx; float yx;
float xy; float yy;
float x0; float y0;
} CompMatrix;
#define COMP_TEX_COORD_X(m, vx) ((m)->xx * (vx) + (m)->x0)
#define COMP_TEX_COORD_Y(m, vy) ((m)->yy * (vy) + (m)->y0)
#define COMP_TEX_COORD_XY(m, vx, vy) \
((m)->xx * (vx) + (m)->xy * (vy) + (m)->x0)
#define COMP_TEX_COORD_YX(m, vx, vy) \
((m)->yx * (vx) + (m)->yy * (vy) + (m)->y0)
typedef void (*PreparePaintScreenProc) (CompScreen *screen,
int msSinceLastPaint);
typedef void (*DonePaintScreenProc) (CompScreen *screen);
#define PAINT_SCREEN_REGION_MASK (1 << 0)
#define PAINT_SCREEN_FULL_MASK (1 << 1)
#define PAINT_SCREEN_TRANSFORMED_MASK (1 << 2)
#define PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK (1 << 3)
#define PAINT_SCREEN_CLEAR_MASK (1 << 4)
#define PAINT_SCREEN_NO_OCCLUSION_DETECTION_MASK (1 << 5)
#define PAINT_SCREEN_NO_BACKGROUND_MASK (1 << 6)
typedef void (*PaintScreenProc) (CompScreen *screen,
CompOutput *outputs,
int numOutput,
unsigned int mask);
typedef Bool (*PaintOutputProc) (CompScreen *screen,
const ScreenPaintAttrib *sAttrib,
const CompTransform *transform,
Region region,
CompOutput *output,
unsigned int mask);
typedef void (*PaintTransformedOutputProc) (CompScreen *screen,
const ScreenPaintAttrib *sAttrib,
const CompTransform *transform,
Region region,
CompOutput *output,
unsigned int mask);
/* XXX: ApplyScreenTransformProc will be removed */
typedef void (*ApplyScreenTransformProc) (CompScreen *screen,
const ScreenPaintAttrib *sAttrib,
CompOutput *output,
CompTransform *transform);
typedef void (*EnableOutputClippingProc) (CompScreen *screen,
const CompTransform *transform,
Region region,
CompOutput *output);
typedef void (*DisableOutputClippingProc) (CompScreen *screen);
typedef void (*WalkerFiniProc) (CompScreen *screen,
CompWalker *walker);
typedef CompWindow *(*WalkInitProc) (CompScreen *screen);
typedef CompWindow *(*WalkStepProc) (CompWindow *window);
struct _CompWalker {
WalkerFiniProc fini;
CompPrivate priv;
WalkInitProc first;
WalkInitProc last;
WalkStepProc next;
WalkStepProc prev;
};
/*
window paint flags
bit 1-16 are used for read-only flags and they provide
information that describe the screen rendering pass
currently in process.
bit 17-32 are writable flags and they provide information
that is used to optimize rendering.
*/
/*
this flag is present when window is being painted
on a transformed screen.
*/
#define PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK (1 << 0)
/*
this flag is present when window is being tested
for occlusion of other windows.
*/
#define PAINT_WINDOW_OCCLUSION_DETECTION_MASK (1 << 1)
/*
this flag indicates that the window ist painted with
an offset
*/
#define PAINT_WINDOW_WITH_OFFSET_MASK (1 << 2)
/*
flag indicate that window is translucent.
*/
#define PAINT_WINDOW_TRANSLUCENT_MASK (1 << 16)
/*
flag indicate that window is transformed.
*/
#define PAINT_WINDOW_TRANSFORMED_MASK (1 << 17)
/*
flag indicate that core PaintWindow function should
not draw this window.
*/
#define PAINT_WINDOW_NO_CORE_INSTANCE_MASK (1 << 18)
/*
flag indicate that blending is required.
*/
#define PAINT_WINDOW_BLEND_MASK (1 << 19)
typedef Bool (*PaintWindowProc) (CompWindow *window,
const WindowPaintAttrib *attrib,
const CompTransform *transform,
Region region,
unsigned int mask);
typedef Bool (*DrawWindowProc) (CompWindow *window,
const CompTransform *transform,
const FragmentAttrib *fragment,
Region region,
unsigned int mask);
typedef void (*AddWindowGeometryProc) (CompWindow *window,
CompMatrix *matrix,
int nMatrix,
Region region,
Region clip);
typedef void (*DrawWindowTextureProc) (CompWindow *w,
CompTexture *texture,
const FragmentAttrib *fragment,
unsigned int mask);
typedef void (*DrawWindowGeometryProc) (CompWindow *window);
typedef void (*PaintCursorProc) (CompCursor *cursor,
const CompTransform *transform,
Region region,
unsigned int mask);
void
preparePaintScreen (CompScreen *screen,
int msSinceLastPaint);
void
donePaintScreen (CompScreen *screen);
void
transformToScreenSpace (CompScreen *screen,
CompOutput *output,
float z,
CompTransform *transform);
/* XXX: prepareXCoords will be removed */
void
prepareXCoords (CompScreen *screen,
CompOutput *output,
float z);
void
paintTransformedOutput (CompScreen *screen,
const ScreenPaintAttrib *sAttrib,
const CompTransform *transform,
Region region,
CompOutput *output,
unsigned int mask);
/* XXX: applyScreenTransform will be removed */
void
applyScreenTransform (CompScreen *screen,
const ScreenPaintAttrib *sAttrib,
CompOutput *output,
CompTransform *transform);
void
enableOutputClipping (CompScreen *screen,
const CompTransform *transform,
Region region,
CompOutput *output);
void
disableOutputClipping (CompScreen *screen);
void
paintScreen (CompScreen *screen,
CompOutput *outputs,
int numOutput,
unsigned int mask);
Bool
paintOutput (CompScreen *screen,
const ScreenPaintAttrib *sAttrib,
const CompTransform *transform,
Region region,
CompOutput *output,
unsigned int mask);
Bool
moreWindowVertices (CompWindow *w,
int newSize);
Bool
moreWindowIndices (CompWindow *w,
int newSize);
void
addWindowGeometry (CompWindow *w,
CompMatrix *matrix,
int nMatrix,
Region region,
Region clip);
void
drawWindowTexture (CompWindow *w,
CompTexture *texture,
const FragmentAttrib *fragment,
unsigned int mask);
Bool
drawWindow (CompWindow *w,
const CompTransform *transform,
const FragmentAttrib *fragment,
Region region,
unsigned int mask);
Bool
paintWindow (CompWindow *w,
const WindowPaintAttrib *attrib,
const CompTransform *transform,
Region region,
unsigned int mask);
void
paintCursor (CompCursor *cursor,
const CompTransform *transform,
Region region,
unsigned int mask);
/* texture.c */
#define POWER_OF_TWO(v) ((v & (v - 1)) == 0)
typedef enum {
COMP_TEXTURE_FILTER_FAST,
COMP_TEXTURE_FILTER_GOOD
} CompTextureFilter;
struct _CompTexture {
GLuint name;
GLenum target;
GLfloat dx, dy;
GLXPixmap pixmap;
GLenum filter;
GLenum wrap;
CompMatrix matrix;
Bool oldMipmaps;
Bool mipmap;
int refCount;
};
void
initTexture (CompScreen *screen,
CompTexture *texture);
void
finiTexture (CompScreen *screen,
CompTexture *texture);
CompTexture *
createTexture (CompScreen *screen);
void
destroyTexture (CompScreen *screen,
CompTexture *texture);
Bool
imageBufferToTexture (CompScreen *screen,
CompTexture *texture,
const char *image,
unsigned int width,
unsigned int height);
Bool
imageDataToTexture (CompScreen *screen,
CompTexture *texture,
const char *image,
unsigned int width,
unsigned int height,
GLenum format,
GLenum type);
Bool
readImageToTexture (CompScreen *screen,
CompTexture *texture,
const char *imageFileName,
unsigned int *width,
unsigned int *height);
Bool
iconToTexture (CompScreen *screen,
CompIcon *icon);
Bool
bindPixmapToTexture (CompScreen *screen,
CompTexture *texture,
Pixmap pixmap,
int width,
int height,
int depth);
void
releasePixmapFromTexture (CompScreen *screen,
CompTexture *texture);
void
enableTexture (CompScreen *screen,
CompTexture *texture,
CompTextureFilter filter);
void
enableTextureClampToBorder (CompScreen *screen,
CompTexture *texture,
CompTextureFilter filter);
void
enableTextureClampToEdge (CompScreen *screen,
CompTexture *texture,
CompTextureFilter filter);
void
disableTexture (CompScreen *screen,
CompTexture *texture);
/* screen.c */
#define COMP_SCREEN_OPTION_DETECT_REFRESH_RATE 0
#define COMP_SCREEN_OPTION_LIGHTING 1
#define COMP_SCREEN_OPTION_REFRESH_RATE 2
#define COMP_SCREEN_OPTION_HSIZE 3
#define COMP_SCREEN_OPTION_VSIZE 4
#define COMP_SCREEN_OPTION_UNREDIRECT_FS 5
#define COMP_SCREEN_OPTION_DEFAULT_ICON 6
#define COMP_SCREEN_OPTION_SYNC_TO_VBLANK 7
#define COMP_SCREEN_OPTION_DETECT_OUTPUTS 8
#define COMP_SCREEN_OPTION_OUTPUTS 9
#define COMP_SCREEN_OPTION_OVERLAPPING_OUTPUTS 10
#define COMP_SCREEN_OPTION_FOCUS_PREVENTION_LEVEL 11
#define COMP_SCREEN_OPTION_FOCUS_PREVENTION_MATCH 12
#define COMP_SCREEN_OPTION_TEXTURE_COMPRESSION 13
#define COMP_SCREEN_OPTION_FORCE_INDEPENDENT 14
#define COMP_SCREEN_OPTION_NUM 15
#ifndef GLX_EXT_texture_from_pixmap
#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
#define GLX_Y_INVERTED_EXT 0x20D4
#define GLX_TEXTURE_FORMAT_EXT 0x20D5
#define GLX_TEXTURE_TARGET_EXT 0x20D6
#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
#define GLX_TEXTURE_1D_EXT 0x20DB
#define GLX_TEXTURE_2D_EXT 0x20DC
#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
#define GLX_FRONT_LEFT_EXT 0x20DE
#endif
#define OUTPUT_OVERLAP_MODE_SMART 0
#define OUTPUT_OVERLAP_MODE_PREFER_LARGER 1
#define OUTPUT_OVERLAP_MODE_PREFER_SMALLER 2
#define OUTPUT_OVERLAP_MODE_LAST OUTPUT_OVERLAP_MODE_PREFER_SMALLER
#define FOCUS_PREVENTION_LEVEL_NONE 0
#define FOCUS_PREVENTION_LEVEL_LOW 1
#define FOCUS_PREVENTION_LEVEL_NORMAL 2
#define FOCUS_PREVENTION_LEVEL_HIGH 3
#define FOCUS_PREVENTION_LEVEL_VERYHIGH 4
#define FOCUS_PREVENTION_LEVEL_LAST FOCUS_PREVENTION_LEVEL_VERYHIGH
typedef void (*FuncPtr) (void);
typedef FuncPtr (*GLXGetProcAddressProc) (const GLubyte *procName);
typedef void (*GLXBindTexImageProc) (Display *display,
GLXDrawable drawable,
int buffer,
int *attribList);
typedef void (*GLXReleaseTexImageProc) (Display *display,
GLXDrawable drawable,
int buffer);
typedef void (*GLXQueryDrawableProc) (Display *display,
GLXDrawable drawable,
int attribute,
unsigned int *value);
typedef void (*GLXCopySubBufferProc) (Display *display,
GLXDrawable drawable,
int x,
int y,
int width,
int height);
typedef int (*GLXGetVideoSyncProc) (unsigned int *count);
typedef int (*GLXWaitVideoSyncProc) (int divisor,
int remainder,
unsigned int *count);
#ifndef GLX_VERSION_1_3
typedef struct __GLXFBConfigRec *GLXFBConfig;
#endif
typedef GLXFBConfig *(*GLXGetFBConfigsProc) (Display *display,
int screen,
int *nElements);
typedef int (*GLXGetFBConfigAttribProc) (Display *display,
GLXFBConfig config,
int attribute,
int *value);
typedef GLXPixmap (*GLXCreatePixmapProc) (Display *display,
GLXFBConfig config,
Pixmap pixmap,
const int *attribList);
typedef void (*GLXDestroyPixmapProc) (Display *display,
GLXPixmap pixmap);
typedef void (*GLActiveTextureProc) (GLenum texture);
typedef void (*GLClientActiveTextureProc) (GLenum texture);
typedef void (*GLMultiTexCoord2fProc) (GLenum, GLfloat, GLfloat);
typedef void (*GLGenProgramsProc) (GLsizei n,
GLuint *programs);
typedef void (*GLDeleteProgramsProc) (GLsizei n,
GLuint *programs);
typedef void (*GLBindProgramProc) (GLenum target,
GLuint program);
typedef void (*GLProgramStringProc) (GLenum target,
GLenum format,
GLsizei len,
const GLvoid *string);
typedef void (*GLProgramParameter4fProc) (GLenum target,
GLuint index,
GLfloat x,
GLfloat y,
GLfloat z,
GLfloat w);
typedef void (*GLGetProgramivProc) (GLenum target,
GLenum pname,
int *params);
typedef void (*GLGenFramebuffersProc) (GLsizei n,
GLuint *framebuffers);
typedef void (*GLDeleteFramebuffersProc) (GLsizei n,
GLuint *framebuffers);
typedef void (*GLBindFramebufferProc) (GLenum target,
GLuint framebuffer);
typedef GLenum (*GLCheckFramebufferStatusProc) (GLenum target);
typedef void (*GLFramebufferTexture2DProc) (GLenum target,
GLenum attachment,
GLenum textarget,
GLuint texture,
GLint level);
typedef void (*GLGenerateMipmapProc) (GLenum target);
#define MAX_DEPTH 32
typedef void (*EnterShowDesktopModeProc) (CompScreen *screen);
typedef void (*LeaveShowDesktopModeProc) (CompScreen *screen,
CompWindow *window);
typedef Bool (*DamageWindowRectProc) (CompWindow *w,
Bool initial,
BoxPtr rect);
typedef Bool (*DamageWindowRegionProc) (CompWindow *w,
Region region);
typedef Bool (*DamageCursorRectProc) (CompCursor *c,
Bool initial,
BoxPtr rect);
typedef void (*GetOutputExtentsForWindowProc) (CompWindow *w,
CompWindowExtents *output);
typedef void (*GetAllowedActionsForWindowProc) (CompWindow *w,
unsigned int *setActions,
unsigned int *clearActions);
typedef Bool (*FocusWindowProc) (CompWindow *window);
typedef void (*ActivateWindowProc) (CompWindow *window);
typedef Bool (*PlaceWindowProc) (CompWindow *window,
int x,
int y,
int *newX,
int *newY);
typedef void (*ValidateWindowResizeRequestProc) (CompWindow *window,
unsigned int *mask,
XWindowChanges *xwc,
unsigned int source);
typedef void (*WindowResizeNotifyProc) (CompWindow *window,
int dx,
int dy,
int dwidth,
int dheight);
typedef void (*WindowMoveNotifyProc) (CompWindow *window,
int dx,
int dy,
Bool immediate);
#define CompWindowGrabKeyMask (1 << 0)
#define CompWindowGrabButtonMask (1 << 1)
#define CompWindowGrabMoveMask (1 << 2)
#define CompWindowGrabResizeMask (1 << 3)
#define CompWindowGrabExternalAppMask (1 << 4)
typedef void (*WindowGrabNotifyProc) (CompWindow *window,
int x,
int y,
unsigned int state,
unsigned int mask);
typedef void (*WindowUngrabNotifyProc) (CompWindow *window);
typedef void (*WindowStateChangeNotifyProc) (CompWindow *window,
unsigned int lastState);
typedef void (*OutputChangeNotifyProc) (CompScreen *screen);
typedef unsigned int (*AddSupportedAtomsProc) (CompScreen *s,
Atom *atoms,
unsigned int size);
typedef void (*InitWindowWalkerProc) (CompScreen *screen,
CompWalker *walker);
#define COMP_SCREEN_DAMAGE_PENDING_MASK (1 << 0)
#define COMP_SCREEN_DAMAGE_REGION_MASK (1 << 1)
#define COMP_SCREEN_DAMAGE_ALL_MASK (1 << 2)
typedef struct _CompKeyGrab {
int keycode;
unsigned int modifiers;
int count;
} CompKeyGrab;
typedef struct _CompButtonGrab {
int button;
unsigned int modifiers;
int count;
} CompButtonGrab;
typedef struct _CompGrab {
Bool active;
Cursor cursor;
const char *name;
} CompGrab;
typedef struct _CompGroup {
struct _CompGroup *next;
unsigned int refCnt;
Window id;
} CompGroup;
typedef struct _CompStartupSequence {
struct _CompStartupSequence *next;
SnStartupSequence *sequence;
unsigned int viewportX;
unsigned int viewportY;
} CompStartupSequence;
typedef struct _CompFBConfig {
GLXFBConfig fbConfig;
int yInverted;
int mipmap;
int textureFormat;
int textureTargets;
} CompFBConfig;
#define NOTHING_TRANS_FILTER 0
#define SCREEN_TRANS_FILTER 1
#define WINDOW_TRANS_FILTER 2
#define SCREEN_EDGE_LEFT 0
#define SCREEN_EDGE_RIGHT 1
#define SCREEN_EDGE_TOP 2
#define SCREEN_EDGE_BOTTOM 3
#define SCREEN_EDGE_TOPLEFT 4
#define SCREEN_EDGE_TOPRIGHT 5
#define SCREEN_EDGE_BOTTOMLEFT 6
#define SCREEN_EDGE_BOTTOMRIGHT 7
#define SCREEN_EDGE_NUM 8
typedef struct _CompScreenEdge {
Window id;
unsigned int count;
} CompScreenEdge;
struct _CompIcon {
CompTexture texture;
int width;
int height;
};
struct _CompOutput {
char *name;
int id;
REGION region;
int width;
int height;
XRectangle workArea;
};
typedef struct _CompCursorImage {
struct _CompCursorImage *next;
unsigned long serial;
Pixmap pixmap;
CompTexture texture;
int xhot;
int yhot;
int width;
int height;
} CompCursorImage;
struct _CompCursor {
struct _CompCursor *next;
CompScreen *screen;
CompCursorImage *image;
int x;
int y;
CompMatrix matrix;
};
#define ACTIVE_WINDOW_HISTORY_SIZE 64
#define ACTIVE_WINDOW_HISTORY_NUM 32
typedef struct _CompActiveWindowHistory {
Window id[ACTIVE_WINDOW_HISTORY_SIZE];
int x;
int y;
int activeNum;
} CompActiveWindowHistory;
struct _CompScreen {
CompObject base;
CompScreen *next;
CompDisplay *display;
CompWindow *windows;
CompWindow *reverseWindows;
char *windowPrivateIndices;
int windowPrivateLen;
Colormap colormap;
int screenNum;
int width;
int height;
int x;
int y;
int hsize; /* Number of horizontal viewports */
int vsize; /* Number of vertical viewports */
unsigned int nDesktop;
unsigned int currentDesktop;
REGION region;
Region damage;
unsigned long damageMask;
Window root;
Window overlay;
Window output;
XWindowAttributes attrib;
Window grabWindow;
CompFBConfig glxPixmapFBConfigs[MAX_DEPTH + 1];
int textureRectangle;
int textureNonPowerOfTwo;
int textureEnvCombine;
int textureEnvCrossbar;
int textureBorderClamp;
int textureCompression;
GLint maxTextureSize;
int fbo;
int fragmentProgram;
int maxTextureUnits;
Cursor invisibleCursor;
XRectangle *exposeRects;
int sizeExpose;
int nExpose;
CompTexture backgroundTexture;
Bool backgroundLoaded;
unsigned int pendingDestroys;
int desktopWindowCount;
unsigned int mapNum;
unsigned int activeNum;
CompOutput *outputDev;
int nOutputDev;
int currentOutputDev;
CompOutput fullscreenOutput;
Bool hasOverlappingOutputs;
int windowOffsetX;
int windowOffsetY;
XRectangle lastViewport;
CompActiveWindowHistory history[ACTIVE_WINDOW_HISTORY_NUM];
int currentHistory;
int overlayWindowCount;
CompScreenEdge screenEdge[SCREEN_EDGE_NUM];
SnMonitorContext *snContext;
CompStartupSequence *startupSequences;
unsigned int startupSequenceTimeoutHandle;
int filter[3];
CompGroup *groups;
CompIcon *defaultIcon;
Bool canDoSaturated;
Bool canDoSlightlySaturated;
Window wmSnSelectionWindow;
Atom wmSnAtom;
Time wmSnTimestamp;
Cursor normalCursor;
Cursor busyCursor;
CompWindow **clientList;
int nClientList;
CompButtonGrab *buttonGrab;
int nButtonGrab;
CompKeyGrab *keyGrab;
int nKeyGrab;
CompGrab *grabs;
int grabSize;
int maxGrab;
int rasterX;
int rasterY;
struct timeval lastRedraw;
int nextRedraw;
int redrawTime;
int optimalRedrawTime;
int frameStatus;
int timeMult;
Bool idle;
int timeLeft;
Bool pendingCommands;
int lastFunctionId;
CompFunction *fragmentFunctions;
CompProgram *fragmentPrograms;
int saturateFunction[2][64];
GLfloat projection[16];
Bool clearBuffers;
Bool lighting;
Bool slowAnimations;
XRectangle workArea;
unsigned int showingDesktopMask;
unsigned long *desktopHintData;
int desktopHintSize;
CompCursor *cursors;
CompCursorImage *cursorImages;
GLXGetProcAddressProc getProcAddress;
GLXBindTexImageProc bindTexImage;
GLXReleaseTexImageProc releaseTexImage;
GLXQueryDrawableProc queryDrawable;
GLXCopySubBufferProc copySubBuffer;
GLXGetVideoSyncProc getVideoSync;
GLXWaitVideoSyncProc waitVideoSync;
GLXGetFBConfigsProc getFBConfigs;
GLXGetFBConfigAttribProc getFBConfigAttrib;
GLXCreatePixmapProc createPixmap;
GLXDestroyPixmapProc destroyPixmap;
GLActiveTextureProc activeTexture;
GLClientActiveTextureProc clientActiveTexture;
GLMultiTexCoord2fProc multiTexCoord2f;
GLGenProgramsProc genPrograms;
GLDeleteProgramsProc deletePrograms;
GLBindProgramProc bindProgram;
GLProgramStringProc programString;
GLProgramParameter4fProc programEnvParameter4f;
GLProgramParameter4fProc programLocalParameter4f;
GLGetProgramivProc getProgramiv;
GLGenFramebuffersProc genFramebuffers;
GLDeleteFramebuffersProc deleteFramebuffers;
GLBindFramebufferProc bindFramebuffer;
GLCheckFramebufferStatusProc checkFramebufferStatus;
GLFramebufferTexture2DProc framebufferTexture2D;
GLGenerateMipmapProc generateMipmap;
GLXContext ctx;
CompOption opt[COMP_SCREEN_OPTION_NUM];
PreparePaintScreenProc preparePaintScreen;
DonePaintScreenProc donePaintScreen;
PaintScreenProc paintScreen;
PaintOutputProc paintOutput;
PaintTransformedOutputProc paintTransformedOutput;
EnableOutputClippingProc enableOutputClipping;
DisableOutputClippingProc disableOutputClipping;
ApplyScreenTransformProc applyScreenTransform;
PaintWindowProc paintWindow;
DrawWindowProc drawWindow;
AddWindowGeometryProc addWindowGeometry;
DrawWindowTextureProc drawWindowTexture;
DamageWindowRectProc damageWindowRect;
GetOutputExtentsForWindowProc getOutputExtentsForWindow;
GetAllowedActionsForWindowProc getAllowedActionsForWindow;
FocusWindowProc focusWindow;
ActivateWindowProc activateWindow;
PlaceWindowProc placeWindow;
ValidateWindowResizeRequestProc validateWindowResizeRequest;
PaintCursorProc paintCursor;
DamageCursorRectProc damageCursorRect;
WindowResizeNotifyProc windowResizeNotify;
WindowMoveNotifyProc windowMoveNotify;
WindowGrabNotifyProc windowGrabNotify;
WindowUngrabNotifyProc windowUngrabNotify;
EnterShowDesktopModeProc enterShowDesktopMode;
LeaveShowDesktopModeProc leaveShowDesktopMode;
WindowStateChangeNotifyProc windowStateChangeNotify;
OutputChangeNotifyProc outputChangeNotify;
AddSupportedAtomsProc addSupportedAtoms;
InitWindowWalkerProc initWindowWalker;
void *reserved;
};
#define GET_CORE_SCREEN(object) ((CompScreen *) (object))
#define CORE_SCREEN(object) CompScreen *s = GET_CORE_SCREEN (object)
CompBool
allocScreenObjectPrivates (CompObject *object,
CompObject *parent);
int
allocScreenObjectPrivateIndex (CompObject *parent);
void
freeScreenObjectPrivateIndex (CompObject *parent,
int index);
CompBool
forEachScreenObject (CompObject *parent,
ObjectCallBackProc proc,
void *closure);
char *
nameScreenObject (CompObject *object);
CompObject *
findScreenObject (CompObject *parent,
const char *name);
int
allocateScreenPrivateIndex (CompDisplay *display);
void
freeScreenPrivateIndex (CompDisplay *display,
int index);
CompOption *
getScreenOptions (CompPlugin *plugin,
CompScreen *screen,
int *count);
Bool
setScreenOption (CompPlugin *plugin,
CompScreen *screen,
const char *name,
CompOptionValue *value);
void
configureScreen (CompScreen *s,
XConfigureEvent *ce);
void
setCurrentOutput (CompScreen *s,
int outputNum);
void
setSupportedWmHints (CompScreen *s);
void
updateScreenBackground (CompScreen *screen,
CompTexture *texture);
void
detectRefreshRateOfScreen (CompScreen *s);
void
showOutputWindow (CompScreen *s);
void
hideOutputWindow (CompScreen *s);
void
updateOutputWindow (CompScreen *s);
Bool
addScreen (CompDisplay *display,
int screenNum,
Window wmSnSelectionWindow,
Atom wmSnAtom,
Time wmSnTimestamp);
void
removeScreen (CompScreen *s);
void
damageScreenRegion (CompScreen *screen,
Region region);
void
damageScreen (CompScreen *screen);
void
damagePendingOnScreen (CompScreen *s);
void
insertWindowIntoScreen (CompScreen *s,
CompWindow *w,
Window aboveId);
void
unhookWindowFromScreen (CompScreen *s,
CompWindow *w);
void
forEachWindowOnScreen (CompScreen *screen,
ForEachWindowProc proc,
void *closure);
CompWindow *
findWindowAtScreen (CompScreen *s,
Window id);
CompWindow *
findTopLevelWindowAtScreen (CompScreen *s,
Window id);
void
focusDefaultWindow (CompScreen *s);
int
pushScreenGrab (CompScreen *s,
Cursor cursor,
const char *name);
void
updateScreenGrab (CompScreen *s,
int index,
Cursor cursor);
void
removeScreenGrab (CompScreen *s,
int index,
XPoint *restorePointer);
Bool
otherScreenGrabExist (CompScreen *s, ...);
Bool
addScreenAction (CompScreen *s,
CompAction *action);
void
removeScreenAction (CompScreen *s,
CompAction *action);
void
updatePassiveGrabs (CompScreen *s);
void
updateWorkareaForScreen (CompScreen *s);
void
updateClientListForScreen (CompScreen *s);
Window
getActiveWindow (CompDisplay *display,
Window root);
void
toolkitAction (CompScreen *s,
Atom toolkitAction,
Time eventTime,
Window window,
long data0,
long data1,
long data2);
void
runCommand (CompScreen *s,
const char *command);
void
moveScreenViewport (CompScreen *s,
int tx,
int ty,
Bool sync);
void
moveWindowToViewportPosition (CompWindow *w,
int x,
int y,
Bool sync);
CompGroup *
addGroupToScreen (CompScreen *s,
Window id);
void
removeGroupFromScreen (CompScreen *s,
CompGroup *group);
CompGroup *
findGroupAtScreen (CompScreen *s,
Window id);
void
applyStartupProperties (CompScreen *screen,
CompWindow *window);
void
sendWindowActivationRequest (CompScreen *s,
Window id);
void
screenTexEnvMode (CompScreen *s,
GLenum mode);
void
screenLighting (CompScreen *s,
Bool lighting);
void
enableScreenEdge (CompScreen *s,
int edge);
void
disableScreenEdge (CompScreen *s,
int edge);
Window
getTopWindow (CompScreen *s);
void
makeScreenCurrent (CompScreen *s);
void
finishScreenDrawing (CompScreen *s);
int
outputDeviceForPoint (CompScreen *s,
int x,
int y);
void
getCurrentOutputExtents (CompScreen *s,
int *x1,
int *y1,
int *x2,
int *y2);
void
getWorkareaForOutput (CompScreen *s,
int output,
XRectangle *area);
void
setNumberOfDesktops (CompScreen *s,
unsigned int nDesktop);
void
setCurrentDesktop (CompScreen *s,
unsigned int desktop);
void
setDefaultViewport (CompScreen *s);
void
outputChangeNotify (CompScreen *s);
void
clearScreenOutput (CompScreen *s,
CompOutput *output,
unsigned int mask);
void
viewportForGeometry (CompScreen *s,
int x,
int y,
int width,
int height,
int borderWidth,
int *viewportX,
int *viewportY);
int
outputDeviceForGeometry (CompScreen *s,
int x,
int y,
int width,
int height,
int borderWidth);
Bool
updateDefaultIcon (CompScreen *screen);
CompCursor *
findCursorAtScreen (CompScreen *screen);
CompCursorImage *
findCursorImageAtScreen (CompScreen *screen,
unsigned long serial);
void
setCurrentActiveWindowHistory (CompScreen *s,
int x,
int y);
void
addToCurrentActiveWindowHistory (CompScreen *s,
Window id);
void
setWindowPaintOffset (CompScreen *s,
int x,
int y);
/* window.c */
#define WINDOW_INVISIBLE(w) \
((w)->attrib.map_state != IsViewable || \
(!(w)->damaged) || \
(w)->attrib.x + (w)->width + (w)->output.right <= 0 || \
(w)->attrib.y + (w)->height + (w)->output.bottom <= 0 || \
(w)->attrib.x - (w)->output.left >= (w)->screen->width || \
(w)->attrib.y - (w)->output.top >= (w)->screen->height)
typedef enum {
CompStackingUpdateModeNone = 0,
CompStackingUpdateModeNormal,
CompStackingUpdateModeAboveFullscreen,
CompStackingUpdateModeInitialMap,
CompStackingUpdateModeInitialMapDeniedFocus
} CompStackingUpdateMode;
typedef enum {
CompFocusAllowed = 0,
CompFocusPrevent,
CompFocusDenied
} CompFocusResult;
struct _CompWindowExtents {
int left;
int right;
int top;
int bottom;
};
typedef struct _CompStruts {
XRectangle left;
XRectangle right;
XRectangle top;
XRectangle bottom;
} CompStruts;
struct _CompWindow {
CompObject base;
CompScreen *screen;
CompWindow *next;
CompWindow *prev;
int refcnt;
Window id;
Window frame;
unsigned int mapNum;
unsigned int activeNum;
XWindowAttributes attrib;
int serverX;
int serverY;
int serverWidth;
int serverHeight;
int serverBorderWidth;
Window transientFor;
Window clientLeader;
XWMHints *hints;
XSizeHints sizeHints;
Pixmap pixmap;
CompTexture *texture;
CompMatrix matrix;
Damage damage;
Bool inputHint;
Bool alpha;
GLint width;
GLint height;
Region region;
Region clip;
unsigned int wmType;
unsigned int type;
unsigned int state;
unsigned int actions;
unsigned int protocols;
unsigned int mwmDecor;
unsigned int mwmFunc;
Bool invisible;
Bool destroyed;
Bool damaged;
Bool redirected;
Bool managed;
Bool unmanaging;
Bool bindFailed;
Bool overlayWindow;
int destroyRefCnt;
int unmapRefCnt;
unsigned int initialViewportX;
unsigned int initialViewportY;
Time initialTimestamp;
Bool initialTimestampSet;
Bool placed;
Bool minimized;
Bool inShowDesktopMode;
Bool shaded;
Bool hidden;
Bool grabbed;
unsigned int desktop;
int pendingUnmaps;
int pendingMaps;
char *startupId;
char *resName;
char *resClass;
CompGroup *group;
unsigned int lastPong;
Bool alive;
WindowPaintAttrib paint;
WindowPaintAttrib lastPaint;
unsigned int lastMask;
CompWindowExtents input;
CompWindowExtents output;
CompStruts *struts;
CompIcon **icon;
int nIcon;
XRectangle iconGeometry;
Bool iconGeometrySet;
XRectangle fullscreenMonitorRect;
Bool fullscreenMonitorsSet;
XWindowChanges saveWc;
int saveMask;
/* For saving changes before fullscreen */
XWindowChanges saveFFWc;
int savedFF;
XSyncCounter syncCounter;
XSyncValue syncValue;
XSyncAlarm syncAlarm;
unsigned long syncAlarmConnection;
Bool syncWait;
int syncX;
int syncY;
int syncWidth;
int syncHeight;
int syncBorderWidth;
Bool closeRequests;
Time lastCloseRequestTime;
XRectangle *damageRects;
int sizeDamage;
int nDamage;
GLfloat *vertices;
int vertexSize;
int vertexStride;
GLushort *indices;
int indexSize;
int vCount;
int texUnits;
int texCoordSize;
int indexCount;
/* must be set by addWindowGeometry */
DrawWindowGeometryProc drawWindowGeometry;
/* placed here to preserve ABI compat */
CompWindowExtents clientFrame;
CompWindowExtents frameInput;
unsigned int syncWaitHandle;
};
#define GET_CORE_WINDOW(object) ((CompWindow *) (object))
#define CORE_WINDOW(object) CompWindow *w = GET_CORE_WINDOW (object)
CompBool
allocWindowObjectPrivates (CompObject *object,
CompObject *parent);
int
allocWindowObjectPrivateIndex (CompObject *parent);
void
freeWindowObjectPrivateIndex (CompObject *parent,
int index);
CompBool
forEachWindowObject (CompObject *parent,
ObjectCallBackProc proc,
void *closure);
char *
nameWindowObject (CompObject *object);
CompObject *
findWindowObject (CompObject *parent,
const char *name);
int
allocateWindowPrivateIndex (CompScreen *screen);
void
freeWindowPrivateIndex (CompScreen *screen,
int index);
unsigned int
windowStateMask (CompDisplay *display,
Atom state);
unsigned int
windowStateFromString (const char *str);
unsigned int
getWindowState (CompDisplay *display,
Window id);
void
setWindowState (CompDisplay *display,
unsigned int state,
Window id);
void
changeWindowState (CompWindow *w,
unsigned int newState);
void
recalcWindowActions (CompWindow *w);
unsigned int
constrainWindowState (unsigned int state,
unsigned int actions);
unsigned int
windowTypeFromString (const char *str);
unsigned int
getWindowType (CompDisplay *display,
Window id);
void
recalcWindowType (CompWindow *w);
void
getMwmHints (CompDisplay *display,
Window id,
unsigned int *func,
unsigned int *decor);
unsigned int
getProtocols (CompDisplay *display,
Window id);
unsigned int
getWindowProp (CompDisplay *display,
Window id,
Atom property,
unsigned int defaultValue);
void
setWindowProp (CompDisplay *display,
Window id,
Atom property,
unsigned int value);
Bool
readWindowProp32 (CompDisplay *display,
Window id,
Atom property,
unsigned short *returnValue);
unsigned short
getWindowProp32 (CompDisplay *display,
Window id,
Atom property,
unsigned short defaultValue);
void
setWindowProp32 (CompDisplay *display,
Window id,
Atom property,
unsigned short value);
void
updateNormalHints (CompWindow *window);
void
updateWmHints (CompWindow *w);
void
updateWindowClassHints (CompWindow *window);
void
updateTransientHint (CompWindow *w);
void
updateIconGeometry (CompWindow *w);
void
updateClientFrame (CompWindow *w);
Window
getClientLeader (CompWindow *w);
char *
getStartupId (CompWindow *w);
int
getWmState (CompDisplay *display,
Window id);
void
setWmState (CompDisplay *display,
int state,
Window id);
void
setWindowFullscreenMonitors (CompWindow *w,
CompFullscreenMonitorSet *monitors);
void
setWindowFrameExtents (CompWindow *w,
CompWindowExtents *input);
void
setWindowBorderExtents (CompWindow *w,
CompWindowExtents *input);
void
updateWindowOutputExtents (CompWindow *w);
void
updateWindowRegion (CompWindow *w);
Bool
updateWindowStruts (CompWindow *w);
void
addWindow (CompScreen *screen,
Window id,
Window aboveId);
void
removeWindow (CompWindow *w);
void
destroyWindow (CompWindow *w);
void
sendConfigureNotify (CompWindow *w);
void
mapWindow (CompWindow *w);
void
unmapWindow (CompWindow *w);
Bool
bindWindow (CompWindow *w);
void
releaseWindow (CompWindow *w);
void
moveWindow (CompWindow *w,
int dx,
int dy,
Bool damage,
Bool immediate);
void
configureXWindow (CompWindow *w,
unsigned int valueMask,
XWindowChanges *xwc);
unsigned int
adjustConfigureRequestForGravity (CompWindow *w,
XWindowChanges *xwc,
unsigned int xwcm,
int gravity,
int direction);
void
moveResizeWindow (CompWindow *w,
XWindowChanges *xwc,
unsigned int xwcm,
int gravity,
unsigned int source);
void
syncWindowPosition (CompWindow *w);
void
sendSyncRequest (CompWindow *w);
Bool
resizeWindow (CompWindow *w,
int x,
int y,
int width,
int height,
int borderWidth);
void
configureWindow (CompWindow *w,
XConfigureEvent *ce);
void
circulateWindow (CompWindow *w,
XCirculateEvent *ce);
void
addWindowDamageRect (CompWindow *w,
BoxPtr rect);
void
getOutputExtentsForWindow (CompWindow *w,
CompWindowExtents *output);
void
getAllowedActionsForWindow (CompWindow *w,
unsigned int *setActions,
unsigned int *clearActions);
void
addWindowDamage (CompWindow *w);
void
damageWindowOutputExtents (CompWindow *w);
Bool
damageWindowRect (CompWindow *w,
Bool initial,
BoxPtr rect);
void
damageTransformedWindowRect (CompWindow *w,
float xScale,
float yScale,
float xTranslate,
float yTranslate,
BoxPtr rect);
Bool
focusWindow (CompWindow *w);
Bool
placeWindow (CompWindow *w,
int x,
int y,
int *newX,
int *newY);
void
validateWindowResizeRequest (CompWindow *w,
unsigned int *mask,
XWindowChanges *xwc,
unsigned int source);
void
windowResizeNotify (CompWindow *w,
int dx,
int dy,
int dwidth,
int dheight);
void
windowMoveNotify (CompWindow *w,
int dx,
int dy,
Bool immediate);
void
windowGrabNotify (CompWindow *w,
int x,
int y,
unsigned int state,
unsigned int mask);
void
windowUngrabNotify (CompWindow *w);
void
windowStateChangeNotify (CompWindow *w,
unsigned int lastState);
void
moveInputFocusToWindow (CompWindow *w);
void
updateWindowSize (CompWindow *w);
void
raiseWindow (CompWindow *w);
void
lowerWindow (CompWindow *w);
void
restackWindowAbove (CompWindow *w,
CompWindow *sibling);
void
restackWindowBelow (CompWindow *w,
CompWindow *sibling);
void
updateWindowAttributes (CompWindow *w,
CompStackingUpdateMode stackingMode);
void
activateWindow (CompWindow *w);
void
closeWindow (CompWindow *w,
Time serverTime);
Bool
constrainNewWindowSize (CompWindow *w,
int width,
int height,
int *newWidth,
int *newHeight);
void
hideWindow (CompWindow *w);
void
showWindow (CompWindow *w);
void
minimizeWindow (CompWindow *w);
void
unminimizeWindow (CompWindow *w);
void
maximizeWindow (CompWindow *w,
int state);
Bool
getWindowUserTime (CompWindow *w,
Time *time);
void
setWindowUserTime (CompWindow *w,
Time time);
CompFocusResult
allowWindowFocus (CompWindow *w,
unsigned int noFocusMask,
unsigned int viewportX,
unsigned int viewportY,
Time timestamp);
void
unredirectWindow (CompWindow *w);
void
redirectWindow (CompWindow *w);
void
defaultViewportForWindow (CompWindow *w,
int *vx,
int *vy);
CompIcon *
getWindowIcon (CompWindow *w,
int width,
int height);
void
freeWindowIcons (CompWindow *w);
int
outputDeviceForWindow (CompWindow *w);
Bool
onCurrentDesktop (CompWindow *w);
void
setDesktopForWindow (CompWindow *w,
unsigned int desktop);
int
compareWindowActiveness (CompWindow *w1,
CompWindow *w2);
Bool
windowOnAllViewports (CompWindow *w);
void
getWindowMovementForOffset (CompWindow *w,
int offX,
int offY,
int *retX,
int *retY);
/* plugin.c */
#define HOME_PLUGINDIR ".compiz/plugins"
typedef CompPluginVTable *(*PluginGetInfoProc) (void);
typedef Bool (*LoadPluginProc) (CompPlugin *p,
const char *path,
const char *name);
typedef void (*UnloadPluginProc) (CompPlugin *p);
typedef char **(*ListPluginsProc) (const char *path,
int *n);
extern LoadPluginProc loaderLoadPlugin;
extern UnloadPluginProc loaderUnloadPlugin;
extern ListPluginsProc loaderListPlugins;
struct _CompPlugin {
CompPlugin *next;
CompPrivate devPrivate;
char *devType;
CompPluginVTable *vTable;
};
CompBool
objectInitPlugins (CompObject *o);
void
objectFiniPlugins (CompObject *o);
CompPlugin *
findActivePlugin (const char *name);
CompPlugin *
loadPlugin (const char *plugin);
void
unloadPlugin (CompPlugin *p);
Bool
pushPlugin (CompPlugin *p);
CompPlugin *
popPlugin (void);
CompPlugin *
getPlugins (void);
char **
availablePlugins (int *n);
int
getPluginABI (const char *name);
Bool
checkPluginABI (const char *name,
int abi);
Bool
getPluginDisplayIndex (CompDisplay *d,
const char *name,
int *index);
/* fragment.c */
#define MAX_FRAGMENT_FUNCTIONS 16
struct _FragmentAttrib {
GLushort opacity;
GLushort brightness;
GLushort saturation;
int nTexture;
int function[MAX_FRAGMENT_FUNCTIONS];
int nFunction;
int nParam;
};
CompFunctionData *
createFunctionData (void);
void
destroyFunctionData (CompFunctionData *data);
Bool
addTempHeaderOpToFunctionData (CompFunctionData *data,
const char *name);
Bool
addParamHeaderOpToFunctionData (CompFunctionData *data,
const char *name);
Bool
addAttribHeaderOpToFunctionData (CompFunctionData *data,
const char *name);
#define COMP_FETCH_TARGET_2D 0
#define COMP_FETCH_TARGET_RECT 1
#define COMP_FETCH_TARGET_NUM 2
Bool
addFetchOpToFunctionData (CompFunctionData *data,
const char *dst,
const char *offset,
int target);
Bool
addColorOpToFunctionData (CompFunctionData *data,
const char *dst,
const char *src);
Bool
addDataOpToFunctionData (CompFunctionData *data,
const char *str,
...);
Bool
addBlendOpToFunctionData (CompFunctionData *data,
const char *str,
...);
int
createFragmentFunction (CompScreen *s,
const char *name,
CompFunctionData *data);
void
destroyFragmentFunction (CompScreen *s,
int id);
int
getSaturateFragmentFunction (CompScreen *s,
CompTexture *texture,
int param);
int
allocFragmentTextureUnits (FragmentAttrib *attrib,
int nTexture);
int
allocFragmentParameters (FragmentAttrib *attrib,
int nParam);
void
addFragmentFunction (FragmentAttrib *attrib,
int function);
void
initFragmentAttrib (FragmentAttrib *attrib,
const WindowPaintAttrib *paint);
Bool
enableFragmentAttrib (CompScreen *s,
FragmentAttrib *attrib,
Bool *blending);
void
disableFragmentAttrib (CompScreen *s,
FragmentAttrib *attrib);
/* matrix.c */
void
matrixMultiply (CompTransform *product,
const CompTransform *transformA,
const CompTransform *transformB);
void
matrixMultiplyVector (CompVector *product,
const CompVector *vector,
const CompTransform *transform);
void
matrixVectorDiv (CompVector *v);
void
matrixRotate (CompTransform *transform,
float angle,
float x,
float y,
float z);
void
matrixScale (CompTransform *transform,
float x,
float y,
float z);
void
matrixTranslate (CompTransform *transform,
float x,
float y,
float z);
void
matrixGetIdentity (CompTransform *m);
/* cursor.c */
void
addCursor (CompScreen *s);
Bool
damageCursorRect (CompCursor *c,
Bool initial,
BoxPtr rect);
void
addCursorDamageRect (CompCursor *c,
BoxPtr rect);
void
addCursorDamage (CompCursor *c);
void
updateCursor (CompCursor *c,
int x,
int y,
unsigned long serial);
/* match.c */
void
matchInit (CompMatch *match);
void
matchFini (CompMatch *match);
Bool
matchEqual (CompMatch *m1,
CompMatch *m2);
Bool
matchCopy (CompMatch *dst,
CompMatch *src);
Bool
matchAddGroup (CompMatch *match,
int flags,
CompMatch *group);
Bool
matchAddExp (CompMatch *match,
int flags,
const char *value);
void
matchAddFromString (CompMatch *match,
const char *str);
char *
matchToString (CompMatch *match);
void
matchUpdate (CompDisplay *display,
CompMatch *match);
Bool
matchEval (CompMatch *match,
CompWindow *window);
void
matchInitExp (CompDisplay *display,
CompMatchExp *exp,
const char *value);
void
matchExpHandlerChanged (CompDisplay *display);
void
matchPropertyChanged (CompDisplay *display,
CompWindow *window);
/* metadata.c */
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY (x)
#define MINTOSTRING(x) "<min>" TOSTRING (x) "</min>"
#define MAXTOSTRING(x) "<max>" TOSTRING (x) "</max>"
#define RESTOSTRING(min, max) MINTOSTRING (min) MAXTOSTRING (max)
typedef struct _CompMetadataOptionInfo {
const char *name;
const char *type;
const char *data;
CompActionCallBackProc initiate;
CompActionCallBackProc terminate;
} CompMetadataOptionInfo;
extern const CompMetadataOptionInfo
coreDisplayOptionInfo[COMP_DISPLAY_OPTION_NUM];
extern const CompMetadataOptionInfo
coreScreenOptionInfo[COMP_SCREEN_OPTION_NUM];
struct _CompMetadata {
char *path;
xmlDoc **doc;
int nDoc;
};
Bool
compInitPluginMetadataFromInfo (CompMetadata *metadata,
const char *plugin,
const CompMetadataOptionInfo *displayOptionInfo,
int nDisplayOptionInfo,
const CompMetadataOptionInfo *screenOptionInfo,
int nScreenOptionInfo);
Bool
compInitScreenOptionFromMetadata (CompScreen *screen,
CompMetadata *metadata,
CompOption *option,
const char *name);
void
compFiniScreenOption (CompScreen *screen,
CompOption *option);
Bool
compInitScreenOptionsFromMetadata (CompScreen *screen,
CompMetadata *metadata,
const CompMetadataOptionInfo *info,
CompOption *option,
int n);
void
compFiniScreenOptions (CompScreen *screen,
CompOption *option,
int n);
Bool
compSetScreenOption (CompScreen *screen,
CompOption *option,
CompOptionValue *value);
Bool
compInitDisplayOptionFromMetadata (CompDisplay *display,
CompMetadata *metadata,
CompOption *option,
const char *name);
void
compFiniDisplayOption (CompDisplay *display,
CompOption *option);
Bool
compInitDisplayOptionsFromMetadata (CompDisplay *display,
CompMetadata *metadata,
const CompMetadataOptionInfo *info,
CompOption *option,
int n);
void
compFiniDisplayOptions (CompDisplay *display,
CompOption *option,
int n);
Bool
compSetDisplayOption (CompDisplay *display,
CompOption *option,
CompOptionValue *value);
char *
compGetShortPluginDescription (CompMetadata *metadata);
char *
compGetLongPluginDescription (CompMetadata *metadata);
char *
compGetShortScreenOptionDescription (CompMetadata *metadata,
CompOption *option);
char *
compGetLongScreenOptionDescription (CompMetadata *metadata,
CompOption *option);
char *
compGetShortDisplayOptionDescription (CompMetadata *metadata,
CompOption *option);
char *
compGetLongDisplayOptionDescription (CompMetadata *metadata,
CompOption *option);
int
compReadXmlChunkFromMetadataOptionInfo (const CompMetadataOptionInfo *info,
int *offset,
char *buffer,
int length);
COMPIZ_END_DECLS
#endif
|