PaperSizeProtocol
public protocol 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 PaperSizeProtocol
protocol exposes the methods and properties of an underlying GtkPaperSize
instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see PaperSize
.
Alternatively, use PaperSizeRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkPaperSize
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
paper_size_ptr
Default implementationTyped pointer to the underlying
GtkPaperSize
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkPaperSize
instance.Declaration
Swift
var paper_size_ptr: UnsafeMutablePointer<GtkPaperSize>! { get }
-
Required Initialiser for types conforming to
PaperSizeProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
copy()
Extension methodCopies an existing
GtkPaperSize
.Declaration
Swift
@inlinable func copy() -> PaperSizeRef!
-
free()
Extension methodFree the given
GtkPaperSize
object.Declaration
Swift
@inlinable func free()
-
getDefaultBottomMargin(unit:
Extension method) Gets the default bottom margin for the
GtkPaperSize
.Declaration
Swift
@inlinable func getDefaultBottomMargin(unit: GtkUnit) -> Double
-
getDefaultLeftMargin(unit:
Extension method) Gets the default left margin for the
GtkPaperSize
.Declaration
Swift
@inlinable func getDefaultLeftMargin(unit: GtkUnit) -> Double
-
getDefaultRightMargin(unit:
Extension method) Gets the default right margin for the
GtkPaperSize
.Declaration
Swift
@inlinable func getDefaultRightMargin(unit: GtkUnit) -> Double
-
getDefaultTopMargin(unit:
Extension method) Gets the default top margin for the
GtkPaperSize
.Declaration
Swift
@inlinable func getDefaultTopMargin(unit: GtkUnit) -> Double
-
getDisplayName()
Extension methodGets the human-readable name of the
GtkPaperSize
.Declaration
Swift
@inlinable func getDisplayName() -> String!
-
getHeight(unit:
Extension method) Gets the paper height of the
GtkPaperSize
, in units ofunit
.Declaration
Swift
@inlinable func getHeight(unit: GtkUnit) -> Double
-
getName()
Extension methodGets the name of the
GtkPaperSize
.Declaration
Swift
@inlinable func getName() -> String!
-
getPpdName()
Extension methodGets the PPD name of the
GtkPaperSize
, which may benil
.Declaration
Swift
@inlinable func getPpdName() -> String!
-
getWidth(unit:
Extension method) Gets the paper width of the
GtkPaperSize
, in units ofunit
.Declaration
Swift
@inlinable func getWidth(unit: GtkUnit) -> Double
-
isEqual(size2:
Extension method) Compares two
GtkPaperSize
objects.Declaration
Swift
@inlinable func isEqual<PaperSizeT>(size2: PaperSizeT) -> Bool where PaperSizeT : PaperSizeProtocol
-
setSize(width:
Extension methodheight: unit: ) Changes the dimensions of a
size
towidth
xheight
.Declaration
Swift
@inlinable func setSize(width: Double, height: Double, unit: GtkUnit)
-
toGvariant()
Extension methodSerialize a paper size to an a{sv} variant.
Declaration
Swift
@inlinable func toGvariant() -> GLib.VariantRef!
-
to(keyFile:
Extension methodgroupName: ) This function adds the paper size from
size
tokey_file
.Declaration
Swift
@inlinable func to<KeyFileT>(keyFile: KeyFileT, groupName: UnsafePointer<gchar>!) where KeyFileT : KeyFileProtocol
-
displayName
Extension methodGets the human-readable name of the
GtkPaperSize
.Declaration
Swift
@inlinable var displayName: String! { get }
-
isCustom
Extension methodReturns
true
ifsize
is not a standard paper size.Declaration
Swift
@inlinable var isCustom: Bool { get }
-
isIpp
Extension methodReturns
true
ifsize
is an IPP standard paper size.Declaration
Swift
@inlinable var isIpp: Bool { get }
-
name
Extension methodGets the name of the
GtkPaperSize
.Declaration
Swift
@inlinable var name: String! { get }
-
ppdName
Extension methodGets the PPD name of the
GtkPaperSize
, which may benil
.Declaration
Swift
@inlinable var ppdName: String! { get }