1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835
|
<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="class-gdkwindow">
<refnamediv>
<refname>gtk.gdk.Window</refname>
<refpurpose>on-screen display areas in the target window
system</refpurpose>
</refnamediv>
<refsect1>
<title>Synopsis</title>
<classsynopsis language="python">
<ooclass><classname>gtk.gdk.Window</classname></ooclass>
<ooclass><classname><link
linkend="class-gdkdrawable">gtk.gdk.Drawable</link></classname></ooclass>
<constructorsynopsis language="python">
<methodname><link
linkend="constructor-gdkwindow">gtk.gdk.Window</link></methodname>
<methodparam><parameter
role="keyword">parent</parameter></methodparam>
<methodparam><parameter
role="keyword">width</parameter></methodparam>
<methodparam><parameter
role="keyword">height</parameter></methodparam>
<methodparam><parameter
role="keyword">window_type</parameter></methodparam>
<methodparam><parameter
role="keyword">event_mask</parameter></methodparam>
<methodparam><parameter
role="keyword">wclass</parameter></methodparam>
<methodparam><parameter role="keyword">title</parameter>
<initializer>None</initializer></methodparam>
<methodparam><parameter role="keyword">x</parameter>
<initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">y</parameter>
<initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">visual</parameter>
<initializer>None</initializer></methodparam>
<methodparam><parameter role="keyword">colormap</parameter>
<initializer>None</initializer></methodparam>
<methodparam><parameter role="keyword">cursor</parameter>
<initializer>None</initializer></methodparam>
<methodparam><parameter role="keyword">wmclass_name</parameter>
<initializer>None</initializer></methodparam>
<methodparam><parameter role="keyword">wmclass_class</parameter>
<initializer>None</initializer></methodparam>
<methodparam><parameter role="keyword">override_redirect</parameter>
<initializer>-1</initializer></methodparam>
</constructorsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--drag-begin">drag_begin</link></methodname>
<methodparam><parameter
role="keyword">targets</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--input-set-extension-events">input_set_extension_events</link></methodname>
<methodparam><parameter
role="keyword">mask</parameter></methodparam>
<methodparam><parameter
role="keyword">mode</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--property-get">property_get</link></methodname>
<methodparam><parameter
role="keyword">property</parameter></methodparam>
<methodparam><parameter role="keyword">type</parameter>
<initializer>None</initializer></methodparam>
<methodparam><parameter role="keyword">pdelete</parameter>
<initializer>False</initializer></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--property-change">property_change</link></methodname>
<methodparam><parameter
role="keyword">property</parameter></methodparam>
<methodparam><parameter
role="keyword">type</parameter></methodparam>
<methodparam><parameter
role="keyword">format</parameter></methodparam>
<methodparam><parameter
role="keyword">mode</parameter></methodparam>
<methodparam><parameter
role="keyword">data</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--property-delete">property_delete</link></methodname>
<methodparam><parameter
role="keyword">property</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--selection-convert">selection_convert</link></methodname>
<methodparam><parameter
role="keyword">selection</parameter></methodparam>
<methodparam><parameter
role="keyword">target</parameter></methodparam>
<methodparam><parameter
role="keyword">time</parameter></methodparam>
</methodsynopsis>
<!-- NOT IMPLEMENTED
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow- -selection-property-get">selection_property_get</link></methodname>
<methodparam><parameter role="keyword">data</parameter></methodparam>
<methodparam><parameter role="keyword">prop_type</parameter></methodparam>
<methodparam><parameter role="keyword">prop_format</parameter></methodparam>
</methodsynopsis>
END NOT IMPLEMENTED -->
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--set-keep-above">set_keep_above</link></methodname>
<methodparam><parameter role="keyword">setting</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--set-keep-below">set_keep_below</link></methodname>
<methodparam><parameter role="keyword">setting</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--destroy">destroy</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--get-window-type">get_window_type</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--show">show</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--hide">hide</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--withdraw">withdraw</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--move">move</link></methodname>
<methodparam><parameter role="keyword">x</parameter></methodparam>
<methodparam><parameter role="keyword">y</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--resize">resize</link></methodname>
<methodparam><parameter
role="keyword">width</parameter></methodparam>
<methodparam><parameter
role="keyword">height</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--move-resize">move_resize</link></methodname>
<methodparam><parameter role="keyword">x</parameter></methodparam>
<methodparam><parameter role="keyword">y</parameter></methodparam>
<methodparam><parameter
role="keyword">width</parameter></methodparam>
<methodparam><parameter
role="keyword">height</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--reparent">reparent</link></methodname>
<methodparam><parameter
role="keyword">new_parent</parameter></methodparam>
<methodparam><parameter role="keyword">x</parameter></methodparam>
<methodparam><parameter role="keyword">y</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--clear">clear</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--clear-area">clear_area</link></methodname>
<methodparam><parameter role="keyword">x</parameter></methodparam>
<methodparam><parameter role="keyword">y</parameter></methodparam>
<methodparam><parameter
role="keyword">width</parameter></methodparam>
<methodparam><parameter
role="keyword">height</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--clear-area-e">clear_area_e</link></methodname>
<methodparam><parameter role="keyword">x</parameter></methodparam>
<methodparam><parameter role="keyword">y</parameter></methodparam>
<methodparam><parameter
role="keyword">width</parameter></methodparam>
<methodparam><parameter
role="keyword">height</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--raise_">raise_</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--lower">lower</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--focus">focus</link></methodname>
<methodparam><parameter role="keyword">timestamp</parameter>
<initializer>0L</initializer></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--set-user-data">set_user_data</link></methodname>
<methodparam><parameter role="keyword">user_data</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--get-user-data">get_user_data</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--set-override-redirect">set_override_redirect</link></methodname>
<methodparam><parameter
role="keyword">override_redirect</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--add-filter">add_filter</link></methodname>
<methodparam><parameter role="keyword">function</parameter></methodparam>
<methodparam><parameter role="keyword">data</parameter><initializer>None</initializer></methodparam>
</methodsynopsis>
<!-- NOT IMPLEMENTED
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow- -remove-filter">remove_filter</link></methodname>
<methodparam><parameter role="keyword">function</parameter></methodparam>
<methodparam><parameter role="keyword">data</parameter></methodparam>
</methodsynopsis>
END NOT IMPLEMENTED -->
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--scroll">scroll</link></methodname>
<methodparam><parameter role="keyword">dx</parameter></methodparam>
<methodparam><parameter role="keyword">dy</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--shape-combine-mask">shape_combine_mask</link></methodname>
<methodparam><parameter
role="keyword">shape_mask</parameter></methodparam>
<methodparam><parameter
role="keyword">offset_x</parameter></methodparam>
<methodparam><parameter
role="keyword">offset_y</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--set-child-shapes">set_child_shapes</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--merge-child-shapes">merge_child_shapes</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--is-visible">is_visible</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--is-viewable">is_viewable</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--get-state">get_state</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--set-static-gravities">set_static_gravities</link></methodname>
<methodparam><parameter
role="keyword">use_static</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--get-type-hint">get_type_hint</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--set-type-hint">set_type_hint</link></methodname>
<methodparam><parameter
role="keyword">hint</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--set-modal-hint">set_modal_hint</link></methodname>
<methodparam><parameter
role="keyword">modal</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--set-skip-taskbar-hint">set_skip_taskbar_hint</link></methodname>
<methodparam><parameter
role="keyword">skips_taskbar</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--set-skip-pager-hint">set_skip_pager_hint</link></methodname>
<methodparam><parameter
role="keyword">skips_pager</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--set-geometry-hints">set_geometry_hints</link></methodname>
<methodparam><parameter role="keyword">min_width</parameter><initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">min_height</parameter><initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">max_width</parameter><initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">max_height</parameter><initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">base_width</parameter><initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">base_height</parameter><initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">width_inc</parameter><initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">height_inc</parameter><initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">min_aspect</parameter><initializer>-1.0</initializer></methodparam>
<methodparam><parameter role="keyword">max_aspect</parameter><initializer>-1.0</initializer></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--begin-paint-rect">begin_paint_rect</link></methodname>
<methodparam><parameter
role="keyword">rectangle</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--begin-paint-region">begin_paint_region</link></methodname>
<methodparam><parameter role="keyword">region</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--end-paint">end_paint</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--set-title">set_title</link></methodname>
<methodparam><parameter
role="keyword">title</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--set-role">set_role</link></methodname>
<methodparam><parameter
role="keyword">role</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--set-transient-for">set_transient_for</link></methodname>
<methodparam><parameter
role="keyword">leader</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--set-background">set_background</link></methodname>
<methodparam><parameter
role="keyword">color</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--set-back-pixmap">set_back_pixmap</link></methodname>
<methodparam><parameter
role="keyword">pixmap</parameter></methodparam>
<methodparam><parameter
role="keyword">parent_relative</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--set-cursor">set_cursor</link></methodname>
<methodparam><parameter
role="keyword">cursor</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--get-geometry">get_geometry</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--get-position">get_position</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--get-origin">get_origin</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--get-root-origin">get_root_origin</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--get-frame-extents">get_frame_extents</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--get-pointer">get_pointer</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--get-parent">get_parent</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--get-toplevel">get_toplevel</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--get-children">get_children</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--get-events">get_events</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--set-events">set_events</link></methodname>
<methodparam><parameter
role="keyword">event_mask</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--set-icon-list">set_icon_list</link></methodname>
<methodparam><parameter role="keyword">pixbufs</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--set-icon">set_icon</link></methodname>
<methodparam><parameter
role="keyword">icon_window</parameter></methodparam>
<methodparam><parameter
role="keyword">pixmap</parameter></methodparam>
<methodparam><parameter
role="keyword">mask</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--set-icon-name">set_icon_name</link></methodname>
<methodparam><parameter
role="keyword">name</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--set-group">set_group</link></methodname>
<methodparam><parameter
role="keyword">leader</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--get-group">get_group</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--set-decorations">set_decorations</link></methodname>
<methodparam><parameter
role="keyword">decorations</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--get-decorations">get_decorations</link></methodname>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--set-functions">set_functions</link></methodname>
<methodparam><parameter
role="keyword">functions</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--iconify">iconify</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--deiconify">deiconify</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--stick">stick</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--unstick">unstick</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--maximize">maximize</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--unmaximize">unmaximize</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--fullscreen">fullscreen</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--unfullscreen">unfullscreen</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--register-dnd">register_dnd</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--begin-resize-drag">begin_resize_drag</link></methodname>
<methodparam><parameter
role="keyword">edge</parameter></methodparam>
<methodparam><parameter
role="keyword">button</parameter></methodparam>
<methodparam><parameter
role="keyword">root_x</parameter></methodparam>
<methodparam><parameter
role="keyword">root_y</parameter></methodparam>
<methodparam><parameter
role="keyword">timestamp</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--begin-move-drag">begin_move_drag</link></methodname>
<methodparam><parameter
role="keyword">button</parameter></methodparam>
<methodparam><parameter
role="keyword">root_x</parameter></methodparam>
<methodparam><parameter
role="keyword">root_y</parameter></methodparam>
<methodparam><parameter
role="keyword">timestamp</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--invalidate-rect">invalidate_rect</link></methodname>
<methodparam><parameter
role="keyword">rect</parameter></methodparam>
<methodparam><parameter
role="keyword">invalidate_children</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--invalidate-region">invalidate_region</link></methodname>
<methodparam><parameter role="keyword">region</parameter></methodparam>
<methodparam><parameter role="keyword">invalidate_children</parameter></methodparam>
</methodsynopsis>
<!-- NOT IMPLEMENTED
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow- -invalidate-maybe-recurse">invalidate_maybe_recurse</link></methodname>
<methodparam><parameter role="keyword">region</parameter></methodparam>
<methodparam><parameter role="keyword">(*child_func</parameter></methodparam>
</methodsynopsis>
END NOT IMPLEMENTED -->
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--get-update-area">get_update_area</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--freeze-updates">freeze_updates</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--thaw-updates">thaw_updates</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--process-updates">process_updates</link></methodname>
<methodparam><parameter
role="keyword">update_children</parameter></methodparam>
</methodsynopsis>
<!-- NOT IMPLEMENTED
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow- -get-internal-paint-info">get_internal_paint_info</link></methodname>
<methodparam><parameter role="keyword">real_drawable</parameter></methodparam>
<methodparam><parameter role="keyword">x_offset</parameter></methodparam>
<methodparam><parameter role="keyword">y_offset</parameter></methodparam>
</methodsynopsis>
END NOT IMPLEMENTED -->
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--set-accept-focus">set_accept_focus</link></methodname>
<methodparam><parameter role="keyword">accept_focus</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--enable-synchronized-configure">enable_synchronized_configure</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--configure-finished">configure_finished</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--set-focus-on-map">set_focus_on_map</link></methodname>
<methodparam><parameter role="keyword">focus_on_map</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--set-urgency-hint">set_urgency_hint</link></methodname>
<methodparam><parameter role="keyword">urgent</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--move-region">move_region</link></methodname>
<methodparam><parameter role="keyword">region</parameter></methodparam>
<methodparam><parameter role="keyword">dx</parameter></methodparam>
<methodparam><parameter role="keyword">dy</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--shape-combine-region">shape_combine_region</link></methodname>
<methodparam><parameter
role="keyword">shape_region</parameter></methodparam>
<methodparam><parameter
role="keyword">offset_x</parameter></methodparam>
<methodparam><parameter
role="keyword">offset_y</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--input-shape-combine-mask">input_shape_combine_mask</link></methodname>
<methodparam><parameter
role="keyword">mask</parameter></methodparam>
<methodparam><parameter
role="keyword">x</parameter></methodparam>
<methodparam><parameter
role="keyword">y</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gdkwindow--input-shape-combine-region">input_shape_combine_region</link></methodname>
<methodparam><parameter
role="keyword">shape_region</parameter></methodparam>
<methodparam><parameter
role="keyword">offset_x</parameter></methodparam>
<methodparam><parameter
role="keyword">offset_y</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--beep">beep</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--set-composited">set_composited</link></methodname>
<methodparam><parameter role="keyword">composited</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--set-opacity">set_opacity</link></methodname>
<methodparam><parameter role="keyword">opacity</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--set-startup-id">set_startup_id</link></methodname>
<methodparam><parameter role="keyword">startup_id</parameter></methodparam>
</methodsynopsis>
<!-- NOT IMPLEMENTED
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow- -redirect-to-drawable">redirect_to_drawable</link></methodname>
<methodparam><parameter role="keyword">drawable</parameter></methodparam>
<methodparam><parameter role="keyword">src_x</parameter></methodparam>
<methodparam><parameter role="keyword">src_y</parameter></methodparam>
<methodparam><parameter role="keyword">dest_x</parameter></methodparam>
<methodparam><parameter role="keyword">dest_y</parameter></methodparam>
<methodparam><parameter role="keyword">width</parameter></methodparam>
<methodparam><parameter role="keyword">height</parameter></methodparam>
</methodsynopsis>
END NOT IMPLEMENTED -->
<methodsynopsis language="python">
<methodname><link linkend="method-gdkwindow--remove-redirection">remove_redirection</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
</classsynopsis>
<programlisting>
<emphasis role="bold">Functions</emphasis>
<methodsynopsis language="python">
<methodname><link
linkend="function-gdk--window-foreign-new">gtk.gdk.window_foreign_new</link></methodname>
<methodparam><parameter
role="keyword">anid</parameter></methodparam>
</methodsynopsis><methodsynopsis language="python">
<methodname><link
linkend="function-gdk--window-foreign-new-for-display">gtk.gdk.window_foreign_new_for_display</link></methodname>
<methodparam><parameter
role="keyword">display</parameter></methodparam>
<methodparam><parameter
role="keyword">anid</parameter></methodparam>
</methodsynopsis><methodsynopsis language="python">
<methodname><link
linkend="function-gdk--get-default-root-window">gtk.gdk.get_default_root_window</link></methodname>
<methodparam></methodparam>
</methodsynopsis><methodsynopsis language="python">
<methodname><link
linkend="function-gdk--window-get-toplevels">gtk.gdk.window_get_toplevels</link></methodname>
<methodparam></methodparam>
</methodsynopsis><methodsynopsis language="python">
<methodname><link
linkend="function-gdk--window-lookup">gtk.gdk.window_lookup</link></methodname>
<methodparam><parameter
role="keyword">anid</parameter></methodparam>
</methodsynopsis><methodsynopsis language="python">
<methodname><link
linkend="function-gdk--window-lookup-for-display">gtk.gdk.window_lookup_for_display</link></methodname>
<methodparam><parameter
role="keyword">display</parameter></methodparam>
<methodparam><parameter
role="keyword">anid</parameter></methodparam>
</methodsynopsis><methodsynopsis language="python">
<methodname><link
linkend="function-gdk--window-process-all-updates">gtk.gdk.window_process_all_updates</link></methodname>
<methodparam></methodparam>
</methodsynopsis><methodsynopsis language="python">
<methodname><link
linkend="function-gdk--gdk-window-set-debug-updates">gtk.gdk.gdk_window_set_debug_updates</link></methodname>
<methodparam><parameter
role="keyword">setting</parameter></methodparam>
</methodsynopsis><methodsynopsis language="python">
<methodname><link
linkend="function-gdk--window-at-pointer">gtk.gdk.window_at_pointer</link></methodname>
</methodsynopsis></programlisting>
</refsect1>
<refsect1>
<title>Ancestry</title>
<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+-- <link linkend="class-gdkdrawable">gtk.gdk.Drawable</link>
+-- <link linkend="class-gdkwindow">gtk.gdk.Window</link>
</synopsis>
</refsect1>
<refsect1>
<title>Description</title>
<para> <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> is a
rectangular region on the screen. It's a low-level object, used to implement
high-level objects such as <link
linkend="class-gtkwidget"><classname>gtk.Widget</classname></link> and <link
linkend="class-gtkwindow"><classname>gtk.Window</classname></link>. A <link
linkend="class-gtkwindow"><classname>gtk.Window</classname></link> is a
toplevel window, the object a user might think of as a "window" with a
titlebar and so on. A <link
linkend="class-gtkwindow"><classname>gtk.Window</classname></link> may
contain several <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
objects since most widgets use a <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>.</para>
<para>A <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
object interacts with the native window system for input and events. Some
<link linkend="class-gtkwidget"><classname>gtk.Widget</classname></link>
objects do not have an associated <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> and
therefore cannot receive events. To receive events on behalf of these
"windowless" widgets a <link
linkend="class-gtkeventbox"><classname>gtk.EventBox</classname></link> must
be used.</para>
<refsect2 id="gdkwindow-composited-windows-example">
<title>A gtk.gdk.Window Composited Windows example</title>
<programlisting>
import gtk
import cairo
'''
The expose event handler for the event box.
This function simply draws a transparency onto a widget on the area
for which it receives expose events. This is intended to give the
event box a "transparent" background.
In order for this to work properly, the widget must have an RGBA
colourmap. The widget should also be set as app-paintable since it
doesn't make sense for GTK+ to draw a background if we are drawing it
(and because GTK+ might actually replace our transparency with its
default background colour).
'''
def transparent_expose(widget, event):
cr = widget.window.cairo_create()
cr.set_operator(cairo.OPERATOR_CLEAR)
# Ugly but we don't have event.region
region = gtk.gdk.region_rectangle(event.area)
cr.region(region)
cr.fill()
return False
'''
The expose event handler for the window.
This function performs the actual compositing of the event box onto
the already-existing background of the window at 50% normal opacity.
In this case we do not want app-paintable to be set on the widget
since we want it to draw its own (red) background. Because of this,
however, we must ensure that we use g_signal_register_after so that
this handler is called after the red has been drawn. If it was
called before then GTK would just blindly paint over our work.
Note: if the child window has children, then you need a cairo 1.16
feature to make this work correctly.
'''
def window_expose_event(widget, event):
#get our child (in this case, the event box)
child = widget.get_child()
#create a cairo context to draw to the window
cr = widget.window.cairo_create()
#the source data is the (composited) event box
cr.set_source_pixmap (child.window,
child.allocation.x,
child.allocation.y)
#draw no more than our expose event intersects our child
region = gtk.gdk.region_rectangle(child.allocation)
r = gtk.gdk.region_rectangle(event.area)
region.intersect(r)
cr.region (region)
cr.clip()
#composite, with a 50% opacity
cr.set_operator(cairo.OPERATOR_OVER)
cr.paint_with_alpha(0.5)
return False
# Make the widgets
w = gtk.Window()
b = gtk.Button("A Button")
e = gtk.EventBox()
# Put a red background on the window
red = gtk.gdk.color_parse("red")
w.modify_bg(gtk.STATE_NORMAL, red)
# Set the colourmap for the event box.
# Must be done before the event box is realised.
screen = e.get_screen()
rgba = screen.get_rgba_colormap()
e.set_colormap(rgba)
# Set our event box to have a fully-transparent background
# drawn on it. Currently there is no way to simply tell GTK+
# that "transparency" is the background colour for a widget.
e.set_app_paintable(True)
e.connect("expose-event", transparent_expose)
# Put them inside one another
w.set_border_width(10)
w.add(e)
e.add(b)
# Realise and show everything
w.show_all()
# Set the event box GdkWindow to be composited.
# Obviously must be performed after event box is realised.
e.window.set_composited(True)
# Set up the compositing handler.
# Note that we do _after_ so that the normal (red) background is drawn
# by gtk before our compositing occurs.
w.connect_after("expose-event", window_expose_event)
gtk.main()
</programlisting>
<para>
In this example a button is placed inside of an event box inside of a window.
The event box is set as composited and therefore is no longer automatically
drawn to the screen.
</para>
<para>
When the contents of the event box change, an expose event is generated on its
parent window (which, in this case, belongs to the toplevel
<link linkend="class-gtkwindow"><classname>gtk.Window</classname></link>). The expose
handler for this widget is responsible for merging the changes back on the screen
in the way that it wishes.
</para>
<para>
In our case, we merge the contents with a 50% transparency. We also set the background
colour of the window to red. The effect is that the background shows through the button.
</para>
</refsect2>
</refsect1>
<refsect1 id="constructor-gdkwindow">
<title>Constructor</title>
<programlisting><constructorsynopsis language="python">
<methodname>gtk.gdk.Window</methodname>
<methodparam><parameter
role="keyword">parent</parameter></methodparam>
<methodparam><parameter
role="keyword">width</parameter></methodparam>
<methodparam><parameter
role="keyword">height</parameter></methodparam>
<methodparam><parameter
role="keyword">window_type</parameter></methodparam>
<methodparam><parameter
role="keyword">event_mask</parameter></methodparam>
<methodparam><parameter
role="keyword">wclass</parameter></methodparam>
<methodparam><parameter role="keyword">title</parameter>
<initializer>None</initializer></methodparam>
<methodparam><parameter role="keyword">x</parameter>
<initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">y</parameter>
<initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">visual</parameter>
<initializer>None</initializer></methodparam>
<methodparam><parameter role="keyword">colormap</parameter>
<initializer>None</initializer></methodparam>
<methodparam><parameter role="keyword">cursor</parameter>
<initializer>None</initializer></methodparam>
<methodparam><parameter role="keyword">wmclass_name</parameter>
<initializer>None</initializer></methodparam>
<methodparam><parameter role="keyword">wmclass_class</parameter>
<initializer>None</initializer></methodparam>
<methodparam><parameter role="keyword">override_redirect</parameter>
<initializer>-1</initializer></methodparam>
</constructorsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">parent</parameter> :</term>
<listitem><simpara>a <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link></simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">width</parameter> :</term>
<listitem><simpara>the width of the window in
pixels</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">height</parameter> :</term>
<listitem><simpara>the height of the window in
pixels</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">window_type</parameter> :</term>
<listitem><simpara>the window type</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">event_mask</parameter> :</term>
<listitem><simpara>the bitmask of events received by the
window</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">wclass</parameter> :</term>
<listitem><simpara>the class of window - either
<literal>gtk.gdk.INPUT_OUTPUT</literal> or
<literal>gtk.gdk.INPUT_ONLY</literal></simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">title</parameter> :</term>
<listitem><simpara>the window title if a toplevel
window</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">x</parameter> :</term>
<listitem><simpara>the x coordinate of the window position relative
to <parameter>parent</parameter></simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">y</parameter> :</term>
<listitem><simpara>the y coordinate of the window position relative
to <parameter>parent</parameter></simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">visual</parameter> :</term>
<listitem><simpara>the <link
linkend="class-gdkvisual"><classname>gtk.gdk.Visual</classname></link> for
the window</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">colormap</parameter> :</term>
<listitem><simpara>the <link
linkend="class-gdkcolormap"><classname>gtk.gdk.Colormap</classname></link>
for the window</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">cursor</parameter> :</term>
<listitem><simpara>the <link
linkend="class-gdkcursor"><classname>gtk.gdk.Cursor</classname></link> for
the window</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">wmclass_name</parameter> :</term>
<listitem><simpara>don't use this - see the <link
linkend="method-gtkwindow--set-wmclass"><methodname>gtk.Window.set_wmclass</methodname>()</link>
method for more information.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">wmclass_class</parameter> :</term>
<listitem><simpara>don't use this - see the <link
linkend="method-gtkwindow--set-wmclass"><methodname>gtk.Window.set_wmclass</methodname>()</link>
method for more information.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">override_redirect</parameter> :</term>
<listitem><simpara>if <literal>True</literal> bypass the window
manager</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the new <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link></simpara></listitem>
</varlistentry>
</variablelist>
<para>Creates a new <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> of
the type and class specified by <parameter>window_type</parameter> and
<parameter>wclass</parameter>. The window will be a child of the specified
<parameter>parent</parameter> and will have the specified
<parameter>width</parameter> and <parameter>height</parameter>.
<parameter>event_mask</parameter> is a bitfield specifying the events that
the window will receive - see the <link
linkend="method-gdkwindow--set-events"><methodname>set_events</methodname>()</link>
method for more information. The value of <parameter>window_type</parameter>
must be one of the <xref linkend="gdk-window-type-constants"
endterm="gdk-window-type-constants-title"></xref>.</para>
<para>The value of <parameter>wclass</parameter> must be one of the
<xref linkend="gdk-window-class-constants"
endterm="gdk-window-class-constants-title"></xref>.</para>
<para>If the optional parameters are not specified the corresponding
attribute values will have default values:</para>
<variablelist>
<varlistentry>
<term><parameter>x</parameter></term>
<listitem>
<simpara>0</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>y</parameter></term>
<listitem>
<simpara>0</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>visual</parameter></term>
<listitem>
<simpara>the default system visual - see the <link
linkend="function-gdk--visual-get-system"><function>gtk.gdk.visual_get_system</function>()</link>
function</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>colormap</parameter></term>
<listitem>
<simpara>either the system <link
linkend="class-gdkcolormap"><classname>gtk.gdk.Colormap</classname></link>
if using the system <link
linkend="class-gdkvisual"><classname>gtk.gdk.Visual</classname></link> (see
the <link
linkend="function-gdk--colormap-get-system"><function>gtk.gdk.colormap_get_system</function>()</link>
function) or a new <link
linkend="class-gdkcolormap"><classname>gtk.gdk.Colormap</classname></link>
using <parameter>visual</parameter></simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>cursor</parameter></term>
<listitem>
<simpara>use the parent window's cursor</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>override_redirect</parameter></term>
<listitem>
<simpara>False</simpara>
</listitem>
</varlistentry>
</variablelist>
<para></para>
</refsect1>
<refsect1>
<title>Methods</title>
<refsect2 id="method-gdkwindow--drag-begin">
<title>gtk.gdk.Window.drag_begin</title>
<programlisting><methodsynopsis language="python">
<methodname>drag_begin</methodname>
<methodparam><parameter
role="keyword">targets</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">targets</parameter> :</term>
<listitem><simpara>a list of offered targets</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a new <link
linkend="class-gdkdragcontext"><classname>gtk.gdk.DragContext</classname></link></simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>drag_begin</methodname>() method starts a drag
operation and returns the new <link
linkend="class-gdkdragcontext"><classname>gtk.gdk.DragContext</classname></link>
created for it. The list of targets (integer values) supported by the drag
source are specified by <parameter>targets</parameter>.</para>
</refsect2>
<refsect2 id="method-gdkwindow--input-set-extension-events">
<title>gtk.gdk.Window.input_set_extension_events</title>
<programlisting><methodsynopsis language="python">
<methodname>input_set_extension_events</methodname>
<methodparam><parameter
role="keyword">mask</parameter></methodparam>
<methodparam><parameter
role="keyword">mode</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">mask</parameter> :</term>
<listitem><simpara>the event mask to be used</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">mode</parameter> :</term>
<listitem><simpara>the set of extension events to
receive</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>input_set_extension_events</methodname>() method
enables or disables the extension events specified by
<parameter>mode</parameter> for the window when using the event mask
specified by <parameter>mask</parameter>. The value of
<parameter>mode</parameter> must be one of the <xref
linkend="gdk-extension-mode-constants"
endterm="gdk-extension-mode-constants-title">.</xref></para>
</refsect2>
<refsect2 id="method-gdkwindow--property-get">
<title>gtk.gdk.Window.property_get</title>
<programlisting><methodsynopsis language="python">
<methodname>property_get</methodname>
<methodparam><parameter
role="keyword">property</parameter></methodparam>
<methodparam><parameter role="keyword">type</parameter>
<initializer>0</initializer></methodparam>
<methodparam><parameter role="keyword">pdelete</parameter>
<initializer>False</initializer></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">property</parameter> :</term>
<listitem><simpara>the property to get</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">type</parameter> :</term>
<listitem><simpara>the type of property to get or not specified if
any type of property data is acceptable.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">pdelete</parameter> :</term>
<listitem><simpara>if <literal>True</literal>, delete the property
after retrieving the data.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a tuple containing the actual property type,
the data format and the data</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>property_get</methodname>() method returns a
tuple containing the actual property type (as a <link
linkend="class-gdkatom"><classname>gtk.gdk.Atom</classname></link>), the
format and the data of the specified <parameter>property</parameter> with
the specified <parameter>type</parameter>. The value of
<parameter>type</parameter> may not be be specified in which case it will be
0 to match any type of property. the returned data will be a string if the
data format is 8; a list of integers if the data format is 16; or, a list of
<link linkend="class-gdkatom"><classname>gtk.gdk.Atom</classname></link>
objects or integers if the data format is 32. If
<parameter>property</parameter> cannot be found <literal>None</literal> is
returned. <parameter>property</parameter> and <parameter>type</parameter>
(if specified) must be a string or a <link
linkend="class-gdkatom"><classname>gtk.gdk.Atom</classname></link>.</para>
</refsect2>
<refsect2 id="method-gdkwindow--property-change">
<title>gtk.gdk.Window.property_change</title>
<programlisting><methodsynopsis language="python">
<methodname>property_change</methodname>
<methodparam><parameter
role="keyword">property</parameter></methodparam>
<methodparam><parameter
role="keyword">type</parameter></methodparam>
<methodparam><parameter
role="keyword">format</parameter></methodparam>
<methodparam><parameter
role="keyword">mode</parameter></methodparam>
<methodparam><parameter
role="keyword">data</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">property</parameter> :</term>
<listitem><simpara>the property to change</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">type</parameter> :</term>
<listitem><simpara>the new type of the property. If
<parameter>mode</parameter> is <literal>gtk.gdk.PROP_MODE_PREPEND</literal>
or <literal>gtk.gdk.PROP_MODE_APPEND</literal>, then this must match the
existing type or an error will occur.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">format</parameter> :</term>
<listitem><simpara>the new format for the property. If
<parameter>mode</parameter> is <literal>gtk.gdk.PROP_MODE_PREPEND</literal>
or <literal>gtk.gdk.PROP_MODE_APPEND</literal>, then this must match the
existing format or an error will occur.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">mode</parameter> :</term>
<listitem><simpara>a value describing how the new data is to be
combined with the current data.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">data</parameter> :</term>
<listitem><simpara>the data for the property</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>property_change</methodname>() method changes
the contents of the specified <parameter>property</parameter> to the
specified <parameter>data</parameter> with the specified
<parameter>type</parameter> and <parameter>format</parameter>. The value of
<parameter>mode</parameter> must be one of the <xref
linkend="gdk-property-mode-constants"
endterm="gdk-property-mode-constants-title"></xref> which describes how the
new data is to be combined with the existing property data.The value of
<parameter>format</parameter> must be 8, 16 or
32. <parameter>property</parameter> and <parameter>type</parameter> must be
a string or a <link
linkend="class-gdkatom"><classname>gtk.gdk.Atom</classname></link>.</para>
</refsect2>
<refsect2 id="method-gdkwindow--property-delete">
<title>gtk.gdk.Window.property_delete</title>
<programlisting><methodsynopsis language="python">
<methodname>property_delete</methodname>
<methodparam><parameter
role="keyword">property</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">property</parameter> :</term>
<listitem><simpara>the property to delete</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>property_delete</methodname>() method deletes
the specified <parameter>property</parameter> from the window.
<parameter>property</parameter> must be a string or a gtk.gdk.Atom.</para>
</refsect2>
<refsect2 id="method-gdkwindow--selection-convert">
<title>gtk.gdk.Window.selection_convert</title>
<programlisting><methodsynopsis language="python">
<methodname>selection_convert</methodname>
<methodparam><parameter
role="keyword">selection</parameter></methodparam>
<methodparam><parameter
role="keyword">target</parameter></methodparam>
<methodparam><parameter
role="keyword">time</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">selection</parameter> :</term>
<listitem><simpara>the selection to retrieve</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">target</parameter> :</term>
<listitem><simpara>the target form of
<parameter>selection</parameter></simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">time</parameter> :</term>
<listitem><simpara>the timestamp to use when retrieving
<parameter>selection</parameter>. The selection owner may refuse the request
if it did not own the selection at the time indicated by the
timestamp.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>selection_convert</methodname>() method converts
the specified <parameter>selection</parameter> to the specified
<parameter>form</parameter>.</para>
</refsect2>
<!-- NOT IMPLEMENTED
<refsect2 id="method-gdkwindow- -selection-property-get">
<title>gtk.gdk.Window.selection_property_get</title>
<programlisting><methodsynopsis language="python">
<methodname>selection_property_get</methodname>
<methodparam><parameter role="keyword">data</parameter></methodparam>
<methodparam><parameter role="keyword">prop_type</parameter></methodparam>
<methodparam><parameter role="keyword">prop_format</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">data</parameter> :</term>
<listitem><simpara>a guchar**</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">prop_type</parameter> :</term>
<listitem><simpara>a GdkAtom*</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">prop_format</parameter> :</term>
<listitem><simpara>a gint*</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a gboolean</simpara></listitem>
</varlistentry>
</variablelist>
</refsect2>
END NOT IMPLEMENTED -->
<refsect2 id="method-gdkwindow--set-keep-above">
<title>gtk.gdk.Window.set_keep_above</title>
<programlisting><methodsynopsis language="python">
<methodname>set_keep_above</methodname>
<methodparam><parameter role="keyword">setting</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">setting</parameter> :</term>
<listitem><simpara>xif <literal>True</literal> keep the window
above other windows</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.4 and above.</para>
</note>
<para>The <methodname>set_keep_above</methodname>() method sets the
"keep-above" setting to the value of <parameter>setting</parameter>. If
<parameter>setting</parameter> is <literal>True</literal> the window must be
kept above other windows. If the window is already above, then this method
does nothing.</para>
<para>On X11, asks the window manager to keep the window above, if the
window manager supports this operation. Not all window managers support
this, and some deliberately ignore it or don't have a concept of "keep
above", but most standard window managers do.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-keep-below">
<title>gtk.gdk.Window.set_keep_below</title>
<programlisting><methodsynopsis language="python">
<methodname>set_keep_below</methodname>
<methodparam><parameter role="keyword">setting</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">setting</parameter> :</term>
<listitem><simpara>if <literal>True</literal>, keep the window
below other windows</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.4 and above.</para>
</note>
<para>The <methodname>set_keep_below</methodname>() method sets the
"keep-below" setting to the value of <parameter>setting</parameter>. If
<parameter>setting</parameter> is <literal>True</literal> the window must be
kept below other windows. If the window was already below, then this
method does nothing.</para>
<para>On X11, asks the window manager to keep the window below, if the
window manager supports this operation. Not all window managers support
this, and some deliberately ignore it or don't have a concept of "keep
below" but most standard window managers do.</para>
</refsect2>
<refsect2 id="method-gdkwindow--destroy">
<title>gtk.gdk.Window.destroy</title>
<programlisting><methodsynopsis language="python">
<methodname>destroy</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>destroy</methodname>() method destroys the
window (destroys the server-side resource associated with the window). All
children of the window are also destroyed. There's normally no need to use
this method since windows are automatically destroyed when their reference
count reaches 0.</para>
</refsect2>
<refsect2 id="method-gdkwindow--get-window-type">
<title>gtk.gdk.Window.get_window_type</title>
<programlisting><methodsynopsis language="python">
<methodname>get_window_type</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the type of window</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>get_window_type</methodname>() method returns
the type of the window which is one of the <xref
linkend="gdk-window-type-constants"
endterm="gdk-window-type-constants-title"></xref>.</para>
</refsect2>
<refsect2 id="method-gdkwindow--show">
<title>gtk.gdk.Window.show</title>
<programlisting><methodsynopsis language="python">
<methodname>show</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>show</methodname>() method maps the window so
it's visible on-screen and also raises it to the top of the window stack
(moves the window to the front of the Z-order). This method is opposite to
the <link
linkend="method-gdkwindow--hide"><methodname>hide</methodname>()</link>
method. When implementing a <link
linkend="class-gtkwidget"><classname>gtk.Widget</classname></link>, you
should call this method on the widget's <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> as
part of the "map" method.</para>
</refsect2>
<refsect2 id="method-gdkwindow--hide">
<title>gtk.gdk.Window.hide</title>
<programlisting><methodsynopsis language="python">
<methodname>hide</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>hide</methodname>() method withdraws toplevel
windows, so they will no longer be known to the window manager and for all
windows, unmaps them, so they won't be displayed. This is normally done
automatically as part of the <link
linkend="method-gtkwidget--hide"><methodname>gtk.Widget.hide</methodname>()</link>
method.</para>
</refsect2>
<refsect2 id="method-gdkwindow--withdraw">
<title>gtk.gdk.Window.withdraw</title>
<programlisting><methodsynopsis language="python">
<methodname>withdraw</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>withdraw</methodname>() method withdraws the
window (unmaps it and asks the window manager to forget about it). This is
normally done automatically by the <link
linkend="method-gtkwidget--hide"><methodname>gtk.Widget.hide</methodname>()</link>
method called on a <link
linkend="class-gtkwindow"><classname>gtk.Window</classname></link>.</para>
</refsect2>
<refsect2 id="method-gdkwindow--move">
<title>gtk.gdk.Window.move</title>
<programlisting><methodsynopsis language="python">
<methodname>move</methodname>
<methodparam><parameter role="keyword">x</parameter></methodparam>
<methodparam><parameter role="keyword">y</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">x</parameter> :</term>
<listitem><simpara>the X coordinate relative to the window's
parent</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">y</parameter> :</term>
<listitem><simpara>the Y coordinate relative to the window's
parent</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>move</methodname>() method repositions the
window to the location specified by <parameter>x</parameter> and
<parameter>y</parameter> relative to its parent window. For toplevel
windows, window managers may ignore or modify the move. You should probably
use the <link
linkend="method-gtkwindow--move"><methodname>gtk.Window.move</methodname>()</link>
method on a <link
linkend="class-gtkwindow"><classname>gtk.Window</classname></link> widget
anyway, instead of using this method. For child windows, the move will
reliably succeed. If you're also planning to resize the window, use the
<link
linkend="method-gdkwindow--move-resize"><methodname>move_resize</methodname>()</link>
method to both move and resize simultaneously, for a nicer visual
effect.</para>
</refsect2>
<refsect2 id="method-gdkwindow--resize">
<title>gtk.gdk.Window.resize</title>
<programlisting><methodsynopsis language="python">
<methodname>resize</methodname>
<methodparam><parameter
role="keyword">width</parameter></methodparam>
<methodparam><parameter
role="keyword">height</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">width</parameter> :</term>
<listitem><simpara>the new width of the
window</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">height</parameter> :</term>
<listitem><simpara>the new height of the
window</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>resize</methodname>() method resizes the window
to the specified <parameter>width</parameter> and
<parameter>height</parameter>. For toplevel windows, this method asks the
window manager to resize the window. However, the window manager may not
allow the resize. You should use the <link
linkend="method-gtkwindow--resize"><methodname>gtk.Window.resize</methodname>()</link>
method instead of this low-level method. Windows may not be resized smaller
than 1x1. If you're also planning to move the window, use the <link
linkend="method-gdkwindow--move-resize"><methodname>move_resize</methodname>()</link>
method to both move and resize simultaneously, for a nicer visual
effect.</para>
</refsect2>
<refsect2 id="method-gdkwindow--move-resize">
<title>gtk.gdk.Window.move_resize</title>
<programlisting><methodsynopsis language="python">
<methodname>move_resize</methodname>
<methodparam><parameter role="keyword">x</parameter></methodparam>
<methodparam><parameter role="keyword">y</parameter></methodparam>
<methodparam><parameter
role="keyword">width</parameter></methodparam>
<methodparam><parameter
role="keyword">height</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">x</parameter> :</term>
<listitem><simpara>the new X position relative to the window's
parent</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">y</parameter> :</term>
<listitem><simpara>the new Y position relative to the window's
parent</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">width</parameter> :</term>
<listitem><simpara>the new width</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">height</parameter> :</term>
<listitem><simpara>the new height</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>move_resize</methodname>() method repositions
the window to the location specified by <parameter>x</parameter> and
<parameter>y</parameter> with the size specified by
<parameter>width</parameter> and <parameter>height</parameter>. This method
is equivalent to calling the <link
linkend="method-gdkwindow--move"><methodname>move</methodname>()</link> and
<link
linkend="method-gdkwindow--resize"><methodname>resize</methodname>()</link>
methods, except that both operations are performed at once, avoiding strange
visual effects. (i.e. the user may be able to see the window first move,
then resize, if you don't use the <methodname>move_resize</methodname>()
method.)</para>
</refsect2>
<refsect2 id="method-gdkwindow--reparent">
<title>gtk.gdk.Window.reparent</title>
<programlisting><methodsynopsis language="python">
<methodname>reparent</methodname>
<methodparam><parameter
role="keyword">new_parent</parameter></methodparam>
<methodparam><parameter role="keyword">x</parameter></methodparam>
<methodparam><parameter role="keyword">y</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">new_parent</parameter> :</term>
<listitem><simpara>the new parent <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> to
move the window into</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">x</parameter> :</term>
<listitem><simpara>the X location inside the new
parent</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">y</parameter> :</term>
<listitem><simpara>the Y location inside the new
parent</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>reparent</methodname>() method reparents the
window into the <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
specified <parameter>new_parent</parameter>. The window being reparented
will be unmapped as a side effect.</para>
</refsect2>
<refsect2 id="method-gdkwindow--clear">
<title>gtk.gdk.Window.clear</title>
<programlisting><methodsynopsis language="python">
<methodname>clear</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>clear</methodname>() method clears an entire the
window to the background color or background pixmap.</para>
</refsect2>
<refsect2 id="method-gdkwindow--clear-area">
<title>gtk.gdk.Window.clear_area</title>
<programlisting><methodsynopsis language="python">
<methodname>clear_area</methodname>
<methodparam><parameter role="keyword">x</parameter></methodparam>
<methodparam><parameter role="keyword">y</parameter></methodparam>
<methodparam><parameter
role="keyword">width</parameter></methodparam>
<methodparam><parameter
role="keyword">height</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">x</parameter> :</term>
<listitem><simpara>the X coordinate of the rectangle to
clear</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">y</parameter> :</term>
<listitem><simpara>the Y coordinate of the rectangle to
clear</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">width</parameter> :</term>
<listitem><simpara>the width of the rectangle to
clear</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">height</parameter> :</term>
<listitem><simpara>the height of the rectangle to
clear</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>clear_area</methodname>() method clears the area
(specified by <parameter>x</parameter>, <parameter>y</parameter>,
<parameter>width</parameter> and <parameter>height</parameter>) of the
window to the background color or background pixmap.</para>
</refsect2>
<refsect2 id="method-gdkwindow--clear-area-e">
<title>gtk.gdk.Window.clear_area_e</title>
<programlisting><methodsynopsis language="python">
<methodname>clear_area_e</methodname>
<methodparam><parameter role="keyword">x</parameter></methodparam>
<methodparam><parameter role="keyword">y</parameter></methodparam>
<methodparam><parameter
role="keyword">width</parameter></methodparam>
<methodparam><parameter
role="keyword">height</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">x</parameter> :</term>
<listitem><simpara>the X coordinate of the rectangle to
clear</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">y</parameter> :</term>
<listitem><simpara>the Y coordinate of the rectangle to
clear</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">width</parameter> :</term>
<listitem><simpara>the width of the rectangle to
clear</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">height</parameter> :</term>
<listitem><simpara>the height of the rectangle to
clear</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>clear_area_e</methodname>() method is like the
<link
linkend="method-gdkwindow--clear-area"><methodname>clear_area</methodname>()</link>,
but also generates an expose event for the cleared area.</para>
</refsect2>
<refsect2 id="method-gdkwindow--raise_">
<title>gtk.gdk.Window.raise_</title>
<programlisting><methodsynopsis language="python">
<methodname>raise_</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>raise_</methodname>() method raises the window to
the top of the Z-order (stacking order), so that other windows with the same
parent window appear below the window. If the window is a toplevel, the
window manager may choose to deny the request to move the window in the
Z-order. Therefore, the <link
linkend="method-gdkwindow--raise_"><methodname>raise_</methodname>()</link>
method only requests the restack, it does not guarantee it.</para>
<note><para>
This method is called <methodname>raise</methodname>() in
the C API, but was renamed <methodname>raise_</methodname>()
since <literal>raise</literal> is a reserved Python keyword.
</para></note>
</refsect2>
<refsect2 id="method-gdkwindow--lower">
<title>gtk.gdk.Window.lower</title>
<programlisting><methodsynopsis language="python">
<methodname>lower</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The lower() method lowers the window to the bottom of the
Z-order (stacking order), so that other windows with the same parent window
appear above the window. If the window is a toplevel, the window manager may
choose to deny the request to move the window in the Z-order. Therefore, the
<link
linkend="method-gdkwindow--lower"><methodname>lower</methodname>()</link>
only requests the restack, it does not guarantee it. Note that the <link
linkend="method-gdkwindow--show"><methodname>show</methodname>()</link>
method raises the window again, so don't call this method before calling the
<link
linkend="method-gdkwindow--show"><methodname>show</methodname>()</link>
method to avoid duplication.</para>
</refsect2>
<refsect2 id="method-gdkwindow--focus">
<title>gtk.gdk.Window.focus</title>
<programlisting><methodsynopsis language="python">
<methodname>focus</methodname>
<methodparam><parameter role="keyword">timestamp</parameter>
<initializer>0L</initializer></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">timestamp</parameter> :</term>
<listitem><simpara>the timestamp of the event triggering the
window focus</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>focus</methodname>() method sets keyboard focus
to the window. If the window is not on-screen this will not work. In most
cases, the <link
linkend="method-gtkwindow--present"><methodname>gtk.Window.present</methodname>()</link>
method should be used on a <link
linkend="class-gtkwindow"><classname>gtk.Window</classname></link>, rather
than calling this method.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-user-data">
<title>gtk.gdk.Window.set_user_data</title>
<programlisting><methodsynopsis language="python">
<methodname>set_user_data</methodname>
<methodparam><parameter role="keyword">user_data</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">user_data</parameter> :</term>
<listitem><simpara>a <link
linkend="class-gtkwidget"><classname>gtk.Widget</classname></link></simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.4 and above.</para>
</note>
<para>The <methodname>set_user_data</methodname>() method stores the
underlying GTK+ widget of the PyGTK widget that is specified by
<parameter>user_data</parameter> as the user data of the window. In general
GTK+ stores the widget that owns a <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> as
user data on a <link
linkend="class-gtkwindow"><classname>gtk.Window</classname></link>. So,
custom widget implementations in <literal>PyGTK</literal> should use this
method to provide that capability. If <literal>GTK+</literal> receives an
event for a <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>, and
the user data for the window is set, <literal>GTK+</literal> will assume the
user data is a <link
linkend="class-gtkwidget"><classname>gtk.Widget</classname></link>, and
forward the event to that widget.</para>
<para>In PyGTK 2.4 and above this method will raise the TypeError
exception if <parameter>user_data</parameter> is not a <link
linkend="class-gtkwidget"><classname>gtk.Widget</classname></link>.</para>
<note>
<para>This method is deprecated for any use other than the above. To
set other user data on a <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> use
the <link
linkend="method-gobject--set-data"><methodname>gobject.GObject.set_data</methodname>()</link>
method instead.</para>
</note>
</refsect2>
<refsect2 id="method-gdkwindow--get-user-data">
<title>gtk.gdk.Window.get_user_data</title>
<programlisting><methodsynopsis language="python">
<methodname>get_user_data</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the user data set on the
window</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.4 and above.</para>
</note>
<para>The <methodname>get_user_data</methodname>() method returns the
PyGTK widget that was set as the user data of the window using the <link
linkend="method-gdkwindow--set-user-data"><methodname>set_user_data</methodname>()</link>
method. This method raises the ValueError exception if the user data is not
set or is not a PyGTK object.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-override-redirect">
<title>gtk.gdk.Window.set_override_redirect</title>
<programlisting><methodsynopsis language="python">
<methodname>set_override_redirect</methodname>
<methodparam><parameter
role="keyword">override_redirect</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">override_redirect</parameter> :</term>
<listitem><simpara>if <literal>True</literal> the window should be
override redirect</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_override_redirect</methodname>() method sets
the "override redirect" attribute on the window to the value specified by
<parameter>override_redirect</parameter>. If
<parameter>override_redirect</parameter> is <literal>True</literal> the
window is not under the control of the window manager. This means it won't
have a titlebar, won't be minimizable, etc. - it will be entirely under the
control of the application. The window manager can't see the override
redirect window at all. Override redirect should only be used for
short-lived temporary windows, such as popup menus. <link
linkend="class-gtkmenu"><classname>gtk.Menu</classname></link> uses an
override redirect window in its implementation, for example. This method
does not work on MS Windows.</para>
</refsect2>
<refsect2 id="method-gdkwindow--add-filter">
<title>gtk.gdk.Window.add_filter</title>
<programlisting><methodsynopsis language="python">
<methodname>add_filter</methodname>
<methodparam><parameter role="keyword">function</parameter></methodparam>
<methodparam><parameter role="keyword">data</parameter><initializer>None</initializer></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">function</parameter> :</term>
<listitem><simpara>a function</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">data</parameter> :</term>
<listitem><simpara>data to pass to
<parameter>function</parameter></simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.2 and above.</para>
</note>
<para>The <methodname>add_filter</methodname>() method adds an event
filter function specified by <parameter>function</parameter> to the window,
allowing you to intercept events before they reach GDK. This is a low-level
operation and makes it easy to break GDK and/or GTK+, so you have to know
what you're doing. Once added there is no way to remove a filter
function. The function signature is:</para>
<programlisting>
def function(<parameter>event</parameter>, <parameter>user_data</parameter>)
</programlisting>
<para>where <parameter>event</parameter> is a <link
linkend="class-gdkevent"><classname>gtk.gdk.Event</classname></link> and
<parameter>user_data</parameter> is <parameter>data</parameter>. If
<parameter>data</parameter> is not specified then
<parameter>user_data</parameter> is not passed to
<parameter>function</parameter>.</para>
<para><parameter>function</parameter> should return one of the
following values which is on of the <xref
linkend="gdk-filter-return-constants"
endterm="gdk-filter-return-constants-title"></xref>.</para>
</refsect2>
<!-- NOT IMPLEMENTED
<refsect2 id="method-gdkwindow- -remove-filter">
<title>gtk.gdk.Window.remove_filter</title>
<programlisting><methodsynopsis language="python">
<methodname>remove_filter</methodname>
<methodparam><parameter role="keyword">function</parameter></methodparam>
<methodparam><parameter role="keyword">data</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">function</parameter> :</term>
<listitem><simpara>previously-added filter function</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">data</parameter> :</term>
<listitem><simpara>user data for previously-added filter function</simpara></listitem>
</varlistentry>
</variablelist>
<para>
Remove a filter previously added with <link linkend="method-gdkwindow- -add-filter"><function>gtk.gdk.Window.add_filter()</function></link>.
</para> </refsect2>
END NOT IMPLEMENTED -->
<refsect2 id="method-gdkwindow--scroll">
<title>gtk.gdk.Window.scroll</title>
<programlisting><methodsynopsis language="python">
<methodname>scroll</methodname>
<methodparam><parameter
role="keyword">dx</parameter></methodparam>
<methodparam><parameter
role="keyword">dy</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">dx</parameter> :</term>
<listitem><simpara>the amount to scroll in the X
direction</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">dy</parameter> :</term>
<listitem><simpara>the amount to scroll in the Y
direction</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>scroll</methodname>() method scrolls the
contents of the window, both pixels and children, by the horizontal and
vertical amounts specified by <parameter>dx</parameter> and
<parameter>dy</parameter> respectively. The window itself does not move.
Portions of the window that the scroll operation brings in from off-screen
areas are invalidated. The invalidated region may be bigger than what would
strictly be necessary. (For X11, a minimum area will be invalidated if the
window has no subwindows, or if the edges of the window's parent do not
extend beyond the edges of the window. In other cases, a multi-step process
is used to scroll the window which may produce temporary visual artifacts
and unnecessary invalidations.)</para>
</refsect2>
<refsect2 id="method-gdkwindow--shape-combine-mask">
<title>gtk.gdk.Window.shape_combine_mask</title>
<programlisting><methodsynopsis language="python">
<methodname>shape_combine_mask</methodname>
<methodparam><parameter
role="keyword">shape_mask</parameter></methodparam>
<methodparam><parameter
role="keyword">offset_x</parameter></methodparam>
<methodparam><parameter
role="keyword">offset_y</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">shape_mask</parameter> :</term>
<listitem><simpara>the shape bitmap mask</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">offset_x</parameter> :</term>
<listitem><simpara>the X position of shape mask with respect to
the window</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">offset_y</parameter> :</term>
<listitem><simpara>the Y position of shape mask with respect to
the window</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>shape_combine_mask</methodname>() method applies
the bitmap mask specified by <parameter>shape_mask</parameter> to the window
at the location specified by <parameter>x</parameter> and
<parameter>y</parameter>. Pixels in the window corresponding to set bits in
the <parameter>shape_mask</parameter> will be visible; pixels in the window
corresponding to unset bits in the <parameter>shape_mask</parameter> will be
transparent. This method provides a non-rectangular window. If
<parameter>shape_mask</parameter> is <literal>None</literal>, the shape mask
will be unset, and the <parameter>x</parameter>/<parameter>y</parameter>
parameters are not used.</para>
<para>On the X11 platform, this uses an X server extension which is
widely available on most common platforms, but not available on very old X
servers, and occasionally the implementation will be buggy. On servers
without the shape extension, this function will do nothing.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-child-shapes">
<title>gtk.gdk.Window.set_child_shapes</title>
<programlisting><methodsynopsis language="python">
<methodname>set_child_shapes</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>set_child_shapes</methodname>() method sets the
shape mask of the window to the union of shape masks for all children of the
window, ignoring the shape mask of the window itself. Contrast this method
with the <link
linkend="method-gdkwindow--merge-child-shapes"><methodname>merge_child_shapes</methodname>()</link>
method that includes the shape mask of the window in the masks to be
merged.</para>
</refsect2>
<refsect2 id="method-gdkwindow--merge-child-shapes">
<title>gtk.gdk.Window.merge_child_shapes</title>
<programlisting><methodsynopsis language="python">
<methodname>merge_child_shapes</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>merge_child_shapes</methodname>() method merges
the shape masks for any child windows into the shape mask for the window.
i.e. the union of all masks for the window and its children will become the
new mask for the window. See the <link
linkend="method-gdkwindow--shape-combine-mask"><methodname>shape_combine_mask</methodname>()</link>
method. This method is distinct from the <link
linkend="method-gdkwindow--set-child-shapes"><methodname>set_child_shapes</methodname>()</link>
method because it includes the window's shape mask in the set of shapes to
be merged.</para>
</refsect2>
<refsect2 id="method-gdkwindow--is-visible">
<title>gtk.gdk.Window.is_visible</title>
<programlisting><methodsynopsis language="python">
<methodname>is_visible</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if the window is
mapped</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>is_visible</methodname>() method returns
<literal>True</literal> if the window has been mapped (with the <link
linkend="method-gdkwindow--show"><methodname>show</methodname>()</link>
method.</para>
</refsect2>
<refsect2 id="method-gdkwindow--is-viewable">
<title>gtk.gdk.Window.is_viewable</title>
<programlisting><methodsynopsis language="python">
<methodname>is_viewable</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if the window is
viewable</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>is_viewable</methodname>() method returns
<literal>True</literal> if the window and all its ancestors are mapped.
(This is not necessarily "viewable" in the X sense, since we only check as
far as we have <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
parents, not to the root window.)</para>
</refsect2>
<refsect2 id="method-gdkwindow--get-state">
<title>gtk.gdk.Window.get_state</title>
<programlisting><methodsynopsis language="python">
<methodname>get_state</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the window state bitfield</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>get_state</methodname>() method returns the
bitwise <literal>OR</literal> of the currently active <xref
linkend="gdk-window-state-constants"
endterm="gdk-window-state-constants-title"></xref>.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-static-gravities">
<title>gtk.gdk.Window.set_static_gravities</title>
<programlisting><methodsynopsis language="python">
<methodname>set_static_gravities</methodname>
<methodparam><parameter
role="keyword">use_static</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">use_static</parameter> :</term>
<listitem><simpara>if <literal>True</literal> turn on static
gravity</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if the server supports
static gravity</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_static_gravities</methodname>() method sets
the bit gravity of the given window to the value specified by
<parameter>use_static</parameter>. If <parameter>use_static</parameter> is
<literal>True</literal> the window uses static gravity and all children get
static subwindow gravity as well. This method returns
<literal>True</literal> if the window system server supports static
gravity.</para>
</refsect2>
<refsect2 id="method-gdkwindow--get-type-hint">
<title>gtk.gdk.Window.get_type_hint</title>
<programlisting><methodsynopsis language="python">
<methodname>get_type_hint</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>The type hint set for window.</simpara></listitem>
</varlistentry>
</variablelist>
<para>
The <methodname>get_type_hint</methodname>() method returns the
type hint set for a window.
</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-type-hint">
<title>gtk.gdk.Window.set_type_hint</title>
<programlisting><methodsynopsis language="python">
<methodname>set_type_hint</methodname>
<methodparam><parameter
role="keyword">hint</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">hint</parameter> :</term>
<listitem><simpara>a hint of the function this window will
have</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_type_hint</methodname>() method provides the
specified <parameter>hint</parameter> to the window manager about the
functionality of a window. The window manager can use this information when
determining the decoration and behavior of the window. The hint must be set
before the window is mapped. The value of hint must be one of the <xref
linkend="gdk-window-type-hint-constants"
endterm="gdk-window-type-hint-constants-title"></xref>.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-modal-hint">
<title>gtk.gdk.Window.set_modal_hint</title>
<programlisting><methodsynopsis language="python">
<methodname>set_modal_hint</methodname>
<methodparam><parameter
role="keyword">modal</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">modal</parameter> :</term>
<listitem><simpara>if <literal>True</literal> the window is
modal.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_modal_hint</methodname>() method sets the
window's modal hint to the value specified by <parameter>modal</parameter>.
If <parameter>modal</parameter> is <literal>True</literal> the window is
modal. The window manager can use this information to handle modal windows
in a special way which usually means that the window gets all the input for
the application effectively blocking input to other windows in the
application. . You should only use this on windows for which you have
previously called the <link
linkend="method-gdkwindow--set-transient-for"><methodname>set_transient_for</methodname>()</link>
method</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-skip-taskbar-hint">
<title>gtk.gdk.Window.set_skip_taskbar_hint</title>
<programlisting><methodsynopsis language="python">
<methodname>set_skip_taskbar_hint</methodname>
<methodparam><parameter role="keyword">modal</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">skip_taskbar</parameter> :</term>
<listitem><simpara>if <literal>True</literal> skip the
taskbar.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.2 and above.</para>
</note>
<para>The <methodname>set_skip_taskbar_hint</methodname>() method sets
the "skip_taskbar" setting to the value specified by
<parameter>skips_taskbar</parameter>. If
<parameter>skips_taskbar</parameter> is <literal>True</literal> the window
should <emphasis role="bold">not</emphasis> appear in a task list or window
list. If the window's semantic type as specified with the <link
linkend="method-gdkwindow--set-type-hint"><methodname>set_type_hint()</methodname></link>
method already fully describes the window, this method should <emphasis
role="bold">not</emphasis> be called in addition; instead you should allow
the window to be treated according to standard policy for its semantic
type.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-skip-pager-hint">
<title>gtk.gdk.Window.set_skip_pager_hint</title>
<programlisting><methodsynopsis language="python">
<methodname>set_skip_pager_hint</methodname>
<methodparam><parameter role="keyword">skips_pager</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">skips_pager</parameter> :</term>
<listitem><simpara>if <literal>True</literal> skip the pager</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.2 and above.</para>
</note>
<para>The <methodname>set_skip_pager_hint</methodname>() method sets
the "skip_pager" setting to the value of skips_pager. If skips_pager is True
the window should <emphasis role="bold">not</emphasis> appear in a pager (a
workspace switcher, or other desktop utility program that displays a small
thumbnail representation of the windows on the desktop). If the window's
semantic type as specified with <link
linkend="method-gdkwindow--set-type-hint"><methodname>set_type_hint()</methodname></link>
already fully describes the window, this method should <emphasis
role="bold">not</emphasis> be called in addition, instead you should allow
the window to be treated according to standard policy for its semantic
type.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-geometry-hints">
<title>gtk.gdk.Window.set_geometry_hints</title>
<programlisting><methodsynopsis language="python">
<methodname>set_geometry_hints</methodname>
<methodparam><parameter role="keyword">min_width</parameter><initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">min_height</parameter><initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">max_width</parameter><initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">max_height</parameter><initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">base_width</parameter><initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">base_height</parameter><initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">width_inc</parameter><initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">height_inc</parameter><initializer>-1</initializer></methodparam>
<methodparam><parameter role="keyword">min_aspect</parameter><initializer>-1.0</initializer></methodparam>
<methodparam><parameter role="keyword">max_aspect</parameter><initializer>-1.0</initializer></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">min_width</parameter> :</term>
<listitem><simpara>minimum width of window or -1 to use
requisition</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">min_height</parameter> :</term>
<listitem><simpara>minimum height of window or -1 to use
requisition</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">max_width</parameter> :</term>
<listitem><simpara>maximum width of window or -1 to use
requisition</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">max_height</parameter> :</term>
<listitem><simpara>maximum height of window or -1 to use
requisition</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">base_width</parameter> :</term>
<listitem><simpara>allowed window widths are
base_width + width_inc * N (where N is any integer) or
-1</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">base_height</parameter> :</term>
<listitem><simpara>allowed window widths are
base_height + height_inc * N (where N is any integer) or
-1</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">width_inc</parameter> :</term>
<listitem><simpara>width resize increment</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">height_inc</parameter> :</term>
<listitem><simpara>height resize increment</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">min_aspect</parameter> :</term>
<listitem><simpara>minimum width/height ratio</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">max_aspect</parameter> :</term>
<listitem><simpara>maximum width/height ratio</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.2 and above.</para>
</note>
<para>The <methodname>set_geometry_hints</methodname>() method sets
the geometry hints for the window.</para>
<para>This method provides hints to the windowing system about
acceptable sizes for a toplevel window. The purpose of this is to constrain
user resizing, but the windowing system will typically (but is not required
to) also constrain the current size of the window to the provided values and
constrain programmatic resizing via gdk_window_resize() or
gdk_window_move_resize().</para>
<para>Note that on X11, this effect has no effect on windows of type
GDK_WINDOW_TEMP or windows where override_redirect has been turned on via
the <link
linkend="method-gdkwindow--set-override-redirect"><methodname>set_override_redirect</methodname>()</link>
method since these windows are not resizable by the user.</para>
<!-- <para>Since you can't count on the windowing system doing the
constraints for programmatic resizes, you should generally call the <link
linkend="function-gdk- -window-constrain-size"><function>gtk.gdk.window_constrain_size</function>()</link>
function yourself to determine appropriate sizes.</para>-->
</refsect2>
<refsect2 id="method-gdkwindow--begin-paint-rect">
<title>gtk.gdk.Window.begin_paint_rect</title>
<programlisting><methodsynopsis language="python">
<methodname>begin_paint_rect</methodname>
<methodparam><parameter
role="keyword">rectangle</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">rectangle</parameter> :</term>
<listitem><simpara>the rectangle you intend to draw
to</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>begin_paint_rect</methodname>() method indicates
that you are beginning the process of redrawing the area specified by
<parameter>rectangle</parameter>. A backing store (off-screen buffer) large
enough to contain <parameter>rectangle</parameter> will be created. The
backing store will be initialized with the background color or background
pixmap for window. Then, all drawing operations performed on the window will
be diverted to the backing store. When you call the <link
linkend="method-gdkwindow--end-paint"><methodname>end_paint</methodname>()</link>
method, the backing store will be copied to the window, making it visible
on-screen. Only the part of window contained in region will be modified; that
is, drawing operations are clipped to <parameter>rectangle</parameter>. The
net result of all this is to remove flicker, because the user sees the
finished product appear all at once when you call the <link
linkend="method-gdkwindow--end-paint"><methodname>end_paint</methodname>()</link>
method. If you draw to window directly without calling the
<methodname>begin_paint_rect</methodname>() method, the user may see flicker
as individual drawing operations are performed in sequence. The clipping and
background initializing features of the
<methodname>begin_paint_rect</methodname>() are conveniences for the
programmer, so you can avoid doing that work yourself.</para>
</refsect2>
<refsect2 id="method-gdkwindow--begin-paint-region">
<title>gtk.gdk.Window.begin_paint_region</title>
<programlisting><methodsynopsis language="python">
<methodname>begin_paint_region</methodname>
<methodparam><parameter role="keyword">region</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">region</parameter> :</term>
<listitem><simpara>the region you intend to draw to</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>begin_paint_region</methodname>() method
indicates that you are beginning the process of redrawing the <link
linkend="class-gdkregion"><classname>gtk.gdk.Region</classname></link>
specified by <parameter>region</parameter>. A backing store
(off-screen buffer) large enough to contain
<parameter>region</parameter> will be created. The backing store will
be initialized with the background color or background pixmap for the
window. Then, all drawing operations performed on the window will be
diverted to the backing store. When you call the <link
linkend="method-gdkwindow--end-paint"><methodname>end_paint</methodname>()</link>
method, the backing store will be copied to the window, making it
visible on-screen. Only the part of the window contained in
<parameter>region</parameter> will be modified; that is, drawing
operations are clipped to <parameter>region</parameter>.</para>
<para>The net result of all this is to remove flicker, because the
user sees the finished product appear all at once when you call the
<link
linkend="method-gdkwindow--end-paint"><methodname>end_paint</methodname>()</link>
method. If you draw to the window directly without calling the <link
linkend="method-gdkwindow--begin-paint-region"><methodname>begin_paint_region</methodname>()</link>
method, the user may see flicker as individual drawing operations are
performed in sequence. The clipping and background initializing
features of the <link
linkend="method-gdkwindow--begin-paint-region"><methodname>begin_paint_region</methodname>()</link>
method are conveniences for the programmer, so you can avoid doing
that work yourself.</para>
<para>The widget system automatically places calls to the <link
linkend="method-gdkwindow--begin-paint-region"><methodname>begin_paint_region</methodname>()</link>
and <link
linkend="method-gdkwindow--end-paint"><methodname>end_paint</methodname>()</link>
methods around emissions of the "expose_event" signal. That is, if
you're writing an expose event handler, you can assume that the
exposed area in a gtk.gdk.EXPOSE type <link
linkend="class-gdkevent"><classname>gtk.gdk.Event</classname></link>
has already been cleared to the window background, is already set as
the clip region, and already has a backing store. Therefore in most
cases, application code need not call the <link
linkend="method-gdkwindow--begin-paint-region"><methodname>begin_paint_region</methodname>()</link>
method. (You can disable the automatic calls around expose events on a
widget-by-widget basis by calling <link
linkend="method-gtkwidget--set-double-buffered"><methodname>gtk.Widget.set_double_buffered</methodname>()</link>.)</para>
<para>If you call this method multiple times before calling the
matching the <link
linkend="method-gdkwindow--end-paint"><methodname>end_paint</methodname>()</link>
method, the backing stores are pushed onto a stack. The <link
linkend="method-gdkwindow--end-paint"><methodname>end_paint</methodname>()</link>
method copies the topmost backing store on-screen, subtracts the
topmost region from all other regions in the stack, and pops the
stack. All drawing operations affect only the topmost backing store in
the stack. One matching call to the <link
linkend="method-gdkwindow--end-paint"><methodname>end_paint</methodname>()</link>
method is required for each call to the <link
linkend="method-gdkwindow--begin-paint-region"><methodname>begin_paint_region</methodname>()</link>
method.</para>
</refsect2>
<refsect2 id="method-gdkwindow--end-paint">
<title>gtk.gdk.Window.end_paint</title>
<programlisting><methodsynopsis language="python">
<methodname>end_paint</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>end_paint</methodname>() method indicates that
the backing store created by the most recent call to the <link
linkend="method-gdkwindow--begin-paint-rect"><methodname>begin_paint_rect</methodname>()</link>
method should be copied on-screen and deleted, leaving the next-most-recent
backing store or no backing store at all as the active paint region. It is
an error to call this function without a matching call to the <link
linkend="method-gdkwindow--begin-paint-rect"><methodname>begin_paint_rect</methodname>()</link>
method first.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-title">
<title>gtk.gdk.Window.set_title</title>
<programlisting><methodsynopsis language="python">
<methodname>set_title</methodname>
<methodparam><parameter
role="keyword">title</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">title</parameter> :</term>
<listitem><simpara>the new title of the
window</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_title</methodname>() method sets the title
of a toplevel window, to the string specified by
<parameter>title</parameter>. If you haven't explicitly set the icon name
for the window (using the <link
linkend="method-gdkwindow--set-icon-name"><methodname>set_icon_name</methodname>()</link>
method), the icon name will be set to <parameter>title</parameter> as well.
<parameter>title</parameter> must be in UTF-8 encoding (as with all
user-readable strings in <literal>PyGTK</literal>).</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-role">
<title>gtk.gdk.Window.set_role</title>
<programlisting><methodsynopsis language="python">
<methodname>set_role</methodname>
<methodparam><parameter
role="keyword">role</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">role</parameter> :</term>
<listitem><simpara>a string indicating its
role</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_role</methodname>() method sets the string
specified by <parameter>role</parameter> as the window's role. When using
<literal>PyGTK</literal>, you should generally use the <link
linkend="method-gtkwindow--set-role"><methodname>gtk.Window.set_role</methodname>()</link>
method instead of this low-level function. The window manager and session
manager use a window's role to distinguish it from other kinds of window in
the same application. When an application is restarted after being saved in
a previous session, all windows with the same title and role are treated as
interchangeable. So if you have two windows with the same title that should
be distinguished for session management purposes, you should set the role on
those windows. It doesn't matter what string you use for the role, as long
as you have a different role for each non-interchangeable kind of
window.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-transient-for">
<title>gtk.gdk.Window.set_transient_for</title>
<programlisting><methodsynopsis language="python">
<methodname>set_transient_for</methodname>
<methodparam><parameter
role="keyword">leader</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">leader</parameter> :</term>
<listitem><simpara>another <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link></simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_transient_for</methodname>() method
indicates to the window manager that the window is a transient dialog
associated with the application window <parameter>leader</parameter>. This
allows the window manager to do things like center the window on
<parameter>leader</parameter> and keep the window above
<parameter>leader</parameter>. See the <link
linkend="method-gtkwindow--set-transient-for"><methodname>gtk.Window.set_transient_for</methodname>()</link>
method if you're using a <link
linkend="class-gtkwindow"><classname>gtk.Window</classname></link> or <link
linkend="class-gtkdialog"><classname>gtk.Dialog</classname></link>.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-background">
<title>gtk.gdk.Window.set_background</title>
<programlisting><methodsynopsis language="python">
<methodname>set_background</methodname>
<methodparam><parameter
role="keyword">color</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">color</parameter> :</term>
<listitem><simpara>an allocated <link
linkend="class-gdkcolor"><classname>gtk.gdk.Color</classname></link></simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_background</methodname>() method sets the
background <link
linkend="class-gdkcolor"><classname>gtk.gdk.Color</classname></link> of the
window to the value specified by <parameter>color</parameter>. (However,
when using <literal>PyGTK</literal>, set the background of a widget with the
<link
linkend="method-gtkwidget--modify-bg"><methodname>gtk.Widget.modify_bg</methodname>()</link>
method from an application - or the <link
linkend="method-gtkstyle--set-background"><methodname>gtk.Style.set_background</methodname>()</link>
method from a custom widget implementation.) The
<parameter>color</parameter> must be allocated Also see the <link
linkend="method-gdkwindow--set-back-pixmap"><methodname>set_back_pixmap</methodname>()</link>
method.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-back-pixmap">
<title>gtk.gdk.Window.set_back_pixmap</title>
<programlisting><methodsynopsis language="python">
<methodname>set_back_pixmap</methodname>
<methodparam><parameter
role="keyword">pixmap</parameter></methodparam>
<methodparam><parameter
role="keyword">parent_relative</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">pixmap</parameter> :</term>
<listitem><simpara>a <link
linkend="class-gdkpixmap"><classname>gtk.gdk.Pixmap</classname></link>, or
<literal>None</literal></simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">parent_relative</parameter> :</term>
<listitem><simpara>if <literal>True</literal> the tiling origin is
at the origin of the window's parent</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_back_pixmap</methodname>() method sets the
background pixmap of the window to the value specified by
<parameter>pixmap</parameter> A background pixmap will be tiled, positioning
the first tile at the origin of the window, or if
<parameter>parent_relative</parameter> is <literal>True</literal>, the
tiling will be done based on the origin of the parent window (useful to
align tiles in a parent with tiles in a child). If
<parameter>pixmap</parameter> is <literal>None</literal> the window will
have no background which means it will never have its background filled by
the windowing system. Instead the window will contain whatever pixels were
already in the corresponding area of the display. The windowing system will
normally fill a window with its background when the window is obscured then
exposed, and when you call the <link
linkend="method-gdkwindow--clear"><methodname>clear</methodname>()</link>
method.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-cursor">
<title>gtk.gdk.Window.set_cursor</title>
<programlisting><methodsynopsis language="python">
<methodname>set_cursor</methodname>
<methodparam><parameter
role="keyword">cursor</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">cursor</parameter> :</term>
<listitem><simpara>a <link
linkend="class-gdkcursor"><classname>gtk.gdk.Cursor</classname></link> or
<literal>None</literal></simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_cursor</methodname>() method sets the mouse
pointer for a <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>. Use
either the <link linkend="constructor-gdkcursor1">gtk.gdk.Cursor()</link> or
<link linkend="constructor-gdkcursor2">gtk.gdk.Cursor</link>() constructors
to create the cursor. To make the cursor invisible, use the <link
linkend="constructor-gdkcursor2">gtk.gdk.Cursor</link>() constructor to
create a cursor with no pixels in it. Passing <literal>None</literal> for
the <parameter>cursor</parameter> argument to the
<methodname>set_cursor</methodname>() method means that the window will use
the cursor of its parent window. Most windows should use this
default.</para>
</refsect2>
<refsect2 id="method-gdkwindow--get-geometry">
<title>gtk.gdk.Window.get_geometry</title>
<programlisting><methodsynopsis language="python">
<methodname>get_geometry</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a 5-tuple containing the X and Y coordinate of
the location of the window relative to its parent and the width and height
of the window and the bit depth of the window.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>get_geometry</methodname>() method returns a
5-tuple containing the window's location and size (x, y, width, height) and
the bit depth of the window. The X and Y coordinates returned are relative
to the parent window of the window, which for toplevels usually means
relative to the window decorations (titlebar, etc.) rather than relative to
the root window (screen-size background window).
</para>
<para>
On the X11 platform, the geometry is obtained from the X server, so reflects
the latest position of the window; this may be out-of-sync with the position
of the window delivered in the most-recently-processed
<literal>GdkEventConfigure</literal>. the <link
linkend="method-gdkwindow--get-position"><methodname>get_position</methodname>()</link>
method in contrast gets the position from the most recent configure
event.</para>
</refsect2>
<refsect2 id="method-gdkwindow--get-position">
<title>gtk.gdk.Window.get_position</title>
<programlisting><methodsynopsis language="python">
<methodname>get_position</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a 2-tuple containing the X and Y coordinates of
the window location.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>get_position</methodname>() returns a 2-tuple
containing the position of the window as reported in the
most-recently-processed <literal>GdkEventConfigure</literal>. By comparison
with the <link
linkend="method-gdkwindow--get-geometry"><methodname>get_geometry</methodname>()</link>
method that queries the X server for the current window position, regardless
of what events have been received or processed. The position coordinates are
relative to the window's parent window.</para>
</refsect2>
<refsect2 id="method-gdkwindow--get-origin">
<title>gtk.gdk.Window.get_origin</title>
<programlisting><methodsynopsis language="python">
<methodname>get_origin</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a 2-tuple containing the X and Y coordinates of
the window</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>get_origin</methodname>() method returns a
2-tuple containing the x and y coordinates of the position of a window in
root window coordinates. (Compare this method with the <link
linkend="method-gdkwindow--get-position"><methodname>get_position</methodname>()</link>
and <link
linkend="method-gdkwindow--get-geometry"><methodname>get_geometry</methodname>()</link>
methods that return the position of a window relative to its parent
window.)</para>
</refsect2>
<refsect2 id="method-gdkwindow--get-root-origin">
<title>gtk.gdk.Window.get_root_origin</title>
<programlisting><methodsynopsis language="python">
<methodname>get_root_origin</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a 2-tuple containing the X and Y coordinates of
the window frame position</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>get_root_origin</methodname>() method returns a
2-tuple containing the top-left corner of the window manager frame in root
window coordinates.</para>
</refsect2>
<refsect2 id="method-gdkwindow--get-frame-extents">
<title>gtk.gdk.Window.get_frame_extents</title>
<programlisting><methodsynopsis language="python">
<methodname>get_frame_extents</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a <link
linkend="class-gdkrectangle"><classname>gtk.gdk.Rectangle</classname></link>
specifying the bounding box of the window frame</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>get_frame_extents</methodname>() method returns
a <link
linkend="class-gdkrectangle"><classname>gtk.gdk.Rectangle</classname></link>
specifying the bounding box of the window, including window manager
titlebar/borders if any. The frame position is given in root window
coordinates. To get the position of the window itself (rather than the
frame) in root window coordinates, use the <link
linkend="method-gdkwindow--get-origin"><methodname>get_origin</methodname>()</link>
method.</para>
</refsect2>
<refsect2 id="method-gdkwindow--get-pointer">
<title>gtk.gdk.Window.get_pointer</title>
<programlisting><methodsynopsis language="python">
<methodname>get_pointer</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a 3-tuple containing the X and Y coordinates of
the mouse pointer and the modifier mask</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>get_pointer</methodname>() method returns a
3-tuple containing the coordinates of the mouse pointer location relative to
the window and the modifier state. The modifier state is a combination of
the <xref linkend="gdk-modifier-constants"
endterm="gdk-modifier-constants-title"></xref>.</para>
</refsect2>
<refsect2 id="method-gdkwindow--get-parent">
<title>gtk.gdk.Window.get_parent</title>
<programlisting><methodsynopsis language="python">
<methodname>get_parent</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the parent <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> of
the window</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>get_parent</methodname>() method returns the
parent of the window as set when the <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> was
created or when the <link
linkend="method-gdkwindow--reparent"><methodname>reparent</methodname>()</link>
method was called.</para>
</refsect2>
<refsect2 id="method-gdkwindow--get-toplevel">
<title>gtk.gdk.Window.get_toplevel</title>
<programlisting><methodsynopsis language="python">
<methodname>get_toplevel</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the toplevel <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
containing the window</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>get_toplevel</methodname>() method returns the
toplevel <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
that's an ancestor of the window.</para>
</refsect2>
<refsect2 id="method-gdkwindow--get-children">
<title>gtk.gdk.Window.get_children</title>
<programlisting><methodsynopsis language="python">
<methodname>get_children</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the list of child windows inside the
window</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>get_children</methodname>() method returns the
list of children <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
objects of the window. This method only returns children created via
<literal>PyGTK</literal>, so for example it's useless when used with the
root window; it only returns windows an application created itself.</para>
</refsect2>
<refsect2 id="method-gdkwindow--get-events">
<title>gtk.gdk.Window.get_events</title>
<programlisting><methodsynopsis language="python">
<methodname>get_events</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the event mask for the
window</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>get_events</methodname>() method returns the
event mask for the window. See the <link
linkend="method-gdkwindow--set-events"><methodname>set_events</methodname>()</link>
method for more detail.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-events">
<title>gtk.gdk.Window.set_events</title>
<programlisting><methodsynopsis language="python">
<methodname>set_events</methodname>
<methodparam><parameter
role="keyword">event_mask</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">event_mask</parameter> :</term>
<listitem><simpara>the event mask for the
window</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_events</methodname>() method sets the event
mask to the value specified by event_mask for the window. The event mask
determines which events will be reported for the window. For example, an
event mask including <literal>gtk.gdk.BUTTON_PRESS_MASK</literal> means the
window should report button press events. The event mask is the bitwise OR
of the <xref linkend="gdk-event-mask-constants"
endterm="gdk-event-mask-constants-title"></xref>.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-icon-list">
<title>gtk.gdk.Window.set_icon_list</title>
<programlisting><methodsynopsis language="python">
<methodname>set_icon_list</methodname>
<methodparam><parameter role="keyword">pixbufs</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">pixbufs</parameter> :</term>
<listitem><simpara>a list (or tuple) containing pixbufs, of
different sizes.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.2 and above.</para>
</note>
<para>The <methodname>set_icon_list</methodname>() method sets the
list of icons for the window. pixbufs is a list or tuple containing <link
linkend="class-gdkpixbuf"><classname>gtk.gdk.Pixbuf</classname></link>
objects to be used as the icon images. One of these will be used to
represent the window when it has been iconified. The icon is usually shown
in an icon box or some sort of task bar. Which icon size is shown depends on
the window manager. The window manager can scale the icon but setting
several size icons can give better image quality since the window manager
may only need to scale the icon by a small amount or not at all.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-icon">
<title>gtk.gdk.Window.set_icon</title>
<programlisting><methodsynopsis language="python">
<methodname>set_icon</methodname>
<methodparam><parameter
role="keyword">icon_window</parameter></methodparam>
<methodparam><parameter
role="keyword">pixmap</parameter></methodparam>
<methodparam><parameter
role="keyword">mask</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">icon_window</parameter> :</term>
<listitem><simpara>a <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> to
use for the icon</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">pixmap</parameter> :</term>
<listitem><simpara>a <link
linkend="class-gdkpixmap"><classname>gtk.gdk.Pixmap</classname></link> to
use as the icon</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">mask</parameter> :</term>
<listitem><simpara>a 1-bit pixmap (<literal>GdkBitmap</literal>)
to use as mask for <parameter>pixmap</parameter></simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_icon</methodname>() method sets the icon of
the window as a <link
linkend="class-gdkpixmap"><classname>gtk.gdk.Pixmap</classname></link>
(specified by <parameter>pixmap</parameter>) or <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
specified by <parameter>icon_window</parameter>). Investigate the <link
linkend="function-gtk--window-set-default-icon-list"><methodname>gtk.window_set_default_icon_list()</methodname>()</link>
function first, and then the <link
linkend="method-gtkwindow--set-icon-list"><methodname>gtk.Window.set_icon_list</methodname>()</link>
and <link
linkend="method-gtkwindow--set-icon"><methodname>gtk.Window.set_icon</methodname>()</link>
methods. If those don't meet your needs, look at the <link
linkend="method-gdkwindow--set-icon-list"><methodname>set_icon_list</methodname>()</link>
method. Only if all those are too high-level do you want to fall back to the
<link
linkend="method-gdkwindow--set-icon"><methodname>set_icon</methodname>()</link>.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-icon-name">
<title>gtk.gdk.Window.set_icon_name</title>
<programlisting><methodsynopsis language="python">
<methodname>set_icon_name</methodname>
<methodparam><parameter
role="keyword">name</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">name</parameter> :</term>
<listitem><simpara>the name of the window while iconified
(minimized)</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_icon_name</methodname>() method sets the
name of the window when it is iconified to the value of
<parameter>name</parameter>. Windows may have a name used while minimized,
distinct from the name they display in their titlebar. Most of the time this
is a bad idea from a user interface standpoint. But you can set such a name
with this method, if you like.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-group">
<title>gtk.gdk.Window.set_group</title>
<programlisting><methodsynopsis language="python">
<methodname>set_group</methodname>
<methodparam><parameter
role="keyword">leader</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">leader</parameter> :</term>
<listitem><simpara>the group leader <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link></simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_group</methodname>() method sets the group
leader for the window to the <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
specified by <parameter>leader</parameter>. By default, the group leader
for all toplevel windows is set to a global window implicitly created by
<literal>PyGTK</literal>. With this method you can override this default.
The group leader window allows the window manager to distinguish all windows
that belong to a single application. It may for example allow users to
minimize or unminimize all windows belonging to an application at once. You
should only set a non-default group window if your application pretends to
be multiple applications. The group leader window may not be changed after a
window has been mapped (with the <link
linkend="method-gdkwindow--show"><methodname>show</methodname>()</link>
method for example).</para>
</refsect2>
<refsect2 id="method-gdkwindow--get-group">
<title>gtk.gdk.Window.get_group</title>
<programlisting><methodsynopsis language="python">
<methodname>get_group</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the group leader <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
for the window</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.4 and above.</para>
</note>
<para>The <methodname>get_group</methodname>() method returns the
group leader <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> for
the window. See the <link
linkend="method-gdkwindow--set-group"><methodname>set_group()</methodname></link>
method for more information.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-decorations">
<title>gtk.gdk.Window.set_decorations</title>
<programlisting><methodsynopsis language="python">
<methodname>set_decorations</methodname>
<methodparam><parameter
role="keyword">decorations</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">decorations</parameter> :</term>
<listitem><simpara>the decoration hint mask</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_decorations</methodname>() method sets the
specified decorations for the window. "Decorations" are the features the
window manager adds to a toplevel <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>. This
method sets the traditional Motif window manager hints that tell the window
manager which decorations you would like your window to have. Usually you
should use the <link
linkend="method-gtkwindow--set-decorated"><methodname>gtk.Window.set_decorated</methodname>()</link>
method on a <link
linkend="class-gtkwindow"><classname>gtk.Window</classname></link> instead
of using this method directly. The value of
<parameter>decorations</parameter> is the logical OR of the <xref
linkend="gdk-wm-decoration-constants"
endterm="gdk-wm-decoration-constants-title"></xref>.</para>
</refsect2>
<refsect2 id="method-gdkwindow--get-decorations">
<title>gtk.gdk.Window.get_decorations</title>
<programlisting><methodsynopsis language="python">
<methodname>get_decorations</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the window decorations</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>get_decorations</methodname>() method returns
the decorations set on the window with the <link
linkend="method-gdkwindow--set-decorations"><methodname>set_decorations</methodname></link>
method.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-functions">
<title>gtk.gdk.Window.set_functions</title>
<programlisting><methodsynopsis language="python">
<methodname>set_functions</methodname>
<methodparam><parameter
role="keyword">functions</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">functions</parameter> :</term>
<listitem><simpara>the bitmask of operations to allow on the
window</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>set_functions</methodname>() method sets the
traditional Motif window manager hint for which operations the window
manager should allow on a toplevel window. However, few window managers do
anything reliable or interesting with this hint. Many ignore it
entirely. The <parameter>functions</parameter> argument is the logical OR of
the <xref linkend="gdk-wm-function-constants"
endterm="gdk-wm-function-constants-title"></xref>.</para>
</refsect2>
<refsect2 id="method-gdkwindow--iconify">
<title>gtk.gdk.Window.iconify</title>
<programlisting><methodsynopsis language="python">
<methodname>iconify</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>iconify</methodname>() method asks the window
manager to iconify (minimize) the window. The window manager may choose to
ignore the request, but normally will honor it. Using the <link
linkend="method-gtkwindow--iconify"><methodname>gtk.Window.iconify</methodname>()</link>
method is preferred, if you have a <link
linkend="class-gtkwindow"><classname>gtk.Window</classname></link>
widget.</para>
</refsect2>
<refsect2 id="method-gdkwindow--deiconify">
<title>gtk.gdk.Window.deiconify</title>
<programlisting><methodsynopsis language="python">
<methodname>deiconify</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>deiconify</methodname>() method asks the window
manager to deiconify (unminimize) the window. On X11 the window manager may
choose to ignore the request to deiconify. Using the <link
linkend="method-gtkwindow--deiconify"><methodname>gtk.Window.deiconify</methodname>()</link>
method is preferred. Or better yet, use the <link
linkend="method-gtkwindow--present"><methodname>gtk.Window.present</methodname>()</link>,
which raises the window, focuses it, unminimizes it, and puts it on the
current desktop.</para>
</refsect2>
<refsect2 id="method-gdkwindow--stick">
<title>gtk.gdk.Window.stick</title>
<programlisting><methodsynopsis language="python">
<methodname>stick</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>stick</methodname>() method "pins" a window such
that it's on all workspaces and does not scroll with viewports, for window
managers that have scrollable viewports. (When using a <link
linkend="class-gtkwindow"><classname>gtk.Window</classname></link>, the
<link
linkend="method-gtkwindow--stick"><methodname>gtk.Window.stick</methodname>()</link>
method may be more useful.) On the X11 platform, this method depends on
window manager support, so may have no effect with many window managers.
However, <literal>PyGTK</literal> will do the best it can to convince the
window manager to stick the window. For window managers that don't support
this operation, there's nothing you can do to force it to happen.</para>
</refsect2>
<refsect2 id="method-gdkwindow--unstick">
<title>gtk.gdk.Window.unstick</title>
<programlisting><methodsynopsis language="python">
<methodname>unstick</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>unstick</methodname>() method reverses the
effect of the <link
linkend="method-gdkwindow--stick"><methodname>stick</methodname>()</link>
method. See the <link
linkend="method-gdkwindow--stick"><methodname>stick</methodname>()</link>
and <link
linkend="method-gtkwindow--unstick"><methodname>gtk.Window.unstick</methodname>()</link>
methods for more information.</para>
</refsect2>
<refsect2 id="method-gdkwindow--maximize">
<title>gtk.gdk.Window.maximize</title>
<programlisting><methodsynopsis language="python">
<methodname>maximize</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>maximize</methodname>() method asks the window
manager to maximize the window, if the window manager supports this
operation. Not all window managers support this, and some deliberately
ignore it or don't have a concept of "maximized"; so you can't rely on the
maximization actually happening. But it will happen with most standard
window managers. If the window was already maximized, then this method does
nothing.</para>
</refsect2>
<refsect2 id="method-gdkwindow--unmaximize">
<title>gtk.gdk.Window.unmaximize</title>
<programlisting><methodsynopsis language="python">
<methodname>unmaximize</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>unmaximize</methodname>() method asks the window
manager to unmaximize the window, if the window manager supports this
operation. Not all window managers support this, and some deliberately
ignore it or don't have a concept of "maximized"; so you can't rely on the
unmaximization actually happening. But it will happen with most standard
window managers. If the window wasn't maximized, then this method does
nothing.</para>
</refsect2>
<refsect2 id="method-gdkwindow--fullscreen">
<title>gtk.gdk.Window.fullscreen</title>
<programlisting><methodsynopsis language="python">
<methodname>fullscreen</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<note>
<para>This method is available in PyGTK 2.2 and above.</para>
</note>
<para>The <methodname>fullscreen</methodname>() method moves the window
into fullscreen mode. This means the window covers the entire screen and is
above any panels or task bars.</para>
<para>If the window was already fullscreen, then this method does
nothing.</para>
<para>On X11, asks the window manager to put the window in a
fullscreen state, if the window manager supports this operation. Not all
window managers support this, and some deliberately ignore it or don't have
a concept of "fullscreen" but most standard window managers do.</para>
</refsect2>
<refsect2 id="method-gdkwindow--unfullscreen">
<title>gtk.gdk.Window.unfullscreen</title>
<programlisting><methodsynopsis language="python">
<methodname>unfullscreen</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<note>
<para>This method is available in PyGTK 2.2 and above.</para>
</note>
<para>The <methodname>unfullscreen</methodname>() method moves the
window out of fullscreen mode. If the window was not fullscreen, does
nothing.</para>
<para>On X11, asks the window manager to move the window out of the
fullscreen state, if the window manager supports this operation. Not all
window managers support this, and some deliberately ignore it or don't have
a concept of "fullscreen" but most standard window managers do.</para>
</refsect2>
<refsect2 id="method-gdkwindow--register-dnd">
<title>gtk.gdk.Window.register_dnd</title>
<programlisting><methodsynopsis language="python">
<methodname>register_dnd</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>register_dnd</methodname>() method registers the
window as a potential drop destination.</para>
</refsect2>
<refsect2 id="method-gdkwindow--begin-resize-drag">
<title>gtk.gdk.Window.begin_resize_drag</title>
<programlisting><methodsynopsis language="python">
<methodname>begin_resize_drag</methodname>
<methodparam><parameter
role="keyword">edge</parameter></methodparam>
<methodparam><parameter
role="keyword">button</parameter></methodparam>
<methodparam><parameter
role="keyword">root_x</parameter></methodparam>
<methodparam><parameter
role="keyword">root_y</parameter></methodparam>
<methodparam><parameter
role="keyword">timestamp</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">edge</parameter> :</term>
<listitem><simpara>the edge or corner from which the drag is
started</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">button</parameter> :</term>
<listitem><simpara>the mouse button being used to
drag</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">root_x</parameter> :</term>
<listitem><simpara>the root window X coordinate of the mouse click
that began the drag</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">root_y</parameter> :</term>
<listitem><simpara>the root window Y coordinate of the mouse click
that began the drag</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">timestamp</parameter> :</term>
<listitem><simpara>the timestamp of the mouse click that began the
drag (use the <link
linkend="method-gdkevent--get-time"><methodname>gtk.gdk.Event.get_time</methodname>()</link>
method)</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>begin_resize_drag</methodname>() method begins a
window resize operation (for a toplevel <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>) from
the specified <parameter>edge</parameter> using the specified
<parameter>button</parameter> starting at the location specified by
<parameter>root_x</parameter> and <parameter>root_y</parameter>. The value
of edge must be one of the <xref linkend="gdk-window-edge-constants"
endterm="gdk-window-edge-constants-title"></xref>.</para>
<para>You might use this
method to implement a "window resize grip," for example; in fact the <link
linkend="class-gtkstatusbar"><classname>gtk.Statusbar</classname></link>
uses it. The method works best with window managers that support the
Extended Window Manager Hints spec (see <ulink
url="http://www.freedesktop.org">http://www.freedesktop.org</ulink>),
but has a fallback implementation for other window managers.</para>
</refsect2>
<refsect2 id="method-gdkwindow--begin-move-drag">
<title>gtk.gdk.Window.begin_move_drag</title>
<programlisting><methodsynopsis language="python">
<methodname>begin_move_drag</methodname>
<methodparam><parameter
role="keyword">button</parameter></methodparam>
<methodparam><parameter
role="keyword">root_x</parameter></methodparam>
<methodparam><parameter
role="keyword">root_y</parameter></methodparam>
<methodparam><parameter
role="keyword">timestamp</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">button</parameter> :</term>
<listitem><simpara>the button being used to
drag</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">root_x</parameter> :</term>
<listitem><simpara>the root window X coordinate of the mouse click
that began the drag</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">root_y</parameter> :</term>
<listitem><simpara>the root window Y coordinate of the mouse click
that began the drag</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">timestamp</parameter> :</term>
<listitem><simpara>the timestamp of the mouse click that began the
drag</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>begin_move_drag</methodname>() method begins a
window move operation (for a toplevel window) using the specified
<parameter>button</parameter> starting at the location specified by
<parameter>root_x</parameter> and <parameter>root_y</parameter>. You might
use this method to implement a "window move grip," for example. The method
works best with window managers that support the Extended Window Manager
Hints spec (see <ulink
url="http://www.freedesktop.org">http://www.freedesktop.org</ulink>),
but has a fallback implementation for other window managers.</para>
</refsect2>
<refsect2 id="method-gdkwindow--invalidate-rect">
<title>gtk.gdk.Window.invalidate_rect</title>
<programlisting><methodsynopsis language="python">
<methodname>invalidate_rect</methodname>
<methodparam><parameter
role="keyword">rect</parameter></methodparam>
<methodparam><parameter
role="keyword">invalidate_children</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">rect</parameter> :</term>
<listitem><simpara>the rectangle to
invalidate</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">invalidate_children</parameter> :</term>
<listitem><simpara>if <literal>True</literal> invalidate child
<link linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
objects</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>invalidate_rect</methodname>() method
invalidates the rectangular region specified by rect. If
<parameter>invalidate_children</parameter> is <literal>True</literal> the
child <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
object of the window are also invalidated.</para>
</refsect2>
<refsect2 id="method-gdkwindow--invalidate-region">
<title>gtk.gdk.Window.invalidate_region</title>
<programlisting><methodsynopsis language="python">
<methodname>invalidate_region</methodname>
<methodparam><parameter role="keyword">region</parameter></methodparam>
<methodparam><parameter role="keyword">invalidate_children</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">region</parameter> :</term>
<listitem><simpara>a <link
linkend="class-gdkregion"><classname>gtk.gdk.Region</classname></link></simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">invalidate_children</parameter> :</term>
<listitem><simpara>If <literal>True</literal> also invalidate child
windows</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>invalidate_region</methodname>() method adds the
<link
linkend="class-gdkregion"><classname>gtk.gdk.Region</classname></link>
specified by <parameter>region</parameter> to the update area for the
window. The update area is the region that needs to be redrawn, or the
"dirty region." The call to the <link
linkend="method-gdkwindow--process-updates"><methodname>process_updates</methodname>()</link>
method sends one or more expose events to the window, which together
cover the entire update area. An application would normally redraw the
contents of the window in response to those expose events.</para>
<para>PyGTK will call the <link
linkend="function-gdk--window-process-all-updates"><function>gtk.gdk.window_process_all_updates</function>()</link>
method on your behalf whenever your program returns to the main loop
and becomes idle, so normally there's no need to do that manually, you
just need to invalidate regions that you know should be
redrawn.</para>
<para>The <parameter>invalidate_children</parameter> parameter
controls whether the region of each child window that intersects
<parameter>region</parameter> will also be invalidated. If
<literal>False</literal>, then the update area for child windows will
remain unaffected.<!-- See gdk_window_invalidate_maybe_recurse if you
need fine grained control over which children are
invalidated.--></para>
</refsect2>
<!-- NOT IMPLEMENTED <refsect2 id="method-gdkwindow-
-invalidate-maybe-recurse">
<title>gtk.gdk.Window.invalidate_maybe_recurse</title>
<programlisting><methodsynopsis language="python">
<methodname>invalidate_maybe_recurse</methodname>
<methodparam><parameter role="keyword">region</parameter></methodparam>
<methodparam><parameter role="keyword">(*child_func</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">region</parameter> :</term>
<listitem><simpara>a <literal>GdkRegion</literal></simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">(*child_func</parameter> :</term>
<listitem><simpara></simpara></listitem>
</varlistentry>
</variablelist>
<para>
Adds <parameter>region</parameter> to the update area for the window. The update area is the
region that needs to be redrawn, or "dirty region." The call
<link linkend="method-gdkwindow- -process-updates"><function>gtk.gdk.Window.process_updates()</function></link> sends one or more expose events to the
window, which together cover the entire update area. An
application would normally redraw the contents of the window in
response to those expose events.
</para>
<para>
GDK will call <function>window_process_all_updates()</function> on your behalf
whenever your program returns to the main loop and becomes idle, so
normally there's no need to do that manually, you just need to
invalidate regions that you know should be redrawn.
</para>
<para>
The <parameter>child_func</parameter> parameter controls whether the region of
each child window that intersects <parameter>region</parameter> will also be invalidated.
Only children for which <parameter>child_func</parameter> returns True will have the area
invalidated.
</para> </refsect2>
END NOT IMPLEMENTED -->
<refsect2 id="method-gdkwindow--get-update-area">
<title>gtk.gdk.Window.get_update_area</title>
<programlisting><methodsynopsis language="python">
<methodname>get_update_area</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a <link
linkend="class-gdkregion"><classname>gtk.gdk.Region</classname></link>
conatining the update area for the window</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>get_update_area</methodname>() method returns a
<link
linkend="class-gdkregion"><classname>gtk.gdk.Region</classname></link>
containing the update area and transfers ownership of the update area from
the window to the caller of the method. That is, after calling this
method, the window will no longer have an invalid/dirty region; the update
area is removed from the window and passed in the returned <link
linkend="class-gdkregion"><classname>gtk.gdk.Region</classname></link>. If
a window has no update area, the <link
linkend="method-gdkwindow--get-update-area"><methodname>get_update_area()</methodname></link>
method returns <literal>None</literal>.</para>
</refsect2>
<refsect2 id="method-gdkwindow--freeze-updates">
<title>gtk.gdk.Window.freeze_updates</title>
<programlisting><methodsynopsis language="python">
<methodname>freeze_updates</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>freeze_updates</methodname>() method temporarily
freezes the window such that it won't receive expose events. The window will
begin receiving expose events again when the <link
linkend="method-gdkwindow--thaw-updates"><methodname>thaw_updates</methodname>()</link>
method is called. If the <methodname>freeze_updates</methodname>() method
has been called more than once, the <link
linkend="method-gdkwindow--thaw-updates"><methodname>thaw_updates</methodname>()</link>
method must be called an equal number of times to begin processing
exposes.</para>
</refsect2>
<refsect2 id="method-gdkwindow--thaw-updates">
<title>gtk.gdk.Window.thaw_updates</title>
<programlisting><methodsynopsis language="python">
<methodname>thaw_updates</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <methodname>thaw_updates</methodname>() method thaws a
window frozen with the <link
linkend="method-gdkwindow--freeze-updates"><methodname>freeze_updates</methodname>()</link>
method.</para>
</refsect2>
<refsect2 id="method-gdkwindow--process-updates">
<title>gtk.gdk.Window.process_updates</title>
<programlisting><methodsynopsis language="python">
<methodname>process_updates</methodname>
<methodparam><parameter
role="keyword">update_children</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">update_children</parameter> :</term>
<listitem><simpara>if <literal>True</literal> process updates for
child windows</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>process_updates</methodname>() method sends one
or more expose events to the window. The areas in each expose event will
cover the entire update area for the window (see the <link
linkend="method-gdkwindow--invalidate-rect"><methodname>invalidate_rect</methodname>()</link>
method for details). Normally <literal>PyGTK</literal> calls the <link
linkend="function-gdk--window-process-all-updates"><methodname>gtk.gdk.window_process_all_updates</methodname>()</link>
function on your behalf, so there's no need to call this method unless you
want to force expose events to be delivered immediately and synchronously
(vs. the usual case, where <literal>PyGTK</literal> delivers them in an idle
handler). Occasionally this is useful to produce nicer scrolling behavior,
for example.</para>
</refsect2>
<!-- NOT IMPLEMENTED
<refsect2 id="method-gdkwindow- -get-internal-paint-info">
<title>gtk.gdk.Window.get_internal_paint_info</title>
<programlisting><methodsynopsis language="python">
<methodname>get_internal_paint_info</methodname>
<methodparam><parameter role="keyword">real_drawable</parameter></methodparam>
<methodparam><parameter role="keyword">x_offset</parameter></methodparam>
<methodparam><parameter role="keyword">y_offset</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">real_drawable</parameter> :</term>
<listitem><simpara>location to store the drawable to which drawing should be
done.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">x_offset</parameter> :</term>
<listitem><simpara>location to store the X offset between coordinates in the window,
and the underlying window system primitive coordinates for
*<parameter>real_drawable</parameter>.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">y_offset</parameter> :</term>
<listitem><simpara>location to store the Y offset between coordinates in the window,
and the underlying window system primitive coordinates for
*<parameter>real_drawable</parameter>.</simpara></listitem>
</varlistentry>
</variablelist>
<para>
If you bypass the GDK layer and use windowing system primitives to
draw directly onto a <link linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>, then you need to deal with two
details: there may be an offset between GDK coordinates and windowing
system coordinates, and GDK may have redirected drawing to a off-screen
pixmap as the result of a <link linkend="method-gdkwindow- -begin-paint-region"><function>gtk.gdk.Window.begin_paint_region()</function></link> calls.
This function allows retrieving the information you need to compensate
for these effects.
</para>
<para>
This function exposes details of the GDK implementation, and is thus
likely to change in future releases of GDK.
</para> </refsect2>
END NOT IMPLEMENTED -->
<refsect2 id="method-gdkwindow--set-accept-focus">
<title>gtk.gdk.Window.set_accept_focus</title>
<programlisting><methodsynopsis language="python">
<methodname>set_accept_focus</methodname>
<methodparam><parameter role="keyword">accept_focus</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">accept_focus</parameter> :</term>
<listitem><simpara>if <literal>True</literal>, the window should
receive input focus</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.4 and above.</para>
</note>
<para>The <methodname>set_accept_focus</methodname>() method sets the
"accept_focus setting to the value of
<parameter>accept_focus</parameter>. If <parameter>accept_focus</parameter>
is <literal>True</literal> the window will accept focus; if
<literal>False</literal> hints to the desktop environment that the window
doesn't want to receive input focus.</para>
<para>On X, it is the responsibility of the window manager to
interpret this hint. ICCCM-compliant window manager usually respect
it.</para>
</refsect2>
<refsect2 id="method-gdkwindow--enable-synchronized-configure">
<title>gtk.gdk.Window.enable_synchronized_configure</title>
<programlisting><methodsynopsis language="python">
<methodname>enable_synchronized_configure</methodname>
</methodsynopsis></programlisting>
<note>
<para>This method is available in PyGTK 2.6 and above.</para>
</note>
<para>The <methodname>enable_synchronized_configure</methodname>()
method indicates that the application will cooperate with the window system
in synchronizing the window repaint with the window manager during resizing
operations. After an application calls this method, it must call the <link
linkend="method-gdkwindow--configure-finished"><methodname>configure_finished</methodname>()</link>
method every time it has finished all processing associated with a set of
Configure events. Toplevel GTK+ windows automatically use this
protocol.</para>
<para>On X, calling this function makes window participate in the
_NET_WM_SYNC_REQUEST window manager protocol.</para>
</refsect2>
<refsect2 id="method-gdkwindow--configure-finished">
<title>gtk.gdk.Window.configure_finished</title>
<programlisting><methodsynopsis language="python">
<methodname>configure_finished</methodname>
</methodsynopsis></programlisting>
<note>
<para>This method is available in PyGTK 2.6 and above.</para>
</note>
<para>The <methodname>configure_finished</methodname>() method signals
to the window system that the application has finished handling all the
Configure events it has received. Window Managers can use this to better
synchronize the frame repaint with the application. GTK+ applications will
automatically call this function when appropriate.</para>
<para>This function can only be called if the <link
linkend="method-gdkwindow--enable-synchronized-configure"><methodname>enable_synchronized_configure</methodname>()</link>
method was called previously.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-focus-on-map">
<title>gtk.gdk.Window.set_focus_on_map</title>
<programlisting><methodsynopsis language="python">
<methodname>set_focus_on_map</methodname>
<methodparam><parameter role="keyword">focus_on_map</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">focus_on_map</parameter> :</term>
<listitem><simpara>if <literal>True</literal> the window should
receive input focus when mapped.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.6 and above.</para>
</note>
<para>The <methodname>set_focus_on_map</methodname>() method sets the
a hint for the desktop environment to the value specified by
<parameter>focus_on_map</parameter>. If <parameter>focus_on_map</parameter>
is <literal>True</literal> the window sets a hint for the desktop
environment indicating that it would like to receive input focus when
mapped.</para>
<para>On X, it is the responsibility of the window manager to
interpret this hint. Window managers following the <ulink
url="http://www.freedesktop.org">freedesktop.org</ulink> window manager
extension specification should respect it.</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-urgency-hint">
<title>gtk.gdk.Window.set_urgency_hint</title>
<programlisting><methodsynopsis language="python">
<methodname>set_urgency_hint</methodname>
<methodparam><parameter role="keyword">urgent</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">urgent</parameter> :</term>
<listitem><simpara>if <literal>True</literal> the window requires
urgent user attention.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>set_urgency_hint</methodname>() method sets the
a hint for the desktop environment to the value specified by
<parameter>urgent</parameter>. If <parameter>urgent</parameter> is
<literal>True</literal> the window sets a hint for the desktop environment
indicating that it needs urgent user attention.</para>
</refsect2>
<refsect2 id="method-gdkwindow--move-region">
<title>gtk.gdk.Window.move_region</title>
<programlisting><methodsynopsis language="python">
<methodname>move_region</methodname>
<methodparam><parameter role="keyword">region</parameter></methodparam>
<methodparam><parameter role="keyword">dx</parameter></methodparam>
<methodparam><parameter role="keyword">dy</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">region</parameter> :</term>
<listitem><simpara>the <link linkend="class-gdkregion"><classname>gtk.gdk.Region</classname></link> to move</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">dx</parameter> :</term>
<listitem><simpara>the distance to move horizontally</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">dy</parameter> :</term>
<listitem><simpara>the distance to move vertically</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>move_region</methodname>() method moves the part
of window indicated by the <link
linkend="class-gdkregion"><classname>gtk.gdk.Region</classname></link>
specified by <parameter>region</parameter> by
<parameter>dy</parameter> pixels in the Y direction and
<parameter>dx</parameter> pixels in the X direction. The portions of
<parameter>region</parameter> that are not covered by the new position
of <parameter>region</parameter> are invalidated.</para>
</refsect2>
<refsect2 id="method-gdkwindow--shape-combine-region">
<title>gtk.gdk.Window.shape_combine_region</title>
<programlisting><methodsynopsis language="python">
<methodname>shape_combine_region</methodname>
<methodparam><parameter role="keyword">shape_region</parameter></methodparam>
<methodparam><parameter role="keyword">offset_x</parameter></methodparam>
<methodparam><parameter role="keyword">offset_y</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">shape_region</parameter> :</term>
<listitem><simpara>the region of the window to leave
opaque</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">offset_x</parameter> :</term>
<listitem><simpara>X position of <parameter>shape_region</parameter>
in window coordinates</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">offset_y</parameter> :</term>
<listitem><simpara>Y position of <parameter>shape_region</parameter>
in window coordinates</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>shape_combine_region</methodname>() method makes
pixels in the window outside of the <link
linkend="class-gdkregion"><classname>gtk.gdk.Region</classname></link>
specified by <parameter>shape_region</parameter> transparent, so
that the window may be nonrectangular. See the <link
linkend="method-gdkwindow--shape-combine-mask"><methodname>shape_combine_mask</methodname>()</link>
method to use a bitmap as the mask.</para>
<para>If <parameter>shape_region</parameter> is
<literal>None</literal>, the shape will be unset, so the whole window
will be opaque again. <parameter>offset_x</parameter> and
<parameter>offset_y</parameter> are ignored if
<parameter>shape_region</parameter> is <literal>None</literal>.</para>
<para>This method works on both toplevel and child windows.</para>
<para>On the X11 platform, this uses an X server extension which is
widely available on most common platforms, but not available on very
old X servers, and occasionally the implementation will be buggy. On
servers without the shape extension, this method will do
nothing.</para>
</refsect2>
<refsect2 id="method-gdkwindow--input-shape-combine-mask">
<title>gtk.gdk.Window.input_shape_combine_mask</title>
<programlisting><methodsynopsis language="python">
<methodname>input_shape_combine_mask</methodname>
<methodparam><parameter
role="keyword">mask</parameter></methodparam>
<methodparam><parameter
role="keyword">x</parameter></methodparam>
<methodparam><parameter
role="keyword">y</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">mask</parameter> :</term>
<listitem><simpara>the shape bitmap mask</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">x</parameter> :</term>
<listitem><simpara>the X position of shape mask with respect to
the window</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">y</parameter> :</term>
<listitem><simpara>the Y position of shape mask with respect to
the window</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>input_shape_combine_mask</methodname>() method
is similar to the <link
linkend="method-gdkwindow--shape-combine-mask"><methodname>shape_combine_mask</methodname>()</link>
method but the shape applies only to event handling. Mouse events
which happen while the pointer position corresponds to an unset bit in
the mask will be passed onto the window below this window.</para>
<para>An input shape is typically used with RGBA windows. The alpha
channel of the window defines which pixels are invisible and allows
for nicely antialiased borders, and the input shape controls where the
window is "clickable".</para>
<para>On the X11 platform, this requires version 1.1 of the shape
extension.</para>
</refsect2>
<refsect2 id="method-gdkwindow--input-shape-combine-region">
<title>gtk.gdk.Window.input_shape_combine_region</title>
<programlisting><methodsynopsis language="python">
<methodname>input_shape_combine_region</methodname>
<methodparam><parameter role="keyword">shape_region</parameter></methodparam>
<methodparam><parameter role="keyword">offset_x</parameter></methodparam>
<methodparam><parameter role="keyword">offset_y</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">shape_region</parameter> :</term>
<listitem><simpara>the region of the window to leave
opaque</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">offset_x</parameter> :</term>
<listitem><simpara>X position of <parameter>shape_region</parameter>
in window coordinates</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">offset_y</parameter> :</term>
<listitem><simpara>Y position of <parameter>shape_region</parameter>
in window coordinates</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>input_shape_combine_region</methodname>() method
is similar to the <link
linkend="method-gdkwindow--shape-combine-region"><methodname>shape_combine_region</methodname>()</link>
method, but the shape applies only to event handling. Mouse events
which happen while the pointer position corresponds to an unset bit in
<parameter>shape_region</parameter> will be passed onto the window
below this window.</para>
<para>An input shape is typically used with RGBA windows. The alpha
channel of the window defines which pixels are invisible and allows
for nicely antialiased borders, and the input shape controls where the
window is "clickable".</para>
<para>On the X11 platform, this requires version 1.1 of the shape
extension.</para>
</refsect2>
<refsect2 id="method-gdkwindow--beep">
<title>gtk.gdk.Window.beep</title>
<programlisting><methodsynopsis language="python">
<methodname>beep</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
</variablelist>
<note>
<para>This method is available in PyGTK 2.12 and above.</para>
</note>
<para>
Emits a short beep associated to window in the appropriate display,
if supported. Otherwise, emits a short beep on the display just as
<methodname><link linkend="method-gdkdisplay--beep">gtk.gdk.Display.beep</link></methodname>().
</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-composited">
<title>gtk.gdk.Window.set_composited</title>
<programlisting><methodsynopsis language="python">
<methodname>set_composited</methodname>
<methodparam><parameter role="keyword">composited</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">composited</parameter> :</term>
<listitem><simpara><literal>True</literal> to set the window as composited</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.12 and above.</para>
</note>
<para>
Sets a GdkWindow as composited, or unsets it. Composited windows do
not automatically have their contents drawn to the screen. Drawing is
redirected to an offscreen buffer and an expose event is emitted on
the parent of the composited window. It is the responsibility of the
parent's expose handler to manually merge the off-screen content onto
the screen in whatever way it sees fit.
<!-- FIXME See Example 7, “Composited windows” for an example. -->
</para>
<para>
It only makes sense for child windows to be composited; see
<methodname><link linkend="method-gdkwindow--set-opacity">gtk.gdk.Window.set_opacity</link></methodname>()
if you need translucent toplevel windows.
</para>
<para>
An additional effect of this call is that the area of this window is no longer
clipped from regions marked for invalidation on its parent. Draws done on the
parent window are also no longer clipped by the child.
</para>
<para>
This call is only supported on some systems (currently, only X11 with
new enough Xcomposite and Xdamage extensions). You must call
<methodname><link linkend="method-gdkdisplay--supports-cursor-alpha">gtk.gdk.Display.supports_composite</link></methodname>()
to check if setting a window as composited is supported before attempting to do so.
</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-opacity">
<title>gtk.gdk.Window.set_opacity</title>
<programlisting><methodsynopsis language="python">
<methodname>set_opacity</methodname>
<methodparam><parameter role="keyword">opacity</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">opacity</parameter> :</term>
<listitem><simpara>The opacity value.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.12 and above.</para>
</note>
<para>
Request the windowing system to make window partially transparent, with
opacity 0 being fully transparent and 1 fully opaque.
Values of the opacity parameter are clamped to the [0,1] range.)
</para>
<para>
On X11, this works only on X screens with a compositing manager running.
</para>
<para>
For setting up per-pixel alpha, see
<methodname><link linkend="method-gdkscreen--get-rgba-colormap">gtk.gdk.Screen.get_rgba_colormap</link></methodname>().
For making non-toplevel windows translucent, see
<methodname><link linkend="method-gdkwindow--set-composited">gtk.gdk.Window.set_composited</link></methodname>().
</para>
</refsect2>
<refsect2 id="method-gdkwindow--set-startup-id">
<title>gtk.gdk.Window.set_startup_id</title>
<programlisting><methodsynopsis language="python">
<methodname>set_startup_id</methodname>
<methodparam><parameter role="keyword">startup_id</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">startup_id</parameter> :</term>
<listitem><simpara>A string with startup-notification identifier.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.12 and above.</para>
</note>
<para>
When using GTK+, typically you should use
<methodname><link linkend="method-gtkwindow--set-startup-id">gtk.Window.set_startup_id</link></methodname>()
instead of this low-level function.
</para>
</refsect2>
<!-- NOT IMPLEMENTED
<refsect2 id="method-gdkwindow- -redirect-to-drawable">
<title>gtk.gdk.Window.redirect_to_drawable</title>
<programlisting><methodsynopsis language="python">
<methodname>redirect_to_drawable</methodname>
<methodparam><parameter role="keyword">drawable</parameter></methodparam>
<methodparam><parameter role="keyword">src_x</parameter></methodparam>
<methodparam><parameter role="keyword">src_y</parameter></methodparam>
<methodparam><parameter role="keyword">dest_x</parameter></methodparam>
<methodparam><parameter role="keyword">dest_y</parameter></methodparam>
<methodparam><parameter role="keyword">width</parameter></methodparam>
<methodparam><parameter role="keyword">height</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">drawable</parameter> :</term>
<listitem><simpara><link linkend="class-gdkdrawable"><classname>gtk.gdk.Drawable</classname></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">src_x</parameter> :</term>
<listitem><simpara>x position in window</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">src_y</parameter> :</term>
<listitem><simpara>y position in window</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">dest_x</parameter> :</term>
<listitem><simpara>x position in drawable</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">dest_y</parameter> :</term>
<listitem><simpara>y position in drawable </simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">width</parameter> :</term>
<listitem><simpara>width of redirection </simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">height</parameter> :</term>
<listitem><simpara>height of redirection </simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.14 and above.</para>
</note>
<para>
The <methodname>input_shape_combine_region</methodname>() method redirects drawing
into window so that drawing to the window in the rectangle specified by src_x, src_y, width
and height is also drawn into drawable at dest_x, dest_y.
</para>
<para>
Only drawing between
<methodname><link linkend="method-gdkwindow- -begin-paint-region">gtk.gdk.Window.begin_paint_region</link></methodname>()
or
<methodname><link linkend="method-gdkwindow- -begin-paint-region">gtk.gdk.Window.begin_paint_rect</link></methodname>()
and
<methodname><link linkend="method-gdkwindow- -end-paint">gtk.gdk.Window.end_paint</link></methodname>()
is redirected.
</para>
</refsect2>
END NOT IMPLEMENTED -->
<refsect2 id="method-gdkwindow--remove-redirection">
<title>gtk.gdk.Window.remove_redirection</title>
<programlisting><methodsynopsis language="python">
<methodname>remove_redirection</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
</variablelist>
<note>
<para>This method is available in PyGTK 2.14 and above.</para>
</note>
<para>
When using GTK+, typically you should use
<methodname><link linkend="method-gtkwindow--set-startup-id">gtk.Window.set_startup_id</link></methodname>()
instead of this low-level function.
</para>
</refsect2>
</refsect1>
<refsect1>
<title>Functions</title>
<refsect2 id="function-gdk--window-foreign-new">
<title>gtk.gdk.window_foreign_new</title>
<programlisting><methodsynopsis language="python">
<methodname>gtk.gdk.window_foreign_new</methodname>
<methodparam><parameter
role="keyword">anid</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">anid</parameter> :</term>
<listitem><simpara>a native window system ID</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the new <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
wrapper for the native window or <literal>None</literal> if the window has
been destroyed.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <function>gtk.gdk.window_foreign_new</function>() function
wraps a native window specified by <parameter>anid</parameter> for the default display in a <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>. This
may fail if the window has been destroyed. For example in the X Window
System backend, a native window handle is an Xlib
<literal>XID</literal>.</para>
</refsect2>
<refsect2 id="function-gdk--window-foreign-new-for-display">
<title>gtk.gdk.window_foreign_new_for_display</title>
<programlisting><methodsynopsis language="python">
<methodname>gtk.gdk.window_foreign_new_for_display</methodname>
<methodparam><parameter
role="keyword">display</parameter></methodparam>
<methodparam><parameter
role="keyword">anid</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">display</parameter> :</term>
<listitem><simpara>a <link
linkend="class-gdkdisplay"><classname>gtk.gdk.Display</classname></link></simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">anid</parameter> :</term>
<listitem><simpara>a native window system ID</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the new <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
wrapper for the native window or <literal>None</literal> if the window has
been destroyed.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This function is available in PyGTK 2.2 and above.</para>
</note>
<para>The
<function>gtk.gdk.window_foreign_new_for_display</function>() function wraps
a native window specified by <parameter>anid</parameter> for the <link
linkend="class-gdkdisplay"><classname>gtk.gdk.Display</classname></link>
specified by <parameter>display</parameter> in a <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>. This
may fail if the window has been destroyed. For example in the X Window
System backend, a native window handle is an Xlib
<literal>XID</literal>.</para>
</refsect2>
<refsect2 id="function-gdk--get-default-root-window">
<title>gtk.gdk.get_default_root_window</title>
<programlisting><methodsynopsis language="python">
<methodname>gtk.gdk.get_default_root_window</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara> the default root <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link></simpara></listitem>
</varlistentry>
</variablelist>
<para>The <function>gtk.gdk.get_default_root_window</function>()
function returns the root <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> (the
parent window that all other windows are inside) for the default display and
screen.</para>
</refsect2>
<refsect2 id="function-gdk--window-get-toplevels">
<title>gtk.gdk.window_get_toplevels</title>
<programlisting><methodsynopsis language="python">
<methodname>gtk.gdk.window_get_toplevels</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a list containing the toplevel <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
object</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <function>gtk.gdk.window_get_toplevels</function>() function
returns a list of all toplevel windows known to <literal>PyGTK</literal> on
the default screen. A toplevel window is a child of the root window (see the
<link
linkend="function-gdk--get-default-root-window">gtk.gdk.get_default_root_window</link>()
function).</para>
</refsect2>
<refsect2 id="function-gdk--window-lookup">
<title>gtk.gdk.window_lookup</title>
<programlisting><methodsynopsis language="python">
<methodname>gtk.gdk.window_lookup</methodname>
<methodparam><parameter
role="keyword">anid</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">anid</parameter> :</term>
<listitem><simpara>a native window system ID</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
wrapper for the native window or <literal>None</literal> if there is
none.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <function>gtk.gdk.window_lookup</function>() function looks
up the <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> that
wraps the native window handle specified by <parameter>anid</parameter>. For
example in the X Window System backend, a native window handle is an Xlib
<literal>XID</literal>.</para>
</refsect2>
<refsect2 id="function-gdk--window-lookup-for-display">
<title>gtk.gdk.window_lookup_for_display</title>
<programlisting><methodsynopsis language="python">
<methodname>gtk.gdk.window_lookup_for_display</methodname>
<methodparam><parameter
role="keyword">display</parameter></methodparam>
<methodparam><parameter
role="keyword">anid</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">display</parameter> :</term>
<listitem><simpara>a <link
linkend="class-gdkdisplay"><classname>gtk.gdk.Display</classname></link></simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">anid</parameter> :</term>
<listitem><simpara>a native window system ID</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
wrapper for the native window or <literal>None</literal> if there is
none.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This function is available in PyGTK 2.2 and above.</para>
</note>
<para>The <function>gtk.gdk.window_lookup_for_display</function>()
function looks up the <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> that
wraps the native window handle specified by <parameter>anid</parameter> for
the <link
linkend="class-gdkdisplay"><classname>gtk.gdk.Display</classname></link>
specified by <parameter>display</parameter>. For example in the X Window
System backend, a native window handle is an Xlib
<literal>XID</literal>.</para>
</refsect2>
<refsect2 id="function-gdk--window-process-all-updates">
<title>gtk.gdk.window_process_all_updates</title>
<programlisting><methodsynopsis language="python">
<methodname>gtk.gdk.window_process_all_updates</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<para>The <function>gtk.gdk.process_all_updates</function>() function
calls the <link
linkend="method-gdkwindow--process-updates"><methodname>process_updates</methodname>()</link>
method for each <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> in
the application.</para>
</refsect2>
<refsect2 id="function-gdk--gdk-window-set-debug-updates">
<title>gtk.gdk.gdk_window_set_debug_updates</title>
<programlisting><methodsynopsis language="python">
<methodname>gtk.gdk.gdk_window_set_debug_updates</methodname>
<methodparam><parameter
role="keyword">setting</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">setting</parameter> :</term>
<listitem><simpara>if <literal>True</literal> enable update
debugging</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <function>gtk.gdk.gdk_set_debug_updates</function>() function
sets the update debugging flag to the value of
<parameter>setting</parameter>. If <parameter>setting</parameter> is
<literal>True</literal>, update debugging is enabled. With update debugging
enabled, calls to the <link
linkend="method-gdkwindow--invalidate-rect"><methodname>invalidate_rect</methodname>()</link>
method clear the invalidated rectangle of the screen to a noticeable color,
and <literal>PyGTK</literal> pauses for a short time before sending exposes
to windows during the <link
linkend="method-gdkwindow--process-updates"><methodname>process_updates</methodname>()</link>
method. The net effect is that you can see the invalid region for each
window and watch redraws as they occur. This allows you to diagnose
inefficiencies in your application.In essence, because the
<literal>GDK</literal> rendering model prevents all flicker, if you are
redrawing the same region 400 times you may never notice, aside from
noticing a speed problem. Enabling update debugging causes
<literal>PyGTK</literal> to flicker slowly and noticeably, so you can see
exactly what's being redrawn when, in what order.</para>
<para>The <option>--gtk-debug=updates</option> command line option
passed to <literal>PyGTK</literal> programs enables this debug option at
application startup time. That's usually more useful than calling
<function>gtk.gdk.gdk_set_debug_updates</function>() yourself, though you might
want to use this function to enable updates sometime after application
startup time.</para>
</refsect2>
<refsect2 id="function-gdk--window-at-pointer">
<title>gtk.gdk.window_at_pointer</title>
<programlisting><methodsynopsis language="python">
<methodname>gtk.gdk.window_at_pointer</methodname>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a 3 tuple containing the <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
and the pointer location in the window or
<literal>None</literal>.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This function is available in PyGTK 2.4 and above.</para>
</note>
<para>The <function>gtk.gdk.window_at_pointer</function>() function
returns a 3-tuple containing the <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
underneath the mouse pointer, and the location of the pointer in the
window. This function returns <literal>None</literal> if the window under
the mouse pointer is not known to GDK (if the window belongs to another
application and a <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
hasn't been created for it with the <link
linkend="function-gdk--window-foreign-new"><function>gtk.gdk.window_foreign_new</function>()</link>
function)</para>
<note>
<para>For multi-head-aware widgets or applications use the <link
linkend="method-gdkdisplay--get-window-at-pointer"><methodname>gtk.gdk.Display.get_window_at_pointer</methodname>()</link>
method instead.</para>
</note>
</refsect2>
</refsect1>
</refentry>
|