1 /*
2  *
3  * This program is free software; you can redistribute it and/or modify it
4  * under the terms of the GNU Lesser General Public License as published by
5  * the Free Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful, but
8  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
9  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
10  * for more details.
11  *
12  * You should have received a copy of the GNU Lesser General Public License
13  * along with this program; if not, see <http://www.gnu.org/licenses/>.
14  *
15  *
16  * Authors:
17  *		Not Zed <notzed@lostzed.mmc.com.au>
18  *      Jeffrey Stedfast <fejj@ximian.com>
19  *
20  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
21  *
22  */
23 
24 #ifndef EM_FILTER_EDITOR_H
25 #define EM_FILTER_EDITOR_H
26 
27 #include <e-util/e-util.h>
28 
29 #include "em-filter-context.h"
30 
31 /* Standard GObject macros */
32 #define EM_TYPE_FILTER_EDITOR \
33 	(em_filter_editor_get_type ())
34 #define EM_FILTER_EDITOR(obj) \
35 	(G_TYPE_CHECK_INSTANCE_CAST \
36 	((obj), EM_TYPE_FILTER_EDITOR, EMFilterEditor))
37 #define EM_FILTER_EDITOR_CLASS(cls) \
38 	(G_TYPE_CHECK_CLASS_CAST \
39 	((cls), EM_TYPE_FILTER_EDITOR, EMFilterEditorClass))
40 #define EM_IS_FILTER_EDITOR(obj) \
41 	(G_TYPE_CHECK_INSTANCE_TYPE \
42 	((obj), EM_TYPE_FILTER_EDITOR))
43 #define EM_IS_FILTER_EDITOR_CLASS(cls) \
44 	(G_TYPE_CHECK_CLASS_TYPE \
45 	((cls), EM_TYPE_FILTER_EDITOR))
46 #define EM_FILTER_EDITOR_GET_CLASS(obj) \
47 	(G_TYPE_INSTANCE_GET_CLASS \
48 	((obj), EM_TYPE_FILTER_EDITOR, EMFilterEditorClass))
49 
50 G_BEGIN_DECLS
51 
52 typedef struct _EMFilterEditor EMFilterEditor;
53 typedef struct _EMFilterEditorClass EMFilterEditorClass;
54 
55 typedef struct _EMFilterSource EMFilterSource;
56 
57 struct _EMFilterSource {
58 	const gchar *source;
59 	const gchar *name;
60 };
61 
62 struct _EMFilterEditor {
63 	ERuleEditor parent;
64 };
65 
66 struct _EMFilterEditorClass {
67 	ERuleEditorClass parent_class;
68 };
69 
70 GType		em_filter_editor_get_type	(void);
71 EMFilterEditor *em_filter_editor_new		(EMFilterContext *f,
72 						 const EMFilterSource *source_names);
73 void		em_filter_editor_construct	(EMFilterEditor *fe,
74 						 EMFilterContext *fc,
75 						 GtkBuilder *builder,
76 						 const EMFilterSource *source_names);
77 
78 #endif /* EM_FILTER_EDITOR_H */
79