gtk.printer
Module for [Printer] class
Types 3
classPrinter : gobject.object.ObjectWrap
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
PrinterGidBuilder builder() static nothrowGet builder for [gtk.printer.Printer] Returns: New builder objectbool 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 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 PDFbool acceptsPs() nothrowReturns whether the printer accepts input in PostScript format. Returns: true if printer accepts PostScriptgtk.types.PrintBackend getBackend() nothrowReturns the backend of the printer. Returns: the backend of printergtk.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 printerbool 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 printerint getJobCount() nothrowGets the number of jobs currently queued on the printer. Returns: the number of jobs on printerstring getLocation() nothrowReturns a description of the location of the printer. Returns: the location of printerstring getStateMessage() nothrowReturns the state message describing the current state of the printer. Returns: the state message of printerbool hasDetails() nothrowReturns whether the printer details are available. Returns: true if printer details are availablebool isAcceptingJobs() nothrowReturns whether the printer is accepting jobs Returns: true if printer is accepting jobsbool isActive() nothrowReturns whether the printer is currently active (i.e. accepts new jobs). Returns: true if printer is activebool isDefault() nothrowReturns whether the printer is the default printer. Returns: true if printer is the defaultbool 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 virtualgulong 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(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 chainingFluent builder for gtk.printer.Printer