* rename 'x11' to 'xlib' when it makes sense

* allow the build of evas without xlib installed (for OpenInkpot guys)
 * add big fat warning when at least a module is linked statically (try it !)

more patches will follow now (ecore, e, rage and ewl)
I let pyton and c++ bindings maintainer to do the rename


SVN revision: 41329
This commit is contained in:
Vincent Torri 2009-07-14 21:16:08 +00:00
parent a772d03b40
commit da292c1f29
11 changed files with 145 additions and 100 deletions

View File

@ -29,7 +29,6 @@ evas-software-buffer.pc \
evas-software-qtopia.pc \ evas-software-qtopia.pc \
evas-software-x11.pc \ evas-software-x11.pc \
evas-software-16-x11.pc \ evas-software-16-x11.pc \
evas-software-xcb.pc \
evas-xrender-x11.pc \ evas-xrender-x11.pc \
evas-xrender-xcb.pc \ evas-xrender-xcb.pc \
evas-software-gdi.pc \ evas-software-gdi.pc \
@ -68,7 +67,6 @@ evas-software-buffer.pc.in \
evas-software-qtopia.pc.in \ evas-software-qtopia.pc.in \
evas-software-x11.pc.in \ evas-software-x11.pc.in \
evas-software-16-x11.pc.in \ evas-software-16-x11.pc.in \
evas-software-xcb.pc.in \
evas-xrender-x11.pc.in \ evas-xrender-x11.pc.in \
evas-xrender-xcb.pc.in \ evas-xrender-xcb.pc.in \
evas-software-gdi.pc.in \ evas-software-gdi.pc.in \
@ -79,90 +77,81 @@ evas-software-16-wince.pc.in \
evas-software-sdl.pc.in \ evas-software-sdl.pc.in \
evas.spec.in evas.spec evas.spec.in evas.spec
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = evas.pc
if BUILD_ENGINE_SOFTWARE_X11 if BUILD_ENGINE_SOFTWARE_X11
psoftwarex11 = evas-software-x11.pc pkgconfig_DATA += evas-software-x11.pc
endif endif
if BUILD_ENGINE_SOFTWARE_16_X11 if BUILD_ENGINE_SOFTWARE_16_X11
psoftware16x11 = evas-software-16-x11.pc pkgconfig_DATA += evas-software-16-x11.pc
endif
if BUILD_ENGINE_SOFTWARE_XCB
psoftwarexcb = evas-software-xcb.pc
endif endif
if BUILD_ENGINE_DIRECTFB if BUILD_ENGINE_DIRECTFB
pdirectfb = evas-directfb.pc pkgconfig_DATA += evas-directfb.pc
endif endif
if BUILD_ENGINE_FB if BUILD_ENGINE_FB
pfb = evas-fb.pc pkgconfig_DATA += evas-fb.pc
endif endif
if BUILD_ENGINE_BUFFER if BUILD_ENGINE_BUFFER
psoftwarebuffer = evas-software-buffer.pc pkgconfig_DATA += evas-software-buffer.pc
endif endif
#if BUILD_ENGINE_SOFTWARE_QTOPIA #if BUILD_ENGINE_SOFTWARE_QTOPIA
#psoftwareqtopia = evas-software-qtopia.pc #pkgconfig_DATA += evas-software-qtopia.pc
#endif #endif
if BUILD_ENGINE_GL_X11 if BUILD_ENGINE_GL_X11
popenglx11 = evas-opengl-x11.pc pkgconfig_DATA += evas-opengl-x11.pc
endif endif
if BUILD_ENGINE_QUARTZ if BUILD_ENGINE_QUARTZ
pquartz = evas-quartz.pc pkgconfig_DATA += evas-quartz.pc
endif endif
if BUILD_ENGINE_GL_GLEW if BUILD_ENGINE_GL_GLEW
popenglglew = evas-opengl-glew.pc pkgconfig_DATA += evas-opengl-glew.pc
endif endif
#if BUILD_ENGINE_CAIRO_X11 #if BUILD_ENGINE_CAIRO_X11
#pcairox11 = evas-cairo-x11.pc #pkgconfig_DATA += evas-cairo-x11.pc
#endif #endif
if BUILD_ENGINE_XRENDER_X11 if BUILD_ENGINE_XRENDER_X11
pxrenderx11 = evas-xrender-x11.pc pkgconfig_DATA += evas-xrender-x11.pc
endif endif
if BUILD_ENGINE_XRENDER_XCB if BUILD_ENGINE_XRENDER_XCB
pxrenderxcb = evas-xrender-xcb.pc pkgconfig_DATA += evas-xrender-xcb.pc
endif endif
if BUILD_ENGINE_SOFTWARE_GDI if BUILD_ENGINE_SOFTWARE_GDI
psoftwaregdi = evas-software-gdi.pc pkgconfig_DATA += evas-software-gdi.pc
endif endif
if BUILD_ENGINE_SOFTWARE_DDRAW if BUILD_ENGINE_SOFTWARE_DDRAW
psoftwareddraw = evas-software-ddraw.pc pkgconfig_DATA += evas-software-ddraw.pc
endif endif
if BUILD_ENGINE_SOFTWARE_16_DDRAW if BUILD_ENGINE_SOFTWARE_16_DDRAW
psoftware16ddraw = evas-software-16-ddraw.pc pkgconfig_DATA += evas-software-16-ddraw.pc
endif endif
if BUILD_ENGINE_DIRECT3D if BUILD_ENGINE_DIRECT3D
pdirect3d = evas-direct3d.pc pkgconfig_DATA += evas-direct3d.pc
endif endif
if BUILD_ENGINE_SOFTWARE_16_WINCE if BUILD_ENGINE_SOFTWARE_16_WINCE
psoftware16wince = evas-software-16-wince.pc pkgconfig_DATA += evas-software-16-wince.pc
endif endif
if BUILD_ENGINE_SOFTWARE_SDL if BUILD_ENGINE_SOFTWARE_SDL
psoftwaresdl = evas-software-sdl.pc pkgconfig_DATA += evas-software-sdl.pc
endif endif
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = \
evas.pc $(psoftwarex11) $(psoftwarexcb) $(pdirectfb) $(pfb) \
$(psoftwarebuffer) $(popenglx11) $(pquartz) \
$(pxrenderx11) $(pxrenderxcb) $(psoftwaregdi) $(psoftwareddraw) $(psoftwaresdl) \
$(psoftware16x11) $(pdirect3d) $(psoftware16ddraw) $(psoftware16wince) $(popenglglew)
# $(psoftwareqtopia) $(pcairox11)
.PHONY: doc .PHONY: doc
doc: doc:

