}
EAPI int
-_evas_module_engine_inherit(Evas_Func *funcs, char *name)
+_evas_module_engine_inherit(Evas_Func *funcs, char *name, size_t info)
{
Evas_Module *em;
evas_module_ref(em);
evas_module_use(em);
*funcs = *((Evas_Func *)(em->functions));
+ funcs->info_size = info;
return 1;
}
}
EAPI void evas_module_task_unregister(void);
// expose for use in engines
-EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name);
+EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name, size_t info);
EAPI const char *_evas_module_libdir_get(void);
const char *_evas_module_datadir_get(void);
EAPI Eina_List *_evas_canvas_image_data_unset(Evas *eo_e);
{
if (!em) return 0;
/* get whatever engine module we inherit from */
- if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+ if (!_evas_module_engine_inherit(&pfunc, "software_generic", sizeof (Evas_Engine_Info_Buffer))) return 0;
_evas_engine_buffer_log_dom = eina_log_domain_register
("evas-buffer", EINA_COLOR_BLUE);
ORD(canvas_alpha_get);
ORD(output_free);
- func.info_size = sizeof (Evas_Engine_Info_Buffer);
-
/* now advertise out own api */
em->functions = (void *)(&func);
return 1;
if (!em) return 0;
/* try to inherit functions from software_generic engine */
- if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+ if (!_evas_module_engine_inherit(&pfunc, "software_generic", sizeof (Evas_Engine_Info_Drm))) return 0;
/* try to create eina logging domain */
- _evas_engine_drm_log_dom =
+ _evas_engine_drm_log_dom =
eina_log_domain_register("evas-drm", EVAS_DEFAULT_LOG_COLOR);
/* if we could not create a logging domain, error out */
EVAS_API_OVERRIDE(image_plane_assign, &func, eng_);
EVAS_API_OVERRIDE(image_plane_release, &func, eng_);
- func.info_size = sizeof (Evas_Engine_Info_Drm);
-
/* advertise our engine functions */
em->functions = (void *)(&func);
return 1;
}
-static void
+static void
module_close(Evas_Module *em EINA_UNUSED)
{
/* unregister the eina log domain for this engine */
if (!em) return 0;
/* get whatever engine module we inherit from */
- if (!_evas_module_engine_inherit(&pfunc, "gl_generic")) return 0;
+ if (!_evas_module_engine_inherit(&pfunc, "gl_generic", sizeof (Evas_Engine_Info_Eglfs))) return 0;
/* try to create eina logging domain */
if (_evas_engine_eglfs_log_dom < 0)
EVAS_API_OVERRIDE(output_dump, &func, eng_);
EVAS_API_OVERRIDE(image_native_set, &func, eng_);
- func.info_size = sizeof (Evas_Engine_Info_Eglfs);
-
setenv("EGL_PLATFORM", "fbdev", 1);
gl_symbols();
{
if (!em) return 0;
/* get whatever engine module we inherit from */
- if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+ if (!_evas_module_engine_inherit(&pfunc, "software_generic", sizeof (Evas_Engine_Info_FB))) return 0;
_evas_engine_fb_log_dom = eina_log_domain_register
("evas-fb", EVAS_DEFAULT_LOG_COLOR);
if (_evas_engine_fb_log_dom < 0)
ORD(canvas_alpha_get);
ORD(output_free);
- func.info_size = sizeof (Evas_Engine_Info_FB);
-
/* now advertise out own api */
em->functions = (void *)(&func);
return 1;
if (!em) return 0;
/* get whatever engine module we inherit from */
- if (!_evas_module_engine_inherit(&pfunc, "gl_generic")) return 0;
+ if (!_evas_module_engine_inherit(&pfunc, "gl_generic", sizeof (Evas_Engine_Info_GL_Cocoa))) return 0;
if (_evas_engine_gl_cocoa_log_dom < 0)
{
ORD(canvas_alpha_get);
ORD(output_free);
- func.info_size = sizeof (Evas_Engine_Info_GL_Cocoa);
-
_gl_symbols();
/* now advertise out own api */
if (!em) return 0;
/* get whatever engine module we inherit from */
- if (!_evas_module_engine_inherit(&pfunc, "gl_generic")) return 0;
+ if (!_evas_module_engine_inherit(&pfunc, "gl_generic", sizeof (Evas_Engine_Info_GL_Drm))) return 0;
/* try to create eina logging domain */
if (_evas_engine_gl_drm_log_dom < 0)
EVAS_API_OVERRIDE(image_plane_assign, &func, eng_);
EVAS_API_OVERRIDE(image_plane_release, &func, eng_);
- func.info_size = sizeof (Evas_Engine_Info_GL_Drm);
-
/* Mesa's EGL driver loads wayland egl by default. (called by eglGetProcaddr() )
* implicit env set (EGL_PLATFORM=drm) prevent that. */
setenv("EGL_PLATFORM", "drm", 1);
if (!em) return 0;
if (!evas_gl_common_module_open()) return 0;
/* get whatever engine module we inherit from */
- if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+ if (!_evas_module_engine_inherit(&pfunc, "software_generic", 0)) return 0;
if (_evas_engine_GL_log_dom < 0)
_evas_engine_GL_log_dom = eina_log_domain_register("evas-gl_generic", EVAS_DEFAULT_LOG_COLOR);
if (_evas_engine_GL_log_dom < 0)
{
if (!em) return 0;
/* get whatever engine module we inherit from */
- if (!_evas_module_engine_inherit(&pfunc, "gl_generic")) return 0;
+ if (!_evas_module_engine_inherit(&pfunc, "gl_generic", sizeof (Evas_Engine_Info_GL_SDL))) return 0;
if (_evas_engine_GL_SDL_log_dom < 0)
_evas_engine_GL_SDL_log_dom = eina_log_domain_register
("evas-gl_sdl", EVAS_DEFAULT_LOG_COLOR);
ORD(output_free);
ORD(output_dump);
- func.info_size = sizeof (Evas_Engine_Info_GL_SDL);
-
gl_symbols();
/* now advertise out own api */
}
if (!em) return 0;
/* get whatever engine module we inherit from */
- if (!_evas_module_engine_inherit(&pfunc, "gl_generic")) return 0;
+ if (!_evas_module_engine_inherit(&pfunc, "gl_generic", sizeof (Evas_Engine_Info_GL_X11))) return 0;
if (_evas_engine_GL_X11_log_dom < 0)
_evas_engine_GL_X11_log_dom = eina_log_domain_register
("evas-gl_x11", EVAS_DEFAULT_LOG_COLOR);
// gl_current_surface_get is in gl generic
ORD(gl_current_context_get);
- func.info_size = sizeof (Evas_Engine_Info_GL_X11);
-
if (!(platform_env = getenv("EGL_PLATFORM")))
setenv("EGL_PLATFORM", "x11", 0);
{
if (!em) return 0;
/* get whatever engine module we inherit from */
- if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+ if (!_evas_module_engine_inherit(&pfunc, "software_generic", sizeof (Evas_Engine_Info_PSL1GHT))) return 0;
_evas_engine_psl1ght_log_dom = eina_log_domain_register
("evas-psl1ght", EVAS_DEFAULT_LOG_COLOR);
if (_evas_engine_psl1ght_log_dom < 0)
ORD(output_flush);
ORD(output_idle_flush);
- func.info_size = sizeof (Evas_Engine_Info_PSL1GHT);
-
/* now advertise out own api */
em->functions = (void *)(&func);
return 1;
{
if (!em) return 0;
/* get whatever engine module we inherit from */
- if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+ if (!_evas_module_engine_inherit(&pfunc, "software_generic", sizeof (Evas_Engine_Info_Software_DDraw))) return 0;
_evas_log_dom_module = eina_log_domain_register
("evas-software_ddraw", EVAS_DEFAULT_LOG_COLOR);
if (_evas_log_dom_module < 0)
ORD(canvas_alpha_get);
ORD(output_free);
- func.info_size = sizeof (Evas_Engine_Info_Software_DDraw);
-
/* now advertise out own api */
em->functions = (void *)(&func);
return 1;
{
if (!em) return 0;
/* get whatever engine module we inherit from */
- if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+ if (!_evas_module_engine_inherit(&pfunc, "software_generic", sizeof (Evas_Engine_Info_Software_Gdi))) return 0;
_evas_engine_soft_gdi_log_dom = eina_log_domain_register
("evas-software_gdi", EVAS_DEFAULT_LOG_COLOR);
ORD(canvas_alpha_get);
ORD(output_free);
- func.info_size = sizeof (Evas_Engine_Info_Software_Gdi);
/* now advertise out own api */
em->functions = (void *)(&func);
return 1;
if (!em) return 0;
/* get whatever engine module we inherit from */
- if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+ if (!_evas_module_engine_inherit(&pfunc, "software_generic", sizeof (Evas_Engine_Info_Software_X11))) return 0;
_evas_engine_soft_x11_log_dom =
eina_log_domain_register("evas-software_x11", EVAS_DEFAULT_LOG_COLOR);
ORD(image_native_set);
ORD(image_native_get);
- func.info_size = sizeof (Evas_Engine_Info_Software_X11);
-
_symbols();
/* now advertise out own api */
em->functions = (void *)(&func);
if (!em) return 0;
/* get whatever engine module we inherit from */
- if (!_evas_module_engine_inherit(&pfunc, "gl_generic")) return 0;
+ if (!_evas_module_engine_inherit(&pfunc, "gl_generic", sizeof (Evas_Engine_Info_Wayland))) return 0;
/* setup logging domain */
if (_evas_engine_wl_egl_log_dom < 0)
ORD(image_native_init);
ORD(image_native_shutdown);
- func.info_size = sizeof (Evas_Engine_Info_Wayland);
-
symbols();
/* advertise out which functions we support */
}
/* EVAS MODULE FUNCTIONS */
-static int
+static int
module_open(Evas_Module *em)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!em) return 0;
/* try to get functions from whatever engine module we inherit from */
- if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
+ if (!_evas_module_engine_inherit(&pfunc, "software_generic", sizeof (Evas_Engine_Info_Wayland))) return 0;
/* try to create our logging domain */
- _evas_engine_way_shm_log_dom =
+ _evas_engine_way_shm_log_dom =
eina_log_domain_register("evas-wayland_shm", EVAS_DEFAULT_LOG_COLOR);
if (_evas_engine_way_shm_log_dom < 0)
{
ORD(image_native_init);
ORD(image_native_shutdown);
- func.info_size = sizeof (Evas_Engine_Info_Wayland);
-
_symbols();
/* advertise our own engine functions */
em->functions = (void *)(&func);
return 1;
}
-static void
+static void
module_close(Evas_Module *em EINA_UNUSED)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);