summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac13
-rw-r--r--src/bin/e_comp.c3
-rw-r--r--src/bin/e_comp_wl.c1
-rw-r--r--src/bin/e_module.c1
-rw-r--r--src/modules/Makefile.mk2
-rw-r--r--src/modules/Makefile_wl_eglfs.mk17
-rw-r--r--src/modules/wl_eglfs/e_mod_main.c62
7 files changed, 99 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c602f3de8..abd28773e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -755,6 +755,17 @@ define([CHECK_MODULE_WL_FB],
755]) 755])
756AM_CONDITIONAL([HAVE_WL_FB], [test "x${WL_FB}" = "xtrue"]) 756AM_CONDITIONAL([HAVE_WL_FB], [test "x${WL_FB}" = "xtrue"])
757 757
758WL_EGLFS=false
759define([CHECK_MODULE_WL_EGLFS],
760[
761 if test "x${have_wayland}" = "xyes" ; then
762 AC_E_CHECK_PKG(WL_EGLFS, [ ecore-fb >= $efl_version ecore >= $efl_version eina >= $efl_version ], [WL_EGLFS=true], [WL_EGLFS=false])
763 else
764 WL_EGLFS=false
765 fi
766])
767AM_CONDITIONAL([HAVE_WL_EGLFS], [test "x${WL_EGLFS}" = "xtrue"])
768
758WL_DRM=false 769WL_DRM=false
759define([CHECK_MODULE_WL_DRM], 770define([CHECK_MODULE_WL_DRM],
760[ 771[
@@ -854,9 +865,11 @@ AC_E_OPTIONAL_MODULE([wl_desktop_shell], $have_wayland_dep)
854AC_E_OPTIONAL_MODULE([wl_x11], $have_wayland_dep, [CHECK_MODULE_WL_X11]) 865AC_E_OPTIONAL_MODULE([wl_x11], $have_wayland_dep, [CHECK_MODULE_WL_X11])
855AC_E_OPTIONAL_MODULE([wl_wl], $have_wayland_dep) 866AC_E_OPTIONAL_MODULE([wl_wl], $have_wayland_dep)
856#AC_E_OPTIONAL_MODULE([wl_fb], $have_wayland_dep, [CHECK_MODULE_WL_FB]) 867#AC_E_OPTIONAL_MODULE([wl_fb], $have_wayland_dep, [CHECK_MODULE_WL_FB])
868AC_E_OPTIONAL_MODULE([wl_eglfs], $have_wayland, [CHECK_MODULE_WL_EGLFS])
857AC_E_OPTIONAL_MODULE([wl_drm], $have_wayland_dep, [CHECK_MODULE_WL_DRM]) 869AC_E_OPTIONAL_MODULE([wl_drm], $have_wayland_dep, [CHECK_MODULE_WL_DRM])
858AC_E_OPTIONAL_MODULE([wl_text_input], $have_wayland_dep) 870AC_E_OPTIONAL_MODULE([wl_text_input], $have_wayland_dep)
859AC_E_OPTIONAL_MODULE([wl_weekeyboard], $have_wayland_dep) 871AC_E_OPTIONAL_MODULE([wl_weekeyboard], $have_wayland_dep)
872
860AC_E_OPTIONAL_MODULE([policy_mobile], true) 873AC_E_OPTIONAL_MODULE([policy_mobile], true)
861AC_E_OPTIONAL_MODULE([geolocation], true) 874AC_E_OPTIONAL_MODULE([geolocation], true)
862AC_E_OPTIONAL_MODULE([xwayland], $have_wayland_dep, [CHECK_MODULE_XWAYLAND]) 875AC_E_OPTIONAL_MODULE([xwayland], $have_wayland_dep, [CHECK_MODULE_XWAYLAND])
diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
index 4247099fb..839dcff15 100644
--- a/src/bin/e_comp.c
+++ b/src/bin/e_comp.c
@@ -1129,6 +1129,9 @@ e_comp_init(void)
1129#ifdef USE_MODULE_WL_DRM 1129#ifdef USE_MODULE_WL_DRM
1130 "wl_drm", 1130 "wl_drm",
1131#endif 1131#endif
1132#ifdef HAVE_WL_EGLFS
1133 "wl_eglfs",
1134#endif
1132/* probably add other engines here; fb should be last? */ 1135/* probably add other engines here; fb should be last? */
1133#ifdef USE_MODULE_WL_FB 1136#ifdef USE_MODULE_WL_FB
1134 "wl_fb", 1137 "wl_fb",
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 53a107f27..8a8b69dc6 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -2598,6 +2598,7 @@ e_comp_wl_init(void)
2598 2598
2599 /* set gl available if we have ecore_evas support */ 2599 /* set gl available if we have ecore_evas support */
2600 if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_WAYLAND_EGL) || 2600 if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_WAYLAND_EGL) ||
2601 ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_EGLFS) ||
2601 ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_DRM)) 2602 ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_DRM))
2602 e_comp_gl_set(EINA_TRUE); 2603 e_comp_gl_set(EINA_TRUE);
2603 2604
diff --git a/src/bin/e_module.c b/src/bin/e_module.c
index 25ec3a7b1..9806c75bb 100644
--- a/src/bin/e_module.c
+++ b/src/bin/e_module.c
@@ -1032,6 +1032,7 @@ _e_module_whitelist_check(void)
1032 "wl_x11", 1032 "wl_x11",
1033 "wl_wl", 1033 "wl_wl",
1034 "wl_drm", 1034 "wl_drm",
1035 "wl_eglfs",
1035 "wl_shell", 1036 "wl_shell",
1036 "wl_desktop_shell", 1037 "wl_desktop_shell",
1037 "xkbswitch", 1038 "xkbswitch",
diff --git a/src/modules/Makefile.mk b/src/modules/Makefile.mk
index 0962f9ee9..c08c99836 100644
--- a/src/modules/Makefile.mk
+++ b/src/modules/Makefile.mk
@@ -112,6 +112,8 @@ include src/modules/Makefile_wl_drm.mk
112 112
113include src/modules/Makefile_wl_wl.mk 113include src/modules/Makefile_wl_wl.mk
114 114
115include src/modules/Makefile_wl_eglfs.mk
116
115include src/modules/Makefile_wl_desktop_shell.mk 117include src/modules/Makefile_wl_desktop_shell.mk
116 118
117include src/modules/Makefile_wl_x11.mk 119include src/modules/Makefile_wl_x11.mk
diff --git a/src/modules/Makefile_wl_eglfs.mk b/src/modules/Makefile_wl_eglfs.mk
new file mode 100644
index 000000000..a29b97f63
--- /dev/null
+++ b/src/modules/Makefile_wl_eglfs.mk
@@ -0,0 +1,17 @@
1if USE_MODULE_WL_EGLFS
2wl_eglfsdir = $(MDIR)/wl_eglfs
3
4wl_eglfspkgdir = $(MDIR)/wl_eglfs/$(MODULE_ARCH)
5wl_eglfspkg_LTLIBRARIES = src/modules/wl_eglfs/module.la
6
7src_modules_wl_eglfs_module_la_DEPENDENCIES = $(MDEPENDENCIES)
8src_modules_wl_eglfs_module_la_CPPFLAGS = $(MOD_CPPFLAGS) @WL_EGLFS_CFLAGS@ @WAYLAND_CFLAGS@
9src_modules_wl_eglfs_module_la_LIBADD = $(LIBS) @WL_EGLFS_LIBS@ @WAYLAND_LIBS@
10src_modules_wl_eglfs_module_la_LDFLAGS = $(MOD_LDFLAGS)
11src_modules_wl_eglfs_module_la_SOURCES = src/modules/wl_eglfs/e_mod_main.c
12
13# TODO: incomplete
14#.PHONY: wl_eglfs install-wl_eglfs
15#wl_eglfs: $(wl_eglfspkg_LTLIBRARIES) $(wl_eglfs_DATA)
16#install-wl_eglfs: install-wl_eglfsDATA install-wl_eglfspkgLTLIBRARIES
17endif
diff --git a/src/modules/wl_eglfs/e_mod_main.c b/src/modules/wl_eglfs/e_mod_main.c
new file mode 100644
index 000000000..5c2470def
--- /dev/null
+++ b/src/modules/wl_eglfs/e_mod_main.c
@@ -0,0 +1,62 @@
1#include "e.h"
2#include <Ecore_Fb.h>
3#include <Ecore_Wayland.h>
4
5E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_EGLFS" };
6
7E_API void *
8e_modapi_init(E_Module *m)
9{
10 Ecore_Evas *ee;
11 E_Screen *screen;
12 int w, h;
13
14 printf("LOAD WL_EGLFS MODULE\n");
15 e_util_env_set("HYBRIS_EGLPLATFORM", "fbdev");
16
17 /* try to init ecore_fb */
18 if (!ecore_fb_init(NULL))
19 {
20 fprintf(stderr, "Could not initialize ecore_fb");
21 return NULL;
22 }
23
24 ecore_fb_size_get(&w, &h);
25 ee = ecore_evas_eglfs_new(NULL, 0, w, h);
26
27 e_comp->ee = ee;
28 e_comp_gl_set(!!e_comp->ee);
29
30 if (!e_xinerama_fake_screens_exist())
31 {
32 screen = E_NEW(E_Screen, 1);
33 screen->escreen = screen->screen = 0;
34 screen->x = 0;
35 screen->y = 0;
36 screen->w = w;
37 screen->h = h;
38 e_xinerama_screens_set(eina_list_append(NULL, screen));
39 }
40 e_comp_wl_init();
41 e_comp_canvas_init(w, h);
42 e_comp->pointer = e_pointer_canvas_new(e_comp->ee, EINA_TRUE);
43
44 e_comp_wl_input_pointer_enabled_set(EINA_TRUE);
45 e_comp_wl_input_keyboard_enabled_set(EINA_TRUE);
46 e_comp_wl_input_touch_enabled_set(EINA_TRUE);
47 e_comp_wl_input_keymap_set(NULL, NULL, NULL);
48
49 ecore_wl_init(NULL);
50 ecore_wl_server_mode_set(1);
51 e_util_env_set("HYBRIS_EGLPLATFORM", "wayland");
52 return m;
53}
54
55E_API int
56e_modapi_shutdown(E_Module *m EINA_UNUSED)
57{
58 /* shutdown ecore_fb */
59 ecore_fb_shutdown();
60
61 return 1;
62}