2 * Routines for handling preferences
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
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.
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.
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.
23 #ifndef __PREFRENCE_UTILS_H__
24 #define __PREFRENCE_UTILS_H__
28 #endif /* __cplusplus */
31 * Preference utility routines.
32 * @ingroup prefs_group
35 /** "Stash" a preference.
36 * Copy a preference to its stashed value. Can be called from prefs_pref_foreach().
38 * @param pref A preference.
39 * @param unused unused
41 extern guint pref_stash(pref_t *pref, gpointer unused _U_);
43 /** "Untash" a preference.
44 * Set a preference to its stashed value. Can be called from prefs_pref_foreach().
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.
50 * @return Always returns 0.
52 extern guint pref_unstash(pref_t *pref, gpointer changed_p);
54 /** Clean up a stashed preference.
55 * Can be called from prefs_pref_foreach().
57 * @param pref A preference.
58 * @param unused unused
60 * @return Always returns 0.
62 extern guint pref_clean_stash(pref_t *pref, gpointer unused _U_);
64 /** Set a stashed preference to its default value.
66 *@param pref A preference.
68 extern void reset_stashed_pref(pref_t *pref);
71 /** If autoscroll in live captures is active or not
73 extern gboolean auto_scroll_live; /* GTK+ only. */
75 /** Fill in capture options with values from the preferences
77 extern void prefs_to_capture_opts(void);
79 /** Save all preferences
81 extern void prefs_main_write(void);
83 /** Add a custom column.
85 * @param fmt column format
86 * @param title column title
87 * @param custom_field column custom field
88 * @param custom_occurrence custom occurrence
90 void column_prefs_add_custom(gint fmt, const gchar *title,
91 const gchar *custom_field,
92 gint custom_occurrence);
96 * @param col_link Column list entry
98 void column_prefs_remove_link(GList* col_link);
102 * @param col Column number
104 void column_prefs_remove_nth(gint col);
109 #endif /* __cplusplus */
111 #endif /* __PREFRENCE_UTILS_H__ */
114 * Editor modelines - http://www.wireshark.org/tools/modelines.html
119 * indent-tabs-mode: nil
122 * vi: set shiftwidth=2 tabstop=8 expandtab:
123 * :indentSize=2:tabSize=8:noTabs=true: