1 /** \file   uisettings.h
2  * \brief   GTK3 settings dialog - header
3  *
4  * \author  Bas Wassink <b.wassink@ziggo.nl>
5  */
6 
7 /*
8  * This file is part of VICE, the Versatile Commodore Emulator.
9  * See README for copyright notice.
10  *
11  *  This program is free software; you can redistribute it and/or modify
12  *  it under the terms of the GNU General Public License as published by
13  *  the Free Software Foundation; either version 2 of the License, or
14  *  (at your option) any later version.
15  *
16  *  This program is distributed in the hope that it will be useful,
17  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  *  GNU General Public License for more details.
20  *
21  *  You should have received a copy of the GNU General Public License
22  *  along with this program; if not, write to the Free Software
23  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
24  *  02111-1307  USA.
25  */
26 
27 #ifndef VICE_UISETTINGS_H
28 #define VICE_UISETTINGS_H
29 
30 #include "vice.h"
31 #include <gtk/gtk.h>
32 #include "resourcewidgetmanager.h"
33 
34 
35 /** \brief  Settings tree node object
36  *
37  * Contains name to display in the settings tree widget, an ID to allow for
38  * xpath-like access to tree nodes, a callback to render a widget next to the
39  * tree, and optionally a list of child nodes.
40  */
41 typedef struct ui_settings_tree_node_s {
42     char *name;                                 /**< setting name */
43     const char *id;                             /**< tree node ID */
44     GtkWidget *(*callback)(GtkWidget *);        /**< callback to select
45                                                      associated widget */
46     struct ui_settings_tree_node_s *children;   /**< child nodes */
47 } ui_settings_tree_node_t;
48 
49 
50 /** \brief  tree nodes list terminator
51  */
52 #define UI_SETTINGS_TERMINATOR  { NULL, NULL, NULL, NULL }
53 
54 void ui_settings_dialog_callback(GtkWidget *widget, gpointer user_data);
55 
56 gboolean ui_settings_dialog_create(GtkWidget *, gpointer user_data);
57 gboolean ui_settings_dialog_create_and_activate_node(const char *path);
58 gboolean ui_settings_dialog_activate_node(const char *path);
59 
60 void ui_settings_set_resource_widget_manager(resource_widget_manager_t *ref);
61 
62 void ui_settings_shutdown(void);
63 
64 #endif
65