Struct

GtkPaperSize

Description [src]

struct GtkPaperSize {
  /* No available fields */
}

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][print-margins].

Printing support has been added in GTK+ 2.10.

Constructors

gtk_paper_size_new

Creates a new GtkPaperSize object by parsing a PWG 5101.1-2002 paper name.

since: 2.10

gtk_paper_size_new_custom

Creates a new GtkPaperSize object with the given parameters.

since: 2.10

gtk_paper_size_new_from_gvariant

Deserialize a paper size from an a{sv} variant in the format produced by gtk_paper_size_to_gvariant().

since: 3.22

gtk_paper_size_new_from_ipp

Creates a new GtkPaperSize object by using IPP information.

since: 3.16

gtk_paper_size_new_from_key_file

Reads a paper size from the group group_name in the key file key_file.

since: 2.12

gtk_paper_size_new_from_ppd

Creates a new GtkPaperSize object by using PPD information.

since: 2.10

Functions

gtk_paper_size_get_default

Returns the name of the default paper size, which depends on the current locale.

since: 2.10

gtk_paper_size_get_paper_sizes

Creates a list of known paper sizes.

since: 2.12

Instance methods

gtk_paper_size_copy

Copies an existing GtkPaperSize.

since: 2.10

gtk_paper_size_free

Free the given GtkPaperSize object.

since: 2.10

gtk_paper_size_get_default_bottom_margin

Gets the default bottom margin for the GtkPaperSize.

since: 2.10

gtk_paper_size_get_default_left_margin

Gets the default left margin for the GtkPaperSize.

since: 2.10

gtk_paper_size_get_default_right_margin

Gets the default right margin for the GtkPaperSize.

since: 2.10

gtk_paper_size_get_default_top_margin

Gets the default top margin for the GtkPaperSize.

since: 2.10

gtk_paper_size_get_display_name

Gets the human-readable name of the GtkPaperSize.

since: 2.10

gtk_paper_size_get_height

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

since: 2.10

gtk_paper_size_get_name

Gets the name of the GtkPaperSize.

since: 2.10

gtk_paper_size_get_ppd_name

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

since: 2.10

gtk_paper_size_get_width

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

since: 2.10

gtk_paper_size_is_custom

Returns TRUE if size is not a standard paper size.

gtk_paper_size_is_equal

Compares two GtkPaperSize objects.

since: 2.10

gtk_paper_size_is_ipp

Returns TRUE if size is an IPP standard paper size.

gtk_paper_size_set_size

Changes the dimensions of a size to width x height.

since: 2.10

gtk_paper_size_to_gvariant

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

since: 3.22

gtk_paper_size_to_key_file

This function adds the paper size from size to key_file.

since: 2.12