]> git.sur5r.net Git - glabels/blob - src/label-barcode.h
Imported Upstream version 3.0.0
[glabels] / src / label-barcode.h
1 /*
2  *  label-barcode.h
3  *  Copyright (C) 2001-2009  Jim Evins <evins@snaught.com>.
4  *
5  *  This file is part of gLabels.
6  *
7  *  gLabels is free software: you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation, either version 3 of the License, or
10  *  (at your option) any later version.
11  *
12  *  gLabels is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with gLabels.  If not, see <http://www.gnu.org/licenses/>.
19  */
20
21 #ifndef __LABEL_BARCODE_H__
22 #define __LABEL_BARCODE_H__
23
24 #include "text-node.h"
25 #include "label-object.h"
26
27 G_BEGIN_DECLS
28
29
30 #define GL_TYPE_LABEL_BARCODE            (gl_label_barcode_get_type ())
31 #define GL_LABEL_BARCODE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_BARCODE, glLabelBarcode))
32 #define GL_LABEL_BARCODE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_BARCODE, glLabelBarcodeClass))
33 #define GL_IS_LABEL_BARCODE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_BARCODE))
34 #define GL_IS_LABEL_BARCODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_BARCODE))
35
36 typedef struct _glLabelBarcode          glLabelBarcode;
37 typedef struct _glLabelBarcodeClass     glLabelBarcodeClass;
38
39 typedef struct _glLabelBarcodePrivate   glLabelBarcodePrivate;
40
41 struct _glLabelBarcode {
42         glLabelObject            object;
43
44         glLabelBarcodePrivate   *priv;
45 };
46
47 struct _glLabelBarcodeClass {
48         glLabelObjectClass       parent_class;
49 };
50
51
52
53 typedef struct _glLabelBarcodeStyle     glLabelBarcodeStyle;
54
55 struct _glLabelBarcodeStyle {
56         gchar          *backend_id;
57         gchar          *id;
58         gboolean        text_flag;
59         gboolean        checksum_flag;
60         guint           format_digits;
61 };
62
63
64
65 GType                 gl_label_barcode_get_type             (void) G_GNUC_CONST;
66
67 GObject              *gl_label_barcode_new                  (glLabel                   *label,
68                                                              gboolean                   checkpoint);
69
70 void                  gl_label_barcode_set_data             (glLabelBarcode            *lbc,
71                                                              const glTextNode          *text_node,
72                                                              gboolean                   checkpoint);
73
74 void                  gl_label_barcode_set_style            (glLabelBarcode            *lbc,
75                                                              const glLabelBarcodeStyle *style,
76                                                              gboolean                   checkpoint);
77
78 glTextNode           *gl_label_barcode_get_data             (glLabelBarcode            *lbc);
79
80 glLabelBarcodeStyle  *gl_label_barcode_get_style            (glLabelBarcode            *lbc);
81
82
83 glLabelBarcodeStyle  *gl_label_barcode_style_new            (void);
84 glLabelBarcodeStyle  *gl_label_barcode_style_dup            (const glLabelBarcodeStyle *style);
85 void                  gl_label_barcode_style_free           (glLabelBarcodeStyle       *style);
86
87 gboolean              gl_label_barcode_style_is_equal       (const glLabelBarcodeStyle *style1,
88                                                              const glLabelBarcodeStyle *style2);
89
90 void                  gl_label_barcode_style_set_backend_id (glLabelBarcodeStyle       *style,
91                                                              const gchar               *backend_id);
92
93 void                  gl_label_barcode_style_set_style_id   (glLabelBarcodeStyle       *style,
94                                                              const gchar               *id);
95
96
97 G_END_DECLS
98
99 #endif /* __LABEL_BARCODE_H__ */
100
101
102
103
104 /*
105  * Local Variables:       -- emacs
106  * mode: C                -- emacs
107  * c-basic-offset: 8      -- emacs
108  * tab-width: 8           -- emacs
109  * indent-tabs-mode: nil  -- emacs
110  * End:                   -- emacs
111  */