]> git.sur5r.net Git - glabels/blob - glabels2/src/paper.h
2004-01-03 Jim Evins <evins@snaught.com>
[glabels] / glabels2 / src / paper.h
1 /*
2  *  (GLABELS) Label and Business Card Creation program for GNOME
3  *
4  *  paper.h:  paper module header file
5  *
6  *  Copyright (C) 2003  Jim Evins <evins@snaught.com>.
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program; if not, write to the Free Software
20  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21  */
22
23 #ifndef __PAPER_H__
24 #define __PAPER_H__
25
26 #include <glib.h>
27
28 G_BEGIN_DECLS
29
30 /*
31  *   Paper
32  */
33 typedef struct {
34         gchar               *id;
35         gchar               *name;
36         gdouble              width;
37         gdouble              height;
38 } glPaper;
39
40
41 void                 gl_paper_init                (void);
42
43 GList               *gl_paper_get_id_list         (void);
44 void                 gl_paper_free_id_list        (GList            **ids);
45
46 GList               *gl_paper_get_name_list       (void);
47 void                 gl_paper_free_name_list      (GList            **names);
48
49 gboolean             gl_paper_is_id_known         (const gchar       *id);
50
51 glPaper             *gl_paper_from_id             (const gchar       *id);
52 glPaper             *gl_paper_from_name           (const gchar       *name);
53
54 gchar               *gl_paper_lookup_id_from_name (const gchar       *name);
55 gchar               *gl_paper_lookup_name_from_id (const gchar       *id);
56
57 glPaper             *gl_paper_dup                 (const glPaper     *orig);
58 void                 gl_paper_free                (glPaper          **paper);
59
60 G_END_DECLS
61
62 #endif