3 * Copyright (C) 2001-2009 Jim Evins <evins@snaught.com>.
5 * This file is part of gLabels.
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.
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.
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/>.
25 #include <pango/pango.h>
30 GL_BARCODE_SHAPE_LINE,
31 GL_BARCODE_SHAPE_ALPHA,
36 /* Begin Common Fields */
37 glBarcodeShapeType type;
40 /* End Common Fields */
47 * @ = origin (x,y) from top left corner of barcode
62 /* Begin Common Fields */
63 glBarcodeShapeType type; /* Always GL_BARCODE_SHAPE_LINE. */
66 /* End Common Fields */
74 * glBarcodeShapeAlpha:
76 * @ = origin (x,y) from top left corner of barcode
86 * @ ----------------------
90 /* Begin Common Fields */
91 glBarcodeShapeType type; /* Always GL_BARCODE_SHAPE_ALPHA. */
94 /* End Common Fields */
99 } glBarcodeShapeAlpha;
103 glBarcodeShapeType type;
104 glBarcodeShapeAny any;
106 glBarcodeShapeLine line;
107 glBarcodeShapeAlpha alpha;
112 gdouble width, height;
113 GList *shapes; /* List of glBarcodeShape */
116 typedef glBarcode *(*glBarcodeNewFunc) (const gchar *id,
118 gboolean checksum_flag,
121 const gchar *digits);
124 #define GL_BARCODE_FONT_FAMILY "Sans"
125 #define GL_BARCODE_FONT_WEIGHT PANGO_WEIGHT_NORMAL
128 glBarcodeShapeLine *gl_barcode_shape_line_new (void);
129 glBarcodeShapeAlpha *gl_barcode_shape_alpha_new (void);
131 glBarcode *gl_barcode_new (const gchar *id,
133 gboolean checksum_flag,
136 const gchar *digits);
138 void gl_barcode_free (glBarcode **bc);
140 void gl_barcode_add_shape (glBarcode *bc,
141 glBarcodeShape *shape);
143 GList *gl_barcode_get_styles_list (void);
144 void gl_barcode_free_styles_list (GList *styles_list);
146 gchar *gl_barcode_default_digits (const gchar *id,
149 gboolean gl_barcode_can_text (const gchar *id);
150 gboolean gl_barcode_text_optional (const gchar *id);
152 gboolean gl_barcode_can_csum (const gchar *id);
153 gboolean gl_barcode_csum_optional (const gchar *id);
155 gboolean gl_barcode_can_freeform (const gchar *id);
156 guint gl_barcode_get_prefered_n (const gchar *id);
158 const gchar *gl_barcode_id_to_name (const gchar *id);
159 const gchar *gl_barcode_name_to_id (const gchar *name);
163 #endif /* __BC_H__ */
168 * Local Variables: -- emacs
170 * c-basic-offset: 8 -- emacs
171 * tab-width: 8 -- emacs
172 * indent-tabs-mode: nil -- emacs