9b5aa2a0341bc2e3a7daf6ac093edae4e3162ea9
[obnox/wireshark/wip.git] / color_filters.h
1 /* color_filters.h
2  * Definitions for color filters
3  *
4  * $Id$
5  *
6  * Ethereal - Network traffic analyzer
7  * By Gerald Combs <gerald@ethereal.com>
8  * Copyright 1998 Gerald Combs
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23  */
24 #ifndef  __COLOR_FILTERS_H__
25 #define  __COLOR_FILTERS_H__
26
27 /** @file
28  *  Color filters.
29  */
30
31 /** Init the color filters. */
32 void colfilter_init(void);
33
34 /** Save filters in users filter file.
35  *
36  * @return TRUE if write succeeded
37  */
38 gboolean write_filters(void);
39
40 /** Delete users filter file and reload global filters.
41  *
42  * @return TRUE if write succeeded
43  */
44 gboolean revert_filters(void);
45
46 /** Create a new color filter.
47  *
48  * @param name the name of the filter
49  * @param filter_string the filter string
50  * @param bg_color background color
51  * @param fg_color foreground color
52  * @return the new color filter
53  */
54 color_filter_t *new_color_filter(gchar *name, gchar *filter_string,
55     color_t *bg_color, color_t *fg_color);
56
57 /** Remove the color filter.
58  *
59  * @param colorf the color filter to be removed
60  */
61 void remove_color_filter(color_filter_t *colorf);
62
63 /** Load filters from some other filter file.
64  *
65  * @param path the path to the filter file
66  * @param arg the color filter widget
67  * @return TRUE, if read succeeded
68  */
69 gboolean read_other_filters(gchar *path, gpointer arg);
70
71 /** Save filters to some other filter file.
72  *
73  * @param path the path to the filter file
74  * @param only_marked TRUE if only the marked filters should be saved
75  * @return TRUE, if write succeeded
76  */
77 gboolean write_other_filters(gchar *path, gboolean only_marked);
78
79 #endif