HACK: 1. try to match RowsetProperties
[wireshark-wip.git] / ui / preference_utils.h
bloba5bfae682bc2ea55615499909b3b9c4f25523378
1 /* preference_utils.h
2 * Routines for handling preferences
4 * $Id$
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 #ifndef __PREFRENCE_UTILS_H__
26 #define __PREFRENCE_UTILS_H__
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
32 /** @file
33 * Preference utility routines.
34 * @ingroup prefs_group
37 /** "Stash" a preference.
38 * Copy a preference to its stashed value. Can be called from prefs_pref_foreach().
40 * @param pref A preference.
41 * @param unused unused
43 extern guint pref_stash(pref_t *pref, gpointer unused _U_);
45 /** "Untash" a preference.
46 * Set a preference to its stashed value. Can be called from prefs_pref_foreach().
48 * @param pref A preference.
49 * @param changed_p A pointer to a gboolean. Set to TRUE if the preference differs
50 * from its stashed value.
52 * @return Always returns 0.
54 extern guint pref_unstash(pref_t *pref, gpointer changed_p);
56 /** Clean up a stashed preference.
57 * Can be called from prefs_pref_foreach().
59 * @param pref A preference.
60 * @param unused unused
62 * @return Always returns 0.
64 extern guint pref_clean_stash(pref_t *pref, gpointer unused _U_);
66 /** Set a stashed preference to its default value.
68 *@param pref A preference.
70 extern void reset_stashed_pref(pref_t *pref);
73 /** If autoscroll in live captures is active or not
75 extern gboolean auto_scroll_live;
77 /** Fill in capture options with values from the preferences
79 extern void prefs_to_capture_opts(void);
81 /** Save all preferences
83 extern void prefs_main_write(void);
85 /** Add a custom column.
87 * @param fmt column format
88 * @param title column title
89 * @param custom_field column custom field
91 void column_prefs_add_custom(gint fmt, const gchar *title,
92 const gchar *custom_field,
93 gint custom_occurrence);
95 /** Remove a column.
97 * @param col_link Column list entry
99 void column_prefs_remove_link(GList* col_link);
101 /** Remove a column.
103 * @param col Column number
105 void column_prefs_remove_nth(gint col);
108 #ifdef __cplusplus
110 #endif /* __cplusplus */
112 #endif /* __PREFRENCE_UTILS_H__ */