1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2012 Hiroyuki Yamamoto & The Claws Mail 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 3 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, see <http://www.gnu.org/licenses/>.
17  *
18  */
19 
20 #ifndef __ACTION_H__
21 #define __ACTION_H__
22 
23 #include <glib.h>
24 #include <gtk/gtk.h>
25 
26 #include "mainwindow.h"
27 #include "messageview.h"
28 #include "compose.h"
29 
30 typedef enum
31 {
32 	ACTION_NONE		= 1 << 0,
33 	ACTION_PIPE_IN		= 1 << 1,
34 	ACTION_PIPE_OUT		= 1 << 2,
35 	ACTION_SINGLE		= 1 << 3,
36 	ACTION_MULTIPLE		= 1 << 4,
37 	ACTION_ASYNC		= 1 << 5,
38 	ACTION_USER_IN		= 1 << 6,
39 	ACTION_USER_HIDDEN_IN	= 1 << 7,
40 	ACTION_INSERT		= 1 << 8,
41 	ACTION_USER_STR		= 1 << 9,
42 	ACTION_USER_HIDDEN_STR	= 1 << 10,
43 	ACTION_SELECTION_STR	= 1 << 11,
44 	ACTION_FILTERING_ACTION = 1 << 12,
45 	ACTION_ERROR		= 1 << 30
46 } ActionType;
47 
48 ActionType action_get_type	(const gchar	*action_str);
49 
50 void actions_execute		(gpointer	data,
51 				 guint		action_nb,
52 				 GtkWidget	*widget,
53 				 gint		source);
54 
55 void action_update_mainwin_menu	(GtkUIManager 	*ui_manager,
56 				 gchar		*branch_path,
57 				 MainWindow	*mainwin);
58 void action_update_msgview_menu	(GtkUIManager 	*ui_manager,
59 				 gchar		*branch_path,
60 				 MessageView	*msgview);
61 void action_update_compose_menu	(GtkUIManager 	*ui_manager,
62 				 gchar		*branch_path,
63 				 Compose	*compose);
64 
65 #endif /* __ACTION_H__ */
66