PrintSettings
open class PrintSettings : GLibObject.Object, PrintSettingsProtocol
A GtkPrintSettings
object represents the settings of a print dialog in
a system-independent way.
The main use for this object is that once you’ve printed you can get a settings object that represents the settings the user chose, and the next time you print you can pass that object in so that the user doesn’t have to re-set all his settings.
Its also possible to enumerate the settings so that you can easily save the settings for the next time your app runs, or even store them in a document. The predefined keys try to use shared values as much as possible so that moving such a document between systems still works.
The PrintSettings
type acts as a reference-counted owner of an underlying GtkPrintSettings
instance.
It provides the methods that can operate on this data type through PrintSettingsProtocol
conformance.
Use PrintSettings
as a strong reference or owner of a GtkPrintSettings
instance.
-
Designated initialiser from the underlying `C` data type.
This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the
PrintSettings
instance.Declaration
Swift
@inlinable public init(_ op: UnsafeMutablePointer<GtkPrintSettings>)
Parameters
op
pointer to the underlying object
-
Designated initialiser from a constant pointer to the underlying
C
data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to thePrintSettings
instance.Declaration
Swift
@inlinable public init(_ op: UnsafePointer<GtkPrintSettings>)
Parameters
op
pointer to the underlying object
-
Optional initialiser from a non-mutating
gpointer
to the underlyingC
data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to thePrintSettings
instance.Declaration
Swift
@inlinable override public init!(gpointer op: gpointer?)
Parameters
op
gpointer to the underlying object
-
Optional initialiser from a non-mutating
gconstpointer
to the underlyingC
data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to thePrintSettings
instance.Declaration
Swift
@inlinable override public init!(gconstpointer op: gconstpointer?)
Parameters
op
pointer to the underlying object
-
Optional initialiser from a constant pointer to the underlying
C
data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to thePrintSettings
instance.Declaration
Swift
@inlinable public init!(_ op: UnsafePointer<GtkPrintSettings>?)
Parameters
op
pointer to the underlying object
-
Optional initialiser from the underlying
C
data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to thePrintSettings
instance.Declaration
Swift
@inlinable public init!(_ op: UnsafeMutablePointer<GtkPrintSettings>?)
Parameters
op
pointer to the underlying object
-
Designated initialiser from the underlying
C
data type. Will retainGtkPrintSettings
. i.e., ownership is transferred to thePrintSettings
instance.Declaration
Swift
@inlinable public init(retaining op: UnsafeMutablePointer<GtkPrintSettings>)
Parameters
op
pointer to the underlying object
-
Reference intialiser for a related type that implements
PrintSettingsProtocol
Will retainGtkPrintSettings
.Declaration
Swift
@inlinable public init<T>(printSettings other: T) where T : PrintSettingsProtocol
Parameters
other
an instance of a related type that implements
PrintSettingsProtocol
-
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PrintSettingsProtocol
.Declaration
Swift
@inlinable override public init<T>(cPointer p: UnsafeMutablePointer<T>)
Parameters
cPointer
pointer to the underlying object
-
Unsafe typed, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PrintSettingsProtocol
.Declaration
Swift
@inlinable override public init<T>(retainingCPointer cPointer: UnsafeMutablePointer<T>)
Parameters
cPointer
pointer to the underlying object
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PrintSettingsProtocol
.Declaration
Swift
@inlinable override public init(raw p: UnsafeRawPointer)
Parameters
p
raw pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PrintSettingsProtocol
.Declaration
Swift
@inlinable override public init(retainingRaw raw: UnsafeRawPointer)
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PrintSettingsProtocol
.Declaration
Swift
@inlinable public required init(raw p: UnsafeMutableRawPointer)
Parameters
p
mutable raw pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PrintSettingsProtocol
.Declaration
Swift
@inlinable required public init(retainingRaw raw: UnsafeMutableRawPointer)
Parameters
raw
mutable raw pointer to the underlying object
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PrintSettingsProtocol
.Declaration
Swift
@inlinable override public init(opaquePointer p: OpaquePointer)
Parameters
p
opaque pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PrintSettingsProtocol
.Declaration
Swift
@inlinable override public init(retainingOpaquePointer p: OpaquePointer)
Parameters
p
opaque pointer to the underlying object
-
Creates a new
GtkPrintSettings
object.Declaration
Swift
@inlinable public init()
-
Reads the print settings from
file_name
.Returns a new
GtkPrintSettings
object with the restored settings, ornil
if an error occurred. If the file could not be loaded then error is set to either aGFileError
orGKeyFileError
.See [method
Gtk.PrintSettings.to_file
].Declaration
Swift
@inlinable public init(file fileName: UnsafePointer<CChar>!) throws
-
Deserialize print settings from an a{sv} variant.
The variant must be in the format produced by [method
Gtk.PrintSettings.to_gvariant
].Declaration
Swift
@inlinable public init<VariantT>(gvariant variant: VariantT) where VariantT : VariantProtocol
-
Reads the print settings from the group
group_name
inkey_file
.Returns a new
GtkPrintSettings
object with the restored settings, ornil
if an error occurred. If the file could not be loaded then error is set to eitherGFileError
orGKeyFileError
.Declaration
Swift
@inlinable public init<KeyFileT>(keyFile: KeyFileT, groupName: UnsafePointer<CChar>? = nil) throws where KeyFileT : KeyFileProtocol
-
Reads the print settings from
file_name
.Returns a new
GtkPrintSettings
object with the restored settings, ornil
if an error occurred. If the file could not be loaded then error is set to either aGFileError
orGKeyFileError
.See [method
Gtk.PrintSettings.to_file
].Declaration
Swift
@inlinable public static func newFrom(file fileName: UnsafePointer<CChar>!) throws -> PrintSettings!
-
Deserialize print settings from an a{sv} variant.
The variant must be in the format produced by [method
Gtk.PrintSettings.to_gvariant
].Declaration
Swift
@inlinable public static func newFromG<VariantT>(gvariant variant: VariantT) -> PrintSettings! where VariantT : VariantProtocol
-
Reads the print settings from the group
group_name
inkey_file
.Returns a new
GtkPrintSettings
object with the restored settings, ornil
if an error occurred. If the file could not be loaded then error is set to eitherGFileError
orGKeyFileError
.Declaration
Swift
@inlinable public static func newFrom<KeyFileT>(keyFile: KeyFileT, groupName: UnsafePointer<CChar>? = nil) throws -> PrintSettings! where KeyFileT : KeyFileProtocol