4 /*** typedefs(not structures) and defined constants **********************************************/
6 #define CONFIG_APP_SECTION "Midnight-Commander"
7 #define CONFIG_PANELS_SECTION "Panels"
9 /*** enums ***************************************************************************************/
11 /*** structures declarations (and typedefs of structures)*****************************************/
13 typedef struct mc_config_struct
19 /*** global variables defined in .c file *********************************************************/
21 extern mc_config_t
*mc_main_config
;
22 extern mc_config_t
*mc_panels_config
;
24 /*** declarations of public functions ************************************************************/
26 /* mcconfig/common.c: */
28 mc_config_t
*mc_config_init (const gchar
*);
29 void mc_config_deinit (mc_config_t
*);
31 gboolean
mc_config_del_key (mc_config_t
*, const char *, const gchar
*);
32 gboolean
mc_config_del_group (mc_config_t
*, const char *);
34 gboolean
mc_config_has_param (mc_config_t
*, const char *, const gchar
*);
35 gboolean
mc_config_has_group (mc_config_t
*, const char *);
37 gboolean
mc_config_read_file (mc_config_t
*, const gchar
*);
39 gboolean
mc_config_save_file (mc_config_t
* config
, GError
** error
);
41 gboolean
mc_config_save_to_file (mc_config_t
* config
, const gchar
* filename
, GError
** error
);
46 gchar
**mc_config_get_groups (mc_config_t
*, gsize
*);
48 gchar
**mc_config_get_keys (mc_config_t
*, const gchar
*, gsize
*);
50 gchar
*mc_config_get_string (mc_config_t
*, const gchar
*, const gchar
*, const gchar
*);
52 gchar
*mc_config_get_string_raw (mc_config_t
*, const gchar
*, const gchar
*, const gchar
*);
54 gboolean
mc_config_get_bool (mc_config_t
*, const gchar
*, const gchar
*, gboolean
);
56 int mc_config_get_int (mc_config_t
*, const gchar
*, const gchar
*, int);
59 gchar
**mc_config_get_string_list (mc_config_t
*, const gchar
*, const gchar
*, gsize
*);
61 gboolean
*mc_config_get_bool_list (mc_config_t
*, const gchar
*, const gchar
*, gsize
*);
63 int *mc_config_get_int_list (mc_config_t
*, const gchar
*, const gchar
*, gsize
*);
68 void mc_config_set_string_raw (mc_config_t
*, const gchar
*, const gchar
*, const gchar
*);
70 void mc_config_set_string (mc_config_t
*, const gchar
*, const gchar
*, const gchar
*);
72 void mc_config_set_bool (mc_config_t
*, const gchar
*, const gchar
*, gboolean
);
74 void mc_config_set_int (mc_config_t
*, const gchar
*, const gchar
*, int);
77 mc_config_set_string_list (mc_config_t
*, const gchar
*,
78 const gchar
*, const gchar
* const[], gsize
);
80 void mc_config_set_bool_list (mc_config_t
*, const gchar
*, const gchar
*, gboolean
[], gsize
);
82 void mc_config_set_int_list (mc_config_t
*, const gchar
*, const gchar
*, int[], gsize
);
85 /* mcconfig/dialog.c: */
87 void mc_config_show_dialog (void);
90 /* mcconfig/paths.c: */
92 void mc_config_init_config_paths (GError
** error
);
94 void mc_config_deinit_config_paths (void);
96 gboolean
mc_config_deprecated_dir_present (void);
98 void mc_config_migrate_from_old_place (GError
** error
);
100 const char *mc_config_get_data_path (void);
102 const char *mc_config_get_cache_path (void);
104 const char *mc_config_get_path (void);
106 const char *mc_config_get_home_dir (void);
109 /*** inline functions ****************************************************************************/