2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU Lesser General Public License as published by
4 * the Free Software Foundation.
6 * This program is distributed in the hope that it will be useful, but
7 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
8 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * You should have received a copy of the GNU Lesser General Public License
12 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 * Not Zed <notzed@lostzed.mmc.com.au>
17 * Jeffrey Stedfast <fejj@ximian.com>
19 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
23 #if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION)
24 #error "Only <e-util/e-util.h> should be included directly."
27 #ifndef E_RULE_EDITOR_H
28 #define E_RULE_EDITOR_H
32 #include <e-util/e-rule-context.h>
33 #include <e-util/e-filter-rule.h>
35 /* Standard GObject macros */
36 #define E_TYPE_RULE_EDITOR \
37 (e_rule_editor_get_type ())
38 #define E_RULE_EDITOR(obj) \
39 (G_TYPE_CHECK_INSTANCE_CAST \
40 ((obj), E_TYPE_RULE_EDITOR, ERuleEditor))
41 #define E_RULE_EDITOR_CLASS(cls) \
42 (G_TYPE_CHECK_CLASS_CAST \
43 ((cls), E_TYPE_RULE_EDITOR, ERuleEditorClass))
44 #define E_IS_RULE_EDITOR(obj) \
45 (G_TYPE_CHECK_INSTANCE_TYPE \
46 ((obj), E_TYPE_RULE_EDITOR))
47 #define E_IS_RULE_EDITOR_CLASS(cls) \
48 (G_TYPE_CHECK_CLASS_TYPE \
49 ((cls), E_TYPE_RULE_EDITOR))
50 #define E_RULE_EDITOR_GET_CLASS(obj) \
51 (G_TYPE_INSTANCE_GET_CLASS \
52 ((obj), E_TYPE_RULE_EDITOR, ERuleEditorClass))
56 typedef struct _ERuleEditor ERuleEditor
;
57 typedef struct _ERuleEditorClass ERuleEditorClass
;
58 typedef struct _ERuleEditorPrivate ERuleEditorPrivate
;
66 ERuleContext
*context
;
68 EFilterRule
*edit
; /* for editing/adding rules, so we only do 1 at a time */
74 ERuleEditorPrivate
*priv
;
77 struct _ERuleEditorClass
{
78 GtkDialogClass parent_class
;
80 void (*set_sensitive
) (ERuleEditor
*editor
);
81 void (*set_source
) (ERuleEditor
*editor
,
84 EFilterRule
* (*create_rule
) (ERuleEditor
*editor
);
87 GType
e_rule_editor_get_type (void) G_GNUC_CONST
;
88 ERuleEditor
* e_rule_editor_new (ERuleContext
*context
,
91 void e_rule_editor_construct (ERuleEditor
*editor
,
92 ERuleContext
*context
,
96 void e_rule_editor_set_source (ERuleEditor
*editor
,
98 void e_rule_editor_set_sensitive (ERuleEditor
*editor
);
99 EFilterRule
* e_rule_editor_create_rule (ERuleEditor
*editor
);
103 #endif /* E_RULE_EDITOR_H */