2 * gcc -o web_example_01 web_example_01.c `pkg-config --cflags --libs elementary ewebkit` -D_GNU_SOURCE
6 #include <Elementary.h>
7 #ifdef HAVE_ELEMENTARY_WEB
11 #define URL "http://www.enlightenment.org"
14 elm_main(int argc, char *argv[])
16 Evas_Object *win, *web;
18 /* The program will proceed only if Ewebkit library is available. */
19 if (elm_need_web() == EINA_FALSE)
22 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
25 win = elm_win_add(NULL, "Elementary Webkit Widget", ELM_WIN_BASIC);
26 elm_win_autodel_set(win, EINA_TRUE);
27 evas_object_resize(win, 720, 600);
28 evas_object_show(win);
31 web = elm_web_add(win);
32 evas_object_size_hint_weight_set(web, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
33 elm_web_window_create_hook_set(web, NULL, NULL);
34 elm_win_resize_object_add(win, web);
35 elm_web_history_enabled_set(web, EINA_FALSE);
37 if (!elm_web_uri_set(web, URL))
39 printf("URL NOT LOADED");
42 evas_object_show(web);