]> git.sur5r.net Git - glabels/blob - src/util.h
Imported Upstream version 2.2.8
[glabels] / src / util.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
2
3 /*
4  *  (GLABELS) Label and Business Card Creation program for GNOME
5  *
6  *  util.h:  various small utility functions
7  *
8  *  Copyright (C) 2001-2003  Jim Evins <evins@snaught.com>.
9  *
10  *  This program is free software; you can redistribute it and/or modify
11  *  it under the terms of the GNU General Public License as published by
12  *  the Free Software Foundation; either version 2 of the License, or
13  *  (at your option) any later version.
14  *
15  *  This program is distributed in the hope that it will be useful,
16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  *  GNU General Public License for more details.
19  *
20  *  You should have received a copy of the GNU General Public License
21  *  along with this program; if not, write to the Free Software
22  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
23  */
24
25 #ifndef __UTIL_H__
26 #define __UTIL_H__
27
28 #include <glib/glist.h>
29 #include <gtk/gtkcombobox.h>
30 #include <pango/pango.h>
31
32 G_BEGIN_DECLS
33
34 gchar              *gl_util_add_extension         (const gchar       *orig_filename);
35 gchar              *gl_util_remove_extension      (const gchar       *orig_filename);
36
37 gchar              *gl_util_make_absolute         (const gchar       *filename);
38
39 gchar              *gl_util_fraction              (gdouble            x);
40
41 const gchar        *gl_util_align_to_string       (PangoAlignment     align);
42 PangoAlignment      gl_util_string_to_align       (const gchar       *string);
43
44 const gchar        *gl_util_weight_to_string      (PangoWeight        weight);
45 PangoWeight         gl_util_string_to_weight      (const gchar       *string);
46
47 void gl_util_combo_box_set_strings     (GtkComboBox       *combo,
48                                         GList             *list);
49 void gl_util_combo_box_set_active_text (GtkComboBox       *combo,
50                                         const gchar       *text);
51 void gl_util_combo_box_add_text_model  (GtkComboBox       *combo);
52
53 GList  *gl_util_get_font_family_list (void);
54
55 G_END_DECLS
56
57 #endif /* __UTIL_H__ */