initial import fo loadable engine modules for evas - from jorge zappie :)

SVN revision: 19775
This commit is contained in:
Carsten Haitzler 2006-01-14 12:13:38 +00:00
parent bc59e998b7
commit f435375b19
121 changed files with 1048 additions and 586 deletions

View File

@ -9,3 +9,4 @@ Nathan Ingersoll <ningerso@d.umn.edu>
Willem Monsuwe <willem@stack.nl>
Jose O Gonzalez <jose_ogp@juno.com>
Bernhard Nemec <Bernhard.Nemec@viasyshc.com>
Jorge Luis Zapata Muga <jorgeluis.zapata@gmail.com>

View File

@ -17,6 +17,10 @@ AM_ENABLE_SHARED
AM_PROG_LIBTOOL
AC_FUNC_ALLOCA
MODULE_ARCH="$host_os-$host_cpu"
AC_SUBST(MODULE_ARCH)
AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
dnl Add the languages which your application supports here.
if test "x${bindir}" = 'x${exec_prefix}/bin'; then
@ -1609,18 +1613,20 @@ src/lib/file/Makefile
src/lib/imaging/Makefile
src/lib/engines/Makefile
src/lib/engines/common/Makefile
src/lib/engines/software_x11/Makefile
src/lib/engines/software_xcb/Makefile
src/lib/engines/fb/Makefile
src/lib/engines/buffer/Makefile
src/lib/engines/software_win32_gdi/Makefile
src/lib/engines/software_qtopia/Makefile
src/lib/engines/directfb/Makefile
src/lib/engines/gl_common/Makefile
src/lib/engines/gl_x11/Makefile
src/lib/engines/cairo_common/Makefile
src/lib/engines/cairo_x11/Makefile
src/lib/engines/xrender_x11/Makefile
src/modules/Makefile
src/modules/engines/Makefile
src/modules/engines/software_x11/Makefile
src/modules/engines/software_xcb/Makefile
src/modules/engines/fb/Makefile
src/modules/engines/buffer/Makefile
src/modules/engines/software_win32_gdi/Makefile
src/modules/engines/software_qtopia/Makefile
src/modules/engines/directfb/Makefile
src/modules/engines/gl_common/Makefile
src/modules/engines/gl_x11/Makefile
src/modules/engines/cairo_common/Makefile
src/modules/engines/cairo_x11/Makefile
src/modules/engines/xrender_x11/Makefile
src/lib/include/Makefile
proj/Makefile
proj/win32_gdi/Makefile

View File

@ -1,3 +1,3 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = lib bin
SUBDIRS = lib modules bin

View File

@ -1,7 +1,7 @@
MAINTAINERCLEANFILES = Makefile.in moc_evas_software_qtopia_main.cpp
INCLUDES = \
-I. -I$(top_srcdir)/src/lib -I$(top_srcdir) \
-I. -I$(top_srcdir)/src/modules/engines -I$(top_srcdir)/src/lib -I$(top_srcdir) \
@DIRECTFB_CFLAGS@ @qt_cflags@ @gl_cflags@
bin_PROGRAMS = \

View File

@ -14,6 +14,7 @@ main(int argc, char **argv)
if ((argc >= 3) && (!strcmp(argv[1], "-rot")))
rot = atoi(argv[2]);
evas_init();
evas = evas_new();
evas_output_method_set(evas, evas_render_method_lookup("buffer"));
evas_output_size_set(evas, win_w, win_h);
@ -42,5 +43,6 @@ main(int argc, char **argv)
loop();
evas_render(evas);
}
evas_shutdown();
return 0;
}

View File

@ -23,6 +23,7 @@ main(int argc, char **argv)
exit(-1);
}
/* test evas_free.... :) */
evas_init();
evas = evas_new();
evas_output_method_set(evas, evas_render_method_lookup("cairo_x11"));
evas_output_size_set(evas, win_w, win_h);
@ -134,4 +135,5 @@ main(int argc, char **argv)
usleep(100000);
}
return 0;
evas_shutdown();
}

View File

@ -57,6 +57,7 @@ main(int argc, char *argv[])
DFBCHECK(dfb->GetInputDevice(dfb, DIDID_MOUSE, &mouse));
DFBCHECK (dfb->CreateInputEventBuffer (dfb, DICAPS_ALL, DFB_TRUE, &buffer));
evas_init();
evas = evas_new();
evas_output_method_set(evas, evas_render_method_lookup("directfb"));
evas_output_size_set(evas, win_w, win_h);
@ -127,5 +128,6 @@ main(int argc, char *argv[])
primary->Release(primary);
dfb->Release(dfb);
return 42;
evas_shutdown();
return 0;
}

View File

@ -237,6 +237,7 @@ int main( int argc, char *argv[] )
window1->RaiseToTop( window1 );
upper = window1;
{
evas_init();
evas = evas_new();
evas_output_method_set(evas, evas_render_method_lookup("directfb"));
evas_output_size_set(evas, 240, 320);
@ -413,5 +414,6 @@ int main( int argc, char *argv[] )
bgsurface->Release( bgsurface );
dfb->Release( dfb );
return 42;
evas_shutdown();
return 0;
}

View File

@ -13,6 +13,7 @@ main(int argc, char **argv)
if ((argc >= 3) && (!strcmp(argv[1], "-rot")))
rot = atoi(argv[2]);
evas_init();
evas = evas_new();
evas_output_method_set(evas, evas_render_method_lookup("fb"));
evas_output_size_set(evas, win_w, win_h);
@ -37,5 +38,6 @@ main(int argc, char **argv)
loop();
evas_render(evas);
}
evas_shutdown();
return 0;
}

View File

@ -27,6 +27,7 @@ main(int argc, char **argv)
exit(-1);
}
/* test evas_free.... :) */
evas_init();
evas = evas_new();
evas_output_method_set(evas, evas_render_method_lookup("gl_x11"));
evas_output_size_set(evas, win_w, win_h);
@ -137,5 +138,6 @@ main(int argc, char **argv)
if (pause_me == 2)
usleep(100000);
}
evas_shutdown();
return 0;
}

View File

@ -95,6 +95,7 @@ EvasTestApp::EvasTestApp(QWidget *parent, const char *name, int wFlags)
evas_target_widget = new EvasTargetWidget(this, "EvasTargetWidget");
evas_init();
evas = evas_new();
evas_output_method_set(evas, evas_render_method_lookup("software_qtopia"));
evas_output_size_set(evas, win_w, win_h);
@ -114,6 +115,7 @@ EvasTestApp::EvasTestApp(QWidget *parent, const char *name, int wFlags)
EvasTestApp::~EvasTestApp()
{
evas_shutdown();
}
QSizePolicy EvasTestApp::sizePolicy() const

View File

@ -60,6 +60,7 @@ main(int argc, char **argv)
XSetWMNormalHints(disp, win, &szhints);
XMapWindow(disp, win);
evas_init();
evas = evas_new();
evas_output_method_set(evas, evas_render_method_lookup("software_x11"));
evas_output_size_set(evas, win_w, win_h);
@ -175,5 +176,6 @@ main(int argc, char **argv)
}
}
evas_shutdown();
return 0;
}

View File

@ -61,6 +61,7 @@ main(int argc, char **argv)
XSync(disp, False);
sleep(1);
evas_init();
evas = evas_new();
evas_output_method_set(evas, evas_render_method_lookup("software_x11"));
evas_output_size_set(evas, win_w, win_h);
@ -158,5 +159,6 @@ main(int argc, char **argv)
}
}
evas_shutdown();
return 0;
}

View File

