1 /*
2  * Copyright (C) 2019-2020 Alexandros Theodotou <alex at zrythm dot org>
3  *
4  * This file is part of Zrythm
5  *
6  * Zrythm is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Affero General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * Zrythm is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU Affero General Public License for more details.
15  *
16  * You should have received a copy of the GNU Affero General Public License
17  * along with Zrythm.  If not, see <https://www.gnu.org/licenses/>.
18  */
19 
20 /**
21  * \file
22  *
23  * Preferences widget.
24  */
25 
26 #ifndef __GUI_WIDGETS_PREFERENCES_H__
27 #define __GUI_WIDGETS_PREFERENCES_H__
28 
29 #include <gtk/gtk.h>
30 
31 #define PREFERENCES_WIDGET_TYPE \
32   (preferences_widget_get_type ())
33 G_DECLARE_FINAL_TYPE (
34   PreferencesWidget, preferences_widget,
35   Z, PREFERENCES_WIDGET, GtkDialog)
36 
37 typedef struct Preferences Preferences;
38 typedef struct _MidiControllerMbWidget
39   MidiControllerMbWidget;
40 
41 /**
42  * @addtogroup widgets
43  *
44  * @{
45  */
46 
47 #define MW_PREFERENCES ZRYTHM->preferences
48 
49 typedef struct SubgroupInfo
50 {
51   /** Localized name. */
52   const char *      name;
53 
54   const char *      group_name;
55 
56   int               group_idx;
57   int               subgroup_idx;
58   GSettingsSchema * schema;
59   GSettings *       settings;
60 } SubgroupInfo;
61 
62 /**
63  * Preferences widget.
64  */
65 typedef struct _PreferencesWidget
66 {
67   GtkDialog      parent_instance;
68   GtkNotebook *  group_notebook;
69 
70   SubgroupInfo   subgroup_infos[12][40];
71 } PreferencesWidget;
72 
73 PreferencesWidget *
74 preferences_widget_new (void);
75 
76 /**
77  * @}
78  */
79 
80 #endif
81