Compare commits
9 Commits
master
...
devs/capta
Author | SHA1 | Date |
---|---|---|
|
2b4c7e0eed | 7 years ago |
|
e7f6227770 | 7 years ago |
|
7d1dfbcffc | 7 years ago |
|
8b00f9af0e | 7 years ago |
|
7dc4be14b6 | 7 years ago |
|
82bf1cefa2 | 7 years ago |
|
ac97b19b28 | 7 years ago |
|
eb80363aff | 7 years ago |
|
35b95519e1 | 7 years ago |
9 changed files with 107 additions and 9 deletions
@ -0,0 +1,17 @@ |
||||
if USE_MODULE_WL_EGLFS |
||||
wl_eglfsdir = $(MDIR)/wl_eglfs
|
||||
|
||||
wl_eglfspkgdir = $(MDIR)/wl_eglfs/$(MODULE_ARCH)
|
||||
wl_eglfspkg_LTLIBRARIES = src/modules/wl_eglfs/module.la
|
||||
|
||||
src_modules_wl_eglfs_module_la_DEPENDENCIES = $(MDEPENDENCIES)
|
||||
src_modules_wl_eglfs_module_la_CPPFLAGS = $(MOD_CPPFLAGS) @WL_EGLFS_CFLAGS@ @WAYLAND_CFLAGS@
|
||||
src_modules_wl_eglfs_module_la_LIBADD = $(LIBS) @WL_EGLFS_LIBS@ @WAYLAND_LIBS@
|
||||
src_modules_wl_eglfs_module_la_LDFLAGS = $(MOD_LDFLAGS)
|
||||
src_modules_wl_eglfs_module_la_SOURCES = src/modules/wl_eglfs/e_mod_main.c
|
||||
|
||||
# TODO: incomplete
|
||||
#.PHONY: wl_eglfs install-wl_eglfs
|
||||
#wl_eglfs: $(wl_eglfspkg_LTLIBRARIES) $(wl_eglfs_DATA)
|
||||
#install-wl_eglfs: install-wl_eglfsDATA install-wl_eglfspkgLTLIBRARIES
|
||||
endif |
@ -0,0 +1,62 @@ |
||||
#include "e.h" |
||||
#include <Ecore_Fb.h> |
||||
#include <Ecore_Wayland.h> |
||||
|
||||
E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_EGLFS" }; |
||||
|
||||
E_API void * |
||||
e_modapi_init(E_Module *m) |
||||
{ |
||||
Ecore_Evas *ee; |
||||
E_Screen *screen; |
||||
int w, h; |
||||
|
||||
printf("LOAD WL_EGLFS MODULE\n"); |
||||
e_util_env_set("HYBRIS_EGLPLATFORM", "hwcomposer"); |
||||
|
||||
/* try to init ecore_fb */ |
||||
if (!ecore_fb_init(NULL)) |
||||
{ |
||||
fprintf(stderr, "Could not initialize ecore_fb"); |
||||
return NULL; |
||||
} |
||||
|
||||
ecore_fb_size_get(&w, &h); |
||||
ee = ecore_evas_eglfs_new(NULL, 0, w, h); |
||||
|
||||
e_comp->ee = ee; |
||||
e_comp_gl_set(!!e_comp->ee); |
||||
|
||||
if (!e_xinerama_fake_screens_exist()) |
||||
{ |
||||
screen = E_NEW(E_Screen, 1); |
||||
screen->escreen = screen->screen = 0; |
||||
screen->x = 0; |
||||
screen->y = 0; |
||||
screen->w = w; |
||||
screen->h = h; |
||||
e_xinerama_screens_set(eina_list_append(NULL, screen)); |
||||
} |
||||
e_comp_wl_init(); |
||||
e_comp_canvas_init(w, h); |
||||
e_comp->pointer = e_pointer_canvas_new(e_comp->ee, EINA_TRUE); |
||||
|
||||
e_comp_wl_input_pointer_enabled_set(EINA_TRUE); |
||||
e_comp_wl_input_keyboard_enabled_set(EINA_TRUE); |
||||
e_comp_wl_input_touch_enabled_set(EINA_TRUE); |
||||
e_comp_wl_input_keymap_set(NULL, NULL, NULL); |
||||
|
||||
ecore_wl_init(NULL); |
||||
ecore_wl_server_mode_set(1); |
||||
e_util_env_set("HYBRIS_EGLPLATFORM", "wayland"); |
||||
return m; |
||||
} |
||||
|
||||
E_API int |
||||
e_modapi_shutdown(E_Module *m EINA_UNUSED) |
||||
{ |
||||
/* shutdown ecore_fb */ |
||||
ecore_fb_shutdown(); |
||||
|
||||
return 1; |
||||
} |
Loading…
Reference in new issue