Class: Gtk::Printer
- Inherits:
-
Object
- Object
- Gtk::Printer
- Defined in:
- (unknown)
Overview
A GtkPrinter object represents a printer.
You only need to deal directly with printers if you use the non-portable [classGtk.PrintUnixDialog] API.
A GtkPrinter allows to get status information about the printer,
such as its description, its location, the number of queued jobs,
etc. Most importantly, a GtkPrinter object can be used to create
a [classGtk.PrintJob] object, which lets you print to the printer.
Instance Method Summary collapse
-
#accepting_jobs=(accepting_jobs) ⇒ Boolean
true if the printer is accepting jobs.
-
#accepting_jobs? ⇒ Boolean
true if the printer is accepting jobs.
-
#accepts_pdf ⇒ Boolean
Returns whether the printer accepts input in PDF format.
-
#accepts_pdf=(accepts_pdf) ⇒ Boolean
true if this printer can accept PDF.
-
#accepts_pdf? ⇒ Boolean
true if this printer can accept PDF.
-
#accepts_ps ⇒ Boolean
Returns whether the printer accepts input in PostScript format.
-
#accepts_ps=(accepts_ps) ⇒ Boolean
true if this printer can accept PostScript.
-
#accepts_ps? ⇒ Boolean
true if this printer can accept PostScript.
-
#backend ⇒ Gtk::
The backend for the printer.
-
#backend=(backend) ⇒ Gtk::
The backend for the printer.
-
#capabilities ⇒ Gtk::PrintCapabilities
Returns the printer’s capabilities.
-
#compare(b) ⇒ Integer
Compares two printers.
-
#default_page_size ⇒ Gtk::PageSetup
Returns default page size of printer.
-
#description ⇒ String
Gets the description of the printer.
-
#get_hard_margins(top, bottom, left, right) ⇒ Boolean
Retrieve the hard margins of printer.
-
#get_hard_margins_for_paper_size(paper_size, top, bottom, left, right) ⇒ Boolean
Retrieve the hard margins of printer for paper_size.
-
#has_details ⇒ Boolean
Returns whether the printer details are available.
-
#icon_name ⇒ String
Icon name to use for the printer.
-
#icon_name=(icon_name) ⇒ String
Icon name to use for the printer.
-
#initialize(name, backend, virtual_) ⇒ Gtk::Printer
constructor
Creates a new
GtkPrinter. -
#is_accepting_jobs ⇒ Boolean
Returns whether the printer is accepting jobs.
-
#is_active ⇒ Boolean
Returns whether the printer is currently active (i.e. accepts new jobs).
-
#is_default ⇒ Boolean
Returns whether the printer is the default printer.
-
#is_paused ⇒ Boolean
Returns whether the printer is currently paused.
-
#is_virtual ⇒ Boolean
Returns whether the printer is virtual (i.e. does not represent actual printer hardware, but something like a CUPS class).
-
#is_virtual=(is_virtual) ⇒ Boolean
false if this represents a real hardware device.
-
#is_virtual? ⇒ Boolean
false if this represents a real hardware device.
-
#job_count ⇒ Integer
Number of jobs queued in the printer.
-
#job_count=(job_count) ⇒ Integer
Number of jobs queued in the printer.
-
#list_papers ⇒ GLib::List<Gtk::PageSetup>
Lists all the paper sizes printer supports.
-
#location ⇒ String
Information about the location of the printer.
-
#location=(location) ⇒ String
Information about the location of the printer.
-
#name ⇒ String
The name of the printer.
-
#name=(name) ⇒ String
The name of the printer.
-
#paused=(paused) ⇒ Boolean
true if this printer is paused.
-
#paused? ⇒ Boolean
true if this printer is paused.
-
#request_details ⇒ nil
Requests the printer details.
-
#state_message ⇒ String
String giving the current status of the printer.
-
#state_message=(state_message) ⇒ String
String giving the current status of the printer.
Constructor Details
#initialize(name, backend, virtual_) ⇒ Gtk::Printer
Creates a new GtkPrinter.
Instance Method Details
#accepting_jobs=(accepting_jobs) ⇒ Boolean
true if the printer is accepting jobs.
#accepting_jobs? ⇒ Boolean
true if the printer is accepting jobs.
#accepts_pdf ⇒ Boolean
Returns whether the printer accepts input in PDF format.
#accepts_pdf=(accepts_pdf) ⇒ Boolean
true if this printer can accept PDF.
#accepts_pdf? ⇒ Boolean
true if this printer can accept PDF.
#accepts_ps ⇒ Boolean
Returns whether the printer accepts input in PostScript format.
#accepts_ps=(accepts_ps) ⇒ Boolean
true if this printer can accept PostScript.
#accepts_ps? ⇒ Boolean
true if this printer can accept PostScript.
#backend ⇒ Gtk::
The backend for the printer.
#backend=(backend) ⇒ Gtk::
The backend for the printer.
#capabilities ⇒ Gtk::PrintCapabilities
Returns the printer’s capabilities.
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.
This will return 0 unless the printer’s details are available, see [methodGtk.Printer.has_details] and [methodGtk.Printer.request_details].
#compare(b) ⇒ Integer
Compares two printers.
#default_page_size ⇒ Gtk::PageSetup
Returns default page size of printer.
#description ⇒ String
Gets the description of the printer.
#get_hard_margins(top, bottom, left, right) ⇒ Boolean
Retrieve the hard margins of printer.
These are the margins that define the area at the borders of the paper that the printer cannot print to.
Note: This will not succeed unless the printer’s details are available, see [methodGtk.Printer.has_details] and [methodGtk.Printer.request_details].
#get_hard_margins_for_paper_size(paper_size, top, bottom, left, right) ⇒ Boolean
Retrieve the hard margins of printer for paper_size.
These are the margins that define the area at the borders of the paper that the printer cannot print to.
Note: This will not succeed unless the printer’s details are available, see [methodGtk.Printer.has_details] and [methodGtk.Printer.request_details].
#has_details ⇒ Boolean
Returns whether the printer details are available.
#icon_name ⇒ String
Icon name to use for the printer.
#icon_name=(icon_name) ⇒ String
Icon name to use for the printer.
#is_accepting_jobs ⇒ Boolean
Returns whether the printer is accepting jobs
#is_active ⇒ Boolean
Returns whether the printer is currently active (i.e. accepts new jobs).
#is_default ⇒ Boolean
Returns whether the printer is the default printer.
#is_paused ⇒ Boolean
Returns whether the printer is currently paused.
A paused printer still accepts jobs, but it is not printing them.
#is_virtual ⇒ Boolean
Returns whether the printer is virtual (i.e. does not represent actual printer hardware, but something like a CUPS class).
#is_virtual=(is_virtual) ⇒ Boolean
false if this represents a real hardware device.
#is_virtual? ⇒ Boolean
false if this represents a real hardware device.
#job_count ⇒ Integer
Number of jobs queued in the printer.
#job_count=(job_count) ⇒ Integer
Number of jobs queued in the printer.
#list_papers ⇒ GLib::List<Gtk::PageSetup>
Lists all the paper sizes printer supports.
This will return and empty list unless the printer’s details are available, see [methodGtk.Printer.has_details] and [methodGtk.Printer.request_details].
#location ⇒ String
Information about the location of the printer.
#location=(location) ⇒ String
Information about the location of the printer.
#name ⇒ String
The name of the printer.
#name=(name) ⇒ String
The name of the printer.
#paused=(paused) ⇒ Boolean
true if this printer is paused.
A paused printer still accepts jobs, but it does not print them.
#paused? ⇒ Boolean
true if this printer is paused.
A paused printer still accepts jobs, but it does not print them.
#request_details ⇒ nil
Requests the printer details.
When the details are available, the [signalGtk.Printer::details-acquired] signal will be emitted on printer.
#state_message ⇒ String
String giving the current status of the printer.
#state_message=(state_message) ⇒ String
String giving the current status of the printer.