]> git.sur5r.net Git - glabels/blob - glabels2/src/util.h
e3c4a15f1c4da5681ce8ef77a9610489b58de080
[glabels] / glabels2 / src / util.h
1 /*
2  *  util.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 __UTIL_H__
22 #define __UTIL_H__
23
24 #include <glib.h>
25 #include <gtk/gtk.h>
26 #include <pango/pango.h>
27
28 G_BEGIN_DECLS
29
30 gchar              *gl_util_add_extension         (const gchar       *orig_filename);
31 gchar              *gl_util_remove_extension      (const gchar       *orig_filename);
32
33 gchar              *gl_util_make_absolute         (const gchar       *filename);
34
35 gchar              *gl_util_fraction              (gdouble            x);
36
37 const gchar        *gl_util_align_to_string       (PangoAlignment     align);
38 PangoAlignment      gl_util_string_to_align       (const gchar       *string);
39
40 const gchar        *gl_util_weight_to_string      (PangoWeight        weight);
41 PangoWeight         gl_util_string_to_weight      (const gchar       *string);
42
43 void gl_util_combo_box_set_strings     (GtkComboBox       *combo,
44                                         GList             *list);
45 void gl_util_combo_box_set_active_text (GtkComboBox       *combo,
46                                         const gchar       *text);
47 void gl_util_combo_box_add_text_model  (GtkComboBox       *combo);
48
49 GdkPixbuf *gl_util_cairo_convert_to_pixbuf (cairo_surface_t *surface);
50
51 void gl_util_get_builder_widgets (GtkBuilder *builder,
52                                   gchar      *first_name,
53                                   ...);
54
55 G_END_DECLS
56
57 #endif /* __UTIL_H__ */
58
59
60
61 /*
62  * Local Variables:       -- emacs
63  * mode: C                -- emacs
64  * c-basic-offset: 8      -- emacs
65  * tab-width: 8           -- emacs
66  * indent-tabs-mode: nil  -- emacs
67  * End:                   -- emacs
68  */