GNOME Print Reference Manual | ||||
---|---|---|---|---|
Top | Description |
Synopsis
GnomePrintPaper; const GnomePrintPaper * gnome_print_paper_get_default (void
); const GnomePrintPaper * gnome_print_paper_get_by_name (const guchar *name
); const GnomePrintPaper * gnome_print_paper_get_by_size (gdouble width
,gdouble height
); const GnomePrintPaper * gnome_print_paper_get_closest_by_size (gdouble width
,gdouble height
,gboolean mustfit
); GList * gnome_print_paper_get_list (void
); void gnome_print_paper_free_list (GList *papers
);
Details
GnomePrintPaper
typedef struct { guint version : 8; /* Has to be 0 at moment */ guchar *name; /* Name such as A4 */ gdouble width, height; } GnomePrintPaper;
gnome_print_paper_get_default ()
const GnomePrintPaper * gnome_print_paper_get_default (void
);
Get a pointer to the default paper for the system. The returned pointer should not be freed.
Returns : |
A pointer to the default GnomePrintPaper. |
gnome_print_paper_get_by_name ()
const GnomePrintPaper * gnome_print_paper_get_by_name (const guchar *name
);
Gets a pointer the paper represented by name name
, for example: "A4".
The returned pointer should not be freed.
|
The name of the paper to get |
Returns : |
A pointer to the GnomePrintPaper, NULL if not found.
|
gnome_print_paper_get_by_size ()
const GnomePrintPaper * gnome_print_paper_get_by_size (gdouble width
,gdouble height
);
Gets a pointer the paper with width width
and height height
.
The returned pointer should not be freed.
|
The width of the paper |
|
The height of the paper |
Returns : |
A pointer to the GnomePrintPaper, NULL if not found.
|
gnome_print_paper_get_closest_by_size ()
const GnomePrintPaper * gnome_print_paper_get_closest_by_size (gdouble width
,gdouble height
,gboolean mustfit
);
Gets a pointer the paper with dimensions closest to width width
and
height height
. If mustfit
is TRUE
then width
and height
must fit
within the dimensions of the returned paper. The returned pointer
should not be freed.
|
The width of the paper |
|
The height of the paper |
|
Should width and height fit within paper
|
Returns : |
A pointer to the GnomePrintPaper, NULL if not found.
|
gnome_print_paper_get_list ()
GList * gnome_print_paper_get_list (void
);
Get a GList of all the papers available on the system. The list returned must be freed with gnome_print_paper_free_list when you are finished.
Returns : |
A pointer to the list of papers. |
gnome_print_paper_free_list ()
void gnome_print_paper_free_list (GList *papers
);
Used to free the list created using gnome_print_paper_get_list.
|
A pointer to a GList of papers to free |