View File

@ -50,7 +50,7 @@ want_fribidi="auto"
want_evas_cserve="yes" want_evas_cserve="yes"
want_evas_engine_buffer="yes" want_evas_engine_buffer="yes"
want_evas_engine_software_x11="no" want_evas_engine_software_xlib="no"
want_evas_engine_xrender_x11="no" want_evas_engine_xrender_x11="no"
want_evas_engine_gl_x11="no" want_evas_engine_gl_x11="no"
want_evas_engine_cairo_x11="no" want_evas_engine_cairo_x11="no"
@ -99,11 +99,11 @@ case "$host_os" in
want_evas_image_loader_svg="no" want_evas_image_loader_svg="no"
;; ;;
darwin*) darwin*)
want_evas_engine_software_x11="auto" want_evas_engine_software_xlib="auto"
want_evas_engine_quartz="auto" want_evas_engine_quartz="auto"
;; ;;
*) *)
want_evas_engine_software_x11="auto" want_evas_engine_software_xlib="auto"
want_evas_engine_xrender_x11="auto" want_evas_engine_xrender_x11="auto"
want_evas_engine_software_16_x11="auto" want_evas_engine_software_16_x11="auto"
;; ;;
@ -368,7 +368,7 @@ AM_CONDITIONAL([EVAS_CSERVE], [test "x${want_evas_cserve}" = "xyes"])
EVAS_CHECK_ENGINE([buffer], [${want_evas_engine_buffer}], [no], [Buffer]) EVAS_CHECK_ENGINE([buffer], [${want_evas_engine_buffer}], [no], [Buffer])
EVAS_CHECK_ENGINE([software-x11], [${want_evas_engine_software_x11}], [yes], [Software X11]) EVAS_CHECK_ENGINE([software-xlib], [${want_evas_engine_software_xlib}], [yes], [Software Xlib])
EVAS_CHECK_ENGINE([xrender-x11], [${want_evas_engine_xrender_x11}], [yes], [XRender X11]) EVAS_CHECK_ENGINE([xrender-x11], [${want_evas_engine_xrender_x11}], [yes], [XRender X11])
@ -461,6 +461,38 @@ if test "x${have_static_software_generic}" = "xyes"; then
AC_DEFINE(EVAS_STATIC_BUILD_SOFTWARE_GENERIC, [1], [Build software generic engine as part of libevas]) AC_DEFINE(EVAS_STATIC_BUILD_SOFTWARE_GENERIC, [1], [Build software generic engine as part of libevas])
fi fi
# if software_xlib or software_xcb are available, define everything needed for X11
have_evas_engine_software_x11="no"
if test "x$have_evas_engine_software_xlib" = "xstatic" -o "x$have_evas_engine_software_xcb" = "xstatic" ; then
have_evas_engine_software_x11="static"
else
if test "x$have_evas_engine_software_xlib" = "xyes" -o "x$have_evas_engine_software_xcb" = "xyes" ; then
have_evas_engine_software_x11="yes"
fi
fi
if test "x$have_evas_engine_software_xlib" = "xstatic" ; then
have_evas_engine_software_xlib="yes"
fi
if test "x$have_evas_engine_software_xcb" = "xstatic" ; then
have_evas_engine_software_xcb="yes"
fi
if test "x$have_evas_engine_software_x11" = "xyes" -o "x$have_evas_engine_software_x11" = "xstatic" ; then
AC_DEFINE(BUILD_ENGINE_SOFTWARE_X11, [1], [Build software X11 engines])
fi
if test "x$have_evas_engine_software_x11" = "xstatic" ; then
AC_DEFINE(EVAS_STATIC_BUILD_SOFTWARE_X11, [1], [Build software X11 engines as part of libevas])
fi
AM_CONDITIONAL([BUILD_ENGINE_SOFTWARE_X11], [test "x${have_evas_engine_software_x11}" = "xyes" -o "x${have_evas_engine_software_x11}" = "xstatic"])
AM_CONDITIONAL([EVAS_STATIC_BUILD_SOFTWARE_X11], [test "x${have_evas_engine_software_x11}" = "xstatic"])
AC_SUBST(have_evas_engine_software_xlib)
AC_SUBST(have_evas_engine_software_xcb)
# if software 16 x11 is enabled - build software_16 (the generic 16bit # if software 16 x11 is enabled - build software_16 (the generic 16bit
# engine). later enable it fb_16 or other "16" bit engines are enabled. # engine). later enable it fb_16 or other "16" bit engines are enabled.
have_evas_engine_software_16="no" have_evas_engine_software_16="no"
@ -1086,7 +1118,6 @@ evas-quartz.pc
evas-software-buffer.pc evas-software-buffer.pc
evas-software-x11.pc evas-software-x11.pc
evas-software-16-x11.pc evas-software-16-x11.pc
evas-software-xcb.pc
evas-xrender-x11.pc evas-xrender-x11.pc
evas-xrender-xcb.pc evas-xrender-xcb.pc
evas-software-gdi.pc evas-software-gdi.pc
@ -1178,37 +1209,37 @@ echo
echo "Configuration Options Summary:" echo "Configuration Options Summary:"
echo echo
echo "Engines:" echo "Engines:"
echo " Software Memory Buffer.....: $have_evas_engine_buffer $have_static_evas_engine_buffer" echo " Software Memory Buffer.....: $have_evas_engine_buffer"
echo " Software X11...............: $have_evas_engine_software_x11 $have_static_evas_engine_software_x11 (XCB: $have_evas_engine_software_xcb)" echo " Software X11...............: $have_evas_engine_software_x11 (Xlib: $have_evas_engine_software_xlib) (XCB: $have_evas_engine_software_xcb)"
echo " XRender X11................: $have_evas_engine_xrender_x11 $have_static_evas_engine_xrender_x11 (XCB: $have_evas_engine_xrender_xcb)" echo " XRender X11................: $have_evas_engine_xrender_x11 (XCB: $have_evas_engine_xrender_xcb)"
echo " OpenGL X11.................: $have_evas_engine_gl_x11 $have_static_evas_engine_gl_x11" echo " OpenGL X11.................: $have_evas_engine_gl_x11"
#echo " Cairo X11..................: $have_evas_engine_cairo_x11 $have_static_evas_engine_cairo_x11" #echo " Cairo X11..................: $have_evas_engine_cairo_x11"
echo " Software GDI...............: $have_evas_engine_software_gdi $have_static_evas_engine_gdi" echo " Software GDI...............: $have_evas_engine_software_gdi"
echo " Software DirectDraw........: $have_evas_engine_software_ddraw $have_static_evas_engine_ddraw" echo " Software DirectDraw........: $have_evas_engine_software_ddraw"
echo " Direct3d...................: $have_evas_engine_direct3d $have_static_evas_engine_direct3d" echo " Direct3d...................: $have_evas_engine_direct3d"
echo " Quartz.....................: $have_evas_engine_quartz $have_static_evas_engine_quartz" echo " Quartz.....................: $have_evas_engine_quartz"
echo " OpenGL Glew................: $have_evas_engine_gl_glew $have_static_evas_engine_gl_glew" echo " OpenGL Glew................: $have_evas_engine_gl_glew"
echo " Software SDL...............: $have_evas_engine_software_sdl $have_static_evas_engine_software_sdl (primitive: $sdl_primitive)" echo " Software SDL...............: $have_evas_engine_software_sdl (primitive: $sdl_primitive)"
echo " Software Framebuffer.......: $have_evas_engine_fb $have_static_evas_engine_fb" echo " Software Framebuffer.......: $have_evas_engine_fb"
echo " DirectFB...................: $have_evas_engine_directfb $have_static_evas_engine_directfb" echo " DirectFB...................: $have_evas_engine_directfb"
#echo " Software Qtopia............: $have_evas_engine_software_qtopia $have_static_evas_engine_software_qtopia" #echo " Software Qtopia............: $have_evas_engine_software_qtopia"
echo " Software 16bit ............: $have_evas_engine_software_16 $have_static_evas_engine_software_16" echo " Software 16bit ............: $have_evas_engine_software_16"
echo " Software 16bit X11.........: $have_evas_engine_software_16_x11 $have_static_evas_engine_software_16_x11" echo " Software 16bit X11.........: $have_evas_engine_software_16_x11"
echo " Software 16bit Directdraw..: $have_evas_engine_software_16_ddraw $have_static_evas_engine_ddraw" echo " Software 16bit Directdraw..: $have_evas_engine_software_16_ddraw"
echo " Software 16bit WinCE.......: $have_evas_engine_software_16_wince $have_static_evas_engine_wince" echo " Software 16bit WinCE.......: $have_evas_engine_software_16_wince"
echo " Software 16bit SDL.........: $have_evas_engine_software_sdl $have_static_evas_engine_software_sdl (primitive: $sdl_primitive)" echo " Software 16bit SDL.........: $have_evas_engine_software_sdl (primitive: $sdl_primitive)"
# FIXME: opengl engine needs to be fixed and tested lots for all drivers # FIXME: opengl engine needs to be fixed and tested lots for all drivers
echo echo
echo "Image Loaders:" echo "Image Loaders:"
echo " EDB.....................: $have_evas_image_loader_edb $have_static_evas_image_loader_edb" echo " EDB.....................: $have_evas_image_loader_edb"
echo " EET.....................: $have_evas_image_loader_eet $have_static_evas_image_loader_eet" echo " EET.....................: $have_evas_image_loader_eet"
echo " GIF.....................: $have_evas_image_loader_gif $have_static_evas_image_loader_gif" echo " GIF.....................: $have_evas_image_loader_gif"
echo " JPEG....................: $have_evas_image_loader_jpeg $have_static_evas_image_loader_jpeg" echo " JPEG....................: $have_evas_image_loader_jpeg"
echo " PMAPS...................: $have_evas_image_loader_pmaps $have_static_evas_image_loader_pmaps" echo " PMAPS...................: $have_evas_image_loader_pmaps"
echo " PNG.....................: $have_evas_image_loader_png $have_static_evas_image_loader_png" echo " PNG.....................: $have_evas_image_loader_png"
echo " SVG.....................: $have_evas_image_loader_svg $have_static_evas_image_loader_svg" echo " SVG.....................: $have_evas_image_loader_svg"
echo " TIFF....................: $have_evas_image_loader_tiff $have_static_evas_image_loader_tiff" echo " TIFF....................: $have_evas_image_loader_tiff"
echo " XPM.....................: $have_evas_image_loader_xpm $have_static_evas_image_loader_xpm" echo " XPM.....................: $have_evas_image_loader_xpm"
# FIXME: need to add modular image loader system # FIXME: need to add modular image loader system
# FIXME: add more image loader modules # FIXME: add more image loader modules
echo echo
@ -1291,3 +1322,10 @@ echo "Now type 'make' ('gmake' on some systems) to compile $PACKAGE,"
echo "and then afterwards as root (or the user who will install this), type" echo "and then afterwards as root (or the user who will install this), type"
echo "'make install'. Change users with 'su' or 'sudo' appropriately." echo "'make install'. Change users with 'su' or 'sudo' appropriately."
echo echo
if test "x${have_static_module}" = "xyes" ; then
echo -e "\0033\01331;31mWarning\0033\01331;0m: You are trying to link statically one or more modules to Evas."
echo " You must know what you are doing, or else you will have a lot of problems."
echo " And Kenny will be killed."
echo " Think about that."
echo
fi

