r1996: Cope slightly better with invalid filenames in various places (reported by
[rox-filer.git] / ROX-Filer / src / options.h
blob6c445b73f710c0fcbab575208a733aa60c44eccc
1 /*
2 * $Id$
4 * ROX-Filer, filer for the ROX desktop project
5 * By Thomas Leonard, <tal197@users.sourceforge.net>.
6 */
8 #ifndef _OPTIONS_H
9 #define _OPTIONS_H
11 #include <gtk/gtk.h>
13 typedef void OptionNotify(void);
14 typedef GList * (*OptionBuildFn)(Option *option, xmlNode *node, guchar *label);
16 struct _Option {
17 guchar *value;
18 long int_value;
19 gboolean has_changed;
21 guchar *backup; /* Copy of value to Revert to */
23 GtkWidget *widget; /* NULL => No UI yet */
24 void (*update_widget)(Option *option);
25 guchar * (*read_widget)(Option *option);
28 /* Prototypes */
30 void options_init(void);
32 void option_register_widget(char *name, OptionBuildFn builder);
33 void option_check_widget(Option *option);
35 void option_add_int(Option *option, const gchar *key, int value);
36 void option_add_string(Option *option, const gchar *key, const gchar *value);
38 void options_notify(void);
39 void option_add_notify(OptionNotify *callback);
40 void option_add_saver(OptionNotify *callback);
42 GtkWidget *options_show(void);
44 #endif /* _OPTIONS_H */