evas: remove Evas Cairo backend.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 5 Apr 2011 13:00:23 +0000 (13:00 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 5 Apr 2011 13:00:23 +0000 (13:00 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@58359 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

21 files changed:
ChangeLog
Makefile.am
configure.ac
evas-cairo-x11.pc.in [deleted file]
m4/evas_check_engine.m4
src/lib/Makefile.am
src/lib/canvas/evas_main.c
src/lib/file/evas_module.c
src/lib/include/evas_cairo_common.h [deleted file]
src/modules/engines/Makefile.am
src/modules/engines/cairo_common/.cvsignore [deleted file]
src/modules/engines/cairo_common/Makefile.am [deleted file]
src/modules/engines/cairo_common/evas_cairo_common.h [deleted file]
src/modules/engines/cairo_common/evas_cairo_main.c [deleted file]
src/modules/engines/cairo_common/evas_cairo_private.h [deleted file]
src/modules/engines/cairo_x11/.cvsignore [deleted file]
src/modules/engines/cairo_x11/Evas_Engine_Cairo_X11.h [deleted file]
src/modules/engines/cairo_x11/Makefile.am [deleted file]
src/modules/engines/cairo_x11/evas_engine.c [deleted file]
src/modules/engines/cairo_x11/evas_engine.h [deleted file]
src/modules/engines/cairo_x11/evas_x_main.c [deleted file]

index 93d4470..4fc6f88 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 2011-04-05  Cedric Bail
 
        * Remove Evas Quartz backend.
+       * Remove Cairo backend.
index 52c2e8e..66dd0bf 100644 (file)
@@ -32,7 +32,6 @@ autogen.sh \
 README.in \
 README \
 evas.pc.in \
-evas-cairo-x11.pc.in \
 evas-directfb.pc.in \
 evas-fb.pc.in \
 evas-opengl-x11.pc.in \
@@ -97,10 +96,6 @@ if BUILD_ENGINE_GL_GLEW
 pkgconfig_DATA += evas-opengl-glew.pc
 endif
 
-#if BUILD_ENGINE_CAIRO_X11
-#pkgconfig_DATA += evas-cairo-x11.pc
-#endif
-
 if BUILD_ENGINE_XRENDER_X11
 pkgconfig_DATA += evas-xrender-x11.pc
 endif
index c59bd31..e1b23ac 100644 (file)
@@ -97,7 +97,6 @@ want_evas_engine_software_xlib="no"
 want_evas_engine_xrender_x11="no"
 want_evas_engine_gl_x11="no"
 want_evas_engine_gl_sdl="no"
-want_evas_engine_cairo_x11="no"
 want_evas_engine_software_xcb="no"
 want_evas_engine_xrender_xcb="no"
 want_evas_engine_software_gdi="no"
@@ -585,9 +584,6 @@ EVAS_CHECK_ENGINE([xrender-x11], [${want_evas_engine_xrender_x11}], [yes], [XRen
 
 EVAS_CHECK_ENGINE([gl-x11], [${want_evas_engine_gl_x11}], [yes], [OpenGL X11])
 
-# disable cairo engine for the release
-#EVAS_CHECK_ENGINE([cairo-x11], [${want_evas_engine_cairo_x11}], [yes], [Cairo X11])
-
 EVAS_CHECK_ENGINE([software-xcb], [${want_evas_engine_software_xcb}], [no], [Software XCB])
 
 EVAS_CHECK_ENGINE([xrender-xcb], [${want_evas_engine_xrender_xcb}], [no], [XRender XCB])
@@ -619,14 +615,6 @@ EVAS_CHECK_ENGINE([software-16-ddraw], [${want_evas_engine_software_16_ddraw}],
 
 EVAS_CHECK_ENGINE([software-16-wince], [${want_evas_engine_software_16_wince}], [no], [Software Windows CE 16 bits])
 
-# common cairo
-#have_evas_engine_cairo_common="no"
-#if test "x${have_evas_engine_cairo_x11}" = "xyes" ; then
-#   have_evas_engine_cairo_common="yes"
-#   AC_DEFINE([BUILD_ENGINE_CAIRO_COMMON], [1], [Generic Cairo Rendering Support])
-#fi
-#AM_CONDITIONAL([BUILD_ENGINE_CAIRO_COMMON], [test "x$have_evas_engine_cairo_common" = "xyes"])
-
 # common gl
 have_evas_engine_gl_common="no"
 have_static_evas_engine_gl_common="no"
@@ -1623,10 +1611,7 @@ evas.spec
 ])
 
 #disabled for the release:
-# evas-cairo-x11.pc
 # evas-software-qtopia.pc
-# src/modules/engines/cairo_common/Makefile
-# src/modules/engines/cairo_x11/Makefile
 # src/modules/engines/software_qtopia/Makefile
 
 
@@ -1676,7 +1661,6 @@ if test "x$have_evas_engine_gl_x11" = "xyes"; then
 else
   echo
 fi
-dnl echo "  Cairo X11..................: $have_evas_engine_cairo_x11"
 echo "  Software GDI...............: $have_evas_engine_software_gdi"
 echo "  Software DirectDraw........: $have_evas_engine_software_ddraw"
 echo "  Direct3d...................: $have_evas_engine_direct3d"
diff --git a/evas-cairo-x11.pc.in b/evas-cairo-x11.pc.in
deleted file mode 100644 (file)
index 4f5c9cf..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Name: evas-cairo-x11
-Description: Evas Cairo X11 engine
-Version: @VERSION@
index 8809773..8b10306 100644 (file)
@@ -220,53 +220,6 @@ fi
 
 ])
 
-dnl use: EVAS_CHECK_ENGINE_DEP_CAIRO_X11(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-
-AC_DEFUN([EVAS_CHECK_ENGINE_DEP_CAIRO_X11],
-[
-
-requirement=""
-have_dep="no"
-evas_engine_[]$1[]_cflags=""
-evas_engine_[]$1[]_libs=""
-
-AC_PATH_X
-AC_PATH_XTRA
-
-AC_CHECK_HEADER([X11/X.h],
-   [PKG_CHECK_MODULES([CAIRO],
-       [cairo >= 1.0.0],
-       [have_dep="yes" requirement="cairo"]
-    )]
-)
-
-if test "x${have_dep}" = "xyes" ; then
-   if test "x$2" = "xyes" ; then
-      x_libs="${x_libs} -lX11 -lXext"
-   else
-      x_dir=${x_dir:-/usr/X11R6}
-      x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
-      x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext"
-   fi
-   evas_engine_[]$1[]_cflags="${CAIRO_CFLAGS} ${x_cflags}"
-   evas_engine_[]$1[]_libs="${CAIRO_LIBS} ${x_libs}"
-fi
-
-AC_SUBST([evas_engine_$1_cflags])
-AC_SUBST([evas_engine_$1_libs])
-
-if test "x$3" = "xstatic" ; then
-   requirement_evas="${requirement} ${requirement_evas}"
-fi
-
-if test "x${have_dep}" = "xyes" ; then
-  m4_default([$4], [:])
-else
-  m4_default([$5], [:])
-fi
-
-])
-
 dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_XCB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
 
 AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_XCB],
index 12619ad..8624b5f 100644 (file)
@@ -179,15 +179,6 @@ EVAS_STATIC_LIBADD += @evas_image_loader_xpm_libs@
 endif
 
 
-#if EVAS_STATIC_BUILD_CAIRO_X11
-#SUBDIRS += \
-#      ../modules/engines/cairo_common \
-#      ../modules/engines/cairo_x11
-#EVAS_STATIC_MODULE += \
-#      ../modules/engines/cairo_common/libevas_engine_cairo_common.la \
-#      ../modules/engines/cairo_x11/libevas_engine_cairo_x11.la
-#EVAS_STATIC_LIBADD += @CAIRO_CFLAGS@
-#endif
 #if EVAS_STATIC_BUILD_SOFTWARE_QTOPIA
 #SUBDIRS += ../modules/engines/software_qtopia/
 #EVAS_STATIC_MODULE += ../modules/engines/software_qtopia/libevas_engine_software_qtopia.la
index 32fd34f..9352e99 100644 (file)
@@ -840,9 +840,6 @@ evas_render_method_list(void)
 #ifdef BUILD_ENGINE_GL_GLEW
    methods = eina_list_append(methods, "gl_glew");
 #endif
-#ifdef BUILD_ENGINE_CAIRO_X11
-   methods = eina_list_append(methods, "cairo_x11");
-#endif
 #ifdef BUILD_ENGINE_DIRECTFB
    methods = eina_list_append(methods, "directfb");
 #endif
index 5b20190..72ff6a6 100644 (file)
@@ -91,7 +91,6 @@ evas_module_paths_init(void)
   { evas_##Tn##_##Name##_init, evas_##Tn##_##Name##_shutdown }
 
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, buffer);
-EVAS_EINA_STATIC_MODULE_DEFINE(engine, cairo_x11);
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, direct3d);
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, directfb);
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, fb);
@@ -138,9 +137,6 @@ static const struct {
 #ifdef EVAS_STATIC_BUILD_BUFFER
   EVAS_EINA_STATIC_MODULE_USE(engine, buffer),
 #endif
-#ifdef EVAS_STATIC_BUILD_CAIRO_X11
-  EVAS_EINA_STATIC_MODULE_USE(engine, cairo_x11),
-#endif
 #ifdef EVAS_STATIC_BUILD_DIRECT3D
   EVAS_EINA_STATIC_MODULE_USE(engine, direct3d),
 #endif
diff --git a/src/lib/include/evas_cairo_common.h b/src/lib/include/evas_cairo_common.h
deleted file mode 100644 (file)
index 57fc791..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-#ifndef EVAS_CAIRO_COMMON_H
-#define EVAS_CAIRO_COMMON_H
-
-#include "evas_common.h"
-#include "config.h"
-
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <sys/time.h>
-#include <unistd.h>
-
-#include <X11/Xlib.h>
-#include <X11/Xatom.h>
-#include <X11/Xutil.h>
-
-#include <cairo.h>
-#include <cairo-xlib.h>
-
-typedef struct _Evas_Cairo_Context                   Evas_Cairo_Context;
-typedef struct _Evas_Cairo_Image                     Evas_Cairo_Image;
-typedef struct _Evas_Cairo_Polygon                   Evas_Cairo_Polygon;
-typedef struct _Evas_Cairo_Polygon_Point             Evas_Cairo_Polygon_Point;
-
-struct _Evas_Cairo_Context
-{
-   cairo_t         *cairo;
-
-   struct {
-      double r, g, b, a;
-   } col;
-   struct {
-      unsigned int set : 1;
-      double r, g, b, a;
-   } mul;
-};
-
-struct _Evas_Cairo_Image
-{
-   RGBA_Image         *im;
-   int                 references;
-   DATA32             *mulpix;
-   cairo_surface_t    *surface;
-   cairo_pattern_t    *pattern;
-#if 0
-   Evas_Cairo_Context *cc;
-   char                dirty : 1;
-   char                cached : 1;
-#endif
-};
-
-struct _Evas_Cairo_Polygon
-{
-   Eina_List *points;
-};
-
-struct _Evas_Cairo_Polygon_Point
-{
-   int x, y;
-};
-
-#if 0
-struct _Evas_Cairo_Context
-{
-   unsigned char   r, g, b, a;
-
-   struct {
-      char         size : 1;
-      char         dither : 1;
-      char         blend : 1;
-      char         color : 1;
-      char         texture : 1;
-      char         clip : 1;
-      char         buf : 1;
-      char         other : 1;
-   } change;
-
-   struct {
-      char         active : 1;
-      int          x, y, w, h;
-   } clip;
-
-   struct {
-      int checked : 1;
-      int sgis_generate_mipmap : 1;
-      int nv_texture_rectangle : 1;
-   } ext;
-
-   int             references;
-
-   Eina_List      *images;
-};
-
-struct _Evas_Cairo_Image
-{
-   Evas_Cairo_Context *cc;
-   RGBA_Image         *im;
-   cairo_surface_t    *surf;
-   DATA32             *mulpix;
-   int                 references;
-   char                dirty : 1;
-   char                cached : 1;
-};
-
-struct _Evas_Cairo_Polygon
-{
-   Eina_List *points;
-};
-
-struct _Evas_Cairo_Polygon_Point
-{
-   int x, y;
-};
-#endif
-
-/*
-Evas_Engine_GL_Context  *evas_gl_common_context_new(void);
-void              evas_gl_common_context_free(Evas_Engine_GL_Context *gc);
-void              evas_gl_common_context_use(Evas_Engine_GL_Context *gc);
-void              evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h);
-void              evas_gl_common_context_color_set(Evas_Engine_GL_Context *gc, int r, int g, int b, int a);
-void              evas_gl_common_context_blend_set(Evas_Engine_GL_Context *gc, int blend);
-void              evas_gl_common_context_dither_set(Evas_Engine_GL_Context *gc, int dither);
-void              evas_gl_common_context_texture_set(Evas_Engine_GL_Context *gc, Evas_GL_Texture *tex, int smooth, int w, int h);
-void              evas_gl_common_context_font_texture_set(Evas_Engine_GL_Context *gc, Evas_GL_Font_Texture *ft);
-void              evas_gl_common_context_clip_set(Evas_Engine_GL_Context *gc, int on, int x, int y, int w, int h);
-void              evas_gl_common_context_read_buf_set(Evas_Engine_GL_Context *gc, GLenum buf);
-void              evas_gl_common_context_write_buf_set(Evas_Engine_GL_Context *gc, GLenum buf);
-
-Evas_GL_Texture  *evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im, int smooth);
-void              evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im, int smooth);
-void              evas_gl_common_texture_free(Evas_GL_Texture *tex);
-void              evas_gl_common_texture_mipmaps_build(Evas_GL_Texture *tex, RGBA_Image *im, int smooth);
-
-Evas_GL_Image    *evas_gl_common_image_load(Evas_Engine_GL_Context *gc, char *file, char *key);
-Evas_GL_Image    *evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, int w, int h, int *data);
-Evas_GL_Image    *evas_gl_common_image_new_from_copied_data(Evas_Engine_GL_Context *gc, int w, int h, int *data);
-Evas_GL_Image    *evas_gl_common_image_new(Evas_Engine_GL_Context *gc, int w, int h);
-void              evas_gl_common_image_free(Evas_GL_Image *im);
-void              evas_gl_common_image_dirty(Evas_GL_Image *im);
-
-Evas_GL_Polygon  *evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y);
-Evas_GL_Polygon  *evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly);
-
-void              evas_gl_common_swap_rect(Evas_Engine_GL_Context *gc, int x, int y, int w, int h);
-
-void              evas_gl_common_rect_draw(Evas_Engine_GL_Context *gc, RGBA_Draw_Context *dc, int x, int y, int w, int h);
-void              evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, RGBA_Draw_Context *dc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth);
-void              evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2);
-void              evas_gl_common_poly_draw(Evas_Engine_GL_Context *gc, RGBA_Draw_Context *dc, Evas_GL_Polygon *poly);
-
-Evas_GL_Font_Texture *evas_gl_font_texture_new(Evas_Engine_GL_Context *gc, RGBA_Font_Glyph *fg);
-void                  evas_gl_font_texture_free(Evas_GL_Font_Texture *ft);
-void                  evas_gl_font_texture_draw(Evas_Engine_GL_Context *gc, void *surface, RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg, int x, int y);
-*/
-
-#endif
index a2f25e8..4eda744 100644 (file)
@@ -65,12 +65,3 @@ if !EVAS_STATIC_BUILD_XRENDER_X11
 SUBDIRS += xrender_x11
 endif
 
-
-#if !EVAS_STATIC_BUILD_CAIRO_X11
-#SUBDIRS +=
-#cairo_common
-#cairo_x11
-#endif
-#if !EVAS_STATIC_BUILD_SOFTWARE_QTOPIA
-#SUBDIRS += software_qtopia
-#endif
diff --git a/src/modules/engines/cairo_common/.cvsignore b/src/modules/engines/cairo_common/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
diff --git a/src/modules/engines/cairo_common/Makefile.am b/src/modules/engines/cairo_common/Makefile.am
deleted file mode 100644 (file)
index 4ff6654..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = \
--I. \
--I$(top_srcdir)/src/lib \
--I$(top_srcdir)/src/lib/include \
-@FREETYPE_CFLAGS@ \
-@CAIRO_CFLAGS@ \
-@EINA_CFLAGS@
-
-if BUILD_ENGINE_CAIRO_COMMON
-
-noinst_LTLIBRARIES = libevas_engine_cairo_common.la
-
-libevas_engine_cairo_common_la_SOURCES = \
-evas_cairo_main.c
-
-libevas_engine_cairo_common_la_LIBADD = @EINA_LIBS@ @CAIRO_LIBS@ $(top_builddir)/src/lib/libevas.la
-
-endif
-
-EXTRA_DIST = \
-evas_cairo_private.h \
-evas_cairo_common.h
diff --git a/src/modules/engines/cairo_common/evas_cairo_common.h b/src/modules/engines/cairo_common/evas_cairo_common.h
deleted file mode 100644 (file)
index c7b119f..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef EVAS_CAIRO_COMMON_H
-#define EVAS_CAIRO_COMMON_H
-
-#include "evas_common.h"
-#include "config.h"
-
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <sys/time.h>
-#include <unistd.h>
-
-#include <X11/Xlib.h>
-#include <X11/Xatom.h>
-#include <X11/Xutil.h>
-
-#include <cairo.h>
-#include <cairo-xlib.h>
-
-typedef struct _Evas_Cairo_Context                   Evas_Cairo_Context;
-typedef struct _Evas_Cairo_Image                     Evas_Cairo_Image;
-typedef struct _Evas_Cairo_Polygon                   Evas_Cairo_Polygon;
-typedef struct _Evas_Cairo_Polygon_Point             Evas_Cairo_Polygon_Point;
-
-struct _Evas_Cairo_Context
-{
-   cairo_t         *cairo;
-
-   struct {
-      double r, g, b, a;
-   } col;
-   struct {
-      unsigned int set : 1;
-      double r, g, b, a;
-   } mul;
-};
-
-struct _Evas_Cairo_Image
-{
-   RGBA_Image         *im;
-   int                 references;
-   DATA32             *mulpix;
-   cairo_surface_t    *surface;
-   cairo_pattern_t    *pattern;
-};
-
-struct _Evas_Cairo_Polygon
-{
-   Eina_List *points;
-};
-
-struct _Evas_Cairo_Polygon_Point
-{
-   int x, y;
-};
-
-#endif
diff --git a/src/modules/engines/cairo_common/evas_cairo_main.c b/src/modules/engines/cairo_common/evas_cairo_main.c
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/src/modules/engines/cairo_common/evas_cairo_private.h b/src/modules/engines/cairo_common/evas_cairo_private.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/src/modules/engines/cairo_x11/.cvsignore b/src/modules/engines/cairo_x11/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
diff --git a/src/modules/engines/cairo_x11/Evas_Engine_Cairo_X11.h b/src/modules/engines/cairo_x11/Evas_Engine_Cairo_X11.h
deleted file mode 100644 (file)
index 65503a0..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#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. */
-
-   /* non-blocking or blocking mode */
-   Evas_Engine_Render_Mode render_mode;
-};
-#endif
-
-
diff --git a/src/modules/engines/cairo_x11/Makefile.am b/src/modules/engines/cairo_x11/Makefile.am
deleted file mode 100644 (file)
index d2fa180..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = \
--I. \
--I$(top_srcdir)/src/lib \
--I$(top_srcdir)/src/lib/include \
--I$(top_srcdir)/src/modules/engines/cairo_common \
-@FREETYPE_CFLAGS@ \
-@evas_engine_cairo_x11_cflags@ \
-@EINA_CFLAGS@
-
-if BUILD_ENGINE_CAIRO_X11
-
-CAIRO_X11_SOURCES = \
-evas_engine.c \
-evas_x_main.c
-
-CAIRO_X11_LIBADD = @evas_engine_cairo_x11_libs@ $(top_builddir)/src/modules/engines/cairo_common/libevas_engine_cairo_common.la
-
-
-includes_HEADERS = Evas_Engine_Cairo_X11.h
-includesdir = $(includedir)/evas-@VMAJ@
-
-if !EVAS_STATIC_BUILD_CAIRO_X11
-
-pkgdir = $(libdir)/evas/modules/engines/cairo_x11/$(MODULE_ARCH)
-pkg_LTLIBRARIES = module.la
-
-module_la_SOURCES = $(CAIRO_X11_SOURCES)
-
-module_la_LIBADD = @EINA_LIBS@ $(CAIRO_X11_SOURCES) $(top_builddir)/src/lib/libevas.la
-module_la_LDFLAGS = -module -avoid-version
-module_la_LIBTOOLFLAGS = --tag=disable-static
-
-else
-
-noinst_LTLIBRARIES = libevas_engine_cairo_x11.la
-
-libevas_engine_cairo_x11_la_SOURCES = $(CAIRO_X11_SOURCES)
-libevas_engine_cairo_x11_la_LIBADD = $(CAIRO_X11_LIBADD)
-
-endif
-endif
-
-EXTRA_DIST = evas_engine.h
diff --git a/src/modules/engines/cairo_x11/evas_engine.c b/src/modules/engines/cairo_x11/evas_engine.c
deleted file mode 100644 (file)
index 5a9881e..0000000
+++ /dev/null
@@ -1,1418 +0,0 @@
-#include <X11/Xlib.h>
-#include "evas_common.h"
-#include "evas_private.h"
-#include "evas_engine.h"
-#include "Evas_Engine_Cairo_X11.h"
-#include "evas_cairo_common.h"
-
-/* domain for eina_log */
-int _evas_engine_cairo_X11_log_dom = -1;
-
-static void *eng_info(Evas *e);
-static void eng_info_free(Evas *e, void *info);
-static int eng_setup(Evas *e, void *info);
-static void *eng_output_setup(int w, int h, Display *disp, Drawable draw, Visual *vis, Colormap cmap, int depth);
-static void eng_output_free(void *data);
-static void eng_output_resize(void *data, int w, int h);
-static void eng_output_tile_size_set(void *data, int w, int h);
-static void eng_output_redraws_rect_add(void *data, int x, int y, int w, int h);
-static void eng_output_redraws_rect_del(void *data, int x, int y, int w, int h);
-static void eng_output_redraws_clear(void *data);
-static void *eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch);
-static void eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h);
-static void eng_output_flush(void *data);
-
-static void *eng_context_new(void *data);
-static Eina_Bool eng_canvas_alpha_get(void *data, void *context);
-static void eng_context_free(void *data, void *context);
-static void eng_context_clip_set(void *data, void *context, int x, int y, int w, int h);
-static void eng_context_clip_clip(void *data, void *context, int x, int y, int w, int h);
-static void eng_context_clip_unset(void *data, void *context);
-static int eng_context_clip_get(void *data, void *context, int *x, int *y, int *w, int *h);
-static void eng_context_color_set(void *data, void *context, int r, int g, int b, int a);
-static int eng_context_color_get(void *data, void *context, int *r, int *g, int *b, int *a);
-static void eng_context_multiplier_set(void *data, void *context, int r, int g, int b, int a);
-static void eng_context_multiplier_unset(void *data, void *context);
-static int eng_context_multiplier_get(void *data, void *context, int *r, int *g, int *b, int *a);
-static void eng_context_cutout_add(void *data, void *context, int x, int y, int w, int h);
-static void eng_context_cutout_clear(void *data, void *context);
-static void eng_context_anti_alias_set(void *data, void *context, unsigned char aa);
-static unsigned char eng_context_anti_alias_get(void *data, void *context);
-static void eng_context_color_interpolation_set(void *data, void *context, int color_space);
-static int eng_context_color_interpolation_get(void *data, void *context);
-static void eng_context_render_op_set(void *data, void *context, int op);
-static int eng_context_render_op_get(void *data, void *context);
-
-static void eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h);
-
-static void eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int x2, int y2);
-
-static void *eng_polygon_point_add(void *data, void *context, void *polygon, int x, int y);
-static void *eng_polygon_points_clear(void *data, void *context, void *polygon);
-static void eng_polygon_draw(void *data, void *context, void *surface, void *polygon, int x, int y);
-
-static void *eng_image_load(void *data, char *file, char *key, int *error, Evas_Image_Load_Opts *lo);
-static void *eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
-static void *eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
-static void eng_image_free(void *data, void *image);
-static void eng_image_size_get(void *data, void *image, int *w, int *h);
-static void *eng_image_size_set(void *data, void *image, int w, int h);
-static void *eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h);
-static void *eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data);
-static void *eng_image_data_put(void *data, void *image, DATA32 *image_data);
-static void eng_image_data_preload_request(void *data, void *image, const void *target);
-static void eng_image_data_preload_cancel(void *data, void *image, const void *target);
-static void *eng_image_alpha_set(void *data, void *image, int has_alpha);
-static int eng_image_alpha_get(void *data, void *image);
-static void *eng_image_border_set(void *data, void *image, int l, int r, int t, int b);
-static void eng_image_border_get(void *data, void *image, int *l, int *r, int *t, int *b);
-static void eng_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth);
-static char *eng_image_comment_get(void *data, void *image, char *key);
-static char *eng_image_format_get(void *data, void *image);
-static void eng_image_colorspace_set(void *data, void *image, int cspace);
-static int eng_image_colorspace_get(void *data, void *image);
-static void eng_image_native_set(void *data, void *image, void *native);
-static void *eng_image_native_get(void *data, void *image);
-static void eng_image_cache_flush(void *data);
-static void eng_image_cache_set(void *data, int bytes);
-static int eng_image_cache_get(void *data);
-static void eng_image_scale_hint_set(void *data __UNUSED__, void *image, int hint);
-static int eng_image_scale_hint_get(void *data __UNUSED__, void *image);
-    
-static void *eng_font_load(void *data, char *name, int size);
-static void *eng_font_memory_load(void *data, char *name, int size, const void *fdata, int fdata_size);
-static void *eng_font_add(void *data, void *font, char *name, int size);
-static void *eng_font_memory_add(void *data, void *font, char *name, int size, const void *fdata, int fdata_size);
-static void eng_font_free(void *data, void *font);
-static int eng_font_ascent_get(void *data, void *font);
-static int eng_font_descent_get(void *data, void *font);
-static int eng_font_max_ascent_get(void *data, void *font);
-static int eng_font_max_descent_get(void *data, void *font);
-static void eng_font_string_size_get(void *data, void *font, char *text, int *w, int *h);
-static int eng_font_inset_get(void *data, void *font, const Evas_Text_Props *intl_props);
-static int eng_font_right_inset_get(void *data, void *font, const Evas_Text_Props *intl_props);
-static int eng_font_h_advance_get(void *data, void *font, char *text);
-static int eng_font_v_advance_get(void *data, void *font, char *text);
-static int eng_font_char_coords_get(void *data, void *font, char *text, int pos, int *cx, int *cy, int *cw, int *ch);
-static int eng_font_pen_coords_get(void *data, void *font, char *text, int pos, int *cpen_x, int *cy, int *cadv, int *ch);
-static Eina_Bool eng_font_text_props_info_create(void *data __UNUSED__, void *font, Eina_Unicode *text, Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len);
-static int eng_font_char_at_coords_get(void *data, void *font, char *text, int x, int y, int *cx, int *cy, int *cw, int *ch);
-static void eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, char *text);
-static void eng_font_cache_flush(void *data);
-static void eng_font_cache_set(void *data, int bytes);
-static int eng_font_cache_get(void *data);
-
-static void eng_font_hinting_set(void *data, void *font, int hinting);
-static int eng_font_hinting_can_hint(void *data, int hinting);
-
-static int eng_font_last_up_to_pos(void *data __UNUSED__, void *font, const char *text, int x, int y);
-
-typedef struct _Render_Engine Render_Engine;
-
-struct _Render_Engine
-{
-   Evas_Cairo_X11_Window *win;
-};
-
-static Evas_Func eng_func =
-{
-   eng_info,
-     eng_info_free,
-     eng_setup,
-     eng_output_free,
-     eng_output_resize,
-     eng_output_tile_size_set,
-     eng_output_redraws_rect_add,
-     eng_output_redraws_rect_del,
-     eng_output_redraws_clear,
-     eng_output_redraws_next_update_get,
-     eng_output_redraws_next_update_push,
-     eng_output_flush,
-     /* draw context virtual methods */
-     eng_context_new,
-     eng_canvas_alpha_get,
-     eng_context_free,
-     eng_context_clip_set,
-     eng_context_clip_clip,
-     eng_context_clip_unset,
-     eng_context_clip_get,
-     eng_context_color_set,
-     eng_context_color_get,
-     eng_context_multiplier_set,
-     eng_context_multiplier_unset,
-     eng_context_multiplier_get,
-     eng_context_cutout_add,
-     eng_context_cutout_clear,
-     eng_context_anti_alias_set,
-     eng_context_anti_alias_get,
-     eng_context_color_interpolation_set,
-     eng_context_color_interpolation_get,
-     eng_context_render_op_set,
-     eng_context_render_op_get,
-     /* rectangle draw funcs */
-     eng_rectangle_draw,
-     /* line draw funcs */
-     eng_line_draw,
-     /* polygon draw funcs */
-     eng_polygon_point_add,
-     eng_polygon_points_clear,
-     eng_polygon_draw,
-     /* image draw funcs */
-     eng_image_load,
-     eng_image_new_from_data,
-     eng_image_new_from_copied_data,
-     eng_image_free,
-     eng_image_size_get,
-     eng_image_size_set,
-     NULL,
-     eng_image_dirty_region,
-     eng_image_data_get,
-     eng_image_data_put,
-     eng_image_data_preload_request,
-     eng_image_data_preload_cancel,
-     eng_image_alpha_set,
-     eng_image_alpha_get,
-     eng_image_border_set,
-     eng_image_border_get,
-     eng_image_draw,
-     eng_image_comment_get,
-     eng_image_format_get,
-     eng_image_colorspace_set,
-     eng_image_colorspace_get,
-     eng_image_native_set,
-     eng_image_native_get,
-     /* image cache funcs */
-     eng_image_cache_flush,
-     eng_image_cache_set,
-     eng_image_cache_get,
-     /* font draw functions */
-     eng_font_load,
-     eng_font_memory_load,
-     eng_font_add,
-     eng_font_memory_add,
-     eng_font_free,
-     eng_font_ascent_get,
-     eng_font_descent_get,
-     eng_font_max_ascent_get,
-     eng_font_max_descent_get,
-     eng_font_string_size_get,
-     eng_font_inset_get,
-     eng_font_h_advance_get,
-     eng_font_v_advance_get,
-     eng_font_char_coords_get,
-     eng_font_char_at_coords_get,
-     eng_font_draw,
-     /* font cache functions */
-     eng_font_cache_flush,
-     eng_font_cache_set,
-     eng_font_cache_get,
-                              
-     eng_font_hinting_set,
-     eng_font_hinting_can_hint,
-     
-     eng_image_scale_hint_set,
-     eng_image_scale_hint_get,
-     /* more font draw functions */
-     eng_font_last_up_to_pos,
-     NULL, //   ORD(image_map_draw);
-     NULL, //   ORD(image_map_surface_new);
-     NULL, //   ORD(image_map_surface_free);
-     NULL, // eng_image_content_hint_set - software doesn't use it
-     NULL, // eng_image_content_hint_get - software doesn't use it
-     eng_font_pen_coords_get,
-     eng_font_text_props_info_create,
-     eng_font_right_inset_get
-     /* FUTURE software generic calls go here */
-};
-
-static void *
-eng_info(Evas *e)
-{
-   Evas_Engine_Info_Cairo_X11 *info;
-   INF("CAIRO: create info...");
-   info = calloc(1, sizeof(Evas_Engine_Info_Cairo_X11));
-   if (!info) return NULL;
-   info->magic.magic = rand();   
-   info->render_mode = EVAS_RENDER_MODE_BLOCKING;
-   return info;
-   e = NULL;
-}
-
-static void
-eng_info_free(Evas *e, void *info)
-{
-   Evas_Engine_Info_Cairo_X11 *in;
-   in = (Evas_Engine_Info_Cairo_X11 *)info;
-   free(in);
-}
-
-static int
-eng_setup(Evas *e, void *in)
-{
-   Render_Engine *re;
-   Evas_Engine_Info_Cairo_X11 *info;
-
-   info = (Evas_Engine_Info_Cairo_X11 *)in;
-   INF("CAIRO: setup info...");
-   if (!e->engine.data.output)
-     e->engine.data.output =
-     eng_output_setup(e->output.w,
-                                       e->output.h,
-                                       info->info.display,
-                                       info->info.drawable,
-                                       info->info.visual,
-                                       info->info.colormap,
-                                       info->info.depth);
-   if (!e->engine.data.output) return 0;
-
-   if (!e->engine.data.context)
-     e->engine.data.context =
-     e->engine.func->context_new(e->engine.data.output);
-   re = e->engine.data.output;
-
-   return 1;
-}
-
-static void *
-eng_output_setup(int w, int h, Display *disp, Drawable draw, Visual *vis, Colormap cmap, int depth)
-{
-   Render_Engine *re;
-
-   re = calloc(1, sizeof(Render_Engine));
-   if (!re)
-     return NULL;
-   re->win = eng_window_new(disp, draw,
-                                             0 /* FIXME: screen 0 assumption */,
-                                             vis, cmap, depth, w, h);
-   if (!re->win)
-     {
-       free(re);
-       return NULL;
-     }
-   INF("CAIRO: cairo window setup done.");
-   evas_common_cpu_init();
-
-   evas_common_blend_init();
-   evas_common_image_init();
-   evas_common_convert_init();
-   evas_common_scale_init();
-   evas_common_rectangle_init();
-   evas_common_polygon_init();
-   evas_common_line_init();
-   evas_common_font_init();
-   evas_common_draw_init();
-   evas_common_tilebuf_init();
-
-   return re;
-}
-
-static void
-eng_output_free(void *data)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-
-   eng_window_free(re->win);
-
-   free(re);
-
-   evas_common_font_shutdown();
-   evas_common_image_shutdown();
-}
-
-static void
-eng_output_resize(void *data, int w, int h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   re->win->w = w;
-   re->win->h = h;
-
-   eng_window_size_set(re->win, w, h);
-}
-
-static void
-eng_output_tile_size_set(void *data, int w, int h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   /* not used in cairo engine */
-}
-
-static void
-eng_output_redraws_rect_add(void *data, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-   /* FIXME? cairo_surface_mark_dirty_rectangle */
-
-   re = (Render_Engine *)data;
-   if (!re->win->draw.redraw)
-     {
-       re->win->draw.x1 = 0;
-       re->win->draw.y1 = 0;
-       re->win->draw.x2 = re->win->w - 1;
-       re->win->draw.y2 = re->win->h - 1;
-     }
-   else
-     {
-       if (x < re->win->draw.x1) re->win->draw.x1 = x;
-       if (y < re->win->draw.y1) re->win->draw.y1 = y;
-       if ((x + w - 1) > re->win->draw.x2) re->win->draw.x2 = x + w - 1;
-       if ((y + h - 1) > re->win->draw.y2) re->win->draw.y2 = y + h - 1;
-     }
-   re->win->draw.redraw = 1;
-}
-
-static void
-eng_output_redraws_rect_del(void *data, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   /* not used in cairo engine */
-}
-
-static void
-eng_output_redraws_clear(void *data)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   re->win->draw.redraw = 0;
-}
-
-static void *
-eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   if (!re->win->draw.redraw) return NULL;
-
-   if (x) *x = re->win->draw.x1;
-   if (y) *y = re->win->draw.y1;
-   if (w) *w = re->win->draw.x2 - re->win->draw.x1 + 1;
-   if (h) *h = re->win->draw.y2 - re->win->draw.y1 + 1;
-   if (cx) *cx = re->win->draw.x1;
-   if (cy) *cy = re->win->draw.y1;
-   if (cw) *cw = re->win->draw.x2 - re->win->draw.x1 + 1;
-   if (ch) *ch = re->win->draw.y2 - re->win->draw.y1 + 1;
-   return re;
-}
-
-static void
-eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   re->win->draw.redraw = 0;
-}
-
-static void
-eng_output_flush(void *data)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-   Eina_List *l;
-
-   re = (Render_Engine *)data;
-}
-
-static void *
-eng_context_new(void *data)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-
-   re = (Render_Engine *)data;
-   ctxt = calloc(1, sizeof(Evas_Cairo_Context));
-   if (!ctxt) return NULL;
-
-   ctxt->cairo = cairo_create(re->win->surface);
-
-   return ctxt;
-}
-
-static void
-eng_context_free(void *data, void *context)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-
-   re = (Render_Engine *)data;
-   ctxt = context;
-
-   cairo_destroy(ctxt->cairo);
-   free(ctxt);
-}
-
-static void
-eng_context_clip_set(void *data, void *context, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   /* not used in cairo engine */
-}
-
-static void
-eng_context_clip_clip(void *data, void *context, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   /* not used in cairo engine */
-}
-
-static void
-eng_context_clip_unset(void *data, void *context)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   /* not used in cairo engine */
-}
-
-static int
-eng_context_clip_get(void *data, void *context, int *x, int *y, int *w, int *h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   /* not used in cairo engine */
-   return 0;
-}
-
-static void
-eng_context_color_set(void *data, void *context, int r, int g, int b, int a)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-
-   ctxt->col.r = (double)r / 255.0;
-   ctxt->col.g = (double)g / 255.0;
-   ctxt->col.b = (double)b / 255.0;
-   ctxt->col.a = (double)a / 255.0;
-}
-
-static int
-eng_context_color_get(void *data, void *context, int *r, int *g, int *b, int *a)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-
-   if (r) *r = ctxt->col.r * 255;
-   if (g) *g = ctxt->col.g * 255;
-   if (b) *b = ctxt->col.b * 255;
-   if (a) *a = ctxt->col.a * 255;
-   return 1;
-}
-
-static void
-eng_context_multiplier_set(void *data, void *context, int r, int g, int b, int a)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-
-   ctxt->mul.r = (double)r / 255.0;
-   ctxt->mul.g = (double)g / 255.0;
-   ctxt->mul.b = (double)b / 255.0;
-   ctxt->mul.a = (double)a / 255.0;
-   ctxt->mul.set = 1;
-}
-
-static void
-eng_context_multiplier_unset(void *data, void *context)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-   ctxt->mul.set = 0;
-}
-
-static int
-eng_context_multiplier_get(void *data, void *context, int *r, int *g, int *b, int *a)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-
-   if (r) *r = ctxt->mul.r * 255;
-   if (g) *g = ctxt->mul.g * 255;
-   if (b) *b = ctxt->mul.b * 255;
-   if (a) *a = ctxt->mul.a * 255;
-   return ctxt->mul.set;
-}
-
-static void
-eng_context_cutout_add(void *data, void *context, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   /* not used in cairo engine */
-}
-
-static void
-eng_context_cutout_clear(void *data, void *context)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   /* not used in cairo engine */
-}
-
-static void
-eng_context_anti_alias_set(void *data, void *context, unsigned char aa)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-}
-
-static unsigned char
-eng_context_anti_alias_get(void *data, void *context)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   return 1;
-}
-
-static void
-eng_context_color_interpolation_set(void *data, void *context, int color_space)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-}
-
-static int
-eng_context_color_interpolation_get(void *data, void *context)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static void
-eng_context_render_op_set(void *data, void *context, int op)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-}
-
-static int
-eng_context_render_op_get(void *data, void *context)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-
-static void
-eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-   double r, g, b, a;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-
-   cairo_rectangle(ctxt->cairo, x, y, w, h);
-   r = ctxt->col.r;
-   g = ctxt->col.g;
-   b = ctxt->col.b;
-   a = ctxt->col.a;
-   if (ctxt->mul.set)
-     {
-       r *= ctxt->mul.r;
-       g *= ctxt->mul.g;
-       b *= ctxt->mul.b;
-       a *= ctxt->mul.a;
-     }
-   cairo_set_source_rgba(ctxt->cairo, r, g, b, a);
-   cairo_fill(ctxt->cairo);
-}
-
-static void
-eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int x2, int y2)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-   double r, g, b, a;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-
-   cairo_move_to(ctxt->cairo, x1, y1);
-   cairo_line_to(ctxt->cairo, x2, y2);
-   r = ctxt->col.r;
-   g = ctxt->col.g;
-   b = ctxt->col.b;
-   a = ctxt->col.a;
-   if (ctxt->mul.set)
-     {
-       r *= ctxt->mul.r;
-       g *= ctxt->mul.g;
-       b *= ctxt->mul.b;
-       a *= ctxt->mul.a;
-     }
-   cairo_set_source_rgba(ctxt->cairo, r, g, b, a);
-   cairo_stroke(ctxt->cairo);
-}
-
-static void *
-eng_polygon_point_add(void *data, void *context, void *polygon, int x, int y)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-   Evas_Cairo_Polygon *poly;
-   Evas_Cairo_Polygon_Point *pt;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-   poly = (Evas_Cairo_Polygon *)polygon;
-   if (!poly) poly = calloc(1, sizeof(Evas_Cairo_Polygon));
-
-   pt = malloc(sizeof(Evas_Cairo_Polygon_Point));
-   if (pt)
-     {
-       pt->x = x;
-       pt->y = y;
-       poly->points = eina_list_append(poly->points, pt);
-     }
-   return poly;
-}
-
-static void *
-eng_polygon_points_clear(void *data, void *context, void *polygon)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-   Evas_Cairo_Polygon *poly;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-   poly = (Evas_Cairo_Polygon *)polygon;
-   if (!poly) return NULL;
-
-   while (poly->points)
-     {
-       free(poly->points->data);
-       poly->points = eina_list_remove_list(poly->points, poly->points);
-     }
-   free(poly);
-
-   return NULL;
-}
-
-static void
-eng_polygon_draw(void *data, void *context, void *surface, void *polygon, int x, int y)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-   Evas_Cairo_Polygon *poly;
-   Evas_Cairo_Polygon_Point *pt;
-   double r, g, b, a;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-   poly = (Evas_Cairo_Polygon *)polygon;
-
-   pt = poly->points->data;
-   if (pt)
-     {
-       Eina_List *l;
-       cairo_move_to(ctxt->cairo, pt->x + x, pt->y + y);
-       EINA_LIST_FOREACH(poly->points->next, l, pt)
-         cairo_line_to(ctxt->cairo, pt->x + x, pt->y + y);
-     }
-   r = ctxt->col.r;
-   g = ctxt->col.g;
-   b = ctxt->col.b;
-   a = ctxt->col.a;
-   if (ctxt->mul.set)
-     {
-       r *= ctxt->mul.r;
-       g *= ctxt->mul.g;
-       b *= ctxt->mul.b;
-       a *= ctxt->mul.a;
-     }
-   cairo_set_source_rgba(ctxt->cairo, r, g, b, a);
-   cairo_stroke(ctxt->cairo);
-}
-
-static void *
-eng_image_load(void *data, char *file, char *key, int *error, Evas_Image_Load_Opts *lo)
-{
-   Render_Engine *re;
-   Evas_Cairo_Image *im;
-
-   re = (Render_Engine *)data;
-   im = calloc(1, sizeof(Evas_Cairo_Image));
-   if (!im)
-     {
-       *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
-       return NULL;
-     }
-
-   *error = EVAS_LOAD_ERROR_NONE;
-   im->im = evas_common_load_image_from_file(file, key, lo, error);
-   if (!im->im)
-     {
-       free(im);
-       return NULL;
-     }
-   im->references = 1;
-   return im;
-}
-
-static void *
-eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
-{
-   Render_Engine *re;
-   Evas_Cairo_Image *im;
-
-   re = (Render_Engine *)data;
-
-   /* FIXME, cache! */
-   im = calloc(1, sizeof(Evas_Cairo_Image));
-   if (!im) return NULL;
-
-   im->im = evas_common_image_new();
-   if (!im->im)
-     {
-       free(im);
-       return NULL;
-     }
-   im->im->image = evas_common_image_surface_new(im->im);
-   if (!im->im->image)
-     {
-       evas_common_image_free(im->im);
-       free(im);
-       return NULL;
-     }
-
-   im->im->image->w = w;
-   im->im->image->h = h;
-   im->im->image->data = image_data;
-   im->im->image->no_free = 1;
-   im->references = 1;
-   return im;
-}
-
-static void *
-eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
-{
-   Render_Engine *re;
-   Evas_Cairo_Image *im;
-
-   re = (Render_Engine *)data;
-
-   /* FIXME, cache! */
-   im = calloc(1, sizeof(Evas_Cairo_Image));
-   if (!im) return NULL;
-   im->references = 1;
-   im->im = evas_common_image_create(w, h);
-   if (!im->im)
-     {
-       free(im);
-       return NULL;
-     }
-   if (image_data)
-     memcpy(im->im->image->data, image_data, w * h * sizeof(DATA32));
-   return im;
-}
-
-static void
-eng_image_free(void *data, void *image)
-{
-   Render_Engine *re;
-   Evas_Cairo_Image *im;
-
-   re = (Render_Engine *)data;
-   im = (Evas_Cairo_Image *)image;
-   evas_common_image_unref(im->im);
-   if (im->surface) cairo_surface_destroy(im->surface);
-   if (im->pattern) cairo_pattern_destroy(im->pattern);
-   free(im);
-}
-
-static void
-eng_image_size_get(void *data, void *image, int *w, int *h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   if (!image)
-     {
-       if (w) *w = 0;
-       if (h) *h = 0;
-     }
-   else
-     {
-       Evas_Cairo_Image *im;
-
-       im = image;
-       if (w) *w = im->im->image->w;
-       if (h) *h = im->im->image->h;
-     }
-}
-
-static void *
-eng_image_size_set(void *data, void *image, int w, int h)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   return image;
-}
-
-static void *
-eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   return image;
-}
-
-static void *
-eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   *image_data = NULL;
-   return image;
-}
-
-static void *
-eng_image_data_put(void *data, void *image, DATA32 *image_data)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   return image;
-}
-
-static void
-eng_image_data_preload_request(void *data, void *image, const void *target)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   return image;
-}
-
-static void
-eng_image_data_preload_cancel(void *data, void *image, const void *target)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   return image;
-}
-
-static void *
-eng_image_alpha_set(void *data, void *image, int has_alpha)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   return image;
-}
-
-static int
-eng_image_alpha_get(void *data, void *image)
-{
-   Render_Engine *re;
-   Evas_Cairo_Image *im;
-
-   re = (Render_Engine *)data;
-   if (!image) return 0;
-
-   im = image;
-   if (im->im->cache_entry.flags.alpha) return 1;
-   return 0;
-}
-
-static void *
-eng_image_border_set(void *data, void *image, int l, int r, int t, int b)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   return image;
-}
-
-static void
-eng_image_border_get(void *data, void *image, int *l, int *r, int *t, int *b)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   return;
-}
-
-static void
-eng_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-   Evas_Cairo_Image *im;
-   DATA32 *pix;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-   if (!image) return;
-
-   im = image;
-   evas_common_load_image_data_from_file(im->im);
-   pix = im->im->image->data;
-   if (pix)
-     {
-       if (!im->surface)
-         {
-            im->mulpix = malloc(im->im->image->w * im->im->image->h * sizeof(DATA32));
-            if (im->mulpix)
-              {
-                 int i, n;
-                 DATA32 *p;
-
-                 n = im->im->image->w * im->im->image->h;
-                 p = im->mulpix;
-                 for (i = 0; i < n; i++)
-                   {
-                      int a;
-
-                      a = A_VAL(pix);
-                      R_VAL(p) = (R_VAL(pix) * a) / 255;
-                      G_VAL(p) = (G_VAL(pix) * a) / 255;
-                      B_VAL(p) = (B_VAL(pix) * a) / 255;
-                      A_VAL(p) = a;
-                      p++;
-                      pix++;
-                   }
-                 im->surface = cairo_image_surface_create_for_data(im->mulpix,
-                                                                   CAIRO_FORMAT_ARGB32,
-                                                                   im->im->image->w,
-                                                                   im->im->image->h,
-                                                                   0);
-                 im->pattern = cairo_pattern_create_for_surface(im->surface);
-              }
-         }
-
-       if (smooth)
-         cairo_pattern_set_filter(im->pattern, CAIRO_FILTER_BILINEAR);
-       else
-         cairo_pattern_set_filter(im->pattern, CAIRO_FILTER_NEAREST);
-       cairo_save(ctxt->cairo);
-       cairo_translate(ctxt->cairo, dst_x, dst_y);
-       cairo_scale(ctxt->cairo,
-                   (double)src_w / (double)dst_w,
-                   (double)src_h / (double)dst_h);
-       cairo_move_to(ctxt->cairo, 0, 0);
-       //     cairo_set_rgb_color(re->win->cairo,
-       //                        (double)(R_VAL(((RGBA_Draw_Context *)context)->col.col)) / 255.0,
-       //                        (double)(R_VAL(((RGBA_Draw_Context *)context)->col.col)) / 255.0,
-       //                        (double)(R_VAL(((RGBA_Draw_Context *)context)->col.col)) / 255.0);
-       //     cairo_set_alpha(re->win->cairo,
-       //                   (double)(A_VAL(((RGBA_Draw_Context *)context)->col.col)) / 255.0);
-       cairo_set_source_surface(ctxt->cairo,
-                                im->surface,
-                                im->im->image->w,
-                                im->im->image->h);
-       cairo_paint(ctxt->cairo);
-       cairo_restore(ctxt->cairo);
-     }
-}
-
-static char *
-eng_image_comment_get(void *data, void *image, char *key)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   return NULL;
-}
-
-static char *
-eng_image_format_get(void *data, void *image)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   return NULL;
-}
-
-static void
-eng_image_colorspace_set(void *data, void *image, int cspace)
-{
-}
-
-static int
-eng_image_colorspace_get(void *data, void *image)
-{
-   return EVAS_COLORSPACE_ARGB8888;
-}
-
-static void
-eng_image_native_set(void *data, void *image, void *native)
-{
-}
-
-static void *
-eng_image_native_get(void *data, void *image)
-{
-   return NULL;
-}
-
-static void
-eng_image_cache_flush(void *data)
-{
-   Render_Engine *re;
-   int tmp_size;
-
-   re = (Render_Engine *)data;
-   tmp_size = evas_common_image_get_cache();
-   evas_common_image_set_cache(0);
-   evas_common_image_set_cache(tmp_size);
-}
-
-static void
-eng_image_cache_set(void *data, int bytes)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   evas_common_image_set_cache(bytes);
-}
-
-static int
-eng_image_cache_get(void *data)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   return evas_common_image_get_cache();
-}
-
-static void
-eng_image_scale_hint_set(void *data __UNUSED__, void *image, int hint)
-{
-}
-
-static int
-eng_image_scale_hint_get(void *data __UNUSED__, void *image)
-{
-   return EVAS_IMAGE_SCALE_HINT_NONE;
-}
-
-static void *
-eng_font_load(void *data, char *name, int size)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return NULL;
-}
-
-static void *
-eng_font_memory_load(void *data, char *name, int size, const void *fdata, int fdata_size)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return NULL;
-}
-
-static void *
-eng_font_add(void *data, void *font, char *name, int size)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return NULL;
-}
-
-static void *
-eng_font_memory_add(void *data, void *font, char *name, int size, const void *fdata, int fdata_size)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return NULL;
-}
-
-static void
-eng_font_free(void *data, void *font)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-}
-
-static int
-eng_font_ascent_get(void *data, void *font)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static int
-eng_font_descent_get(void *data, void *font)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static int
-eng_font_max_ascent_get(void *data, void *font)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static int
-eng_font_max_descent_get(void *data, void *font)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static void
-eng_font_string_size_get(void *data, void *font, char *text, int *w, int *h)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-}
-
-static int
-eng_font_inset_get(void *data, void *font, const Evas_Text_Props *intl_props)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static int
-eng_font_h_advance_get(void *data, void *font, char *text)
-{
-   Render_Engine *re;
-   int h, v;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static int
-eng_font_v_advance_get(void *data, void *font, char *text)
-{
-   Render_Engine *re;
-   int h, v;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static int
-eng_font_char_coords_get(void *data, void *font, char *text, int pos, int *cx, int *cy, int *cw, int *ch)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static int
-eng_font_pen_coords_get(void *data, void *font, char *text, int pos, int *cpen_x, int *cy, int *cadv, int *ch)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-
-static Eina_Bool
-eng_font_text_props_info_create(void *data __UNUSED__, void *font, Eina_Unicode *text, Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return EINA_TRUE;
-}
-
-static int
-eng_font_char_at_coords_get(void *data, void *font, char *text, int x, int y, int *cx, int *cy, int *cw, int *ch)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static void
-eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, char *text)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-}
-
-static void
-eng_font_cache_flush(void *data)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-}
-
-static void
-eng_font_cache_set(void *data, int bytes)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-}
-
-static int
-eng_font_cache_get(void *data)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static void
-eng_font_hinting_set(void *data, void *font, int hinting)
-{
-   Render_Engine *re;
-   
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-}
-
-static int
-eng_font_hinting_can_hint(void *data, int hinting)
-{
-   Render_Engine *re;
-   
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-}
-
-static int
-eng_font_last_up_to_pos(void *data __UNUSED__, void *font, const char *text, int x, int y)
-{
-   return evas_common_font_query_last_up_to_pos(font, text, x, y);
-}
-
-static Eina_Bool
-eng_canvas_alpha_get(void *data, void *context)
-{
-   return EINA_FALSE;
-}
-
-static int
-module_open(Evas_Module *em)
-{
-   if (!em) return 0;
-   _evas_engine_cairo_X11_log_dom = eina_log_domain_register
-     ("evas-cairo_x11", EVAS_DEFAULT_LOG_COLOR);
-   if (_evas_engine_cairo_X11_log_dom < 0)
-     {
-        EINA_LOG_ERR("Can not create a module log domain.");
-        return 0;
-     }
-   em->functions = (void *)(&eng_func);
-   return 1;
-}
-
-static void
-module_close(Evas_Module *em)
-{
-  eina_log_domain_unregister(_evas_engine_cairo_X11_log_dom);
-}
-
-static Evas_Module_Api evas_modapi =
-{
-   EVAS_MODULE_API_VERSION,
-   "cairo_x11",
-   "none",
-   {
-     module_open,
-     module_close
-   }
-};
-
-EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, cairo_x11);
-
-#ifndef EVAS_STATIC_BUILD_CAIRO_X11
-EVAS_EINA_MODULE_DEFINE(engine, cairo_x11);
-#endif
diff --git a/src/modules/engines/cairo_x11/evas_engine.h b/src/modules/engines/cairo_x11/evas_engine.h
deleted file mode 100644 (file)
index a454af8..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef EVAS_ENGINE_H
-#define EVAS_ENGINE_H
-#include "evas_common.h"
-#include "evas_cairo_common.h"
-
-extern int _evas_engine_cairo_X11_log_dom ;
-
-#ifdef ERR
-# undef ERR
-#endif
-#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_cairo_X11_log_dom, __VA_ARGS__)
-
-#ifdef DBG
-# undef DBG
-#endif
-#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_cairo_X11_log_dom, __VA_ARGS__)
-
-#ifdef INF
-# undef INF
-#endif
-#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_cairo_X11_log_dom, __VA_ARGS__)
-
-#ifdef WRN
-# undef WRN
-#endif
-#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_cairo_X11_log_dom, __VA_ARGS__)
-
-#ifdef CRIT
-# undef CRIT
-#endif
-#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_cairo_X11_log_dom, __VA_ARGS__)
-
-
-typedef struct _Evas_Cairo_X11_Window Evas_Cairo_X11_Window;
-
-struct _Evas_Cairo_X11_Window
-{
-   Display         *disp;
-   Window           win;
-   int              w, h;
-   int              screen;
-   Visual          *visual;
-   Colormap         colormap;
-   int              depth;
-   cairo_surface_t *surface;
-
-   struct {
-      int redraw : 1;
-      int x1, y1, x2, y2;
-   } draw;
-};
-
-Evas_Cairo_X11_Window *
-  evas_engine_cairo_x11_window_new(Display *disp,
-                                  Window   win,
-                                  int      screen,
-                                  Visual  *vis,
-                                  Colormap cmap,
-                                  int      depth,
-                                  int      w,
-                                  int      h);
-void
-  evas_engine_cairo_x11_window_free(Evas_Cairo_X11_Window *cw);
-void
-  evas_engine_cairo_x11_window_use(Evas_Cairo_X11_Window *cw);
-void
-  evas_engine_cairo_x11_window_size_set(Evas_Cairo_X11_Window *cw, int w, int h);
-
-#endif
diff --git a/src/modules/engines/cairo_x11/evas_x_main.c b/src/modules/engines/cairo_x11/evas_x_main.c
deleted file mode 100644 (file)
index ae2cd82..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#include <X11/Xlib.h>
-#include "evas_common.h"
-#include "evas_private.h"
-#include "evas_engine.h"
-#include "Evas_Engine_Cairo_X11.h"
-#include "evas_cairo_common.h"
-
-static Evas_Cairo_X11_Window *_evas_cairo_x11_window = NULL;
-
-Evas_Cairo_X11_Window *
-evas_engine_cairo_x11_window_new(Display *disp,
-                                Window   win,
-                                int      screen,
-                                Visual  *vis,
-                                Colormap cmap,
-                                int      depth,
-                                int      w,
-                                int      h)
-{
-   Evas_Cairo_X11_Window *cw;
-
-   cw = calloc(1, sizeof(Evas_Cairo_X11_Window));
-   if (!cw) return NULL;
-   cw->disp = disp;
-   cw->win = win;
-   cw->screen = screen;
-   cw->visual = vis;
-   cw->colormap = cmap;
-   cw->depth = depth;
-   cw->surface = cairo_xlib_surface_create(disp, win, vis, w, h);
-   return cw;
-}
-
-void
-evas_engine_cairo_x11_window_free(Evas_Cairo_X11_Window *cw)
-{
-   if (cw == _evas_cairo_x11_window) _evas_cairo_x11_window = NULL;
-   cairo_surface_destroy(cw->surface);
-   free(cw);
-}
-
-void
-evas_engine_cairo_x11_window_use(Evas_Cairo_X11_Window *cw)
-{
-   if (_evas_cairo_x11_window != cw)
-     {
-       _evas_cairo_x11_window = cw;
-     }
-}
-
-void
-evas_engine_cairo_x11_window_size_set(Evas_Cairo_X11_Window *cw, int w, int h)
-{
-   cairo_xlib_surface_set_size(cw->surface, w, h);
-}