Statistics
| Revision:

root / src / alertpanel.h @ 3060

History | View | Annotate | Download (2 kB)

1 1 hiro
/*
2 1 hiro
 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 30 hiro
 * Copyright (C) 1999-2005 Hiroyuki Yamamoto
4 1 hiro
 *
5 1 hiro
 * This program is free software; you can redistribute it and/or modify
6 1 hiro
 * it under the terms of the GNU General Public License as published by
7 1 hiro
 * the Free Software Foundation; either version 2 of the License, or
8 1 hiro
 * (at your option) any later version.
9 1 hiro
 *
10 1 hiro
 * This program is distributed in the hope that it will be useful,
11 1 hiro
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 1 hiro
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 1 hiro
 * GNU General Public License for more details.
14 1 hiro
 *
15 1 hiro
 * You should have received a copy of the GNU General Public License
16 1 hiro
 * along with this program; if not, write to the Free Software
17 1 hiro
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 1 hiro
 */
19 1 hiro
20 1 hiro
#ifndef __ALERTPANEL_H__
21 1 hiro
#define __ALERTPANEL_H__
22 1 hiro
23 1 hiro
#include <glib.h>
24 1 hiro
25 1 hiro
typedef enum
26 1 hiro
{
27 1 hiro
        G_ALERTDEFAULT,
28 1 hiro
        G_ALERTALTERNATE,
29 1 hiro
        G_ALERTOTHER,
30 407 hiro
        G_ALERTCANCEL,
31 1 hiro
        G_ALERTWAIT,
32 1 hiro
33 1 hiro
        G_ALERTDISABLE        = 1 << 16
34 1 hiro
} AlertValue;
35 1 hiro
36 407 hiro
#define G_ALERT_VALUE_MASK        0x0000ffff
37 407 hiro
38 1 hiro
typedef enum
39 1 hiro
{
40 1 hiro
        ALERT_NOTICE,
41 1 hiro
        ALERT_QUESTION,
42 1 hiro
        ALERT_WARNING,
43 1 hiro
        ALERT_ERROR
44 1 hiro
} AlertType;
45 1 hiro
46 408 hiro
AlertValue alertpanel_full        (const gchar        *title,
47 408 hiro
                                 const gchar        *message,
48 408 hiro
                                 AlertType         type,
49 408 hiro
                                 AlertValue         default_value,
50 408 hiro
                                 gboolean         can_disable,
51 408 hiro
                                 const gchar        *button1_label,
52 408 hiro
                                 const gchar        *button2_label,
53 408 hiro
                                 const gchar        *button3_label);
54 1 hiro
55 408 hiro
AlertValue alertpanel                (const gchar        *title,
56 408 hiro
                                 const gchar        *message,
57 408 hiro
                                 const gchar        *button1_label,
58 408 hiro
                                 const gchar        *button2_label,
59 408 hiro
                                 const gchar        *button3_label);
60 408 hiro
61 1 hiro
void alertpanel_message        (const gchar        *title,
62 1 hiro
                         const gchar        *message,
63 1 hiro
                         AlertType         type);
64 1 hiro
65 1 hiro
AlertValue alertpanel_message_with_disable        (const gchar        *title,
66 1 hiro
                                                 const gchar        *message,
67 1 hiro
                                                 AlertType         type);
68 1 hiro
69 1 hiro
void alertpanel_notice        (const gchar        *format,
70 1 hiro
                         ...) G_GNUC_PRINTF(1, 2);
71 1 hiro
void alertpanel_warning        (const gchar        *format,
72 1 hiro
                         ...) G_GNUC_PRINTF(1, 2);
73 1 hiro
void alertpanel_error        (const gchar        *format,
74 1 hiro
                         ...) G_GNUC_PRINTF(1, 2);
75 1 hiro
76 1 hiro
#endif /* __ALERTPANEL_H__ */