Change the formatting strings used to create the Conversation Filter submenu
[metze/wireshark/wip.git] / ui / preference_utils.h
1 /* preference_utils.h
2  * Routines for handling preferences
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 1998 Gerald Combs
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22
23 #ifndef __PREFRENCE_UTILS_H__
24 #define __PREFRENCE_UTILS_H__
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* __cplusplus */
29
30 /** @file
31  * Preference utility routines.
32  *  @ingroup prefs_group
33  */
34
35 /** "Stash" a preference.
36  * Copy a preference to its stashed value. Can be called from prefs_pref_foreach().
37  *
38  * @param pref A preference.
39  * @param unused unused
40  */
41 extern guint pref_stash(pref_t *pref, gpointer unused _U_);
42
43 /** "Untash" a preference.
44  * Set a preference to its stashed value. Can be called from prefs_pref_foreach().
45  *
46  * @param pref A preference.
47  * @param changed_p A pointer to a gboolean. Set to TRUE if the preference differs
48  * from its stashed value.
49  *
50  * @return Always returns 0.
51  */
52 extern guint pref_unstash(pref_t *pref, gpointer changed_p);
53
54 /** Clean up a stashed preference.
55  * Can be called from prefs_pref_foreach().
56  *
57  * @param pref A preference.
58  * @param unused unused
59  *
60  * @return Always returns 0.
61  */
62 extern guint pref_clean_stash(pref_t *pref, gpointer unused _U_);
63
64 /** Set a stashed preference to its default value.
65  *
66  *@param pref A preference.
67  */
68 extern void reset_stashed_pref(pref_t *pref);
69
70
71 /** If autoscroll in live captures is active or not
72  */
73 extern gboolean auto_scroll_live; /* GTK+ only. */
74
75 /** Fill in capture options with values from the preferences
76  */
77 extern void prefs_to_capture_opts(void);
78
79 /** Save all preferences
80  */
81 extern void prefs_main_write(void);
82
83 /** Add a custom column.
84  *
85  * @param fmt column format
86  * @param title column title
87  * @param custom_field column custom field
88  * @param custom_occurrence custom occurrence
89  */
90 void column_prefs_add_custom(gint fmt, const gchar *title,
91                              const gchar *custom_field,
92                              gint custom_occurrence);
93
94 /** Remove a column.
95  *
96  * @param col_link Column list entry
97  */
98 void column_prefs_remove_link(GList* col_link);
99
100 /** Remove a column.
101  *
102  * @param col Column number
103  */
104 void column_prefs_remove_nth(gint col);
105
106
107 #ifdef __cplusplus
108 }
109 #endif /* __cplusplus */
110
111 #endif /* __PREFRENCE_UTILS_H__ */
112
113 /*
114  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
115  *
116  * Local Variables:
117  * c-basic-offset: 2
118  * tab-width: 8
119  * indent-tabs-mode: nil
120  * End:
121  *
122  * vi: set shiftwidth=2 tabstop=8 expandtab:
123  * :indentSize=2:tabSize=8:noTabs=true:
124  */