PrinterProtocol
public protocol PrinterProtocol : ObjectProtocol
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.
The PrinterProtocol protocol exposes the methods and properties of an underlying GtkPrinter instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see Printer.
Alternatively, use PrinterRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkPrinterinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
printer_ptrDefault implementationTyped pointer to the underlying
GtkPrinterinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkPrinterinstance.Declaration
Swift
var printer_ptr: UnsafeMutablePointer<GtkPrinter>! { get } -
Required Initialiser for types conforming to
PrinterProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
PrinterPropertyNamesource property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: PrinterPropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocolParameters
source_propertythe source property to bind
targetthe target object to bind to
target_propertythe target property to bind to
flagsthe flags to pass to the
Bindingtransform_fromValueTransformerto use for forward transformationtransform_toValueTransformerto use for backwards transformationReturn Value
binding reference or
nilin case of an error -
get(property:Extension method) Get the value of a Printer property
Declaration
Swift
@inlinable func get(property: PrinterPropertyName) -> GLibObject.ValueParameters
propertythe property to get the value for
Return Value
the value of the named property
-
set(property:Extension methodvalue: ) Set the value of a Printer property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: PrinterPropertyName, value v: GLibObject.Value)Parameters
propertythe property to get the value for
Return Value
the value of the named property
-
connect(signal:Extension methodflags: handler: ) Connect a Swift signal handler to the given, typed
PrinterSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: PrinterSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatahandlerThe Swift signal handler (function or callback) to invoke on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
connect(signal:Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
PrinterSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: PrinterSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatasignalHandlerThe C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
onDetailsAcquired(flags:Extension methodhandler: ) Emitted in response to a request for detailed information about a printer from the print backend.
The
successparameter indicates if the information was actually obtained.Note
This represents the underlyingdetails-acquiredsignalDeclaration
Swift
@discardableResult @inlinable func onDetailsAcquired(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ success: Bool) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
successtrueif the details were successfully acquiredhandlerThe signal handler to call Run the given callback whenever the
detailsAcquiredsignal is emitted -
detailsAcquiredSignalExtension methodTyped
details-acquiredsignal for using theconnect(signal:)methodsDeclaration
Swift
static var detailsAcquiredSignal: PrinterSignalName { get } -
onNotifyAcceptingJobs(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::accepting-jobssignalDeclaration
Swift
@discardableResult @inlinable func onNotifyAcceptingJobs(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyAcceptingJobssignal is emitted -
notifyAcceptingJobsSignalExtension methodTyped
notify::accepting-jobssignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyAcceptingJobsSignal: PrinterSignalName { get } -
onNotifyAcceptsPdf(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::accepts-pdfsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyAcceptsPdf(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyAcceptsPdfsignal is emitted -
notifyAcceptsPdfSignalExtension methodTyped
notify::accepts-pdfsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyAcceptsPdfSignal: PrinterSignalName { get } -
onNotifyAcceptsPs(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::accepts-pssignalDeclaration
Swift
@discardableResult @inlinable func onNotifyAcceptsPs(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyAcceptsPssignal is emitted -
notifyAcceptsPsSignalExtension methodTyped
notify::accepts-pssignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyAcceptsPsSignal: PrinterSignalName { get } -
onNotifyBackend(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::backendsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyBackend(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyBackendsignal is emitted -
notifyBackendSignalExtension methodTyped
notify::backendsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyBackendSignal: PrinterSignalName { get } -
onNotifyIconName(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::icon-namesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyIconName(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyIconNamesignal is emitted -
notifyIconNameSignalExtension methodTyped
notify::icon-namesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyIconNameSignal: PrinterSignalName { get } -
onNotifyIsVirtual(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::is-virtualsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyIsVirtual(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyIsVirtualsignal is emitted -
notifyIsVirtualSignalExtension methodTyped
notify::is-virtualsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyIsVirtualSignal: PrinterSignalName { get } -
onNotifyJobCount(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::job-countsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyJobCount(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyJobCountsignal is emitted -
notifyJobCountSignalExtension methodTyped
notify::job-countsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyJobCountSignal: PrinterSignalName { get } -
onNotifyLocation(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::locationsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyLocation(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyLocationsignal is emitted -
notifyLocationSignalExtension methodTyped
notify::locationsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyLocationSignal: PrinterSignalName { get } -
onNotifyName(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::namesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyName(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyNamesignal is emitted -
notifyNameSignalExtension methodTyped
notify::namesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyNameSignal: PrinterSignalName { get } -
onNotifyPaused(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::pausedsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyPaused(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyPausedsignal is emitted -
notifyPausedSignalExtension methodTyped
notify::pausedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyPausedSignal: PrinterSignalName { get } -
onNotifyStateMessage(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::state-messagesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyStateMessage(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyStateMessagesignal is emitted -
notifyStateMessageSignalExtension methodTyped
notify::state-messagesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyStateMessageSignal: PrinterSignalName { get }
-
acceptsPdf()Extension methodReturns whether the printer accepts input in PDF format.
Declaration
Swift
@inlinable func acceptsPdf() -> Bool -
acceptsPs()Extension methodReturns whether the printer accepts input in PostScript format.
Declaration
Swift
@inlinable func acceptsPs() -> Bool -
compare(b:Extension method) Compares two printers.
Declaration
Swift
@inlinable func compare<PrinterT>(b: PrinterT) -> Int where PrinterT : PrinterProtocol -
getBackend()Extension methodReturns the backend of the printer.
Declaration
Swift
@inlinable func getBackend() -> PrintBackendRef! -
getCapabilities()Extension methodReturns 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 [method
Gtk.Printer.has_details] and [methodGtk.Printer.request_details].Declaration
Swift
@inlinable func getCapabilities() -> PrintCapabilities -
getDefaultPageSize()Extension methodReturns default page size of
printer.Declaration
Swift
@inlinable func getDefaultPageSize() -> PageSetupRef! -
getDescription()Extension methodGets the description of the printer.
Declaration
Swift
@inlinable func getDescription() -> String! -
getHardMargins(top:Extension methodbottom: left: right: ) 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 [method
Gtk.Printer.has_details] and [methodGtk.Printer.request_details].Declaration
Swift
@inlinable func getHardMargins(top: UnsafeMutablePointer<CDouble>!, bottom: UnsafeMutablePointer<CDouble>!, left: UnsafeMutablePointer<CDouble>!, right: UnsafeMutablePointer<CDouble>!) -> Bool -
getHardMarginsFor(paperSize:Extension methodtop: bottom: left: right: ) Retrieve the hard margins of
printerforpaper_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 [method
Gtk.Printer.has_details] and [methodGtk.Printer.request_details].Declaration
Swift
@inlinable func getHardMarginsFor<PaperSizeT>(paperSize: PaperSizeT, top: UnsafeMutablePointer<CDouble>!, bottom: UnsafeMutablePointer<CDouble>!, left: UnsafeMutablePointer<CDouble>!, right: UnsafeMutablePointer<CDouble>!) -> Bool where PaperSizeT : PaperSizeProtocol -
getIconName()Extension methodGets the name of the icon to use for the printer.
Declaration
Swift
@inlinable func getIconName() -> String! -
getJobCount()Extension methodGets the number of jobs currently queued on the printer.
Declaration
Swift
@inlinable func getJobCount() -> Int -
getLocation()Extension methodReturns a description of the location of the printer.
Declaration
Swift
@inlinable func getLocation() -> String! -
getName()Extension methodReturns the name of the printer.
Declaration
Swift
@inlinable func getName() -> String! -
getStateMessage()Extension methodReturns the state message describing the current state of the printer.
Declaration
Swift
@inlinable func getStateMessage() -> String! -
hasDetails()Extension methodReturns whether the printer details are available.
Declaration
Swift
@inlinable func hasDetails() -> Bool -
listPapers()Extension methodLists all the paper sizes
printersupports.This will return and empty list unless the printer’s details are available, see [method
Gtk.Printer.has_details] and [methodGtk.Printer.request_details].Declaration
Swift
@inlinable func listPapers() -> GLib.ListRef! -
requestDetails()Extension methodRequests the printer details.
When the details are available, the [signal
Gtk.Printer::details-acquired] signal will be emitted onprinter.Declaration
Swift
@inlinable func requestDetails() -
backendExtension methodThe backend for the printer.
Declaration
Swift
@inlinable var backend: PrintBackendRef! { get } -
capabilitiesExtension methodReturns 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 [method
Gtk.Printer.has_details] and [methodGtk.Printer.request_details].Declaration
Swift
@inlinable var capabilities: PrintCapabilities { get } -
defaultPageSizeExtension methodReturns default page size of
printer.Declaration
Swift
@inlinable var defaultPageSize: PageSetupRef! { get } -
descriptionExtension methodGets the description of the printer.
Declaration
Swift
@inlinable var description: String! { get } -
iconNameExtension methodGets the name of the icon to use for the printer.
Declaration
Swift
@inlinable var iconName: String! { get } -
isAcceptingJobsExtension methodReturns whether the printer is accepting jobs
Declaration
Swift
@inlinable var isAcceptingJobs: Bool { get } -
isActiveExtension methodReturns whether the printer is currently active (i.e. accepts new jobs).
Declaration
Swift
@inlinable var isActive: Bool { get } -
isDefaultExtension methodReturns whether the printer is the default printer.
Declaration
Swift
@inlinable var isDefault: Bool { get } -
isPausedExtension methodReturns whether the printer is currently paused.
A paused printer still accepts jobs, but it is not printing them.
Declaration
Swift
@inlinable var isPaused: Bool { get } -
isVirtualExtension methodReturns whether the printer is virtual (i.e. does not represent actual printer hardware, but something like a CUPS class).
Declaration
Swift
@inlinable var isVirtual: Bool { get } -
jobCountExtension methodGets the number of jobs currently queued on the printer.
Declaration
Swift
@inlinable var jobCount: Int { get } -
locationExtension methodInformation about the location of the printer.
Declaration
Swift
@inlinable var location: String! { get } -
nameExtension methodThe name of the printer.
Declaration
Swift
@inlinable var name: String! { get } -
stateMessageExtension methodReturns the state message describing the current state of the printer.
Declaration
Swift
@inlinable var stateMessage: String! { get }
View on GitHub
Install in Dash
PrinterProtocol Protocol Reference