>gnome-paper

gnome-paper

Name

gnome-paper -- Paper dimensions, printing unit conversions.

Synopsis


#include <gnome.h>


typedef     Paper;
typedef     Unit;
GList*      gnome_paper_name_list           (void);
const GnomePaper* gnome_paper_with_name     (const gchar *papername);
const GnomePaper* gnome_paper_with_size     (double pswidth,
                                             double psheight);
const gchar* gnome_paper_name               (const GnomePaper *paper);
gdouble     gnome_paper_pswidth             (const GnomePaper *paper);
gdouble     gnome_paper_psheight            (const GnomePaper *paper);
gdouble     gnome_paper_lmargin             (const GnomePaper *paper);
gdouble     gnome_paper_tmargin             (const GnomePaper *paper);
gdouble     gnome_paper_rmargin             (const GnomePaper *paper);
gdouble     gnome_paper_bmargin             (const GnomePaper *paper);
const gchar* gnome_paper_name_default       (void);
GList*      gnome_unit_name_list            (void);
const GnomeUnit* gnome_unit_with_name       (const gchar *unitname);
gdouble     gnome_paper_convert             (double psvalue,
                                             const GnomeUnit *unit);
double      gnome_paper_convert_to_points   (double othervalue,
                                             const GnomeUnit *unit);

Description

The gnome-paper module provides a way of querying a database of existing paper dimensions, as well as the known or user-configured values for the margins.

Support for converting values to and from PostScript points is also supported.

Details

Paper

typedef GnomePaper Paper;


Unit

typedef GnomeUnit Unit;


gnome_paper_name_list ()

GList*      gnome_paper_name_list           (void);

grants access to the hardcoded internal list of paper specifications

Returns : internal list of paper specifications


gnome_paper_with_name ()

const GnomePaper* gnome_paper_with_name     (const gchar *papername);

searches internal list of paper sizes, searching for one with the name 'papername'

papername : human name of desired paper type
Returns : paper specification with given name, or NULL


gnome_paper_with_size ()

const GnomePaper* gnome_paper_with_size     (double pswidth,
                                             double psheight);

create a custom paper type with given dimensions

pswidth : width of paper
psheight : height of paper
Returns : paper specification


gnome_paper_name ()

const gchar* gnome_paper_name               (const GnomePaper *paper);

paper : paper specification
Returns : human readable name for paper type


gnome_paper_pswidth ()

gdouble     gnome_paper_pswidth             (const GnomePaper *paper);

returns the width of the paper, including the margins

paper : paper specification
Returns : width of paper (in points)


gnome_paper_psheight ()

gdouble     gnome_paper_psheight            (const GnomePaper *paper);

returns the height of the paper, including the margins

paper : paper specification
Returns : height of paper (in points)


gnome_paper_lmargin ()

gdouble     gnome_paper_lmargin             (const GnomePaper *paper);

paper : paper specification
Returns : paper specification


gnome_paper_tmargin ()

gdouble     gnome_paper_tmargin             (const GnomePaper *paper);

paper : paper specification
Returns : size of top margin (in points)


gnome_paper_rmargin ()

gdouble     gnome_paper_rmargin             (const GnomePaper *paper);

paper : paper specification
Returns : size of right margin (in points)


gnome_paper_bmargin ()

gdouble     gnome_paper_bmargin             (const GnomePaper *paper);

paper : paper specification
Returns : size of bottom margin (in points)


gnome_paper_name_default ()

const gchar* gnome_paper_name_default       (void);

Returns : human readable name for default paper type


gnome_unit_name_list ()

GList*      gnome_unit_name_list            (void);

grants access to the hardcoded internal list of units

Returns : internal list of units


gnome_unit_with_name ()

const GnomeUnit* gnome_unit_with_name       (const gchar *unitname);

searches internal list of units, searching for one with the name 'unitname'

unitname : name of desired unit
Returns : Unit with given name or NULL


gnome_paper_convert ()

gdouble     gnome_paper_convert             (double psvalue,
                                             const GnomeUnit *unit);

converts from value represented in points to value represented in given units.

psvalue : value in points
unit : unit to convert to
Returns : value in given units


gnome_paper_convert_to_points ()

double      gnome_paper_convert_to_points   (double othervalue,
                                             const GnomeUnit *unit);

Needed for gnome-paper-selector. converts from value represented in points to value represented in given units.

othervalue : value in points
unit : unit to convert to
Returns : value in points