gnome-print-paper

Name

gnome-print-paper -- 

Synopsis



struct      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);

Description

Details

>struct GnomePrintPaper

struct GnomePrintPaper {

	   guint version : 8; /* Has to be 0 at moment */
	   guchar *name;      /* Name such as A4 */
	   gdouble width, height;
};


>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.

name :

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.

width :

The width of the paper

height :

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.

width :

The width of the paper

height :

The height of the paper

mustfit :

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.

papers :