@ -133,6 +133,7 @@ main(int argc, char **argv)
XCBMapWindow (c, win.window);
evas_init();
evas = evas_new();
evas_output_method_set(evas, evas_render_method_lookup("software_xcb"));
evas_output_size_set(evas, win_w, win_h);
@ -256,5 +257,6 @@ main(int argc, char **argv)
}
}
evas_shutdown();
return 0;
}

View File

@ -134,6 +134,7 @@ main(int argc, char **argv)
XCBSync(c, 0);
sleep(1);
evas_init();
evas = evas_new();
evas_output_method_set(evas, evas_render_method_lookup("software_xcb"));
evas_output_size_set(evas, win_w, win_h);
@ -230,5 +231,6 @@ main(int argc, char **argv)
}
}
evas_shutdown();
return 0;
}

View File

@ -50,6 +50,7 @@ main(int argc, char **argv)
XSync(disp, False);
/* test evas_free.... :) */
evas_init();
evas = evas_new();
evas_output_method_set(evas, evas_render_method_lookup("xrender_x11"));
evas_output_size_set(evas, win_w, win_h);
@ -128,5 +129,6 @@ main(int argc, char **argv)
if (pause_me == 2)
usleep(100000);
}
evas_shutdown();
return 0;
}

View File

@ -27,6 +27,68 @@
* @brief These routines are used for Evas library interaction.
*/
/* the evas module api */
/***********************/
/* the module api version */
#define EVAS_MODULE_API_VERSION 1
/* the module types */
typedef enum _Evas_Module_Type
{
EVAS_MODULE_TYPE_ENGINE,
EVAS_MODULE_TYPE_OBJECT
} Evas_Module_Type;
/* the module api structure, all modules should define this struct */
typedef struct _Evas_Module_Api Evas_Module_Api;
struct _Evas_Module_Api
{
int version;
Evas_Module_Type type;
const char *name;
const char *author;
};
/* the module structure */
typedef struct _Evas_Module Evas_Module;
struct _Evas_Module
{
Evas_Module_Api *api;
void *handle; /* the dlopen handle */
char *path; /* the path where this modules is */
char *name; /* the name of the dir where this module is */
Evas_Module_Type type; /* the type detected by the path */
struct
{
int (*open)(Evas_Module *);
void (*close)(Evas_Module *);
} func;
unsigned char loaded : 1;
void *functions; /* this are the functions exported by the module */
void *data; /* some internal data for the module i.e the id for engines */
};
/* the internals of the module api use this struct to reference a path with a module type
* instead of deduce the type from the path.
* */
typedef struct _Evas_Module_Path Evas_Module_Path;
struct _Evas_Module_Path
{
Evas_Module_Type type;
const char *path;
};
typedef struct _Evas_Module_Engine Evas_Module_Engine;
struct _Evas_Module_Engine
{
int id;
};
/* end of evas module api */
/**************************/
typedef enum _Evas_Callback_Type
{
EVAS_CALLBACK_MOUSE_IN, /**< Mouse In Event */

View File

@ -7,123 +7,12 @@ AUTOMAKE_OPTIONS = 1.4 foreign
INCLUDES = -I. \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ @x_cflags@ @xcb_cflags@ @qt_cflags@ @DIRECTFB_CFLAGS@ @gl_cflags@
@FREETYPE_CFLAGS@
lib_LTLIBRARIES = libevas.la
EXTRA_DIST = \
Evas_Engine_Software_X11.h \
Evas_Engine_Software_Xcb.h \
Evas_Engine_DirectFB.h \
Evas_Engine_FB.h \
Evas_Engine_Buffer.h \
Evas_Engine_Software_Win32_GDI.h \
Evas_Engine_Software_Qtopia.h \
Evas_Engine_GL_X11.h \
Evas_Engine_Cairo_X11.h \
Evas_Engine_XRender_X11.h
if BUILD_ENGINE_SOFTWARE_X11
ENGINE_SOFTWARE_X11 = engines/software_x11/libevas_engine_software_x11.la
ENGINE_SOFTWARE_X11_INC = Evas_Engine_Software_X11.h
else
ENGINE_SOFTWARE_X11 =
ENGINE_SOFTWARE_X11_INC =
endif
if BUILD_ENGINE_SOFTWARE_XCB
ENGINE_SOFTWARE_XCB = engines/software_xcb/libevas_engine_software_xcb.la
ENGINE_SOFTWARE_XCB_INC = Evas_Engine_Software_Xcb.h
else
ENGINE_SOFTWARE_XCB =
ENGINE_SOFTWARE_XCB_INC =
endif
if BUILD_ENGINE_DIRECTFB
ENGINE_DIRECTFB = engines/directfb/libevas_engine_directfb.la
ENGINE_DIRECTFB_INC = Evas_Engine_DirectFB.h
else
ENGINE_DIRECTFB =
ENGINE_DIRECTFB_INC =
endif
if BUILD_ENGINE_FB
ENGINE_FB = engines/fb/libevas_engine_fb.la
ENGINE_FB_INC = Evas_Engine_FB.h
else
ENGINE_FB =
ENGINE_FB_INC =
endif
if BUILD_ENGINE_BUFFER
ENGINE_BUFFER = engines/buffer/libevas_engine_buffer.la
ENGINE_BUFFER_INC = Evas_Engine_Buffer.h
else
ENGINE_BUFFER =
ENGINE_BUFFER_INC =
endif
if BUILD_ENGINE_SOFTWARE_QTOPIA
ENGINE_SOFTWARE_QTOPIA = engines/software_qtopia/libevas_engine_software_qtopia.la
ENGINE_SOFTWARE_QTOPIA_INC = Evas_Engine_Software_Qtopia.h
else
ENGINE_SOFTWARE_QTOPIA =
ENGINE_SOFTWARE_QTOPIA_INC =
endif
if BUILD_ENGINE_GL_COMMON
ENGINE_GL_COMMON = engines/gl_common/libevas_engine_gl_common.la
ENGINE_GL_COMMON_INC =
else
ENGINE_GL_COMMON =
ENGINE_GL_COMMON_INC =
endif
if BUILD_ENGINE_GL_X11
ENGINE_GL_X11 = engines/gl_x11/libevas_engine_gl_x11.la
ENGINE_GL_X11_INC = Evas_Engine_GL_X11.h
else
ENGINE_GL_X11 =
ENGINE_GL_X11_INC =
endif
if BUILD_ENGINE_CAIRO_COMMON
ENGINE_CAIRO_COMMON = engines/cairo_common/libevas_engine_cairo_common.la
ENGINE_CAIRO_COMMON_INC =
else
ENGINE_CAIRO_COMMON =
ENGINE_CAIRO_COMMON_INC =
endif
if BUILD_ENGINE_CAIRO_X11
ENGINE_CAIRO_X11 = engines/cairo_x11/libevas_engine_cairo_x11.la
ENGINE_CAIRO_X11_INC = Evas_Engine_Cairo_X11.h
else
ENGINE_CAIRO_X11 =
ENGINE_CAIRO_X11_INC =
endif
if BUILD_ENGINE_XRENDER_X11
ENGINE_XRENDER_X11 = engines/xrender_x11/libevas_engine_xrender_x11.la
ENGINE_XRENDER_X11_INC = Evas_Engine_XRender_X11.h
else
ENGINE_XRENDER_X11 =
ENGINE_XRENDER_X11_INC =
endif
include_HEADERS = \
Evas.h \
$(ENGINE_SOFTWARE_X11_INC) \
$(ENGINE_SOFTWARE_XCB_INC) \
$(ENGINE_DIRECTFB_INC) \
$(ENGINE_FB_INC) \
$(ENGINE_BUFFER_INC) \
$(ENGINE_SOFTWARE_QTOPIA_INC) \
$(ENGINE_GL_COMMON_INC) \
$(ENGINE_GL_X11_INC) \
$(ENGINE_CAIRO_COMMON_INC) \
$(ENGINE_CAIRO_X11_INC) \
$(ENGINE_XRENDER_X11_INC)
Evas.h
libevas_la_SOURCES = \
main.c
@ -135,20 +24,9 @@ libevas_la_LIBADD = \
imaging/libevas_imaging.la \
engines/common/libevas_engine_common.la \
-lm \
-ldl \
@FREETYPE_LIBS@ \
@png_libs@ @jpeg_libs@ @eet_libs@ @edb_libs@ \
$(ENGINE_SOFTWARE_X11) \
$(ENGINE_SOFTWARE_XCB) \
$(ENGINE_DIRECTFB) \
$(ENGINE_FB) \
$(ENGINE_BUFFER) \
$(ENGINE_SOFTWARE_QTOPIA) \
$(ENGINE_GL_COMMON) \
$(ENGINE_GL_X11) \
$(ENGINE_CAIRO_COMMON) \
$(ENGINE_CAIRO_X11) \
$(ENGINE_XRENDER_X11)
@png_libs@ @jpeg_libs@ @eet_libs@ @edb_libs@
libevas_la_DEPENDENCIES = \
$(top_builddir)/config.h \
@ -156,17 +34,5 @@ libevas_la_DEPENDENCIES = \
data/libevas_data.la \
file/libevas_file.la \
imaging/libevas_imaging.la \
engines/common/libevas_engine_common.la \
$(ENGINE_SOFTWARE_X11) \
$(ENGINE_SOFTWARE_XCB) \
$(ENGINE_DIRECTFB) \
$(ENGINE_FB) \
$(ENGINE_BUFFER) \
$(ENGINE_SOFTWARE_QTOPIA) \
$(ENGINE_GL_COMMON) \
$(ENGINE_GL_X11) \
$(ENGINE_CAIRO_COMMON) \
$(ENGINE_CAIRO_X11) \
$(ENGINE_XRENDER_X11)
engines/common/libevas_engine_common.la
libevas_la_LDFLAGS = -version-info 1:0:0

View File

@ -8,8 +8,7 @@ MAINTAINERCLEANFILES = Makefile.in
INCLUDES = -I. \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ @x_cflags@ @DIRECTFB_CFLAGS@ \
@eet_cflags@ @xcb_cflags@
@FREETYPE_CFLAGS@ @eet_cflags@
noinst_LTLIBRARIES = libevas_canvas.la
libevas_canvas_la_SOURCES = \

View File

@ -1,49 +1,24 @@
#include "evas_common.h"
#include "evas_private.h"
#ifdef BUILD_ENGINE_SOFTWARE_X11
#include "evas_engine_api_software_x11.h"
#endif
#ifdef BUILD_ENGINE_SOFTWARE_XCB
#include "evas_engine_api_software_xcb.h"
#endif
#ifdef BUILD_ENGINE_DIRECTFB
#include "evas_engine_api_directfb.h"
#endif
#ifdef BUILD_ENGINE_FB
#include "evas_engine_api_fb.h"
#endif
#ifdef BUILD_ENGINE_BUFFER
#include "evas_engine_api_buffer.h"
#endif
#ifdef BUILD_ENGINE_SOFTWARE_WIN32_GDI
#include "evas_engine_api_software_win32_gdi.h"
#endif
#ifdef BUILD_ENGINE_SOFTWARE_QTOPIA
#include "evas_engine_api_software_qtopia.h"
#endif
#ifdef BUILD_ENGINE_GL_X11
#include "evas_engine_api_gl_x11.h"
#endif
#ifdef BUILD_ENGINE_CAIRO_X11
#include "evas_engine_api_cairo_x11.h"
#endif
#ifdef BUILD_ENGINE_XRENDER_X11
#include "evas_engine_api_xrender_x11.h"
#endif
extern Evas_List *evas_modules;
static int initcount = 0;
EAPI int
evas_init(void)
{
if (initcount == 0)
evas_module_init();
return ++initcount;
}
EAPI int
evas_shutdown(void)
{
if (--initcount == 0)
initcount--;
if (initcount == 0)
{
evas_module_shutdown();
evas_font_dir_cache_free();
evas_common_shutdown();
}
@ -216,6 +191,7 @@ evas_free(Evas *e)
EAPI void
evas_output_method_set(Evas *e, int render_method)
{
Evas_List *l;
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return;
MAGIC_CHECK_END();
@ -224,63 +200,24 @@ evas_output_method_set(Evas *e, int render_method)
if (render_method == RENDER_METHOD_INVALID) return;
/* if the engine is already set up - abort */
if (e->output.render_method != RENDER_METHOD_INVALID) return;
/* set the render method */
e->output.render_method = render_method;
#ifdef BUILD_ENGINE_SOFTWARE_X11
if (e->output.render_method == RENDER_METHOD_SOFTWARE_X11)
e->engine.func = &evas_engine_software_x11_func;
else
#endif
#ifdef BUILD_ENGINE_XRENDER_X11
if (e->output.render_method == RENDER_METHOD_XRENDER_X11)
e->engine.func = &evas_engine_xrender_x11_func;
else
#endif
#ifdef BUILD_ENGINE_SOFTWARE_XCB
if (e->output.render_method == RENDER_METHOD_SOFTWARE_XCB)
e->engine.func = &evas_engine_software_xcb_func;
else
#endif
#ifdef BUILD_ENGINE_GL_X11
if (e->output.render_method == RENDER_METHOD_GL_X11)
e->engine.func = &evas_engine_gl_x11_func;
else
#endif
#ifdef BUILD_ENGINE_CAIRO_X11
if (e->output.render_method == RENDER_METHOD_CAIRO_X11)
e->engine.func = &evas_engine_cairo_x11_func;
else
#endif
#ifdef BUILD_ENGINE_DIRECTFB
if (e->output.render_method == RENDER_METHOD_DIRECTFB)
e->engine.func = &evas_engine_directfb_func;
else
#endif
#ifdef BUILD_ENGINE_FB
if (e->output.render_method == RENDER_METHOD_FB)
e->engine.func = &evas_engine_fb_func;
else
#endif
#ifdef BUILD_ENGINE_BUFFER
if (e->output.render_method == RENDER_METHOD_BUFFER)
e->engine.func = &evas_engine_buffer_func;
else
#endif
#ifdef BUILD_ENGINE_SOFTWARE_WIN32_GDI
if (e->output.render_method == RENDER_METHOD_SOFTWARE_WIN32_GDI)
e->engine.func = &evas_engine_software_win32_gdi_func;
else
#endif
#ifdef BUILD_ENGINE_SOFTWARE_QTOPIA
if (e->output.render_method == RENDER_METHOD_SOFTWARE_QTOPIA)
e->engine.func = &evas_engine_software_qtopia_func;
else
#endif
return;
/* get the engine info struct */
if (e->output.render_method != RENDER_METHOD_INVALID)
/* iterate trough the list to find the id */
for (l = evas_modules; l; l = l->next)
{
Evas_Module *em;
Evas_Module_Engine *eme;
em = l->data;
if (em->type != EVAS_MODULE_TYPE_ENGINE) continue;
if (!em->data) continue;
eme = (Evas_Module_Engine *)em->data;
if (eme->id != render_method) continue;
if (!evas_module_load(em)) return;
/* set the correct render */
e->output.render_method = render_method;
e->engine.func = (em->functions);
/* get the engine info struct */
if (e->engine.func->info) e->engine.info = e->engine.func->info(e);
return;
}
}
@ -681,39 +618,25 @@ evas_coord_world_y_to_screen(Evas *e, Evas_Coord y)
EAPI int
evas_render_method_lookup(const char *name)
{
static int i = 1;
Evas_Module *em;
Evas_Module_Engine *eem;
if (!name) return RENDER_METHOD_INVALID;
#ifdef BUILD_ENGINE_SOFTWARE_X11
if (!strcmp(name, "software_x11")) return RENDER_METHOD_SOFTWARE_X11;
#endif
#ifdef BUILD_ENGINE_XRENDER_X11
if (!strcmp(name, "xrender_x11")) return RENDER_METHOD_XRENDER_X11;
#endif
#ifdef BUILD_ENGINE_SOFTWARE_XCB
if (!strcmp(name, "software_xcb")) return RENDER_METHOD_SOFTWARE_XCB;
#endif
#ifdef BUILD_ENGINE_GL_X11
if (!strcmp(name, "gl_x11")) return RENDER_METHOD_GL_X11;
#endif
#ifdef BUILD_ENGINE_CAIRO_X11
if (!strcmp(name, "cairo_x11")) return RENDER_METHOD_CAIRO_X11;
#endif
#ifdef BUILD_ENGINE_DIRECTFB
if (!strcmp(name, "directfb")) return RENDER_METHOD_DIRECTFB;
#endif
#ifdef BUILD_ENGINE_FB
if (!strcmp(name, "fb")) return RENDER_METHOD_FB;
#endif
#ifdef BUILD_ENGINE_BUFFER
if (!strcmp(name, "buffer")) return RENDER_METHOD_BUFFER;
#endif
#ifdef BUILD_ENGINE_SOFTWARE_WIN32_GDI
if (!strcmp(name, "software_win32_gdi")) return RENDER_METHOD_SOFTWARE_WIN32_GDI;
#endif
#ifdef BUILD_ENGINE_SOFTWARE_QTOPIA
if (!strcmp(name, "software_qtopia")) return RENDER_METHOD_SOFTWARE_QTOPIA;
#endif
return RENDER_METHOD_INVALID;
/* search on the engines list for the name */
em = evas_module_find_type(EVAS_MODULE_TYPE_ENGINE, name);
if(!em) return RENDER_METHOD_INVALID;
eem = (Evas_Module_Engine *)em->data;
if(!eem)
{
eem = malloc(sizeof(Evas_Module_Engine));
em->data = eem;
eem->id = i;
i++;
}
return eem->id;
}
/**
@ -756,6 +679,7 @@ evas_render_method_list(void)
{
Evas_List *methods = NULL;
/* FIXME: get from modules */
#ifdef BUILD_ENGINE_SOFTWARE_X11
methods = evas_list_append(methods, strdup("software_x11"));
#endif

View File

@ -1,16 +1,4 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = \
common \
software_x11 \
software_xcb \
fb \
buffer \
software_win32_gdi \
software_qtopia \
directfb \
gl_common \
gl_x11 \
cairo_common \
cairo_x11 \
xrender_x11
common

View File

@ -1,7 +0,0 @@
Makefile.in
Makefile
.deps
.libs
libevas_engine_buffer.la
evas_engine.lo
evas_outbuf.lo

View File

@ -1,6 +0,0 @@
Makefile.in
Makefile
.deps
.libs
libevas_engine_cairo_common.la
*.lo

View File

@ -1,6 +0,0 @@
Makefile.in
Makefile
.deps
.libs
libevas_engine_cairo_x11.la
*.lo

View File

@ -1,6 +0,0 @@
Makefile.in
Makefile
.deps
.libs
*.lo
*.la

View File

@ -1,8 +0,0 @@
Makefile.in
Makefile
.deps
.libs
libevas_engine_fb.la
evas_engine.lo
evas_fb_main.lo
evas_outbuf.lo

View File

@ -1,14 +0,0 @@
Makefile.in
Makefile
.deps
.libs
libevas_engine_gl_common.la
evas_gl_font.lo
evas_gl_gradient.lo
evas_gl_image.lo
evas_gl_line.lo
evas_gl_misc.lo
evas_gl_polygon.lo
evas_gl_texture.lo
evas_gl_context.lo
evas_gl_rectangle.lo

View File

@ -1,7 +0,0 @@
Makefile.in
Makefile
.deps
.libs
libevas_engine_gl_x11.la
evas_engine.lo
evas_x_main.lo

View File

@ -1,4 +0,0 @@
Makefile.in
Makefile
.deps
.libs

View File

@ -1,109 +0,0 @@
#include "evas_common.h"
#include "evas_engine.h"
#include <qwidget.h>
#include <qnamespace.h>
#include <qbrush.h>
#include <qpainter.h>
#include <qdirectpainter_qws.h>
//#define QVFB_BUG
extern "C" {
QT_Direct *
evas_qt_main_direct_start(void *target)
{
QT_Direct *d;
QDirectPainter *dp;
QWidget *widget;
int i;
widget = (QWidget *)target;
dp = new QDirectPainter(widget);
if (!dp) return NULL;
d = (QT_Direct *)calloc(1, sizeof(QT_Direct));
if (!d) return NULL;
d->target = target;
d->direct = (void *)dp;
d->fb.data = dp->frameBuffer();
d->fb.bpp = dp->depth();
d->fb.width = dp->lineStep() / (d->fb.bpp / 8);
if (dp->depth() == 16)
{
d->fb.mask.r = 0xf800;
d->fb.mask.g = 0x07e0;
d->fb.mask.b = 0x001f;
}
else if (dp->depth() == 32)
{
d->fb.mask.r = 0x00ff0000;
d->fb.mask.g = 0x0000ff00;
d->fb.mask.b = 0x000000ff;
}
else
{
delete dp;
free(d);
return NULL;
}
d->fb.rotation = dp->transformOrientation() * 90;
d->rects.count = dp->numRects();
if (d->rects.count > 0)
{
d->rects.r = (QT_Direct_Rect *)calloc(d->rects.count, sizeof(QT_Direct_Rect));
if (d->rects.r)
{
for (i = 0; i < d->rects.count; i++)
{
QRect r;
r = dp->rect(i);
if (d->fb.rotation == 0)
{
d->rects.r[i].x = r.x();
d->rects.r[i].y = r.y();
d->rects.r[i].w = r.width();
d->rects.r[i].h = r.height();
}
else if (d->fb.rotation == 270)
{
d->rects.r[i].x = r.y();
d->rects.r[i].y = d->fb.width - r.x() - r.width();
d->rects.r[i].w = r.height();
d->rects.r[i].h = r.width();
}
else if (d->fb.rotation == 90)
{
// FIXME: do
}
}
}
else
d->rects.count = 0;
}
d->location.x = dp->xOffset();
d->location.y = dp->yOffset();
d->location.w = dp->width();
d->location.h = dp->height();
return d;
}
void
evas_qt_main_direct_stop(QT_Direct *d)
{
QDirectPainter *dp;
#ifdef QVFB_BUG
{
QWidget *target = (QWidget *)d->target;
QRect rect(d->updated.x, d->updated.y,
d->updated.w, d->updated.h);
QPainter p(target);
p.fillRect(rect, QBrush::NoBrush);
}
#endif
dp = (QDirectPainter *)d->direct;
delete dp;
if (d->rects.r) free(d->rects.r);
free(d);
}
}

View File

@ -1,4 +0,0 @@
Makefile.in
Makefile
.deps
.libs

View File

@ -1,10 +0,0 @@
Makefile.in
Makefile
.deps
.libs
libevas_engine_software_x11.la
evas_engine.lo
evas_outbuf.lo
evas_x_color.lo
evas_x_main.lo
evas_x_buffer.lo

View File

@ -1,5 +0,0 @@
.deps
.libs
Makefile
Makefile.in
*.lo

View File

@ -1,17 +0,0 @@
Makefile.in
Makefile
.deps
.libs
libevas_engine_xrender_x11.la
evas_engine_font.lo
evas_engine_font.o
evas_engine_gradient.lo
evas_engine_gradient.o
evas_engine_image.lo
evas_engine_image.o
evas_engine.lo
evas_engine.o
evas_engine_ximage.lo
evas_engine_ximage.o
evas_engine_xrender.lo
evas_engine_xrender.o

View File

@ -12,6 +12,7 @@ INCLUDES = -I. \
noinst_LTLIBRARIES = libevas_file.la
libevas_file_la_SOURCES = \
evas_path.c
evas_path.c \
evas_module.c
libevas_file_la_DEPENDENCIES = $(top_builddir)/config.h

View File

@ -0,0 +1,263 @@
#ifdef __GNUC__
# ifndef __USE_GNU
# define __USE_GNU
# endif
# ifndef _GNU_SOURCE
# define _GNU_SOURCE
# endif
# ifndef _BSD_SOURCE
# define _BSD_SOURCE
# endif
#endif
#include <dirent.h> // DIR, dirent
#include <dlfcn.h> // dlopen,dlclose,etc
#include <evas_common.h>
#include <evas_private.h>
Evas_List *evas_modules = NULL;
static Evas_List *evas_module_paths = NULL;
static void
_evas_module_path_append(Evas_Module_Type type, char *path, char *subdir)
{
Evas_Module_Path *mp;
char *buf;
buf = evas_file_path_join(path, subdir);
if (!buf) return;
if (evas_file_path_exists(buf))
{
mp = malloc(sizeof(Evas_Module_Path));
mp->type = type;
mp->path = buf;
evas_module_paths = evas_list_append(evas_module_paths, mp);
}
else
free(buf);
}
/* this will alloc a list of paths to search for the modules */
/* by now these are: */
/* 1. ~/.evas/modules/ */
/* 2. PREFIX/evas/modules/ */
/* 3. dladdr/evas/modules/ */
void
evas_module_paths_init(void)
{
char *prefix;
char *path;
int i;
Evas_List *paths = NULL;
Dl_info evas_dl;
/* 1. ~/.evas/modules/ */
prefix = getenv("HOME");
path = malloc(strlen(prefix) + 1 + strlen("/.evas/modules"));
path[0] = 0;
strcpy(path, prefix);
strcat(path, "/.evas/modules");
if (evas_file_path_exists(path))
paths = evas_list_append(paths,path);
else
free(path);
#ifdef HAVE_DLADDR
if (dladdr(evas_module_paths_init, &evas_dl))
{
int length;
length = strlen(rindex(evas_dl.dli_fname, '/'));
path = malloc(strlen(evas_dl.dli_fname) - length + strlen("/evas/modules") + 1);
strncpy(path, evas_dl.dli_fname, strlen(evas_dl.dli_fname) - length);
strcat(path, "/evas/modules");
if (evas_file_path_exists(path))
paths = evas_list_append(paths, path);
else
free(path);
}
#else
/* 2. PREFIX/evas/modules/ */
prefix = PACKAGE_LIB_DIR;
path = malloc(strlen(prefix) + 1 + strlen("/evas/modules"));
strcpy(path, prefix);
strcat(path, "/evas/modules");
if (evas_file_path_exists(path))
paths = evas_list_append(paths, path);
else
free(path);
#endif
/* append all the module types subdirs */
while (paths)
{
/* here must be added all the types of modules and their subdirectory */
/* do this on a separate function */
/* 1. engines */
_evas_module_path_append(EVAS_MODULE_TYPE_ENGINE, paths->data, "engines");
_evas_module_path_append(EVAS_MODULE_TYPE_OBJECT, paths->data, "objects");
free(paths->data);
paths = evas_list_remove_list(paths, paths);
}
}
/* this will alloc an Evas_Module struct for each module
* it finds on the paths */
void
evas_module_init(void)
{
Evas_List *l;
int new_id = 1;
printf("[init modules]\n");
evas_module_paths_init();
for (l = evas_module_paths; l; l = l->next)
{
Evas_Module_Path *mp;
DIR *dir;
struct dirent *de;
mp = l->data;
if (!(dir = opendir(mp->path))) break;
printf("[evas module] searching modules on %s\n", mp->path);
while (de = readdir(dir))
{
char *buf;
if ((!strcmp(de->d_name, ".")) || (!strcmp(de->d_name, "..")))
continue;
buf = malloc(strlen(mp->path) + 1 + strlen(de->d_name) + 1);
sprintf(buf,"%s/%s", mp->path,de->d_name);
if (evas_file_path_is_dir(buf))
{
Evas_Module *em;
em = malloc(sizeof(Evas_Module));
if (!em) continue;
em->name = strdup(de->d_name);
em->path = strdup(mp->path);
em->type = mp->type;
em->handle = NULL;
em->data = NULL;
if (em->type == EVAS_MODULE_TYPE_ENGINE)
{
Evas_Module_Engine *eme;
eme = malloc(sizeof(Evas_Module_Engine));
if (eme)
{
eme->id = new_id;
em->data = eme;
new_id++;
}
}
printf("[evas module] including module path %s/%s of type %d\n",em->path, em->name, em->type);
evas_modules = evas_list_append(evas_modules, em);
}
free(buf);
}
}
}
/* will dlclose all the modules loaded and free all the structs */
Evas_Module *
evas_module_find_type(Evas_Module_Type type, const char *name)
{
Evas_List *l;
for (l = evas_modules; l; l = l->next)
{
Evas_Module *em;
em = (Evas_Module*)l->data;
if ((type == em->type) && (!strcmp(name,em->name)))
return em;
}
return NULL;
}
int
evas_module_load(Evas_Module *em)
{
char buf[4096];
void *handle;
snprintf(buf, sizeof(buf), "%s/%s/%s/module.so",
em->path, em->name, MODULE_ARCH);
if (!evas_file_path_exists(buf))
{
printf("[evas module] error loading the module %s. It doesnt exists\n", buf);
free(buf);
return 0;
}
handle = dlopen(buf, RTLD_LAZY);
if (handle)
{
em->handle = handle;
em->func.open = dlsym(em->handle, "module_open");
em->func.close = dlsym(em->handle, "module_close");
em->api = dlsym(em->handle, "evas_modapi");
if ((!em->func.open) || (!em->api) || (!em->func.close))
goto error_dl;
/* check the api */
if (em->api->version != EVAS_MODULE_API_VERSION)
{
printf("[evas module] error loading the modules %s. The version doesnt match\n", buf);
free(buf);
}
em->func.open(em);
em->loaded = 1;
return 1;
}
error_dl:
{
char *err;
err = dlerror();
printf("[evas module] error loading the module %s. %s\n", buf, err);
dlclose(handle);
em->handle = NULL;
free(buf);
return 0;
}
}
void
evas_module_unload(Evas_Module *em)
{
if (!em->loaded)
return;
if (em->handle)
{
em->func.close(em);
dlclose(em->handle);
em->loaded = 0;
}
}
void
evas_module_shutdown(void)
{
Evas_Module *em;
while (evas_modules)
{
em = (Evas_Module *)evas_modules->data;
evas_module_unload(em);
if (em->name) free(em->name);
if (em->path) free(em->path);
if (em->data) free(em->data);
free(evas_modules->data);
evas_modules = evas_list_remove_list(evas_modules, evas_modules);
}
}

View File

@ -52,8 +52,8 @@ evas_file_path_exists(char *path)
{
struct stat st;
if (stat(path, &st) != -1) return 0;
return 1;
if (!stat(path, &st)) return 1;
return 0;
}
int
@ -61,7 +61,7 @@ evas_file_path_is_file(char *path)
{
struct stat st;
if (stat(path, &st) != -1) return 0;
if (stat(path, &st) == -1) return 0;
if (S_ISREG(st.st_mode)) return 1;
return 0;
}
@ -71,7 +71,7 @@ evas_file_path_is_dir(char *path)
{
struct stat st;
if (stat(path, &st) != -1) return 0;
if (stat(path, &st) == -1) return 0;
if (S_ISDIR(st.st_mode)) return 1;
return 0;
}

View File

@ -2,15 +2,6 @@ MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = \
evas_common.h \
evas_engine_api_software_x11.h \
evas_engine_api_software_xcb.h \
evas_engine_api_directfb.h \
evas_engine_api_fb.h \
evas_engine_api_buffer.h \
evas_engine_api_software_qtopia.h \
evas_engine_api_gl_x11.h \
evas_engine_api_cairo_x11.h \
evas_engine_api_xrender_x11.h \
evas_gl_common.h \
evas_cairo_common.h \
evas_mmx.h \

View File

@ -12,6 +12,10 @@
#include "evas_options.h"
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -10,17 +10,6 @@
/* complain when peole pass in wrong object types etc. */
#define MAGIC_DEBUG
#define RENDER_METHOD_SOFTWARE_X11 0x00000001
#define RENDER_METHOD_DIRECTFB 0x00000002
#define RENDER_METHOD_FB 0x00000003
#define RENDER_METHOD_BUFFER 0x00000004
#define RENDER_METHOD_SOFTWARE_WIN32_GDI 0x00000005
#define RENDER_METHOD_SOFTWARE_QTOPIA 0x00000006
#define RENDER_METHOD_GL_X11 0x00000007
#define RENDER_METHOD_CAIRO_X11 0x00000008
#define RENDER_METHOD_SOFTWARE_XCB 0x00000009
#define RENDER_METHOD_XRENDER_X11 0x0000000a
#define RENDER_METHOD_INVALID 0x00000000
typedef struct _Evas_Layer Evas_Layer;
@ -646,7 +635,14 @@ struct _Evas_Mempool
void *evas_mempool_malloc(Evas_Mempool *pool, int size);
void evas_mempool_free(Evas_Mempool *pool, void *ptr);
void *evas_mempool_calloc(Evas_Mempool *pool, int size);
void evas_module_paths_init(void);
void evas_module_init(void);
Evas_Module * evas_module_find_type(Evas_Module_Type type, const char *name);
int evas_module_load(Evas_Module *em);
void evas_module_unload(Evas_Module *em);
void evas_module_shutdown(void);
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,3 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = engines

View File

@ -0,0 +1,36 @@
#ifndef _EVAS_ENGINE_BUFFER_H
#define _EVAS_ENGINE_BUFFER_H
#define EVAS_ENGINE_BUFFER_DEPTH_ARGB32 0
#define EVAS_ENGINE_BUFFER_DEPTH_BGRA32 1
#define EVAS_ENGINE_BUFFER_DEPTH_RGB24 2
#define EVAS_ENGINE_BUFFER_DEPTH_BGR24 3
typedef struct _Evas_Engine_Info_Buffer Evas_Engine_Info_Buffer;
struct _Evas_Engine_Info_Buffer
{
/* PRIVATE - don't mess with this baby or evas will poke its tongue out */
/* at you and make nasty noises */
Evas_Engine_Info magic;
struct {
int depth_type;
void *dest_buffer;
int dest_buffer_row_bytes;
char use_color_key : 1;
int alpha_threshold;
int color_key_r;
int color_key_g;
int color_key_b;
struct {
void * (*new_update_region) (int x, int y, int w, int h, int *row_bytes);
void (*free_update_region) (int x, int y, int w, int h, void *data);
} func;
} info;
};
#endif

View File

@ -0,0 +1,27 @@
#ifndef _EVAS_ENGINE_CAIRO_X11_H
#define _EVAS_ENGINE_CAIRO_X11_H
#include <X11/Xlib.h>
typedef struct _Evas_Engine_Info_Cairo_X11 Evas_Engine_Info_Cairo_X11;
struct _Evas_Engine_Info_Cairo_X11
{
/* PRIVATE - don't mess with this baby or evas will poke its tongue out */
/* at you and make nasty noises */
Evas_Engine_Info magic;
/* engine specific data & parameters it needs to set up */
struct {
Display *display;
Drawable drawable;
Visual *visual;
Colormap colormap;
int depth;
} info;
/* engine specific function calls to query stuff about the destination */
/* engine (what visual & colormap & depth to use, performance info etc. */
};
#endif

View File

@ -0,0 +1,22 @@
#ifndef _EVAS_ENGINE_DIRECTFB_H
#define _EVAS_ENGINE_DIRECTFB_H
#include <directfb/directfb.h>
typedef struct _Evas_Engine_Info_DirectFB Evas_Engine_Info_DirectFB;
struct _Evas_Engine_Info_DirectFB
{
/* PRIVATE - don't mess with this baby or evas will poke its tongue out */
/* at you and make nasty noises */
Evas_Engine_Info magic;
struct {
IDirectFB *dfb;
IDirectFBSurface *surface;
DFBSurfaceDrawingFlags flags;
} info;
};
#endif

View File

@ -0,0 +1,22 @@
#ifndef _EVAS_ENGINE_FB_H
#define _EVAS_ENGINE_FB_H
typedef struct _Evas_Engine_Info_FB Evas_Engine_Info_FB;
struct _Evas_Engine_Info_FB
{
/* PRIVATE - don't mess with this baby or evas will poke its tongue out */
/* at you and make nasty noises */
Evas_Engine_Info magic;
struct {
int virtual_terminal;
int device_number;
int refresh;
int rotation;
} info;
};
#endif

View File

@ -0,0 +1,32 @@
#ifndef _EVAS_ENGINE_GL_X11_H
#define _EVAS_ENGINE_GL_X11_H
#include <X11/Xlib.h>
typedef struct _Evas_Engine_Info_GL_X11 Evas_Engine_Info_GL_X11;
struct _Evas_Engine_Info_GL_X11
{
/* PRIVATE - don't mess with this baby or evas will poke its tongue out */
/* at you and make nasty noises */
Evas_Engine_Info magic;
/* engine specific data & parameters it needs to set up */
struct {
Display *display;
Drawable drawable;
Visual *visual;
Colormap colormap;
int depth;
} info;
/* engine specific function calls to query stuff about the destination */
/* engine (what visual & colormap & depth to use, performance info etc. */
struct {
Visual * (*best_visual_get) (Display *disp, int screen);
Colormap (*best_colormap_get) (Display *disp, int screen);
int (*best_depth_get) (Display *disp, int screen);
} func;
};
#endif

View File

@ -0,0 +1,31 @@
#ifndef _EVAS_ENGINE_SOFTWARE_QTOPIA_H
#define _EVAS_ENGINE_SOFTWARE_QTOPIA_H
#ifdef EVAS_COMMON_H
#ifdef EVAS_PRIVATE_H
typedef void QWidget;
#endif
#endif
#ifndef EVAS_COMMON_H
#ifndef EVAS_PRIVATE_H
#include <qwidget.h>
#endif
#endif
typedef struct _Evas_Engine_Info_Software_Qtopia Evas_Engine_Info_Software_Qtopia;
struct _Evas_Engine_Info_Software_Qtopia
{
/* PRIVATE - don't mess with this baby or evas will poke its tongue out */
/* at you and make nasty noises */
Evas_Engine_Info magic;
struct {
QWidget *target;
int rotation;
} info;
};
#endif

View File

@ -0,0 +1,28 @@
#ifndef _EVAS_ENGINE_SOFTWARE_WIN32_GDI_H
#define _EVAS_ENGINE_SOFTWARE_WIN32_GDI_H
typedef struct _Evas_Engine_Info_Software_Win32_GDI Evas_Engine_Info_Software_Win32_GDI;
struct _Evas_Engine_Info_Software_Win32_GDI
{
/* PRIVATE - don't mess with this baby or evas will poke its tongue out */
/* at you and make nasty noises */
Evas_Engine_Info magic;
/* engine specific data & parameters it needs to set up */
struct {
HWND hwnd;
/*
Colormap colormap;
*/
int depth;
int rotation;
} info;
/* engine specific function calls to query stuff about the destination */
/* engine (what visual & colormap & depth to use, performance info etc. */
};
#endif

View File

@ -0,0 +1,48 @@
#ifndef _EVAS_ENGINE_SOFTWARE_X11_H
#define _EVAS_ENGINE_SOFTWARE_X11_H
#include <X11/Xlib.h>
typedef struct _Evas_Engine_Info_Software_X11 Evas_Engine_Info_Software_X11;
struct _Evas_Engine_Info_Software_X11
{
/* PRIVATE - don't mess with this baby or evas will poke its tongue out */
/* at you and make nasty noises */
Evas_Engine_Info magic;
/* engine specific data & parameters it needs to set up */
struct {
Display *display;
Drawable drawable;
Pixmap mask;
Visual *visual;
Colormap colormap;
int depth;
int rotation;
int alloc_grayscale : 1;
int debug : 1;
int shape_dither : 1;
int alloc_colors_max;
} info;
/* engine specific function calls to query stuff about the destination */
/* engine (what visual & colormap & depth to use, performance info etc. */
struct {
Visual * (*best_visual_get) (Display *disp, int screen);
Colormap (*best_colormap_get) (Display *disp, int screen);
int (*best_depth_get) (Display *disp, int screen);
Evas_Performance *(*performance_test) (Evas *e, Display *disp, Visual *vis, Colormap cmap, Drawable draw, int depth);
void (*performance_free) (Evas_Performance *perf);
char * (*performance_data_get) (Evas_Performance *perf);
char * (*performance_key_get) (Evas_Performance *perf);
Evas_Performance *(*performance_new) (Evas *e, Display *disp, Visual *vis, Colormap cmap, Drawable draw, int depth);
void (*performance_build) (Evas_Performance *perf, const char *data);
void (*performance_device_store) (Evas_Performance *perf);
} func;
};
#endif

View File

@ -0,0 +1,58 @@
#ifndef _EVAS_ENGINE_SOFTWARE_XCB_H
#define _EVAS_ENGINE_SOFTWARE_XCB_H
#include <X11/XCB/xcb.h>
typedef struct _Evas_Engine_Info_Software_Xcb Evas_Engine_Info_Software_Xcb;
struct _Evas_Engine_Info_Software_Xcb
{
/* PRIVATE - don't mess with this baby or evas will poke its tongue out */
/* at you and make nasty noises */
Evas_Engine_Info magic;
/* engine specific data & parameters it needs to set up */
struct {
XCBConnection *conn;
XCBDRAWABLE drawable;
XCBDRAWABLE mask;
XCBVISUALTYPE *visual;
XCBCOLORMAP colormap;
int depth;
int rotation;
int alloc_grayscale : 1;
int debug : 1;
int shape_dither : 1;
int alloc_colors_max;
} info;
/* engine specific function calls to query stuff about the destination */
/* engine (what visual & colormap & depth to use, performance info etc. */
struct {
XCBVISUALTYPE * (*best_visual_get) (XCBConnection *conn, int screen);
XCBCOLORMAP (*best_colormap_get) (XCBConnection *conn, int screen);
int (*best_depth_get) (XCBConnection *conn, int screen);
Evas_Performance *(*performance_test) (Evas *e,
XCBConnection *conn,
XCBVISUALTYPE *vis,
XCBCOLORMAP cmap,
XCBDRAWABLE draw,
int depth);
void (*performance_free) (Evas_Performance *perf);
char * (*performance_data_get) (Evas_Performance *perf);
char * (*performance_key_get) (Evas_Performance *perf);
Evas_Performance *(*performance_new) (Evas *e,
XCBConnection *conn,
XCBVISUALTYPE *vis,
XCBCOLORMAP cmap,
XCBDRAWABLE draw,
int depth);
void (*performance_build) (Evas_Performance *perf,
const char *data);
void (*performance_device_store) (Evas_Performance *perf);
} func;
};
#endif /* _EVAS_ENGINE_SOFTWARE_XCB_H */

View File

@ -0,0 +1,25 @@
#ifndef _EVAS_ENGINE_XRENDER_X11_H
#define _EVAS_ENGINE_XRENDER_X11_H
#include <X11/Xlib.h>
typedef struct _Evas_Engine_Info_XRender_X11 Evas_Engine_Info_XRender_X11;
struct _Evas_Engine_Info_XRender_X11
{
/* PRIVATE - don't mess with this baby or evas will poke its tongue out */
/* at you and make nasty noises */
Evas_Engine_Info magic;
/* engine specific data & parameters it needs to set up */
struct {
Display *display;
Drawable drawable;
Pixmap mask;
Visual *visual;
unsigned char destination_alpha : 1;
} info;
};
#endif

View File

@ -0,0 +1,14 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = buffer \
cairo_common \
cairo_x11 \
directfb \
fb \
gl_common \
gl_x11 \
software_qtopia \
software_win32_gdi \
software_x11 \
software_xcb \
xrender_x11

View File

@ -12,14 +12,20 @@ INCLUDES = -I. \
if BUILD_ENGINE_BUFFER
noinst_LTLIBRARIES = libevas_engine_buffer.la
libevas_engine_buffer_la_SOURCES = \
pkgdir = $(libdir)/evas/modules/engines/buffer/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
module_la_SOURCES = \
evas_engine.h \
evas_engine.c \
evas_outbuf.c
libevas_engine_buffer_la_DEPENDENCIES = \
module_la_LDFLAGS = -module -avoid-version \
-L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
module_la_DEPENDENCIES = \
$(top_builddir)/config.h
endif

View File

@ -1,7 +1,6 @@
#include "evas_common.h"
#include "evas_private.h"
#include "evas_engine.h"
#include "evas_engine_api_buffer.h"
#include "Evas_Engine_Buffer.h"
static void *evas_engine_buffer_info(Evas *e);
@ -1268,3 +1267,26 @@ evas_engine_buffer_font_cache_get(void *data)
re = (Render_Engine *)data;
return evas_common_font_cache_get();
}
int
module_open(Evas_Module *em)
{
if (!em) return 0;
em->functions = (void *)(&evas_engine_buffer_func);
return 1;
}
void
module_close(void)
{
}
Evas_Module_Api evas_modapi =
{
EVAS_MODULE_API_VERSION,
EVAS_MODULE_TYPE_ENGINE,
"buffer",
"none"
};

View File

@ -12,15 +12,19 @@ INCLUDES = -I. \
if BUILD_ENGINE_CAIRO_X11
noinst_LTLIBRARIES = libevas_engine_cairo_x11.la
libevas_engine_cairo_x11_la_SOURCES = \
pkgdir = $(libdir)/evas/modules/engines/cairo_x11/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
module_la_SOURCES = \
evas_engine.h \
evas_engine.c \
evas_x_main.c
libevas_engine_cairo_x11_la_LIBADD = @x_libs@ @CAIRO_LIBS@
module_la_LIBADD = @CAIRO_LIBS@ @x_libs@ ../cairo_common/libevas_engine_cairo_common.la
module_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
libevas_engine_cairo_x11_la_DEPENDENCIES = \
module_la_DEPENDENCIES = \
$(top_builddir)/config.h
endif

View File

@ -1285,3 +1285,23 @@ evas_engine_cairo_x11_font_cache_get(void *data)
re = (Render_Engine *)data;
return 0;
}
int module_open(Evas_Module *em)
{
if (!em) return 0;
em->functions = (void *)(&evas_engine_cairo_x11_func);
return 1;
}
void module_close(void)
{
}
Evas_Module_Api evas_modapi =
{
EVAS_MODULE_API_VERSION,
EVAS_MODULE_TYPE_ENGINE,
"cairo_x11",
"none"
};

