enlightenment/src/bin/e_intl_data.c

76 lines
2.5 KiB
C
Raw Normal View History

Revert "reduce include deps for enlightenment_imc binary" This reverts commit ee71ea63ec02a1bd7acfb11d9dea38eb3e499147. Revert "reduce include deps for enlightenment_thumb binary" This reverts commit cce14fa8399afd3f8e244a2fb216ae4e5d50b942. both of these i reverted.... because they both CHANGE the define of E_API like: and this is wrong. e.h defines this so that these symbols are exposed. E_API, EAPI and friends are desighned to explicitly expose symbols. because if you try and make STRICTER binaries that only have symbols for what was EXPLICTLY exposed like the CFLAG -fvisibility=hidden ... then any api not explicitly marked with the attribute of visible which that E_API macro is intended for... will be invisible. it will not exist. this means a whole MOUNTAIN of modules stop loading as they can't find these symbols. E_API isn't just source sugar tagging. it's actually functional. i'd suggest using -fvisibility=hidden in your CFLAGS by default. it's also not always portable between all compilers so beware... (it was introduced years ago in gcc... i think clang offers it. i don't know about icc or any others). so since E_API is defined in e.h ... we may as well keep the e.h include there instead of hand re-writing a list of includes. does reducing the include deps really have an impact worth talking about on compile time? the commit logs didn't say. but it does break module loading and does it by adding lots of lines of code that are far mroe easily broken now (this is an examplt). :)
2017-07-14 18:07:39 -07:00
#include "e.h"
/* This file is the counterpart for data storage of e_intl */
/* This only needs to be separate because the e_imc binary and other third parties
Fix common misspellings Some misspellings were manually reverted since in E there are tons of .po with phrases in other languages. Other than that all the changes in the following files were reverted: * src/modules/illume/dicts/English_(US).dic * src/modules/illume-keyboard/dicts/English_(US).dic Following misspellings were fixed: acquited->acquitted adres->address adress->address alreayd->already aquire->acquire arbitarily->arbitrarily cant->can't Capetown->Cape carefull->careful causalities->casualties Celcius->Celsius certian->certain commandoes->commandos considerd->considered conveyer->conveyor dependant->dependent didnt->didn't discontentment->discontent doesnt->doesn't everytime->every exemple->example existance->existence existant->existent existince->existence Farenheit->Fahrenheit forbad->forbade funguses->fungi guage->gauge guerilla->guerrilla guerillas->guerrillas happend->happened hasnt->hasn't heros->heroes inbetween->between independant->independent inital->initial intrusted->entrusted irregardless->regardless isnt->isn't knifes->knives layed->laid loosing->losing marrage->marriage midwifes->midwives miniscule->minuscule monickers->monikers mroe->more noone->no one occured->occurred omre->more paralell->parallel payed->paid planed->planned quitted->quit quizes->quizzes seperated->separated seperate->separate shoudl->should similiar->similar simplier->simpler specifiying->specifying teh->the toke->took torpedos->torpedoes Tuscon->Tucson unecessary->unnecessary useage->usage usefull->useful useing->using waht->what wanna->want whith->with wich->which withing->within SVN revision: 52006
2010-09-08 16:59:07 -07:00
many want to include the functionality to read IMC data from EET files
*/
static Eet_Data_Descriptor *_e_intl_input_method_config_edd = NULL;
EINTERN int
e_intl_data_init(void)
{
_e_intl_input_method_config_edd = E_CONFIG_DD_NEW("input_method_config", E_Input_Method_Config);
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, version, INT);
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, e_im_name, STR);
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, gtk_im_module, STR);
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, qt_im_module, STR);
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, xmodifiers, STR);
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, ecore_imf_module, STR);
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, e_im_exec, STR);
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, e_im_setup_exec, STR);
return 1;
}
EINTERN int
e_intl_data_shutdown(void)
{
E_CONFIG_DD_FREE(_e_intl_input_method_config_edd);
return 1;
}
/* Get the input method configuration from the file */
E_API E_Input_Method_Config *
e_intl_input_method_config_read(Eet_File *imc_file)
{
E_Input_Method_Config *imc;
imc = NULL;
if (imc_file)
{
imc = (E_Input_Method_Config *)eet_data_read(imc_file, _e_intl_input_method_config_edd, "imc");
}
return imc;
}
/* Write the input method configuration to the file */
E_API int
e_intl_input_method_config_write(Eet_File *imc_file, E_Input_Method_Config *imc)
{
int ok = 0;
if (imc_file)
{
ok = eet_data_write(imc_file, _e_intl_input_method_config_edd, "imc", imc, 0);
}
return ok;
}
E_API void
e_intl_input_method_config_free(E_Input_Method_Config *imc)
{
if (imc)
{
if (imc->e_im_name) eina_stringshare_del(imc->e_im_name);
if (imc->gtk_im_module) eina_stringshare_del(imc->gtk_im_module);
if (imc->qt_im_module) eina_stringshare_del(imc->qt_im_module);
if (imc->xmodifiers) eina_stringshare_del(imc->xmodifiers);
if (imc->ecore_imf_module) eina_stringshare_del(imc->ecore_imf_module);
if (imc->e_im_exec) eina_stringshare_del(imc->e_im_exec);
if (imc->e_im_setup_exec) eina_stringshare_del(imc->e_im_setup_exec);
Revert "reduce include deps for enlightenment_imc binary" This reverts commit ee71ea63ec02a1bd7acfb11d9dea38eb3e499147. Revert "reduce include deps for enlightenment_thumb binary" This reverts commit cce14fa8399afd3f8e244a2fb216ae4e5d50b942. both of these i reverted.... because they both CHANGE the define of E_API like: and this is wrong. e.h defines this so that these symbols are exposed. E_API, EAPI and friends are desighned to explicitly expose symbols. because if you try and make STRICTER binaries that only have symbols for what was EXPLICTLY exposed like the CFLAG -fvisibility=hidden ... then any api not explicitly marked with the attribute of visible which that E_API macro is intended for... will be invisible. it will not exist. this means a whole MOUNTAIN of modules stop loading as they can't find these symbols. E_API isn't just source sugar tagging. it's actually functional. i'd suggest using -fvisibility=hidden in your CFLAGS by default. it's also not always portable between all compilers so beware... (it was introduced years ago in gcc... i think clang offers it. i don't know about icc or any others). so since E_API is defined in e.h ... we may as well keep the e.h include there instead of hand re-writing a list of includes. does reducing the include deps really have an impact worth talking about on compile time? the commit logs didn't say. but it does break module loading and does it by adding lots of lines of code that are far mroe easily broken now (this is an examplt). :)
2017-07-14 18:07:39 -07:00
E_FREE(imc);
}
}