E_API void * e_modapi_init(E_Module *m) { Eina_List *files; char buf[PATH_MAX]; char *file; wiz_module = m; e_wizard_init(); e_config->scale.use_dpi = 0; e_config->scale.use_custom = 1; e_config->scale.factor = 1.2; e_scale_update(); snprintf(buf, sizeof(buf), "%s/%s", e_module_dir_get(m), MODULE_ARCH); files = ecore_file_ls(buf); files = eina_list_sort(files, 0, (Eina_Compare_Cb)_cb_sort_files); EINA_LIST_FREE(files, file) { if ((!strncmp(file, "page_", 5)) && (eina_str_has_extension(file, ".so"))) { void *handle; snprintf(buf, sizeof(buf), "%s/%s/%s", e_module_dir_get(m), MODULE_ARCH, file); handle = dlopen(buf, RTLD_NOW | RTLD_GLOBAL); if (handle) e_wizard_page_add(handle, dlsym(handle, "wizard_page_init"), dlsym(handle, "wizard_page_shutdown"), dlsym(handle, "wizard_page_show"), dlsym(handle, "wizard_page_hide"), dlsym(handle, "wizard_page_apply")); else { // if its an executable... // XXX // else... printf("%s\n", dlerror()); } } free(file); } e_wizard_go(); return m; }
EINTERN int e_scale_init(void) { e_scale_update(); return 1; }