Changes between Version 2 and Version 3 of EFLSettingsApiTutorial


Ignore:
Timestamp:
Sep 30, 2012, 9:46:47 AM (13 years ago)
Author:
kubaczkam@gmail.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • EFLSettingsApiTutorial

    v2 v3  
    3939[[Image(http://i.imgur.com/iwmWe.png)]]
    4040
     41=== Example of use ===
     42
     43{{{
     44int main(int argc, char *argv[])
     45{
     46char *theme = NULL;
     47char *themePath = NULL;
     48char *tmp;
     49char path[PATH_MAX];
     50(...)
     51themePath = findThemePath(theme);
     52if (!themePath)
     53        return quit(EINA_FALSE, "ERROR: could not find theme.\n");
     54ewk_init();
     55tmp = getenv("TMPDIR");
     56if (!tmp)
     57tmp = "/tmp";
     58snprintf(path, sizeof(path), "%s/.ewebkit-%u", tmp, getuid());
     59if (!ecore_file_mkpath(path))
     60return quit(EINA_FALSE, "ERROR: could not create settings database directory.\n");
     61
     62ewk_settings_repaint_throttling_set( 0.1,   2,   10,   1 )//for heavy level
     63if (ewk_settings_icon_database_path_set(path)==EINA_FALSE)
     64        return quit(EINA_FALSE, "ERROR: Icon database already open.\n");
     65ewk_settings_web_database_path_set(path);
     66browserCreate(url, themePath, userAgent, geometry, engine, backingStore, isFlattening, isFullscreen, path);
     67ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, main_signal_exit, &windows);
     68ecore_main_loop_begin();
     69ewk_shutdown();
     70return quit(EINA_TRUE, NULL);
     71}
     72}}}
     73
     74Example is based on the Tools/EWebLauncher/main.c. Api elements which were used:
     75[[BR]]
     76'''ewk_settings_repaint_throttling_set()'''– sets value for the repaint throttling,it gives possibility of setting slow loading of page in case of having a content with css/gif animationts, in example arguments are adjusted to heavy level, for lighter level the arguments are proportionally fewer
     77[[BR]]
     78'''ewk_settings_icon_database_path_set()''' – sets current path to the icon database
     79[[BR]]
     80'''ewk_settings_web_database_path_set()''' – sets current path to the Web database
     81
     82