PaperSizeRef
public struct PaperSizeRef : 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.
The PaperSizeRef type acts as a lightweight Swift reference to an underlying GtkPaperSize instance.
It exposes methods that can operate on this data type through PaperSizeProtocol conformance.
Use PaperSizeRef only as an unowned reference to an existing 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 typeDeclaration
Swift
@inlinable init(_ p: UnsafeMutablePointer<GtkPaperSize>) -
Designated initialiser from a constant pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafePointer<GtkPaperSize>) -
Conditional initialiser from an optional pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafeMutablePointer<GtkPaperSize>?) -
Conditional initialiser from an optional, non-mutable pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafePointer<GtkPaperSize>?) -
Conditional initialiser from an optional
gpointerDeclaration
Swift
@inlinable init!(gpointer g: gpointer?) -
Conditional initialiser from an optional, non-mutable
gconstpointerDeclaration
Swift
@inlinable init!(gconstpointer g: gconstpointer?) -
Reference intialiser for a related type that implements
PaperSizeProtocolDeclaration
Swift
@inlinable init<T>(_ other: T) where T : PaperSizeProtocol -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PaperSizeProtocol.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
PaperSizeProtocol.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
PaperSizeProtocol.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
PaperSizeProtocol.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
PaperSizeProtocol.Declaration
Swift
@inlinable init(opaquePointer: OpaquePointer) -
Creates a new `GtkPaperSize` object by parsing aPWG 5101.1-2002 paper name.
If
nameisnil, the default paper size is returned, see [funcGtk.PaperSize.get_default].Declaration
Swift
@inlinable init(name: UnsafePointer<CChar>? = nil) -
Creates a new
GtkPaperSizeobject with the given parameters.Declaration
Swift
@inlinable init(custom name: UnsafePointer<CChar>!, displayName: UnsafePointer<CChar>!, width: CDouble, height: CDouble, unit: GtkUnit) -
Deserialize a paper size from a
GVariant.The
GVariant must be in the format produced by [methodGtk.PaperSize.to_gvariant`].Declaration
Swift
@inlinable 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 init(ipp ippName: UnsafePointer<CChar>!, width: CDouble, height: CDouble) -
Reads a paper size from the group
group_namein the key filekey_file.Declaration
Swift
@inlinable init<KeyFileT>(keyFile: KeyFileT, groupName: UnsafePointer<CChar>? = 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 init(ppd ppdName: UnsafePointer<CChar>!, ppdDisplayName: UnsafePointer<CChar>!, width: CDouble, height: CDouble) -
Creates a new
GtkPaperSizeobject with the given parameters.Declaration
Swift
@inlinable static func new(custom name: UnsafePointer<CChar>!, displayName: UnsafePointer<CChar>!, width: CDouble, height: CDouble, unit: GtkUnit) -> PaperSizeRef! -
Deserialize a paper size from a
GVariant.The
GVariant must be in the format produced by [methodGtk.PaperSize.to_gvariant`].Declaration
Swift
@inlinable static func newFromG<VariantT>(gvariant variant: VariantT) -> PaperSizeRef! 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 static func newFrom(ipp ippName: UnsafePointer<CChar>!, width: CDouble, height: CDouble) -> PaperSizeRef! -
Reads a paper size from the group
group_namein the key filekey_file.Declaration
Swift
@inlinable static func newFrom<KeyFileT>(keyFile: KeyFileT, groupName: UnsafePointer<CChar>? = nil) throws -> PaperSizeRef! 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 static func newFrom(ppd ppdName: UnsafePointer<CChar>!, ppdDisplayName: UnsafePointer<CChar>!, width: CDouble, height: CDouble) -> PaperSizeRef!
View on GitHub
Install in Dash
PaperSizeRef Structure Reference