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
PrintSettingsinstance.Declaration
Swift
@inlinable public init(_ op: UnsafeMutablePointer<GtkPrintSettings>)Parameters
oppointer to the underlying object
-
Designated initialiser from a constant pointer to the underlying
Cdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to thePrintSettingsinstance.Declaration
Swift
@inlinable public init(_ op: UnsafePointer<GtkPrintSettings>)Parameters
oppointer to the underlying object
-
Optional initialiser from a non-mutating
gpointerto the underlyingCdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to thePrintSettingsinstance.Declaration
Swift
@inlinable override public init!(gpointer op: gpointer?)Parameters
opgpointer to the underlying object
-
Optional initialiser from a non-mutating
gconstpointerto the underlyingCdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to thePrintSettingsinstance.Declaration
Swift
@inlinable override public init!(gconstpointer op: gconstpointer?)Parameters
oppointer to the underlying object
-
Optional initialiser from a constant pointer to the underlying
Cdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to thePrintSettingsinstance.Declaration
Swift
@inlinable public init!(_ op: UnsafePointer<GtkPrintSettings>?)Parameters
oppointer to the underlying object
-
Optional initialiser from the underlying
Cdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to thePrintSettingsinstance.Declaration
Swift
@inlinable public init!(_ op: UnsafeMutablePointer<GtkPrintSettings>?)Parameters
oppointer to the underlying object
-
Designated initialiser from the underlying
Cdata type. Will retainGtkPrintSettings. i.e., ownership is transferred to thePrintSettingsinstance.Declaration
Swift
@inlinable public init(retaining op: UnsafeMutablePointer<GtkPrintSettings>)Parameters
oppointer to the underlying object
-
Reference intialiser for a related type that implements
PrintSettingsProtocolWill retainGtkPrintSettings.Declaration
Swift
@inlinable public init<T>(printSettings other: T) where T : PrintSettingsProtocolParameters
otheran 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
cPointerpointer 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
cPointerpointer 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
praw 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
pmutable 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
rawmutable 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
popaque 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
popaque pointer to the underlying object
-
Creates a new
GtkPrintSettingsobject.Declaration
Swift
@inlinable public init() -
Reads the print settings from
file_name.Returns a new
GtkPrintSettingsobject with the restored settings, ornilif an error occurred. If the file could not be loaded then error is set to either aGFileErrororGKeyFileError.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_nameinkey_file.Returns a new
GtkPrintSettingsobject with the restored settings, ornilif an error occurred. If the file could not be loaded then error is set to eitherGFileErrororGKeyFileError.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
GtkPrintSettingsobject with the restored settings, ornilif an error occurred. If the file could not be loaded then error is set to either aGFileErrororGKeyFileError.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_nameinkey_file.Returns a new
GtkPrintSettingsobject with the restored settings, ornilif an error occurred. If the file could not be loaded then error is set to eitherGFileErrororGKeyFileError.Declaration
Swift
@inlinable public static func newFrom<KeyFileT>(keyFile: KeyFileT, groupName: UnsafePointer<CChar>? = nil) throws -> PrintSettings! where KeyFileT : KeyFileProtocol
View on GitHub
Install in Dash
PrintSettings Class Reference