View File

@ -12,16 +12,20 @@ INCLUDES = -I. \
if BUILD_ENGINE_DIRECTFB
noinst_LTLIBRARIES = libevas_engine_directfb.la
libevas_engine_directfb_la_SOURCES = \
pkgdir = $(libdir)/evas/modules/engines/directfb/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
module_la_SOURCES = \
evas_engine_dfb.c \
evas_engine_dfb_image_objects.c \
evas_engine_dfb_image_objects.h \
evas_engine_dfb.h
libevas_engine_directfb_la_LIBADD = @DIRECTFB_LIBS@
module_la_LIBADD = @DIRECTFB_LIBS@
module_la_LDFLAGS = -module -avoid-version \
-L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
libevas_engine_directfb_la_DEPENDENCIES = \
module_la_DEPENDENCIES = \
$(top_builddir)/config.h
endif

View File

@ -127,7 +127,7 @@ evas_engine_directfb_setup(Evas * e, void *in)
info = (Evas_Engine_Info_DirectFB *) in;
/* if we arent set to directfb, why the hell do we get called?! */
if (evas_output_method_get(e) != RENDER_METHOD_DIRECTFB)
if (evas_output_method_get(e) != evas_render_method_lookup("directfb"))
return;
/* lets just set up */
e->engine.data.output = evas_engine_directfb_output_setup(e->output.w,
@ -1085,3 +1085,24 @@ evas_engine_directfb_font_cache_get(void *data)
return evas_common_font_cache_get();
}
int module_open(Evas_Module *em)
{
if (!em) return 0;
em->functions = (void *)(&evas_engine_directfb_func);
return 1;
}
void module_close(void)
{
}
Evas_Module_Api evas_modapi =
{
EVAS_MODULE_API_VERSION,
EVAS_MODULE_TYPE_ENGINE,
"directfb",
"none"
};