View File

@ -1,3 +1,6 @@
Name: evas-software-x11 Name: evas-software-x11
Description: Evas software X11 engine Description: Evas software X11 engine
Version: @VERSION@ Version: @VERSION@
Xlib=@have_evas_engine_software_xlib@
XCB=@have_evas_engine_software_xcb@

View File

@ -1,3 +0,0 @@
Name: evas-software-xcb
Description: Evas software XCB engine
Version: @VERSION@

View File

@ -19,9 +19,9 @@ fi
]) ])
dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_X11(engine, simple[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_XLIB(engine, simple[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_X11], AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_XLIB],
[ [
have_dep="no" have_dep="no"
@ -631,9 +631,6 @@ if test "x${have_engine}" = "xyes" ; then
fi fi
fi fi
AC_MSG_CHECKING([whether to statically include $4 rendering backend inside evas library])
AC_MSG_RESULT([${want_static_engine}])
if test "x${have_engine}" = "xyes" ; then if test "x${have_engine}" = "xyes" ; then
AC_DEFINE(BUILD_ENGINE_[]UP, [1], [$4 rendering backend]) AC_DEFINE(BUILD_ENGINE_[]UP, [1], [$4 rendering backend])
fi fi
@ -642,6 +639,7 @@ AM_CONDITIONAL(BUILD_ENGINE_[]UP, [test "x${have_engine}" = "xyes"])
if test "x${want_static_engine}" = "xyes" ; then if test "x${want_static_engine}" = "xyes" ; then
AC_DEFINE(EVAS_STATIC_BUILD_[]UP, [1], [Build $1 engine inside libevas]) AC_DEFINE(EVAS_STATIC_BUILD_[]UP, [1], [Build $1 engine inside libevas])
have_static_module="yes"
fi fi
AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "x${want_static_engine}" = "xyes"]) AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "x${want_static_engine}" = "xyes"])

