add wl_buffer output module

devs/bu5hm4n/luncher_verbose
Mike Blumenkrantz 6 years ago
parent 75ff919036
commit cafb46953b
  1. 12
      configure.ac
  2. 2
      src/bin/e_module.c
  3. 2
      src/modules/Makefile.mk
  4. 17
      src/modules/Makefile_wl_buffer.mk
  5. 46
      src/modules/wl_buffer/e_mod_main.c

@ -760,6 +760,17 @@ define([CHECK_MODULE_WL_WL],
])
AM_CONDITIONAL([HAVE_WL_WL], [test "x${WL_WL}" = "xtrue"])
WL_BUFFER=false
define([CHECK_MODULE_WL_BUFFER],
[
if test "x${have_wayland}" = "xyes"; then
WL_BUFFER=true
else
WL_BUFFER=false
fi
])
AM_CONDITIONAL([HAVE_WL_BUFFER], [test "x${WL_BUFFER}" = "xtrue"])
WL_DESKTOP_SHELL=false
define([CHECK_MODULE_WL_DESKTOP_SHELL],
[
@ -893,6 +904,7 @@ AC_E_OPTIONAL_MODULE([packagekit], true)
AC_E_OPTIONAL_MODULE([wl_desktop_shell], $have_wayland_dep)
AC_E_OPTIONAL_MODULE([wl_x11], $have_wayland_dep, [CHECK_MODULE_WL_X11])
AC_E_OPTIONAL_MODULE([wl_wl], $have_wayland_dep)
AC_E_OPTIONAL_MODULE([wl_buffer], $have_wayland_dep)
#AC_E_OPTIONAL_MODULE([wl_fb], $have_wayland_dep, [CHECK_MODULE_WL_FB])
AC_E_OPTIONAL_MODULE([wl_drm], $have_wayland_dep, [CHECK_MODULE_WL_DRM])
AC_E_OPTIONAL_MODULE([wl_text_input], $have_wayland_dep)

@ -154,6 +154,7 @@ _module_is_important(const char *name)
const char *list[] =
{
"xwayland",
"wl_buffer",
"wl_desktop_shell",
"wl_drm",
"wl_fb",
@ -1043,6 +1044,7 @@ _e_module_whitelist_check(void)
"winlist",
"wireless",
"wizard",
"wl_buffer",
"wl_desktop_shell",
"wl_x11",
"wl_wl",

@ -113,6 +113,8 @@ include src/modules/Makefile_packagekit.mk
include src/modules/Makefile_wl_drm.mk
include src/modules/Makefile_wl_buffer.mk
include src/modules/Makefile_wl_wl.mk
include src/modules/Makefile_wl_desktop_shell.mk

@ -0,0 +1,17 @@
if USE_MODULE_WL_BUFFER
wl_bufferdir = $(MDIR)/wl_buffer
wl_bufferpkgdir = $(MDIR)/wl_buffer/$(MODULE_ARCH)
wl_bufferpkg_LTLIBRARIES = src/modules/wl_buffer/module.la
src_modules_wl_buffer_module_la_DEPENDENCIES = $(MDEPENDENCIES)
src_modules_wl_buffer_module_la_CPPFLAGS = $(MOD_CPPFLAGS) @WAYLAND_CFLAGS@
src_modules_wl_buffer_module_la_LIBADD = $(MOD_LIBS) @WAYLAND_LIBS@
src_modules_wl_buffer_module_la_LDFLAGS = $(MOD_LDFLAGS)
src_modules_wl_buffer_module_la_SOURCES = \
src/modules/wl_buffer/e_mod_main.c
PHONIES += wl_buffer install-wl_buffer
wl_buffer: $(wl_bufferpkg_LTLIBRARIES) $(wl_buffer_DATA)
install-wl_buffer: install-wl_bufferpkgLTLIBRARIES
endif

@ -0,0 +1,46 @@
#include "e.h"
E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_Buffer" };
E_API void *
e_modapi_init(E_Module *m)
{
char *bsize;
int w = 1024, h = 768;
printf("LOAD Wl_Buffer MODULE\n");
bsize = getenv("E_WL_SIZE");
if (bsize)
sscanf(bsize, "%dx%d", &w, &h);
e_comp->ee = ecore_evas_buffer_new(w, h);
if (!e_comp->ee)
{
ERR("Could not create ecore_evas canvas");
return NULL;
}
e_comp_gl_set(EINA_FALSE);
elm_config_accel_preference_set("none");
elm_config_accel_preference_override_set(EINA_TRUE);
ecore_evas_data_set(e_comp->ee, "comp", e_comp);
EINA_SAFETY_ON_TRUE_RETURN_VAL(!e_comp_wl_init(), NULL);
EINA_SAFETY_ON_TRUE_RETURN_VAL(!e_comp_canvas_init(1024, 768), NULL);
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->pointer = */
/* e_pointer_window_new(ecore_evas_window_get(e_comp->ee), EINA_TRUE); */
e_comp->pointer = e_pointer_canvas_new(e_comp->ee, EINA_TRUE);
e_comp->pointer->color = EINA_TRUE;
e_comp_wl->dmabuf_disable = EINA_TRUE;
ecore_evas_pointer_xy_get(e_comp->ee, &e_comp_wl->ptr.x,
&e_comp_wl->ptr.y);
evas_event_feed_mouse_in(e_comp->evas, 0, NULL);
return m;
}
Loading…
Cancel
Save