View File

@ -2,7 +2,6 @@
#define EVAS_ENGINE_DFB_H
#include "evas_common.h"
#include "evas_private.h"
#include "evas_engine_api_directfb.h"
#include "Evas_Engine_DirectFB.h"
#include "evas_engine_dfb_image_objects.h"

View File

@ -13,17 +13,23 @@ INCLUDES = -I. \
if BUILD_ENGINE_FB
noinst_LTLIBRARIES = libevas_engine_fb.la
libevas_engine_fb_la_SOURCES = \
pkgdir = $(libdir)/evas/modules/engines/fb/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
module_la_SOURCES = \
evas_engine.h \
evas_fb.h \
evas_engine.c \
evas_fb_main.c \
evas_outbuf.c
libevas_engine_fb_la_DEPENDENCIES = \
module_la_DEPENDENCIES = \
$(top_builddir)/config.h
module_la_LDFLAGS = -module -avoid-version \
-L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
endif
EXTRA_DIST = \

View File

@ -1,7 +1,6 @@
#include "evas_common.h"
#include "evas_private.h"
#include "evas_engine.h"
#include "evas_engine_api_fb.h"
#include "Evas_Engine_FB.h"
static void *evas_engine_fb_info(Evas *e);
@ -1179,3 +1178,24 @@ evas_engine_fb_font_cache_get(void *data)
re = (Render_Engine *)data;
return evas_common_font_cache_get();
}
int module_open(Evas_Module *em)
{
if (!em) return 0;
em->functions = (void *)(&evas_engine_fb_func);
return 1;
}
void module_close(void)
{
}
Evas_Module_Api evas_modapi =
{
EVAS_MODULE_API_VERSION,
EVAS_MODULE_TYPE_ENGINE,
"fb",
"none"
};

