<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.
Copies an existing <GtkPaperSize>.
Passed: a <GtkPaperSize>.
Returned: a <GtkPaperSize>.
a copy of self
Free the given <GtkPaperSize> object.
Passed: a <GtkPaperSize>.
Returns the name of the default paper size, which depends on the current locale.
Returned: a string.
the name of the default paper size. The string is owned by GTK and should not be modified.
Gets the default bottom margin for the
<GtkPaperSize>.
Passed: a <GtkPaperSize>.
a <GtkPaperSize> object
Passed: a <GtkUnit>, or one of its symbols.
the unit for the return value, not none
Returned: a real number.
the default bottom margin
Gets the default left margin for the
<GtkPaperSize>.
Passed: a <GtkPaperSize>.
a <GtkPaperSize> object
Passed: a <GtkUnit>, or one of its symbols.
the unit for the return value, not none
Returned: a real number.
the default left margin
Gets the default right margin for the
<GtkPaperSize>.
Passed: a <GtkPaperSize>.
a <GtkPaperSize> object
Passed: a <GtkUnit>, or one of its symbols.
the unit for the return value, not none
Returned: a real number.
the default right margin
Gets the default top margin for the
<GtkPaperSize>.
Passed: a <GtkPaperSize>.
a <GtkPaperSize> object
Passed: a <GtkUnit>, or one of its symbols.
the unit for the return value, not none
Returned: a real number.
the default top margin
Gets the human-readable name of the
<GtkPaperSize>.
Passed: a <GtkPaperSize>.
a <GtkPaperSize> object
Returned: a string.
the human-readable name of self
Gets the paper height of the <GtkPaperSize>, in
units of unit.
Passed: a <GtkPaperSize>.
a <GtkPaperSize> object
Passed: a <GtkUnit>, or one of its symbols.
the unit for the return value, not none
Returned: a real number.
the paper height
Gets the name of the <GtkPaperSize>.
Passed: a <GtkPaperSize>.
a <GtkPaperSize> object
Returned: a string.
the name of self
Creates a list of known paper sizes.
Passed: a boolean.
whether to include custom paper sizes as defined in the page setup dialog
Returned: a list, each a <GtkPaperSize>.
a newly allocated list of newly allocated
<GtkPaperSize> objects
Gets the PPD name of the <GtkPaperSize>, which
may be #f.
Passed: a <GtkPaperSize>.
a <GtkPaperSize> object
Returned: a string.
the PPD name of self
Gets the paper width of the <GtkPaperSize>, in
units of unit.
Passed: a <GtkPaperSize>.
a <GtkPaperSize> object
Passed: a <GtkUnit>, or one of its symbols.
the unit for the return value, not none
Returned: a real number.
the paper width
Returns #t if self is not a standard paper size.
Passed: a <GtkPaperSize>.
a <GtkPaperSize> object
Returned: a boolean.
whether self is a custom paper size.
Compares two <GtkPaperSize> objects.
Passed: a <GtkPaperSize>.
a <GtkPaperSize> object
Passed: a <GtkPaperSize>.
another <GtkPaperSize> object
Returned: a boolean.
#t, if self and size2 represent the same paper size
Returns #t if self is an IPP standard paper size.
Passed: a <GtkPaperSize>.
a <GtkPaperSize> object
Returned: a boolean.
whether self is not an IPP custom paper size.
Creates a new <GtkPaperSize> object by parsing a
PWG
5101.1-2002 paper name.
If name is #f, the default paper size is returned, see
paper-size:get-default.
Passed, or left out: a string, or #f.
a paper size name
Returned: a <GtkPaperSize>.
a new <GtkPaperSize>, use paper-size:free to free it
Creates a new <GtkPaperSize> object with the
given parameters.
Passed: a string.
the paper name
Passed: a string.
the human-readable name
Passed: a real number.
the paper width, in units of unit
Passed: a real number.
the paper height, in units of unit
Passed: a <GtkUnit>, or one of its symbols.
the unit for width and height. not none.
Returned: a <GtkPaperSize>.
a new <GtkPaperSize> object, use
paper-size:free to free it
Deserialize a paper size from a <GVariant>.
The ‘GVariant must be in the format produced by paper-size:to-gvariant.
Passed: a <GVariant>.
an a{sv} <GVariant>
Returned: a <GtkPaperSize>.
a new <GtkPaperSize> object
Creates a new <GtkPaperSize> object by using IPP
information.
If ipp-name is not a recognized paper name, width and
height are used to construct a custom
<GtkPaperSize> object.
Passed: a string.
an IPP paper name
Passed: a real number.
the paper width, in points
Passed: a real number.
the paper height in points
Returned: a <GtkPaperSize>.
a new <GtkPaperSize>, use paper-size:free to free it
Reads a paper size from the group group-name in the key file key-file.
Passed: a <GKeyFile>.
the <GKeyFile> to retrieve the papersize from
Passed, or left out: a string, or #f.
the name of the group in the key file to read, or #f to read the
first group
Returned: a <GtkPaperSize>.
a new <GtkPaperSize> object with the restored
paper size
Creates a new <GtkPaperSize> object by using PPD
information.
If ppd-name is not a recognized PPD paper name,
ppd-display-name, width and height are used to
construct a custom <GtkPaperSize> object.
Passed: a string.
a PPD paper name
Passed: a string.
the corresponding human-readable name
Passed: a real number.
the paper width, in points
Passed: a real number.
the paper height in points
Returned: a <GtkPaperSize>.
a new <GtkPaperSize>, use paper-size:free to free it
Changes the dimensions of a self to width x height.
Passed: a <GtkPaperSize>.
a custom <GtkPaperSize> object
Passed: a real number.
the new width in units of unit
Passed: a real number.
the new height in units of unit
Passed: a <GtkUnit>, or one of its symbols.
the unit for width and height
Serialize a paper size to an a{sv} variant.
Passed: a <GtkPaperSize>.
Returned: a <GVariant>.
a new, floating, <GVariant>
This function adds the paper size from self to key-file.
Passed: a <GtkPaperSize>.
Passed: a <GKeyFile>.
the <GKeyFile> to save the paper size to
Passed: a string.
the group to add the settings to in key-file