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.

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.

  • ptr

    Untyped pointer to the underlying GtkPaperSize instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • paper_size_ptr Default implementation

    Typed 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)

PaperSize Record: PaperSizeProtocol extension (methods and fields)

  • copy() Extension method

    Copies an existing GtkPaperSize.

    Declaration

    Swift

    @inlinable
    func copy() -> PaperSizeRef!
  • free() Extension method

    Free the given GtkPaperSize object.

    Declaration

    Swift

    @inlinable
    func free()
  • Gets the default bottom margin for the GtkPaperSize.

    Declaration

    Swift

    @inlinable
    func getDefaultBottomMargin(unit: GtkUnit) -> CDouble
  • getDefaultLeftMargin(unit:) Extension method

    Gets the default left margin for the GtkPaperSize.

    Declaration

    Swift

    @inlinable
    func getDefaultLeftMargin(unit: GtkUnit) -> CDouble
  • getDefaultRightMargin(unit:) Extension method

    Gets the default right margin for the GtkPaperSize.

    Declaration

    Swift

    @inlinable
    func getDefaultRightMargin(unit: GtkUnit) -> CDouble
  • getDefaultTopMargin(unit:) Extension method

    Gets the default top margin for the GtkPaperSize.

    Declaration

    Swift

    @inlinable
    func getDefaultTopMargin(unit: GtkUnit) -> CDouble
  • getDisplayName() Extension method

    Gets 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 of unit.

    Declaration

    Swift

    @inlinable
    func getHeight(unit: GtkUnit) -> CDouble
  • getName() Extension method

    Gets the name of the GtkPaperSize.

    Declaration

    Swift

    @inlinable
    func getName() -> String!
  • getPpdName() Extension method

    Gets the PPD name of the GtkPaperSize, which may be nil.

    Declaration

    Swift

    @inlinable
    func getPpdName() -> String!
  • getWidth(unit:) Extension method

    Gets the paper width of the GtkPaperSize, in units of unit.

    Declaration

    Swift

    @inlinable
    func getWidth(unit: GtkUnit) -> CDouble
  • isEqual(size2:) Extension method

    Compares two GtkPaperSize objects.

    Declaration

    Swift

    @inlinable
    func isEqual<PaperSizeT>(size2: PaperSizeT) -> Bool where PaperSizeT : PaperSizeProtocol
  • setSize(width:height:unit:) Extension method

    Changes the dimensions of a size to width x height.

    Declaration

    Swift

    @inlinable
    func setSize(width: CDouble, height: CDouble, unit: GtkUnit)
  • toGvariant() Extension method

    Serialize a paper size to an a{sv} variant.

    Declaration

    Swift

    @inlinable
    func toGvariant() -> GLib.VariantRef!
  • to(keyFile:groupName:) Extension method

    This function adds the paper size from size to key_file.

    Declaration

    Swift

    @inlinable
    func to<KeyFileT>(keyFile: KeyFileT, groupName: UnsafePointer<CChar>!) where KeyFileT : KeyFileProtocol
  • displayName Extension method

    Gets the human-readable name of the GtkPaperSize.

    Declaration

    Swift

    @inlinable
    var displayName: String! { get }
  • isCustom Extension method

    Returns true if size is not a standard paper size.

    Declaration

    Swift

    @inlinable
    var isCustom: Bool { get }
  • isIpp Extension method

    Returns true if size is an IPP standard paper size.

    Declaration

    Swift

    @inlinable
    var isIpp: Bool { get }
  • name Extension method

    Gets the name of the GtkPaperSize.

    Declaration

    Swift

    @inlinable
    var name: String! { get }
  • ppdName Extension method

    Gets the PPD name of the GtkPaperSize, which may be nil.

    Declaration

    Swift

    @inlinable
    var ppdName: String! { get }