Ejemplo n.º 1
0
void app_init(void)
{
    app_mode = M_LOGO;
    app_running = 0;

    clock_init();
    alarm_init();
    logo_init();
}
Ejemplo n.º 2
0
void
create_view(void)
{
//    Window              win, ewin;
    Evas               *evas;
    Ecore_Evas * ee;
    int                 x, y, w, h, res;
    int                 maxcol;
    int                 engine;
    char               *fontdir;
    int                 font_cache, image_cache;
    char buf[4096];
    char *s;

    E_DB_INT_GET(shell->rcfile, "/main_win/win_x", x, res);
    ENGY_ASSERT(res);

    E_DB_INT_GET(shell->rcfile, "/main_win/win_y", y, res);
    ENGY_ASSERT(res);

    E_DB_INT_GET(shell->rcfile, "/main_win/win_w", w, res);
    ENGY_ASSERT(res);

    E_DB_INT_GET(shell->rcfile, "/main_win/win_h", h, res);
    ENGY_ASSERT(res);

    E_DB_STR_GET(shell->rcfile, "/aliases", (shell->aliases), res);
    ENGY_ASSERT(res);

    E_DB_INT_GET(shell->rcfile, "/maxcolors", maxcol, res);
    ENGY_ASSERT(res);

    E_DB_INT_GET(shell->rcfile, "/rendermethod", engine, res);
    ENGY_ASSERT(res);
    if (render_method != -1)
        engine = render_method;

    E_DB_INT_GET(shell->rcfile, "/maximagecache", image_cache, res);
    ENGY_ASSERT(res);

    E_DB_INT_GET(shell->rcfile, "/maxfontcache", font_cache, res);
    ENGY_ASSERT(res);
    
    E_DB_STR_GET(shell->rcfile, "/fontdir", s, res);
    ENGY_ASSERT(res);
    if (s[0] != '/')
    {
	snprintf(buf, 4000,"%s/%s", shell->home, s);
	imlib_add_path_to_font_path(buf);
	fontdir = DUP(buf);
    }
    else
    {
	imlib_add_path_to_font_path(s);
	fontdir = DUP(s);
    }
    FREE(s);
    
    
/*    win = ecore_window_new(0, x, y, w, h);
    ecore_window_set_events(win, XEV_CONFIGURE | XEV_KEY);
    
    evas = evas_new_all(ecore_display_get(),
                        win,
                        0,
                        0,
                        w, h, engine, maxcol, font_cache, image_cache, fontdir);
    ENGY_ASSERTS(evas, "evas_new");
    FREE(fontdir);
    evas_set_output_viewport(evas, 0, 0, w, h);
    ewin = evas_get_window(evas);
    ecore_window_set_events(ewin, XEV_EXPOSE | XEV_BUTTON | XEV_MOUSE_MOVE);
*/

    if (!ecore_x_init(NULL))
	    exit(-1);
	    //LOG_AND_RETURN (ERR_EFL);
    
    if (!ecore_evas_init())
	    exit(-1);
	    //LOG_AND_RETURN (ERR_EFL);
    
    ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 640, 480);
    
    if (!ee)
	    exit(-1);
	    //LOG_AND_RETURN (ERR_EFL);
    
    evas = ecore_evas_get(ee);
    evas_font_path_prepend(evas, fontdir);
    FREE(fontdir);
    ecore_evas_callback_delete_request_set(ee, engy_delete_request);
    ecore_evas_callback_pre_render_set(ee, engy_pre_rend);
    ecore_evas_callback_post_render_set(ee, engy_post_rend);
    ecore_evas_callback_resize_set(ee, engy_resize);
    ecore_evas_name_class_set(ee, "engy", "main");
    ecore_evas_show(ee);
    
    _get_title_dcd();

    shell->title = my_iconv(shell->title_dcd, TITLE);
    ecore_evas_title_set(ee, shell->title);

    shell->evas = evas;
    shell->win = ecore_evas_software_x11_window_get(ee);
    shell->ee = ee;
    shell->w = w;
    shell->h = h;

    // GLS
//    ecore_set_blank_pointer(win);
//    ecore_window_set_title(win, shell->title);
//  my_evas_init();
    _shell_bg_create();
    menu_init();
    // GLS
    engy_cl_init();
    cl_configure(w, h);
    log_init();
    info_init();
    info_sync();
    panel_init();
    pointer_init();
    serv_init();
    logo_init();
    alias_init();
//    evas_render(shell->evas);
}