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
|
<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="class-gtkprinter">
<refnamediv>
<refname>gtkunixprint.Printer</refname>
<refpurpose>an object representing a print in Unix (new in PyGTK
2.10)</refpurpose>
</refnamediv>
<refsect1>
<title>Synopsis</title>
<classsynopsis language="python">
<ooclass><classname>gtkunixprint.Printer</classname></ooclass>
<ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
<!-- NOT IMPLEMENTED
<constructorsynopsis language="python">
<methodname><link linkend="constructor-gtkprinter">gtkunixprint.Printer</link></methodname>
<methodparam><parameter role="keyword">name</parameter></methodparam>
<methodparam><parameter role="keyword">backend</parameter></methodparam>
<methodparam><parameter role="keyword">is_virtual</parameter></methodparam>
</constructorsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter- -get-backend">get_backend</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
END NOT IMPLEMENTED -->
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter--get-name">get_name</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter--get-state-message">get_state_message</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter--get-capabilities">get_capabilities</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter--get-description">get_description</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter--get-location">get_location</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter--get-icon-name">get_icon_name</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter--get-job-count">get_job_count</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter--has-details">has_details</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter--request-details">request_details</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter--is-accepting-jobs">is_accepting_jobs</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter--is-active">is_active</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter--is-default">is_default</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter--is-paused">is_paused</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter--is-virtual">is_virtual</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter--compare">compare</link></methodname>
<methodparam><parameter role="keyword">b</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter--accepts-pdf">accepts_pdf</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkprinter--accepts-ps">accepts_ps</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
</classsynopsis>
</refsect1>
<refsect1>
<title>Ancestry</title>
<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+-- <link linkend="class-gtkprinter">gtkunixprint.Printer</link>
</synopsis>
</refsect1>
<refsect1 id="properties-gtkprinter">
<title>gtkunixprint.Printer Properties</title>
<blockquote role="properties">
<informaltable pgwide="1" frame="none">
<tgroup cols="3">
<colspec column="1" colwidth="1in"/>
<colspec column="2" colwidth="1in"/>
<colspec column="3" colwidth="4in"/>
<tbody>
<row valign="top">
<entry>"accepting-jobs"</entry>
<entry>Read</entry>
<entry>This property is <literal>True</literal> if the printer
is accepting jobs. Default value: <literal>True</literal>.
Available in GTK+ 2.14.</entry>
</row>
<row valign="top">
<entry>"accepts-ps"</entry>
<entry>Read-Write-Construct Only</entry>
<entry>if <literal>True</literal> this printer can accept
PostScript. Available in GTK+ 2.10.</entry>
</row>
<row valign="top">
<entry>"accepts-ps"</entry>
<entry>Read-Write-Construct Only</entry>
<entry>if <literal>True</literal> this printer can accept
PostScript. Available in GTK+ 2.10.</entry>
</row>
<row valign="top">
<entry>"backend"</entry>
<entry>Read-Write-Construct Only</entry>
<entry>The backend for the printer. Not currently useful in
PyGTK. Available in GTK+ 2.10.</entry>
</row>
<row valign="top">
<entry>"icon-name"</entry>
<entry>Read</entry>
<entry>The icon name to use for the printer. Default value:
<literal>None</literal>. Available in GTK+ 2.10.</entry>
</row>
<row valign="top">
<entry>"is-virtual"</entry>
<entry>Read-Write</entry>
<entry>if <literal>False</literal> this represents a real
hardware printer. Default value:
<literal>False</literal>. Available in GTK+ 2.10.</entry>
</row>
<row valign="top">
<entry>"job-count"</entry>
<entry>Read</entry>
<entry>The number of jobs queued in the printer. Allowed
values: >= 0. Default value: 0. Available in GTK+
2.10.</entry>
</row>
<row valign="top">
<entry>"location"</entry>
<entry>Read</entry>
<entry>The location of the printer. Default value:
<literal>None</literal>. Available in GTK+ 2.10.</entry>
</row>
<row valign="top">
<entry>"name"</entry>
<entry>Read-Write-Construct Only</entry>
<entry>The name of the printer. Default value:
<literal>None</literal>. Available in GTK+ 2.10.</entry>
</row>
<row valign="top">
<entry>"paused"</entry>
<entry>Read</entry>
<entry>This property is <literal>True</literal> if this printer is paused. A paused
printer still accepts jobs, but it does not print them.
Default value: <literal>False</literal>
Available in GTK+ 2.14.</entry>
</row>
<row valign="top">
<entry>"state-message"</entry>
<entry>Read</entry>
<entry>A string giving the current state of the printer.
Default value: <literal>None</literal>. Available in GTK+
2.10.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</blockquote>
</refsect1>
<refsect1 id="signal-prototypes-gtkprinter">
<title>gtkunixprint.Printer Signal Prototypes</title>
<para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
<variablelist>
<varlistentry>
<term>"<link linkend="signal-gtkprinter--details-acquired">details-acquired</link>"</term>
<listitem>
<methodsynopsis language="python"><methodname>callback</methodname>
<methodparam><parameter>printer</parameter></methodparam>
<methodparam><parameter>success</parameter></methodparam>
<methodparam><parameter>user_param1</parameter></methodparam>
<methodparam><parameter>...</parameter></methodparam>
</methodsynopsis>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<note>
<para>This class is available in PyGTK 2.10 and above.</para>
</note>
<para>A <link
linkend="class-gtkprinter"><classname>gtkunixprint.Printer</classname></link>
object represents a printer. You only need to deal directly with
printers if you use the non-portable <link
linkend="class-gtkprintunixdialog"><classname>gtkunixprint.PrintUnixDialog</classname></link>
API.</para>
<para>A <link
linkend="class-gtkprinter"><classname>gtkunixprint.Printer</classname></link>
allows you to get status information about the printer, such as its
description, its location, the number of queued jobs, etc. Most
importantly, a <link
linkend="class-gtkprinter"><classname>gtkunixprint.Printer</classname></link>
object can be used to create a <link
linkend="class-gtkprintjob"><classname>gtkunixprint.PrintJob</classname></link>
object, that lets you print to the printer.</para>
</refsect1>
<!-- NOT IMPLEMENTED
<refsect1>
<title>Constructor</title>
<refsect2 id="constructor-gtkprinter">
<title>gtkunixprint.Printer</title>
<programlisting><constructorsynopsis language="python">
<methodname>gtkunixprint.Printer</methodname>
<methodparam><parameter role="keyword">name</parameter></methodparam>
<methodparam><parameter role="keyword">backend</parameter></methodparam>
<methodparam><parameter role="keyword">is_virtual</parameter></methodparam>
</constructorsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">name</parameter> :</term>
<listitem><simpara>the name of the printer</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">backend</parameter> :</term>
<listitem><simpara>a <literal>GtkPrintBackend</literal></simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">is_virtual</parameter> :</term>
<listitem><simpara></simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a new <link linkend="class-gtkprinter"><classname>gtkunixprint.Printer</classname></link></simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This constructor is available in PyGTK 2.10 and above.</para>
</note>
<para>Creates a new <link linkend="class-gtkprinter"><classname>gtkunixprint.Printer</classname></link>.</para>
</refsect2>
</refsect1>
END NOT IMPLEMENTED -->
<refsect1>
<title>Methods</title>
<!-- NOT IMPLEMENTED
<refsect2 id="method-gtkprinter- -get-backend">
<title>gtkunixprint.Printer.get_backend</title>
<programlisting><methodsynopsis language="python">
<methodname>get_backend</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the backend of <parameter>printer</parameter></simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>get_backend</methodname>() method returns the backend of the printer.</para>
</refsect2>
END NOT IMPLEMENTED -->
<refsect2 id="method-gtkprinter--get-name">
<title>gtkunixprint.Printer.get_name</title>
<programlisting><methodsynopsis language="python">
<methodname>get_name</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the name of the printer</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>get_name</methodname>() method returns the name
of the printer.</para>
</refsect2>
<refsect2 id="method-gtkprinter--get-state-message">
<title>gtkunixprint.Printer.get_state_message</title>
<programlisting><methodsynopsis language="python">
<methodname>get_state_message</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the state message of the
printer</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>get_state_message</methodname>() method returns
the state message describing the current state of the printer.</para>
</refsect2>
<refsect2 id="method-gtkprinter--get-description">
<title>gtkunixprint.Printer.get_description</title>
<programlisting><methodsynopsis language="python">
<methodname>get_description</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the description of the
printer</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>get_description</methodname>() method returns
the description of the printer.</para>
</refsect2>
<refsect2 id="method-gtkprinter--get-capabilities">
<title>gtkunixprint.Printer.get_capabilities</title>
<programlisting><methodsynopsis language="python">
<methodname>get_capabilities</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the printer's capabilities.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.12 and above.</para>
</note>
<para>The <methodname>get_capabilities</methodname>() method returns
the printer's capabilities.</para>
<para>This is useful when you're using GtkPrintUnixDialog's
manual-capabilities setting and need to know which settings the
printer can handle and which you must handle yourself.</para>
<para>This will return 0 unless the printer's details are available,
see <link linkend="method-gtkprinter--has-details">gtkunixprint.Printer.has_details</link>()
and <link linkend="method-gtkprinter--request-details">gtkunixprint.Printer.request_details</link>().
</para>
</refsect2>
<refsect2 id="method-gtkprinter--get-location">
<title>gtkunixprint.Printer.get_location</title>
<programlisting><methodsynopsis language="python">
<methodname>get_location</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the location of the printer</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>get_location</methodname>() method returns a
description of the location of the printer.</para>
</refsect2>
<refsect2 id="method-gtkprinter--get-icon-name">
<title>gtkunixprint.Printer.get_icon_name</title>
<programlisting><methodsynopsis language="python">
<methodname>get_icon_name</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the icon name for the printer</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>get_icon_name</methodname>() method returns the
name of the icon to use for the printer.</para>
</refsect2>
<refsect2 id="method-gtkprinter--get-job-count">
<title>gtkunixprint.Printer.get_job_count</title>
<programlisting><methodsynopsis language="python">
<methodname>get_job_count</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the number of jobs on the printer</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>get_job_count</methodname>() method returns the
number of jobs currently queued on the printer.</para>
</refsect2>
<refsect2 id="method-gtkprinter--has-details">
<title>gtkunixprint.Printer.has_details</title>
<programlisting><methodsynopsis language="python">
<methodname>has_details</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if printer details
are available</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.12 and above.</para>
</note>
<para>The <methodname>has_details</methodname>() method returns
whether the printer details are available.</para>
</refsect2>
<refsect2 id="method-gtkprinter--request-details">
<title>gtkunixprint.Printer.request_details</title>
<programlisting><methodsynopsis language="python">
<methodname>request_details</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
</variablelist>
<note>
<para>This method is available in PyGTK 2.12 and above.</para>
</note>
<para>The <methodname>request_details</methodname>() method requests
the printer details. When the details are available,
the GtkPrinter::details-acquired signal will be emitted on printer.</para>
</refsect2>
<refsect2 id="method-gtkprinter--is-accepting-jobs">
<title>gtkunixprint.Printer.is_accepting_jobs</title>
<programlisting><methodsynopsis language="python">
<methodname>is_accepting_jobs</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if printer is accepting jobs.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.14 and above.</para>
</note>
<para>The <methodname>is_accepting_jobs</methodname>() method returns
whether the printer is accepting jobs</para>
</refsect2>
<refsect2 id="method-gtkprinter--is-active">
<title>gtkunixprint.Printer.is_active</title>
<programlisting><methodsynopsis language="python">
<methodname>is_active</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if the printer is active</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>is_active</methodname>() method returns
<literal>True</literal> if the printer is currently active (i.e.
accepts new jobs).</para>
</refsect2>
<refsect2 id="method-gtkprinter--is-paused">
<title>gtkunixprint.Printer.is_paused</title>
<programlisting><methodsynopsis language="python">
<methodname>is_paused</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if the printer is paused.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.14 and above.</para>
</note>
<para>The <methodname>is_paused</methodname>() method returns
whether the printer is currently paused. A paused printer still accepts
jobs, but it is not printing them.</para>
</refsect2>
<refsect2 id="method-gtkprinter--is-virtual">
<title>gtkunixprint.Printer.is_virtual</title>
<programlisting><methodsynopsis language="python">
<methodname>is_virtual</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if the printer is
virtual</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>is_virtual</methodname>() method returns
<literal>True</literal> if the printer is virtual (i.e. does not
represent actual printer hardware, but something like a CUPS
class).</para>
</refsect2>
<refsect2 id="method-gtkprinter--is-default">
<title>gtkunixprint.Printer.is_default</title>
<programlisting><methodsynopsis language="python">
<methodname>is_default</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if the printer is the default</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The <methodname>is_default</methodname>() method returns
<literal>True</literal> if the printer is the default printer.</para>
</refsect2>
<refsect2 id="method-gtkprinter--compare">
<title>gtkunixprint.Printer.compare</title>
<programlisting><methodsynopsis language="python">
<methodname>compare</methodname>
<methodparam><parameter role="keyword">b</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">b</parameter> :</term>
<listitem><simpara>a <link
linkend="class-gtkprinter"><classname>gtkunixprint.Printer</classname></link></simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>an integer indicating the result of the
comparison of the <link
linkend="class-gtkprinter"><classname>gtkunixprint.Printer</classname></link>
names.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>The compare() method compares the name of the printer to the
name of the <link
linkend="class-gtkprinter"><classname>gtkunixprint.Printer</classname></link>
specified by <parameter>b</parameter> and returns:</para>
<itemizedlist>
<listitem>
<para>a negative integer if the name of the printer is less than
the name of <parameter>b</parameter>.</para>
</listitem>
<listitem>
<para>a negative integer if the name of the printer is the same as
the name of <parameter>b</parameter>.</para>
</listitem>
<listitem>
<para>a positive integer if the name of the printer is greater
than the name of <parameter>b</parameter>.</para>
</listitem>
</itemizedlist>
</refsect2>
<refsect2 id="method-gtkprinter--accepts-pdf">
<title>gtkunixprint.Printer.accepts_pdf</title>
<programlisting><methodsynopsis language="python">
<methodname>accepts_pdf</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if the printer accepts
PDF</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>Returns whether the printer accepts input in PDF format.</para>
</refsect2>
<refsect2 id="method-gtkprinter--accepts-ps">
<title>gtkunixprint.Printer.accepts_ps</title>
<programlisting><methodsynopsis language="python">
<methodname>accepts_ps</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if the printer accepts
PostScript</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>Returns whether the printer accepts input in PostScript
format.</para>
</refsect2>
</refsect1>
<refsect1>
<title>Signals</title>
<refsect2 id="signal-gtkprinter--details-acquired">
<title>The "details-acquired" Signal</title>
<programlisting><methodsynopsis language="python">
<methodname>callback</methodname>
<methodparam><parameter>printer</parameter></methodparam>
<methodparam><parameter>success</parameter></methodparam>
<methodparam><parameter>user_param1</parameter></methodparam>
<methodparam><parameter>...</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter>printer</parameter> :</term>
<listitem><simpara>the printer that received the
signal</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>success</parameter> :</term>
<listitem><simpara><literal>True</literal> if the details were
successfully acquired</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>user_param1</parameter> :</term>
<listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>...</parameter> :</term>
<listitem><simpara>additional user parameters (if
any)</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This signal is available in GTK+ 2.10 and above.</para>
</note>
<para>The "details-acquired" signal is emitted in response to a
request for detailed information about a printer from the print
backend. The success parameter indicates if the information was
actually obtained.</para>
</refsect2>
</refsect1>
</refentry>
|