aboutsummaryrefslogtreecommitdiffstats
path: root/libevolution-utils/evolution-util.h
blob: c927cbff1af07ea86faa8c112f6369c471a94402 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) version 3.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with the program; if not, see <http://www.gnu.org/licenses/>
 *
 *
 * Authors:
 *      Srinivasa Ragavan <sragavan@gnome.org>
 *
 * Copyright (C) 2012 Intel Corporation (www.intel.com)
 *
 */

#ifndef EVOLUTION_UTIL_H
#define EVOLUTION_UTIL_H

#include <sys/types.h>
#include <glib.h>
#include <gtk/gtk.h>
/* String to/from double conversion functions */
gdouble     e_flexible_strtod       (const gchar *nptr,
                         gchar **endptr);

/* 29 bytes should enough for all possible values that
 * g_ascii_dtostr can produce with the %.17g format.
 * Then add 10 for good measure */
#define E_ASCII_DTOSTR_BUF_SIZE (DBL_DIG + 12 + 10)
gchar *     e_ascii_dtostr          (gchar *buffer,
                         gint buf_len,
                         const gchar *format,
                         gdouble d);

GtkWidget * e_builder_get_widget        (GtkBuilder *builder,
                         const gchar *widget_name);
void        e_load_ui_builder_definition    (GtkBuilder *builder,
                         const gchar *basename);

#endif /* EVOLUTION_UTIL_H */