View File

@ -322,9 +322,6 @@ if test "x${have_loader}" = "xyes" ; then
fi fi
fi fi
AC_MSG_CHECKING([whether to build inside evas library $1 image loader])
AC_MSG_RESULT([${want_static_loader}])
if test "x${have_loader}" = "xyes" ; then if test "x${have_loader}" = "xyes" ; then
AC_DEFINE(BUILD_LOADER_[]UP, [1], [UP Image Loader Support]) AC_DEFINE(BUILD_LOADER_[]UP, [1], [UP Image Loader Support])
fi fi
@ -333,6 +330,7 @@ AM_CONDITIONAL(BUILD_LOADER_[]UP, [test "x${have_loader}" = "xyes"])
if test "x${want_static_loader}" = "xyes" ; then if test "x${want_static_loader}" = "xyes" ; then
AC_DEFINE(EVAS_STATIC_BUILD_[]UP, [1], [Build $1 image loader inside libevas]) AC_DEFINE(EVAS_STATIC_BUILD_[]UP, [1], [Build $1 image loader inside libevas])
have_static_module="yes"
fi fi
AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "x${want_static_loader}" = "xyes"]) AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "x${want_static_loader}" = "xyes"])

View File

@ -89,7 +89,7 @@ endif
if EVAS_STATIC_BUILD_SOFTWARE_X11 if EVAS_STATIC_BUILD_SOFTWARE_X11
SUBDIRS += ../modules/engines/software_x11/ SUBDIRS += ../modules/engines/software_x11/
EVAS_STATIC_MODULE += ../modules/engines/software_x11/libevas_engine_software_x11.la EVAS_STATIC_MODULE += ../modules/engines/software_x11/libevas_engine_software_x11.la
EVAS_STATIC_LIBADD += @evas_engine_software_x11_libs@ @evas_engine_software_xcb_libs@ EVAS_STATIC_LIBADD += @evas_engine_software_xlib_libs@ @evas_engine_software_xcb_libs@
endif endif
if EVAS_STATIC_BUILD_XRENDER_X11 if EVAS_STATIC_BUILD_XRENDER_X11
SUBDIRS += ../modules/engines/xrender_x11/ SUBDIRS += ../modules/engines/xrender_x11/

