summaryrefslogtreecommitdiff
path: root/epan/prefs.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2012-08-08 12:13:24 +0000
committerMichael Mann <mmann78@netscape.net>2012-08-08 12:13:24 +0000
commit3d12ea758b952de49a1f3dfde1552bdf87e1c455 (patch)
treeeeef4695074baed1b4f01a500d2f734b4c355636 /epan/prefs.h
parent0e9df60466abc84ed798066dfde64f1b4dc33849 (diff)
downloadwireshark-3d12ea758b952de49a1f3dfde1552bdf87e1c455.tar.gz
Base framework to allow all preferences to be part of generic preferences API. Implementation will follow, but I wanted the framework in place first.
svn path=/trunk/; revision=44331
Diffstat (limited to 'epan/prefs.h')
-rw-r--r--epan/prefs.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/epan/prefs.h b/epan/prefs.h
index e814248636..3219215a8a 100644
--- a/epan/prefs.h
+++ b/epan/prefs.h
@@ -205,8 +205,9 @@ extern void prefs_cleanup(void);
* Register a module that will have preferences.
* Specify the module under which to register it or NULL to register it
* at the top level, the name used for the module in the preferences file,
- * the title used in the tab for it in a preferences dialog box, and a
- * routine to call back when we apply the preferences.
+ * the title used in the tab for it in a preferences dialog box, a
+ * routine to call back when we apply the preferences, and if it should
+ * use the GUI controls provided by the preferences or it has its own.
*
* This should not be used for dissector preferences;
* "prefs_register_protocol()" should be used for that, so that the
@@ -215,7 +216,8 @@ extern void prefs_cleanup(void);
* call so that the "Protocol Properties..." menu item works.
*/
extern module_t *prefs_register_module(module_t *parent, const char *name,
- const char *title, const char *description, void (*apply_cb)(void));
+ const char *title, const char *description, void (*apply_cb)(void),
+ const gboolean use_gui);
/*
* Register a subtree that will have modules under it.
@@ -224,7 +226,7 @@ extern module_t *prefs_register_module(module_t *parent, const char *name,
* dialog box.
*/
extern module_t *prefs_register_subtree(module_t *parent, const char *title,
- const char *description);
+ const char *description, void (*apply_cb)(void));
/*
* Register that a protocol has preferences.
@@ -402,6 +404,25 @@ extern void prefs_register_uat_preference(module_t *module,
void* uat);
/*
+ * Register a color preference. Currently does not have any "GUI Dialog" support
+ * so the color data needs to be managed independently. Currently used by the
+ * "GUI preferences" to aid in reading/writing the preferences file, but the
+ * "data" is still managed by the specific "GUI preferences" dialog.
+ */
+extern void prefs_register_color_preference(module_t *module, const char *name,
+ const char *title, const char *description, color_t *color);
+
+/*
+ * Register a custom preference. Currently does not have any "GUI Dialog" support
+ * so data needs to be managed independently. Currently used by the
+ * "GUI preferences" to aid in reading/writing the preferences file, but the
+ * "data" is still managed by the specific "GUI preferences" dialog.
+ */
+extern void prefs_register_custom_preference(module_t *module, const char *name,
+ const char *title, const char *description, struct pref_custom_cbs* custom_cbs,
+ void** custom_data);
+
+/*
* Register a preference that used to be supported but no longer is.
*/
extern void prefs_register_obsolete_preference(module_t *module,