/usr/share/gtk-doc/html/pygtk/class-gtkprinter.html is in python-gtk2-doc 2.24.0-3.
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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtkunixprint.Printer</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="unixprint-class-reference.html" title="The gtkunixprint Class Reference"><link rel="prev" href="class-gtkpagesetupunixdialog.html" title="gtkunixprint.PageSetupUnixDialog"><link rel="next" href="class-gtkprintjob.html" title="gtkunixprint.PrintJob"></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">gtkunixprint.Printer</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkpagesetupunixdialog.html">Prev</a> </td><th width="60%" align="center">The gtkunixprint Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkprintjob.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtkunixprint.Printer"><a name="class-gtkprinter"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtkunixprint.Printer</h2><p>gtkunixprint.Printer — an object representing a print in Unix (new in PyGTK
2.10)</p></div><div class="refsect1" title="Synopsis"><a name="id3232727"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtkunixprint.Printer</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK></span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkprinter.html#method-gtkprinter--get-name" title="gtkunixprint.Printer.get_name">get_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkprinter.html#method-gtkprinter--get-state-message" title="gtkunixprint.Printer.get_state_message">get_state_message</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkprinter.html#method-gtkprinter--get-capabilities" title="gtkunixprint.Printer.get_capabilities">get_capabilities</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkprinter.html#method-gtkprinter--get-description" title="gtkunixprint.Printer.get_description">get_description</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkprinter.html#method-gtkprinter--get-location" title="gtkunixprint.Printer.get_location">get_location</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkprinter.html#method-gtkprinter--get-icon-name" title="gtkunixprint.Printer.get_icon_name">get_icon_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkprinter.html#method-gtkprinter--get-job-count" title="gtkunixprint.Printer.get_job_count">get_job_count</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkprinter.html#method-gtkprinter--has-details" title="gtkunixprint.Printer.has_details">has_details</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkprinter.html#method-gtkprinter--request-details" title="gtkunixprint.Printer.request_details">request_details</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkprinter.html#method-gtkprinter--is-accepting-jobs" title="gtkunixprint.Printer.is_accepting_jobs">is_accepting_jobs</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkprinter.html#method-gtkprinter--is-active" title="gtkunixprint.Printer.is_active">is_active</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkprinter.html#method-gtkprinter--is-default" title="gtkunixprint.Printer.is_default">is_default</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkprinter.html#method-gtkprinter--is-paused" title="gtkunixprint.Printer.is_paused">is_paused</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkprinter.html#method-gtkprinter--is-virtual" title="gtkunixprint.Printer.is_virtual">is_virtual</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkprinter.html#method-gtkprinter--compare" title="gtkunixprint.Printer.compare">compare</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>b</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkprinter.html#method-gtkprinter--accepts-pdf" title="gtkunixprint.Printer.accepts_pdf">accepts_pdf</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkprinter.html#method-gtkprinter--accepts-ps" title="gtkunixprint.Printer.accepts_ps">accepts_ps</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3219568"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
+-- <a class="link" href="class-gtkprinter.html" title="gtkunixprint.Printer">gtkunixprint.Printer</a>
</pre></div><div class="refsect1" title="gtkunixprint.Printer Properties"><a name="properties-gtkprinter"></a><h2>gtkunixprint.Printer Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"accepting-jobs"</td><td valign="top">Read</td><td valign="top">This property is <code class="literal">True</code> if the printer
is accepting jobs. Default value: <code class="literal">True</code>.
Available in GTK+ 2.14.</td></tr><tr valign="top"><td valign="top">"accepts-ps"</td><td valign="top">Read-Write-Construct Only</td><td valign="top">if <code class="literal">True</code> this printer can accept
PostScript. Available in GTK+ 2.10.</td></tr><tr valign="top"><td valign="top">"accepts-ps"</td><td valign="top">Read-Write-Construct Only</td><td valign="top">if <code class="literal">True</code> this printer can accept
PostScript. Available in GTK+ 2.10.</td></tr><tr valign="top"><td valign="top">"backend"</td><td valign="top">Read-Write-Construct Only</td><td valign="top">The backend for the printer. Not currently useful in
PyGTK. Available in GTK+ 2.10.</td></tr><tr valign="top"><td valign="top">"icon-name"</td><td valign="top">Read</td><td valign="top">The icon name to use for the printer. Default value:
<code class="literal">None</code>. Available in GTK+ 2.10.</td></tr><tr valign="top"><td valign="top">"is-virtual"</td><td valign="top">Read-Write</td><td valign="top">if <code class="literal">False</code> this represents a real
hardware printer. Default value:
<code class="literal">False</code>. Available in GTK+ 2.10.</td></tr><tr valign="top"><td valign="top">"job-count"</td><td valign="top">Read</td><td valign="top">The number of jobs queued in the printer. Allowed
values: >= 0. Default value: 0. Available in GTK+
2.10.</td></tr><tr valign="top"><td valign="top">"location"</td><td valign="top">Read</td><td valign="top">The location of the printer. Default value:
<code class="literal">None</code>. Available in GTK+ 2.10.</td></tr><tr valign="top"><td valign="top">"name"</td><td valign="top">Read-Write-Construct Only</td><td valign="top">The name of the printer. Default value:
<code class="literal">None</code>. Available in GTK+ 2.10.</td></tr><tr valign="top"><td valign="top">"paused"</td><td valign="top">Read</td><td valign="top">This property is <code class="literal">True</code> if this printer is paused. A paused
printer still accepts jobs, but it does not print them.
Default value: <code class="literal">False</code>
Available in GTK+ 2.14.</td></tr><tr valign="top"><td valign="top">"state-message"</td><td valign="top">Read</td><td valign="top">A string giving the current state of the printer.
Default value: <code class="literal">None</code>. Available in GTK+
2.10.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtkunixprint.Printer Signal Prototypes"><a name="signal-prototypes-gtkprinter"></a><h2>gtkunixprint.Printer Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtkprinter.html#signal-gtkprinter--details-acquired" title='The "details-acquired" Signal'>details-acquired</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>printer</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>success</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id2920209"></a><h2>Description</h2><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This class is available in PyGTK 2.10 and above.</p></div><p>A <a class="link" href="class-gtkprinter.html" title="gtkunixprint.Printer"><code class="classname">gtkunixprint.Printer</code></a>
object represents a printer. You only need to deal directly with
printers if you use the non-portable <a class="link" href="class-gtkprintunixdialog.html" title="gtkunixprint.PrintUnixDialog"><code class="classname">gtkunixprint.PrintUnixDialog</code></a>
API.</p><p>A <a class="link" href="class-gtkprinter.html" title="gtkunixprint.Printer"><code class="classname">gtkunixprint.Printer</code></a>
allows you to get status information about the printer, such as its
description, its location, the number of queued jobs, etc. Most
importantly, a <a class="link" href="class-gtkprinter.html" title="gtkunixprint.Printer"><code class="classname">gtkunixprint.Printer</code></a>
object can be used to create a <a class="link" href="class-gtkprintjob.html" title="gtkunixprint.PrintJob"><code class="classname">gtkunixprint.PrintJob</code></a>
object, that lets you print to the printer.</p></div><div class="refsect1" title="Methods"><a name="id2981337"></a><h2>Methods</h2><div class="refsect2" title="gtkunixprint.Printer.get_name"><a name="method-gtkprinter--get-name"></a><h3>gtkunixprint.Printer.get_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_name</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 name of the printer</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_name</code>() method returns the name
of the printer.</p></div><div class="refsect2" title="gtkunixprint.Printer.get_state_message"><a name="method-gtkprinter--get-state-message"></a><h3>gtkunixprint.Printer.get_state_message</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_state_message</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 state message of the
printer</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_state_message</code>() method returns
the state message describing the current state of the printer.</p></div><div class="refsect2" title="gtkunixprint.Printer.get_description"><a name="method-gtkprinter--get-description"></a><h3>gtkunixprint.Printer.get_description</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_description</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 description of the
printer</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_description</code>() method returns
the description of the printer.</p></div><div class="refsect2" title="gtkunixprint.Printer.get_capabilities"><a name="method-gtkprinter--get-capabilities"></a><h3>gtkunixprint.Printer.get_capabilities</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_capabilities</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 printer's capabilities.</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>The <code class="methodname">get_capabilities</code>() method returns
the printer's capabilities.</p><p>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.</p><p>This will return 0 unless the printer's details are available,
see <a class="link" href="class-gtkprinter.html#method-gtkprinter--has-details" title="gtkunixprint.Printer.has_details">gtkunixprint.Printer.has_details</a>()
and <a class="link" href="class-gtkprinter.html#method-gtkprinter--request-details" title="gtkunixprint.Printer.request_details">gtkunixprint.Printer.request_details</a>().
</p></div><div class="refsect2" title="gtkunixprint.Printer.get_location"><a name="method-gtkprinter--get-location"></a><h3>gtkunixprint.Printer.get_location</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_location</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 location of the printer</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_location</code>() method returns a
description of the location of the printer.</p></div><div class="refsect2" title="gtkunixprint.Printer.get_icon_name"><a name="method-gtkprinter--get-icon-name"></a><h3>gtkunixprint.Printer.get_icon_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_icon_name</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 icon name for the printer</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_icon_name</code>() method returns the
name of the icon to use for the printer.</p></div><div class="refsect2" title="gtkunixprint.Printer.get_job_count"><a name="method-gtkprinter--get-job-count"></a><h3>gtkunixprint.Printer.get_job_count</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_job_count</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 number of jobs on the printer</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_job_count</code>() method returns the
number of jobs currently queued on the printer.</p></div><div class="refsect2" title="gtkunixprint.Printer.has_details"><a name="method-gtkprinter--has-details"></a><h3>gtkunixprint.Printer.has_details</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">has_details</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 printer details
are available</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>The <code class="methodname">has_details</code>() method returns
whether the printer details are available.</p></div><div class="refsect2" title="gtkunixprint.Printer.request_details"><a name="method-gtkprinter--request-details"></a><h3>gtkunixprint.Printer.request_details</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">request_details</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>The <code class="methodname">request_details</code>() method requests
the printer details. When the details are available,
the GtkPrinter::details-acquired signal will be emitted on printer.</p></div><div class="refsect2" title="gtkunixprint.Printer.is_accepting_jobs"><a name="method-gtkprinter--is-accepting-jobs"></a><h3>gtkunixprint.Printer.is_accepting_jobs</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_accepting_jobs</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 printer is accepting jobs.</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.14 and above.</p></div><p>The <code class="methodname">is_accepting_jobs</code>() method returns
whether the printer is accepting jobs</p></div><div class="refsect2" title="gtkunixprint.Printer.is_active"><a name="method-gtkprinter--is-active"></a><h3>gtkunixprint.Printer.is_active</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_active</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 printer is active</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">is_active</code>() method returns
<code class="literal">True</code> if the printer is currently active (i.e.
accepts new jobs).</p></div><div class="refsect2" title="gtkunixprint.Printer.is_paused"><a name="method-gtkprinter--is-paused"></a><h3>gtkunixprint.Printer.is_paused</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_paused</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 printer is paused.</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.14 and above.</p></div><p>The <code class="methodname">is_paused</code>() method returns
whether the printer is currently paused. A paused printer still accepts
jobs, but it is not printing them.</p></div><div class="refsect2" title="gtkunixprint.Printer.is_virtual"><a name="method-gtkprinter--is-virtual"></a><h3>gtkunixprint.Printer.is_virtual</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_virtual</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 printer is
virtual</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">is_virtual</code>() method returns
<code class="literal">True</code> if the printer is virtual (i.e. does not
represent actual printer hardware, but something like a CUPS
class).</p></div><div class="refsect2" title="gtkunixprint.Printer.is_default"><a name="method-gtkprinter--is-default"></a><h3>gtkunixprint.Printer.is_default</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_default</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 printer is the default</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">is_default</code>() method returns
<code class="literal">True</code> if the printer is the default printer.</p></div><div class="refsect2" title="gtkunixprint.Printer.compare"><a name="method-gtkprinter--compare"></a><h3>gtkunixprint.Printer.compare</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">compare</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>b</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>b</code></strong> :</span></p></td><td>a <a class="link" href="class-gtkprinter.html" title="gtkunixprint.Printer"><code class="classname">gtkunixprint.Printer</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer indicating the result of the
comparison of the <a class="link" href="class-gtkprinter.html" title="gtkunixprint.Printer"><code class="classname">gtkunixprint.Printer</code></a>
names.</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 compare() method compares the name of the printer to the
name of the <a class="link" href="class-gtkprinter.html" title="gtkunixprint.Printer"><code class="classname">gtkunixprint.Printer</code></a>
specified by <em class="parameter"><code>b</code></em> and returns:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>a negative integer if the name of the printer is less than
the name of <em class="parameter"><code>b</code></em>.</p></li><li class="listitem"><p>a negative integer if the name of the printer is the same as
the name of <em class="parameter"><code>b</code></em>.</p></li><li class="listitem"><p>a positive integer if the name of the printer is greater
than the name of <em class="parameter"><code>b</code></em>.</p></li></ul></div></div><div class="refsect2" title="gtkunixprint.Printer.accepts_pdf"><a name="method-gtkprinter--accepts-pdf"></a><h3>gtkunixprint.Printer.accepts_pdf</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">accepts_pdf</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 printer accepts
PDF</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>Returns whether the printer accepts input in PDF format.</p></div><div class="refsect2" title="gtkunixprint.Printer.accepts_ps"><a name="method-gtkprinter--accepts-ps"></a><h3>gtkunixprint.Printer.accepts_ps</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">accepts_ps</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 printer accepts
PostScript</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>Returns whether the printer accepts input in PostScript
format.</p></div></div><div class="refsect1" title="Signals"><a name="id3079612"></a><h2>Signals</h2><div class="refsect2" title='The "details-acquired" Signal'><a name="signal-gtkprinter--details-acquired"></a><h3>The "details-acquired" Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>printer</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>success</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></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"><em class="parameter"><code>printer</code></em> :</span></p></td><td>the printer that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>success</code></em> :</span></p></td><td><code class="literal">True</code> if the details were
successfully acquired</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</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 signal is available in GTK+ 2.10 and above.</p></div><p>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.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtkpagesetupunixdialog.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="unixprint-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gtkprintjob.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtkunixprint.PageSetupUnixDialog </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtkunixprint.PrintJob</td></tr></table></div></body></html>
|