PaperSize
open class PaperSize : PaperSizeProtocol
GtkPaperSize handles paper sizes. It uses the standard called PWG 5101.1-2002 PWG: Standard for Media Standardized Names to name the paper sizes (and to get the data for the page sizes). In addition to standard paper sizes, GtkPaperSize allows to construct custom paper sizes with arbitrary dimensions.
The GtkPaperSize object stores not only the dimensions (width
and height) of a paper size and its name, it also provides
default print margins.
Printing support has been added in GTK+ 2.10.
The PaperSize type acts as an owner of an underlying GtkPaperSize instance.
It provides the methods that can operate on this data type through PaperSizeProtocol conformance.
Use PaperSize as a strong reference or owner of a GtkPaperSize instance.
-
Untyped pointer to the underlying `GtkPaperSize` instance.For type-safe access, use the generated, typed pointer
paper_size_ptrproperty instead.Declaration
Swift
public let ptr: UnsafeMutableRawPointer! -
Designated initialiser from the underlying
Cdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to thePaperSizeinstance.Declaration
Swift
@inlinable public init(_ op: UnsafeMutablePointer<GtkPaperSize>)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 thePaperSizeinstance.Declaration
Swift
@inlinable public init(_ op: UnsafePointer<GtkPaperSize>)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 thePaperSizeinstance.Declaration
Swift
@inlinable 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 thePaperSizeinstance.Declaration
Swift
@inlinable 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 thePaperSizeinstance.Declaration
Swift
@inlinable public init!(_ op: UnsafePointer<GtkPaperSize>?)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 thePaperSizeinstance.Declaration
Swift
@inlinable public init!(_ op: UnsafeMutablePointer<GtkPaperSize>?)Parameters
oppointer to the underlying object
-
Designated initialiser from the underlying
Cdata type.GtkPaperSizedoes not allow reference counting, so despite the name no actual retaining will occur. i.e., ownership is transferred to thePaperSizeinstance.Declaration
Swift
@inlinable public init(retaining op: UnsafeMutablePointer<GtkPaperSize>)Parameters
oppointer to the underlying object
-
Reference intialiser for a related type that implements
PaperSizeProtocolGtkPaperSizedoes not allow reference counting.Declaration
Swift
@inlinable public init<T>(_ other: T) where T : PaperSizeProtocolParameters
otheran instance of a related type that implements
PaperSizeProtocol -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PaperSizeProtocol.Declaration
Swift
@inlinable 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
PaperSizeProtocol.Declaration
Swift
@inlinable 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
PaperSizeProtocol.Declaration
Swift
@inlinable 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
PaperSizeProtocol.Declaration
Swift
@inlinable public init(retainingRaw raw: UnsafeRawPointer) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PaperSizeProtocol.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
PaperSizeProtocol.Declaration
Swift
@inlinable 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
PaperSizeProtocol.Declaration
Swift
@inlinable 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
PaperSizeProtocol.Declaration
Swift
@inlinable public init(retainingOpaquePointer p: OpaquePointer)Parameters
popaque pointer to the underlying object
-
Creates a new
GtkPaperSizeobject by parsing a PWG 5101.1-2002 paper name.If
nameisnil, the default paper size is returned, seegtk_paper_size_get_default().Declaration
Swift
@inlinable public init(name: UnsafePointer<gchar>? = nil) -
Creates a new
GtkPaperSizeobject with the given parameters.Declaration
Swift
@inlinable public init(custom name: UnsafePointer<gchar>!, displayName: UnsafePointer<gchar>!, width: Double, height: Double, unit: GtkUnit) -
Deserialize a paper size from an a{sv} variant in the format produced by
gtk_paper_size_to_gvariant().Declaration
Swift
@inlinable public init<VariantT>(gvariant variant: VariantT) where VariantT : VariantProtocol -
Creates a new
GtkPaperSizeobject by using IPP information.If
ipp_nameis not a recognized paper name,widthandheightare used to construct a customGtkPaperSizeobject.Declaration
Swift
@inlinable public init(ipp ippName: UnsafePointer<gchar>!, width: Double, height: Double) -
Reads a paper size from the group
group_namein the key filekey_file.Declaration
Swift
@inlinable public init<KeyFileT>(keyFile: KeyFileT, groupName: UnsafePointer<gchar>? = nil) throws where KeyFileT : KeyFileProtocol -
Creates a new
GtkPaperSizeobject by using PPD information.If
ppd_nameis not a recognized PPD paper name,ppd_display_name,widthandheightare used to construct a customGtkPaperSizeobject.Declaration
Swift
@inlinable public init(ppd ppdName: UnsafePointer<gchar>!, ppdDisplayName: UnsafePointer<gchar>!, width: Double, height: Double) -
Creates a new
GtkPaperSizeobject with the given parameters.Declaration
Swift
@inlinable public static func new(custom name: UnsafePointer<gchar>!, displayName: UnsafePointer<gchar>!, width: Double, height: Double, unit: GtkUnit) -> PaperSize! -
Deserialize a paper size from an a{sv} variant in the format produced by
gtk_paper_size_to_gvariant().Declaration
Swift
@inlinable public static func newFromG<VariantT>(gvariant variant: VariantT) -> PaperSize! where VariantT : VariantProtocol -
Creates a new
GtkPaperSizeobject by using IPP information.If
ipp_nameis not a recognized paper name,widthandheightare used to construct a customGtkPaperSizeobject.Declaration
Swift
@inlinable public static func newFrom(ipp ippName: UnsafePointer<gchar>!, width: Double, height: Double) -> PaperSize! -
Reads a paper size from the group
group_namein the key filekey_file.Declaration
Swift
@inlinable public static func newFrom<KeyFileT>(keyFile: KeyFileT, groupName: UnsafePointer<gchar>? = nil) throws -> PaperSize! where KeyFileT : KeyFileProtocol -
Creates a new
GtkPaperSizeobject by using PPD information.If
ppd_nameis not a recognized PPD paper name,ppd_display_name,widthandheightare used to construct a customGtkPaperSizeobject.Declaration
Swift
@inlinable public static func newFrom(ppd ppdName: UnsafePointer<gchar>!, ppdDisplayName: UnsafePointer<gchar>!, width: Double, height: Double) -> PaperSize!
View on GitHub
Install in Dash
PaperSize Class Reference