2013-08-27 03:56:30 -07:00
|
|
|
#include "e.h"
|
|
|
|
#include <Ecore_Fb.h>
|
2015-10-26 07:11:54 -07:00
|
|
|
/* #include <Ecore_Wayland.h> */
|
2013-08-27 03:56:30 -07:00
|
|
|
|
2015-05-07 12:13:10 -07:00
|
|
|
E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_FB" };
|
2013-08-27 03:56:30 -07:00
|
|
|
|
2015-05-07 12:13:10 -07:00
|
|
|
E_API void *
|
2013-08-27 03:56:30 -07:00
|
|
|
e_modapi_init(E_Module *m)
|
|
|
|
{
|
|
|
|
Ecore_Evas *ee;
|
|
|
|
E_Screen *screen;
|
|
|
|
int w, h;
|
|
|
|
|
|
|
|
printf("LOAD WL_FB MODULE\n");
|
|
|
|
|
|
|
|
/* try to init ecore_x */
|
|
|
|
if (!ecore_fb_init(NULL))
|
|
|
|
{
|
|
|
|
fprintf(stderr, "Could not initialize ecore_fb");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
ecore_fb_size_get(&w, &h);
|
|
|
|
ee = ecore_evas_fb_new(NULL, 0, w, h);
|
2015-01-06 10:04:04 -08:00
|
|
|
|
2015-04-22 13:58:00 -07:00
|
|
|
e_comp->ee = ee;
|
2015-01-06 10:04:04 -08:00
|
|
|
|
2013-08-27 03:56:30 -07:00
|
|
|
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));
|
|
|
|
}
|
2016-07-26 10:00:33 -07:00
|
|
|
|
|
|
|
if (!e_comp_wl_init()) return NULL;
|
|
|
|
|
2015-04-22 16:27:36 -07:00
|
|
|
e_comp_canvas_init(w, h);
|
2015-04-22 13:58:00 -07:00
|
|
|
e_comp->pointer = e_pointer_canvas_new(e_comp->ee, EINA_TRUE);
|
2013-08-27 03:56:30 -07:00
|
|
|
|
2015-10-26 07:11:54 -07:00
|
|
|
/* ecore_wl_init(NULL); */
|
|
|
|
/* ecore_wl_server_mode_set(1); */
|
2013-08-27 03:56:30 -07:00
|
|
|
return m;
|
|
|
|
}
|
|
|
|
|
2015-05-07 12:13:10 -07:00
|
|
|
E_API int
|
2013-08-27 03:56:30 -07:00
|
|
|
e_modapi_shutdown(E_Module *m EINA_UNUSED)
|
|
|
|
{
|
|
|
|
/* shutdown ecore_x */
|
|
|
|
ecore_fb_shutdown();
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|