3 /* This file is the counterpart for data storage of e_intl */
4 /* This only needs to be separate because the e_imc binary and other third parties
5 many want to include the functionality to read IMC data from EET files
7 static Eet_Data_Descriptor *_e_intl_input_method_config_edd = NULL;
10 e_intl_data_init(void)
12 _e_intl_input_method_config_edd = E_CONFIG_DD_NEW("input_method_config", E_Input_Method_Config);
13 E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, version, INT);
14 E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, e_im_name, STR);
15 E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, gtk_im_module, STR);
16 E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, qt_im_module, STR);
17 E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, xmodifiers, STR);
18 E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, ecore_imf_module, STR);
19 E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, e_im_exec, STR);
20 E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, e_im_setup_exec, STR);
26 e_intl_data_shutdown(void)
28 E_CONFIG_DD_FREE(_e_intl_input_method_config_edd);
34 /* Get the input method configuration from the file */
35 EAPI E_Input_Method_Config *
36 e_intl_input_method_config_read(Eet_File *imc_file)
38 E_Input_Method_Config *imc;
43 imc = (E_Input_Method_Config *) eet_data_read(imc_file, _e_intl_input_method_config_edd, "imc");
48 /* Write the input method configuration to the file */
50 e_intl_input_method_config_write(Eet_File *imc_file, E_Input_Method_Config *imc)
56 ok = eet_data_write(imc_file, _e_intl_input_method_config_edd, "imc", imc, 0);
62 e_intl_input_method_config_free(E_Input_Method_Config *imc)
66 if (imc->e_im_name) eina_stringshare_del(imc->e_im_name);
67 if (imc->gtk_im_module) eina_stringshare_del(imc->gtk_im_module);
68 if (imc->qt_im_module) eina_stringshare_del(imc->qt_im_module);
69 if (imc->xmodifiers) eina_stringshare_del(imc->xmodifiers);
70 if (imc->ecore_imf_module) eina_stringshare_del(imc->ecore_imf_module);
71 if (imc->e_im_exec) eina_stringshare_del(imc->e_im_exec);
72 if (imc->e_im_setup_exec) eina_stringshare_del(imc->e_im_setup_exec);