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
GtkPrinter
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
printer_ptr
Default implementationTyped pointer to the underlying
GtkPrinter
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkPrinter
instance.Declaration
Swift
var printer_ptr: UnsafeMutablePointer<GtkPrinter>! { get }
-
Required Initialiser for types conforming to
PrinterProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:
Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
PrinterPropertyName
source 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 : ObjectProtocol
Parameters
source_property
the source property to bind
target
the target object to bind to
target_property
the target property to bind to
flags
the flags to pass to the
Binding
transform_from
ValueTransformer
to use for forward transformationtransform_to
ValueTransformer
to use for backwards transformationReturn Value
binding reference or
nil
in case of an error -
get(property:
Extension method) Get the value of a Printer property
Declaration
Swift
@inlinable func get(property: PrinterPropertyName) -> GLibObject.Value
Parameters
property
the 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
property
the 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
PrinterSignalName
signalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: PrinterSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> Int
Parameters
signal
The signal to connect
flags
The connection flags to use
data
A pointer to user data to provide to the callback
destroyData
A
GClosureNotify
C function to destroy the data pointed to byuserData
handler
The 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
PrinterSignalName
signalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: PrinterSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> Int
Parameters
signal
The signal to connect
flags
The connection flags to use
data
A pointer to user data to provide to the callback
destroyData
A
GClosureNotify
C function to destroy the data pointed to byuserData
signalHandler
The 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
success
parameter indicates if the information was actually obtained.Note
This represents the underlyingdetails-acquired
signalDeclaration
Swift
@discardableResult @inlinable func onDetailsAcquired(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ success: Bool) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
success
true
if the details were successfully acquiredhandler
The signal handler to call Run the given callback whenever the
detailsAcquired
signal is emitted -
detailsAcquiredSignal
Extension methodTyped
details-acquired
signal 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 innotify
being 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-jobs
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyAcceptingJobs(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyAcceptingJobs
signal is emitted -
notifyAcceptingJobsSignal
Extension methodTyped
notify::accepting-jobs
signal 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 innotify
being 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-pdf
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyAcceptsPdf(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyAcceptsPdf
signal is emitted -
notifyAcceptsPdfSignal
Extension methodTyped
notify::accepts-pdf
signal 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 innotify
being 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-ps
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyAcceptsPs(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyAcceptsPs
signal is emitted -
notifyAcceptsPsSignal
Extension methodTyped
notify::accepts-ps
signal 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 innotify
being 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::backend
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyBackend(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyBackend
signal is emitted -
notifyBackendSignal
Extension methodTyped
notify::backend
signal 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 innotify
being 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-name
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyIconName(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyIconName
signal is emitted -
notifyIconNameSignal
Extension methodTyped
notify::icon-name
signal 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 innotify
being 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-virtual
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyIsVirtual(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyIsVirtual
signal is emitted -
notifyIsVirtualSignal
Extension methodTyped
notify::is-virtual
signal 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 innotify
being 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-count
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyJobCount(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyJobCount
signal is emitted -
notifyJobCountSignal
Extension methodTyped
notify::job-count
signal 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 innotify
being 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::location
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyLocation(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyLocation
signal is emitted -
notifyLocationSignal
Extension methodTyped
notify::location
signal 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 innotify
being 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::name
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyName(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyName
signal is emitted -
notifyNameSignal
Extension methodTyped
notify::name
signal 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 innotify
being 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::paused
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyPaused(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyPaused
signal is emitted -
notifyPausedSignal
Extension methodTyped
notify::paused
signal 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 innotify
being 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-message
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyStateMessage(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: PrinterRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyStateMessage
signal is emitted -
notifyStateMessageSignal
Extension methodTyped
notify::state-message
signal 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
printer
forpaper_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
printer
supports.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()
-
backend
Extension methodThe backend for the printer.
Declaration
Swift
@inlinable var backend: PrintBackendRef! { get }
-
capabilities
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 var capabilities: PrintCapabilities { get }
-
defaultPageSize
Extension methodReturns default page size of
printer
.Declaration
Swift
@inlinable var defaultPageSize: PageSetupRef! { get }
-
description
Extension methodGets the description of the printer.
Declaration
Swift
@inlinable var description: String! { get }
-
iconName
Extension methodGets the name of the icon to use for the printer.
Declaration
Swift
@inlinable var iconName: String! { get }
-
isAcceptingJobs
Extension methodReturns whether the printer is accepting jobs
Declaration
Swift
@inlinable var isAcceptingJobs: Bool { get }
-
isActive
Extension methodReturns whether the printer is currently active (i.e. accepts new jobs).
Declaration
Swift
@inlinable var isActive: Bool { get }
-
isDefault
Extension methodReturns whether the printer is the default printer.
Declaration
Swift
@inlinable var isDefault: Bool { get }
-
isPaused
Extension 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 }
-
isVirtual
Extension 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 }
-
jobCount
Extension methodGets the number of jobs currently queued on the printer.
Declaration
Swift
@inlinable var jobCount: Int { get }
-
location
Extension methodInformation about the location of the printer.
Declaration
Swift
@inlinable var location: String! { get }
-
name
Extension methodThe name of the printer.
Declaration
Swift
@inlinable var name: String! { get }
-
stateMessage
Extension methodReturns the state message describing the current state of the printer.
Declaration
Swift
@inlinable var stateMessage: String! { get }