/usr/share/doc/python-xlib/html/python-xlib_16.html is in python-xlib 0.14+20091101-1.
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 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 | <HTML>
<HEAD>
<!-- Created by texi2html 1.56k from ../src/python-xlib.texi on 5 November 2009 -->
<TITLE>The Python X Library - Display</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="python-xlib_1.html">first</A>, <A HREF="python-xlib_15.html">previous</A>, <A HREF="python-xlib_17.html">next</A>, <A HREF="python-xlib_25.html">last</A> section, <A HREF="python-xlib_toc.html">table of contents</A>.
<P><HR><P>
<H2><A NAME="SEC15" HREF="python-xlib_toc.html#TOC15">Display</A></H2>
<P>
Display information retrieval methods:
<P>
<DL>
<DT><U>Method:</U> Display <B>get_display_name</B> <I>( )</I>
<DD><A NAME="IDX175"></A>
<P>
Returns the name used to connect to the server, either provided when
creating the <CODE>Display</CODE> object, or fetched from the environmental
variable <CODE>$DISPLAY</CODE>.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>fileno</B> <I>( )</I>
<DD><A NAME="IDX176"></A>
<P>
Returns the file descriptor number of the underlying socket. This
method is provided to allow <CODE>Display</CODE> objects to be passed
<CODE>select.select()</CODE>.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>close</B> <I>( )</I>
<DD><A NAME="IDX177"></A>
<P>
Close the display, freeing the resources that it holds.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>set_error_handler</B> <I>( handler )</I>
<DD><A NAME="IDX178"></A>
<P>
Set the default error handler which will be called for all unhandled
errors. <VAR>handler</VAR> should take two arguments as a normal request
error handler, but the second argument (the request) will be None.
<P>
See section <A HREF="python-xlib_7.html#SEC6">Error Handling</A>.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>flush</B> <I>( )</I>
<DD><A NAME="IDX179"></A>
<P>
Flush the request queue, building and sending the queued requests. This
can be necessary in applications that never wait for events, and in
threaded applications.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>sync</B> <I>( )</I>
<DD><A NAME="IDX180"></A>
<P>
Flush the queue and wait until the server has processed all the queued
requests. Use this e.g. when it is important that errors caused by a
certain request is trapped.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>next_event</B> <I>( )</I>
<DD><A NAME="IDX181"></A>
<P>
Return the next event. If there are no events queued, it will block
until the next event is fetched from the server.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>pending_events</B> <I>( )</I>
<DD><A NAME="IDX182"></A>
<P>
Return the number of events queued, i.e. the number of times that
<CODE>Display.next_event()</CODE> can be called without blocking.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>has_extension</B> <I>( extension )</I>
<DD><A NAME="IDX183"></A>
<P>
Check if both the server and the client library support the X extension
named <VAR>extension</VAR>.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>create_resource_object</B> <I>( type, id )</I>
<DD><A NAME="IDX184"></A>
<P>
Create a resource object of <VAR>type</VAR> for the integer <VAR>id</VAR>.
<VAR>type</VAR> should be one of the following strings:
<DL COMPACT>
<DT><CODE>resource</CODE>
<DD>
<DT><CODE>drawable</CODE>
<DD>
<DT><CODE>window</CODE>
<DD>
<DT><CODE>pixmap</CODE>
<DD>
<DT><CODE>fontable</CODE>
<DD>
<DT><CODE>font</CODE>
<DD>
<DT><CODE>gc</CODE>
<DD>
<DT><CODE>colormap</CODE>
<DD>
<DT><CODE>cursor</CODE>
<DD>
</DL>
<P>
This function can be used when a resource ID has been fetched e.g. from
an resource or a command line argument. Resource objects should never
be created by instantiating the appropriate class directly, since any X
extensions dynamically added by the library will not be available.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>screen</B> <I>( sno = None )</I>
<DD><A NAME="IDX185"></A>
<P>
Return the information about screen number <VAR>sno</VAR>, or the default
screen if <VAR>sno</VAR> is <CODE>None</CODE>.
<P>
The return object has the following attributes:
<DL COMPACT>
<DT><CODE>root</CODE>
<DD>
The screen root window.
<DT><CODE>default_colormap</CODE>
<DD>
The default colormap for the root window and its children.
<DT><CODE>white_pixel</CODE>
<DD>
<DT><CODE>black_pixel</CODE>
<DD>
The pixel values for white and black, respectively, in the default
colormap.
<DT><CODE>current_input_mask</CODE>
<DD>
The event mask of the root window at the time the connection was set up.
<DT><CODE>width_in_pixels</CODE>
<DD>
<DT><CODE>height_in_pixels</CODE>
<DD>
The size of the root window in pixels, i.e. the size of the entire screen.
<DT><CODE>width_in_mms</CODE>
<DD>
<DT><CODE>height_in_mms</CODE>
<DD>
The physical size of the screen, in millimeters.
<DT><CODE>min_installed_maps</CODE>
<DD>
<DT><CODE>max_installed_maps</CODE>
<DD>
The minimum and maximum number of colormaps that can be installed at the
same time.
<DT><CODE>root_visual</CODE>
<DD>
The visual type of the root window.
<DT><CODE>backing_store</CODE>
<DD>
Whether the screen supports backing store, one of the values
<CODE>X.WhenMapped</CODE>, <CODE>X.NotUseful</CODE>, or <CODE>X.Always</CODE>.
<DT><CODE>save_unders</CODE>
<DD>
True if the screen supports save unders.
<DT><CODE>root_depth</CODE>
<DD>
The depth of the root window.
<DT><CODE>allowed_depths</CODE>
<DD>
A list of the pixmap and windows depths that this screen supports. The
list items have the following attributes:
<DL COMPACT>
<DT><CODE>depth</CODE>
<DD>
This depth is supported by the screen.
<DT><CODE>visuals</CODE>
<DD>
A list of visual types that is valid for this depth. If this list is
empty, this depth is only valid for pixmaps and not for windows. The
list items have the following attributes:
<DL COMPACT>
<DT><CODE>visual_id</CODE>
<DD>
The ID of this visual.
<DT><CODE>visual_class</CODE>
<DD>
One of <CODE>X.StaticGrey</CODE>, <CODE>X.StaticColor</CODE>, <CODE>X.TrueColor</CODE>,
<CODE>X.GrayScale</CODE>, <CODE>X.PseudoColor</CODE>, or <CODE>X.DirectColor</CODE>.
<DT><CODE>bits_per_rgb_value</CODE>
<DD>
The number of bits used to represent an entire RGB-value, allowing a
total of <CODE>2^bits_per_rgb_value</CODE> distinct colors.
<DT><CODE>colormap_entries</CODE>
<DD>
The number of free entries in a newly created colormap.
<DT><CODE>red_mask</CODE>
<DD>
<DT><CODE>blue_mask</CODE>
<DD>
<DT><CODE>green_mask</CODE>
<DD>
Bitmasks selecting the three color components from the entire RGB value.
</DL>
</DL>
</DL>
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>screen_count</B> <I>( )</I>
<DD><A NAME="IDX186"></A>
<P>
Return the total number of screens on the display.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>get_default_screen</B> <I>( )</I>
<DD><A NAME="IDX187"></A>
<P>
Return the number of the default screen, extracted from the display
name.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>keycode_to_keysym</B> <I>( keycode, index )</I>
<DD><A NAME="IDX188"></A>
<P>
Convert a <VAR>keycode</VAR> to a keysym, looking in entry <VAR>index</VAR>.
Normally index 0 is unshifted, 1 is shifted, 2 is alt grid, and 3 is
shift+alt grid. If that key entry is not bound, <CODE>X.NoSymbol</CODE> is
returned.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>keysym_to_keycode</B> <I>( keysym )</I>
<DD><A NAME="IDX189"></A>
<P>
Look up the primary keycode that is bound to <VAR>keysym</VAR>. If several
keycodes are found, the one with the lowest index and lowest code is
returned. If <VAR>keysym</VAR> is not bound to any key, 0 is returned.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>keysym_to_keycodes</B> <I>( keysym )</I>
<DD><A NAME="IDX190"></A>
<P>
Look up all the keycodes that is bound to <CODE>keysym</CODE>. A list of
tuples <CODE>(keycode, index)</CODE> is returned, sorted primarily on the
lowest index and secondarily on the lowest keycode.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>refresh_keyboard_mapping</B> <I>( evt )</I>
<DD><A NAME="IDX191"></A>
<P>
This method should be called once when a <CODE>MappingNotify</CODE> event is
received, to update the keymap cache. <VAR>evt</VAR> should be the event
object.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>lookup_string</B> <I>( keysym )</I>
<DD><A NAME="IDX192"></A>
<P>
Attempt to convert <VAR>keysym</VAR> into a single character or a string. If
no translation is found, <CODE>None</CODE> is returned.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>rebind_string</B> <I>( keysym, newstring )</I>
<DD><A NAME="IDX193"></A>
<P>
Set the string representation of <CODE>keysym</CODE> to <CODE>newstring</CODE>, so
that it will be returned by <CODE>Display.lookup_string()</CODE>.
</DL>
<P>
X requests methods:
<P>
<DL>
<DT><U>Method:</U> Display <B>intern_atom</B> <I>( name, only_if_exists = 0 )</I>
<DD><A NAME="IDX194"></A>
<P>
Intern the string <VAR>name</VAR>, returning its atom number. If
<VAR>only_if_exists</VAR> is true and the atom does not already exist,
it will not be created and <CODE>X.NONE</CODE> is returned.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>get_atom_name</B> <I>( atom )</I>
<DD><A NAME="IDX195"></A>
<P>
Look up the name of <VAR>atom</VAR>, returning it as a string. Will raise
<CODE>BadAtom</CODE> if <VAR>atom</VAR> does not exist.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>get_selection_owner</B> <I>( selection )</I>
<DD><A NAME="IDX196"></A>
<P>
Return the window that owns <VAR>selection</VAR> (an atom), or <CODE>X.NONE</CODE>
if there is no owner for the selection. Can raise <CODE>BadAtom</CODE>.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>send_event</B> <I>( destination, event, event_mask = 0, propagate = 0, onerror = None )</I>
<DD><A NAME="IDX197"></A>
<P>
Send a synthetic event to the window <CODE>destination</CODE> which can be a
window object, or <CODE>X.PointerWindow</CODE> or <CODE>X.InputFocus</CODE>.
<CODE>event</CODE> is the event object to send, instantiated from one of the
classes in <CODE>protocol.events</CODE>. See XSendEvent(3X11) for details.
<P>
There is also a <CODE>Window.send_event()</CODE> method.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>ungrab_pointer</B> <I>( time, onerror = None )</I>
<DD><A NAME="IDX198"></A>
<P>
Release a grabbed pointer and any queued events. See
XUngrabPointer(3X11).
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>change_active_pointer_grab</B> <I>( event_mask, cursor, time, onerror = None )</I>
<DD><A NAME="IDX199"></A>
<P>
Change the dynamic parameters of a pointer grab. See
XChangeActivePointerGrab(3X11).
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>ungrab_keyboard</B> <I>( time, onerror = None )</I>
<DD><A NAME="IDX200"></A>
<P>
Ungrab a grabbed keyboard and any queued events. See
XUngrabKeyboard(3X11).
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>allow_events</B> <I>( mode, time, onerror = None )</I>
<DD><A NAME="IDX201"></A>
<P>
Release some queued events. <VAR>mode</VAR> should be one of
<CODE>X.AsyncPointer</CODE>, <CODE>X.SyncPointer</CODE>, <CODE>X.AsyncKeyboard</CODE>,
<CODE>X.SyncKeyboard</CODE>, <CODE>X.ReplayPointer</CODE>, <CODE>X.ReplayKeyboard</CODE>,
<CODE>X.AsyncBoth</CODE>, or <CODE>X.SyncBoth</CODE>. <VAR>time</VAR> should be a
timestamp or <CODE>X.CurrentTime</CODE>.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>grab_server</B> <I>( onerror = None )</I>
<DD><A NAME="IDX202"></A>
<P>
Disable processing of requests on all other client connections until the
server is ungrabbed. Server grabbing should be avoided as much as
possible.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>ungrab_server</B> <I>( onerror = None )</I>
<DD><A NAME="IDX203"></A>
<P>
Release the server if it was previously grabbed by this client.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>warp_pointer</B> <I>( x, y, src_window = X.NONE, src_x = 0, src_y = 0, src_width = 0, src_height = 0, onerror = None )</I>
<DD><A NAME="IDX204"></A>
<P>
Move the pointer relative its current position by the offsets
(<VAR>x</VAR>, <VAR>y</VAR>). However, if <VAR>src_window</VAR> is a window the
pointer is only moved if the specified rectangle in <VAR>src_window</VAR>
contains it. If <VAR>src_width</VAR> is 0 it will be replaced with the width
of <VAR>src_window</VAR> - <VAR>src_x</VAR>. <VAR>src_height</VAR> is treated in a
similar way.
<P>
To move the pointer to absolute coordinates, use
<CODE>Window.warp_pointer()</CODE>.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>set_input_focus</B> <I>( focus, revert_to, time, onerror = None )</I>
<DD><A NAME="IDX205"></A>
<P>
Set input focus to <VAR>focus</VAR>, which should be a window,
<CODE>X.PointerRoot</CODE> or <CODE>X.NONE</CODE>. <VAR>revert_to</VAR> specifies where
the focus reverts to if the focused window becomes not visible, and
should be <CODE>X.RevertToParent</CODE>, <CODE>RevertToPointerRoot</CODE>, or
<CODE>RevertToNone</CODE>. See XSetInputFocus(3X11) for details.
<P>
There is also a <CODE>Window.set_input_focus()</CODE>.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>get_input_focus</B> <I>( )</I>
<DD><A NAME="IDX206"></A>
<P>
Return an object with the following attributes:
<DL COMPACT>
<DT><CODE>focus</CODE>
<DD>
The window which currently holds the input focus, <CODE>X.NONE</CODE> or
<CODE>X.PointerRoot</CODE>.
<DT><CODE>revert_to</CODE>
<DD>
Where the focus will revert, one of <CODE>X.RevertToParent</CODE>,
<CODE>RevertToPointerRoot</CODE>, or <CODE>RevertToNone</CODE>.
</DL>
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>query_keymap</B> <I>( )</I>
<DD><A NAME="IDX207"></A>
<P>
Return a bit vector for the logical state of the keyboard, where each
bit set to 1 indicates that the corresponding key is currently pressed
down. The vector is represented as a list of 32 integers. List item N
contains the bits for keys 8N to 8N + 7 with the least significant bit
in the byte representing key 8N.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>open_font</B> <I>( name )</I>
<DD><A NAME="IDX208"></A>
<P>
Open the font identifed by the pattern <VAR>name</VAR> and return its font
object. If <VAR>name</VAR> does not match any font, <CODE>None</CODE> is returned.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>list_fonts</B> <I>( pattern, max_names )</I>
<DD><A NAME="IDX209"></A>
<P>
Return a list of font names matching <VAR>pattern</VAR>. No more than
<VAR>max_names</VAR> will be returned.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>list_fonts_with_info</B> <I>( pattern, max_names )</I>
<DD><A NAME="IDX210"></A>
<P>
Return a list of fonts matching <VAR>pattern</VAR>. No more than
<VAR>max_names</VAR> will be returned. Each list item represents one font
and has the following properties:
<DL COMPACT>
<DT><CODE>name</CODE>
<DD>
The name of the font.
<DT><CODE>min_bounds</CODE>
<DD>
<DT><CODE>max_bounds</CODE>
<DD>
<DT><CODE>min_char_or_byte2</CODE>
<DD>
<DT><CODE>max_char_or_byte2</CODE>
<DD>
<DT><CODE>default_char</CODE>
<DD>
<DT><CODE>draw_direction</CODE>
<DD>
<DT><CODE>min_byte1</CODE>
<DD>
<DT><CODE>max_byte1</CODE>
<DD>
<DT><CODE>all_chars_exist</CODE>
<DD>
<DT><CODE>font_ascent</CODE>
<DD>
<DT><CODE>font_descent</CODE>
<DD>
<DT><CODE>replies_hint</CODE>
<DD>
See the descripton of XFontStruct in XGetFontProperty(3X11) for details
on these values.
<DT><CODE>properties</CODE>
<DD>
A list of properties. Each entry has two attributes:
<DL COMPACT>
<DT><CODE>name</CODE>
<DD>
The atom identifying this property.
<DT><CODE>value</CODE>
<DD>
A 32-bit unsigned value.
</DL>
</DL>
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>set_font_path</B> <I>( path, onerror = None )</I>
<DD><A NAME="IDX211"></A>
<P>
Set the font path to <VAR>path</VAR>, which should be a list of strings. If
<VAR>path</VAR> is empty, the default font path of the server will be
restored.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>get_font_path</B> <I>( )</I>
<DD><A NAME="IDX212"></A>
<P>
Return the current font path as a list of strings.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>query_extension</B> <I>( name )</I>
<DD><A NAME="IDX213"></A>
<P>
Ask the server if it supports the extension <VAR>name</VAR>. If it is
supported an object with the following attributes is returned:
<DL COMPACT>
<DT><CODE>major_opcode</CODE>
<DD>
The major opcode that the requests of this extension uses.
<DT><CODE>first_event</CODE>
<DD>
The base event code if the extension have additional events, or 0.
<DT><CODE>first_error</CODE>
<DD>
The base error code if the extension have additional errors, or 0.
</DL>
<P>
If the extension is not supported, <CODE>None</CODE> is returned.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>list_extensions</B> <I>( )</I>
<DD><A NAME="IDX214"></A>
<P>
Return a list of all the extensions provided by the server.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>change_keyboard_mapping</B> <I>( first_keycode, keysyms, onerror = None )</I>
<DD><A NAME="IDX215"></A>
<P>
Modify the keyboard mapping, starting with <VAR>first_keycode</VAR>.
<VAR>keysyms</VAR> is a list of tuples of keysyms. <CODE>keysyms[n][i]</CODE> will
be assigned to keycode <CODE>first_keycode+n</CODE> at index <CODE>i</CODE>.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>get_keyboard_mapping</B> <I>( first_keycode, count )</I>
<DD><A NAME="IDX216"></A>
<P>
Return the current keyboard mapping as a list of tuples, starting at
<VAR>first_keycount</VAR> and no more than <VAR>count</VAR>.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>change_keyboard_control</B> <I>( onerror = None, **keys )</I>
<DD><A NAME="IDX217"></A>
<P>
Change the parameters provided as keyword arguments:
<DL COMPACT>
<DT><CODE>key_click_percent</CODE>
<DD>
The volume of key clicks between 0 (off) and 100 (load). -1 will restore
default setting.
<DT><CODE>bell_percent</CODE>
<DD>
The base volume of the bell, coded as above.
<DT><CODE>bell_pitch</CODE>
<DD>
The pitch of the bell in Hz, -1 restores the default.
<DT><CODE>bell_duration</CODE>
<DD>
The duration of the bell in milliseconds, -1 restores the default.
<DT><CODE>led</CODE>
<DD>
<DT><CODE>led_mode</CODE>
<DD>
<CODE>led_mode</CODE> should be <CODE>X.LedModeOff</CODE> or <CODE>X.LedModeOn</CODE>. If
<CODE>led</CODE> is provided, it should be a 32-bit mask listing the LEDs that
should change. If <CODE>led</CODE> is not provided, all LEDs are changed.
<DT><CODE>key</CODE>
<DD>
<DT><CODE>auto_repeat_mode</CODE>
<DD>
<CODE>auto_repeat_mode</CODE> should be one of <CODE>X.AutoRepeatModeOff</CODE>,
<CODE>X.AutoRepeatModeOn</CODE>, or <CODE>X.AutoRepeatModeDefault</CODE>. If
<CODE>key</CODE> is provided, that key will be modified, otherwise the global
state for the entire keyboard will be modified.
</DL>
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>get_keyboard_control</B> <I>( )</I>
<DD><A NAME="IDX218"></A>
<P>
Return an object with the following attributes:
<DL COMPACT>
<DT><CODE>global_auto_repeat</CODE>
<DD>
<CODE>X.AutoRepeatModeOn</CODE> or <CODE>X.AutoRepeatModeOff</CODE>.
<DT><CODE>auto_repeats</CODE>
<DD>
A list of 32 integers. List item N contains the bits for keys 8N to 8N
+ 7 with the least significant bit in the byte representing key 8N. If
a bit is on, autorepeat is enabled for the corresponding key.
<DT><CODE>led_mask</CODE>
<DD>
A 32-bit mask indicating which LEDs are on.
<DT><CODE>key_click_percent</CODE>
<DD>
The volume of key click, from 0 to 100.
<DT><CODE>bell_percent</CODE>
<DD>
<DT><CODE>bell_pitch</CODE>
<DD>
<DT><CODE>bell_duration</CODE>
<DD>
The volume, pitch and duration of the bell.
</DL>
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>bell</B> <I>( percent = 0, onerror = None )</I>
<DD><A NAME="IDX219"></A>
<P>
Ring the bell at the volume <VAR>percent</VAR> which is relative the base
volume. See XBell(3X11).
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>change_pointer_control</B> <I>( accel = None, threshold = None, onerror = None )</I>
<DD><A NAME="IDX220"></A>
<P>
To change the pointer acceleration, set <VAR>accel</VAR> to a tuple
<CODE>(num, denum)</CODE>. The pointer will then move <CODE>num/denum</CODE> times
the normal speed if it moves beyond the threshold number of pixels at
once. To change the threshold, set it to the number of pixels. -1
restores the default.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>get_pointer_control</B> <I>( )</I>
<DD><A NAME="IDX221"></A>
<P>
Return an object with the following attributes:
<DL COMPACT>
<DT><CODE>accel_num</CODE>
<DD>
<DT><CODE>accel_denom</CODE>
<DD>
The acceleration as numerator/denumerator.
<DT><CODE>threshold</CODE>
<DD>
The number of pixels the pointer must move before the acceleration kicks
in.
</DL>
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>set_screen_saver</B> <I>( timeout, interval, prefer_blank, allow_exposures, onerror = None )</I>
<DD><A NAME="IDX222"></A>
<P>
See XSetScreenSaver(3X11).
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>get_screen_saver</B> <I>( )</I>
<DD><A NAME="IDX223"></A>
<P>
Return an object with the attributes <CODE>timeout</CODE>, <CODE>interval</CODE>,
<CODE>prefer_blanking</CODE>, <CODE>allow_exposures</CODE>. See
XGetScreenSaver(3X11) for details.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>change_hosts</B> <I>( mode, host_family, host, onerror = None )</I>
<DD><A NAME="IDX224"></A>
<P>
<VAR>mode</VAR> is either <CODE>X.HostInsert</CODE> or <CODE>X.HostDelete</CODE>.
<VAR>host_family</VAR> is one of <CODE>X.FamilyInternet</CODE>,
<CODE>X.FamilyDECnet</CODE> or <CODE>X.FamilyChaos</CODE>.
<P>
<VAR>host</VAR> is a list of bytes. For the Internet family, it should be
the four bytes of an IPv4 address.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>list_hosts</B> <I>( )</I>
<DD><A NAME="IDX225"></A>
<P>
Return an object with the following attributes:
<DL COMPACT>
<DT><CODE>mode</CODE>
<DD>
<CODE>X.EnableAccess</CODE> if the access control list is used,
<CODE>X.DisableAccess</CODE> otherwise.
<DT><CODE>hosts</CODE>
<DD>
The hosts on the access list. Each entry has the following attributes:
<DL COMPACT>
<DT><CODE>family</CODE>
<DD>
<CODE>X.FamilyInternet</CODE>, <CODE>X.FamilyDECnet</CODE>, or <CODE>X.FamilyChaos</CODE>.
<DT><CODE>name</CODE>
<DD>
A list of byte values, the coding depends on <CODE>family</CODE>. For the
Internet family, it is the 4 bytes of an IPv4 address.
</DL>
</DL>
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>set_access_control</B> <I>( mode, onerror = None )</I>
<DD><A NAME="IDX226"></A>
<P>
Enable use of access control lists at connection setup if <VAR>mode</VAR> is
<CODE>X.EnableAccess</CODE>, disable if it is <CODE>X.DisableAccess</CODE>.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>set_close_down_mode</B> <I>( mode, onerror = None )</I>
<DD><A NAME="IDX227"></A>
<P>
Control what will happen with the client's resources at connection
close. The default is <CODE>X.DestroyAll</CODE>, the other values are
<CODE>X.RetainPermanent</CODE> and <CODE>X.RetainTemporary</CODE>.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>force_screen_saver</B> <I>( mode, onerror = None )</I>
<DD><A NAME="IDX228"></A>
<P>
If <VAR>mode</VAR> is <CODE>X.ScreenSaverActive</CODE> the screen saver is
activated. If it is <CODE>X.ScreenSaverReset</CODE>, the screen saver is
deactivated as if device input had been received.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>set_pointer_mapping</B> <I>( map )</I>
<DD><A NAME="IDX229"></A>
<P>
Set the mapping of the pointer buttons. <VAR>map</VAR> is a list of logical
button numbers. <VAR>map</VAR> must be of the same length as the list
returned by <CODE>Display.get_pointer_mapping()</CODE>.
<P>
<CODE>map[n]</CODE> sets the logical number for the physical button
<CODE>n+1</CODE>. Logical number 0 disables the button. Two physical buttons
cannot be mapped to the same logical number.
<P>
If one of the buttons to be altered are logically in the down state,
<CODE>X.MappingBusy</CODE> is returned and the mapping is not changed.
Otherwise the mapping is changed and <CODE>X.MappingSuccess</CODE> is returned.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>get_pointer_mapping</B> <I>( )</I>
<DD><A NAME="IDX230"></A>
<P>
Return a list of the pointer button mappings. Entry N in the list sets
the logical button number for the physical button N+1.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>set_modifier_mapping</B> <I>( keycodes )</I>
<DD><A NAME="IDX231"></A>
<P>
Set the keycodes for the eight modifiers <CODE>X.Shift</CODE>, <CODE>X.Lock</CODE>,
<CODE>X.Control</CODE>, <CODE>X.Mod1</CODE>, <CODE>X.Mod2</CODE>, <CODE>X.Mod3</CODE>,
<CODE>X.Mod4</CODE> and <CODE>X.Mod5</CODE>. <VAR>keycodes</VAR> should be a
eight-element list where each entry is a list of the keycodes that
should be bound to that modifier.
<P>
If any changed key is logically in the down state, <CODE>X.MappingBusy</CODE>
is returned and the mapping is not changed. If the mapping violates
some server restriction, <CODE>X.MappingFailed</CODE> is returned. Otherwise
the mapping is changed and <CODE>X.MappingSuccess</CODE> is returned.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>get_modifier_mapping</B> <I>( )</I>
<DD><A NAME="IDX232"></A>
<P>
Return a list of eight lists, one for each modifier. The list can be
indexed using <CODE>X.ShiftMapIndex</CODE>, <CODE>X.Mod1MapIndex</CODE>, and so on.
The sublists list the keycodes bound to that modifier.
</DL>
<P>
<DL>
<DT><U>Method:</U> Display <B>no_operation</B> <I>( onerror = None )</I>
<DD><A NAME="IDX233"></A>
<P>
Do nothing but send a request to the server.
</DL>
<P><HR><P>
Go to the <A HREF="python-xlib_1.html">first</A>, <A HREF="python-xlib_15.html">previous</A>, <A HREF="python-xlib_17.html">next</A>, <A HREF="python-xlib_25.html">last</A> section, <A HREF="python-xlib_toc.html">table of contents</A>.
</BODY>
</HTML>
|