View File

@ -12,15 +12,19 @@ INCLUDES = -I. \
if BUILD_ENGINE_GL_X11
noinst_LTLIBRARIES = libevas_engine_gl_x11.la
libevas_engine_gl_x11_la_SOURCES = \
pkgdir = $(libdir)/evas/modules/engines/gl_x11/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
module_la_SOURCES = \
evas_engine.h \
evas_engine.c \
evas_x_main.c
libevas_engine_gl_x11_la_LIBADD = @x_libs@ @gl_libs@
module_la_LIBADD = @gl_libs@ @x_libs@ ../gl_common/libevas_engine_gl_common.la
module_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
libevas_engine_gl_x11_la_DEPENDENCIES = \
module_la_DEPENDENCIES = \
$(top_builddir)/config.h
endif

View File

@ -1216,3 +1216,23 @@ evas_engine_gl_x11_best_depth_get(Display *disp, int screen)
if (!_evas_gl_x11_vi) return 0;
return _evas_gl_x11_vi->depth;
}
int module_open(Evas_Module *em)
{
if (!em) return 0;
em->functions = (void *)(&evas_engine_gl_x11_func);
return 1;
}
void module_close(void)
{
}
Evas_Module_Api evas_modapi =
{
EVAS_MODULE_API_VERSION,
EVAS_MODULE_TYPE_ENGINE,
"gl_x11",
"none"
};

