PrintSettingsRef

public struct PrintSettingsRef : PrintSettingsProtocol, GWeakCapturing

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.

Printing support was added in GTK+ 2.10.

The PrintSettingsRef type acts as a lightweight Swift reference to an underlying GtkPrintSettings instance. It exposes methods that can operate on this data type through PrintSettingsProtocol conformance. Use PrintSettingsRef only as an unowned reference to an existing GtkPrintSettings instance.

  • ptr
    Untyped pointer to the underlying `GtkPrintSettings` instance.
    

    For type-safe access, use the generated, typed pointer print_settings_ptr property instead.

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer!

PrintSettings Class

  • Designated initialiser from the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafeMutablePointer<GtkPrintSettings>)
  • Designated initialiser from a constant pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafePointer<GtkPrintSettings>)
  • Conditional initialiser from an optional pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafeMutablePointer<GtkPrintSettings>?)
  • Conditional initialiser from an optional, non-mutable pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafePointer<GtkPrintSettings>?)
  • Conditional initialiser from an optional gpointer

    Declaration

    Swift

    @inlinable
    init!(gpointer g: gpointer?)
  • Conditional initialiser from an optional, non-mutable gconstpointer

    Declaration

    Swift

    @inlinable
    init!(gconstpointer g: gconstpointer?)
  • Reference intialiser for a related type that implements PrintSettingsProtocol

    Declaration

    Swift

    @inlinable
    init<T>(_ other: T) where T : PrintSettingsProtocol
  • This factory is syntactic sugar for setting weak pointers wrapped in GWeak<T>

    Declaration

    Swift

    @inlinable
    static func unowned<T>(_ other: T) -> PrintSettingsRef where T : PrintSettingsProtocol
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PrintSettingsProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(cPointer: UnsafeMutablePointer<T>)
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PrintSettingsProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(constPointer: UnsafePointer<T>)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PrintSettingsProtocol.

    Declaration

    Swift

    @inlinable
    init(mutating 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
    init(raw: UnsafeMutableRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PrintSettingsProtocol.

    Declaration

    Swift

    @inlinable
    init(opaquePointer: OpaquePointer)
  • Creates a new GtkPrintSettings object.

    Declaration

    Swift

    @inlinable
    init()
  • Reads the print settings from file_name. Returns a new GtkPrintSettings object with the restored settings, or nil if an error occurred. If the file could not be loaded then error is set to either a GFileError or GKeyFileError. See gtk_print_settings_to_file().

    Declaration

    Swift

    @inlinable
    init(file fileName: UnsafePointer<gchar>!) throws
  • Deserialize print settings from an a{sv} variant in the format produced by gtk_print_settings_to_gvariant().

    Declaration

    Swift

    @inlinable
    init<VariantT>(gvariant variant: VariantT) where VariantT : VariantProtocol
  • Reads the print settings from the group group_name in key_file. Returns a new GtkPrintSettings object with the restored settings, or nil if an error occurred. If the file could not be loaded then error is set to either a GFileError or GKeyFileError.

    Declaration

    Swift

    @inlinable
    init<KeyFileT>(keyFile: KeyFileT, groupName: UnsafePointer<gchar>? = nil) throws where KeyFileT : KeyFileProtocol
  • Reads the print settings from file_name. Returns a new GtkPrintSettings object with the restored settings, or nil if an error occurred. If the file could not be loaded then error is set to either a GFileError or GKeyFileError. See gtk_print_settings_to_file().

    Declaration

    Swift

    @inlinable
    static func newFrom(file fileName: UnsafePointer<gchar>!) throws -> PrintSettingsRef!
  • Deserialize print settings from an a{sv} variant in the format produced by gtk_print_settings_to_gvariant().

    Declaration

    Swift

    @inlinable
    static func newFromG<VariantT>(gvariant variant: VariantT) -> PrintSettingsRef! where VariantT : VariantProtocol
  • Reads the print settings from the group group_name in key_file. Returns a new GtkPrintSettings object with the restored settings, or nil if an error occurred. If the file could not be loaded then error is set to either a GFileError or GKeyFileError.

    Declaration

    Swift

    @inlinable
    static func newFrom<KeyFileT>(keyFile: KeyFileT, groupName: UnsafePointer<gchar>? = nil) throws -> PrintSettingsRef! where KeyFileT : KeyFileProtocol