1 /*
2  *		dconfig.h
3  *
4  *      Copyright 2011 Alexander Petukhov <devel(at)apetukhov.ru>
5  *
6  *      This program is free software; you can redistribute it and/or modify
7  *      it under the terms of the GNU General Public License as published by
8  *      the Free Software Foundation; either version 2 of the License, or
9  *      (at your option) any later version.
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 Street, Fifth Floor, Boston,
19  *      MA 02110-1301, USA.
20  */
21 
22 #ifndef DCOFIG_H
23 #define DCOFIG_H
24 
25 #include <stdarg.h>
26 #include <glib.h>
27 #include <gtk/gtk.h>
28 
29 /* panel config parts */
30 #define CP_TABBED_MODE 1
31 #define CP_OT_TABS 2
32 #define CP_OT_SELECTED 3
33 #define CP_TT_LTABS 4
34 #define CP_TT_LSELECTED 5
35 #define CP_TT_RTABS 6
36 #define CP_TT_RSELECTED 7
37 
38 
39 typedef enum _debug_store {
40 	DEBUG_STORE_PLUGIN,
41 	DEBUG_STORE_PROJECT
42 } debug_store;
43 
44 
45 void		config_init(void);
46 void		config_destroy(void);
47 
48 void		config_set_panel(int config_part, gpointer config_value, ...);
49 
50 gboolean	config_get_save_to_project(void);
51 
52 gboolean	config_get_tabbed(void);
53 
54 int*		config_get_tabs(gsize *length);
55 int			config_get_selected_tab_index(void);
56 
57 int*		config_get_left_tabs(gsize *length);
58 int			config_get_left_selected_tab_index(void);
59 
60 int*		config_get_right_tabs(gsize *length);
61 int			config_get_right_selected_tab_index(void);
62 
63 void		config_set_debug_changed(void);
64 void		config_set_debug_store(debug_store store);
65 
66 void		config_on_project_open(GObject *obj, GKeyFile *config, gpointer user_data);
67 void		config_on_project_close(GObject *obj, gpointer user_data);
68 void		config_on_project_save(GObject *obj, GKeyFile *config, gpointer user_data);
69 
70 void		config_update_project_keyfile(void);
71 
72 GtkWidget	*config_plugin_configure(GtkDialog *dialog);
73 
74 #endif /* guard */
75