View File

@ -14,16 +14,20 @@ CXXFLAGS = $(CFLAGS) -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -DNO_DEBUG
if BUILD_ENGINE_SOFTWARE_QTOPIA
noinst_LTLIBRARIES = libevas_engine_software_qtopia.la
libevas_engine_software_qtopia_la_SOURCES = \
pkgdir = $(libdir)/evas/modules/engines/software_qtopia/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
module_la_SOURCES = \
evas_engine.h \
evas_engine.c \
evas_outbuf.c \
evas_qt_main.cpp
libevas_engine_software_qtopia_la_LIBADD = @qt_libs@
module_la_LIBADD = @@qt_libs@@ ../cairo_common/libevas_engine_cairo_common.la
module_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
libevas_engine_software_qtopia_la_DEPENDENCIES = \
module_la_DEPENDENCIES = \
$(top_builddir)/config.h
endif

View File

@ -12,8 +12,11 @@ INCLUDES = -I. \
if BUILD_ENGINE_SOFTWARE_X11
noinst_LTLIBRARIES = libevas_engine_software_x11.la
libevas_engine_software_x11_la_SOURCES = \
pkgdir = $(libdir)/evas/modules/engines/software_x11/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
module_la_SOURCES = \
evas_engine.h \
evas_engine.c \
evas_outbuf.c \
@ -21,9 +24,11 @@ evas_x_buffer.c \
evas_x_color.c \
evas_x_main.c
libevas_engine_software_x11_la_LIBADD = @x_libs@
libevas_engine_software_x11_la_DEPENDENCIES = \
module_la_LIBADD = @x_libs@
module_la_LDFLAGS = -module -avoid-version \
-L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
module_la_DEPENDENCIES = \
$(top_builddir)/config.h
endif

Some files were not shown because too many files have changed in this diff Show More