/usr/share/gtk-doc/html/pygtk/class-gdkwindow.html is in python-gtk2-doc 2.24.0-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.gdk.Window</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gdk-class-reference.html" title="The gtk.gdk Class Reference"><link rel="prev" href="class-gdkvisual.html" title="gtk.gdk.Visual"><link rel="next" href="gdk-functions.html" title="gtk.gdk Functions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.gdk.Window</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gdkvisual.html">Prev</a> </td><th width="60%" align="center">The gtk.gdk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="gdk-functions.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.gdk.Window"><a name="class-gdkwindow"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.gdk.Window</h2><p>gtk.gdk.Window — on-screen display areas in the target window
system</p></div><div class="refsect1" title="Synopsis"><a name="id3160424"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.gdk.Window</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable">gtk.gdk.Drawable</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gdkwindow.html#constructor-gdkwindow" title="Constructor">gtk.gdk.Window</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>parent</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>window_type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>event_mask</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>wclass</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>title</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>visual</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>colormap</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cursor</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>wmclass_name</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>wmclass_class</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>override_redirect</code></strong></span><span class="initializer">=-1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--drag-begin" title="gtk.gdk.Window.drag_begin">drag_begin</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>targets</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--input-set-extension-events" title="gtk.gdk.Window.input_set_extension_events">input_set_extension_events</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mask</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>mode</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--property-get" title="gtk.gdk.Window.property_get">property_get</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>property</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pdelete</code></strong></span><span class="initializer">=False</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--property-change" title="gtk.gdk.Window.property_change">property_change</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>property</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>format</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>mode</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--property-delete" title="gtk.gdk.Window.property_delete">property_delete</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>property</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--selection-convert" title="gtk.gdk.Window.selection_convert">selection_convert</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>selection</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>target</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-keep-above" title="gtk.gdk.Window.set_keep_above">set_keep_above</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-keep-below" title="gtk.gdk.Window.set_keep_below">set_keep_below</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--destroy" title="gtk.gdk.Window.destroy">destroy</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--get-window-type" title="gtk.gdk.Window.get_window_type">get_window_type</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--show" title="gtk.gdk.Window.show">show</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--hide" title="gtk.gdk.Window.hide">hide</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--withdraw" title="gtk.gdk.Window.withdraw">withdraw</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--move" title="gtk.gdk.Window.move">move</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--resize" title="gtk.gdk.Window.resize">resize</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--move-resize" title="gtk.gdk.Window.move_resize">move_resize</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--reparent" title="gtk.gdk.Window.reparent">reparent</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>new_parent</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--clear" title="gtk.gdk.Window.clear">clear</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--clear-area" title="gtk.gdk.Window.clear_area">clear_area</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--clear-area-e" title="gtk.gdk.Window.clear_area_e">clear_area_e</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--raise_" title="gtk.gdk.Window.raise_">raise_</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--lower" title="gtk.gdk.Window.lower">lower</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--focus" title="gtk.gdk.Window.focus">focus</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>timestamp</code></strong></span><span class="initializer">=0L</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-user-data" title="gtk.gdk.Window.set_user_data">set_user_data</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--get-user-data" title="gtk.gdk.Window.get_user_data">get_user_data</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-override-redirect" title="gtk.gdk.Window.set_override_redirect">set_override_redirect</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>override_redirect</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--add-filter" title="gtk.gdk.Window.add_filter">add_filter</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>function</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--scroll" title="gtk.gdk.Window.scroll">scroll</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>dx</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dy</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--shape-combine-mask" title="gtk.gdk.Window.shape_combine_mask">shape_combine_mask</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>shape_mask</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset_y</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-child-shapes" title="gtk.gdk.Window.set_child_shapes">set_child_shapes</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--merge-child-shapes" title="gtk.gdk.Window.merge_child_shapes">merge_child_shapes</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--is-visible" title="gtk.gdk.Window.is_visible">is_visible</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--is-viewable" title="gtk.gdk.Window.is_viewable">is_viewable</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--get-state" title="gtk.gdk.Window.get_state">get_state</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-static-gravities" title="gtk.gdk.Window.set_static_gravities">set_static_gravities</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_static</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--get-type-hint" title="gtk.gdk.Window.get_type_hint">get_type_hint</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-type-hint" title="gtk.gdk.Window.set_type_hint">set_type_hint</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>hint</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-modal-hint" title="gtk.gdk.Window.set_modal_hint">set_modal_hint</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>modal</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-skip-taskbar-hint" title="gtk.gdk.Window.set_skip_taskbar_hint">set_skip_taskbar_hint</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>skips_taskbar</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-skip-pager-hint" title="gtk.gdk.Window.set_skip_pager_hint">set_skip_pager_hint</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>skips_pager</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-geometry-hints" title="gtk.gdk.Window.set_geometry_hints">set_geometry_hints</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>min_width</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>min_height</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>max_width</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>max_height</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_width</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_height</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width_inc</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height_inc</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>min_aspect</code></strong></span><span class="initializer">=-1.0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>max_aspect</code></strong></span><span class="initializer">=-1.0</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--begin-paint-rect" title="gtk.gdk.Window.begin_paint_rect">begin_paint_rect</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>rectangle</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--begin-paint-region" title="gtk.gdk.Window.begin_paint_region">begin_paint_region</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>region</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--end-paint" title="gtk.gdk.Window.end_paint">end_paint</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-title" title="gtk.gdk.Window.set_title">set_title</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>title</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-role" title="gtk.gdk.Window.set_role">set_role</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>role</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-transient-for" title="gtk.gdk.Window.set_transient_for">set_transient_for</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>leader</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-background" title="gtk.gdk.Window.set_background">set_background</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>color</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-back-pixmap" title="gtk.gdk.Window.set_back_pixmap">set_back_pixmap</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixmap</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>parent_relative</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-cursor" title="gtk.gdk.Window.set_cursor">set_cursor</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cursor</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--get-geometry" title="gtk.gdk.Window.get_geometry">get_geometry</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--get-position" title="gtk.gdk.Window.get_position">get_position</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--get-origin" title="gtk.gdk.Window.get_origin">get_origin</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--get-root-origin" title="gtk.gdk.Window.get_root_origin">get_root_origin</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--get-frame-extents" title="gtk.gdk.Window.get_frame_extents">get_frame_extents</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--get-pointer" title="gtk.gdk.Window.get_pointer">get_pointer</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--get-parent" title="gtk.gdk.Window.get_parent">get_parent</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--get-toplevel" title="gtk.gdk.Window.get_toplevel">get_toplevel</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--get-children" title="gtk.gdk.Window.get_children">get_children</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--get-events" title="gtk.gdk.Window.get_events">get_events</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-events" title="gtk.gdk.Window.set_events">set_events</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>event_mask</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-icon-list" title="gtk.gdk.Window.set_icon_list">set_icon_list</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbufs</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-icon" title="gtk.gdk.Window.set_icon">set_icon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixmap</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>mask</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-icon-name" title="gtk.gdk.Window.set_icon_name">set_icon_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-group" title="gtk.gdk.Window.set_group">set_group</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>leader</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--get-group" title="gtk.gdk.Window.get_group">get_group</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-decorations" title="gtk.gdk.Window.set_decorations">set_decorations</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>decorations</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--get-decorations" title="gtk.gdk.Window.get_decorations">get_decorations</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-functions" title="gtk.gdk.Window.set_functions">set_functions</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>functions</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--iconify" title="gtk.gdk.Window.iconify">iconify</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--deiconify" title="gtk.gdk.Window.deiconify">deiconify</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--stick" title="gtk.gdk.Window.stick">stick</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--unstick" title="gtk.gdk.Window.unstick">unstick</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--maximize" title="gtk.gdk.Window.maximize">maximize</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--unmaximize" title="gtk.gdk.Window.unmaximize">unmaximize</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--fullscreen" title="gtk.gdk.Window.fullscreen">fullscreen</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--unfullscreen" title="gtk.gdk.Window.unfullscreen">unfullscreen</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--register-dnd" title="gtk.gdk.Window.register_dnd">register_dnd</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--begin-resize-drag" title="gtk.gdk.Window.begin_resize_drag">begin_resize_drag</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>edge</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>button</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>root_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>root_y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>timestamp</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--begin-move-drag" title="gtk.gdk.Window.begin_move_drag">begin_move_drag</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>button</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>root_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>root_y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>timestamp</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--invalidate-rect" title="gtk.gdk.Window.invalidate_rect">invalidate_rect</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>rect</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>invalidate_children</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--invalidate-region" title="gtk.gdk.Window.invalidate_region">invalidate_region</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>region</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>invalidate_children</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--get-update-area" title="gtk.gdk.Window.get_update_area">get_update_area</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--freeze-updates" title="gtk.gdk.Window.freeze_updates">freeze_updates</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--thaw-updates" title="gtk.gdk.Window.thaw_updates">thaw_updates</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--process-updates" title="gtk.gdk.Window.process_updates">process_updates</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>update_children</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-accept-focus" title="gtk.gdk.Window.set_accept_focus">set_accept_focus</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accept_focus</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--enable-synchronized-configure" title="gtk.gdk.Window.enable_synchronized_configure">enable_synchronized_configure</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--configure-finished" title="gtk.gdk.Window.configure_finished">configure_finished</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-focus-on-map" title="gtk.gdk.Window.set_focus_on_map">set_focus_on_map</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>focus_on_map</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-urgency-hint" title="gtk.gdk.Window.set_urgency_hint">set_urgency_hint</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>urgent</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--move-region" title="gtk.gdk.Window.move_region">move_region</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>region</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dx</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dy</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--shape-combine-region" title="gtk.gdk.Window.shape_combine_region">shape_combine_region</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>shape_region</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset_y</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--input-shape-combine-mask" title="gtk.gdk.Window.input_shape_combine_mask">input_shape_combine_mask</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mask</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--input-shape-combine-region" title="gtk.gdk.Window.input_shape_combine_region">input_shape_combine_region</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>shape_region</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset_y</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--beep" title="gtk.gdk.Window.beep">beep</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-composited" title="gtk.gdk.Window.set_composited">set_composited</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>composited</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-opacity" title="gtk.gdk.Window.set_opacity">set_opacity</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>opacity</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-startup-id" title="gtk.gdk.Window.set_startup_id">set_startup_id</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>startup_id</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--remove-redirection" title="gtk.gdk.Window.remove_redirection">remove_redirection</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
<span class="bold"><strong>Functions</strong></span>
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#function-gdk--window-foreign-new" title="gtk.gdk.window_foreign_new">gtk.gdk.window_foreign_new</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>anid</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#function-gdk--window-foreign-new-for-display" title="gtk.gdk.window_foreign_new_for_display">gtk.gdk.window_foreign_new_for_display</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>anid</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#function-gdk--get-default-root-window" title="gtk.gdk.get_default_root_window">gtk.gdk.get_default_root_window</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#function-gdk--window-get-toplevels" title="gtk.gdk.window_get_toplevels">gtk.gdk.window_get_toplevels</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#function-gdk--window-lookup" title="gtk.gdk.window_lookup">gtk.gdk.window_lookup</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>anid</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#function-gdk--window-lookup-for-display" title="gtk.gdk.window_lookup_for_display">gtk.gdk.window_lookup_for_display</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>anid</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#function-gdk--window-process-all-updates" title="gtk.gdk.window_process_all_updates">gtk.gdk.window_process_all_updates</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#function-gdk--gdk-window-set-debug-updates" title="gtk.gdk.gdk_window_set_debug_updates">gtk.gdk.gdk_window_set_debug_updates</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gdkwindow.html#function-gdk--window-at-pointer" title="gtk.gdk.window_at_pointer">gtk.gdk.window_at_pointer</a></span>()</code></pre></div><div class="refsect1" title="Ancestry"><a name="id3168964"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
+-- <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable">gtk.gdk.Drawable</a>
+-- <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window">gtk.gdk.Window</a>
</pre></div><div class="refsect1" title="Description"><a name="id3168997"></a><h2>Description</h2><p> <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> is a
rectangular region on the screen. It's a low-level object, used to implement
high-level objects such as <a class="link" href="class-gtkwidget.html" title="gtk.Widget"><code class="classname">gtk.Widget</code></a> and <a class="link" href="class-gtkwindow.html" title="gtk.Window"><code class="classname">gtk.Window</code></a>. A <a class="link" href="class-gtkwindow.html" title="gtk.Window"><code class="classname">gtk.Window</code></a> is a
toplevel window, the object a user might think of as a "window" with a
titlebar and so on. A <a class="link" href="class-gtkwindow.html" title="gtk.Window"><code class="classname">gtk.Window</code></a> may
contain several <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
objects since most widgets use a <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>.</p><p>A <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
object interacts with the native window system for input and events. Some
<a class="link" href="class-gtkwidget.html" title="gtk.Widget"><code class="classname">gtk.Widget</code></a>
objects do not have an associated <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> and
therefore cannot receive events. To receive events on behalf of these
"windowless" widgets a <a class="link" href="class-gtkeventbox.html" title="gtk.EventBox"><code class="classname">gtk.EventBox</code></a> must
be used.</p><div class="refsect2" title="A gtk.gdk.Window Composited Windows example"><a name="gdkwindow-composited-windows-example"></a><h3>A gtk.gdk.Window Composited Windows example</h3><pre class="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()
</pre><p>
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.
</p><p>
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
<a class="link" href="class-gtkwindow.html" title="gtk.Window"><code class="classname">gtk.Window</code></a>). The expose
handler for this widget is responsible for merging the changes back on the screen
in the way that it wishes.
</p><p>
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.
</p></div></div><div class="refsect1" title="Constructor"><a name="constructor-gdkwindow"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.gdk.Window</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>parent</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>window_type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>event_mask</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>wclass</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>title</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>visual</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>colormap</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cursor</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>wmclass_name</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>wmclass_class</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>override_redirect</code></strong></span><span class="initializer">=-1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>parent</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the width of the window in
pixels</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height of the window in
pixels</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>window_type</code></strong> :</span></p></td><td>the window type</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>event_mask</code></strong> :</span></p></td><td>the bitmask of events received by the
window</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>wclass</code></strong> :</span></p></td><td>the class of window - either
<code class="literal">gtk.gdk.INPUT_OUTPUT</code> or
<code class="literal">gtk.gdk.INPUT_ONLY</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>title</code></strong> :</span></p></td><td>the window title if a toplevel
window</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the x coordinate of the window position relative
to <em class="parameter"><code>parent</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the y coordinate of the window position relative
to <em class="parameter"><code>parent</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>visual</code></strong> :</span></p></td><td>the <a class="link" href="class-gdkvisual.html" title="gtk.gdk.Visual"><code class="classname">gtk.gdk.Visual</code></a> for
the window</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>colormap</code></strong> :</span></p></td><td>the <a class="link" href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><code class="classname">gtk.gdk.Colormap</code></a>
for the window</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cursor</code></strong> :</span></p></td><td>the <a class="link" href="class-gdkcursor.html" title="gtk.gdk.Cursor"><code class="classname">gtk.gdk.Cursor</code></a> for
the window</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>wmclass_name</code></strong> :</span></p></td><td>don't use this - see the <a class="link" href="class-gtkwindow.html#method-gtkwindow--set-wmclass" title="gtk.Window.set_wmclass"><code class="methodname">gtk.Window.set_wmclass</code>()</a>
method for more information.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>wmclass_class</code></strong> :</span></p></td><td>don't use this - see the <a class="link" href="class-gtkwindow.html#method-gtkwindow--set-wmclass" title="gtk.Window.set_wmclass"><code class="methodname">gtk.Window.set_wmclass</code>()</a>
method for more information.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>override_redirect</code></strong> :</span></p></td><td>if <code class="literal">True</code> bypass the window
manager</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the new <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a></td></tr></tbody></table><p>Creates a new <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> of
the type and class specified by <em class="parameter"><code>window_type</code></em> and
<em class="parameter"><code>wclass</code></em>. The window will be a child of the specified
<em class="parameter"><code>parent</code></em> and will have the specified
<em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em>.
<em class="parameter"><code>event_mask</code></em> is a bitfield specifying the events that
the window will receive - see the <a class="link" href="class-gdkwindow.html#method-gdkwindow--set-events" title="gtk.gdk.Window.set_events"><code class="methodname">set_events</code>()</a>
method for more information. The value of <em class="parameter"><code>window_type</code></em>
must be one of the <a class="xref" href="gdk-constants.html#gdk-window-type-constants" title="GDK Window Type Constants">GDK Window Type Constants</a>.</p><p>The value of <em class="parameter"><code>wclass</code></em> must be one of the
<a class="xref" href="gdk-constants.html#gdk-window-class-constants" title="GDK Window Class Constants">GDK Window Class Constants</a>.</p><p>If the optional parameters are not specified the corresponding
attribute values will have default values:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>x</code></em></span></p></td><td>0</td></tr><tr><td><p><span class="term"><em class="parameter"><code>y</code></em></span></p></td><td>0</td></tr><tr><td><p><span class="term"><em class="parameter"><code>visual</code></em></span></p></td><td>the default system visual - see the <a class="link" href="class-gdkvisual.html#function-gdk--visual-get-system" title="gtk.gdk.visual_get_system"><code class="function">gtk.gdk.visual_get_system</code>()</a>
function</td></tr><tr><td><p><span class="term"><em class="parameter"><code>colormap</code></em></span></p></td><td>either the system <a class="link" href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><code class="classname">gtk.gdk.Colormap</code></a>
if using the system <a class="link" href="class-gdkvisual.html" title="gtk.gdk.Visual"><code class="classname">gtk.gdk.Visual</code></a> (see
the <a class="link" href="class-gdkcolormap.html#function-gdk--colormap-get-system" title="gtk.gdk.colormap_get_system"><code class="function">gtk.gdk.colormap_get_system</code>()</a>
function) or a new <a class="link" href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><code class="classname">gtk.gdk.Colormap</code></a>
using <em class="parameter"><code>visual</code></em></td></tr><tr><td><p><span class="term"><em class="parameter"><code>cursor</code></em></span></p></td><td>use the parent window's cursor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>override_redirect</code></em></span></p></td><td>False</td></tr></tbody></table><p></p></div><div class="refsect1" title="Methods"><a name="id3311602"></a><h2>Methods</h2><div class="refsect2" title="gtk.gdk.Window.drag_begin"><a name="method-gdkwindow--drag-begin"></a><h3>gtk.gdk.Window.drag_begin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">drag_begin</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>targets</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>targets</code></strong> :</span></p></td><td>a list of offered targets</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-gdkdragcontext.html" title="gtk.gdk.DragContext"><code class="classname">gtk.gdk.DragContext</code></a></td></tr></tbody></table><p>The <code class="methodname">drag_begin</code>() method starts a drag
operation and returns the new <a class="link" href="class-gdkdragcontext.html" title="gtk.gdk.DragContext"><code class="classname">gtk.gdk.DragContext</code></a>
created for it. The list of targets (integer values) supported by the drag
source are specified by <em class="parameter"><code>targets</code></em>.</p></div><div class="refsect2" title="gtk.gdk.Window.input_set_extension_events"><a name="method-gdkwindow--input-set-extension-events"></a><h3>gtk.gdk.Window.input_set_extension_events</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">input_set_extension_events</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mask</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>mode</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>mask</code></strong> :</span></p></td><td>the event mask to be used</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>mode</code></strong> :</span></p></td><td>the set of extension events to
receive</td></tr></tbody></table><p>The <code class="methodname">input_set_extension_events</code>() method
enables or disables the extension events specified by
<em class="parameter"><code>mode</code></em> for the window when using the event mask
specified by <em class="parameter"><code>mask</code></em>. The value of
<em class="parameter"><code>mode</code></em> must be one of the <a class="xref" href="gdk-constants.html#gdk-extension-mode-constants" title="GDK Extension Mode Constants">GDK Extension Mode Constants</a></p></div><div class="refsect2" title="gtk.gdk.Window.property_get"><a name="method-gdkwindow--property-get"></a><h3>gtk.gdk.Window.property_get</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">property_get</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>property</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pdelete</code></strong></span><span class="initializer">=False</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>property</code></strong> :</span></p></td><td>the property to get</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>the type of property to get or not specified if
any type of property data is acceptable.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>pdelete</code></strong> :</span></p></td><td>if <code class="literal">True</code>, delete the property
after retrieving the data.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing the actual property type,
the data format and the data</td></tr></tbody></table><p>The <code class="methodname">property_get</code>() method returns a
tuple containing the actual property type (as a <a class="link" href="class-gdkatom.html" title="gtk.gdk.Atom"><code class="classname">gtk.gdk.Atom</code></a>), the
format and the data of the specified <em class="parameter"><code>property</code></em> with
the specified <em class="parameter"><code>type</code></em>. The value of
<em class="parameter"><code>type</code></em> 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
<a class="link" href="class-gdkatom.html" title="gtk.gdk.Atom"><code class="classname">gtk.gdk.Atom</code></a>
objects or integers if the data format is 32. If
<em class="parameter"><code>property</code></em> cannot be found <code class="literal">None</code> is
returned. <em class="parameter"><code>property</code></em> and <em class="parameter"><code>type</code></em>
(if specified) must be a string or a <a class="link" href="class-gdkatom.html" title="gtk.gdk.Atom"><code class="classname">gtk.gdk.Atom</code></a>.</p></div><div class="refsect2" title="gtk.gdk.Window.property_change"><a name="method-gdkwindow--property-change"></a><h3>gtk.gdk.Window.property_change</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">property_change</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>property</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>format</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>mode</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>property</code></strong> :</span></p></td><td>the property to change</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>the new type of the property. If
<em class="parameter"><code>mode</code></em> is <code class="literal">gtk.gdk.PROP_MODE_PREPEND</code>
or <code class="literal">gtk.gdk.PROP_MODE_APPEND</code>, then this must match the
existing type or an error will occur.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>format</code></strong> :</span></p></td><td>the new format for the property. If
<em class="parameter"><code>mode</code></em> is <code class="literal">gtk.gdk.PROP_MODE_PREPEND</code>
or <code class="literal">gtk.gdk.PROP_MODE_APPEND</code>, then this must match the
existing format or an error will occur.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>mode</code></strong> :</span></p></td><td>a value describing how the new data is to be
combined with the current data.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>the data for the property</td></tr></tbody></table><p>The <code class="methodname">property_change</code>() method changes
the contents of the specified <em class="parameter"><code>property</code></em> to the
specified <em class="parameter"><code>data</code></em> with the specified
<em class="parameter"><code>type</code></em> and <em class="parameter"><code>format</code></em>. The value of
<em class="parameter"><code>mode</code></em> must be one of the <a class="xref" href="gdk-constants.html#gdk-property-mode-constants" title="GDK Property Mode Constants">GDK Property Mode Constants</a> which describes how the
new data is to be combined with the existing property data.The value of
<em class="parameter"><code>format</code></em> must be 8, 16 or
32. <em class="parameter"><code>property</code></em> and <em class="parameter"><code>type</code></em> must be
a string or a <a class="link" href="class-gdkatom.html" title="gtk.gdk.Atom"><code class="classname">gtk.gdk.Atom</code></a>.</p></div><div class="refsect2" title="gtk.gdk.Window.property_delete"><a name="method-gdkwindow--property-delete"></a><h3>gtk.gdk.Window.property_delete</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">property_delete</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>property</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>property</code></strong> :</span></p></td><td>the property to delete</td></tr></tbody></table><p>The <code class="methodname">property_delete</code>() method deletes
the specified <em class="parameter"><code>property</code></em> from the window.
<em class="parameter"><code>property</code></em> must be a string or a gtk.gdk.Atom.</p></div><div class="refsect2" title="gtk.gdk.Window.selection_convert"><a name="method-gdkwindow--selection-convert"></a><h3>gtk.gdk.Window.selection_convert</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">selection_convert</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>selection</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>target</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>selection</code></strong> :</span></p></td><td>the selection to retrieve</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>target</code></strong> :</span></p></td><td>the target form of
<em class="parameter"><code>selection</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>time</code></strong> :</span></p></td><td>the timestamp to use when retrieving
<em class="parameter"><code>selection</code></em>. The selection owner may refuse the request
if it did not own the selection at the time indicated by the
timestamp.</td></tr></tbody></table><p>The <code class="methodname">selection_convert</code>() method converts
the specified <em class="parameter"><code>selection</code></em> to the specified
<em class="parameter"><code>form</code></em>.</p></div><div class="refsect2" title="gtk.gdk.Window.set_keep_above"><a name="method-gdkwindow--set-keep-above"></a><h3>gtk.gdk.Window.set_keep_above</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_keep_above</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>setting</code></strong> :</span></p></td><td>xif <code class="literal">True</code> keep the window
above other windows</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_keep_above</code>() method sets the
"keep-above" setting to the value of <em class="parameter"><code>setting</code></em>. If
<em class="parameter"><code>setting</code></em> is <code class="literal">True</code> the window must be
kept above other windows. If the window is already above, then this method
does nothing.</p><p>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.</p></div><div class="refsect2" title="gtk.gdk.Window.set_keep_below"><a name="method-gdkwindow--set-keep-below"></a><h3>gtk.gdk.Window.set_keep_below</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_keep_below</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>setting</code></strong> :</span></p></td><td>if <code class="literal">True</code>, keep the window
below other windows</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_keep_below</code>() method sets the
"keep-below" setting to the value of <em class="parameter"><code>setting</code></em>. If
<em class="parameter"><code>setting</code></em> is <code class="literal">True</code> the window must be
kept below other windows. If the window was already below, then this
method does nothing.</p><p>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.</p></div><div class="refsect2" title="gtk.gdk.Window.destroy"><a name="method-gdkwindow--destroy"></a><h3>gtk.gdk.Window.destroy</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">destroy</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">destroy</code>() 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.</p></div><div class="refsect2" title="gtk.gdk.Window.get_window_type"><a name="method-gdkwindow--get-window-type"></a><h3>gtk.gdk.Window.get_window_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_window_type</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the type of window</td></tr></tbody></table><p>The <code class="methodname">get_window_type</code>() method returns
the type of the window which is one of the <a class="xref" href="gdk-constants.html#gdk-window-type-constants" title="GDK Window Type Constants">GDK Window Type Constants</a>.</p></div><div class="refsect2" title="gtk.gdk.Window.show"><a name="method-gdkwindow--show"></a><h3>gtk.gdk.Window.show</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">show</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">show</code>() 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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--hide" title="gtk.gdk.Window.hide"><code class="methodname">hide</code>()</a>
method. When implementing a <a class="link" href="class-gtkwidget.html" title="gtk.Widget"><code class="classname">gtk.Widget</code></a>, you
should call this method on the widget's <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> as
part of the "map" method.</p></div><div class="refsect2" title="gtk.gdk.Window.hide"><a name="method-gdkwindow--hide"></a><h3>gtk.gdk.Window.hide</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">hide</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">hide</code>() 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 <a class="link" href="class-gtkwidget.html#method-gtkwidget--hide" title="gtk.Widget.hide"><code class="methodname">gtk.Widget.hide</code>()</a>
method.</p></div><div class="refsect2" title="gtk.gdk.Window.withdraw"><a name="method-gdkwindow--withdraw"></a><h3>gtk.gdk.Window.withdraw</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">withdraw</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">withdraw</code>() method withdraws the
window (unmaps it and asks the window manager to forget about it). This is
normally done automatically by the <a class="link" href="class-gtkwidget.html#method-gtkwidget--hide" title="gtk.Widget.hide"><code class="methodname">gtk.Widget.hide</code>()</a>
method called on a <a class="link" href="class-gtkwindow.html" title="gtk.Window"><code class="classname">gtk.Window</code></a>.</p></div><div class="refsect2" title="gtk.gdk.Window.move"><a name="method-gdkwindow--move"></a><h3>gtk.gdk.Window.move</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">move</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the X coordinate relative to the window's
parent</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the Y coordinate relative to the window's
parent</td></tr></tbody></table><p>The <code class="methodname">move</code>() method repositions the
window to the location specified by <em class="parameter"><code>x</code></em> and
<em class="parameter"><code>y</code></em> relative to its parent window. For toplevel
windows, window managers may ignore or modify the move. You should probably
use the <a class="link" href="class-gtkwindow.html#method-gtkwindow--move" title="gtk.Window.move"><code class="methodname">gtk.Window.move</code>()</a>
method on a <a class="link" href="class-gtkwindow.html" title="gtk.Window"><code class="classname">gtk.Window</code></a> 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
<a class="link" href="class-gdkwindow.html#method-gdkwindow--move-resize" title="gtk.gdk.Window.move_resize"><code class="methodname">move_resize</code>()</a>
method to both move and resize simultaneously, for a nicer visual
effect.</p></div><div class="refsect2" title="gtk.gdk.Window.resize"><a name="method-gdkwindow--resize"></a><h3>gtk.gdk.Window.resize</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">resize</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the new width of the
window</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the new height of the
window</td></tr></tbody></table><p>The <code class="methodname">resize</code>() method resizes the window
to the specified <em class="parameter"><code>width</code></em> and
<em class="parameter"><code>height</code></em>. 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 <a class="link" href="class-gtkwindow.html#method-gtkwindow--resize" title="gtk.Window.resize"><code class="methodname">gtk.Window.resize</code>()</a>
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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--move-resize" title="gtk.gdk.Window.move_resize"><code class="methodname">move_resize</code>()</a>
method to both move and resize simultaneously, for a nicer visual
effect.</p></div><div class="refsect2" title="gtk.gdk.Window.move_resize"><a name="method-gdkwindow--move-resize"></a><h3>gtk.gdk.Window.move_resize</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">move_resize</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the new X position relative to the window's
parent</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the new Y position relative to the window's
parent</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the new width</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the new height</td></tr></tbody></table><p>The <code class="methodname">move_resize</code>() method repositions
the window to the location specified by <em class="parameter"><code>x</code></em> and
<em class="parameter"><code>y</code></em> with the size specified by
<em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em>. This method
is equivalent to calling the <a class="link" href="class-gdkwindow.html#method-gdkwindow--move" title="gtk.gdk.Window.move"><code class="methodname">move</code>()</a> and
<a class="link" href="class-gdkwindow.html#method-gdkwindow--resize" title="gtk.gdk.Window.resize"><code class="methodname">resize</code>()</a>
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 <code class="methodname">move_resize</code>()
method.)</p></div><div class="refsect2" title="gtk.gdk.Window.reparent"><a name="method-gdkwindow--reparent"></a><h3>gtk.gdk.Window.reparent</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">reparent</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>new_parent</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>new_parent</code></strong> :</span></p></td><td>the new parent <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> to
move the window into</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the X location inside the new
parent</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the Y location inside the new
parent</td></tr></tbody></table><p>The <code class="methodname">reparent</code>() method reparents the
window into the <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
specified <em class="parameter"><code>new_parent</code></em>. The window being reparented
will be unmapped as a side effect.</p></div><div class="refsect2" title="gtk.gdk.Window.clear"><a name="method-gdkwindow--clear"></a><h3>gtk.gdk.Window.clear</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">clear</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">clear</code>() method clears an entire the
window to the background color or background pixmap.</p></div><div class="refsect2" title="gtk.gdk.Window.clear_area"><a name="method-gdkwindow--clear-area"></a><h3>gtk.gdk.Window.clear_area</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">clear_area</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the X coordinate of the rectangle to
clear</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the Y coordinate of the rectangle to
clear</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the width of the rectangle to
clear</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height of the rectangle to
clear</td></tr></tbody></table><p>The <code class="methodname">clear_area</code>() method clears the area
(specified by <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>,
<em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em>) of the
window to the background color or background pixmap.</p></div><div class="refsect2" title="gtk.gdk.Window.clear_area_e"><a name="method-gdkwindow--clear-area-e"></a><h3>gtk.gdk.Window.clear_area_e</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">clear_area_e</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the X coordinate of the rectangle to
clear</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the Y coordinate of the rectangle to
clear</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the width of the rectangle to
clear</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height of the rectangle to
clear</td></tr></tbody></table><p>The <code class="methodname">clear_area_e</code>() method is like the
<a class="link" href="class-gdkwindow.html#method-gdkwindow--clear-area" title="gtk.gdk.Window.clear_area"><code class="methodname">clear_area</code>()</a>,
but also generates an expose event for the cleared area.</p></div><div class="refsect2" title="gtk.gdk.Window.raise_"><a name="method-gdkwindow--raise_"></a><h3>gtk.gdk.Window.raise_</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">raise_</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">raise_</code>() 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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--raise_" title="gtk.gdk.Window.raise_"><code class="methodname">raise_</code>()</a>
method only requests the restack, it does not guarantee it.</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
This method is called <code class="methodname">raise</code>() in
the C API, but was renamed <code class="methodname">raise_</code>()
since <code class="literal">raise</code> is a reserved Python keyword.
</p></div></div><div class="refsect2" title="gtk.gdk.Window.lower"><a name="method-gdkwindow--lower"></a><h3>gtk.gdk.Window.lower</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">lower</span>(<span class="methodparam"></span>)</code></pre><p>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
<a class="link" href="class-gdkwindow.html#method-gdkwindow--lower" title="gtk.gdk.Window.lower"><code class="methodname">lower</code>()</a>
only requests the restack, it does not guarantee it. Note that the <a class="link" href="class-gdkwindow.html#method-gdkwindow--show" title="gtk.gdk.Window.show"><code class="methodname">show</code>()</a>
method raises the window again, so don't call this method before calling the
<a class="link" href="class-gdkwindow.html#method-gdkwindow--show" title="gtk.gdk.Window.show"><code class="methodname">show</code>()</a>
method to avoid duplication.</p></div><div class="refsect2" title="gtk.gdk.Window.focus"><a name="method-gdkwindow--focus"></a><h3>gtk.gdk.Window.focus</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">focus</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>timestamp</code></strong></span><span class="initializer">=0L</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>timestamp</code></strong> :</span></p></td><td>the timestamp of the event triggering the
window focus</td></tr></tbody></table><p>The <code class="methodname">focus</code>() method sets keyboard focus
to the window. If the window is not on-screen this will not work. In most
cases, the <a class="link" href="class-gtkwindow.html#method-gtkwindow--present" title="gtk.Window.present"><code class="methodname">gtk.Window.present</code>()</a>
method should be used on a <a class="link" href="class-gtkwindow.html" title="gtk.Window"><code class="classname">gtk.Window</code></a>, rather
than calling this method.</p></div><div class="refsect2" title="gtk.gdk.Window.set_user_data"><a name="method-gdkwindow--set-user-data"></a><h3>gtk.gdk.Window.set_user_data</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_user_data</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>a <a class="link" href="class-gtkwidget.html" title="gtk.Widget"><code class="classname">gtk.Widget</code></a></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_user_data</code>() method stores the
underlying GTK+ widget of the PyGTK widget that is specified by
<em class="parameter"><code>user_data</code></em> as the user data of the window. In general
GTK+ stores the widget that owns a <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> as
user data on a <a class="link" href="class-gtkwindow.html" title="gtk.Window"><code class="classname">gtk.Window</code></a>. So,
custom widget implementations in <code class="literal">PyGTK</code> should use this
method to provide that capability. If <code class="literal">GTK+</code> receives an
event for a <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>, and
the user data for the window is set, <code class="literal">GTK+</code> will assume the
user data is a <a class="link" href="class-gtkwidget.html" title="gtk.Widget"><code class="classname">gtk.Widget</code></a>, and
forward the event to that widget.</p><p>In PyGTK 2.4 and above this method will raise the TypeError
exception if <em class="parameter"><code>user_data</code></em> is not a <a class="link" href="class-gtkwidget.html" title="gtk.Widget"><code class="classname">gtk.Widget</code></a>.</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is deprecated for any use other than the above. To
set other user data on a <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> use
the <PYGTKDOCLINK HREF="method-gobject--set-data"><code class="methodname">gobject.GObject.set_data</code>()</PYGTKDOCLINK>
method instead.</p></div></div><div class="refsect2" title="gtk.gdk.Window.get_user_data"><a name="method-gdkwindow--get-user-data"></a><h3>gtk.gdk.Window.get_user_data</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_user_data</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the user data set on the
window</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_user_data</code>() method returns the
PyGTK widget that was set as the user data of the window using the <a class="link" href="class-gdkwindow.html#method-gdkwindow--set-user-data" title="gtk.gdk.Window.set_user_data"><code class="methodname">set_user_data</code>()</a>
method. This method raises the ValueError exception if the user data is not
set or is not a PyGTK object.</p></div><div class="refsect2" title="gtk.gdk.Window.set_override_redirect"><a name="method-gdkwindow--set-override-redirect"></a><h3>gtk.gdk.Window.set_override_redirect</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_override_redirect</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>override_redirect</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>override_redirect</code></strong> :</span></p></td><td>if <code class="literal">True</code> the window should be
override redirect</td></tr></tbody></table><p>The <code class="methodname">set_override_redirect</code>() method sets
the "override redirect" attribute on the window to the value specified by
<em class="parameter"><code>override_redirect</code></em>. If
<em class="parameter"><code>override_redirect</code></em> is <code class="literal">True</code> 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. <a class="link" href="class-gtkmenu.html" title="gtk.Menu"><code class="classname">gtk.Menu</code></a> uses an
override redirect window in its implementation, for example. This method
does not work on MS Windows.</p></div><div class="refsect2" title="gtk.gdk.Window.add_filter"><a name="method-gdkwindow--add-filter"></a><h3>gtk.gdk.Window.add_filter</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_filter</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>function</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>function</code></strong> :</span></p></td><td>a function</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>data to pass to
<em class="parameter"><code>function</code></em></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <code class="methodname">add_filter</code>() method adds an event
filter function specified by <em class="parameter"><code>function</code></em> 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:</p><pre class="programlisting">
def function(<em class="parameter"><code>event</code></em>, <em class="parameter"><code>user_data</code></em>)
</pre><p>where <em class="parameter"><code>event</code></em> is a <a class="link" href="class-gdkevent.html" title="gtk.gdk.Event"><code class="classname">gtk.gdk.Event</code></a> and
<em class="parameter"><code>user_data</code></em> is <em class="parameter"><code>data</code></em>. If
<em class="parameter"><code>data</code></em> is not specified then
<em class="parameter"><code>user_data</code></em> is not passed to
<em class="parameter"><code>function</code></em>.</p><p><em class="parameter"><code>function</code></em> should return one of the
following values which is on of the <a class="xref" href="gdk-constants.html#gdk-filter-return-constants" title="GDK Filter Return Constants">GDK Filter Return Constants</a>.</p></div><div class="refsect2" title="gtk.gdk.Window.scroll"><a name="method-gdkwindow--scroll"></a><h3>gtk.gdk.Window.scroll</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">scroll</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>dx</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dy</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>dx</code></strong> :</span></p></td><td>the amount to scroll in the X
direction</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>dy</code></strong> :</span></p></td><td>the amount to scroll in the Y
direction</td></tr></tbody></table><p>The <code class="methodname">scroll</code>() method scrolls the
contents of the window, both pixels and children, by the horizontal and
vertical amounts specified by <em class="parameter"><code>dx</code></em> and
<em class="parameter"><code>dy</code></em> 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.)</p></div><div class="refsect2" title="gtk.gdk.Window.shape_combine_mask"><a name="method-gdkwindow--shape-combine-mask"></a><h3>gtk.gdk.Window.shape_combine_mask</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">shape_combine_mask</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>shape_mask</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset_y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>shape_mask</code></strong> :</span></p></td><td>the shape bitmap mask</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>offset_x</code></strong> :</span></p></td><td>the X position of shape mask with respect to
the window</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>offset_y</code></strong> :</span></p></td><td>the Y position of shape mask with respect to
the window</td></tr></tbody></table><p>The <code class="methodname">shape_combine_mask</code>() method applies
the bitmap mask specified by <em class="parameter"><code>shape_mask</code></em> to the window
at the location specified by <em class="parameter"><code>x</code></em> and
<em class="parameter"><code>y</code></em>. Pixels in the window corresponding to set bits in
the <em class="parameter"><code>shape_mask</code></em> will be visible; pixels in the window
corresponding to unset bits in the <em class="parameter"><code>shape_mask</code></em> will be
transparent. This method provides a non-rectangular window. If
<em class="parameter"><code>shape_mask</code></em> is <code class="literal">None</code>, the shape mask
will be unset, and the <em class="parameter"><code>x</code></em>/<em class="parameter"><code>y</code></em>
parameters are not used.</p><p>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.</p></div><div class="refsect2" title="gtk.gdk.Window.set_child_shapes"><a name="method-gdkwindow--set-child-shapes"></a><h3>gtk.gdk.Window.set_child_shapes</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_child_shapes</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">set_child_shapes</code>() 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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--merge-child-shapes" title="gtk.gdk.Window.merge_child_shapes"><code class="methodname">merge_child_shapes</code>()</a>
method that includes the shape mask of the window in the masks to be
merged.</p></div><div class="refsect2" title="gtk.gdk.Window.merge_child_shapes"><a name="method-gdkwindow--merge-child-shapes"></a><h3>gtk.gdk.Window.merge_child_shapes</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">merge_child_shapes</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">merge_child_shapes</code>() 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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--shape-combine-mask" title="gtk.gdk.Window.shape_combine_mask"><code class="methodname">shape_combine_mask</code>()</a>
method. This method is distinct from the <a class="link" href="class-gdkwindow.html#method-gdkwindow--set-child-shapes" title="gtk.gdk.Window.set_child_shapes"><code class="methodname">set_child_shapes</code>()</a>
method because it includes the window's shape mask in the set of shapes to
be merged.</p></div><div class="refsect2" title="gtk.gdk.Window.is_visible"><a name="method-gdkwindow--is-visible"></a><h3>gtk.gdk.Window.is_visible</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_visible</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the window is
mapped</td></tr></tbody></table><p>The <code class="methodname">is_visible</code>() method returns
<code class="literal">True</code> if the window has been mapped (with the <a class="link" href="class-gdkwindow.html#method-gdkwindow--show" title="gtk.gdk.Window.show"><code class="methodname">show</code>()</a>
method.</p></div><div class="refsect2" title="gtk.gdk.Window.is_viewable"><a name="method-gdkwindow--is-viewable"></a><h3>gtk.gdk.Window.is_viewable</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_viewable</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the window is
viewable</td></tr></tbody></table><p>The <code class="methodname">is_viewable</code>() method returns
<code class="literal">True</code> 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 <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
parents, not to the root window.)</p></div><div class="refsect2" title="gtk.gdk.Window.get_state"><a name="method-gdkwindow--get-state"></a><h3>gtk.gdk.Window.get_state</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_state</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the window state bitfield</td></tr></tbody></table><p>The <code class="methodname">get_state</code>() method returns the
bitwise <code class="literal">OR</code> of the currently active <a class="xref" href="gdk-constants.html#gdk-window-state-constants" title="GDK Window State Flag Constants">GDK Window State Flag Constants</a>.</p></div><div class="refsect2" title="gtk.gdk.Window.set_static_gravities"><a name="method-gdkwindow--set-static-gravities"></a><h3>gtk.gdk.Window.set_static_gravities</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_static_gravities</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_static</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>use_static</code></strong> :</span></p></td><td>if <code class="literal">True</code> turn on static
gravity</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the server supports
static gravity</td></tr></tbody></table><p>The <code class="methodname">set_static_gravities</code>() method sets
the bit gravity of the given window to the value specified by
<em class="parameter"><code>use_static</code></em>. If <em class="parameter"><code>use_static</code></em> is
<code class="literal">True</code> the window uses static gravity and all children get
static subwindow gravity as well. This method returns
<code class="literal">True</code> if the window system server supports static
gravity.</p></div><div class="refsect2" title="gtk.gdk.Window.get_type_hint"><a name="method-gdkwindow--get-type-hint"></a><h3>gtk.gdk.Window.get_type_hint</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_type_hint</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The type hint set for window.</td></tr></tbody></table><p>
The <code class="methodname">get_type_hint</code>() method returns the
type hint set for a window.
</p></div><div class="refsect2" title="gtk.gdk.Window.set_type_hint"><a name="method-gdkwindow--set-type-hint"></a><h3>gtk.gdk.Window.set_type_hint</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_type_hint</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>hint</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>hint</code></strong> :</span></p></td><td>a hint of the function this window will
have</td></tr></tbody></table><p>The <code class="methodname">set_type_hint</code>() method provides the
specified <em class="parameter"><code>hint</code></em> 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 <a class="xref" href="gdk-constants.html#gdk-window-type-hint-constants" title="GDK Window Type Hint Constants">GDK Window Type Hint Constants</a>.</p></div><div class="refsect2" title="gtk.gdk.Window.set_modal_hint"><a name="method-gdkwindow--set-modal-hint"></a><h3>gtk.gdk.Window.set_modal_hint</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_modal_hint</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>modal</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>modal</code></strong> :</span></p></td><td>if <code class="literal">True</code> the window is
modal.</td></tr></tbody></table><p>The <code class="methodname">set_modal_hint</code>() method sets the
window's modal hint to the value specified by <em class="parameter"><code>modal</code></em>.
If <em class="parameter"><code>modal</code></em> is <code class="literal">True</code> 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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--set-transient-for" title="gtk.gdk.Window.set_transient_for"><code class="methodname">set_transient_for</code>()</a>
method</p></div><div class="refsect2" title="gtk.gdk.Window.set_skip_taskbar_hint"><a name="method-gdkwindow--set-skip-taskbar-hint"></a><h3>gtk.gdk.Window.set_skip_taskbar_hint</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_skip_taskbar_hint</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>modal</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>skip_taskbar</code></strong> :</span></p></td><td>if <code class="literal">True</code> skip the
taskbar.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <code class="methodname">set_skip_taskbar_hint</code>() method sets
the "skip_taskbar" setting to the value specified by
<em class="parameter"><code>skips_taskbar</code></em>. If
<em class="parameter"><code>skips_taskbar</code></em> is <code class="literal">True</code> the window
should <span class="bold"><strong>not</strong></span> appear in a task list or window
list. If the window's semantic type as specified with the <a class="link" href="class-gdkwindow.html#method-gdkwindow--set-type-hint" title="gtk.gdk.Window.set_type_hint"><code class="methodname">set_type_hint()</code></a>
method already fully describes the window, this method should <span class="bold"><strong>not</strong></span> be called in addition; instead you should allow
the window to be treated according to standard policy for its semantic
type.</p></div><div class="refsect2" title="gtk.gdk.Window.set_skip_pager_hint"><a name="method-gdkwindow--set-skip-pager-hint"></a><h3>gtk.gdk.Window.set_skip_pager_hint</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_skip_pager_hint</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>skips_pager</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>skips_pager</code></strong> :</span></p></td><td>if <code class="literal">True</code> skip the pager</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <code class="methodname">set_skip_pager_hint</code>() method sets
the "skip_pager" setting to the value of skips_pager. If skips_pager is True
the window should <span class="bold"><strong>not</strong></span> 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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--set-type-hint" title="gtk.gdk.Window.set_type_hint"><code class="methodname">set_type_hint()</code></a>
already fully describes the window, this method should <span class="bold"><strong>not</strong></span> be called in addition, instead you should allow
the window to be treated according to standard policy for its semantic
type.</p></div><div class="refsect2" title="gtk.gdk.Window.set_geometry_hints"><a name="method-gdkwindow--set-geometry-hints"></a><h3>gtk.gdk.Window.set_geometry_hints</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_geometry_hints</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>min_width</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>min_height</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>max_width</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>max_height</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_width</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>base_height</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width_inc</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height_inc</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>min_aspect</code></strong></span><span class="initializer">=-1.0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>max_aspect</code></strong></span><span class="initializer">=-1.0</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>min_width</code></strong> :</span></p></td><td>minimum width of window or -1 to use
requisition</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>min_height</code></strong> :</span></p></td><td>minimum height of window or -1 to use
requisition</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>max_width</code></strong> :</span></p></td><td>maximum width of window or -1 to use
requisition</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>max_height</code></strong> :</span></p></td><td>maximum height of window or -1 to use
requisition</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>base_width</code></strong> :</span></p></td><td>allowed window widths are
base_width + width_inc * N (where N is any integer) or
-1</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>base_height</code></strong> :</span></p></td><td>allowed window widths are
base_height + height_inc * N (where N is any integer) or
-1</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width_inc</code></strong> :</span></p></td><td>width resize increment</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height_inc</code></strong> :</span></p></td><td>height resize increment</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>min_aspect</code></strong> :</span></p></td><td>minimum width/height ratio</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>max_aspect</code></strong> :</span></p></td><td>maximum width/height ratio</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <code class="methodname">set_geometry_hints</code>() method sets
the geometry hints for the window.</p><p>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().</p><p>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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--set-override-redirect" title="gtk.gdk.Window.set_override_redirect"><code class="methodname">set_override_redirect</code>()</a>
method since these windows are not resizable by the user.</p></div><div class="refsect2" title="gtk.gdk.Window.begin_paint_rect"><a name="method-gdkwindow--begin-paint-rect"></a><h3>gtk.gdk.Window.begin_paint_rect</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">begin_paint_rect</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>rectangle</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>rectangle</code></strong> :</span></p></td><td>the rectangle you intend to draw
to</td></tr></tbody></table><p>The <code class="methodname">begin_paint_rect</code>() method indicates
that you are beginning the process of redrawing the area specified by
<em class="parameter"><code>rectangle</code></em>. A backing store (off-screen buffer) large
enough to contain <em class="parameter"><code>rectangle</code></em> 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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--end-paint" title="gtk.gdk.Window.end_paint"><code class="methodname">end_paint</code>()</a>
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 <em class="parameter"><code>rectangle</code></em>. 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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--end-paint" title="gtk.gdk.Window.end_paint"><code class="methodname">end_paint</code>()</a>
method. If you draw to window directly without calling the
<code class="methodname">begin_paint_rect</code>() method, the user may see flicker
as individual drawing operations are performed in sequence. The clipping and
background initializing features of the
<code class="methodname">begin_paint_rect</code>() are conveniences for the
programmer, so you can avoid doing that work yourself.</p></div><div class="refsect2" title="gtk.gdk.Window.begin_paint_region"><a name="method-gdkwindow--begin-paint-region"></a><h3>gtk.gdk.Window.begin_paint_region</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">begin_paint_region</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>region</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>region</code></strong> :</span></p></td><td>the region you intend to draw to</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">begin_paint_region</code>() method
indicates that you are beginning the process of redrawing the <a class="link" href="class-gdkregion.html" title="gtk.gdk.Region"><code class="classname">gtk.gdk.Region</code></a>
specified by <em class="parameter"><code>region</code></em>. A backing store
(off-screen buffer) large enough to contain
<em class="parameter"><code>region</code></em> 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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--end-paint" title="gtk.gdk.Window.end_paint"><code class="methodname">end_paint</code>()</a>
method, the backing store will be copied to the window, making it
visible on-screen. Only the part of the window contained in
<em class="parameter"><code>region</code></em> will be modified; that is, drawing
operations are clipped to <em class="parameter"><code>region</code></em>.</p><p>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
<a class="link" href="class-gdkwindow.html#method-gdkwindow--end-paint" title="gtk.gdk.Window.end_paint"><code class="methodname">end_paint</code>()</a>
method. If you draw to the window directly without calling the <a class="link" href="class-gdkwindow.html#method-gdkwindow--begin-paint-region" title="gtk.gdk.Window.begin_paint_region"><code class="methodname">begin_paint_region</code>()</a>
method, the user may see flicker as individual drawing operations are
performed in sequence. The clipping and background initializing
features of the <a class="link" href="class-gdkwindow.html#method-gdkwindow--begin-paint-region" title="gtk.gdk.Window.begin_paint_region"><code class="methodname">begin_paint_region</code>()</a>
method are conveniences for the programmer, so you can avoid doing
that work yourself.</p><p>The widget system automatically places calls to the <a class="link" href="class-gdkwindow.html#method-gdkwindow--begin-paint-region" title="gtk.gdk.Window.begin_paint_region"><code class="methodname">begin_paint_region</code>()</a>
and <a class="link" href="class-gdkwindow.html#method-gdkwindow--end-paint" title="gtk.gdk.Window.end_paint"><code class="methodname">end_paint</code>()</a>
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 <a class="link" href="class-gdkevent.html" title="gtk.gdk.Event"><code class="classname">gtk.gdk.Event</code></a>
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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--begin-paint-region" title="gtk.gdk.Window.begin_paint_region"><code class="methodname">begin_paint_region</code>()</a>
method. (You can disable the automatic calls around expose events on a
widget-by-widget basis by calling <a class="link" href="class-gtkwidget.html#method-gtkwidget--set-double-buffered" title="gtk.Widget.set_double_buffered"><code class="methodname">gtk.Widget.set_double_buffered</code>()</a>.)</p><p>If you call this method multiple times before calling the
matching the <a class="link" href="class-gdkwindow.html#method-gdkwindow--end-paint" title="gtk.gdk.Window.end_paint"><code class="methodname">end_paint</code>()</a>
method, the backing stores are pushed onto a stack. The <a class="link" href="class-gdkwindow.html#method-gdkwindow--end-paint" title="gtk.gdk.Window.end_paint"><code class="methodname">end_paint</code>()</a>
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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--end-paint" title="gtk.gdk.Window.end_paint"><code class="methodname">end_paint</code>()</a>
method is required for each call to the <a class="link" href="class-gdkwindow.html#method-gdkwindow--begin-paint-region" title="gtk.gdk.Window.begin_paint_region"><code class="methodname">begin_paint_region</code>()</a>
method.</p></div><div class="refsect2" title="gtk.gdk.Window.end_paint"><a name="method-gdkwindow--end-paint"></a><h3>gtk.gdk.Window.end_paint</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">end_paint</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">end_paint</code>() method indicates that
the backing store created by the most recent call to the <a class="link" href="class-gdkwindow.html#method-gdkwindow--begin-paint-rect" title="gtk.gdk.Window.begin_paint_rect"><code class="methodname">begin_paint_rect</code>()</a>
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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--begin-paint-rect" title="gtk.gdk.Window.begin_paint_rect"><code class="methodname">begin_paint_rect</code>()</a>
method first.</p></div><div class="refsect2" title="gtk.gdk.Window.set_title"><a name="method-gdkwindow--set-title"></a><h3>gtk.gdk.Window.set_title</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_title</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>title</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>title</code></strong> :</span></p></td><td>the new title of the
window</td></tr></tbody></table><p>The <code class="methodname">set_title</code>() method sets the title
of a toplevel window, to the string specified by
<em class="parameter"><code>title</code></em>. If you haven't explicitly set the icon name
for the window (using the <a class="link" href="class-gdkwindow.html#method-gdkwindow--set-icon-name" title="gtk.gdk.Window.set_icon_name"><code class="methodname">set_icon_name</code>()</a>
method), the icon name will be set to <em class="parameter"><code>title</code></em> as well.
<em class="parameter"><code>title</code></em> must be in UTF-8 encoding (as with all
user-readable strings in <code class="literal">PyGTK</code>).</p></div><div class="refsect2" title="gtk.gdk.Window.set_role"><a name="method-gdkwindow--set-role"></a><h3>gtk.gdk.Window.set_role</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_role</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>role</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>role</code></strong> :</span></p></td><td>a string indicating its
role</td></tr></tbody></table><p>The <code class="methodname">set_role</code>() method sets the string
specified by <em class="parameter"><code>role</code></em> as the window's role. When using
<code class="literal">PyGTK</code>, you should generally use the <a class="link" href="class-gtkwindow.html#method-gtkwindow--set-role" title="gtk.Window.set_role"><code class="methodname">gtk.Window.set_role</code>()</a>
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.</p></div><div class="refsect2" title="gtk.gdk.Window.set_transient_for"><a name="method-gdkwindow--set-transient-for"></a><h3>gtk.gdk.Window.set_transient_for</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_transient_for</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>leader</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>leader</code></strong> :</span></p></td><td>another <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a></td></tr></tbody></table><p>The <code class="methodname">set_transient_for</code>() method
indicates to the window manager that the window is a transient dialog
associated with the application window <em class="parameter"><code>leader</code></em>. This
allows the window manager to do things like center the window on
<em class="parameter"><code>leader</code></em> and keep the window above
<em class="parameter"><code>leader</code></em>. See the <a class="link" href="class-gtkwindow.html#method-gtkwindow--set-transient-for" title="gtk.Window.set_transient_for"><code class="methodname">gtk.Window.set_transient_for</code>()</a>
method if you're using a <a class="link" href="class-gtkwindow.html" title="gtk.Window"><code class="classname">gtk.Window</code></a> or <a class="link" href="class-gtkdialog.html" title="gtk.Dialog"><code class="classname">gtk.Dialog</code></a>.</p></div><div class="refsect2" title="gtk.gdk.Window.set_background"><a name="method-gdkwindow--set-background"></a><h3>gtk.gdk.Window.set_background</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_background</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>color</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>color</code></strong> :</span></p></td><td>an allocated <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a></td></tr></tbody></table><p>The <code class="methodname">set_background</code>() method sets the
background <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a> of the
window to the value specified by <em class="parameter"><code>color</code></em>. (However,
when using <code class="literal">PyGTK</code>, set the background of a widget with the
<a class="link" href="class-gtkwidget.html#method-gtkwidget--modify-bg" title="gtk.Widget.modify_bg"><code class="methodname">gtk.Widget.modify_bg</code>()</a>
method from an application - or the <a class="link" href="class-gtkstyle.html#method-gtkstyle--set-background" title="gtk.Style.set_background"><code class="methodname">gtk.Style.set_background</code>()</a>
method from a custom widget implementation.) The
<em class="parameter"><code>color</code></em> must be allocated Also see the <a class="link" href="class-gdkwindow.html#method-gdkwindow--set-back-pixmap" title="gtk.gdk.Window.set_back_pixmap"><code class="methodname">set_back_pixmap</code>()</a>
method.</p></div><div class="refsect2" title="gtk.gdk.Window.set_back_pixmap"><a name="method-gdkwindow--set-back-pixmap"></a><h3>gtk.gdk.Window.set_back_pixmap</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_back_pixmap</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixmap</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>parent_relative</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>pixmap</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>, or
<code class="literal">None</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>parent_relative</code></strong> :</span></p></td><td>if <code class="literal">True</code> the tiling origin is
at the origin of the window's parent</td></tr></tbody></table><p>The <code class="methodname">set_back_pixmap</code>() method sets the
background pixmap of the window to the value specified by
<em class="parameter"><code>pixmap</code></em> A background pixmap will be tiled, positioning
the first tile at the origin of the window, or if
<em class="parameter"><code>parent_relative</code></em> is <code class="literal">True</code>, 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
<em class="parameter"><code>pixmap</code></em> is <code class="literal">None</code> 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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--clear" title="gtk.gdk.Window.clear"><code class="methodname">clear</code>()</a>
method.</p></div><div class="refsect2" title="gtk.gdk.Window.set_cursor"><a name="method-gdkwindow--set-cursor"></a><h3>gtk.gdk.Window.set_cursor</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_cursor</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cursor</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cursor</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkcursor.html" title="gtk.gdk.Cursor"><code class="classname">gtk.gdk.Cursor</code></a> or
<code class="literal">None</code></td></tr></tbody></table><p>The <code class="methodname">set_cursor</code>() method sets the mouse
pointer for a <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>. Use
either the <a class="link" href="class-gdkcursor.html#constructor-gdkcursor1">gtk.gdk.Cursor()</a> or
<a class="link" href="class-gdkcursor.html#constructor-gdkcursor2">gtk.gdk.Cursor</a>() constructors
to create the cursor. To make the cursor invisible, use the <a class="link" href="class-gdkcursor.html#constructor-gdkcursor2">gtk.gdk.Cursor</a>() constructor to
create a cursor with no pixels in it. Passing <code class="literal">None</code> for
the <em class="parameter"><code>cursor</code></em> argument to the
<code class="methodname">set_cursor</code>() method means that the window will use
the cursor of its parent window. Most windows should use this
default.</p></div><div class="refsect2" title="gtk.gdk.Window.get_geometry"><a name="method-gdkwindow--get-geometry"></a><h3>gtk.gdk.Window.get_geometry</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_geometry</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>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.</td></tr></tbody></table><p>The <code class="methodname">get_geometry</code>() 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).
</p><p>
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
<code class="literal">GdkEventConfigure</code>. the <a class="link" href="class-gdkwindow.html#method-gdkwindow--get-position" title="gtk.gdk.Window.get_position"><code class="methodname">get_position</code>()</a>
method in contrast gets the position from the most recent configure
event.</p></div><div class="refsect2" title="gtk.gdk.Window.get_position"><a name="method-gdkwindow--get-position"></a><h3>gtk.gdk.Window.get_position</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_position</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 2-tuple containing the X and Y coordinates of
the window location.</td></tr></tbody></table><p>The <code class="methodname">get_position</code>() returns a 2-tuple
containing the position of the window as reported in the
most-recently-processed <code class="literal">GdkEventConfigure</code>. By comparison
with the <a class="link" href="class-gdkwindow.html#method-gdkwindow--get-geometry" title="gtk.gdk.Window.get_geometry"><code class="methodname">get_geometry</code>()</a>
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.</p></div><div class="refsect2" title="gtk.gdk.Window.get_origin"><a name="method-gdkwindow--get-origin"></a><h3>gtk.gdk.Window.get_origin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_origin</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 2-tuple containing the X and Y coordinates of
the window</td></tr></tbody></table><p>The <code class="methodname">get_origin</code>() 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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--get-position" title="gtk.gdk.Window.get_position"><code class="methodname">get_position</code>()</a>
and <a class="link" href="class-gdkwindow.html#method-gdkwindow--get-geometry" title="gtk.gdk.Window.get_geometry"><code class="methodname">get_geometry</code>()</a>
methods that return the position of a window relative to its parent
window.)</p></div><div class="refsect2" title="gtk.gdk.Window.get_root_origin"><a name="method-gdkwindow--get-root-origin"></a><h3>gtk.gdk.Window.get_root_origin</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_root_origin</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 2-tuple containing the X and Y coordinates of
the window frame position</td></tr></tbody></table><p>The <code class="methodname">get_root_origin</code>() method returns a
2-tuple containing the top-left corner of the window manager frame in root
window coordinates.</p></div><div class="refsect2" title="gtk.gdk.Window.get_frame_extents"><a name="method-gdkwindow--get-frame-extents"></a><h3>gtk.gdk.Window.get_frame_extents</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_frame_extents</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkrectangle.html" title="gtk.gdk.Rectangle"><code class="classname">gtk.gdk.Rectangle</code></a>
specifying the bounding box of the window frame</td></tr></tbody></table><p>The <code class="methodname">get_frame_extents</code>() method returns
a <a class="link" href="class-gdkrectangle.html" title="gtk.gdk.Rectangle"><code class="classname">gtk.gdk.Rectangle</code></a>
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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--get-origin" title="gtk.gdk.Window.get_origin"><code class="methodname">get_origin</code>()</a>
method.</p></div><div class="refsect2" title="gtk.gdk.Window.get_pointer"><a name="method-gdkwindow--get-pointer"></a><h3>gtk.gdk.Window.get_pointer</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_pointer</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 3-tuple containing the X and Y coordinates of
the mouse pointer and the modifier mask</td></tr></tbody></table><p>The <code class="methodname">get_pointer</code>() 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 <a class="xref" href="gdk-constants.html#gdk-modifier-constants" title="GDK Modifier Constants">GDK Modifier Constants</a>.</p></div><div class="refsect2" title="gtk.gdk.Window.get_parent"><a name="method-gdkwindow--get-parent"></a><h3>gtk.gdk.Window.get_parent</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_parent</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the parent <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> of
the window</td></tr></tbody></table><p>The <code class="methodname">get_parent</code>() method returns the
parent of the window as set when the <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> was
created or when the <a class="link" href="class-gdkwindow.html#method-gdkwindow--reparent" title="gtk.gdk.Window.reparent"><code class="methodname">reparent</code>()</a>
method was called.</p></div><div class="refsect2" title="gtk.gdk.Window.get_toplevel"><a name="method-gdkwindow--get-toplevel"></a><h3>gtk.gdk.Window.get_toplevel</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_toplevel</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the toplevel <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
containing the window</td></tr></tbody></table><p>The <code class="methodname">get_toplevel</code>() method returns the
toplevel <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
that's an ancestor of the window.</p></div><div class="refsect2" title="gtk.gdk.Window.get_children"><a name="method-gdkwindow--get-children"></a><h3>gtk.gdk.Window.get_children</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_children</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the list of child windows inside the
window</td></tr></tbody></table><p>The <code class="methodname">get_children</code>() method returns the
list of children <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
objects of the window. This method only returns children created via
<code class="literal">PyGTK</code>, so for example it's useless when used with the
root window; it only returns windows an application created itself.</p></div><div class="refsect2" title="gtk.gdk.Window.get_events"><a name="method-gdkwindow--get-events"></a><h3>gtk.gdk.Window.get_events</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_events</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the event mask for the
window</td></tr></tbody></table><p>The <code class="methodname">get_events</code>() method returns the
event mask for the window. See the <a class="link" href="class-gdkwindow.html#method-gdkwindow--set-events" title="gtk.gdk.Window.set_events"><code class="methodname">set_events</code>()</a>
method for more detail.</p></div><div class="refsect2" title="gtk.gdk.Window.set_events"><a name="method-gdkwindow--set-events"></a><h3>gtk.gdk.Window.set_events</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_events</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>event_mask</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>event_mask</code></strong> :</span></p></td><td>the event mask for the
window</td></tr></tbody></table><p>The <code class="methodname">set_events</code>() 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 <code class="literal">gtk.gdk.BUTTON_PRESS_MASK</code> means the
window should report button press events. The event mask is the bitwise OR
of the <a class="xref" href="gdk-constants.html#gdk-event-mask-constants" title="GDK Event Mask Flag Constants">GDK Event Mask Flag Constants</a>.</p></div><div class="refsect2" title="gtk.gdk.Window.set_icon_list"><a name="method-gdkwindow--set-icon-list"></a><h3>gtk.gdk.Window.set_icon_list</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_icon_list</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbufs</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>pixbufs</code></strong> :</span></p></td><td>a list (or tuple) containing pixbufs, of
different sizes.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <code class="methodname">set_icon_list</code>() method sets the
list of icons for the window. pixbufs is a list or tuple containing <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a>
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.</p></div><div class="refsect2" title="gtk.gdk.Window.set_icon"><a name="method-gdkwindow--set-icon"></a><h3>gtk.gdk.Window.set_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_icon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixmap</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>mask</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>icon_window</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> to
use for the icon</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>pixmap</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> to
use as the icon</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>mask</code></strong> :</span></p></td><td>a 1-bit pixmap (<code class="literal">GdkBitmap</code>)
to use as mask for <em class="parameter"><code>pixmap</code></em></td></tr></tbody></table><p>The <code class="methodname">set_icon</code>() method sets the icon of
the window as a <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>
(specified by <em class="parameter"><code>pixmap</code></em>) or <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
specified by <em class="parameter"><code>icon_window</code></em>). Investigate the <a class="link" href="class-gtkwindow.html#function-gtk--window-set-default-icon-list" title="gtk.window_set_default_icon_list"><code class="methodname">gtk.window_set_default_icon_list()</code>()</a>
function first, and then the <a class="link" href="class-gtkwindow.html#method-gtkwindow--set-icon-list" title="gtk.Window.set_icon_list"><code class="methodname">gtk.Window.set_icon_list</code>()</a>
and <a class="link" href="class-gtkwindow.html#method-gtkwindow--set-icon" title="gtk.Window.set_icon"><code class="methodname">gtk.Window.set_icon</code>()</a>
methods. If those don't meet your needs, look at the <a class="link" href="class-gdkwindow.html#method-gdkwindow--set-icon-list" title="gtk.gdk.Window.set_icon_list"><code class="methodname">set_icon_list</code>()</a>
method. Only if all those are too high-level do you want to fall back to the
<a class="link" href="class-gdkwindow.html#method-gdkwindow--set-icon" title="gtk.gdk.Window.set_icon"><code class="methodname">set_icon</code>()</a>.</p></div><div class="refsect2" title="gtk.gdk.Window.set_icon_name"><a name="method-gdkwindow--set-icon-name"></a><h3>gtk.gdk.Window.set_icon_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_icon_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>name</code></strong> :</span></p></td><td>the name of the window while iconified
(minimized)</td></tr></tbody></table><p>The <code class="methodname">set_icon_name</code>() method sets the
name of the window when it is iconified to the value of
<em class="parameter"><code>name</code></em>. 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.</p></div><div class="refsect2" title="gtk.gdk.Window.set_group"><a name="method-gdkwindow--set-group"></a><h3>gtk.gdk.Window.set_group</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_group</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>leader</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>leader</code></strong> :</span></p></td><td>the group leader <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a></td></tr></tbody></table><p>The <code class="methodname">set_group</code>() method sets the group
leader for the window to the <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
specified by <em class="parameter"><code>leader</code></em>. By default, the group leader
for all toplevel windows is set to a global window implicitly created by
<code class="literal">PyGTK</code>. 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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--show" title="gtk.gdk.Window.show"><code class="methodname">show</code>()</a>
method for example).</p></div><div class="refsect2" title="gtk.gdk.Window.get_group"><a name="method-gdkwindow--get-group"></a><h3>gtk.gdk.Window.get_group</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_group</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the group leader <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
for the window</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_group</code>() method returns the
group leader <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> for
the window. See the <a class="link" href="class-gdkwindow.html#method-gdkwindow--set-group" title="gtk.gdk.Window.set_group"><code class="methodname">set_group()</code></a>
method for more information.</p></div><div class="refsect2" title="gtk.gdk.Window.set_decorations"><a name="method-gdkwindow--set-decorations"></a><h3>gtk.gdk.Window.set_decorations</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_decorations</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>decorations</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>decorations</code></strong> :</span></p></td><td>the decoration hint mask</td></tr></tbody></table><p>The <code class="methodname">set_decorations</code>() method sets the
specified decorations for the window. "Decorations" are the features the
window manager adds to a toplevel <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>. 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 <a class="link" href="class-gtkwindow.html#method-gtkwindow--set-decorated" title="gtk.Window.set_decorated"><code class="methodname">gtk.Window.set_decorated</code>()</a>
method on a <a class="link" href="class-gtkwindow.html" title="gtk.Window"><code class="classname">gtk.Window</code></a> instead
of using this method directly. The value of
<em class="parameter"><code>decorations</code></em> is the logical OR of the <a class="xref" href="gdk-constants.html#gdk-wm-decoration-constants" title="GDK WM Decoration Constants">GDK WM Decoration Constants</a>.</p></div><div class="refsect2" title="gtk.gdk.Window.get_decorations"><a name="method-gdkwindow--get-decorations"></a><h3>gtk.gdk.Window.get_decorations</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_decorations</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the window decorations</td></tr></tbody></table><p>The <code class="methodname">get_decorations</code>() method returns
the decorations set on the window with the <a class="link" href="class-gdkwindow.html#method-gdkwindow--set-decorations" title="gtk.gdk.Window.set_decorations"><code class="methodname">set_decorations</code></a>
method.</p></div><div class="refsect2" title="gtk.gdk.Window.set_functions"><a name="method-gdkwindow--set-functions"></a><h3>gtk.gdk.Window.set_functions</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_functions</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>functions</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>functions</code></strong> :</span></p></td><td>the bitmask of operations to allow on the
window</td></tr></tbody></table><p>The <code class="methodname">set_functions</code>() 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 <em class="parameter"><code>functions</code></em> argument is the logical OR of
the <a class="xref" href="gdk-constants.html#gdk-wm-function-constants" title="GDK WM Function Constants">GDK WM Function Constants</a>.</p></div><div class="refsect2" title="gtk.gdk.Window.iconify"><a name="method-gdkwindow--iconify"></a><h3>gtk.gdk.Window.iconify</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">iconify</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">iconify</code>() 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 <a class="link" href="class-gtkwindow.html#method-gtkwindow--iconify" title="gtk.Window.iconify"><code class="methodname">gtk.Window.iconify</code>()</a>
method is preferred, if you have a <a class="link" href="class-gtkwindow.html" title="gtk.Window"><code class="classname">gtk.Window</code></a>
widget.</p></div><div class="refsect2" title="gtk.gdk.Window.deiconify"><a name="method-gdkwindow--deiconify"></a><h3>gtk.gdk.Window.deiconify</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">deiconify</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">deiconify</code>() 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 <a class="link" href="class-gtkwindow.html#method-gtkwindow--deiconify" title="gtk.Window.deiconify"><code class="methodname">gtk.Window.deiconify</code>()</a>
method is preferred. Or better yet, use the <a class="link" href="class-gtkwindow.html#method-gtkwindow--present" title="gtk.Window.present"><code class="methodname">gtk.Window.present</code>()</a>,
which raises the window, focuses it, unminimizes it, and puts it on the
current desktop.</p></div><div class="refsect2" title="gtk.gdk.Window.stick"><a name="method-gdkwindow--stick"></a><h3>gtk.gdk.Window.stick</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">stick</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">stick</code>() 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 <a class="link" href="class-gtkwindow.html" title="gtk.Window"><code class="classname">gtk.Window</code></a>, the
<a class="link" href="class-gtkwindow.html#method-gtkwindow--stick" title="gtk.Window.stick"><code class="methodname">gtk.Window.stick</code>()</a>
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, <code class="literal">PyGTK</code> 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.</p></div><div class="refsect2" title="gtk.gdk.Window.unstick"><a name="method-gdkwindow--unstick"></a><h3>gtk.gdk.Window.unstick</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">unstick</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">unstick</code>() method reverses the
effect of the <a class="link" href="class-gdkwindow.html#method-gdkwindow--stick" title="gtk.gdk.Window.stick"><code class="methodname">stick</code>()</a>
method. See the <a class="link" href="class-gdkwindow.html#method-gdkwindow--stick" title="gtk.gdk.Window.stick"><code class="methodname">stick</code>()</a>
and <a class="link" href="class-gtkwindow.html#method-gtkwindow--unstick" title="gtk.Window.unstick"><code class="methodname">gtk.Window.unstick</code>()</a>
methods for more information.</p></div><div class="refsect2" title="gtk.gdk.Window.maximize"><a name="method-gdkwindow--maximize"></a><h3>gtk.gdk.Window.maximize</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">maximize</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">maximize</code>() 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.</p></div><div class="refsect2" title="gtk.gdk.Window.unmaximize"><a name="method-gdkwindow--unmaximize"></a><h3>gtk.gdk.Window.unmaximize</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">unmaximize</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">unmaximize</code>() 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.</p></div><div class="refsect2" title="gtk.gdk.Window.fullscreen"><a name="method-gdkwindow--fullscreen"></a><h3>gtk.gdk.Window.fullscreen</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">fullscreen</span>(<span class="methodparam"></span>)</code></pre><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <code class="methodname">fullscreen</code>() method moves the window
into fullscreen mode. This means the window covers the entire screen and is
above any panels or task bars.</p><p>If the window was already fullscreen, then this method does
nothing.</p><p>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.</p></div><div class="refsect2" title="gtk.gdk.Window.unfullscreen"><a name="method-gdkwindow--unfullscreen"></a><h3>gtk.gdk.Window.unfullscreen</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">unfullscreen</span>(<span class="methodparam"></span>)</code></pre><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <code class="methodname">unfullscreen</code>() method moves the
window out of fullscreen mode. If the window was not fullscreen, does
nothing.</p><p>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.</p></div><div class="refsect2" title="gtk.gdk.Window.register_dnd"><a name="method-gdkwindow--register-dnd"></a><h3>gtk.gdk.Window.register_dnd</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">register_dnd</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">register_dnd</code>() method registers the
window as a potential drop destination.</p></div><div class="refsect2" title="gtk.gdk.Window.begin_resize_drag"><a name="method-gdkwindow--begin-resize-drag"></a><h3>gtk.gdk.Window.begin_resize_drag</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">begin_resize_drag</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>edge</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>button</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>root_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>root_y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>timestamp</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>edge</code></strong> :</span></p></td><td>the edge or corner from which the drag is
started</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>button</code></strong> :</span></p></td><td>the mouse button being used to
drag</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>root_x</code></strong> :</span></p></td><td>the root window X coordinate of the mouse click
that began the drag</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>root_y</code></strong> :</span></p></td><td>the root window Y coordinate of the mouse click
that began the drag</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>timestamp</code></strong> :</span></p></td><td>the timestamp of the mouse click that began the
drag (use the <a class="link" href="class-gdkevent.html#method-gdkevent--get-time" title="gtk.gdk.Event.get_time"><code class="methodname">gtk.gdk.Event.get_time</code>()</a>
method)</td></tr></tbody></table><p>The <code class="methodname">begin_resize_drag</code>() method begins a
window resize operation (for a toplevel <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>) from
the specified <em class="parameter"><code>edge</code></em> using the specified
<em class="parameter"><code>button</code></em> starting at the location specified by
<em class="parameter"><code>root_x</code></em> and <em class="parameter"><code>root_y</code></em>. The value
of edge must be one of the <a class="xref" href="gdk-constants.html#gdk-window-edge-constants" title="GDK Window Edge Constants">GDK Window Edge Constants</a>.</p><p>You might use this
method to implement a "window resize grip," for example; in fact the <a class="link" href="class-gtkstatusbar.html" title="gtk.Statusbar"><code class="classname">gtk.Statusbar</code></a>
uses it. The method works best with window managers that support the
Extended Window Manager Hints spec (see <a class="ulink" href="http://www.freedesktop.org" target="_top">http://www.freedesktop.org</a>),
but has a fallback implementation for other window managers.</p></div><div class="refsect2" title="gtk.gdk.Window.begin_move_drag"><a name="method-gdkwindow--begin-move-drag"></a><h3>gtk.gdk.Window.begin_move_drag</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">begin_move_drag</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>button</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>root_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>root_y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>timestamp</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>button</code></strong> :</span></p></td><td>the button being used to
drag</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>root_x</code></strong> :</span></p></td><td>the root window X coordinate of the mouse click
that began the drag</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>root_y</code></strong> :</span></p></td><td>the root window Y coordinate of the mouse click
that began the drag</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>timestamp</code></strong> :</span></p></td><td>the timestamp of the mouse click that began the
drag</td></tr></tbody></table><p>The <code class="methodname">begin_move_drag</code>() method begins a
window move operation (for a toplevel window) using the specified
<em class="parameter"><code>button</code></em> starting at the location specified by
<em class="parameter"><code>root_x</code></em> and <em class="parameter"><code>root_y</code></em>. 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 <a class="ulink" href="http://www.freedesktop.org" target="_top">http://www.freedesktop.org</a>),
but has a fallback implementation for other window managers.</p></div><div class="refsect2" title="gtk.gdk.Window.invalidate_rect"><a name="method-gdkwindow--invalidate-rect"></a><h3>gtk.gdk.Window.invalidate_rect</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">invalidate_rect</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>rect</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>invalidate_children</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>rect</code></strong> :</span></p></td><td>the rectangle to
invalidate</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>invalidate_children</code></strong> :</span></p></td><td>if <code class="literal">True</code> invalidate child
<a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
objects</td></tr></tbody></table><p>The <code class="methodname">invalidate_rect</code>() method
invalidates the rectangular region specified by rect. If
<em class="parameter"><code>invalidate_children</code></em> is <code class="literal">True</code> the
child <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
object of the window are also invalidated.</p></div><div class="refsect2" title="gtk.gdk.Window.invalidate_region"><a name="method-gdkwindow--invalidate-region"></a><h3>gtk.gdk.Window.invalidate_region</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">invalidate_region</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>region</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>invalidate_children</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>region</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkregion.html" title="gtk.gdk.Region"><code class="classname">gtk.gdk.Region</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>invalidate_children</code></strong> :</span></p></td><td>If <code class="literal">True</code> also invalidate child
windows</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">invalidate_region</code>() method adds the
<a class="link" href="class-gdkregion.html" title="gtk.gdk.Region"><code class="classname">gtk.gdk.Region</code></a>
specified by <em class="parameter"><code>region</code></em> 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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--process-updates" title="gtk.gdk.Window.process_updates"><code class="methodname">process_updates</code>()</a>
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.</p><p>PyGTK will call the <a class="link" href="class-gdkwindow.html#function-gdk--window-process-all-updates" title="gtk.gdk.window_process_all_updates"><code class="function">gtk.gdk.window_process_all_updates</code>()</a>
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.</p><p>The <em class="parameter"><code>invalidate_children</code></em> parameter
controls whether the region of each child window that intersects
<em class="parameter"><code>region</code></em> will also be invalidated. If
<code class="literal">False</code>, then the update area for child windows will
remain unaffected.</p></div><div class="refsect2" title="gtk.gdk.Window.get_update_area"><a name="method-gdkwindow--get-update-area"></a><h3>gtk.gdk.Window.get_update_area</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_update_area</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkregion.html" title="gtk.gdk.Region"><code class="classname">gtk.gdk.Region</code></a>
conatining the update area for the window</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">get_update_area</code>() method returns a
<a class="link" href="class-gdkregion.html" title="gtk.gdk.Region"><code class="classname">gtk.gdk.Region</code></a>
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 <a class="link" href="class-gdkregion.html" title="gtk.gdk.Region"><code class="classname">gtk.gdk.Region</code></a>. If
a window has no update area, the <a class="link" href="class-gdkwindow.html#method-gdkwindow--get-update-area" title="gtk.gdk.Window.get_update_area"><code class="methodname">get_update_area()</code></a>
method returns <code class="literal">None</code>.</p></div><div class="refsect2" title="gtk.gdk.Window.freeze_updates"><a name="method-gdkwindow--freeze-updates"></a><h3>gtk.gdk.Window.freeze_updates</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">freeze_updates</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">freeze_updates</code>() method temporarily
freezes the window such that it won't receive expose events. The window will
begin receiving expose events again when the <a class="link" href="class-gdkwindow.html#method-gdkwindow--thaw-updates" title="gtk.gdk.Window.thaw_updates"><code class="methodname">thaw_updates</code>()</a>
method is called. If the <code class="methodname">freeze_updates</code>() method
has been called more than once, the <a class="link" href="class-gdkwindow.html#method-gdkwindow--thaw-updates" title="gtk.gdk.Window.thaw_updates"><code class="methodname">thaw_updates</code>()</a>
method must be called an equal number of times to begin processing
exposes.</p></div><div class="refsect2" title="gtk.gdk.Window.thaw_updates"><a name="method-gdkwindow--thaw-updates"></a><h3>gtk.gdk.Window.thaw_updates</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">thaw_updates</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">thaw_updates</code>() method thaws a
window frozen with the <a class="link" href="class-gdkwindow.html#method-gdkwindow--freeze-updates" title="gtk.gdk.Window.freeze_updates"><code class="methodname">freeze_updates</code>()</a>
method.</p></div><div class="refsect2" title="gtk.gdk.Window.process_updates"><a name="method-gdkwindow--process-updates"></a><h3>gtk.gdk.Window.process_updates</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">process_updates</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>update_children</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>update_children</code></strong> :</span></p></td><td>if <code class="literal">True</code> process updates for
child windows</td></tr></tbody></table><p>The <code class="methodname">process_updates</code>() 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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--invalidate-rect" title="gtk.gdk.Window.invalidate_rect"><code class="methodname">invalidate_rect</code>()</a>
method for details). Normally <code class="literal">PyGTK</code> calls the <a class="link" href="class-gdkwindow.html#function-gdk--window-process-all-updates" title="gtk.gdk.window_process_all_updates"><code class="methodname">gtk.gdk.window_process_all_updates</code>()</a>
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 <code class="literal">PyGTK</code> delivers them in an idle
handler). Occasionally this is useful to produce nicer scrolling behavior,
for example.</p></div><div class="refsect2" title="gtk.gdk.Window.set_accept_focus"><a name="method-gdkwindow--set-accept-focus"></a><h3>gtk.gdk.Window.set_accept_focus</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_accept_focus</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accept_focus</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>accept_focus</code></strong> :</span></p></td><td>if <code class="literal">True</code>, the window should
receive input focus</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_accept_focus</code>() method sets the
"accept_focus setting to the value of
<em class="parameter"><code>accept_focus</code></em>. If <em class="parameter"><code>accept_focus</code></em>
is <code class="literal">True</code> the window will accept focus; if
<code class="literal">False</code> hints to the desktop environment that the window
doesn't want to receive input focus.</p><p>On X, it is the responsibility of the window manager to
interpret this hint. ICCCM-compliant window manager usually respect
it.</p></div><div class="refsect2" title="gtk.gdk.Window.enable_synchronized_configure"><a name="method-gdkwindow--enable-synchronized-configure"></a><h3>gtk.gdk.Window.enable_synchronized_configure</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">enable_synchronized_configure</span>()</code></pre><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="methodname">enable_synchronized_configure</code>()
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 <a class="link" href="class-gdkwindow.html#method-gdkwindow--configure-finished" title="gtk.gdk.Window.configure_finished"><code class="methodname">configure_finished</code>()</a>
method every time it has finished all processing associated with a set of
Configure events. Toplevel GTK+ windows automatically use this
protocol.</p><p>On X, calling this function makes window participate in the
_NET_WM_SYNC_REQUEST window manager protocol.</p></div><div class="refsect2" title="gtk.gdk.Window.configure_finished"><a name="method-gdkwindow--configure-finished"></a><h3>gtk.gdk.Window.configure_finished</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">configure_finished</span>()</code></pre><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="methodname">configure_finished</code>() 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.</p><p>This function can only be called if the <a class="link" href="class-gdkwindow.html#method-gdkwindow--enable-synchronized-configure" title="gtk.gdk.Window.enable_synchronized_configure"><code class="methodname">enable_synchronized_configure</code>()</a>
method was called previously.</p></div><div class="refsect2" title="gtk.gdk.Window.set_focus_on_map"><a name="method-gdkwindow--set-focus-on-map"></a><h3>gtk.gdk.Window.set_focus_on_map</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_focus_on_map</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>focus_on_map</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>focus_on_map</code></strong> :</span></p></td><td>if <code class="literal">True</code> the window should
receive input focus when mapped.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="methodname">set_focus_on_map</code>() method sets the
a hint for the desktop environment to the value specified by
<em class="parameter"><code>focus_on_map</code></em>. If <em class="parameter"><code>focus_on_map</code></em>
is <code class="literal">True</code> the window sets a hint for the desktop
environment indicating that it would like to receive input focus when
mapped.</p><p>On X, it is the responsibility of the window manager to
interpret this hint. Window managers following the <a class="ulink" href="http://www.freedesktop.org" target="_top">freedesktop.org</a> window manager
extension specification should respect it.</p></div><div class="refsect2" title="gtk.gdk.Window.set_urgency_hint"><a name="method-gdkwindow--set-urgency-hint"></a><h3>gtk.gdk.Window.set_urgency_hint</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_urgency_hint</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>urgent</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>urgent</code></strong> :</span></p></td><td>if <code class="literal">True</code> the window requires
urgent user attention.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">set_urgency_hint</code>() method sets the
a hint for the desktop environment to the value specified by
<em class="parameter"><code>urgent</code></em>. If <em class="parameter"><code>urgent</code></em> is
<code class="literal">True</code> the window sets a hint for the desktop environment
indicating that it needs urgent user attention.</p></div><div class="refsect2" title="gtk.gdk.Window.move_region"><a name="method-gdkwindow--move-region"></a><h3>gtk.gdk.Window.move_region</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">move_region</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>region</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dx</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dy</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>region</code></strong> :</span></p></td><td>the <a class="link" href="class-gdkregion.html" title="gtk.gdk.Region"><code class="classname">gtk.gdk.Region</code></a> to move</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>dx</code></strong> :</span></p></td><td>the distance to move horizontally</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>dy</code></strong> :</span></p></td><td>the distance to move vertically</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">move_region</code>() method moves the part
of window indicated by the <a class="link" href="class-gdkregion.html" title="gtk.gdk.Region"><code class="classname">gtk.gdk.Region</code></a>
specified by <em class="parameter"><code>region</code></em> by
<em class="parameter"><code>dy</code></em> pixels in the Y direction and
<em class="parameter"><code>dx</code></em> pixels in the X direction. The portions of
<em class="parameter"><code>region</code></em> that are not covered by the new position
of <em class="parameter"><code>region</code></em> are invalidated.</p></div><div class="refsect2" title="gtk.gdk.Window.shape_combine_region"><a name="method-gdkwindow--shape-combine-region"></a><h3>gtk.gdk.Window.shape_combine_region</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">shape_combine_region</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>shape_region</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset_y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>shape_region</code></strong> :</span></p></td><td>the region of the window to leave
opaque</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>offset_x</code></strong> :</span></p></td><td>X position of <em class="parameter"><code>shape_region</code></em>
in window coordinates</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>offset_y</code></strong> :</span></p></td><td>Y position of <em class="parameter"><code>shape_region</code></em>
in window coordinates</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">shape_combine_region</code>() method makes
pixels in the window outside of the <a class="link" href="class-gdkregion.html" title="gtk.gdk.Region"><code class="classname">gtk.gdk.Region</code></a>
specified by <em class="parameter"><code>shape_region</code></em> transparent, so
that the window may be nonrectangular. See the <a class="link" href="class-gdkwindow.html#method-gdkwindow--shape-combine-mask" title="gtk.gdk.Window.shape_combine_mask"><code class="methodname">shape_combine_mask</code>()</a>
method to use a bitmap as the mask.</p><p>If <em class="parameter"><code>shape_region</code></em> is
<code class="literal">None</code>, the shape will be unset, so the whole window
will be opaque again. <em class="parameter"><code>offset_x</code></em> and
<em class="parameter"><code>offset_y</code></em> are ignored if
<em class="parameter"><code>shape_region</code></em> is <code class="literal">None</code>.</p><p>This method works on both toplevel and child windows.</p><p>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.</p></div><div class="refsect2" title="gtk.gdk.Window.input_shape_combine_mask"><a name="method-gdkwindow--input-shape-combine-mask"></a><h3>gtk.gdk.Window.input_shape_combine_mask</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">input_shape_combine_mask</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>mask</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>mask</code></strong> :</span></p></td><td>the shape bitmap mask</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the X position of shape mask with respect to
the window</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the Y position of shape mask with respect to
the window</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">input_shape_combine_mask</code>() method
is similar to the <a class="link" href="class-gdkwindow.html#method-gdkwindow--shape-combine-mask" title="gtk.gdk.Window.shape_combine_mask"><code class="methodname">shape_combine_mask</code>()</a>
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.</p><p>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".</p><p>On the X11 platform, this requires version 1.1 of the shape
extension.</p></div><div class="refsect2" title="gtk.gdk.Window.input_shape_combine_region"><a name="method-gdkwindow--input-shape-combine-region"></a><h3>gtk.gdk.Window.input_shape_combine_region</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">input_shape_combine_region</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>shape_region</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>offset_y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>shape_region</code></strong> :</span></p></td><td>the region of the window to leave
opaque</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>offset_x</code></strong> :</span></p></td><td>X position of <em class="parameter"><code>shape_region</code></em>
in window coordinates</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>offset_y</code></strong> :</span></p></td><td>Y position of <em class="parameter"><code>shape_region</code></em>
in window coordinates</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">input_shape_combine_region</code>() method
is similar to the <a class="link" href="class-gdkwindow.html#method-gdkwindow--shape-combine-region" title="gtk.gdk.Window.shape_combine_region"><code class="methodname">shape_combine_region</code>()</a>
method, but the shape applies only to event handling. Mouse events
which happen while the pointer position corresponds to an unset bit in
<em class="parameter"><code>shape_region</code></em> will be passed onto the window
below this window.</p><p>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".</p><p>On the X11 platform, this requires version 1.1 of the shape
extension.</p></div><div class="refsect2" title="gtk.gdk.Window.beep"><a name="method-gdkwindow--beep"></a><h3>gtk.gdk.Window.beep</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">beep</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>
Emits a short beep associated to window in the appropriate display,
if supported. Otherwise, emits a short beep on the display just as
<code class="methodname"><a class="link" href="class-gdkdisplay.html#method-gdkdisplay--beep" title="gtk.gdk.Display.beep">gtk.gdk.Display.beep</a></code>().
</p></div><div class="refsect2" title="gtk.gdk.Window.set_composited"><a name="method-gdkwindow--set-composited"></a><h3>gtk.gdk.Window.set_composited</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_composited</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>composited</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>composited</code></strong> :</span></p></td><td><code class="literal">True</code> to set the window as composited</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>
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.
</p><p>
It only makes sense for child windows to be composited; see
<code class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-opacity" title="gtk.gdk.Window.set_opacity">gtk.gdk.Window.set_opacity</a></code>()
if you need translucent toplevel windows.
</p><p>
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.
</p><p>
This call is only supported on some systems (currently, only X11 with
new enough Xcomposite and Xdamage extensions). You must call
<code class="methodname"><a class="link" href="class-gdkdisplay.html#method-gdkdisplay--supports-cursor-alpha" title="gtk.gdk.Display.supports_cursor_alpha">gtk.gdk.Display.supports_composite</a></code>()
to check if setting a window as composited is supported before attempting to do so.
</p></div><div class="refsect2" title="gtk.gdk.Window.set_opacity"><a name="method-gdkwindow--set-opacity"></a><h3>gtk.gdk.Window.set_opacity</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_opacity</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>opacity</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>opacity</code></strong> :</span></p></td><td>The opacity value.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>
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.)
</p><p>
On X11, this works only on X screens with a compositing manager running.
</p><p>
For setting up per-pixel alpha, see
<code class="methodname"><a class="link" href="class-gdkscreen.html#method-gdkscreen--get-rgba-colormap" title="gtk.gdk.Screen.get_rgba_colormap">gtk.gdk.Screen.get_rgba_colormap</a></code>().
For making non-toplevel windows translucent, see
<code class="methodname"><a class="link" href="class-gdkwindow.html#method-gdkwindow--set-composited" title="gtk.gdk.Window.set_composited">gtk.gdk.Window.set_composited</a></code>().
</p></div><div class="refsect2" title="gtk.gdk.Window.set_startup_id"><a name="method-gdkwindow--set-startup-id"></a><h3>gtk.gdk.Window.set_startup_id</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_startup_id</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>startup_id</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>startup_id</code></strong> :</span></p></td><td>A string with startup-notification identifier.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>
When using GTK+, typically you should use
<code class="methodname"><a class="link" href="class-gtkwindow.html#method-gtkwindow--set-startup-id" title="gtk.Window.set_startup_id">gtk.Window.set_startup_id</a></code>()
instead of this low-level function.
</p></div><div class="refsect2" title="gtk.gdk.Window.remove_redirection"><a name="method-gdkwindow--remove-redirection"></a><h3>gtk.gdk.Window.remove_redirection</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">remove_redirection</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.14 and above.</p></div><p>
When using GTK+, typically you should use
<code class="methodname"><a class="link" href="class-gtkwindow.html#method-gtkwindow--set-startup-id" title="gtk.Window.set_startup_id">gtk.Window.set_startup_id</a></code>()
instead of this low-level function.
</p></div></div><div class="refsect1" title="Functions"><a name="id3463037"></a><h2>Functions</h2><div class="refsect2" title="gtk.gdk.window_foreign_new"><a name="function-gdk--window-foreign-new"></a><h3>gtk.gdk.window_foreign_new</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.window_foreign_new</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>anid</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>anid</code></strong> :</span></p></td><td>a native window system ID</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the new <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
wrapper for the native window or <code class="literal">None</code> if the window has
been destroyed.</td></tr></tbody></table><p>The <code class="function">gtk.gdk.window_foreign_new</code>() function
wraps a native window specified by <em class="parameter"><code>anid</code></em> for the default display in a <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>. This
may fail if the window has been destroyed. For example in the X Window
System backend, a native window handle is an Xlib
<code class="literal">XID</code>.</p></div><div class="refsect2" title="gtk.gdk.window_foreign_new_for_display"><a name="function-gdk--window-foreign-new-for-display"></a><h3>gtk.gdk.window_foreign_new_for_display</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.window_foreign_new_for_display</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>anid</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>display</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkdisplay.html" title="gtk.gdk.Display"><code class="classname">gtk.gdk.Display</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>anid</code></strong> :</span></p></td><td>a native window system ID</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the new <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
wrapper for the native window or <code class="literal">None</code> if the window has
been destroyed.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.2 and above.</p></div><p>The
<code class="function">gtk.gdk.window_foreign_new_for_display</code>() function wraps
a native window specified by <em class="parameter"><code>anid</code></em> for the <a class="link" href="class-gdkdisplay.html" title="gtk.gdk.Display"><code class="classname">gtk.gdk.Display</code></a>
specified by <em class="parameter"><code>display</code></em> in a <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>. This
may fail if the window has been destroyed. For example in the X Window
System backend, a native window handle is an Xlib
<code class="literal">XID</code>.</p></div><div class="refsect2" title="gtk.gdk.get_default_root_window"><a name="function-gdk--get-default-root-window"></a><h3>gtk.gdk.get_default_root_window</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.get_default_root_window</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the default root <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a></td></tr></tbody></table><p>The <code class="function">gtk.gdk.get_default_root_window</code>()
function returns the root <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> (the
parent window that all other windows are inside) for the default display and
screen.</p></div><div class="refsect2" title="gtk.gdk.window_get_toplevels"><a name="function-gdk--window-get-toplevels"></a><h3>gtk.gdk.window_get_toplevels</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.window_get_toplevels</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list containing the toplevel <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
object</td></tr></tbody></table><p>The <code class="function">gtk.gdk.window_get_toplevels</code>() function
returns a list of all toplevel windows known to <code class="literal">PyGTK</code> on
the default screen. A toplevel window is a child of the root window (see the
<a class="link" href="class-gdkwindow.html#function-gdk--get-default-root-window" title="gtk.gdk.get_default_root_window">gtk.gdk.get_default_root_window</a>()
function).</p></div><div class="refsect2" title="gtk.gdk.window_lookup"><a name="function-gdk--window-lookup"></a><h3>gtk.gdk.window_lookup</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.window_lookup</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>anid</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>anid</code></strong> :</span></p></td><td>a native window system ID</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
wrapper for the native window or <code class="literal">None</code> if there is
none.</td></tr></tbody></table><p>The <code class="function">gtk.gdk.window_lookup</code>() function looks
up the <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> that
wraps the native window handle specified by <em class="parameter"><code>anid</code></em>. For
example in the X Window System backend, a native window handle is an Xlib
<code class="literal">XID</code>.</p></div><div class="refsect2" title="gtk.gdk.window_lookup_for_display"><a name="function-gdk--window-lookup-for-display"></a><h3>gtk.gdk.window_lookup_for_display</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.window_lookup_for_display</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>display</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>anid</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>display</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkdisplay.html" title="gtk.gdk.Display"><code class="classname">gtk.gdk.Display</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>anid</code></strong> :</span></p></td><td>a native window system ID</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
wrapper for the native window or <code class="literal">None</code> if there is
none.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.2 and above.</p></div><p>The <code class="function">gtk.gdk.window_lookup_for_display</code>()
function looks up the <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> that
wraps the native window handle specified by <em class="parameter"><code>anid</code></em> for
the <a class="link" href="class-gdkdisplay.html" title="gtk.gdk.Display"><code class="classname">gtk.gdk.Display</code></a>
specified by <em class="parameter"><code>display</code></em>. For example in the X Window
System backend, a native window handle is an Xlib
<code class="literal">XID</code>.</p></div><div class="refsect2" title="gtk.gdk.window_process_all_updates"><a name="function-gdk--window-process-all-updates"></a><h3>gtk.gdk.window_process_all_updates</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.window_process_all_updates</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="function">gtk.gdk.process_all_updates</code>() function
calls the <a class="link" href="class-gdkwindow.html#method-gdkwindow--process-updates" title="gtk.gdk.Window.process_updates"><code class="methodname">process_updates</code>()</a>
method for each <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> in
the application.</p></div><div class="refsect2" title="gtk.gdk.gdk_window_set_debug_updates"><a name="function-gdk--gdk-window-set-debug-updates"></a><h3>gtk.gdk.gdk_window_set_debug_updates</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.gdk_window_set_debug_updates</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>setting</code></strong> :</span></p></td><td>if <code class="literal">True</code> enable update
debugging</td></tr></tbody></table><p>The <code class="function">gtk.gdk.gdk_set_debug_updates</code>() function
sets the update debugging flag to the value of
<em class="parameter"><code>setting</code></em>. If <em class="parameter"><code>setting</code></em> is
<code class="literal">True</code>, update debugging is enabled. With update debugging
enabled, calls to the <a class="link" href="class-gdkwindow.html#method-gdkwindow--invalidate-rect" title="gtk.gdk.Window.invalidate_rect"><code class="methodname">invalidate_rect</code>()</a>
method clear the invalidated rectangle of the screen to a noticeable color,
and <code class="literal">PyGTK</code> pauses for a short time before sending exposes
to windows during the <a class="link" href="class-gdkwindow.html#method-gdkwindow--process-updates" title="gtk.gdk.Window.process_updates"><code class="methodname">process_updates</code>()</a>
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
<code class="literal">GDK</code> 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
<code class="literal">PyGTK</code> to flicker slowly and noticeably, so you can see
exactly what's being redrawn when, in what order.</p><p>The <code class="option">--gtk-debug=updates</code> command line option
passed to <code class="literal">PyGTK</code> programs enables this debug option at
application startup time. That's usually more useful than calling
<code class="function">gtk.gdk.gdk_set_debug_updates</code>() yourself, though you might
want to use this function to enable updates sometime after application
startup time.</p></div><div class="refsect2" title="gtk.gdk.window_at_pointer"><a name="function-gdk--window-at-pointer"></a><h3>gtk.gdk.window_at_pointer</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.gdk.window_at_pointer</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 3 tuple containing the <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
and the pointer location in the window or
<code class="literal">None</code>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.4 and above.</p></div><p>The <code class="function">gtk.gdk.window_at_pointer</code>() function
returns a 3-tuple containing the <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
underneath the mouse pointer, and the location of the pointer in the
window. This function returns <code class="literal">None</code> if the window under
the mouse pointer is not known to GDK (if the window belongs to another
application and a <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
hasn't been created for it with the <a class="link" href="class-gdkwindow.html#function-gdk--window-foreign-new" title="gtk.gdk.window_foreign_new"><code class="function">gtk.gdk.window_foreign_new</code>()</a>
function)</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>For multi-head-aware widgets or applications use the <a class="link" href="class-gdkdisplay.html#method-gdkdisplay--get-window-at-pointer" title="gtk.gdk.Display.get_window_at_pointer"><code class="methodname">gtk.gdk.Display.get_window_at_pointer</code>()</a>
method instead.</p></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gdkvisual.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gdk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gdk-functions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.gdk.Visual </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.gdk Functions</td></tr></table></div></body></html>
|