Debian Codegraph @

src/connman-ui-gtk.h

raw symbols SCIP
1 /*
2 *
3 * Connection Manager UI
4 *
5 * Copyright (C) 2012 Intel Corporation. All rights reserved.
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 version 2 as
9 * published by the Free Software Foundation.
10 *
11 * This program 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 General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 */
21
22 #ifndef __CONNMAN_UI_GTK_H__
23 #define __CONNMAN_UI_GTK_H__
24
25 #include <errno.h>
26 #include <stdio.h>
27 #include <string.h>
28
29 #include <locale.h>
30 #include <libintl.h>
31
32 #include <glib/gi18n.h>
33 #include <gtk/gtk.h>
34
35 #include <connman-interface.h>
36
37 struct cui_selected_service {
38 char *path;
39 char *name;
40 };
41
42 extern GtkBuilder *cui_builder;
43
44 void cui_load_theme(void);
45 void cui_theme_get_type_icone_and_info(const char *type,
46 GdkPixbuf **image, const char **info);
47 void cui_theme_get_signal_icone_and_info(uint8_t signal_strength,
48 GdkPixbuf **image, const char **info);
49 void cui_theme_get_state_icone_and_info(enum connman_state state,
50 GdkPixbuf **image, const char **info);
51 void cui_theme_get_tethering_icone_and_info(GdkPixbuf **image,
52 const char **info);
53
54 gint cui_load_trayicon(GtkBuilder *builder);
55 void cui_trayicon_update_icon(void);
56 void cui_tray_hook_left_menu(gpointer callback);
57 void cui_tray_hook_right_menu(gpointer callback);
58 void cui_tray_left_menu_disable(void);
59 void cui_tray_enable(void);
60 void cui_tray_disable(void);
61
62 gint cui_load_agent_dialogs(void);
63 void cui_agent_init_callbacks(void);
64 void cui_agent_set_selected_service(const char *path, const char *name);
65 void cui_agent_set_wifi_tethering_settings(const char *path, gboolean tether);
66 gint cui_load_left_menu(GtkBuilder *builder, GtkStatusIcon *trayicon);
67 gint cui_load_right_menu(GtkBuilder *builder, GtkStatusIcon *trayicon);
68 void cui_right_menu_enable_only_quit(void);
69 void cui_right_menu_enable_all(void);
70
71 gint cui_settings_popup(const char *path);
72
73 GtkLabel *set_label(GtkBuilder *builder, const char *name,
74 const char *value, const char *default_value);
75 GtkEntry *set_entry(GtkBuilder *builder, const char *name,
76 const char *value, const char *default_value);
77 GtkWidget *set_widget_sensitive(GtkBuilder *builder,
78 const char *name, gboolean value);
79 GtkWidget *set_widget_hidden(GtkBuilder *builder,
80 const char *name, gboolean value);
81 GtkWidget *set_button_toggle(GtkBuilder *builder,
82 const char *name, gboolean active);
83 GtkImage *set_image(GtkBuilder *builder,
84 const char *name, GdkPixbuf *image, const char *info);
85 void set_signal_callback(GtkBuilder *builder,
86 const char *name, const char *signal_name,
87 GCallback handler, gpointer user_data);
88 const char *get_entry_text(GtkBuilder *builder, const char *name);
89
90 #endif /* __CONNMAN_UI_GTK_H__ */