ewebkit2  1.11.0
Web engine based on WebKit2 for EFL
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
EWebKit2

What is EWebKit2?

This is the web engine for the Enlightenment Foundation Libraries, which is based on WebKit(especially WebKit2).

EWebKit2 is based on Eina, Ecore and Evas. (EWebKit2 does not require Elementary. If you want to use ewebkit2 in Elementary, consider to use elm_web)

And, ewebkit2 may require glib (for internal purpose) because it depends on several glib based components such as libsoup, gstreamer... (at least now).

Getting Started.

Like other EFL libraries, ewebkit2 also has ewk_init() and ewk_shutdown().

You should call ewk_init() before using ewebkit APIs and ewk_shudown() before finishing the process.

#include <EWebKit2.h>
int main(int argc, char **argv)
{
// create window(s) and ewk_view here and do what you want including event loop.
return 0;
}

To compile your application with ewebkit2, you should compile with like below.

gcc sample.c `pkg-config --cflags --libs ewebkit2`

If you are using CMake, you can include below in your CMakeLists.txt.

find_package(EWebKit2 REQUIRED)

Below example is simple application which loads enlightenment.org.

// gcc simple.c `pkg-config --cflags --libs ecore-evas ewebkit2`
#include <Evas.h>
#include <Ecore_Evas.h>
#include <EWebKit2.h>
int main()
{
Evas *evas;
Ecore_Evas *win;
Evas_Object *ewk;
evas_init();
ecore_init();
ecore_evas_init();
win = ecore_evas_new(NULL, 0, 0, 800, 600, NULL);
evas = ecore_evas_get(win);
ecore_evas_show(win);
ewk = ewk_view_add(evas);
ewk_view_url_set(ewk, "http://enlightenment.org");
evas_object_move(ewk, 0, 0);
evas_object_resize(ewk, 800, 600);
evas_object_show(ewk);
ecore_main_loop_begin();
ecore_evas_shutdown();
ecore_shutdown();
evas_shutdown();
return 0;
}