Functions
gtk_paper_size_new_from_ppd ()
GtkPaperSize *
gtk_paper_size_new_from_ppd (const gchar *ppd_name,
const gchar *ppd_display_name,
gdouble width,
gdouble height);
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.
Since: 2.10
gtk_paper_size_new_from_ipp ()
GtkPaperSize *
gtk_paper_size_new_from_ipp (const gchar *ipp_name,
gdouble width,
gdouble height);
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.
Since: 3.16
gtk_paper_size_get_paper_sizes ()
GList *
gtk_paper_size_get_paper_sizes (gboolean include_custom);
Creates a list of known paper sizes.
Returns
a newly allocated list of newly
allocated GtkPaperSize objects.
[element-type GtkPaperSize][transfer full]
Since: 2.12
gtk_paper_size_get_display_name ()
const gchar *
gtk_paper_size_get_display_name (GtkPaperSize *size);
Gets the human-readable name of the GtkPaperSize.
Returns
the human-readable name of size
Since: 2.10
gtk_paper_size_get_ppd_name ()
const gchar *
gtk_paper_size_get_ppd_name (GtkPaperSize *size);
Gets the PPD name of the GtkPaperSize, which
may be NULL.
Returns
the PPD name of size
Since: 2.10
gtk_paper_size_is_ipp ()
gboolean
gtk_paper_size_is_ipp (GtkPaperSize *size);
Returns TRUE if size
is an IPP standard paper size.
Returns
whether size
is not an IPP custom paper size.
gtk_paper_size_is_custom ()
gboolean
gtk_paper_size_is_custom (GtkPaperSize *size);
Returns TRUE if size
is not a standard paper size.
Returns
whether size
is a custom paper size.
gtk_paper_size_set_size ()
void
gtk_paper_size_set_size (GtkPaperSize *size,
gdouble width,
gdouble height,
GtkUnit unit);
Changes the dimensions of a size
to width
x height
.
Since: 2.10
gtk_paper_size_get_default_top_margin ()
gdouble
gtk_paper_size_get_default_top_margin (GtkPaperSize *size,
GtkUnit unit);
Gets the default top margin for the GtkPaperSize.
Returns
the default top margin
Since: 2.10
gtk_paper_size_get_default_bottom_margin ()
gdouble
gtk_paper_size_get_default_bottom_margin
(GtkPaperSize *size,
GtkUnit unit);
Gets the default bottom margin for the GtkPaperSize.
Returns
the default bottom margin
Since: 2.10
gtk_paper_size_get_default_left_margin ()
gdouble
gtk_paper_size_get_default_left_margin
(GtkPaperSize *size,
GtkUnit unit);
Gets the default left margin for the GtkPaperSize.
Returns
the default left margin
Since: 2.10
gtk_paper_size_get_default_right_margin ()
gdouble
gtk_paper_size_get_default_right_margin
(GtkPaperSize *size,
GtkUnit unit);
Gets the default right margin for the GtkPaperSize.
Returns
the default right margin
Since: 2.10
gtk_paper_size_get_default ()
const gchar *
gtk_paper_size_get_default (void);
Returns the name of the default paper size, which
depends on the current locale.
Returns
the name of the default paper size. The string
is owned by GTK+ and should not be modified.
Since: 2.10
gtk_paper_size_new_from_key_file ()
GtkPaperSize *
gtk_paper_size_new_from_key_file (GKeyFile *key_file,
const gchar *group_name,
GError **error);
Reads a paper size from the group group_name
in the key file
key_file
.
Returns
a new GtkPaperSize object with the restored
paper size, or NULL if an error occurred
Since: 2.12
gtk_paper_size_to_key_file ()
void
gtk_paper_size_to_key_file (GtkPaperSize *size,
GKeyFile *key_file,
const gchar *group_name);
This function adds the paper size from size
to key_file
.
Since: 2.12
gtk_paper_size_to_gvariant ()
GVariant *
gtk_paper_size_to_gvariant (GtkPaperSize *paper_size);
Serialize a paper size to an a{sv} variant.
Returns
a new, floating, GVariant.
[transfer none]
Since: 3.22
Types and Values
GtkPaperSize
typedef struct _GtkPaperSize GtkPaperSize;
GTK_UNIT_PIXEL
#define GTK_UNIT_PIXEL GTK_UNIT_NONE
GTK_PAPER_NAME_A3
#define GTK_PAPER_NAME_A3 "iso_a3"
Name for the A3 paper size.
GTK_PAPER_NAME_A4
#define GTK_PAPER_NAME_A4 "iso_a4"
Name for the A4 paper size.
GTK_PAPER_NAME_A5
#define GTK_PAPER_NAME_A5 "iso_a5"
Name for the A5 paper size.
GTK_PAPER_NAME_B5
#define GTK_PAPER_NAME_B5 "iso_b5"
Name for the B5 paper size.
GTK_PAPER_NAME_LETTER
#define GTK_PAPER_NAME_LETTER "na_letter"
Name for the Letter paper size.
GTK_PAPER_NAME_EXECUTIVE
#define GTK_PAPER_NAME_EXECUTIVE "na_executive"
Name for the Executive paper size.
GTK_PAPER_NAME_LEGAL
#define GTK_PAPER_NAME_LEGAL "na_legal"
Name for the Legal paper size.