/* externally accessible functions */ int main(int argc, char **argv) { int i; for (i = 1; i < argc; i++) { if ((!strcmp(argv[i], "-h")) || (!strcmp(argv[i], "-help")) || (!strcmp(argv[i], "--help"))) { printf( "This is an internal tool for Enlightenment.\n" "do not use it.\n" ); exit(0); } else if (!strncmp(argv[i], "--nice=", 7)) { const char *val; int ret = 0; val = argv[i] + 7; if (*val) ret = nice(atoi(val)); } } ecore_init(); ecore_app_args_set(argc, (const char **)argv); eet_init(); evas_init(); ecore_evas_init(); edje_init(); ecore_file_init(); ecore_ipc_init(); e_user_dir_concat_static(_thumbdir, "fileman/thumbnails"); ecore_file_mkpath(_thumbdir); if (_e_ipc_init()) ecore_main_loop_begin(); if (_e_ipc_server) { ecore_ipc_server_del(_e_ipc_server); _e_ipc_server = NULL; } ecore_ipc_shutdown(); ecore_file_shutdown(); ecore_evas_shutdown(); edje_shutdown(); evas_shutdown(); eet_shutdown(); ecore_shutdown(); return 0; }
/* local functions */ static void _e_mod_kbd_device_ignore_load(void) { char buff[PATH_MAX]; /* load the 'ignore' file from the user's home dir */ e_user_dir_concat_static(buff, "keyboards/ignore_built_in_keyboards"); _e_mod_kbd_device_ignore_load_file(buff); /* load the 'ignore' file from the system/module dir */ snprintf(buff, sizeof(buff), "%s/ignore_built_in_keyboards", _e_illume_mod_dir); _e_mod_kbd_device_ignore_load_file(buff); }
/* externally accessible functions */ EAPI void e_startup(E_Startup_Mode mode) { char buf[PATH_MAX]; if (mode == E_STARTUP_START) { e_user_dir_concat_static(buf, "applications/startup/.order"); if (!ecore_file_exists(buf)) e_prefix_data_concat_static(buf, "data/applications/startup/.order"); } else if (mode == E_STARTUP_RESTART) { e_user_dir_concat_static(buf, "applications/restart/.order"); if (!ecore_file_exists(buf)) e_prefix_data_concat_static(buf, "data/applications/restart/.order"); } desktop_cache_update_handler = ecore_event_handler_add(EFREET_EVENT_DESKTOP_CACHE_BUILD, _e_startup_event_cb, strdup(buf)); e_init_undone(); }
EINTERN int e_icon_init(void) { #ifdef USE_ICON_CACHE Eet_File *ef; char buf[PATH_MAX]; #undef T #undef D #define T Cache_Item #define D cache_item_edd D = E_CONFIG_DD_NEW("Cache_Item", T); E_CONFIG_VAL(D, T, timestamp, UINT); #undef T #undef D #define T Cache #define D cache_edd D = E_CONFIG_DD_NEW("Cache", T); E_CONFIG_HASH(D, T, hash, cache_item_edd); #undef T #undef D e_user_dir_concat_static(buf, "icon_cache.eet"); ef = eet_open(buf, EET_FILE_MODE_READ_WRITE); if (!ef) return 1; /* not critical */ _cache = eet_data_read(ef, cache_edd, "idx"); if (!_cache) _cache = E_NEW(Cache, 1); if (!_cache->hash) _cache->hash = eina_hash_string_superfast_new(_e_icon_cache_item_free); eet_close(ef); _cache->file = strdup(buf); _cache->ef = NULL; #endif return 1; }
static void _write_bodhi_desktops(void) { FILE *f; char buf[PATH_MAX]; e_user_dir_concat_static(buf, "applications/bar/default"); ecore_file_mkpath(buf); e_user_dir_concat_static(buf, "applications/bar/default/.order"); f = fopen(buf, "w"); if (f) { fprintf(f, "midori.desktop\n"); fprintf(f, "pcmanfm.desktop\n"); fprintf(f, "ubiquity-gtkui.desktop\n"); fprintf(f, "lxterminal.desktop\n"); fclose(f); } FILE *g; char bam[PATH_MAX]; e_user_dir_concat_static(bam, "applications/bar/engage"); ecore_file_mkpath(bam); e_user_dir_concat_static(bam, "applications/bar/engage/.order"); g = fopen(bam, "w"); if (g) { fprintf(g, "midori.desktop\n"); fprintf(g, "pcmanfm.desktop\n"); fprintf(g, "ubiquity-gtkui.desktop\n"); fprintf(g, "lxterminal.desktop\n"); fclose(g); } FILE *h; char bark[PATH_MAX]; e_user_dir_concat_static(bark, "applications/bar/tablet"); ecore_file_mkpath(bark); e_user_dir_concat_static(bark, "applications/bar/tablet/.order"); h = fopen(bark, "w"); if (h) { fprintf(h, "scale.desktop\n"); fprintf(h, "ubiquity-gtkui.desktop\n"); fclose(h); } }