gtk.printer

Module for [Printer] class

Types 3

A gtk.printer.Printer object represents a printer.

You only need to deal directly with printers if you use the non-portable gtk.print_unix_dialog.PrintUnixDialog API.

A gtk.printer.Printer allows to get status information about the printer, such as its description, its location, the number of queued jobs, etc. Most importantly, a gtk.printer.Printer object can be used to create a gtk.print_job.PrintJob object, which lets you print to the printer.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
Printer self() nothrowReturns `this`, for use in `with` statements.
PrinterGidBuilder builder() static nothrowGet builder for [gtk.printer.Printer] Returns: New builder object
bool acceptingJobs() @property nothrowGet `acceptingJobs` property. Returns: true if the printer is accepting jobs.
string iconName() @property nothrowGet `iconName` property. Returns: Icon name to use for the printer.
int jobCount() @property nothrowGet `jobCount` property. Returns: Number of jobs queued in the printer.
string location() @property nothrowGet `location` property. Returns: Information about the location of the printer.
string name() @property nothrowGet `name` property. Returns: The name of the printer.
bool paused() @property nothrowGet `paused` property. Returns: true if this printer is paused.
string stateMessage() @property nothrowGet `stateMessage` property. Returns: String giving the current status of the printer.
bool acceptsPdf() nothrowReturns whether the printer accepts input in PDF format. Returns: true if printer accepts PDF
bool acceptsPs() nothrowReturns whether the printer accepts input in PostScript format. Returns: true if printer accepts PostScript
int compare(gtk.printer.Printer b) nothrowCompares two printers.
gtk.types.PrintBackend getBackend() nothrowReturns the backend of the printer. Returns: the backend of printer
gtk.types.PrintCapabilities getCapabilities() nothrowReturns the printer’s capabilities.
gtk.page_setup.PageSetup getDefaultPageSize() nothrowReturns default page size of printer. Returns: a newly allocated [gtk.page_setup.PageSetup] with default page size of the printer.
string getDescription() nothrowGets the description of the printer. Returns: the description of printer
bool getHardMargins(out double top, out double bottom, out double left, out double right) nothrowRetrieve the hard margins of printer.
bool getHardMarginsForPaperSize(gtk.paper_size.PaperSize paperSize, out double top, out double bottom, out double left, out double right) nothrowRetrieve the hard margins of printer for paper_size.
string getIconName() nothrowGets the name of the icon to use for the printer. Returns: the icon name for printer
int getJobCount() nothrowGets the number of jobs currently queued on the printer. Returns: the number of jobs on printer
string getLocation() nothrowReturns a description of the location of the printer. Returns: the location of printer
string getName() nothrowReturns the name of the printer. Returns: the name of printer
string getStateMessage() nothrowReturns the state message describing the current state of the printer. Returns: the state message of printer
bool hasDetails() nothrowReturns whether the printer details are available. Returns: true if printer details are available
bool isAcceptingJobs() nothrowReturns whether the printer is accepting jobs Returns: true if printer is accepting jobs
bool isActive() nothrowReturns whether the printer is currently active (i.e. accepts new jobs). Returns: true if printer is active
bool isDefault() nothrowReturns whether the printer is the default printer. Returns: true if printer is the default
bool isPaused() nothrowReturns whether the printer is currently paused.
bool isVirtual() nothrowReturns whether the printer is virtual (i.e. does not represent actual printer hardware, but something like a CUPS class). Returns: true if printer is virtual
gtk.page_setup.PageSetup[] listPapers() nothrowLists all the paper sizes printer supports.
void requestDetails() nothrowRequests the printer details.
gulong connectDetailsAcquired(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == bool))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.printer.Printer))) && Parameters!T.length < 3) nothrowConnect to `DetailsAcquired` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this(string name, gtk.types.PrintBackend backend, bool virtual)Creates a new [gtk.printer.Printer].

Fluent builder implementation template for gtk.printer.Printer

Methods
T name(string propval) nothrowSet `name` property. Params: propval = The name of the printer. Returns: Builder instance for fluent chaining

Fluent builder for gtk.printer.Printer

Methods
Printer build() nothrowCreate object from builder. Returns: New object