### Default values
have_ecore_evas="yes"
-have_extn="yes"
want_ecore_evas_software_gdi="${have_evas_engine_software_gdi}"
want_ecore_evas_software_ddraw="${have_evas_engine_software_ddraw}"
want_ecore_evas_wayland_egl="${have_evas_engine_wayland_egl}"
want_ecore_evas_extn="yes"
-if test "${have_windows}" = "yes"; then
+if test "x${have_ecore_ipc}" = "xno" || \
+ test "x${efl_func_shm_open}" = "xno" || \
+ test "x${have_windows}" = "xyes" ; then
want_ecore_evas_extn="no"
fi
EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [eina])
## modules
-
-ECORE_EVAS_MODULE([buffer], [static])
+ECORE_EVAS_MODULE([extn], [${want_ecore_evas_extn}])
ECORE_EVAS_MODULE([ews], [yes])
ECORE_EVAS_MODULE([fb], [${want_fb}])
ECORE_EVAS_MODULE([psl1ght], [${have_ps3}])
AM_CONDITIONAL([BUILD_ECORE_EVAS_WIN32],
[test "${build_ecore_evas_win32}" = "yes"])
-# XXX TODO: ecore_evas_extn
-
-if test "x${have_ecore_ipc}" = "xno" || \
- test "x${have_ecore_evas_software_buffer}" = "xno" || \
- test "x${have_shm_open}" = "xno" || \
- test "x${have_windows}" = "xyes" ; then
- have_extn="no"
-fi
-
-dnl THIS IS SPECIAL - dont use normal ECORE_EVAS_CHECK_MODULE
-have_ecore_evas_extn="no"
-if test "x${want_ecore_evas_extn}" = "xyes" && \
- test "x${have_extn}" = "xyes" && \
- test "x${have_ecore_evas}" = "xyes"; then
- have_ecore_evas_extn="yes"
- AC_DEFINE([BUILD_ECORE_EVAS_EXTN], [1], [Support for Extn Engine in Ecore_Evas])
-fi
-
# XXX TODO: ecore_evas_x11
echo " Ecore_Evas...................: $have_ecore_evas"
#if test "x${have_ecore_evas}" = "xyes" ; then
- echo " Software X11...............: ${with_x11}"
- echo " OpenGL X11.................: ${with_x11} (opengl=${with_opengl})"
+ echo " Software X11...............: $have_ecore_evas_software_x11"
+ echo " OpenGL X11.................: $have_ecore_evas_opengl_x11 (opengl=${with_opengl})"
echo " Software GDI...............: $have_ecore_evas_software_gdi"
echo " Software DirectDraw........: $have_ecore_evas_software_ddraw"
echo " Software SDL...............: $have_ecore_evas_software_sdl"
echo " OpenGL SDL.................: $have_ecore_evas_opengl_sdl"
echo " OpenGL Cocoa...............: $have_ecore_evas_opengl_cocoa"
- echo " PSL1GHT....................: $have_ps3"
+ echo " PSL1GHT....................: $have_ecore_evas_psl1ght"
echo " Software Framebuffer.......: $have_ecore_evas_fb"
echo " Sing.Proc. Windowing System: $have_ecore_evas_ews"
echo " Wayland Shm................: $have_ecore_evas_wayland_shm"
lib_ecore_evas_libecore_evas_la_SOURCES = \
lib/ecore_evas/ecore_evas.c \
+lib/ecore_evas/ecore_evas_buffer.c \
+lib/ecore_evas/ecore_evas_buffer.h \
lib/ecore_evas/ecore_evas_deprecated.c \
lib/ecore_evas/ecore_evas_ews.c \
-lib/ecore_evas/ecore_evas_util.c \
lib/ecore_evas/ecore_evas_module.c \
-lib/ecore_evas/ecore_evas_private.h
+lib/ecore_evas/ecore_evas_private.h \
+lib/ecore_evas/ecore_evas_util.c
lib_ecore_evas_libecore_evas_la_CPPFLAGS = \
-I$(top_srcdir)/src/lib/eina \
lib_ecore_evas_libecore_evas_la_LIBADD = \
lib/ecore_input/libecore_input_evas.la \
lib/ecore_input/libecore_input.la \
-lib/ecore_ipc/libecore_ipc.la \
lib/ecore/libecore.la \
lib/evas/libevas.la \
lib/eo/libeo.la \
# Engines
-if BUILD_ECORE_EVAS_BUFFER
-BUFFERSOURCES = \
-modules/ecore_evas/engines/buffer/ecore_evas_buffer.c \
-modules/ecore_evas/engines/buffer/ecore_evas_extn.c \
-modules/ecore_evas/engines/buffer/ecore_evas_buffer_private.h
-ecoreevasenginebufferpkgdir = $(libdir)/ecore_evas/engines/buffer/$(MODULE_ARCH)
-ecoreevasenginebufferpkg_LTLIBRARIES = modules/ecore_evas/engines/buffer/module.la
-modules_ecore_evas_engines_buffer_module_la_SOURCES = $(BUFFERSOURCES)
-modules_ecore_evas_engines_buffer_module_la_CPPFLAGS = $(lib_ecore_evas_libecore_evas_la_CPPFLAGS)
-modules_ecore_evas_engines_buffer_module_la_LIBADD = lib/ecore_ipc/libecore_ipc.la lib/ecore_evas/libecore_evas.la
-modules_ecore_evas_engines_buffer_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
-modules_ecore_evas_engines_buffer_module_la_LIBTOOLFLAGS = --tag=disable-static
+if BUILD_ECORE_EVAS_EXTN
+EXTNSOURCES = \
+modules/ecore_evas/engines/extn/ecore_evas_extn.c
+ecoreevasengineextnpkgdir = $(libdir)/ecore_evas/engines/extn/$(MODULE_ARCH)
+ecoreevasengineextnpkg_LTLIBRARIES = modules/ecore_evas/engines/extn/module.la
+modules_ecore_evas_engines_extn_module_la_SOURCES = $(EXTNSOURCES)
+modules_ecore_evas_engines_extn_module_la_CPPFLAGS = $(lib_ecore_evas_libecore_evas_la_CPPFLAGS)
+modules_ecore_evas_engines_extn_module_la_LIBADD = lib/ecore_ipc/libecore_ipc.la lib/ecore_evas/libecore_evas.la
+modules_ecore_evas_engines_extn_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
+modules_ecore_evas_engines_extn_module_la_LIBTOOLFLAGS = --tag=disable-static
endif
if BUILD_ECORE_EVAS_X11
switch (engine)
{
case ECORE_EVAS_ENGINE_SOFTWARE_BUFFER:
-#ifdef BUILD_ECORE_EVAS_BUFFER
return EINA_TRUE;
-#else
- return EINA_FALSE;
-#endif
+
case ECORE_EVAS_ENGINE_SOFTWARE_XLIB:
#ifdef BUILD_ECORE_EVAS_SOFTWARE_XLIB
return EINA_TRUE;
}
}
-EAPI int
-ecore_evas_buffer_render(Ecore_Evas *ee)
-{
- Ecore_Evas_Interface_Buffer *iface;
- iface = (Ecore_Evas_Interface_Buffer *)_ecore_evas_interface_get(ee, "buffer");
- EINA_SAFETY_ON_NULL_RETURN_VAL(iface, 0);
-
- return iface->render(ee);
-}
-
-
-
-
-
-
-
EAPI Eina_List *
ecore_evas_ecore_evas_list_get(void)
{
}
EAPI Ecore_Evas *
-ecore_evas_buffer_new(int w, int h)
-{
- Ecore_Evas *(*new)(int, int);
- Eina_Module *m = _ecore_evas_engine_load("buffer");
- EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
-
- new = eina_module_symbol_get(m, "ecore_evas_buffer_new_internal");
- EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
-
- return new(w, h);
-}
-
-EAPI const void *
-ecore_evas_buffer_pixels_get(Ecore_Evas *ee)
-{
- Ecore_Evas_Interface_Buffer *iface;
- iface = (Ecore_Evas_Interface_Buffer *)_ecore_evas_interface_get(ee, "buffer");
- EINA_SAFETY_ON_NULL_RETURN_VAL(iface, NULL);
-
- return iface->pixels_get(ee);
-}
-
-EAPI Ecore_Evas *
-ecore_evas_buffer_allocfunc_new(int w, int h,
- void *(*alloc_func) (void *data, int size),
- void (*free_func) (void *data, void *pix),
- const void *data)
-{
- Ecore_Evas *(*new)(int, int, void*(*)(void *, int), void(*)(void *, void *), const void *);
- Eina_Module *m = _ecore_evas_engine_load("buffer");
- EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
-
- new = eina_module_symbol_get(m, "ecore_evas_buffer_allocfunc_new_internal");
- EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
-
- return new(w, h, alloc_func, free_func, data);
-}
-
-EAPI Ecore_Evas *
ecore_evas_extn_socket_new(int w, int h)
{
Ecore_Evas *(*new)(int, int);
- Eina_Module *m = _ecore_evas_engine_load("buffer");
+ Eina_Module *m = _ecore_evas_engine_load("extn");
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
new = eina_module_symbol_get(m, "ecore_evas_extn_socket_new_internal");
ecore_evas_extn_plug_new(Ecore_Evas *ee_target)
{
Evas_Object *(*new)(Ecore_Evas *);
- Eina_Module *m = _ecore_evas_engine_load("buffer");
+ Eina_Module *m = _ecore_evas_engine_load("extn");
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
new = eina_module_symbol_get(m, "ecore_evas_extn_plug_new_internal");
return iface->connect(ee, svcname, svcnum, svcsys);
}
-EAPI Evas_Object *
-ecore_evas_object_image_new(Ecore_Evas *ee_target)
-{
- Evas_Object *(*new)(Ecore_Evas *ee_target);
- Eina_Module *m = _ecore_evas_engine_load("buffer");
- EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
-
- new = eina_module_symbol_get(m, "ecore_evas_object_image_new_internal");
- EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
-
- return new(ee_target);
-}
-
EAPI Ecore_Evas *
ecore_evas_sdl_new(const char* name, int w, int h, int fullscreen,
int hwsurface, int noframe, int alpha)
# include <config.h>
#endif
-#include "ecore_evas_buffer_private.h"
-
-static int _ecore_evas_init_count = 0;
-
-static const char *interface_buffer_name = "buffer";
-static const int interface_buffer_version = 1;
-
-
-static Ecore_Evas_Interface_Buffer *_ecore_evas_buffer_interface_new(void);
-
-static int
-_ecore_evas_buffer_init(void)
-{
- _ecore_evas_init_count++;
- return _ecore_evas_init_count;
-}
-
-static int
-_ecore_evas_buffer_shutdown(void)
-{
- _ecore_evas_init_count--;
- if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
- return _ecore_evas_init_count;
-}
+#include "ecore_evas_buffer.h"
static void
_ecore_evas_buffer_free(Ecore_Evas *ee)
}
free(bdata);
- _ecore_evas_buffer_shutdown();
}
static void
_ecore_evas_buffer_render(Ecore_Evas *ee)
{
Eina_List *updates = NULL, *l, *ll;
- Ecore_Evas_Engine_Buffer_Data *bdata = ee->engine.data;
+ Ecore_Evas_Engine_Buffer_Data *bdata;
Ecore_Evas *ee2;
int rend = 0;
+ bdata = ee->engine.data;
EINA_LIST_FOREACH(ee->sub_ecore_evas, ll, ee2)
{
if (ee2->func.fn_pre_render) ee2->func.fn_pre_render(ee2);
return updates ? 1 : rend;
}
+EAPI int
+ecore_evas_buffer_render(Ecore_Evas *ee)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ee, 0);
+ return _ecore_evas_buffer_render(ee);
+}
+
// NOTE: if you fix this, consider fixing ecore_evas_ews.c as it is similar!
static void
_ecore_evas_buffer_coord_translate(Ecore_Evas *ee, Evas_Coord *x, Evas_Coord *y)
}
EAPI Ecore_Evas *
-ecore_evas_buffer_allocfunc_new_internal(int w, int h, void *(*alloc_func) (void *data, int size), void (*free_func) (void *data, void *pix), const void *data)
+ecore_evas_buffer_allocfunc_new(int w, int h,
+ void *(*alloc_func) (void *data, int size),
+ void (*free_func) (void *data, void *pix),
+ const void *data)
{
Evas_Engine_Info_Buffer *einfo;
Ecore_Evas_Engine_Buffer_Data *bdata;
- Ecore_Evas_Interface_Buffer *iface;
Ecore_Evas *ee;
int rmethod;
- if ((!alloc_func) || (!free_func)) return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(alloc_func, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(free_func, NULL);
+
rmethod = evas_render_method_lookup("buffer");
- if (!rmethod) return NULL;
+ EINA_SAFETY_ON_TRUE_RETURN_VAL(rmethod == 0, NULL);
+
ee = calloc(1, sizeof(Ecore_Evas));
- if (!ee) return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ee, NULL);
+
bdata = calloc(1, sizeof(Ecore_Evas_Engine_Buffer_Data));
if (!bdata)
{
ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
- _ecore_evas_buffer_init();
-
ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_buffer_engine_func;
ee->engine.data = bdata;
bdata->alloc_func = alloc_func;
bdata->free_func = free_func;
bdata->data = (void *)data;
- iface = _ecore_evas_buffer_interface_new();
- ee->engine.ifaces = eina_list_append(ee->engine.ifaces, iface);
-
ee->driver = "buffer";
if (w < 1) w = 1;
}
EAPI Ecore_Evas *
-ecore_evas_buffer_new_internal(int w, int h)
+ecore_evas_buffer_new(int w, int h)
{
- return ecore_evas_buffer_allocfunc_new_internal
+ return ecore_evas_buffer_allocfunc_new
(w, h, _ecore_evas_buffer_pix_alloc, _ecore_evas_buffer_pix_free, NULL);
}
-const void *
-_ecore_evas_buffer_pixels_get(Ecore_Evas *ee)
+EAPI const void *
+ecore_evas_buffer_pixels_get(Ecore_Evas *ee)
{
- Ecore_Evas_Engine_Buffer_Data *bdata = ee->engine.data;
+ Ecore_Evas_Engine_Buffer_Data *bdata;
- if (!ee)
- {
- CRIT("Ecore_Evas is missing");
- return NULL;
- }
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ee, NULL);
+
+ bdata = ee->engine.data;
_ecore_evas_buffer_render(ee);
return bdata->pixels;
}
EAPI Evas_Object *
-ecore_evas_object_image_new_internal(Ecore_Evas *ee_target)
+ecore_evas_object_image_new(Ecore_Evas *ee_target)
{
Evas_Object *o;
Ecore_Evas_Engine_Buffer_Data *bdata;
Evas_Engine_Info_Buffer *einfo;
- Ecore_Evas_Interface_Buffer *iface;
Ecore_Evas *ee;
int rmethod;
int w = 1, h = 1;
- if (!ee_target) return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ee_target, NULL);
rmethod = evas_render_method_lookup("buffer");
- if (!rmethod) return NULL;
+ EINA_SAFETY_ON_TRUE_RETURN_VAL(rmethod == 0, NULL);
+
ee = calloc(1, sizeof(Ecore_Evas));
- if (!ee) return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ee, NULL);
+
bdata = calloc(1, sizeof(Ecore_Evas_Engine_Buffer_Data));
if (!bdata)
{
}
ee->engine.data = bdata;
- iface = _ecore_evas_buffer_interface_new();
- ee->engine.ifaces = eina_list_append(ee->engine.ifaces, iface);
o = evas_object_image_add(ee_target->evas);
evas_object_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
- _ecore_evas_buffer_init();
-
ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_buffer_engine_func;
ee->driver = "buffer";
return o;
}
-
-static Ecore_Evas_Interface_Buffer *
-_ecore_evas_buffer_interface_new(void)
-{
- Ecore_Evas_Interface_Buffer *iface;
-
- iface = calloc(1, sizeof(Ecore_Evas_Interface_Buffer));
- if (!iface) return NULL;
-
- iface->base.name = interface_buffer_name;
- iface->base.version = interface_buffer_version;
-
- iface->pixels_get = _ecore_evas_buffer_pixels_get;
- iface->render = _ecore_evas_buffer_render;
-
- return iface;
-}
typedef struct _Ecore_Evas_Interface Ecore_Evas_Interface;
/* Engines interfaces */
-typedef struct _Ecore_Evas_Interface_Buffer Ecore_Evas_Interface_Buffer;
typedef struct _Ecore_Evas_Interface_Extn Ecore_Evas_Interface_Extn;
typedef struct _Ecore_Evas_Interface_X11 Ecore_Evas_Interface_X11;
typedef struct _Ecore_Evas_Interface_Software_X11 Ecore_Evas_Interface_Software_X11;
unsigned int version;
};
-struct _Ecore_Evas_Interface_Buffer {
- Ecore_Evas_Interface base;
-
- const void* (*pixels_get)(Ecore_Evas *ee);
- int (*render)(Ecore_Evas *ee);
-};
-
struct _Ecore_Evas_Interface_X11 {
Ecore_Evas_Interface base;
#include <Ecore_Ipc.h>
-#include "ecore_evas_buffer_private.h"
+#include "ecore_evas_buffer.h"
static const char *interface_extn_name = "extn";