View File

@ -1,8 +1,6 @@
#ifndef _EVAS_ENGINE_SOFTWARE_X11_H #ifndef _EVAS_ENGINE_SOFTWARE_X11_H
#define _EVAS_ENGINE_SOFTWARE_X11_H #define _EVAS_ENGINE_SOFTWARE_X11_H
#include <X11/Xlib.h>
typedef enum typedef enum
{ {
EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XLIB, EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XLIB,

View File

@ -8,23 +8,28 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/modules/engines \ -I$(top_srcdir)/src/modules/engines \
@FREETYPE_CFLAGS@ \ @FREETYPE_CFLAGS@ \
@EINA_CFLAGS@ \ @EINA_CFLAGS@ \
@evas_engine_software_x11_cflags@ \ @evas_engine_software_xlib_cflags@ \
@evas_engine_software_xcb_cflags@ @evas_engine_software_xcb_cflags@
if BUILD_ENGINE_SOFTWARE_X11 if BUILD_ENGINE_SOFTWARE_X11
SOFTWARE_X11_SOURCES = \ SOFTWARE_X11_SOURCES = evas_engine.c
evas_engine.c \
if BUILD_ENGINE_SOFTWARE_XLIB
SOFTWARE_X11_SOURCES += \
evas_xlib_outbuf.c \ evas_xlib_outbuf.c \
evas_xlib_buffer.c \ evas_xlib_buffer.c \
evas_xlib_color.c \ evas_xlib_color.c \
evas_xlib_main.c evas_xlib_main.c
SOFTWARE_X11_LIBADD = @evas_engine_software_x11_libs@ @evas_engine_software_xcb_libs@ SOFTWARE_X11_LIBADD = @evas_engine_software_xlib_libs@ @evas_engine_software_xcb_libs@
endif
if BUILD_ENGINE_SOFTWARE_XCB if BUILD_ENGINE_SOFTWARE_XCB
SOFTWARE_X11_SOURCES +=\ SOFTWARE_X11_SOURCES += \
evas_xcb_outbuf.c \ evas_xcb_outbuf.c \
evas_xcb_buffer.c \ evas_xcb_buffer.c \
evas_xcb_color.c \ evas_xcb_color.c \

View File

@ -4,8 +4,11 @@
#include "Evas_Engine_Software_X11.h" #include "Evas_Engine_Software_X11.h"
#include "evas_engine.h" #include "evas_engine.h"
#include "evas_xlib_outbuf.h"
#include "evas_xlib_color.h" #ifdef BUILD_ENGINE_SOFTWARE_XLIB
# include "evas_xlib_outbuf.h"
# include "evas_xlib_color.h"
#endif
#ifdef BUILD_ENGINE_SOFTWARE_XCB #ifdef BUILD_ENGINE_SOFTWARE_XCB
# include "evas_xcb_outbuf.h" # include "evas_xcb_outbuf.h"
@ -61,6 +64,7 @@ static void eng_output_idle_flush(void *data);
/* internal engine routines */ /* internal engine routines */
#ifdef BUILD_ENGINE_SOFTWARE_XLIB
static void * static void *
_output_xlib_setup(int w, _output_xlib_setup(int w,
int h, int h,
@ -128,6 +132,7 @@ _output_xlib_setup(int w,
evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
return re; return re;
} }
#endif
#ifdef BUILD_ENGINE_SOFTWARE_XCB #ifdef BUILD_ENGINE_SOFTWARE_XCB
static void * static void *
@ -206,13 +211,15 @@ _best_visual_get(int backend, void *connection, int screen)
{ {
if (!connection) return NULL; if (!connection) return NULL;
if (backend == 0) #ifdef BUILD_ENGINE_SOFTWARE_XLIB
if (backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XLIB)
{ {
return DefaultVisual((Display *)connection, screen); return DefaultVisual((Display *)connection, screen);
} }
#endif
#ifdef BUILD_ENGINE_SOFTWARE_XCB #ifdef BUILD_ENGINE_SOFTWARE_XCB
if (backend == 1) if (backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XCB)
{ {
xcb_screen_iterator_t iter_screen; xcb_screen_iterator_t iter_screen;
xcb_depth_iterator_t iter_depth; xcb_depth_iterator_t iter_depth;
@ -249,13 +256,15 @@ _best_colormap_get(int backend, void *connection, int screen)
{ {
if (!connection) return 0; if (!connection) return 0;
if (backend == 0) #ifdef BUILD_ENGINE_SOFTWARE_XLIB
if (backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XLIB)
{ {
return DefaultColormap((Display *)connection, screen); return DefaultColormap((Display *)connection, screen);
} }
#endif
#ifdef BUILD_ENGINE_SOFTWARE_XCB #ifdef BUILD_ENGINE_SOFTWARE_XCB
if (backend == 1) if (backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XCB)
{ {
xcb_screen_iterator_t iter_screen; xcb_screen_iterator_t iter_screen;
xcb_screen_t *s; xcb_screen_t *s;
@ -280,13 +289,15 @@ _best_depth_get(int backend, void *connection, int screen)
{ {
if (!connection) return 0; if (!connection) return 0;
if (backend == 0) #ifdef BUILD_ENGINE_SOFTWARE_XLIB
if (backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XLIB)
{ {
return DefaultDepth((Display *)connection, screen); return DefaultDepth((Display *)connection, screen);
} }
#endif
#ifdef BUILD_ENGINE_SOFTWARE_XCB #ifdef BUILD_ENGINE_SOFTWARE_XCB
if (backend == 1) if (backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XCB)
{ {
xcb_screen_iterator_t iter_screen; xcb_screen_iterator_t iter_screen;
xcb_screen_t *s; xcb_screen_t *s;
@ -356,7 +367,8 @@ eng_setup(Evas *e, void *in)
evas_common_draw_init(); evas_common_draw_init();
evas_common_tilebuf_init(); evas_common_tilebuf_init();
if (info->info.backend == 0) #ifdef BUILD_ENGINE_SOFTWARE_XLIB
if (info->info.backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XLIB)
{ {
re = _output_xlib_setup(e->output.w, re = _output_xlib_setup(e->output.w,
e->output.h, e->output.h,
@ -383,9 +395,10 @@ eng_setup(Evas *e, void *in)
re->outbuf_idle_flush = evas_software_xlib_outbuf_idle_flush; re->outbuf_idle_flush = evas_software_xlib_outbuf_idle_flush;
re->outbuf_alpha_get = evas_software_xlib_outbuf_alpha_get; re->outbuf_alpha_get = evas_software_xlib_outbuf_alpha_get;
} }
#endif
#ifdef BUILD_ENGINE_SOFTWARE_XCB #ifdef BUILD_ENGINE_SOFTWARE_XCB
if (info->info.backend == 1) if (info->info.backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XCB)
{ {
re = _output_xcb_setup(e->output.w, re = _output_xcb_setup(e->output.w,
e->output.h, e->output.h,
@ -424,7 +437,8 @@ eng_setup(Evas *e, void *in)
re = e->engine.data.output; re = e->engine.data.output;
ponebuf = re->ob->onebuf; ponebuf = re->ob->onebuf;
if (info->info.backend == 0) #ifdef BUILD_ENGINE_SOFTWARE_XLIB
if (info->info.backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XLIB)
{ {
evas_software_xlib_outbuf_free(re->ob); evas_software_xlib_outbuf_free(re->ob);
re->ob = evas_software_xlib_outbuf_setup_x(e->output.w, re->ob = evas_software_xlib_outbuf_setup_x(e->output.w,
@ -443,9 +457,10 @@ eng_setup(Evas *e, void *in)
info->info.destination_alpha); info->info.destination_alpha);
evas_software_xlib_outbuf_debug_set(re->ob, info->info.debug); evas_software_xlib_outbuf_debug_set(re->ob, info->info.debug);
} }
#endif
#ifdef BUILD_ENGINE_SOFTWARE_XCB #ifdef BUILD_ENGINE_SOFTWARE_XCB
if (info->info.backend == 1) if (info->info.backend == EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XCB)
{ {
evas_software_xcb_outbuf_free(re->ob); evas_software_xcb_outbuf_free(re->ob);
re->ob = evas_software_xcb_outbuf_setup_x(e->output.w, re->ob = evas_software_xcb_outbuf_setup_x(e->output.w,

View File

@ -4,10 +4,12 @@
#include <sys/ipc.h> #include <sys/ipc.h>
#include <sys/shm.h> #include <sys/shm.h>
#include <X11/Xlib.h> #ifdef BUILD_ENGINE_SOFTWARE_XLIB
#include <X11/Xutil.h> # include <X11/Xlib.h>
#include <X11/Xatom.h> # include <X11/Xutil.h>
#include <X11/extensions/XShm.h> # include <X11/Xatom.h>
# include <X11/extensions/XShm.h>
#endif
#ifdef BUILD_ENGINE_SOFTWARE_XCB #ifdef BUILD_ENGINE_SOFTWARE_XCB
# include <xcb/xcb.h> # include <xcb/xcb.h>
@ -41,6 +43,7 @@ struct _Outbuf
struct { struct {
Convert_Pal *pal; Convert_Pal *pal;
union { union {
#ifdef BUILD_ENGINE_SOFTWARE_XLIB
struct { struct {
Display *disp; Display *disp;
Window win; Window win;
@ -54,6 +57,7 @@ struct _Outbuf
unsigned char swap : 1; unsigned char swap : 1;
unsigned char bit_swap : 1; unsigned char bit_swap : 1;
} xlib; } xlib;
#endif
#ifdef BUILD_ENGINE_SOFTWARE_XCB #ifdef BUILD_ENGINE_SOFTWARE_XCB
struct { struct {
xcb_connection_t *conn; xcb_connection_t *conn;