parent
75ff919036
commit
cafb46953b
5 changed files with 79 additions and 0 deletions
@ -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…
Reference in new issue