56f132d87692a14c0bb0827acd747f01f856a3a6
[claws.git] / src / action.h
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2003 Hiroyuki Yamamoto & The Sylpheed Claws Team
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __ACTION_H__
21 #define __ACTION_H__
22
23 #include <glib.h>
24 #include <gtk/gtkitemfactory.h>
25
26 #include "mainwindow.h"
27 #include "compose.h"
28
29 typedef enum
30 {
31         ACTION_NONE             = 1 << 0,
32         ACTION_PIPE_IN          = 1 << 1,
33         ACTION_PIPE_OUT         = 1 << 2,
34         ACTION_SINGLE           = 1 << 3,
35         ACTION_MULTIPLE         = 1 << 4,
36         ACTION_ASYNC            = 1 << 5,
37         ACTION_USER_IN          = 1 << 6,
38         ACTION_USER_HIDDEN_IN   = 1 << 7,
39         ACTION_INSERT           = 1 << 8,
40         ACTION_USER_STR         = 1 << 9,
41         ACTION_USER_HIDDEN_STR  = 1 << 10,
42         ACTION_SELECTION_STR    = 1 << 11,
43         ACTION_ERROR            = 1 << 30
44 } ActionType;
45
46 void update_mainwin_actions_menu        (GtkItemFactory *ifactory, 
47                                          MainWindow     *mainwin);
48 void update_compose_actions_menu        (GtkItemFactory *ifactory, 
49                                          gchar          *branch_path,
50                                          Compose        *compose);
51
52 void actions_execute                    (gpointer       data, 
53                                          guint          action_nb,
54                                          GtkWidget      *widget,
55                                          gint           source);
56
57 ActionType get_action_type              (const gchar    *action_str);
58
59 #endif /* __ACTION_H__ */