Debian Codegraph @

src/settings.h

raw
1 /*
2 * ConnMan GTK GUI
3 *
4 * Copyright (C) 2015 Intel Corporation. All rights reserved.
5 * Author: Jaakko Hannikainen <[email protected]>
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #ifndef _CONNMAN_GTK_SETTINGS_H
22 #define _CONNMAN_GTK_SETTINGS_H
23
24 #include <glib.h>
25
26 struct settings;
27 struct settings_page;
28
29 #include "service.h"
30 #include "settings_content.h"
31 #include "util.h"
32
33 struct settings {
34 GtkWidget *window;
35 GtkWidget *list;
36 GtkWidget *notebook;
37
38 GtkWidget *apply;
39 int invalid_count;
40
41 struct service *serv;
42 void (*closed)(struct service *serv);
43
44 DualHashTable *callbacks;
45 DualHashTable *contents;
46 };
47
48 struct settings_page {
49 GtkWidget *grid;
50 GtkWidget *item;
51 struct settings *sett;
52 int index;
53 };
54
55 struct settings *settings_create(struct service *serv,
56 void (*closed)(struct service *serv));
57 void settings_update(struct settings *sett, const gchar *key,
58 const gchar *subkey, GVariant *value);
59 void settings_set_callback(struct settings *sett, const gchar *key,
60 const gchar *subkey, struct content_callback *cb);
61
62 #endif /* _CONNMAN_GTK_SETTINGS_H */