Running EFL applications under Wayland based on Ubuntu 14.04 : elm example

For correct functionality when running under Wayland you must use the latest versions of all the EFL components under Wayland. As a precursor to these steps you must have downloaded and compiled Wayland as per the building instructions.

example codes

#include <Elementary.h>

static void
on_click(void *data, Evas_Object *obj, void *event_info)
{
   evas_object_del(data);
}

EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win, *btn;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("Main", "Hello, World!");
   evas_object_resize(win, 1920, 1080);
   elm_win_autodel_set(win, EINA_TRUE);

   btn = elm_button_add(win);
   elm_object_text_set(btn, "Goodbye Cruel World");
   elm_win_resize_object_add(win, btn);
   evas_object_smart_callback_add(btn, "clicked", on_click, win);
   evas_object_show(btn);

   evas_object_show(win);

   elm_run();

   return 0;
}
ELM_MAIN()

compile command

source env.sh
gcc -o elm elm.c pkg-config --cflags --libs elementary

start weston

weston &

run example

./elm

elm

notes

Running EFL applications under Wayland
For applications that use Ecore_Evas directly set the environment variable ECORE_EVAS_ENGINE to either wayland_shm or wayland_egl depending on whether you wish to use the SHM based interface with software rendering or use EGL.

For applications that use Elementary set the environment variable ELM_DISPLAY to wl. You may also set the environment variable ELM_ACCEL to none to use software rendering, or to gl to use hardware accelerated rendering.

For more debug info, please set:
export MESA_DEBUG=1
export EGL_LOG_LEVEL=debug
export LIBGL_DEBUG=verbose
export WAYLAND_DEBUG=1

Subscribe to Post, Code and Quiet Time.

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe