1 /* -*-mode:c; c-style:k&r; c-basic-offset:4; -*- */
2 /* Balsa E-Mail Client
3  *
4  * Copyright (C) 1997-2013 Stuart Parmenter and others,
5  *                         See the file AUTHORS for a list.
6  *
7  * This program 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 2, or (at your option)
10  * any later version.
11  *
12  * This program 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 this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20  * 02111-1307, USA.
21  */
22 
23 #ifndef __LIBBALSA_INFORMATION_H__
24 #define __LIBBALSA_INFORMATION_H__
25 
26 #include <gtk/gtk.h>
27 #include <stdarg.h>
28 
29 enum _LibBalsaInformationType {
30     LIBBALSA_INFORMATION_MESSAGE,
31     LIBBALSA_INFORMATION_WARNING,
32     LIBBALSA_INFORMATION_ERROR,
33     LIBBALSA_INFORMATION_DEBUG,
34     LIBBALSA_INFORMATION_FATAL
35 };
36 
37 typedef enum _LibBalsaInformationType LibBalsaInformationType;
38 
39 typedef void (*LibBalsaInformationFunc) (GtkWindow *parent,
40                                          LibBalsaInformationType message_type,
41                                          const gchar * fmt);
42 
43 
44 extern LibBalsaInformationFunc libbalsa_real_information_func;
45 
46 void libbalsa_information(LibBalsaInformationType type,
47                           const char *fmt, ...)
48 #ifdef __GNUC__
49     __attribute__ ((format (printf, 2, 3)))
50 #endif
51 ;
52 void libbalsa_information_parented(GtkWindow *parent,
53                                    LibBalsaInformationType type,
54                                    const char *fmt, ...)
55 #ifdef __GNUC__
56     __attribute__ ((format (printf, 3, 4)))
57 #endif
58 ;
59 void libbalsa_information_varg(GtkWindow *parent,
60                                LibBalsaInformationType type,
61                                const char *fmt, va_list ap);
62 
63 #endif
64