From 825a3d837a33f226c879cd02ad15c3fba57e8b2c Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 23 Jan 2012 23:30:42 +1000 Subject: Update the EFL to what I'm actually using, coz I'm using some stuff not yet released. --- libraries/evas/AUTHORS | 1 + libraries/evas/ChangeLog | 131 +- libraries/evas/Makefile.am | 10 + libraries/evas/Makefile.in | 29 +- libraries/evas/NEWS | 15 + libraries/evas/aclocal.m4 | 62 +- libraries/evas/compile | 142 - libraries/evas/config.h.in | 36 + libraries/evas/configure | 2718 ++++++++++------- libraries/evas/configure.ac | 130 +- libraries/evas/doc/Makefile.in | 8 +- libraries/evas/doc/img/e_big.png | Bin libraries/evas/doc/img/foot_bg.png | Bin libraries/evas/doc/img/head_bg.png | Bin libraries/evas/doc/img/menu_bg.png | Bin libraries/evas/doc/img/menu_bg_current.png | Bin libraries/evas/doc/img/menu_bg_hover.png | Bin libraries/evas/doc/img/menu_bg_last.png | Bin libraries/evas/doc/img/menu_bg_unsel.png | Bin libraries/evas/evas-wayland-egl.pc.in | 3 + libraries/evas/evas-wayland-shm.pc.in | 3 + libraries/evas/evas.spec | 2 +- libraries/evas/ltmain.sh | 4 +- libraries/evas/m4/evas_check_engine.m4 | 73 + libraries/evas/sha1-for-source.txt | 1 - libraries/evas/src/Makefile.in | 8 +- libraries/evas/src/bin/Makefile.in | 8 +- libraries/evas/src/examples/Makefile.am | 30 +- libraries/evas/src/examples/Makefile.in | 70 +- libraries/evas/src/lib/Evas.h | 433 ++- libraries/evas/src/lib/Evas_GL.h | 52 +- libraries/evas/src/lib/Makefile.am | 9 +- libraries/evas/src/lib/Makefile.in | 139 +- libraries/evas/src/lib/cache/Makefile.in | 8 +- .../evas/src/lib/cache/evas_cache_engine_image.c | 4 + libraries/evas/src/lib/cache/evas_cache_image.c | 17 +- libraries/evas/src/lib/cache/evas_preload.c | 4 +- libraries/evas/src/lib/canvas/Makefile.in | 8 +- libraries/evas/src/lib/canvas/evas_callbacks.c | 274 +- libraries/evas/src/lib/canvas/evas_events.c | 520 +++- libraries/evas/src/lib/canvas/evas_focus.c | 22 +- libraries/evas/src/lib/canvas/evas_gl.c | 27 + libraries/evas/src/lib/canvas/evas_main.c | 41 +- libraries/evas/src/lib/canvas/evas_map.c | 18 +- libraries/evas/src/lib/canvas/evas_name.c | 32 + libraries/evas/src/lib/canvas/evas_object_box.c | 3 +- libraries/evas/src/lib/canvas/evas_object_grid.c | 2 +- libraries/evas/src/lib/canvas/evas_object_image.c | 46 +- libraries/evas/src/lib/canvas/evas_object_inform.c | 16 +- .../evas/src/lib/canvas/evas_object_intercept.c | 112 +- libraries/evas/src/lib/canvas/evas_object_main.c | 112 +- libraries/evas/src/lib/canvas/evas_object_smart.c | 31 + libraries/evas/src/lib/canvas/evas_object_table.c | 2 +- libraries/evas/src/lib/canvas/evas_object_text.c | 4 +- .../evas/src/lib/canvas/evas_object_textblock.c | 909 ++++-- libraries/evas/src/lib/canvas/evas_render.c | 31 +- libraries/evas/src/lib/cserve/Makefile.in | 8 +- libraries/evas/src/lib/engines/Makefile.in | 8 +- libraries/evas/src/lib/engines/common/Makefile.in | 8 +- .../src/lib/engines/common/evas_convert_rgb_16.c | 84 +- .../src/lib/engines/common/evas_convert_rgb_32.c | 347 ++- .../evas/src/lib/engines/common/evas_convert_yuv.c | 4 +- libraries/evas/src/lib/engines/common/evas_cpu.c | 4 + .../evas/src/lib/engines/common/evas_draw_main.c | 68 +- .../evas/src/lib/engines/common/evas_font_draw.c | 135 +- .../evas/src/lib/engines/common/evas_font_main.c | 4 +- .../evas/src/lib/engines/common/evas_image_data.c | 4 + .../evas/src/lib/engines/common/evas_image_load.c | 4 + .../evas/src/lib/engines/common/evas_image_main.c | 56 +- .../src/lib/engines/common/evas_image_scalecache.c | 2 - .../evas/src/lib/engines/common/evas_line_main.c | 475 ++- .../src/lib/engines/common/evas_op_add/Makefile.in | 8 +- .../lib/engines/common/evas_op_blend/Makefile.in | 8 +- .../common/evas_op_blend/op_blend_color_sse3.c | 3 +- .../evas_op_blend/op_blend_mask_color_sse3.c | 3 +- .../common/evas_op_blend/op_blend_pixel_sse3.c | 1 - .../lib/engines/common/evas_op_copy/Makefile.in | 8 +- .../lib/engines/common/evas_op_mask/Makefile.in | 8 +- .../src/lib/engines/common/evas_op_mul/Makefile.in | 8 +- .../src/lib/engines/common/evas_op_sub/Makefile.in | 8 +- .../src/lib/engines/common/evas_polygon_main.c | 40 +- .../src/lib/engines/common/evas_rectangle_main.c | 34 +- .../src/lib/engines/common/evas_scale_sample.c | 113 +- libraries/evas/src/lib/engines/common/evas_tiler.c | 4 + .../lib/engines/common/language/evas_bidi_utils.c | 4 + .../engines/common/language/evas_language_utils.c | 6 + .../evas/src/lib/engines/common_16/Makefile.in | 8 +- .../evas/src/lib/engines/common_8/Makefile.in | 8 +- libraries/evas/src/lib/file/Makefile.in | 8 +- libraries/evas/src/lib/file/evas_module.c | 4 +- libraries/evas/src/lib/file/evas_path.c | 2 +- libraries/evas/src/lib/include/Makefile.in | 8 +- libraries/evas/src/lib/include/evas_common.h | 64 +- libraries/evas/src/lib/include/evas_private.h | 18 +- libraries/evas/src/modules/Makefile.in | 8 +- libraries/evas/src/modules/engines/Makefile.am | 7 +- libraries/evas/src/modules/engines/Makefile.in | 15 +- .../evas/src/modules/engines/buffer/Makefile.in | 8 +- .../evas/src/modules/engines/direct3d/Makefile.in | 8 +- .../evas/src/modules/engines/directfb/Makefile.in | 8 +- libraries/evas/src/modules/engines/fb/Makefile.in | 8 +- .../evas/src/modules/engines/gl_cocoa/Makefile.in | 8 +- .../evas/src/modules/engines/gl_common/Makefile.in | 8 +- .../src/modules/engines/gl_common/evas_gl_common.h | 2 +- .../modules/engines/gl_common/evas_gl_texture.c | 7 +- .../evas/src/modules/engines/gl_sdl/Makefile.in | 8 +- .../evas/src/modules/engines/gl_x11/Makefile.in | 8 +- .../evas/src/modules/engines/gl_x11/evas_engine.c | 104 +- .../evas/src/modules/engines/gl_x11/evas_x_main.c | 2 +- .../evas/src/modules/engines/psl1ght/Makefile.in | 8 +- .../src/modules/engines/software_16/Makefile.in | 8 +- .../modules/engines/software_16_ddraw/Makefile.in | 8 +- .../modules/engines/software_16_sdl/Makefile.in | 8 +- .../modules/engines/software_16_wince/Makefile.in | 8 +- .../modules/engines/software_16_x11/Makefile.in | 8 +- .../src/modules/engines/software_8/Makefile.in | 8 +- .../src/modules/engines/software_8_x11/Makefile.in | 8 +- .../src/modules/engines/software_ddraw/Makefile.in | 8 +- .../src/modules/engines/software_gdi/Makefile.in | 8 +- .../modules/engines/software_generic/Makefile.in | 8 +- .../modules/engines/software_generic/evas_engine.c | 1612 +++++++++- .../src/modules/engines/software_sdl/Makefile.in | 8 +- .../src/modules/engines/software_x11/Makefile.in | 8 +- .../engines/software_x11/evas_xlib_outbuf.c | 2 + .../engines/wayland_egl/Evas_Engine_Wayland_Egl.h | 42 + .../src/modules/engines/wayland_egl/Makefile.am | 47 + .../src/modules/engines/wayland_egl/Makefile.in | 816 +++++ .../src/modules/engines/wayland_egl/evas_engine.c | 3174 ++++++++++++++++++++ .../src/modules/engines/wayland_egl/evas_engine.h | 82 + .../src/modules/engines/wayland_egl/evas_wl_main.c | 323 ++ .../engines/wayland_shm/Evas_Engine_Wayland_Shm.h | 20 + .../src/modules/engines/wayland_shm/Makefile.am | 45 + .../src/modules/engines/wayland_shm/Makefile.in | 816 +++++ .../src/modules/engines/wayland_shm/evas_engine.c | 370 +++ .../src/modules/engines/wayland_shm/evas_engine.h | 60 + .../src/modules/engines/wayland_shm/evas_outbuf.c | 100 + libraries/evas/src/modules/loaders/Makefile.in | 10 +- libraries/evas/src/modules/loaders/TODO | 5 - libraries/evas/src/modules/loaders/bmp/Makefile.in | 8 +- .../src/modules/loaders/bmp/evas_image_load_bmp.c | 485 +-- libraries/evas/src/modules/loaders/edb/Makefile.in | 8 +- .../src/modules/loaders/edb/evas_image_load_edb.c | 3 +- libraries/evas/src/modules/loaders/eet/Makefile.in | 8 +- .../src/modules/loaders/eet/evas_image_load_eet.c | 3 +- .../evas/src/modules/loaders/generic/Makefile.in | 8 +- .../loaders/generic/evas_image_load_generic.c | 8 +- libraries/evas/src/modules/loaders/gif/Makefile.in | 8 +- .../src/modules/loaders/gif/evas_image_load_gif.c | 3 +- libraries/evas/src/modules/loaders/ico/Makefile.in | 8 +- .../src/modules/loaders/ico/evas_image_load_ico.c | 216 +- .../evas/src/modules/loaders/jpeg/Makefile.in | 8 +- .../modules/loaders/jpeg/evas_image_load_jpeg.c | 3 +- .../evas/src/modules/loaders/pmaps/Makefile.in | 8 +- .../modules/loaders/pmaps/evas_image_load_pmaps.c | 54 +- libraries/evas/src/modules/loaders/png/Makefile.in | 8 +- .../src/modules/loaders/png/evas_image_load_png.c | 3 +- libraries/evas/src/modules/loaders/psd/Makefile.in | 8 +- .../src/modules/loaders/psd/evas_image_load_psd.c | 264 +- libraries/evas/src/modules/loaders/svg/Makefile.in | 8 +- .../src/modules/loaders/svg/evas_image_load_svg.c | 3 +- libraries/evas/src/modules/loaders/tga/Makefile.in | 8 +- .../src/modules/loaders/tga/evas_image_load_tga.c | 3 +- .../evas/src/modules/loaders/tiff/Makefile.in | 8 +- .../modules/loaders/tiff/evas_image_load_tiff.c | 3 +- .../evas/src/modules/loaders/wbmp/Makefile.in | 8 +- .../modules/loaders/wbmp/evas_image_load_wbmp.c | 113 +- libraries/evas/src/modules/loaders/xpm/Makefile.in | 8 +- .../src/modules/loaders/xpm/evas_image_load_xpm.c | 162 +- libraries/evas/src/modules/savers/Makefile.in | 8 +- libraries/evas/src/modules/savers/edb/Makefile.in | 8 +- libraries/evas/src/modules/savers/eet/Makefile.in | 8 +- libraries/evas/src/modules/savers/jpeg/Makefile.in | 8 +- libraries/evas/src/modules/savers/png/Makefile.in | 8 +- libraries/evas/src/modules/savers/tiff/Makefile.in | 8 +- libraries/evas/src/static_deps/Makefile.in | 8 +- .../evas/src/static_deps/liblinebreak/AUTHORS | 2 + .../evas/src/static_deps/liblinebreak/Makefile.am | 6 +- .../evas/src/static_deps/liblinebreak/Makefile.in | 17 +- .../evas/src/static_deps/liblinebreak/wordbreak.c | 435 +++ .../evas/src/static_deps/liblinebreak/wordbreak.h | 72 + .../src/static_deps/liblinebreak/wordbreakdata.x | 858 ++++++ .../src/static_deps/liblinebreak/wordbreakdef.h | 80 + libraries/evas/src/tests/Makefile.in | 8 +- libraries/evas/src/tests/evas_test_callbacks.c | 6 +- libraries/evas/src/tests/evas_test_textblock.c | 319 +- 185 files changed, 15672 insertions(+), 3417 deletions(-) delete mode 100755 libraries/evas/compile mode change 100644 => 100755 libraries/evas/doc/img/e_big.png mode change 100644 => 100755 libraries/evas/doc/img/foot_bg.png mode change 100644 => 100755 libraries/evas/doc/img/head_bg.png mode change 100644 => 100755 libraries/evas/doc/img/menu_bg.png mode change 100644 => 100755 libraries/evas/doc/img/menu_bg_current.png mode change 100644 => 100755 libraries/evas/doc/img/menu_bg_hover.png mode change 100644 => 100755 libraries/evas/doc/img/menu_bg_last.png mode change 100644 => 100755 libraries/evas/doc/img/menu_bg_unsel.png create mode 100644 libraries/evas/evas-wayland-egl.pc.in create mode 100644 libraries/evas/evas-wayland-shm.pc.in delete mode 100644 libraries/evas/sha1-for-source.txt create mode 100644 libraries/evas/src/modules/engines/wayland_egl/Evas_Engine_Wayland_Egl.h create mode 100644 libraries/evas/src/modules/engines/wayland_egl/Makefile.am create mode 100644 libraries/evas/src/modules/engines/wayland_egl/Makefile.in create mode 100644 libraries/evas/src/modules/engines/wayland_egl/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/wayland_egl/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/wayland_egl/evas_wl_main.c create mode 100644 libraries/evas/src/modules/engines/wayland_shm/Evas_Engine_Wayland_Shm.h create mode 100644 libraries/evas/src/modules/engines/wayland_shm/Makefile.am create mode 100644 libraries/evas/src/modules/engines/wayland_shm/Makefile.in create mode 100644 libraries/evas/src/modules/engines/wayland_shm/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/wayland_shm/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/wayland_shm/evas_outbuf.c delete mode 100644 libraries/evas/src/modules/loaders/TODO create mode 100644 libraries/evas/src/static_deps/liblinebreak/wordbreak.c create mode 100644 libraries/evas/src/static_deps/liblinebreak/wordbreak.h create mode 100644 libraries/evas/src/static_deps/liblinebreak/wordbreakdata.x create mode 100644 libraries/evas/src/static_deps/liblinebreak/wordbreakdef.h (limited to 'libraries/evas') diff --git a/libraries/evas/AUTHORS b/libraries/evas/AUTHORS index 52f8f93..470dd6a 100644 --- a/libraries/evas/AUTHORS +++ b/libraries/evas/AUTHORS @@ -31,3 +31,4 @@ Seungsoo Woo Youness Alaoui Jim Kukunas Nicolas Aguirre +Rafal Krypa diff --git a/libraries/evas/ChangeLog b/libraries/evas/ChangeLog index ac0f3d2..fa77400 100644 --- a/libraries/evas/ChangeLog +++ b/libraries/evas/ChangeLog @@ -503,7 +503,7 @@ * JPEG encode and decode in eet now uses ISLOW (not IFAST) due to noticable quality losses in the chase for speed. It will use - IFAST for quality less than 60 when encoding + IFAST for quality less than 60 when encoding 2011-11-20 Carsten Haitzler (The Rasterman) @@ -515,3 +515,132 @@ * Fix repeat event inheritance from parent smart just like pass events are inherited. This was inconsistent. + +2011-12-02 Carsten Haitzler (The Rasterman) + + 1.1.0 release + +2011-12-07 Carsten Haitzler (The Rasterman) + + * Fix build if gcc too old - if immintrin.h doesn't exist, + don't enable SSE3. + +2011-12-08 Tom Hacohen (TAsn) + + * Textblock markup: Support self closing format tags, i.e
. + You should use
and not
. The latter still works but it's use + is discouraged. + * Textblock: Added evas_textblock_text_markup_to_utf8. + This lets you convert textblock markup to plain text. + This converts formats and everything correctly. + +2011-12-12 Carsten Haitzler (The Rasterman) + + * Fix rounding error in map clip bounds calculation + +2011-12-12 Tom Hacohen (TAsn) + + * Textblock: Added evas_textblock_cursor_word_start/end. + Those functions let you jump to the start/end of the word under the + cursor. + +2011-12-13 Carsten Haitzler (The Rasterman) + + * Fix grab count negative values if you do weird combinations of + press and release with multiple fingers or multiple mouse + buttons. + +2011-12-14 Cedric BAIL + + * Use Eina_File when loading bmp, ico, pmaps and wbmp files. + * Fix potential race condition in wbmp loader code. + +2011-12-14 Tom Hacohen (TAsn) + + * Textblock: Made "br" and "tab" default tags for newline and tab. + * Textblock: Added "b" and "i" as default tags that can be overridden + by style, and added the infra to support this. + * Textblock: Added evas_textblock_text_utf8_to_markup + +2011-12-16 Carsten Haitzler (The Rasterman) + + * Fix clip bug that shows up in buffer engine + * Fix SSE3 routines with buggy output - disable + * Add new api to set and get default event flags. + +2011-12-19 Carsten Haitzler (The Rasterman) + + * Add new canvas events called just before and after evas rendering + starts and stops. + +2011-12-21 ChunEon Park (Hermet) + + * Events: repeat events should not be affected by children. + Fixed to object passes events to the next object in the same layer + if the repeat_events is enabled. + +2011-12-23 Sanghee Park + + * Extend pixman support to allow other operations to use + pixman when doing software rendering. On x86 this isn't useful + but on ARMv7 with NEON pixman happens to do better with image + blending and nearest scale blending. + * Add tiled rotator for 32bit display as an option. + +2011-12-26 Christopher Michael (devilhorns) + + * Add functions to get/set if an object is a 'frame_object' + +2011-12-27 Carsten Haitzler (The Rasterman) + + * Add feature to get number of pressed devices (help fix + ecore-evas bug). + +2011-12-28 Carsten Haitzler (The Rasterman) + + * Add recursive name find function - evas_object_name_child_find() + +2012-01-01 Carsten Haitzler (The Rasterman) + + * Improve CPU use on nvidia drivers when vsyncing. It was + actually glXWaitGL() spinning, not glXSwapBuffers(), so this + points to a bug in the nvidia drivers where the sleep logic + in glXSwapBuffers() hasn't been transferred to glXWaitGL(). + Avoid use of glXWaitGL() to avoid the nvidia bug. + +2012-01-02 Cedric Bail + + * Fix unitialized value when running generic loader without any + application found to open the file. + * Use Eina_File when openning XPM file. + +2012-01-03 Cedric Bail + + * Use Eina_File for PSD file to. + +2012-01-06 Sung W. Park (sung_) + + * Add EvasGL support to software backend using OSMesa. Requires OSMesa + library. Due to caveats in OSMesa, surface config stays with a + context rather than with a surface. So for now, the config of a + surface remains with the first context that it binds to. May need + to come up with a different solution in the near future. + +2012-01-12 Sung W. Park (sung_) + + * Add new api evas_gl_config_new/free() to ensure backward compatibility. + Previously, the user simply declared a Evas_GL_Config object but this + can cause issues if new configs are added. Now we have evas allocate it + for you. + +2012-01-16 Raphael Kubo da Costa (rakuco) + + * Add evas_object_smart_callback_del_full() to allow users to + unregister a specific smart event callback instead of all + callbacks matching a given type and function pointer. + +2012-01-17 Carsten Haitzler (The Rasterman) + + * Add EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN pointer mode + for some very specific behavior needed for accessibility. + diff --git a/libraries/evas/Makefile.am b/libraries/evas/Makefile.am index 665f988..b42e7f9 100644 --- a/libraries/evas/Makefile.am +++ b/libraries/evas/Makefile.am @@ -45,6 +45,8 @@ evas-direct3d.pc.in \ evas-software-16-wince.pc.in \ evas-software-sdl.pc.in \ evas-psl1ght.pc.in \ +evas-wayland-shm.pc.in \ +evas-wayland-egl.pc.in \ evas.spec.in \ evas.spec \ m4/efl_attribute.m4 \ @@ -127,6 +129,14 @@ if BUILD_ENGINE_PSL1GHT pkgconfig_DATA += evas-psl1ght.pc endif +if BUILD_ENGINE_WAYLAND_SHM +pkgconfig_DATA += evas-wayland-shm.pc +endif + +if BUILD_ENGINE_WAYLAND_EGL +pkgconfig_DATA += evas-wayland-egl.pc +endif + .PHONY: doc coverage doc: diff --git a/libraries/evas/Makefile.in b/libraries/evas/Makefile.in index 6fb0d12..8fe20cb 100644 --- a/libraries/evas/Makefile.in +++ b/libraries/evas/Makefile.in @@ -51,6 +51,8 @@ host_triplet = @host@ @BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@am__append_14 = evas-software-16-wince.pc @BUILD_ENGINE_SOFTWARE_SDL_TRUE@am__append_15 = evas-software-sdl.pc @BUILD_ENGINE_PSL1GHT_TRUE@am__append_16 = evas-psl1ght.pc +@BUILD_ENGINE_WAYLAND_SHM_TRUE@am__append_17 = evas-wayland-shm.pc +@BUILD_ENGINE_WAYLAND_EGL_TRUE@am__append_18 = evas-wayland-egl.pc subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ @@ -66,10 +68,12 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/evas-software-ddraw.pc.in \ $(srcdir)/evas-software-gdi.pc.in \ $(srcdir)/evas-software-sdl.pc.in \ - $(srcdir)/evas-software-x11.pc.in $(srcdir)/evas.pc.in \ + $(srcdir)/evas-software-x11.pc.in \ + $(srcdir)/evas-wayland-egl.pc.in \ + $(srcdir)/evas-wayland-shm.pc.in $(srcdir)/evas.pc.in \ $(srcdir)/evas.spec.in $(top_srcdir)/configure ABOUT-NLS \ - AUTHORS COPYING ChangeLog INSTALL NEWS compile config.guess \ - config.sub depcomp install-sh ltmain.sh missing + AUTHORS COPYING ChangeLog INSTALL NEWS config.guess config.sub \ + depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ @@ -97,7 +101,7 @@ CONFIG_CLEAN_FILES = evas-directfb.pc evas-fb.pc evas-opengl-x11.pc \ evas-software-gdi.pc evas-software-ddraw.pc \ evas-software-16-ddraw.pc evas-direct3d.pc \ evas-software-16-wince.pc evas-software-sdl.pc evas-psl1ght.pc \ - evas.pc evas.spec + evas-wayland-shm.pc evas-wayland-egl.pc evas.pc evas.spec CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -284,8 +288,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -302,6 +304,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -383,6 +387,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ @@ -501,6 +509,8 @@ evas-direct3d.pc.in \ evas-software-16-wince.pc.in \ evas-software-sdl.pc.in \ evas-psl1ght.pc.in \ +evas-wayland-shm.pc.in \ +evas-wayland-egl.pc.in \ evas.spec.in \ evas.spec \ m4/efl_attribute.m4 \ @@ -522,7 +532,8 @@ pkgconfig_DATA = evas.pc $(am__append_1) $(am__append_2) \ $(am__append_6) $(am__append_7) $(am__append_8) \ $(am__append_9) $(am__append_10) $(am__append_11) \ $(am__append_12) $(am__append_13) $(am__append_14) \ - $(am__append_15) $(am__append_16) + $(am__append_15) $(am__append_16) $(am__append_17) \ + $(am__append_18) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -610,6 +621,10 @@ evas-software-sdl.pc: $(top_builddir)/config.status $(srcdir)/evas-software-sdl. cd $(top_builddir) && $(SHELL) ./config.status $@ evas-psl1ght.pc: $(top_builddir)/config.status $(srcdir)/evas-psl1ght.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ +evas-wayland-shm.pc: $(top_builddir)/config.status $(srcdir)/evas-wayland-shm.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +evas-wayland-egl.pc: $(top_builddir)/config.status $(srcdir)/evas-wayland-egl.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ evas.pc: $(top_builddir)/config.status $(srcdir)/evas.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas.spec: $(top_builddir)/config.status $(srcdir)/evas.spec.in diff --git a/libraries/evas/NEWS b/libraries/evas/NEWS index afddb46..945fd96 100644 --- a/libraries/evas/NEWS +++ b/libraries/evas/NEWS @@ -1,3 +1,18 @@ +Evas 1.2.0 + +Changes since Evas 1.1.0: +------------------------- + +Additions: + + * Textblock now supports self-closing tags, i.e
. Those should be used instead of the old
way. + * Shm engine for drawing in Wayland. + * evas_object_smart_callback_del_full API. + +Improvements: + + * Use Eina_File mmap infrastructure for bmp, ico, pmaps, psd, wbmp and xpm file access. + Evas 1.1.0 Changes since Evas 1.0.0: diff --git a/libraries/evas/aclocal.m4 b/libraries/evas/aclocal.m4 index f74cf11..a816a9b 100644 --- a/libraries/evas/aclocal.m4 +++ b/libraries/evas/aclocal.m4 @@ -13,14 +13,13 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, +[m4_warning([this file was generated for autoconf 2.65. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # @@ -48,10 +47,7 @@ To do so, use the procedure documented by the package, typically `autoreconf'.]) AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) -AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) -AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) - +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi @@ -64,6 +60,7 @@ if test -n "$PKG_CONFIG"; then AC_MSG_RESULT([no]) PKG_CONFIG="" fi + fi[]dnl ])# PKG_PROG_PKG_CONFIG @@ -72,31 +69,34 @@ fi[]dnl # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # -# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -# only at the first occurence in configure.ac, so if the first place -# it's called might be skipped (such as if it is within an "if", you -# have to call PKG_CHECK_EXISTS manually +# +# Similar to PKG_CHECK_MODULES, make sure that the first instance of +# this or PKG_CHECK_MODULES is called, or make sure to call +# PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_default([$2], [:]) + m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) + # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[if test -n "$$1"; then - pkg_cv_[]$1="$$1" - elif test -n "$PKG_CONFIG"; then - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - else - pkg_failed=untried +[if test -n "$PKG_CONFIG"; then + if test -n "$$1"; then + pkg_cv_[]$1="$$1" + else + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + fi +else + pkg_failed=untried fi[]dnl ])# _PKG_CONFIG @@ -138,17 +138,16 @@ and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then - AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - m4_default([$4], [AC_MSG_ERROR( + ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS @@ -156,24 +155,25 @@ $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT])[]dnl - ]) +_PKG_TEXT +])], + [AC_MSG_RESULT([no]) + $4]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) - m4_default([$4], [AC_MSG_FAILURE( + ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT -To get pkg-config, see .])[]dnl - ]) +To get pkg-config, see .])], + [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) - $3 + ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES diff --git a/libraries/evas/compile b/libraries/evas/compile deleted file mode 100755 index 1b1d232..0000000 --- a/libraries/evas/compile +++ /dev/null @@ -1,142 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand `-c -o'. - -scriptversion=2005-05-14.22 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; -esac - -ofile= -cfile= -eat= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we strip `-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` - -# Create the lock directory. -# Note: use `[/.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/libraries/evas/config.h.in b/libraries/evas/config.h.in index 95bb668..84f6c88 100644 --- a/libraries/evas/config.h.in +++ b/libraries/evas/config.h.in @@ -182,6 +182,12 @@ /* Build software Xlib backend */ #undef BUILD_ENGINE_SOFTWARE_XLIB +/* Wayland Egl rendering backend */ +#undef BUILD_ENGINE_WAYLAND_EGL + +/* Wayland Shm rendering backend */ +#undef BUILD_ENGINE_WAYLAND_SHM + /* EET Font Loader Support */ #undef BUILD_FONT_LOADER_EET @@ -410,6 +416,12 @@ /* Build Tiff image loader inside libevas */ #undef EVAS_STATIC_BUILD_TIFF +/* Build wayland-egl engine inside libevas */ +#undef EVAS_STATIC_BUILD_WAYLAND_EGL + +/* Build wayland-shm engine inside libevas */ +#undef EVAS_STATIC_BUILD_WAYLAND_SHM + /* Build WBMP image loader inside libevas */ #undef EVAS_STATIC_BUILD_WBMP @@ -510,6 +522,9 @@ /* Define to 1 if the system has the type `struct sigaction'. */ #undef HAVE_STRUCT_SIGACTION +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MMAN_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H @@ -565,6 +580,24 @@ /* default value since PATH_MAX is not defined */ #undef PATH_MAX +/* Allow pixman to render fonts */ +#undef PIXMAN_FONT + +/* Allow pixman to render images */ +#undef PIXMAN_IMAGE + +/* Allow pixman to render image sampled scaling */ +#undef PIXMAN_IMAGE_SCALE_SAMPLE + +/* Allow pixman to render lines */ +#undef PIXMAN_LINE + +/* Allow pixman to render polys */ +#undef PIXMAN_POLY + +/* Allow pixman to render rects */ +#undef PIXMAN_RECT + /* The size of `Eina_Unicode', as computed by sizeof. */ #undef SIZEOF_EINA_UNICODE @@ -582,6 +615,9 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS +/* Enable tiled rotate algorithm */ +#undef TILE_ROTATE + /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE diff --git a/libraries/evas/configure b/libraries/evas/configure index df1fca7..8ab6964 100755 --- a/libraries/evas/configure +++ b/libraries/evas/configure @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for evas 1.1.0. +# Generated by GNU Autoconf 2.65 for evas 1.1.99.67344. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -319,7 +319,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -359,19 +359,19 @@ else fi # as_fn_arith -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. +# script with status $?, using 1 if that was 0. as_fn_error () { - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error @@ -682,7 +682,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -701,8 +701,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='evas' PACKAGE_TARNAME='evas' -PACKAGE_VERSION='1.1.0' -PACKAGE_STRING='evas 1.1.0' +PACKAGE_VERSION='1.1.99.67344' +PACKAGE_STRING='evas 1.1.99.67344' PACKAGE_BUGREPORT='enlightenment-devel@lists.sourceforge.net' PACKAGE_URL='' @@ -937,6 +937,20 @@ evas_engine_software_xcb_libs evas_engine_software_xcb_cflags EVAS_STATIC_BUILD_SOFTWARE_GENERIC_FALSE EVAS_STATIC_BUILD_SOFTWARE_GENERIC_TRUE +EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE +EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE +BUILD_ENGINE_WAYLAND_EGL_FALSE +BUILD_ENGINE_WAYLAND_EGL_TRUE +evas_engine_wayland_egl_libs +evas_engine_wayland_egl_cflags +WAYLAND_EGL_LIBS +WAYLAND_EGL_CFLAGS +EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE +EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE +BUILD_ENGINE_WAYLAND_SHM_FALSE +BUILD_ENGINE_WAYLAND_SHM_TRUE +evas_engine_wayland_shm_libs +evas_engine_wayland_shm_cflags EVAS_STATIC_BUILD_SOFTWARE_16_SDL_FALSE EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE BUILD_ENGINE_SOFTWARE_16_SDL_FALSE @@ -1072,8 +1086,6 @@ EFL_BUILD_DOC_TRUE efl_doxygen efl_have_doxygen pkgconfig_requires_private -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH PKG_CONFIG CXXCPP am__fastdepCXX_FALSE @@ -1221,6 +1233,13 @@ enable_liblinebreak enable_fribidi enable_harfbuzz enable_pixman +enable_pixman_font +enable_pixman_rect +enable_pixman_line +enable_pixman_poly +enable_pixman_image +enable_pixman_image_scale_sample +enable_tile_rotate enable_evas_cserve enable_gl_flavor_gles enable_gles_variety_sgx @@ -1241,6 +1260,8 @@ with_x enable_software_16_ddraw enable_software_16_wince enable_software_16_sdl +enable_wayland_shm +enable_wayland_egl enable_sdl_primitive enable_static_software_generic enable_software_xcb @@ -1338,8 +1359,6 @@ CXXFLAGS CCC CXXCPP PKG_CONFIG -PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR EVIL_CFLAGS EVIL_LIBS EINA_CFLAGS @@ -1363,6 +1382,8 @@ DIRECTFB_LIBS XCB_CFLAGS XCB_LIBS XMKMF +WAYLAND_EGL_CFLAGS +WAYLAND_EGL_LIBS XCB_GL_CFLAGS XCB_GL_LIBS EDB_CFLAGS @@ -1445,9 +1466,8 @@ do fi case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1492,7 +1512,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1518,7 +1538,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1722,7 +1742,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1738,7 +1758,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1768,8 +1788,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." ;; *=*) @@ -1777,7 +1797,7 @@ Try \`$0 --help' for more information" # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1795,13 +1815,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" + as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1824,7 +1844,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1838,8 +1858,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1854,9 +1874,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" + as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" + as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1895,11 +1915,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1925,7 +1945,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures evas 1.1.0 to adapt to many kinds of systems. +\`configure' configures evas 1.1.99.67344 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1939,7 +1959,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1999,7 +2019,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of evas 1.1.0:";; + short | recursive ) echo "Configuration of evas 1.1.99.67344:";; esac cat <<\_ACEOF @@ -2027,8 +2047,16 @@ Optional Features: [default=enabled] --disable-harfbuzz disable complex text shaping and layouting support. [default=enabled] - --disable-pixman disable pixman for software rendering. + --enable-pixman enable pixman for software rendering. [default=enabled] + --enable-pixman-font Allow pixman to render fonts + --enable-pixman-rect Allow pixman to render rects + --enable-pixman-line Allow pixman to render lines + --enable-pixman-poly Allow pixman to render polys + --enable-pixman-image Allow pixman to render images + --enable-pixman-image-scale-sample + Allow pixman to render sampled scaled images + --enable-tile-rotate Enable tiled rotate algorithm --disable-evas-cserve disable shared cache server support. [default=enabled] --enable-gl-flavor-gles enable gles falvor of gl instead of standard @@ -2056,6 +2084,8 @@ Optional Features: enable Software Windows CE 16 bits rendering backend --enable-software-16-sdl enable Software SDL 16 bits rendering backend + --enable-wayland-shm enable Wayland Shm rendering backend + --enable-wayland-egl enable Wayland Egl rendering backend --enable-sdl-primitive --enable-static-software-generic Build software generic engine as part of libevas @@ -2229,10 +2259,6 @@ Some influential environment variables: CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility - PKG_CONFIG_PATH - directories to add to pkg-config's search path - PKG_CONFIG_LIBDIR - path overriding pkg-config's built-in search path EVIL_CFLAGS C compiler flags for EVIL, overriding pkg-config EVIL_LIBS linker flags for EVIL, overriding pkg-config EINA_CFLAGS C compiler flags for EINA, overriding pkg-config @@ -2268,6 +2294,10 @@ Some influential environment variables: XCB_CFLAGS C compiler flags for XCB, overriding pkg-config XCB_LIBS linker flags for XCB, overriding pkg-config XMKMF Path to xmkmf, Makefile generator for X Window System + WAYLAND_EGL_CFLAGS + C compiler flags for WAYLAND_EGL, overriding pkg-config + WAYLAND_EGL_LIBS + linker flags for WAYLAND_EGL, overriding pkg-config XCB_GL_CFLAGS C compiler flags for XCB_GL, overriding pkg-config XCB_GL_LIBS linker flags for XCB_GL, overriding pkg-config @@ -2361,10 +2391,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -evas configure 1.1.0 -generated by GNU Autoconf 2.67 +evas configure 1.1.99.67344 +generated by GNU Autoconf 2.65 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -2434,7 +2464,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { + test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -2458,10 +2488,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2497,7 +2527,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2520,15 +2550,17 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## -------------------------------------------------------- ## +( cat <<\_ASBOX +## -------------------------------------------------------- ## ## Report this to enlightenment-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ##" +## -------------------------------------------------------- ## +_ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2592,7 +2624,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2668,7 +2700,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2870,7 +2902,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { + test $ac_status = 0; } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : @@ -3119,7 +3151,7 @@ ac_fn_c_check_type () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -3164,18 +3196,15 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_type -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- -# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. +# ac_fn_c_check_decl LINENO SYMBOL VAR +# ------------------------------------ +# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 +$as_echo_n "checking whether $2 is declared... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3184,12 +3213,8 @@ $4 int main () { -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif +#ifndef $2 + (void) $2; #endif ; @@ -3213,8 +3238,8 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by evas $as_me 1.1.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +It was created by evas $as_me 1.1.99.67344, which was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -3324,9 +3349,11 @@ trap 'exit_status=$? { echo - $as_echo "## ---------------- ## + cat <<\_ASBOX +## ---------------- ## ## Cache variables. ## -## ---------------- ##" +## ---------------- ## +_ASBOX echo # The following way of writing the cache mishandles newlines in values, ( @@ -3360,9 +3387,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + cat <<\_ASBOX +## ----------------- ## ## Output variables. ## -## ----------------- ##" +## ----------------- ## +_ASBOX echo for ac_var in $ac_subst_vars do @@ -3375,9 +3404,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + cat <<\_ASBOX +## ------------------- ## ## File substitutions. ## -## ------------------- ##" +## ------------------- ## +_ASBOX echo for ac_var in $ac_subst_files do @@ -3391,9 +3422,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; fi if test -s confdefs.h; then - $as_echo "## ----------- ## + cat <<\_ASBOX +## ----------- ## ## confdefs.h. ## -## ----------- ##" +## ----------- ## +_ASBOX echo cat confdefs.h echo @@ -3448,12 +3481,7 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -3468,11 +3496,7 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5 ; } + . "$ac_site_file" fi done @@ -3548,7 +3572,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -3574,22 +3598,16 @@ am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done done if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -3705,11 +3723,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; + as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; + as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -3731,7 +3749,7 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -3741,7 +3759,7 @@ then # Ok. : else - as_fn_error $? "newly created file is older than distributed files! + as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -3979,7 +3997,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -3987,7 +4005,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -4021,7 +4039,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -4037,7 +4055,7 @@ fi # Define the identity of the package. PACKAGE='evas' - VERSION='1.1.0' + VERSION='1.1.99.67344' cat >>confdefs.h <<_ACEOF @@ -4452,8 +4470,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5 ; } +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -4567,8 +4585,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -4610,8 +4629,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5 ; } +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -4668,9 +4687,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. +as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details." "$LINENO" 5; } fi fi fi @@ -4721,8 +4740,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5 ; } +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -5112,7 +5131,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5128,11 +5147,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -5171,7 +5190,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5187,18 +5206,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5 ; } +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c @@ -5259,7 +5278,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -5325,7 +5344,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -5457,7 +5476,8 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -5532,7 +5552,7 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -5543,16 +5563,16 @@ else test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; +*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -5577,7 +5597,7 @@ else ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -5585,7 +5605,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; +*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -5986,7 +6006,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -6065,7 +6085,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -6181,7 +6201,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -6383,13 +6403,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:6386: $ac_compile\"" >&5) + (eval echo "\"\$as_me:6406: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:6389: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:6409: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:6392: output\"" >&5) + (eval echo "\"\$as_me:6412: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -7591,7 +7611,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7594 "configure"' > conftest.$ac_ext + echo '#line 7614 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8851,11 +8871,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8854: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8874: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8858: \$? = $ac_status" >&5 + echo "$as_me:8878: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9190,11 +9210,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9193: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9213: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9197: \$? = $ac_status" >&5 + echo "$as_me:9217: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9295,11 +9315,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9298: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9318: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9302: \$? = $ac_status" >&5 + echo "$as_me:9322: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9350,11 +9370,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9353: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9373: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9357: \$? = $ac_status" >&5 + echo "$as_me:9377: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11734,7 +11754,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11737 "configure" +#line 11757 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11830,7 +11850,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11833 "configure" +#line 11853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12074,15 +12094,15 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define VMIC 0 +#define VMIC 99 _ACEOF cat >>confdefs.h <<_ACEOF -#define VREV 0 +#define VREV 67344 _ACEOF -version_info="2:0:1" +version_info="2:99:1" release_info="" @@ -12101,7 +12121,7 @@ case "$host_os" in MODULE_ARCH="$host_os-$host_cpu" ;; *) - MODULE_ARCH="$host_os-$host_cpu-1.1.0" + MODULE_ARCH="$host_os-$host_cpu-1.1.99" ;; esac @@ -12136,6 +12156,8 @@ want_evas_engine_direct3d="no" want_evas_engine_fb="no" want_evas_engine_directfb="no" want_evas_engine_psl1ght="no" +want_evas_engine_wayland_shm="no" +want_evas_engine_wayland_egl="no" want_evas_image_loader_edb="yes" want_evas_image_loader_eet="yes" @@ -12182,6 +12204,8 @@ case "$host_os" in want_evas_engine_software_xcb="no" want_evas_engine_gl_xcb="no" want_evas_engine_fb="auto" + want_evas_engine_wayland_shm="auto" + want_evas_engine_wayland_egl="auto" ### no - not ready/usable/complete # want_evas_engine_software_8_x11="auto" # want_evas_engine_software_16_x11="auto" @@ -13582,7 +13606,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -13598,11 +13622,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -13641,7 +13665,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -13657,11 +13681,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else @@ -13890,7 +13914,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -15431,11 +15455,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15434: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15458: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15438: \$? = $ac_status" >&5 + echo "$as_me:15462: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15530,11 +15554,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15533: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15557: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15537: \$? = $ac_status" >&5 + echo "$as_me:15561: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15582,11 +15606,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15585: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15609: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15589: \$? = $ac_status" >&5 + echo "$as_me:15613: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -16830,8 +16854,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5 ; } +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -17201,10 +17225,6 @@ fi # pkg-config - - - - if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -17317,6 +17337,7 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } PKG_CONFIG="" fi + fi # Check whether pkg-config supports Requires.private @@ -17498,10 +17519,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVIL" >&5 $as_echo_n "checking for EVIL... " >&6; } -if test -n "$EVIL_CFLAGS"; then - pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EVIL_CFLAGS"; then + pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evil >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "evil >= 1.0.0") 2>&5 ac_status=$? @@ -17511,13 +17533,15 @@ if test -n "$EVIL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EVIL_LIBS"; then - pkg_cv_EVIL_LIBS="$EVIL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EVIL_LIBS"; then + pkg_cv_EVIL_LIBS="$EVIL_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evil >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "evil >= 1.0.0") 2>&5 ac_status=$? @@ -17527,15 +17551,14 @@ if test -n "$EVIL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -17543,14 +17566,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "evil >= 1.0.0" 2>&1` + EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evil >= 1.0.0"` else - EVIL_PKG_ERRORS=`$PKG_CONFIG --print-errors "evil >= 1.0.0" 2>&1` + EVIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evil >= 1.0.0"` fi # Put the nasty error message in config.log where it belongs echo "$EVIL_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (evil >= 1.0.0) were not met: + as_fn_error "Package requirements (evil >= 1.0.0) were not met: $EVIL_PKG_ERRORS @@ -17559,13 +17582,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables EVIL_CFLAGS and EVIL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 +See the pkg-config man page for more details. +" "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +as_fn_error "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -17574,13 +17596,13 @@ and EVIL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details." "$LINENO" 5; } else EVIL_CFLAGS=$pkg_cv_EVIL_CFLAGS EVIL_LIBS=$pkg_cv_EVIL_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - + : fi $as_echo "#define HAVE_EVIL 1" >>confdefs.h @@ -17597,10 +17619,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EINA" >&5 $as_echo_n "checking for EINA... " >&6; } -if test -n "$EINA_CFLAGS"; then - pkg_cv_EINA_CFLAGS="$EINA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EINA_CFLAGS"; then + pkg_cv_EINA_CFLAGS="$EINA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eina >= 1.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eina >= 1.1.0") 2>&5 ac_status=$? @@ -17610,13 +17633,15 @@ if test -n "$EINA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EINA_LIBS"; then - pkg_cv_EINA_LIBS="$EINA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EINA_LIBS"; then + pkg_cv_EINA_LIBS="$EINA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eina >= 1.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eina >= 1.1.0") 2>&5 ac_status=$? @@ -17626,15 +17651,14 @@ if test -n "$EINA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -17642,14 +17666,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EINA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eina >= 1.1.0" 2>&1` + EINA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eina >= 1.1.0"` else - EINA_PKG_ERRORS=`$PKG_CONFIG --print-errors "eina >= 1.1.0" 2>&1` + EINA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eina >= 1.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$EINA_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (eina >= 1.1.0) were not met: + as_fn_error "Package requirements (eina >= 1.1.0) were not met: $EINA_PKG_ERRORS @@ -17658,13 +17682,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables EINA_CFLAGS and EINA_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 +See the pkg-config man page for more details. +" "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +as_fn_error "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -17673,13 +17696,13 @@ and EINA_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details." "$LINENO" 5; } else EINA_CFLAGS=$pkg_cv_EINA_CFLAGS EINA_LIBS=$pkg_cv_EINA_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - + : fi CPPFLAGS_SAVE="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $EINA_CFLAGS" @@ -17699,8 +17722,9 @@ else if test "$ac_cv_type_Eina_Unicode" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (Eina_Unicode) -See \`config.log' for more details" "$LINENO" 5 ; } +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (Eina_Unicode) +See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_Eina_Unicode=0 fi @@ -17725,10 +17749,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5 $as_echo_n "checking for FREETYPE... " >&6; } -if test -n "$FREETYPE_CFLAGS"; then - pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$FREETYPE_CFLAGS"; then + pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 9.3.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "freetype2 >= 9.3.0") 2>&5 ac_status=$? @@ -17738,13 +17763,15 @@ if test -n "$FREETYPE_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$FREETYPE_LIBS"; then - pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$FREETYPE_LIBS"; then + pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 9.3.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "freetype2 >= 9.3.0") 2>&5 ac_status=$? @@ -17754,15 +17781,14 @@ if test -n "$FREETYPE_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -17770,14 +17796,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2 >= 9.3.0" 2>&1` + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "freetype2 >= 9.3.0"` else - FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2 >= 9.3.0" 2>&1` + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2 >= 9.3.0"` fi # Put the nasty error message in config.log where it belongs echo "$FREETYPE_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (freetype2 >= 9.3.0) were not met: + as_fn_error "Package requirements (freetype2 >= 9.3.0) were not met: $FREETYPE_PKG_ERRORS @@ -17786,13 +17812,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables FREETYPE_CFLAGS and FREETYPE_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 +See the pkg-config man page for more details. +" "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +as_fn_error "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -17801,13 +17826,13 @@ and FREETYPE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details." "$LINENO" 5; } else FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - + : fi requirement_evas="freetype2 eina >= 1.1.0 ${requirement_evas}" @@ -17835,10 +17860,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FONTCONFIG" >&5 $as_echo_n "checking for FONTCONFIG... " >&6; } -if test -n "$FONTCONFIG_CFLAGS"; then - pkg_cv_FONTCONFIG_CFLAGS="$FONTCONFIG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$FONTCONFIG_CFLAGS"; then + pkg_cv_FONTCONFIG_CFLAGS="$FONTCONFIG_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.5.0") 2>&5 ac_status=$? @@ -17848,13 +17874,15 @@ if test -n "$FONTCONFIG_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$FONTCONFIG_LIBS"; then - pkg_cv_FONTCONFIG_LIBS="$FONTCONFIG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$FONTCONFIG_LIBS"; then + pkg_cv_FONTCONFIG_LIBS="$FONTCONFIG_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.5.0") 2>&5 ac_status=$? @@ -17864,15 +17892,14 @@ if test -n "$FONTCONFIG_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -17880,24 +17907,24 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "fontconfig >= 2.5.0" 2>&1` + FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "fontconfig >= 2.5.0"` else - FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors "fontconfig >= 2.5.0" 2>&1` + FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$FONTCONFIG_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if test "x${want_fontconfig}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Fontconfig not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Fontconfig not found (strict dependencies checking)" "$LINENO" 5 fi elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if test "x${want_fontconfig}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Fontconfig not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Fontconfig not found (strict dependencies checking)" "$LINENO" 5 fi else @@ -17972,10 +17999,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FRIBIDI" >&5 $as_echo_n "checking for FRIBIDI... " >&6; } -if test -n "$FRIBIDI_CFLAGS"; then - pkg_cv_FRIBIDI_CFLAGS="$FRIBIDI_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$FRIBIDI_CFLAGS"; then + pkg_cv_FRIBIDI_CFLAGS="$FRIBIDI_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fribidi >= 0.19.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "fribidi >= 0.19.2") 2>&5 ac_status=$? @@ -17985,13 +18013,15 @@ if test -n "$FRIBIDI_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$FRIBIDI_LIBS"; then - pkg_cv_FRIBIDI_LIBS="$FRIBIDI_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$FRIBIDI_LIBS"; then + pkg_cv_FRIBIDI_LIBS="$FRIBIDI_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fribidi >= 0.19.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "fribidi >= 0.19.2") 2>&5 ac_status=$? @@ -18001,15 +18031,14 @@ if test -n "$FRIBIDI_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -18017,24 +18046,24 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - FRIBIDI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "fribidi >= 0.19.2" 2>&1` + FRIBIDI_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "fribidi >= 0.19.2"` else - FRIBIDI_PKG_ERRORS=`$PKG_CONFIG --print-errors "fribidi >= 0.19.2" 2>&1` + FRIBIDI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fribidi >= 0.19.2"` fi # Put the nasty error message in config.log where it belongs echo "$FRIBIDI_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if test "x$want_fribidi" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Fribidi not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Fribidi not found (strict dependencies checking)" "$LINENO" 5 fi elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if test "x$want_fribidi" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Fribidi not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Fribidi not found (strict dependencies checking)" "$LINENO" 5 fi else @@ -18066,8 +18095,9 @@ else if test "$ac_cv_type_FriBidiChar" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (FriBidiChar) -See \`config.log' for more details" "$LINENO" 5 ; } +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (FriBidiChar) +See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_FriBidiChar=0 fi @@ -18114,10 +18144,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HARFBUZZ" >&5 $as_echo_n "checking for HARFBUZZ... " >&6; } -if test -n "$HARFBUZZ_CFLAGS"; then - pkg_cv_HARFBUZZ_CFLAGS="$HARFBUZZ_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$HARFBUZZ_CFLAGS"; then + pkg_cv_HARFBUZZ_CFLAGS="$HARFBUZZ_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"harfbuzz >= 0.6.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "harfbuzz >= 0.6.0") 2>&5 ac_status=$? @@ -18127,13 +18158,15 @@ if test -n "$HARFBUZZ_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$HARFBUZZ_LIBS"; then - pkg_cv_HARFBUZZ_LIBS="$HARFBUZZ_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$HARFBUZZ_LIBS"; then + pkg_cv_HARFBUZZ_LIBS="$HARFBUZZ_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"harfbuzz >= 0.6.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "harfbuzz >= 0.6.0") 2>&5 ac_status=$? @@ -18143,15 +18176,14 @@ if test -n "$HARFBUZZ_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -18159,24 +18191,24 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - HARFBUZZ_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "harfbuzz >= 0.6.0" 2>&1` + HARFBUZZ_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "harfbuzz >= 0.6.0"` else - HARFBUZZ_PKG_ERRORS=`$PKG_CONFIG --print-errors "harfbuzz >= 0.6.0" 2>&1` + HARFBUZZ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "harfbuzz >= 0.6.0"` fi # Put the nasty error message in config.log where it belongs echo "$HARFBUZZ_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if test "x$want_harfbuzz" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Harfbuzz not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Harfbuzz not found (strict dependencies checking)" "$LINENO" 5 fi elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if test "x$want_harfbuzz" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Harfbuzz not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Harfbuzz not found (strict dependencies checking)" "$LINENO" 5 fi else @@ -18207,7 +18239,7 @@ $as_echo "#define HAVE_HARFBUZZ 1" >>confdefs.h else if test "x$want_harfbuzz" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Harfbuzz-ft not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Harfbuzz-ft not found (strict dependencies checking)" "$LINENO" 5 fi have_harfbuzz="no" @@ -18243,10 +18275,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIXMAN" >&5 $as_echo_n "checking for PIXMAN... " >&6; } -if test -n "$PIXMAN_CFLAGS"; then - pkg_cv_PIXMAN_CFLAGS="$PIXMAN_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PIXMAN_CFLAGS"; then + pkg_cv_PIXMAN_CFLAGS="$PIXMAN_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pixman-1\""; } >&5 ($PKG_CONFIG --exists --print-errors "pixman-1") 2>&5 ac_status=$? @@ -18256,13 +18289,15 @@ if test -n "$PIXMAN_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$PIXMAN_LIBS"; then - pkg_cv_PIXMAN_LIBS="$PIXMAN_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PIXMAN_LIBS"; then + pkg_cv_PIXMAN_LIBS="$PIXMAN_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pixman-1\""; } >&5 ($PKG_CONFIG --exists --print-errors "pixman-1") 2>&5 ac_status=$? @@ -18272,15 +18307,14 @@ if test -n "$PIXMAN_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -18288,24 +18322,24 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - PIXMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "pixman-1" 2>&1` + PIXMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pixman-1"` else - PIXMAN_PKG_ERRORS=`$PKG_CONFIG --print-errors "pixman-1" 2>&1` + PIXMAN_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pixman-1"` fi # Put the nasty error message in config.log where it belongs echo "$PIXMAN_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if test "x${want_pixman}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Pixman not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Pixman not found (strict dependencies checking)" "$LINENO" 5 fi elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if test "x${want_pixman}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Pixman not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Pixman not found (strict dependencies checking)" "$LINENO" 5 fi else @@ -18323,6 +18357,97 @@ $as_echo "#define HAVE_PIXMAN 1" >>confdefs.h fi fi +have_pixman_font="no" +# Check whether --enable-pixman-font was given. +if test "${enable_pixman_font+set}" = set; then : + enableval=$enable_pixman_font; + have_pixman_font="yes" + +$as_echo "#define PIXMAN_FONT 1" >>confdefs.h + + + +fi + + +have_pixman_rect="no" +# Check whether --enable-pixman-rect was given. +if test "${enable_pixman_rect+set}" = set; then : + enableval=$enable_pixman_rect; + have_pixman_rect="yes" + +$as_echo "#define PIXMAN_RECT 1" >>confdefs.h + + + +fi + + +have_pixman_line="no" +# Check whether --enable-pixman-line was given. +if test "${enable_pixman_line+set}" = set; then : + enableval=$enable_pixman_line; + have_pixman_line="yes" + +$as_echo "#define PIXMAN_LINE 1" >>confdefs.h + + + +fi + + +have_pixman_poly="no" +# Check whether --enable-pixman-poly was given. +if test "${enable_pixman_poly+set}" = set; then : + enableval=$enable_pixman_poly; + have_pixman_poly="yes" + +$as_echo "#define PIXMAN_POLY 1" >>confdefs.h + + + +fi + + +have_pixman_image="no" +# Check whether --enable-pixman-image was given. +if test "${enable_pixman_image+set}" = set; then : + enableval=$enable_pixman_image; + have_pixman_image="yes" + +$as_echo "#define PIXMAN_IMAGE 1" >>confdefs.h + + + +fi + + +have_pixman_image_scale_sample="no" +# Check whether --enable-pixman-image-scale-sample was given. +if test "${enable_pixman_image_scale_sample+set}" = set; then : + enableval=$enable_pixman_image_scale_sample; + have_pixman_image_scale_sample="yes" + +$as_echo "#define PIXMAN_IMAGE_SCALE_SAMPLE 1" >>confdefs.h + + + +fi + + +have_tile_rotate="no" +# Check whether --enable-tile-rotate was given. +if test "${enable_tile_rotate+set}" = set; then : + enableval=$enable_tile_rotate; + have_tile_rotate="yes" + +$as_echo "#define TILE_ROTATE 1" >>confdefs.h + + + +fi + + ### Checks for header files { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } @@ -18436,11 +18561,12 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi -for ac_header in unistd.h stdint.h sys/param.h netinet/in.h +for ac_header in unistd.h stdint.h sys/param.h netinet/in.h sys/mman.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -18501,7 +18627,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - ### Checks for types ac_fn_c_check_type "$LINENO" "struct sigaction" "ac_cv_type_struct_sigaction" "#include " @@ -18820,8 +18945,8 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) - as_fn_error $? "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + as_fn_error "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac case $ac_cv_prog_cc_stdc in #( @@ -19494,7 +19619,8 @@ if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func @@ -19641,7 +19767,7 @@ fi if test "x$_efl_have_fnmatch" = "xyes"; then : else - as_fn_error $? "Cannot find fnmatch()" "$LINENO" 5 + as_fn_error "Cannot find fnmatch()" "$LINENO" 5 fi @@ -19988,7 +20114,7 @@ if test "x$gl_flavor_gles" = "xyes"; then if test "x$eng" = "xx"; then eng="" else - as_fn_error $? "Please enable just 1 OpenGL-ES flavor. Choices are: + as_fn_error "Please enable just 1 OpenGL-ES flavor. Choices are: --enable-gles-variety-sgx (Most GL-ES2 GPUs with shader compiler) --enable-gles-variety-s3c6410 (s3c6410 with offline shader compiler) You will also need to enable the OpenGL engine for X11 with: @@ -20049,7 +20175,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Buffer dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Buffer dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Buffer rendering backend will be built" >&5 @@ -20162,7 +20288,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software GDI dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software GDI dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software GDI rendering backend will be built" >&5 @@ -20275,7 +20401,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software DirectDraw dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software DirectDraw dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software DirectDraw rendering backend will be built" >&5 @@ -20367,7 +20493,8 @@ for ac_header in d3d9.h d3dx9.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -20396,7 +20523,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Direct3D dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Direct3D dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Direct3D rendering backend will be built" >&5 @@ -20491,10 +20618,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL" >&5 $as_echo_n "checking for SDL... " >&6; } -if test -n "$SDL_CFLAGS"; then - pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SDL_CFLAGS"; then + pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl >= 1.2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl >= 1.2.0") 2>&5 ac_status=$? @@ -20504,13 +20632,15 @@ if test -n "$SDL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$SDL_LIBS"; then - pkg_cv_SDL_LIBS="$SDL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SDL_LIBS"; then + pkg_cv_SDL_LIBS="$SDL_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl >= 1.2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl >= 1.2.0") 2>&5 ac_status=$? @@ -20520,15 +20650,14 @@ if test -n "$SDL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -20536,14 +20665,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "sdl >= 1.2.0" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "sdl >= 1.2.0"` else - SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors "sdl >= 1.2.0" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sdl >= 1.2.0"` fi # Put the nasty error message in config.log where it belongs echo "$SDL_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (sdl >= 1.2.0) were not met: + as_fn_error "Package requirements (sdl >= 1.2.0) were not met: $SDL_PKG_ERRORS @@ -20552,13 +20681,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables SDL_CFLAGS and SDL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 +See the pkg-config man page for more details. +" "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +as_fn_error "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -20567,7 +20695,7 @@ and SDL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details." "$LINENO" 5; } else SDL_CFLAGS=$pkg_cv_SDL_CFLAGS SDL_LIBS=$pkg_cv_SDL_LIBS @@ -20599,7 +20727,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software SDL dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software SDL dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software SDL rendering backend will be built" >&5 @@ -20708,7 +20836,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "PSL1GHT dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "PSL1GHT dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PSL1GHT rendering backend will be built" >&5 @@ -20803,10 +20931,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL" >&5 $as_echo_n "checking for SDL... " >&6; } -if test -n "$SDL_CFLAGS"; then - pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SDL_CFLAGS"; then + pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl >= 1.2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl >= 1.2.0") 2>&5 ac_status=$? @@ -20816,13 +20945,15 @@ if test -n "$SDL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$SDL_LIBS"; then - pkg_cv_SDL_LIBS="$SDL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SDL_LIBS"; then + pkg_cv_SDL_LIBS="$SDL_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl >= 1.2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl >= 1.2.0") 2>&5 ac_status=$? @@ -20832,15 +20963,14 @@ if test -n "$SDL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -20848,14 +20978,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "sdl >= 1.2.0" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "sdl >= 1.2.0"` else - SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors "sdl >= 1.2.0" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sdl >= 1.2.0"` fi # Put the nasty error message in config.log where it belongs echo "$SDL_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (sdl >= 1.2.0) were not met: + as_fn_error "Package requirements (sdl >= 1.2.0) were not met: $SDL_PKG_ERRORS @@ -20864,13 +20994,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables SDL_CFLAGS and SDL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 +See the pkg-config man page for more details. +" "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +as_fn_error "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -20879,7 +21008,7 @@ and SDL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details." "$LINENO" 5; } else SDL_CFLAGS=$pkg_cv_SDL_CFLAGS SDL_LIBS=$pkg_cv_SDL_LIBS @@ -21040,7 +21169,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "OpenGL SDL dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "OpenGL SDL dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenGL SDL rendering backend will be built" >&5 @@ -21184,10 +21313,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL_EET" >&5 $as_echo_n "checking for GL_EET... " >&6; } -if test -n "$GL_EET_CFLAGS"; then - pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_CFLAGS"; then + pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -21197,13 +21327,15 @@ if test -n "$GL_EET_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$GL_EET_LIBS"; then - pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_LIBS"; then + pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -21213,15 +21345,14 @@ if test -n "$GL_EET_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -21229,17 +21360,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eet >= 1.5.0"` else - GL_EET_PKG_ERRORS=`$PKG_CONFIG --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eet >= 1.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$GL_EET_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else GL_EET_CFLAGS=$pkg_cv_GL_EET_CFLAGS @@ -21263,7 +21394,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "OpenGL Cocoa dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "OpenGL Cocoa dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenGL Cocoa rendering backend will be built" >&5 @@ -21372,7 +21503,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Framebuffer dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Framebuffer dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Framebuffer rendering backend will be built" >&5 @@ -21467,10 +21598,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRECTFB" >&5 $as_echo_n "checking for DIRECTFB... " >&6; } -if test -n "$DIRECTFB_CFLAGS"; then - pkg_cv_DIRECTFB_CFLAGS="$DIRECTFB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$DIRECTFB_CFLAGS"; then + pkg_cv_DIRECTFB_CFLAGS="$DIRECTFB_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"directfb >= 0.9.16\""; } >&5 ($PKG_CONFIG --exists --print-errors "directfb >= 0.9.16") 2>&5 ac_status=$? @@ -21480,13 +21612,15 @@ if test -n "$DIRECTFB_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$DIRECTFB_LIBS"; then - pkg_cv_DIRECTFB_LIBS="$DIRECTFB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$DIRECTFB_LIBS"; then + pkg_cv_DIRECTFB_LIBS="$DIRECTFB_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"directfb >= 0.9.16\""; } >&5 ($PKG_CONFIG --exists --print-errors "directfb >= 0.9.16") 2>&5 ac_status=$? @@ -21496,15 +21630,14 @@ if test -n "$DIRECTFB_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -21512,14 +21645,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "directfb >= 0.9.16" 2>&1` + DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "directfb >= 0.9.16"` else - DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --print-errors "directfb >= 0.9.16" 2>&1` + DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "directfb >= 0.9.16"` fi # Put the nasty error message in config.log where it belongs echo "$DIRECTFB_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (directfb >= 0.9.16) were not met: + as_fn_error "Package requirements (directfb >= 0.9.16) were not met: $DIRECTFB_PKG_ERRORS @@ -21528,13 +21661,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables DIRECTFB_CFLAGS and DIRECTFB_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 +See the pkg-config man page for more details. +" "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +as_fn_error "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -21543,7 +21675,7 @@ and DIRECTFB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details." "$LINENO" 5; } else DIRECTFB_CFLAGS=$pkg_cv_DIRECTFB_CFLAGS DIRECTFB_LIBS=$pkg_cv_DIRECTFB_LIBS @@ -21575,7 +21707,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "DirectFB dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "DirectFB dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DirectFB rendering backend will be built" >&5 @@ -21669,10 +21801,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB" >&5 $as_echo_n "checking for XCB... " >&6; } -if test -n "$XCB_CFLAGS"; then - pkg_cv_XCB_CFLAGS="$XCB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$XCB_CFLAGS"; then + pkg_cv_XCB_CFLAGS="$XCB_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb xcb-shm xcb-image >= 0.2.1 pixman-1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1") 2>&5 ac_status=$? @@ -21682,13 +21815,15 @@ if test -n "$XCB_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$XCB_LIBS"; then - pkg_cv_XCB_LIBS="$XCB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$XCB_LIBS"; then + pkg_cv_XCB_LIBS="$XCB_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb xcb-shm xcb-image >= 0.2.1 pixman-1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1") 2>&5 ac_status=$? @@ -21698,15 +21833,14 @@ if test -n "$XCB_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -21714,20 +21848,20 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1" 2>&1` + XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1"` else - XCB_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1" 2>&1` + XCB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_dep="no" elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } have_dep="no" @@ -21762,7 +21896,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software X11 8 bits grayscale dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software X11 8 bits grayscale dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software X11 8 bits grayscale rendering backend will be built" >&5 @@ -21866,7 +22000,7 @@ if test "x$with_x" = xno; then have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #( + *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -21884,7 +22018,7 @@ libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done @@ -21970,7 +22104,7 @@ else fi done fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -22657,7 +22791,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software X11 16 bits dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software X11 16 bits dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software X11 16 bits rendering backend will be built" >&5 @@ -22770,7 +22904,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software DirectDraw 16 bits dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software DirectDraw 16 bits dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software DirectDraw 16 bits rendering backend will be built" >&5 @@ -22872,7 +23006,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software Windows CE 16 bits dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software Windows CE 16 bits dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software Windows CE 16 bits rendering backend will be built" >&5 @@ -22967,10 +23101,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL" >&5 $as_echo_n "checking for SDL... " >&6; } -if test -n "$SDL_CFLAGS"; then - pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SDL_CFLAGS"; then + pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl >= 1.2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl >= 1.2.0") 2>&5 ac_status=$? @@ -22980,13 +23115,15 @@ if test -n "$SDL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$SDL_LIBS"; then - pkg_cv_SDL_LIBS="$SDL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SDL_LIBS"; then + pkg_cv_SDL_LIBS="$SDL_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl >= 1.2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl >= 1.2.0") 2>&5 ac_status=$? @@ -22996,15 +23133,14 @@ if test -n "$SDL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -23012,14 +23148,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "sdl >= 1.2.0" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "sdl >= 1.2.0"` else - SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors "sdl >= 1.2.0" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sdl >= 1.2.0"` fi # Put the nasty error message in config.log where it belongs echo "$SDL_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (sdl >= 1.2.0) were not met: + as_fn_error "Package requirements (sdl >= 1.2.0) were not met: $SDL_PKG_ERRORS @@ -23028,13 +23164,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables SDL_CFLAGS and SDL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 +See the pkg-config man page for more details. +" "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +as_fn_error "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -23043,7 +23178,7 @@ and SDL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details." "$LINENO" 5; } else SDL_CFLAGS=$pkg_cv_SDL_CFLAGS SDL_LIBS=$pkg_cv_SDL_LIBS @@ -23075,7 +23210,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software SDL 16 bits dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software SDL 16 bits dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software SDL 16 bits rendering backend will be built" >&5 @@ -23128,6 +23263,386 @@ fi + + + +want_engine="${want_evas_engine_wayland_shm}" +want_static_engine="no" +have_engine="no" +have_evas_engine_wayland_shm="no" + +# Check whether --enable-wayland-shm was given. +if test "${enable_wayland_shm+set}" = set; then : + enableval=$enable_wayland_shm; + if test "x${enableval}" = "xyes" ; then + want_engine="yes" + else + if test "x${enableval}" = "xstatic" ; then + want_engine="static" + else + want_engine="no" + fi + fi + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Wayland Shm rendering backend" >&5 +$as_echo_n "checking whether to enable Wayland Shm rendering backend... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_engine}" >&5 +$as_echo "${want_engine}" >&6; } + +if test "x${want_engine}" = "xyes" -o "x${want_engine}" = "xstatic" -o "x${want_engine}" = "xauto" ; then + + +have_dep="yes" +evas_engine_wayland_shm_cflags="" +evas_engine_wayland_shm_libs="" + + + + +if test "x${have_dep}" = "xyes" ; then + have_engine="yes" +else + have_engine="no" +fi + + +fi + +if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then + as_fn_error "Wayland Shm dependencies not found (strict dependencies checking)" "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Wayland Shm rendering backend will be built" >&5 +$as_echo_n "checking whether Wayland Shm rendering backend will be built... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_engine}" >&5 +$as_echo "${have_engine}" >&6; } + +if test "x${have_engine}" = "xyes" ; then + if test "x${want_engine}" = "xstatic" ; then + have_evas_engine_wayland_shm="static" + want_static_engine="yes" + else + have_evas_engine_wayland_shm="yes" + fi +fi + +if test "x${have_engine}" = "xyes" ; then + +$as_echo "#define BUILD_ENGINE_WAYLAND_SHM 1" >>confdefs.h + +fi + + if test "x${have_engine}" = "xyes"; then + BUILD_ENGINE_WAYLAND_SHM_TRUE= + BUILD_ENGINE_WAYLAND_SHM_FALSE='#' +else + BUILD_ENGINE_WAYLAND_SHM_TRUE='#' + BUILD_ENGINE_WAYLAND_SHM_FALSE= +fi + + +if test "x${want_static_engine}" = "xyes" ; then + +$as_echo "#define EVAS_STATIC_BUILD_WAYLAND_SHM 1" >>confdefs.h + + have_static_module="yes" +fi + + if test "x${want_static_engine}" = "xyes"; then + EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE= + EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE='#' +else + EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE='#' + EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE= +fi + + + + + + + + + + +want_engine="${want_evas_engine_wayland_egl}" +want_static_engine="no" +have_engine="no" +have_evas_engine_wayland_egl="no" + +# Check whether --enable-wayland-egl was given. +if test "${enable_wayland_egl+set}" = set; then : + enableval=$enable_wayland_egl; + if test "x${enableval}" = "xyes" ; then + want_engine="yes" + else + if test "x${enableval}" = "xstatic" ; then + want_engine="static" + else + want_engine="no" + fi + fi + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Wayland Egl rendering backend" >&5 +$as_echo_n "checking whether to enable Wayland Egl rendering backend... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_engine}" >&5 +$as_echo "${want_engine}" >&6; } + +if test "x${want_engine}" = "xyes" -o "x${want_engine}" = "xstatic" -o "x${want_engine}" = "xauto" ; then + + +requirement="" +have_dep="no" +evas_engine_wayland_egl_cflags="" +evas_engine_wayland_egl_libs="" + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAYLAND_EGL" >&5 +$as_echo_n "checking for WAYLAND_EGL... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$WAYLAND_EGL_CFLAGS"; then + pkg_cv_WAYLAND_EGL_CFLAGS="$WAYLAND_EGL_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"egl >= 7.10 glesv2 gl wayland-client wayland-egl\""; } >&5 + ($PKG_CONFIG --exists --print-errors "egl >= 7.10 glesv2 gl wayland-client wayland-egl") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_WAYLAND_EGL_CFLAGS=`$PKG_CONFIG --cflags "egl >= 7.10 glesv2 gl wayland-client wayland-egl" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$WAYLAND_EGL_LIBS"; then + pkg_cv_WAYLAND_EGL_LIBS="$WAYLAND_EGL_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"egl >= 7.10 glesv2 gl wayland-client wayland-egl\""; } >&5 + ($PKG_CONFIG --exists --print-errors "egl >= 7.10 glesv2 gl wayland-client wayland-egl") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_WAYLAND_EGL_LIBS=`$PKG_CONFIG --libs "egl >= 7.10 glesv2 gl wayland-client wayland-egl" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + WAYLAND_EGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "egl >= 7.10 glesv2 gl wayland-client wayland-egl"` + else + WAYLAND_EGL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "egl >= 7.10 glesv2 gl wayland-client wayland-egl"` + fi + # Put the nasty error message in config.log where it belongs + echo "$WAYLAND_EGL_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + have_dep="no" + + +elif test $pkg_failed = untried; then + + have_dep="no" + + +else + WAYLAND_EGL_CFLAGS=$pkg_cv_WAYLAND_EGL_CFLAGS + WAYLAND_EGL_LIBS=$pkg_cv_WAYLAND_EGL_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + have_dep="yes" + requirement="egl >= 7.10 glesv2 gl wayland-client wayland-egl" + evas_engine_wayland_egl_cflags="${WAYLAND_EGL_CFLAGS}" + evas_engine_wayland_egl_libs="${WAYLAND_EGL_LIBS}" + +fi + +if test "x${have_dep}" = "xyes" ; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL_EET" >&5 +$as_echo_n "checking for GL_EET... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_CFLAGS"; then + pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GL_EET_CFLAGS=`$PKG_CONFIG --cflags "eet >= 1.5.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_LIBS"; then + pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GL_EET_LIBS=`$PKG_CONFIG --libs "eet >= 1.5.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eet >= 1.5.0"` + else + GL_EET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eet >= 1.5.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GL_EET_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then + have_dep="no" +else + GL_EET_CFLAGS=$pkg_cv_GL_EET_CFLAGS + GL_EET_LIBS=$pkg_cv_GL_EET_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_dep="yes" +fi + ac_fn_c_check_header_compile "$LINENO" "GLES2/gl2.h" "ac_cv_header_GLES2_gl2_h" " + +" +if test "x$ac_cv_header_GLES2_gl2_h" = x""yes; then : + have_egl="yes" +else + have_egl="no" +fi + + + if test "x${have_egl}" = "xyes" ; then + evas_engine_wayland_egl_cflags="${WAYLAND_EGL_CFLAGS}" + evas_engine_wayland_egl_libs="${WAYLAND_EGL_LIBS} -lGL -lGLESv2 -lEGL" + fi +fi + + + + +if test "x${want_engine}" = "xstatic" ; then + requirement_evas="${requirement} ${requirement_evas}" +fi + +if test "x${have_dep}" = "xyes" ; then + have_engine="yes" +else + have_engine="no" +fi + + +fi + +if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then + as_fn_error "Wayland Egl dependencies not found (strict dependencies checking)" "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Wayland Egl rendering backend will be built" >&5 +$as_echo_n "checking whether Wayland Egl rendering backend will be built... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_engine}" >&5 +$as_echo "${have_engine}" >&6; } + +if test "x${have_engine}" = "xyes" ; then + if test "x${want_engine}" = "xstatic" ; then + have_evas_engine_wayland_egl="static" + want_static_engine="yes" + else + have_evas_engine_wayland_egl="yes" + fi +fi + +if test "x${have_engine}" = "xyes" ; then + +$as_echo "#define BUILD_ENGINE_WAYLAND_EGL 1" >>confdefs.h + +fi + + if test "x${have_engine}" = "xyes"; then + BUILD_ENGINE_WAYLAND_EGL_TRUE= + BUILD_ENGINE_WAYLAND_EGL_FALSE='#' +else + BUILD_ENGINE_WAYLAND_EGL_TRUE='#' + BUILD_ENGINE_WAYLAND_EGL_FALSE= +fi + + +if test "x${want_static_engine}" = "xyes" ; then + +$as_echo "#define EVAS_STATIC_BUILD_WAYLAND_EGL 1" >>confdefs.h + + have_static_module="yes" +fi + + if test "x${want_static_engine}" = "xyes"; then + EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE= + EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE='#' +else + EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE='#' + EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE= +fi + + + + + + + # SDL primitive sdl_primitive="no" @@ -23241,10 +23756,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB" >&5 $as_echo_n "checking for XCB... " >&6; } -if test -n "$XCB_CFLAGS"; then - pkg_cv_XCB_CFLAGS="$XCB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$XCB_CFLAGS"; then + pkg_cv_XCB_CFLAGS="$XCB_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb xcb-shm xcb-image >= 0.2.1 pixman-1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1") 2>&5 ac_status=$? @@ -23254,13 +23770,15 @@ if test -n "$XCB_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$XCB_LIBS"; then - pkg_cv_XCB_LIBS="$XCB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$XCB_LIBS"; then + pkg_cv_XCB_LIBS="$XCB_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb xcb-shm xcb-image >= 0.2.1 pixman-1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1") 2>&5 ac_status=$? @@ -23270,15 +23788,14 @@ if test -n "$XCB_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -23286,20 +23803,20 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1" 2>&1` + XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1"` else - XCB_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1" 2>&1` + XCB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_dep="no" elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } have_dep="no" @@ -23334,7 +23851,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software XCB dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software XCB dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software XCB rendering backend will be built" >&5 @@ -23460,7 +23977,7 @@ if test "x$with_x" = xno; then have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #( + *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -23478,7 +23995,7 @@ libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done @@ -23564,7 +24081,7 @@ else fi done fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -24251,7 +24768,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software Xlib dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software Xlib dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software Xlib rendering backend will be built" >&5 @@ -24451,7 +24968,7 @@ if test "x$with_x" = xno; then have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #( + *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -24469,7 +24986,7 @@ libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done @@ -24555,7 +25072,7 @@ else fi done fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -25314,10 +25831,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_GL" >&5 $as_echo_n "checking for XCB_GL... " >&6; } -if test -n "$XCB_GL_CFLAGS"; then - pkg_cv_XCB_GL_CFLAGS="$XCB_GL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$XCB_GL_CFLAGS"; then + pkg_cv_XCB_GL_CFLAGS="$XCB_GL_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb xcb-glx xcb-render xcb-renderutil\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11-xcb xcb xcb-glx xcb-render xcb-renderutil") 2>&5 ac_status=$? @@ -25327,13 +25845,15 @@ if test -n "$XCB_GL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$XCB_GL_LIBS"; then - pkg_cv_XCB_GL_LIBS="$XCB_GL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$XCB_GL_LIBS"; then + pkg_cv_XCB_GL_LIBS="$XCB_GL_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb xcb-glx xcb-render xcb-renderutil\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11-xcb xcb xcb-glx xcb-render xcb-renderutil") 2>&5 ac_status=$? @@ -25343,15 +25863,14 @@ if test -n "$XCB_GL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -25359,20 +25878,20 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11-xcb xcb xcb-glx xcb-render xcb-renderutil" 2>&1` + XCB_GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11-xcb xcb xcb-glx xcb-render xcb-renderutil"` else - XCB_GL_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11-xcb xcb xcb-glx xcb-render xcb-renderutil" 2>&1` + XCB_GL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11-xcb xcb xcb-glx xcb-render xcb-renderutil"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_GL_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_dep="no" elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } have_dep="no" @@ -25400,10 +25919,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL_EET" >&5 $as_echo_n "checking for GL_EET... " >&6; } -if test -n "$GL_EET_CFLAGS"; then - pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_CFLAGS"; then + pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -25413,13 +25933,15 @@ if test -n "$GL_EET_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$GL_EET_LIBS"; then - pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_LIBS"; then + pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -25429,15 +25951,14 @@ if test -n "$GL_EET_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -25445,17 +25966,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eet >= 1.5.0"` else - GL_EET_PKG_ERRORS=`$PKG_CONFIG --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eet >= 1.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$GL_EET_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else GL_EET_CFLAGS=$pkg_cv_GL_EET_CFLAGS @@ -25544,10 +26065,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL_EET" >&5 $as_echo_n "checking for GL_EET... " >&6; } -if test -n "$GL_EET_CFLAGS"; then - pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_CFLAGS"; then + pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -25557,13 +26079,15 @@ if test -n "$GL_EET_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$GL_EET_LIBS"; then - pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_LIBS"; then + pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -25573,15 +26097,14 @@ if test -n "$GL_EET_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -25589,17 +26112,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eet >= 1.5.0"` else - GL_EET_PKG_ERRORS=`$PKG_CONFIG --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eet >= 1.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$GL_EET_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else GL_EET_CFLAGS=$pkg_cv_GL_EET_CFLAGS @@ -25636,7 +26159,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "OpenGL XCB dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "OpenGL XCB dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenGL XCB rendering backend will be built" >&5 @@ -25763,7 +26286,7 @@ if test "x$with_x" = xno; then have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #( + *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -25781,7 +26304,7 @@ libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done @@ -25867,7 +26390,7 @@ else fi done fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -26636,10 +27159,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL_EET" >&5 $as_echo_n "checking for GL_EET... " >&6; } -if test -n "$GL_EET_CFLAGS"; then - pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_CFLAGS"; then + pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -26649,13 +27173,15 @@ if test -n "$GL_EET_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$GL_EET_LIBS"; then - pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_LIBS"; then + pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -26665,15 +27191,14 @@ if test -n "$GL_EET_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -26681,17 +27206,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eet >= 1.5.0"` else - GL_EET_PKG_ERRORS=`$PKG_CONFIG --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eet >= 1.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$GL_EET_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else GL_EET_CFLAGS=$pkg_cv_GL_EET_CFLAGS @@ -26785,10 +27310,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL_EET" >&5 $as_echo_n "checking for GL_EET... " >&6; } -if test -n "$GL_EET_CFLAGS"; then - pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_CFLAGS"; then + pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -26798,13 +27324,15 @@ if test -n "$GL_EET_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$GL_EET_LIBS"; then - pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_LIBS"; then + pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -26814,15 +27342,14 @@ if test -n "$GL_EET_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -26830,17 +27357,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eet >= 1.5.0"` else - GL_EET_PKG_ERRORS=`$PKG_CONFIG --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eet >= 1.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$GL_EET_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else GL_EET_CFLAGS=$pkg_cv_GL_EET_CFLAGS @@ -26878,7 +27405,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "OpenGL XLib dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "OpenGL XLib dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenGL XLib rendering backend will be built" >&5 @@ -27013,13 +27540,15 @@ have_static_evas_engine_gl_common="no" if test "x$have_evas_engine_gl_xlib" = "xyes" \ || test "x$have_evas_engine_gl_xcb" = "xyes" \ || test "x$have_evas_engine_gl_sdl" = "xyes" \ - || test "x$have_evas_engine_gl_cocoa" = "xyes"; then + || test "x$have_evas_engine_gl_cocoa" = "xyes" \ + || test "x$have_evas_engine_wayland_egl" = "xyes"; then have_evas_engine_gl_common="yes" fi if test "x$have_evas_engine_gl_xlib" = "xstatic" \ || test "x$have_evas_engine_gl_xcb" = "xstatic" \ || test "x$have_evas_engine_gl_sdl" = "xstatic" \ - || test "x$have_evas_engine_gl_cocoa" = "xstatic"; then + || test "x$have_evas_engine_gl_cocoa" = "xstatic" \ + || test "x$have_evas_engine_wayland_egl" = "xstatic"; then have_evas_engine_gl_common="yes" have_static_evas_engine_gl_common="yes" fi @@ -27220,10 +27749,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EDB" >&5 $as_echo_n "checking for EDB... " >&6; } -if test -n "$EDB_CFLAGS"; then - pkg_cv_EDB_CFLAGS="$EDB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDB_CFLAGS"; then + pkg_cv_EDB_CFLAGS="$EDB_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"edb\""; } >&5 ($PKG_CONFIG --exists --print-errors "edb") 2>&5 ac_status=$? @@ -27233,13 +27763,15 @@ if test -n "$EDB_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EDB_LIBS"; then - pkg_cv_EDB_LIBS="$EDB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDB_LIBS"; then + pkg_cv_EDB_LIBS="$EDB_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"edb\""; } >&5 ($PKG_CONFIG --exists --print-errors "edb") 2>&5 ac_status=$? @@ -27249,15 +27781,14 @@ if test -n "$EDB_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -27265,17 +27796,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EDB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "edb" 2>&1` + EDB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "edb"` else - EDB_PKG_ERRORS=`$PKG_CONFIG --print-errors "edb" 2>&1` + EDB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "edb"` fi # Put the nasty error message in config.log where it belongs echo "$EDB_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else EDB_CFLAGS=$pkg_cv_EDB_CFLAGS @@ -27304,7 +27835,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Edb dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Edb dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Edb image loader will be built" >&5 @@ -27402,10 +27933,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EET" >&5 $as_echo_n "checking for EET... " >&6; } -if test -n "$EET_CFLAGS"; then - pkg_cv_EET_CFLAGS="$EET_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EET_CFLAGS"; then + pkg_cv_EET_CFLAGS="$EET_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -27415,13 +27947,15 @@ if test -n "$EET_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EET_LIBS"; then - pkg_cv_EET_LIBS="$EET_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EET_LIBS"; then + pkg_cv_EET_LIBS="$EET_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -27431,15 +27965,14 @@ if test -n "$EET_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -27447,17 +27980,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eet >= 1.5.0" 2>&1` + EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eet >= 1.5.0"` else - EET_PKG_ERRORS=`$PKG_CONFIG --print-errors "eet >= 1.5.0" 2>&1` + EET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eet >= 1.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$EET_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else EET_CFLAGS=$pkg_cv_EET_CFLAGS @@ -27486,7 +28019,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Eet dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Eet dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Eet image loader will be built" >&5 @@ -27562,10 +28095,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EET" >&5 $as_echo_n "checking for EET... " >&6; } -if test -n "$EET_CFLAGS"; then - pkg_cv_EET_CFLAGS="$EET_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EET_CFLAGS"; then + pkg_cv_EET_CFLAGS="$EET_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -27575,13 +28109,15 @@ if test -n "$EET_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EET_LIBS"; then - pkg_cv_EET_LIBS="$EET_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EET_LIBS"; then + pkg_cv_EET_LIBS="$EET_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -27591,15 +28127,14 @@ if test -n "$EET_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -27607,17 +28142,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eet >= 1.5.0" 2>&1` + EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eet >= 1.5.0"` else - EET_PKG_ERRORS=`$PKG_CONFIG --print-errors "eet >= 1.5.0" 2>&1` + EET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eet >= 1.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$EET_PKG_ERRORS" >&5 - have_evas_font_loader_eet="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_evas_font_loader_eet="no" +elif test $pkg_failed = untried; then have_evas_font_loader_eet="no" else EET_CFLAGS=$pkg_cv_EET_CFLAGS @@ -27629,7 +28164,7 @@ fi fi if test "x${have_evas_font_loader_eet}" = "xno" -a "x$want_loader" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Eet dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Eet dependencies not found (strict dependencies checking)" "$LINENO" 5 fi if test "x$have_evas_font_loader_eet" = "xyes" ; then @@ -27798,7 +28333,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Gif dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Gif dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Gif image loader will be built" >&5 @@ -27988,7 +28523,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Jpeg dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Jpeg dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Jpeg image loader will be built" >&5 @@ -28114,7 +28649,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "PMAPS dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "PMAPS dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PMAPS image loader will be built" >&5 @@ -28212,10 +28747,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5 $as_echo_n "checking for PNG... " >&6; } -if test -n "$PNG_CFLAGS"; then - pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PNG_CFLAGS"; then + pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng >= 1.2.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng >= 1.2.10") 2>&5 ac_status=$? @@ -28225,13 +28761,15 @@ if test -n "$PNG_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$PNG_LIBS"; then - pkg_cv_PNG_LIBS="$PNG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PNG_LIBS"; then + pkg_cv_PNG_LIBS="$PNG_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng >= 1.2.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng >= 1.2.10") 2>&5 ac_status=$? @@ -28241,15 +28779,14 @@ if test -n "$PNG_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -28257,17 +28794,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng >= 1.2.10" 2>&1` + PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libpng >= 1.2.10"` else - PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng >= 1.2.10" 2>&1` + PNG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpng >= 1.2.10"` fi # Put the nasty error message in config.log where it belongs echo "$PNG_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else PNG_CFLAGS=$pkg_cv_PNG_CFLAGS @@ -28283,10 +28820,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5 $as_echo_n "checking for PNG... " >&6; } -if test -n "$PNG_CFLAGS"; then - pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PNG_CFLAGS"; then + pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng15\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng15") 2>&5 ac_status=$? @@ -28296,13 +28834,15 @@ if test -n "$PNG_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$PNG_LIBS"; then - pkg_cv_PNG_LIBS="$PNG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PNG_LIBS"; then + pkg_cv_PNG_LIBS="$PNG_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng15\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng15") 2>&5 ac_status=$? @@ -28312,15 +28852,14 @@ if test -n "$PNG_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -28328,17 +28867,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng15" 2>&1` + PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libpng15"` else - PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng15" 2>&1` + PNG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpng15"` fi # Put the nasty error message in config.log where it belongs echo "$PNG_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else PNG_CFLAGS=$pkg_cv_PNG_CFLAGS @@ -28355,10 +28894,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5 $as_echo_n "checking for PNG... " >&6; } -if test -n "$PNG_CFLAGS"; then - pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PNG_CFLAGS"; then + pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng14\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng14") 2>&5 ac_status=$? @@ -28368,13 +28908,15 @@ if test -n "$PNG_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$PNG_LIBS"; then - pkg_cv_PNG_LIBS="$PNG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PNG_LIBS"; then + pkg_cv_PNG_LIBS="$PNG_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng14\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng14") 2>&5 ac_status=$? @@ -28384,15 +28926,14 @@ if test -n "$PNG_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -28400,17 +28941,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng14" 2>&1` + PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libpng14"` else - PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng14" 2>&1` + PNG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpng14"` fi # Put the nasty error message in config.log where it belongs echo "$PNG_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else PNG_CFLAGS=$pkg_cv_PNG_CFLAGS @@ -28427,10 +28968,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5 $as_echo_n "checking for PNG... " >&6; } -if test -n "$PNG_CFLAGS"; then - pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PNG_CFLAGS"; then + pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng12 >= 1.2.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng12 >= 1.2.10") 2>&5 ac_status=$? @@ -28440,13 +28982,15 @@ if test -n "$PNG_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$PNG_LIBS"; then - pkg_cv_PNG_LIBS="$PNG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PNG_LIBS"; then + pkg_cv_PNG_LIBS="$PNG_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng12 >= 1.2.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng12 >= 1.2.10") 2>&5 ac_status=$? @@ -28456,15 +29000,14 @@ if test -n "$PNG_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -28472,17 +29015,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng12 >= 1.2.10" 2>&1` + PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libpng12 >= 1.2.10"` else - PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng12 >= 1.2.10" 2>&1` + PNG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpng12 >= 1.2.10"` fi # Put the nasty error message in config.log where it belongs echo "$PNG_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else PNG_CFLAGS=$pkg_cv_PNG_CFLAGS @@ -28513,7 +29056,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "PNG dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "PNG dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PNG image loader will be built" >&5 @@ -28611,10 +29154,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SVG" >&5 $as_echo_n "checking for SVG... " >&6; } -if test -n "$SVG_CFLAGS"; then - pkg_cv_SVG_CFLAGS="$SVG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SVG_CFLAGS"; then + pkg_cv_SVG_CFLAGS="$SVG_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"librsvg-2.0 >= 2.14.0 cairo >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "librsvg-2.0 >= 2.14.0 @@ -28627,13 +29171,15 @@ if test -n "$SVG_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$SVG_LIBS"; then - pkg_cv_SVG_LIBS="$SVG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SVG_LIBS"; then + pkg_cv_SVG_LIBS="$SVG_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"librsvg-2.0 >= 2.14.0 cairo >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "librsvg-2.0 >= 2.14.0 @@ -28646,15 +29192,14 @@ if test -n "$SVG_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -28662,20 +29207,20 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SVG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "librsvg-2.0 >= 2.14.0 - cairo >= 1.0.0" 2>&1` + SVG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "librsvg-2.0 >= 2.14.0 + cairo >= 1.0.0"` else - SVG_PKG_ERRORS=`$PKG_CONFIG --print-errors "librsvg-2.0 >= 2.14.0 - cairo >= 1.0.0" 2>&1` + SVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "librsvg-2.0 >= 2.14.0 + cairo >= 1.0.0"` fi # Put the nasty error message in config.log where it belongs echo "$SVG_PKG_ERRORS" >&5 - have_svg="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_svg="no" elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } have_svg="no" else @@ -28708,7 +29253,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "SVG dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "SVG dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SVG image loader will be built" >&5 @@ -28962,7 +29507,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Tiff dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Tiff dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Tiff image loader will be built" >&5 @@ -29067,7 +29612,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "XPM dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "XPM dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether XPM image loader will be built" >&5 @@ -29172,7 +29717,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "BMP dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "BMP dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BMP image loader will be built" >&5 @@ -29277,7 +29822,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "TGA dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "TGA dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TGA image loader will be built" >&5 @@ -29382,7 +29927,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "WBMP dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "WBMP dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WBMP image loader will be built" >&5 @@ -29487,7 +30032,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "ICO dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "ICO dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ICO image loader will be built" >&5 @@ -29592,7 +30137,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "PSD dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "PSD dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PSD image loader will be built" >&5 @@ -29697,7 +30242,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "GENERIC dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "GENERIC dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GENERIC image loader will be built" >&5 @@ -29780,7 +30325,8 @@ for ac_header in pthread.h sched.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -29846,7 +30392,7 @@ $as_echo "#define BUILD_PTHREAD 1" >>confdefs.h need_pthreads="yes" else if "x$use_strict" = "xyes"; then - as_fn_error $? "pthreads headers or functions not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "pthreads headers or functions not found (strict dependencies checking)" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: pthread headers or functions not found" >&5 $as_echo "no: pthread headers or functions not found" >&6; } @@ -29939,10 +30485,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XEXT" >&5 $as_echo_n "checking for XEXT... " >&6; } -if test -n "$XEXT_CFLAGS"; then - pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$XEXT_CFLAGS"; then + pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xext < 1.1.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xext < 1.1.1") 2>&5 ac_status=$? @@ -29952,13 +30499,15 @@ if test -n "$XEXT_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$XEXT_LIBS"; then - pkg_cv_XEXT_LIBS="$XEXT_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$XEXT_LIBS"; then + pkg_cv_XEXT_LIBS="$XEXT_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xext < 1.1.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xext < 1.1.1") 2>&5 ac_status=$? @@ -29968,15 +30517,14 @@ if test -n "$XEXT_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -29984,18 +30532,18 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xext < 1.1.1" 2>&1` + XEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xext < 1.1.1"` else - XEXT_PKG_ERRORS=`$PKG_CONFIG --print-errors "xext < 1.1.1" 2>&1` + XEXT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext < 1.1.1"` fi # Put the nasty error message in config.log where it belongs echo "$XEXT_PKG_ERRORS" >&5 - build_avoid_libXext_bug=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + build_avoid_libXext_bug=no elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } build_avoid_libXext_bug=no else @@ -30201,12 +30749,25 @@ $as_echo_n "checking whether to build sse3 code... " >&6; } if test "${enable_cpu_sse3+set}" = set; then : enableval=$enable_cpu_sse3; if test "x$enableval" = "xyes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + ac_fn_c_check_header_mongrel "$LINENO" "immintrin.h" "ac_cv_header_immintrin_h" "$ac_includes_default" +if test "x$ac_cv_header_immintrin_h" = x""yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define BUILD_SSE3 1" >>confdefs.h - build_cpu_sse3="yes" + build_cpu_sse3="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + build_cpu_sse3="no" + +fi + + else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -30218,9 +30779,25 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $build_cpu_sse3" >&5 $as_echo "$build_cpu_sse3" >&6; } if test "x$build_cpu_sse3" = "xyes" ; then + ac_fn_c_check_header_mongrel "$LINENO" "immintrin.h" "ac_cv_header_immintrin_h" "$ac_includes_default" +if test "x$ac_cv_header_immintrin_h" = x""yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } $as_echo "#define BUILD_SSE3 1" >>confdefs.h + build_cpu_sse3="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + build_cpu_sse3="no" + +fi + + fi @@ -30309,7 +30886,7 @@ $as_echo "#define HAVE_ALTIVEC_H 1" >>confdefs.h else if test "x$build_cpu_altivec" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Altivec not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Altivec not found (strict dependencies checking)" "$LINENO" 5 fi build_cpu_altivec="no" @@ -31777,10 +32354,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND" >&5 $as_echo_n "checking for VALGRIND... " >&6; } -if test -n "$VALGRIND_CFLAGS"; then - pkg_cv_VALGRIND_CFLAGS="$VALGRIND_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$VALGRIND_CFLAGS"; then + pkg_cv_VALGRIND_CFLAGS="$VALGRIND_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"valgrind >= 2.4.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "valgrind >= 2.4.0") 2>&5 ac_status=$? @@ -31790,13 +32368,15 @@ if test -n "$VALGRIND_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$VALGRIND_LIBS"; then - pkg_cv_VALGRIND_LIBS="$VALGRIND_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$VALGRIND_LIBS"; then + pkg_cv_VALGRIND_LIBS="$VALGRIND_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"valgrind >= 2.4.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "valgrind >= 2.4.0") 2>&5 ac_status=$? @@ -31806,15 +32386,14 @@ if test -n "$VALGRIND_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -31822,25 +32401,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - VALGRIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "valgrind >= 2.4.0" 2>&1` + VALGRIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "valgrind >= 2.4.0"` else - VALGRIND_PKG_ERRORS=`$PKG_CONFIG --print-errors "valgrind >= 2.4.0" 2>&1` + VALGRIND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "valgrind >= 2.4.0"` fi # Put the nasty error message in config.log where it belongs echo "$VALGRIND_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if test "x$want_valgrind" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Valgrind not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Valgrind not found (strict dependencies checking)" "$LINENO" 5 fi elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if test "x$want_valgrind" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Valgrind not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Valgrind not found (strict dependencies checking)" "$LINENO" 5 fi @@ -31898,10 +32477,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECORE_EVAS" >&5 $as_echo_n "checking for ECORE_EVAS... " >&6; } -if test -n "$ECORE_EVAS_CFLAGS"; then - pkg_cv_ECORE_EVAS_CFLAGS="$ECORE_EVAS_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$ECORE_EVAS_CFLAGS"; then + pkg_cv_ECORE_EVAS_CFLAGS="$ECORE_EVAS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-evas ecore\""; } >&5 ($PKG_CONFIG --exists --print-errors "ecore-evas ecore") 2>&5 ac_status=$? @@ -31911,13 +32491,15 @@ if test -n "$ECORE_EVAS_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$ECORE_EVAS_LIBS"; then - pkg_cv_ECORE_EVAS_LIBS="$ECORE_EVAS_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$ECORE_EVAS_LIBS"; then + pkg_cv_ECORE_EVAS_LIBS="$ECORE_EVAS_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-evas ecore\""; } >&5 ($PKG_CONFIG --exists --print-errors "ecore-evas ecore") 2>&5 ac_status=$? @@ -31927,15 +32509,14 @@ if test -n "$ECORE_EVAS_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -31943,34 +32524,35 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - ECORE_EVAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ecore-evas ecore" 2>&1` + ECORE_EVAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ecore-evas ecore"` else - ECORE_EVAS_PKG_ERRORS=`$PKG_CONFIG --print-errors "ecore-evas ecore" 2>&1` + ECORE_EVAS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ecore-evas ecore"` fi # Put the nasty error message in config.log where it belongs echo "$ECORE_EVAS_PKG_ERRORS" >&5 - build_examples="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + build_examples="no" +elif test $pkg_failed = untried; then build_examples="no" else ECORE_EVAS_CFLAGS=$pkg_cv_ECORE_EVAS_CFLAGS ECORE_EVAS_LIBS=$pkg_cv_ECORE_EVAS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - + : fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EDJE" >&5 $as_echo_n "checking for EDJE... " >&6; } -if test -n "$EDJE_CFLAGS"; then - pkg_cv_EDJE_CFLAGS="$EDJE_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDJE_CFLAGS"; then + pkg_cv_EDJE_CFLAGS="$EDJE_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"edje\""; } >&5 ($PKG_CONFIG --exists --print-errors "edje") 2>&5 ac_status=$? @@ -31980,13 +32562,15 @@ if test -n "$EDJE_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EDJE_LIBS"; then - pkg_cv_EDJE_LIBS="$EDJE_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDJE_LIBS"; then + pkg_cv_EDJE_LIBS="$EDJE_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"edje\""; } >&5 ($PKG_CONFIG --exists --print-errors "edje") 2>&5 ac_status=$? @@ -31996,15 +32580,14 @@ if test -n "$EDJE_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -32012,17 +32595,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EDJE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "edje" 2>&1` + EDJE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "edje"` else - EDJE_PKG_ERRORS=`$PKG_CONFIG --print-errors "edje" 2>&1` + EDJE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "edje"` fi # Put the nasty error message in config.log where it belongs echo "$EDJE_PKG_ERRORS" >&5 - build_examples="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + build_examples="no" +elif test $pkg_failed = untried; then build_examples="no" else EDJE_CFLAGS=$pkg_cv_EDJE_CFLAGS @@ -32081,10 +32664,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHECK" >&5 $as_echo_n "checking for CHECK... " >&6; } -if test -n "$CHECK_CFLAGS"; then - pkg_cv_CHECK_CFLAGS="$CHECK_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$CHECK_CFLAGS"; then + pkg_cv_CHECK_CFLAGS="$CHECK_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.5\""; } >&5 ($PKG_CONFIG --exists --print-errors "check >= 0.9.5") 2>&5 ac_status=$? @@ -32094,13 +32678,15 @@ if test -n "$CHECK_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$CHECK_LIBS"; then - pkg_cv_CHECK_LIBS="$CHECK_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$CHECK_LIBS"; then + pkg_cv_CHECK_LIBS="$CHECK_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.5\""; } >&5 ($PKG_CONFIG --exists --print-errors "check >= 0.9.5") 2>&5 ac_status=$? @@ -32110,15 +32696,14 @@ if test -n "$CHECK_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -32126,17 +32711,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "check >= 0.9.5" 2>&1` + CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "check >= 0.9.5"` else - CHECK_PKG_ERRORS=`$PKG_CONFIG --print-errors "check >= 0.9.5" 2>&1` + CHECK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "check >= 0.9.5"` fi # Put the nasty error message in config.log where it belongs echo "$CHECK_PKG_ERRORS" >&5 - _efl_enable_tests="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + _efl_enable_tests="no" +elif test $pkg_failed = untried; then _efl_enable_tests="no" else CHECK_CFLAGS=$pkg_cv_CHECK_CFLAGS @@ -32289,7 +32874,7 @@ fi ##################################################################### ## Output -ac_config_files="$ac_config_files Makefile evas-directfb.pc evas-fb.pc evas-opengl-x11.pc evas-opengl-sdl.pc evas-opengl-cocoa.pc evas-software-buffer.pc evas-software-x11.pc evas-software-8-x11.pc evas-software-16-x11.pc evas-software-gdi.pc evas-software-ddraw.pc evas-software-16-ddraw.pc evas-direct3d.pc evas-software-16-wince.pc evas-software-sdl.pc evas-psl1ght.pc evas.pc doc/evas.dox doc/Makefile doc/Doxyfile src/Makefile src/bin/Makefile src/lib/Makefile src/lib/canvas/Makefile src/lib/file/Makefile src/lib/cache/Makefile src/lib/cserve/Makefile src/lib/engines/Makefile src/lib/engines/common/Makefile src/lib/engines/common/evas_op_add/Makefile src/lib/engines/common/evas_op_blend/Makefile src/lib/engines/common/evas_op_copy/Makefile src/lib/engines/common/evas_op_mask/Makefile src/lib/engines/common/evas_op_mul/Makefile src/lib/engines/common/evas_op_sub/Makefile src/lib/engines/common_8/Makefile src/lib/engines/common_16/Makefile src/modules/Makefile src/modules/engines/Makefile src/modules/engines/software_generic/Makefile src/modules/engines/software_gdi/Makefile src/modules/engines/software_ddraw/Makefile src/modules/engines/direct3d/Makefile src/modules/engines/software_16_wince/Makefile src/modules/engines/software_x11/Makefile src/modules/engines/fb/Makefile src/modules/engines/buffer/Makefile src/modules/engines/directfb/Makefile src/modules/engines/gl_common/Makefile src/modules/engines/gl_x11/Makefile src/modules/engines/gl_sdl/Makefile src/modules/engines/gl_cocoa/Makefile src/modules/engines/psl1ght/Makefile src/modules/engines/software_sdl/Makefile src/modules/engines/software_8/Makefile src/modules/engines/software_8_x11/Makefile src/modules/engines/software_16/Makefile src/modules/engines/software_16_x11/Makefile src/modules/engines/software_16_ddraw/Makefile src/modules/engines/software_16_sdl/Makefile src/modules/loaders/Makefile src/modules/loaders/edb/Makefile src/modules/loaders/eet/Makefile src/modules/loaders/gif/Makefile src/modules/loaders/jpeg/Makefile src/modules/loaders/png/Makefile src/modules/loaders/tiff/Makefile src/modules/loaders/xpm/Makefile src/modules/loaders/bmp/Makefile src/modules/loaders/ico/Makefile src/modules/loaders/tga/Makefile src/modules/loaders/svg/Makefile src/modules/loaders/pmaps/Makefile src/modules/loaders/wbmp/Makefile src/modules/loaders/psd/Makefile src/modules/loaders/generic/Makefile src/modules/savers/Makefile src/modules/savers/edb/Makefile src/modules/savers/eet/Makefile src/modules/savers/jpeg/Makefile src/modules/savers/png/Makefile src/modules/savers/tiff/Makefile src/static_deps/Makefile src/static_deps/liblinebreak/Makefile src/lib/include/Makefile src/examples/Makefile src/tests/Makefile evas.spec" +ac_config_files="$ac_config_files Makefile evas-directfb.pc evas-fb.pc evas-opengl-x11.pc evas-opengl-sdl.pc evas-opengl-cocoa.pc evas-software-buffer.pc evas-software-x11.pc evas-software-8-x11.pc evas-software-16-x11.pc evas-software-gdi.pc evas-software-ddraw.pc evas-software-16-ddraw.pc evas-direct3d.pc evas-software-16-wince.pc evas-software-sdl.pc evas-psl1ght.pc evas-wayland-shm.pc evas-wayland-egl.pc evas.pc doc/evas.dox doc/Makefile doc/Doxyfile src/Makefile src/bin/Makefile src/lib/Makefile src/lib/canvas/Makefile src/lib/file/Makefile src/lib/cache/Makefile src/lib/cserve/Makefile src/lib/engines/Makefile src/lib/engines/common/Makefile src/lib/engines/common/evas_op_add/Makefile src/lib/engines/common/evas_op_blend/Makefile src/lib/engines/common/evas_op_copy/Makefile src/lib/engines/common/evas_op_mask/Makefile src/lib/engines/common/evas_op_mul/Makefile src/lib/engines/common/evas_op_sub/Makefile src/lib/engines/common_8/Makefile src/lib/engines/common_16/Makefile src/modules/Makefile src/modules/engines/Makefile src/modules/engines/software_generic/Makefile src/modules/engines/software_gdi/Makefile src/modules/engines/software_ddraw/Makefile src/modules/engines/direct3d/Makefile src/modules/engines/software_16_wince/Makefile src/modules/engines/software_x11/Makefile src/modules/engines/fb/Makefile src/modules/engines/buffer/Makefile src/modules/engines/directfb/Makefile src/modules/engines/gl_common/Makefile src/modules/engines/gl_x11/Makefile src/modules/engines/gl_sdl/Makefile src/modules/engines/gl_cocoa/Makefile src/modules/engines/psl1ght/Makefile src/modules/engines/software_sdl/Makefile src/modules/engines/software_8/Makefile src/modules/engines/software_8_x11/Makefile src/modules/engines/software_16/Makefile src/modules/engines/software_16_x11/Makefile src/modules/engines/software_16_ddraw/Makefile src/modules/engines/software_16_sdl/Makefile src/modules/engines/wayland_shm/Makefile src/modules/engines/wayland_egl/Makefile src/modules/loaders/Makefile src/modules/loaders/edb/Makefile src/modules/loaders/eet/Makefile src/modules/loaders/gif/Makefile src/modules/loaders/jpeg/Makefile src/modules/loaders/png/Makefile src/modules/loaders/tiff/Makefile src/modules/loaders/xpm/Makefile src/modules/loaders/bmp/Makefile src/modules/loaders/ico/Makefile src/modules/loaders/tga/Makefile src/modules/loaders/svg/Makefile src/modules/loaders/pmaps/Makefile src/modules/loaders/wbmp/Makefile src/modules/loaders/psd/Makefile src/modules/loaders/generic/Makefile src/modules/savers/Makefile src/modules/savers/edb/Makefile src/modules/savers/eet/Makefile src/modules/savers/jpeg/Makefile src/modules/savers/png/Makefile src/modules/savers/tiff/Makefile src/static_deps/Makefile src/static_deps/liblinebreak/Makefile src/lib/include/Makefile src/examples/Makefile src/tests/Makefile evas.spec" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -32374,7 +32959,6 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= -U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -32398,424 +32982,440 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. + as_fn_error "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. + as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepOBJC_TRUE}" && test -z "${am__fastdepOBJC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepOBJC\" was never defined. + as_fn_error "conditional \"am__fastdepOBJC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepOBJC_TRUE}" && test -z "${am__fastdepOBJC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepOBJC\" was never defined. + as_fn_error "conditional \"am__fastdepOBJC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. + as_fn_error "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. + as_fn_error "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. + as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EFL_BUILD_DOC_TRUE}" && test -z "${EFL_BUILD_DOC_FALSE}"; then - as_fn_error $? "conditional \"EFL_BUILD_DOC\" was never defined. + as_fn_error "conditional \"EFL_BUILD_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_USE_LINEBREAK_TRUE}" && test -z "${EVAS_USE_LINEBREAK_FALSE}"; then - as_fn_error $? "conditional \"EVAS_USE_LINEBREAK\" was never defined. + as_fn_error "conditional \"EVAS_USE_LINEBREAK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_CSERVE_TRUE}" && test -z "${EVAS_CSERVE_FALSE}"; then - as_fn_error $? "conditional \"EVAS_CSERVE\" was never defined. + as_fn_error "conditional \"EVAS_CSERVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_BUFFER_TRUE}" && test -z "${BUILD_ENGINE_BUFFER_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_BUFFER\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_BUFFER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_BUFFER_TRUE}" && test -z "${EVAS_STATIC_BUILD_BUFFER_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_BUFFER\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_BUFFER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_GDI_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_GDI_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_GDI\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_GDI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_GDI_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_GDI\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_GDI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_DDRAW_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_DDRAW_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_DDRAW\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_DDRAW\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_DDRAW_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_DDRAW\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_DDRAW\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_DIRECT3D_TRUE}" && test -z "${BUILD_ENGINE_DIRECT3D_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_DIRECT3D\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_DIRECT3D\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_DIRECT3D_TRUE}" && test -z "${EVAS_STATIC_BUILD_DIRECT3D_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_DIRECT3D\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_DIRECT3D\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_SDL_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_SDL_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_SDL\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_SDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_SDL\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_SDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_PSL1GHT_TRUE}" && test -z "${BUILD_ENGINE_PSL1GHT_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_PSL1GHT\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_PSL1GHT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_PSL1GHT_TRUE}" && test -z "${EVAS_STATIC_BUILD_PSL1GHT_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_PSL1GHT\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_PSL1GHT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_GL_SDL_TRUE}" && test -z "${BUILD_ENGINE_GL_SDL_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_GL_SDL\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_GL_SDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GL_SDL_TRUE}" && test -z "${EVAS_STATIC_BUILD_GL_SDL_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GL_SDL\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GL_SDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_GL_COCOA_TRUE}" && test -z "${BUILD_ENGINE_GL_COCOA_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_GL_COCOA\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_GL_COCOA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GL_COCOA_TRUE}" && test -z "${EVAS_STATIC_BUILD_GL_COCOA_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GL_COCOA\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GL_COCOA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_FB_TRUE}" && test -z "${BUILD_ENGINE_FB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_FB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_FB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_FB_TRUE}" && test -z "${EVAS_STATIC_BUILD_FB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_FB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_FB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_DIRECTFB_TRUE}" && test -z "${BUILD_ENGINE_DIRECTFB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_DIRECTFB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_DIRECTFB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_DIRECTFB_TRUE}" && test -z "${EVAS_STATIC_BUILD_DIRECTFB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_DIRECTFB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_DIRECTFB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_8_X11_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_8_X11_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_8_X11\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_8_X11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_8_X11\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_8_X11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_16_X11_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_16_X11_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_16_X11\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_16_X11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_X11_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16_X11\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16_X11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_16_DDRAW_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_16_DDRAW\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_16_DDRAW\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_16_WINCE_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_16_WINCE\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_16_WINCE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16_WINCE\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16_WINCE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_16_SDL_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_16_SDL_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_16_SDL\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_16_SDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_SDL_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16_SDL\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16_SDL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_ENGINE_WAYLAND_SHM_TRUE}" && test -z "${BUILD_ENGINE_WAYLAND_SHM_FALSE}"; then + as_fn_error "conditional \"BUILD_ENGINE_WAYLAND_SHM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE}" && test -z "${EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE}"; then + as_fn_error "conditional \"EVAS_STATIC_BUILD_WAYLAND_SHM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_ENGINE_WAYLAND_EGL_TRUE}" && test -z "${BUILD_ENGINE_WAYLAND_EGL_FALSE}"; then + as_fn_error "conditional \"BUILD_ENGINE_WAYLAND_EGL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE}" && test -z "${EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE}"; then + as_fn_error "conditional \"EVAS_STATIC_BUILD_WAYLAND_EGL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_GENERIC_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_GENERIC_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_GENERIC\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_GENERIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_XCB_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_XCB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_XCB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_XCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_XCB_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_XCB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_XCB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_XCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_XLIB_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_XLIB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_XLIB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_XLIB_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_XLIB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_XLIB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_XLIB_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_XLIB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_XLIB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_XCB_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_XCB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_XCB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_XCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_X11_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_X11_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_X11\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_X11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_X11_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_X11\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_X11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_XLIB_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_XLIB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_XLIB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_XCB_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_XCB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_XCB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_XCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_GL_XCB_TRUE}" && test -z "${BUILD_ENGINE_GL_XCB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_GL_XCB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_GL_XCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GL_XCB_TRUE}" && test -z "${EVAS_STATIC_BUILD_GL_XCB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GL_XCB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GL_XCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_GL_XLIB_TRUE}" && test -z "${BUILD_ENGINE_GL_XLIB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_GL_XLIB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_GL_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GL_XLIB_TRUE}" && test -z "${EVAS_STATIC_BUILD_GL_XLIB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GL_XLIB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GL_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_GL_XLIB_TRUE}" && test -z "${BUILD_ENGINE_GL_XLIB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_GL_XLIB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_GL_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_GL_XCB_TRUE}" && test -z "${BUILD_ENGINE_GL_XCB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_GL_XCB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_GL_XCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_GL_X11_TRUE}" && test -z "${BUILD_ENGINE_GL_X11_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_GL_X11\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_GL_X11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GL_X11_TRUE}" && test -z "${EVAS_STATIC_BUILD_GL_X11_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GL_X11\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GL_X11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GL_XLIB_TRUE}" && test -z "${EVAS_STATIC_BUILD_GL_XLIB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GL_XLIB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GL_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GL_XCB_TRUE}" && test -z "${EVAS_STATIC_BUILD_GL_XCB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GL_XCB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GL_XCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_GL_COMMON_TRUE}" && test -z "${BUILD_ENGINE_GL_COMMON_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_GL_COMMON\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_GL_COMMON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GL_COMMON_TRUE}" && test -z "${EVAS_STATIC_BUILD_GL_COMMON_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GL_COMMON\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GL_COMMON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_16_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_16_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_16\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_16\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_8_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_8_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_8\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_8\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_8_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_8_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_8\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_8\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_EDB_TRUE}" && test -z "${BUILD_LOADER_EDB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_EDB\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_EDB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_EDB_TRUE}" && test -z "${EVAS_STATIC_BUILD_EDB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_EDB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_EDB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_EET_TRUE}" && test -z "${BUILD_LOADER_EET_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_EET\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_EET\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_EET_TRUE}" && test -z "${EVAS_STATIC_BUILD_EET_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_EET\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_EET\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_GIF_TRUE}" && test -z "${BUILD_LOADER_GIF_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_GIF\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_GIF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GIF_TRUE}" && test -z "${EVAS_STATIC_BUILD_GIF_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GIF\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GIF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_JPEG_TRUE}" && test -z "${BUILD_LOADER_JPEG_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_JPEG\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_JPEG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_JPEG_TRUE}" && test -z "${EVAS_STATIC_BUILD_JPEG_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_JPEG\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_JPEG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_SAVER_JPEG_TRUE}" && test -z "${BUILD_SAVER_JPEG_FALSE}"; then - as_fn_error $? "conditional \"BUILD_SAVER_JPEG\" was never defined. + as_fn_error "conditional \"BUILD_SAVER_JPEG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_PMAPS_TRUE}" && test -z "${BUILD_LOADER_PMAPS_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_PMAPS\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_PMAPS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_PMAPS_TRUE}" && test -z "${EVAS_STATIC_BUILD_PMAPS_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_PMAPS\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_PMAPS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_PNG_TRUE}" && test -z "${BUILD_LOADER_PNG_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_PNG\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_PNG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_PNG_TRUE}" && test -z "${EVAS_STATIC_BUILD_PNG_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_PNG\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_PNG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_SVG_TRUE}" && test -z "${BUILD_LOADER_SVG_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_SVG\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_SVG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SVG_TRUE}" && test -z "${EVAS_STATIC_BUILD_SVG_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SVG\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SVG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_TIFF_TRUE}" && test -z "${BUILD_LOADER_TIFF_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_TIFF\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_TIFF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_TIFF_TRUE}" && test -z "${EVAS_STATIC_BUILD_TIFF_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_TIFF\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_TIFF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_XPM_TRUE}" && test -z "${BUILD_LOADER_XPM_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_XPM\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_XPM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_XPM_TRUE}" && test -z "${EVAS_STATIC_BUILD_XPM_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_XPM\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_XPM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_BMP_TRUE}" && test -z "${BUILD_LOADER_BMP_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_BMP\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_BMP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_BMP_TRUE}" && test -z "${EVAS_STATIC_BUILD_BMP_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_BMP\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_BMP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_TGA_TRUE}" && test -z "${BUILD_LOADER_TGA_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_TGA\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_TGA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_TGA_TRUE}" && test -z "${EVAS_STATIC_BUILD_TGA_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_TGA\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_TGA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_WBMP_TRUE}" && test -z "${BUILD_LOADER_WBMP_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_WBMP\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_WBMP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_WBMP_TRUE}" && test -z "${EVAS_STATIC_BUILD_WBMP_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_WBMP\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_WBMP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_ICO_TRUE}" && test -z "${BUILD_LOADER_ICO_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_ICO\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_ICO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_ICO_TRUE}" && test -z "${EVAS_STATIC_BUILD_ICO_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_ICO\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_ICO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_PSD_TRUE}" && test -z "${BUILD_LOADER_PSD_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_PSD\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_PSD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_PSD_TRUE}" && test -z "${EVAS_STATIC_BUILD_PSD_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_PSD\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_PSD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_GENERIC_TRUE}" && test -z "${BUILD_LOADER_GENERIC_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_GENERIC\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_GENERIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GENERIC_TRUE}" && test -z "${EVAS_STATIC_BUILD_GENERIC_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GENERIC\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GENERIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_MAGIC_DEBUG_TRUE}" && test -z "${EVAS_MAGIC_DEBUG_FALSE}"; then - as_fn_error $? "conditional \"EVAS_MAGIC_DEBUG\" was never defined. + as_fn_error "conditional \"EVAS_MAGIC_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WORD_CACHE_TRUE}" && test -z "${WORD_CACHE_FALSE}"; then - as_fn_error $? "conditional \"WORD_CACHE\" was never defined. + as_fn_error "conditional \"WORD_CACHE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${METRIC_CACHE_TRUE}" && test -z "${METRIC_CACHE_FALSE}"; then - as_fn_error $? "conditional \"METRIC_CACHE\" was never defined. + as_fn_error "conditional \"METRIC_CACHE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INSTALL_EXAMPLES_TRUE}" && test -z "${INSTALL_EXAMPLES_FALSE}"; then - as_fn_error $? "conditional \"INSTALL_EXAMPLES\" was never defined. + as_fn_error "conditional \"INSTALL_EXAMPLES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_EXAMPLES_TRUE}" && test -z "${BUILD_EXAMPLES_FALSE}"; then - as_fn_error $? "conditional \"BUILD_EXAMPLES\" was never defined. + as_fn_error "conditional \"BUILD_EXAMPLES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EFL_ENABLE_TESTS_TRUE}" && test -z "${EFL_ENABLE_TESTS_FALSE}"; then - as_fn_error $? "conditional \"EFL_ENABLE_TESTS\" was never defined. + as_fn_error "conditional \"EFL_ENABLE_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EFL_ENABLE_COVERAGE_TRUE}" && test -z "${EFL_ENABLE_COVERAGE_FALSE}"; then - as_fn_error $? "conditional \"EFL_ENABLE_COVERAGE\" was never defined. + as_fn_error "conditional \"EFL_ENABLE_COVERAGE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -32965,19 +33565,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. +# script with status $?, using 1 if that was 0. as_fn_error () { - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error @@ -33173,7 +33773,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -33226,8 +33826,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by evas $as_me 1.1.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +This file was extended by evas $as_me 1.1.99.67344, which was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -33292,11 +33892,11 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -evas config.status 1.1.0 -configured by $0, generated by GNU Autoconf 2.67, +evas config.status 1.1.99.67344 +configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -33314,16 +33914,11 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=?*) + --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; *) ac_option=$1 ac_optarg=$2 @@ -33345,7 +33940,6 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -33358,7 +33952,7 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' + as_fn_error "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -33367,7 +33961,7 @@ Try \`$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' + -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -33793,6 +34387,8 @@ do "evas-software-16-wince.pc") CONFIG_FILES="$CONFIG_FILES evas-software-16-wince.pc" ;; "evas-software-sdl.pc") CONFIG_FILES="$CONFIG_FILES evas-software-sdl.pc" ;; "evas-psl1ght.pc") CONFIG_FILES="$CONFIG_FILES evas-psl1ght.pc" ;; + "evas-wayland-shm.pc") CONFIG_FILES="$CONFIG_FILES evas-wayland-shm.pc" ;; + "evas-wayland-egl.pc") CONFIG_FILES="$CONFIG_FILES evas-wayland-egl.pc" ;; "evas.pc") CONFIG_FILES="$CONFIG_FILES evas.pc" ;; "doc/evas.dox") CONFIG_FILES="$CONFIG_FILES doc/evas.dox" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; @@ -33837,6 +34433,8 @@ do "src/modules/engines/software_16_x11/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/engines/software_16_x11/Makefile" ;; "src/modules/engines/software_16_ddraw/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/engines/software_16_ddraw/Makefile" ;; "src/modules/engines/software_16_sdl/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/engines/software_16_sdl/Makefile" ;; + "src/modules/engines/wayland_shm/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/engines/wayland_shm/Makefile" ;; + "src/modules/engines/wayland_egl/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/engines/wayland_egl/Makefile" ;; "src/modules/loaders/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/loaders/Makefile" ;; "src/modules/loaders/edb/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/loaders/edb/Makefile" ;; "src/modules/loaders/eet/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/loaders/eet/Makefile" ;; @@ -33866,7 +34464,7 @@ do "src/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/tests/Makefile" ;; "evas.spec") CONFIG_FILES="$CONFIG_FILES evas.spec" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -33904,7 +34502,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -33921,7 +34519,7 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' + ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi @@ -33935,18 +34533,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -34035,28 +34633,20 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 + || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// s/^[^=]*=[ ]*$// }' fi @@ -34084,7 +34674,7 @@ for ac_last_try in false false :; do if test -z "$ac_t"; then break elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -34169,7 +34759,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 + as_fn_error "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -34182,7 +34772,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -34210,7 +34800,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -34237,7 +34827,7 @@ $as_echo "$as_me: creating $ac_file" >&6;} case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -34374,22 +34964,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 +which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} +which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -34400,19 +34990,19 @@ which seems to be undefined. Please make sure it is defined" >&2;} $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + || as_fn_error "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 + || as_fn_error "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -35370,7 +35960,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -35391,7 +35981,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 + $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 @@ -35465,6 +36055,8 @@ echo " Software 16bit X11.........: $have_evas_engine_software_16_x11" echo " Software 16bit Directdraw..: $have_evas_engine_software_16_ddraw" echo " Software 16bit WinCE.......: $have_evas_engine_software_16_wince" echo " Software 16bit SDL.........: $have_evas_engine_software_16_sdl (primitive: $sdl_primitive)" +echo " Wayland Shm................: $have_evas_engine_wayland_shm" +echo " Wayland Egl................: $have_evas_engine_wayland_egl" echo echo "Image Loaders:" echo " BMP.....................: $have_evas_image_loader_bmp" @@ -35517,6 +36109,16 @@ echo echo " Word Cache..............: $want_word_cache" echo " Metric Cache............: $want_metric_cache" echo +echo " Pixman..................: $have_pixman" +echo " Pixman Fonts............: $have_pixman_font" +echo " Pixman Rects............: $have_pixman_rect" +echo " Pixman Lines............: $have_pixman_line" +echo " Pixman Polygons.........: $have_pixman_poly" +echo " Pixman Images...........: $have_pixman_image" +echo " Pixman Image ScaleSample: $have_pixman_image_scale_sample" +echo +echo " Tiled 32BPP rotate......: $have_tile_rotate" +echo echo "ARGB Software Engine Options:" echo " Sampling Scaler.........: $scaler_sample" echo " Smooth Scaler...........: $scaler_smooth" diff --git a/libraries/evas/configure.ac b/libraries/evas/configure.ac index 0b56053..5424e31 100644 --- a/libraries/evas/configure.ac +++ b/libraries/evas/configure.ac @@ -2,11 +2,11 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [1]) -m4_define([v_mic], [0]) -m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) +m4_define([v_mic], [99]) +m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) ##-- When released, remove the dnl on the below line -m4_undefine([v_rev]) +dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line dnl m4_define([relname], [ver-pre-svn-07]) dnl m4_define([v_rel], [-release relname]) @@ -112,6 +112,8 @@ want_evas_engine_direct3d="no" want_evas_engine_fb="no" want_evas_engine_directfb="no" want_evas_engine_psl1ght="no" +want_evas_engine_wayland_shm="no" +want_evas_engine_wayland_egl="no" want_evas_image_loader_edb="yes" want_evas_image_loader_eet="yes" @@ -158,6 +160,8 @@ case "$host_os" in want_evas_engine_software_xcb="no" want_evas_engine_gl_xcb="no" want_evas_engine_fb="auto" + want_evas_engine_wayland_shm="auto" + want_evas_engine_wayland_egl="auto" ### no - not ready/usable/complete # want_evas_engine_software_8_x11="auto" # want_evas_engine_software_16_x11="auto" @@ -403,8 +407,8 @@ fi # Pixman have_pixman="no" AC_ARG_ENABLE([pixman], - AC_HELP_STRING([--disable-pixman], - [disable pixman for software rendering. @<:@default=enabled@:>@]), + AC_HELP_STRING([--enable-pixman], + [enable pixman for software rendering. @<:@default=enabled@:>@]), [ if test "x${enableval}" = "xyes" ; then want_pixman="yes" @@ -429,12 +433,74 @@ if test "x${want_pixman}" = "xyes" -o "x${want_pixman}" = "xauto" ; then ]) fi +have_pixman_font="no" +AC_ARG_ENABLE(pixman-font, + AC_HELP_STRING([--enable-pixman-font], [Allow pixman to render fonts]), + [ + have_pixman_font="yes" + AC_DEFINE(PIXMAN_FONT, 1, [Allow pixman to render fonts]) + ] +) + +have_pixman_rect="no" +AC_ARG_ENABLE(pixman-rect, + AC_HELP_STRING([--enable-pixman-rect], [Allow pixman to render rects]), + [ + have_pixman_rect="yes" + AC_DEFINE(PIXMAN_RECT, 1, [Allow pixman to render rects]) + ] +) + +have_pixman_line="no" +AC_ARG_ENABLE(pixman-line, + AC_HELP_STRING([--enable-pixman-line], [Allow pixman to render lines]), + [ + have_pixman_line="yes" + AC_DEFINE(PIXMAN_LINE, 1, [Allow pixman to render lines]) + ] +) + +have_pixman_poly="no" +AC_ARG_ENABLE(pixman-poly, + AC_HELP_STRING([--enable-pixman-poly], [Allow pixman to render polys]), + [ + have_pixman_poly="yes" + AC_DEFINE(PIXMAN_POLY, 1, [Allow pixman to render polys]) + ] +) + +have_pixman_image="no" +AC_ARG_ENABLE(pixman-image, + AC_HELP_STRING([--enable-pixman-image], [Allow pixman to render images]), + [ + have_pixman_image="yes" + AC_DEFINE(PIXMAN_IMAGE, 1, [Allow pixman to render images]) + ] +) + +have_pixman_image_scale_sample="no" +AC_ARG_ENABLE(pixman-image-scale-sample, + AC_HELP_STRING([--enable-pixman-image-scale-sample], [Allow pixman to render sampled scaled images]), + [ + have_pixman_image_scale_sample="yes" + AC_DEFINE(PIXMAN_IMAGE_SCALE_SAMPLE, 1, [Allow pixman to render image sampled scaling]) + ] +) + +have_tile_rotate="no" +AC_ARG_ENABLE(tile-rotate, + AC_HELP_STRING([--enable-tile-rotate], [Enable tiled rotate algorithm]), + [ + have_tile_rotate="yes" + AC_DEFINE(TILE_ROTATE, 1, [Enable tiled rotate algorithm]) + ] +) + ### Checks for header files AC_HEADER_STDC -AC_CHECK_HEADERS([unistd.h stdint.h sys/param.h netinet/in.h]) +AC_CHECK_HEADERS([unistd.h stdint.h sys/param.h netinet/in.h sys/mman.h]) EFL_CHECK_PATH_MAX - ### Checks for types AC_CHECK_TYPES([struct sigaction], [], [], [[#include ]]) @@ -704,6 +770,10 @@ EVAS_CHECK_ENGINE([software-16-wince], [${want_evas_engine_software_16_wince}], EVAS_CHECK_ENGINE([software-16-sdl], [${want_evas_engine_software_16_sdl}], [no], [Software SDL 16 bits]) +EVAS_CHECK_ENGINE([wayland-shm], [${want_evas_engine_wayland_shm}], [no], [Wayland Shm]) + +EVAS_CHECK_ENGINE([wayland-egl], [${want_evas_engine_wayland_egl}], [no], [Wayland Egl]) + # SDL primitive sdl_primitive="no" @@ -856,13 +926,15 @@ have_static_evas_engine_gl_common="no" if test "x$have_evas_engine_gl_xlib" = "xyes" \ || test "x$have_evas_engine_gl_xcb" = "xyes" \ || test "x$have_evas_engine_gl_sdl" = "xyes" \ - || test "x$have_evas_engine_gl_cocoa" = "xyes"; then + || test "x$have_evas_engine_gl_cocoa" = "xyes" \ + || test "x$have_evas_engine_wayland_egl" = "xyes"; then have_evas_engine_gl_common="yes" fi if test "x$have_evas_engine_gl_xlib" = "xstatic" \ || test "x$have_evas_engine_gl_xcb" = "xstatic" \ || test "x$have_evas_engine_gl_sdl" = "xstatic" \ - || test "x$have_evas_engine_gl_cocoa" = "xstatic"; then + || test "x$have_evas_engine_gl_cocoa" = "xstatic" \ + || test "x$have_evas_engine_wayland_egl" = "xstatic"; then have_evas_engine_gl_common="yes" have_static_evas_engine_gl_common="yes" fi @@ -1272,9 +1344,16 @@ AC_ARG_ENABLE(cpu-sse3, AS_HELP_STRING([--enable-cpu-sse3], [enable sse3 code]), [ if test "x$enableval" = "xyes" ; then - AC_MSG_RESULT(yes) - AC_DEFINE(BUILD_SSE3, 1, [Build SSE3 Code]) - build_cpu_sse3="yes" + AC_CHECK_HEADER(immintrin.h, + [ + AC_MSG_RESULT(yes) + AC_DEFINE(BUILD_SSE3, 1, [Build SSE3 Code]) + build_cpu_sse3="yes" + ], + [ + AC_MSG_RESULT(no) + build_cpu_sse3="no" + ]) else AC_MSG_RESULT(no) build_cpu_sse3="no" @@ -1283,7 +1362,16 @@ AC_ARG_ENABLE(cpu-sse3, [ AC_MSG_RESULT($build_cpu_sse3) if test "x$build_cpu_sse3" = "xyes" ; then - AC_DEFINE(BUILD_SSE3, 1, [Build SSE3 Code]) + AC_CHECK_HEADER(immintrin.h, + [ + AC_MSG_RESULT(yes) + AC_DEFINE(BUILD_SSE3, 1, [Build SSE3 Code]) + build_cpu_sse3="yes" + ], + [ + AC_MSG_RESULT(no) + build_cpu_sse3="no" + ]) fi ] ) @@ -1805,6 +1893,8 @@ evas-direct3d.pc evas-software-16-wince.pc evas-software-sdl.pc evas-psl1ght.pc +evas-wayland-shm.pc +evas-wayland-egl.pc evas.pc doc/evas.dox doc/Makefile @@ -1849,6 +1939,8 @@ src/modules/engines/software_16/Makefile src/modules/engines/software_16_x11/Makefile src/modules/engines/software_16_ddraw/Makefile src/modules/engines/software_16_sdl/Makefile +src/modules/engines/wayland_shm/Makefile +src/modules/engines/wayland_egl/Makefile src/modules/loaders/Makefile src/modules/loaders/edb/Makefile src/modules/loaders/eet/Makefile @@ -1945,6 +2037,8 @@ echo " Software 16bit X11.........: $have_evas_engine_software_16_x11" echo " Software 16bit Directdraw..: $have_evas_engine_software_16_ddraw" echo " Software 16bit WinCE.......: $have_evas_engine_software_16_wince" echo " Software 16bit SDL.........: $have_evas_engine_software_16_sdl (primitive: $sdl_primitive)" +echo " Wayland Shm................: $have_evas_engine_wayland_shm" +echo " Wayland Egl................: $have_evas_engine_wayland_egl" echo echo "Image Loaders:" echo " BMP.....................: $have_evas_image_loader_bmp" @@ -2002,6 +2096,16 @@ echo echo " Word Cache..............: $want_word_cache" echo " Metric Cache............: $want_metric_cache" echo +echo " Pixman..................: $have_pixman" +echo " Pixman Fonts............: $have_pixman_font" +echo " Pixman Rects............: $have_pixman_rect" +echo " Pixman Lines............: $have_pixman_line" +echo " Pixman Polygons.........: $have_pixman_poly" +echo " Pixman Images...........: $have_pixman_image" +echo " Pixman Image ScaleSample: $have_pixman_image_scale_sample" +echo +echo " Tiled 32BPP rotate......: $have_tile_rotate" +echo echo "ARGB Software Engine Options:" echo " Sampling Scaler.........: $scaler_sample" echo " Smooth Scaler...........: $scaler_smooth" diff --git a/libraries/evas/doc/Makefile.in b/libraries/evas/doc/Makefile.in index e9a343d..20f2693 100644 --- a/libraries/evas/doc/Makefile.in +++ b/libraries/evas/doc/Makefile.in @@ -167,8 +167,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -185,6 +183,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -266,6 +266,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/doc/img/e_big.png b/libraries/evas/doc/img/e_big.png old mode 100644 new mode 100755 diff --git a/libraries/evas/doc/img/foot_bg.png b/libraries/evas/doc/img/foot_bg.png old mode 100644 new mode 100755 diff --git a/libraries/evas/doc/img/head_bg.png b/libraries/evas/doc/img/head_bg.png old mode 100644 new mode 100755 diff --git a/libraries/evas/doc/img/menu_bg.png b/libraries/evas/doc/img/menu_bg.png old mode 100644 new mode 100755 diff --git a/libraries/evas/doc/img/menu_bg_current.png b/libraries/evas/doc/img/menu_bg_current.png old mode 100644 new mode 100755 diff --git a/libraries/evas/doc/img/menu_bg_hover.png b/libraries/evas/doc/img/menu_bg_hover.png old mode 100644 new mode 100755 diff --git a/libraries/evas/doc/img/menu_bg_last.png b/libraries/evas/doc/img/menu_bg_last.png old mode 100644 new mode 100755 diff --git a/libraries/evas/doc/img/menu_bg_unsel.png b/libraries/evas/doc/img/menu_bg_unsel.png old mode 100644 new mode 100755 diff --git a/libraries/evas/evas-wayland-egl.pc.in b/libraries/evas/evas-wayland-egl.pc.in new file mode 100644 index 0000000..a770c42 --- /dev/null +++ b/libraries/evas/evas-wayland-egl.pc.in @@ -0,0 +1,3 @@ +Name: evas-wayland-egl +Description: Evas Wayland Egl engine +Version: @VERSION@ diff --git a/libraries/evas/evas-wayland-shm.pc.in b/libraries/evas/evas-wayland-shm.pc.in new file mode 100644 index 0000000..5576681 --- /dev/null +++ b/libraries/evas/evas-wayland-shm.pc.in @@ -0,0 +1,3 @@ +Name: evas-wayland-shm +Description: Evas Wayland Shm engine +Version: @VERSION@ diff --git a/libraries/evas/evas.spec b/libraries/evas/evas.spec index f3ebad3..fe04f2e 100644 --- a/libraries/evas/evas.spec +++ b/libraries/evas/evas.spec @@ -85,7 +85,7 @@ Summary: Multi-platform Canvas Library Name: evas -Version: 1.1.0 +Version: 1.1.99.67344 Release: %{_rel} License: BSD Group: System Environment/Libraries diff --git a/libraries/evas/ltmain.sh b/libraries/evas/ltmain.sh index fa4b1e1..7ed280b 100755 --- a/libraries/evas/ltmain.sh +++ b/libraries/evas/ltmain.sh @@ -65,7 +65,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3 +# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -73,7 +73,7 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu3" +VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" TIMESTAMP="" package_revision=1.3017 diff --git a/libraries/evas/m4/evas_check_engine.m4 b/libraries/evas/m4/evas_check_engine.m4 index 5294100..4fc13a9 100644 --- a/libraries/evas/m4/evas_check_engine.m4 +++ b/libraries/evas/m4/evas_check_engine.m4 @@ -873,6 +873,79 @@ fi ]) + +dnl use: EVAS_CHECK_ENGINE_DEP_WAYLAND_SHM(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) + +AC_DEFUN([EVAS_CHECK_ENGINE_DEP_WAYLAND_SHM], +[ + +have_dep="yes" +evas_engine_[]$1[]_cflags="" +evas_engine_[]$1[]_libs="" + +AC_SUBST([evas_engine_$1_cflags]) +AC_SUBST([evas_engine_$1_libs]) + +if test "x${have_dep}" = "xyes" ; then + m4_default([$4], [:]) +else + m4_default([$5], [:]) +fi + +]) + + +dnl use: EVAS_CHECK_ENGINE_DEP_WAYLAND_EGL(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) + +AC_DEFUN([EVAS_CHECK_ENGINE_DEP_WAYLAND_EGL], +[ + +requirement="" +have_dep="no" +evas_engine_[]$1[]_cflags="" +evas_engine_[]$1[]_libs="" + +PKG_CHECK_MODULES([WAYLAND_EGL], + [egl >= 7.10 glesv2 gl wayland-client wayland-egl], + [ + have_dep="yes" + requirement="egl >= 7.10 glesv2 gl wayland-client wayland-egl" + evas_engine_[]$1[]_cflags="${WAYLAND_EGL_CFLAGS}" + evas_engine_[]$1[]_libs="${WAYLAND_EGL_LIBS}" + ],[ + have_dep="no" + ] +) + +if test "x${have_dep}" = "xyes" ; then + PKG_CHECK_MODULES([GL_EET], [eet >= 1.5.0], [have_dep="yes"], [have_dep="no"]) + AC_CHECK_HEADER([GLES2/gl2.h], + [have_egl="yes"], + [have_egl="no"], + [ + ]) + if test "x${have_egl}" = "xyes" ; then + evas_engine_[]$1[]_cflags="${WAYLAND_EGL_CFLAGS}" + evas_engine_[]$1[]_libs="${WAYLAND_EGL_LIBS} -lGL -lGLESv2 -lEGL" + fi +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(engine, want_engine, simple, description) diff --git a/libraries/evas/sha1-for-source.txt b/libraries/evas/sha1-for-source.txt deleted file mode 100644 index 36d8a4c..0000000 --- a/libraries/evas/sha1-for-source.txt +++ /dev/null @@ -1 +0,0 @@ -c4cc1315c6fe6096e822f8dbf2c099a541b07962 diff --git a/libraries/evas/src/Makefile.in b/libraries/evas/src/Makefile.in index 9b729e1..68cdb12 100644 --- a/libraries/evas/src/Makefile.in +++ b/libraries/evas/src/Makefile.in @@ -206,8 +206,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -224,6 +222,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -305,6 +305,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/bin/Makefile.in b/libraries/evas/src/bin/Makefile.in index 885bfc4..136b34c 100644 --- a/libraries/evas/src/bin/Makefile.in +++ b/libraries/evas/src/bin/Makefile.in @@ -212,8 +212,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -230,6 +228,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -311,6 +311,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/examples/Makefile.am b/libraries/evas/src/examples/Makefile.am index f748c12..ffa9274 100644 --- a/libraries/evas/src/examples/Makefile.am +++ b/libraries/evas/src/examples/Makefile.am @@ -1,6 +1,6 @@ MAINTAINERCLEANFILES = Makefile.in -pkglibdir = $(datadir)/$(PACKAGE)/examples +examplesdir = $(datadir)/$(PACKAGE)/examples #put here all EDCs one needs to the tests EDCS = aspect.edc @@ -28,68 +28,68 @@ AM_CPPFLAGS = \ AM_CFLAGS = @WIN32_CFLAGS@ -pkglib_PROGRAMS = +examples_PROGRAMS = if BUILD_ENGINE_BUFFER AM_CPPFLAGS += -I$(top_srcdir)/src/modules/engines/buffer -pkglib_PROGRAMS += evas_buffer_simple +examples_PROGRAMS += evas_buffer_simple evas_buffer_simple_SOURCES = evas-buffer-simple.c evas_buffer_simple_LDADD = $(top_builddir)/src/lib/libevas.la endif -pkglib_PROGRAMS += evas_init_shutdown +examples_PROGRAMS += evas_init_shutdown evas_init_shutdown_SOURCES = evas-init-shutdown.c evas_init_shutdown_LDADD = $(top_builddir)/src/lib/libevas.la #the ones using ecore_evas follow AM_CPPFLAGS += @ECORE_EVAS_CFLAGS@ -pkglib_PROGRAMS += evas_images +examples_PROGRAMS += evas_images evas_images_SOURCES = evas-images.c evas_images_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ -pkglib_PROGRAMS += evas_events +examples_PROGRAMS += evas_events evas_events_SOURCES = evas-events.c evas_events_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ -pkglib_PROGRAMS += evas_object_manipulation +examples_PROGRAMS += evas_object_manipulation evas_object_manipulation_SOURCES = evas-object-manipulation.c evas_object_manipulation_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ -pkglib_PROGRAMS += evas_hints +examples_PROGRAMS += evas_hints evas_hints_SOURCES = evas-hints.c evas_hints_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ -pkglib_PROGRAMS += evas_stacking +examples_PROGRAMS += evas_stacking evas_stacking_SOURCES = evas-stacking.c evas_stacking_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ -pkglib_PROGRAMS += evas_images2 +examples_PROGRAMS += evas_images2 evas_images2_SOURCES = evas-images2.c evas_images2_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ -pkglib_PROGRAMS += evas_text +examples_PROGRAMS += evas_text evas_text_SOURCES = evas-text.c evas_text_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ -pkglib_PROGRAMS += evas_smart_object +examples_PROGRAMS += evas_smart_object evas_smart_object_SOURCES = evas-smart-object.c evas_smart_object_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ -pkglib_PROGRAMS += evas_box +examples_PROGRAMS += evas_box evas_box_SOURCES = evas-box.c evas_box_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ @EINA_LIBS@ #the ones using ecore_evas and edje follow AM_CPPFLAGS += @EDJE_CFLAGS@ -pkglib_PROGRAMS += evas_aspect_hints +examples_PROGRAMS += evas_aspect_hints evas_aspect_hints_DEPS = $(srcdir)/aspect.edc evas_aspect_hints_SOURCES = evas-aspect-hints.c evas_aspect_hints_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ @EDJE_LIBS@ -pkglib_PROGRAMS += evas_map_utils +examples_PROGRAMS += evas_map_utils evas_map_utils_SOURCES = evas-map-utils.c evas_map_utils_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ diff --git a/libraries/evas/src/examples/Makefile.in b/libraries/evas/src/examples/Makefile.in index 5332650..f58d297 100644 --- a/libraries/evas/src/examples/Makefile.in +++ b/libraries/evas/src/examples/Makefile.in @@ -19,6 +19,7 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 @@ -34,7 +35,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@BUILD_EXAMPLES_TRUE@pkglib_PROGRAMS = $(am__EXEEXT_1) \ +@BUILD_EXAMPLES_TRUE@examples_PROGRAMS = $(am__EXEEXT_1) \ @BUILD_EXAMPLES_TRUE@ evas_init_shutdown$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ evas_images$(EXEEXT) evas_events$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ evas_object_manipulation$(EXEEXT) \ @@ -89,8 +90,8 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @BUILD_ENGINE_BUFFER_TRUE@@BUILD_EXAMPLES_TRUE@am__EXEEXT_1 = evas_buffer_simple$(EXEEXT) -am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)" -PROGRAMS = $(pkglib_PROGRAMS) +am__installdirs = "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)" +PROGRAMS = $(examples_PROGRAMS) am__evas_aspect_hints_SOURCES_DIST = evas-aspect-hints.c @BUILD_EXAMPLES_TRUE@am_evas_aspect_hints_OBJECTS = \ @BUILD_EXAMPLES_TRUE@ evas-aspect-hints.$(OBJEXT) @@ -236,7 +237,6 @@ DATA = $(files_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -pkglibdir = $(datadir)/$(PACKAGE)/examples ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ @@ -339,8 +339,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -357,6 +355,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -438,6 +438,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ @@ -513,6 +517,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in +examplesdir = $(datadir)/$(PACKAGE)/examples #put here all EDCs one needs to the tests EDCS = aspect.edc @@ -616,10 +621,10 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -install-pkglibPROGRAMS: $(pkglib_PROGRAMS) +install-examplesPROGRAMS: $(examples_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" - @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ + test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" + @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -636,23 +641,23 @@ install-pkglibPROGRAMS: $(pkglib_PROGRAMS) while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibdir)$$dir" || exit $$?; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(examplesdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(examplesdir)$$dir" || exit $$?; \ } \ ; done -uninstall-pkglibPROGRAMS: +uninstall-examplesPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ + @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files + echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(examplesdir)" && rm -f $$files -clean-pkglibPROGRAMS: - @list='$(pkglib_PROGRAMS)'; test -n "$$list" || exit 0; \ +clean-examplesPROGRAMS: + @list='$(examples_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ @@ -855,7 +860,7 @@ check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(DATA) installdirs: - for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)"; do \ + for dir in "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -886,7 +891,7 @@ maintainer-clean-generic: -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am -clean-am: clean-generic clean-libtool clean-pkglibPROGRAMS \ +clean-am: clean-examplesPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am @@ -907,13 +912,13 @@ info: info-am info-am: -install-data-am: install-filesDATA +install-data-am: install-examplesPROGRAMS install-filesDATA install-dvi: install-dvi-am install-dvi-am: -install-exec-am: install-pkglibPROGRAMS +install-exec-am: install-html: install-html-am @@ -953,24 +958,25 @@ ps: ps-am ps-am: -uninstall-am: uninstall-filesDATA uninstall-pkglibPROGRAMS +uninstall-am: uninstall-examplesPROGRAMS uninstall-filesDATA .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pkglibPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-filesDATA \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-pkglibPROGRAMS \ +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-examplesPROGRAMS clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am \ + install-examplesPROGRAMS install-exec install-exec-am \ + install-filesDATA install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-filesDATA \ - uninstall-pkglibPROGRAMS + tags uninstall uninstall-am uninstall-examplesPROGRAMS \ + uninstall-filesDATA @BUILD_EXAMPLES_TRUE@aspect.edj: ${evas_aspect_hints_DEPS} diff --git a/libraries/evas/src/lib/Evas.h b/libraries/evas/src/lib/Evas.h index 5898290..b85bbeb 100644 --- a/libraries/evas/src/lib/Evas.h +++ b/libraries/evas/src/lib/Evas.h @@ -5,6 +5,7 @@ @date 2000-2011 Please see the @ref authors page for contact details. + @link Evas.h Evas API @endlink @section toc Table of Contents @@ -342,7 +343,7 @@ extern "C" { #endif #define EVAS_VERSION_MAJOR 1 -#define EVAS_VERSION_MINOR 0 +#define EVAS_VERSION_MINOR 2 typedef struct _Evas_Version { @@ -432,6 +433,9 @@ typedef enum _Evas_Callback_Type */ EVAS_CALLBACK_IMAGE_UNLOADED, /**< Image data has been unloaded (by some mechanims in Evas that throw out original image data) */ + EVAS_CALLBACK_RENDER_PRE, /**< Called just before rendering starts on the canvas target @since 1.2 */ + EVAS_CALLBACK_RENDER_POST, /**< Called just after rendering stops on the canvas target @since 1.2 */ + EVAS_CALLBACK_LAST /**< kept as last element/sentinel -- not really an event */ } Evas_Callback_Type; /**< The types of events triggering a callback */ @@ -1061,7 +1065,8 @@ struct _Evas_Event_Hold /** Hold change event */ typedef enum _Evas_Object_Pointer_Mode { EVAS_OBJECT_POINTER_MODE_AUTOGRAB, /**< default, X11-like */ - EVAS_OBJECT_POINTER_MODE_NOGRAB /**< pointer always bound to the object right below it */ + EVAS_OBJECT_POINTER_MODE_NOGRAB, /**< pointer always bound to the object right below it */ + EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN /**< useful on object with "repeat events" enabled, where mouse/touch up and down events WONT be repeated to objects and these objects wont be auto-grabbed. @since 1.2 */ } Evas_Object_Pointer_Mode; /**< How the mouse pointer should be handled by Evas. */ typedef void (*Evas_Smart_Cb) (void *data, Evas_Object *obj, void *event_info); /**< Evas smart objects' "smart callback" function signature */ @@ -1220,7 +1225,7 @@ EAPI Evas_Alloc_Error evas_alloc_error (void); * * @ingroup Evas_Group */ -EAPI int evas_async_events_fd_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE; +EAPI int evas_async_events_fd_get (void) EINA_WARN_UNUSED_RESULT; /** * @brief Trigger the processing of all events waiting on the file @@ -1339,7 +1344,7 @@ EAPI void evas_focus_out (Evas *e); * @param e The evas to query information. * @ingroup Evas_Canvas */ -EAPI Eina_Bool evas_focus_state_get (const Evas *e) EINA_PURE; +EAPI Eina_Bool evas_focus_state_get (const Evas *e); /** * Push the nochange flag up 1 @@ -1380,7 +1385,7 @@ EAPI void evas_data_attach_set (Evas *e, void *data) E * @return The pointer attached * @ingroup Evas_Canvas */ -EAPI void *evas_data_attach_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI void *evas_data_attach_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -1747,7 +1752,7 @@ EAPI void evas_output_method_set (Evas *e, int render_me * returned if there is an error. * @ingroup Evas_Output_Method */ -EAPI int evas_output_method_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_output_method_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -1764,7 +1769,7 @@ EAPI int evas_output_method_get (const Evas *e) EINA_WA * an engine has not yet been assigned. * @ingroup Evas_Output_Method */ -EAPI Evas_Engine_Info *evas_engine_info_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Engine_Info *evas_engine_info_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Applies the engine settings for the given evas from the given @c @@ -1876,6 +1881,38 @@ EAPI void evas_output_viewport_set (Evas *e, Evas_Coord x, EAPI void evas_output_viewport_get (const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); /** + * Sets the output framespace size of the render engine of the given evas. + * + * The framespace size is used in the Wayland engines to denote space where + * the output is not drawn. This is mainly used in ecore_evas to draw borders + * + * The units used for @p w and @p h depend on the engine used by the + * evas. + * + * @param e The given evas. + * @param x The left coordinate in output units, usually pixels. + * @param y The top coordinate in output units, usually pixels. + * @param w The width in output units, usually pixels. + * @param h The height in output units, usually pixels. + * @ingroup Evas_Output_Size + * @since 1.1.0 + */ +EAPI void evas_output_framespace_set (Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); + +/** + * Get the render engine's output framespace co-ordinates in canvas units. + * + * @param e The pointer to the Evas Canvas + * @param x The pointer to a x variable to be filled in + * @param y The pointer to a y variable to be filled in + * @param w The pointer to a width variable to be filled in + * @param h The pointer to a height variable to be filled in + * @ingroup Evas_Output_Size + * @since 1.1.0 + */ +EAPI void evas_output_framespace_get (const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); + +/** * @defgroup Evas_Coord_Mapping_Group Coordinate Mapping Functions * * Functions that are used to map coordinates from the canvas to the @@ -2342,6 +2379,33 @@ EAPI void evas_post_event_callback_remove_full (Evas *e, Evas_Objec */ /** + * Set the default set of flags an event begins with + * + * @param e The canvas to set the default event flags of + * @param flags The default flags to use + * + * Events in evas can have an event_flags member. This starts out with + * and initial value (no flags). this lets you set the default flags that + * an event begins with to be @p flags + * + * @since 1.2 + */ +EAPI void evas_event_default_flags_set (Evas *e, Evas_Event_Flags flags) EINA_ARG_NONNULL(1); + +/** + * Get the defaulty set of flags an event begins with + * + * @param e The canvas to get the default event flags from + * @return The default event flags for that canvas + * + * This gets the default event flags events are produced with when fed in. + * + * @see evas_event_default_flags_set() + * @since 1.2 + */ +EAPI Evas_Event_Flags evas_event_default_flags_get (const Evas *e) EINA_ARG_NONNULL(1); + +/** * Freeze all input events processing. * * @param e The canvas to freeze input events processing on. @@ -2407,7 +2471,7 @@ EAPI void evas_event_thaw (Evas *e) EINA_ARG_NONN * @endcode * */ -EAPI int evas_event_freeze_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_event_freeze_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * After thaw of a canvas, re-evaluate the state of objects and call callbacks @@ -2448,6 +2512,16 @@ EAPI void evas_event_thaw_eval (Evas *e) EINA_ARG_NONN */ /** + * Get the number of mouse or multi presses currently active + * + * @p e The given canvas pointer. + * @return The numer of presses (0 if none active). + * + * @since 1.2 + */ +EAPI int evas_event_down_count_get (const Evas *e) EINA_ARG_NONNULL(1); + +/** * Mouse down event feed. * * @param e The given canvas pointer. @@ -2679,7 +2753,7 @@ EAPI void evas_image_cache_set (Evas *e, int size) EIN * This function returns the image cache size of canvas in bytes. * */ -EAPI int evas_image_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_image_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the maximum image size evas can possibly handle @@ -2728,7 +2802,7 @@ EAPI void evas_font_hinting_set (Evas *e, Evas_Font_H * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE. * @ingroup Evas_Font_Group */ -EAPI Evas_Font_Hinting_Flags evas_font_hinting_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Font_Hinting_Flags evas_font_hinting_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Checks if the font hinting is supported by the given evas. @@ -2739,7 +2813,7 @@ EAPI Evas_Font_Hinting_Flags evas_font_hinting_get (const Evas *e) EINA_ * @return @c EINA_TRUE if it is supported, @c EINA_FALSE otherwise. * @ingroup Evas_Font_Group */ -EAPI Eina_Bool evas_font_hinting_can_hint (const Evas *e, Evas_Font_Hinting_Flags hinting) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_font_hinting_can_hint (const Evas *e, Evas_Font_Hinting_Flags hinting) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -2768,7 +2842,7 @@ EAPI void evas_font_cache_set (Evas *e, int size) E * * @ingroup Evas_Font_Group */ -EAPI int evas_font_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_font_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -2785,7 +2859,7 @@ EAPI int evas_font_cache_get (const Evas *e) EINA_ * * @ingroup Evas_Font_Group */ -EAPI Eina_List *evas_font_available_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_List *evas_font_available_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Free list of font descriptions returned by evas_font_dir_available_list(). @@ -2834,7 +2908,7 @@ EAPI void evas_font_path_prepend (Evas *e, const char *p * @return The list of font paths used. * @ingroup Evas_Font_Path_Group */ -EAPI const Eina_List *evas_font_path_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const Eina_List *evas_font_path_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @defgroup Evas_Object_Group Generic Object Functions @@ -2958,7 +3032,7 @@ EAPI void evas_object_clip_set (Evas_Object *obj, Evas * * See the full @ref Example_Evas_Object_Manipulation "example". */ -EAPI Evas_Object *evas_object_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Disable/cease clipping on a clipped @p obj object. @@ -3015,7 +3089,7 @@ EAPI void evas_object_clip_unset (Evas_Object *obj); * } * @endcode */ -EAPI const Eina_List *evas_object_clipees_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const Eina_List *evas_object_clipees_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -3068,7 +3142,7 @@ EAPI void evas_object_focus_set (Evas_Object *obj, Eina * @see evas_object_key_grab * @see evas_object_key_ungrab */ -EAPI Eina_Bool evas_object_focus_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_focus_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -3104,7 +3178,7 @@ EAPI void evas_object_layer_set (Evas_Object *obj, shor * * @see evas_object_layer_set() */ -EAPI short evas_object_layer_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI short evas_object_layer_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -3139,7 +3213,7 @@ EAPI void evas_object_name_set (Evas_Object *obj, cons * * See the full @ref Example_Evas_Events "example". */ -EAPI const char *evas_object_name_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_object_name_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -3382,7 +3456,7 @@ EAPI void evas_object_hide (Evas_Object *obj) EINA * * @ingroup Evas_Object_Group_Basic */ -EAPI Eina_Bool evas_object_visible_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_visible_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -3455,7 +3529,7 @@ EAPI void evas_object_color_get (const Evas_Object *obj * * @ingroup Evas_Object_Group_Basic */ -EAPI Evas *evas_object_evas_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas *evas_object_evas_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieves the type of the given Evas object. @@ -3485,7 +3559,7 @@ EAPI Evas *evas_object_evas_get (const Evas_Object *obj * * See the full @ref Example_Evas_Object_Manipulation "example". */ -EAPI const char *evas_object_type_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_object_type_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Raise @p obj to the top of its layer. @@ -3586,7 +3660,7 @@ EAPI void evas_object_stack_below (Evas_Object *obj, Evas * @see evas_object_below_get() * */ -EAPI Evas_Object *evas_object_above_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_above_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the Evas object stacked right below @p obj @@ -3602,7 +3676,7 @@ EAPI Evas_Object *evas_object_above_get (const Evas_Object *obj * @see evas_object_layer_set() * @see evas_object_below_get() */ -EAPI Evas_Object *evas_object_below_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_below_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @} @@ -3946,7 +4020,7 @@ EAPI void evas_object_pass_events_set (Evas_Object *obj, Ein * @see evas_object_propagate_events_get() * @see evas_object_freeze_events_get() */ -EAPI Eina_Bool evas_object_pass_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_pass_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set whether an Evas object is to repeat events. @@ -3988,7 +4062,7 @@ EAPI void evas_object_repeat_events_set (Evas_Object *obj, Ein * @see evas_object_propagate_events_get() * @see evas_object_freeze_events_get() */ -EAPI Eina_Bool evas_object_repeat_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_repeat_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set whether events on a smart object's member should get propagated @@ -4026,7 +4100,7 @@ EAPI void evas_object_propagate_events_set (Evas_Object *obj, Ein * @see evas_object_pass_events_get() * @see evas_object_freeze_events_get() */ -EAPI Eina_Bool evas_object_propagate_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_propagate_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set whether an Evas object is to freeze (discard) events. @@ -4064,7 +4138,7 @@ EAPI void evas_object_freeze_events_set(Evas_Object *obj, Eina_Bool * @see evas_object_propagate_events_get() * @since 1.1.0 */ -EAPI Eina_Bool evas_object_freeze_events_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_freeze_events_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @} @@ -5028,7 +5102,7 @@ EAPI void evas_object_size_hint_min_get (const Evas_Object *obj * @skip evas_object_size_hint_min_set * @until return * - * In this example the minimum size hints change de behavior of an + * In this example the minimum size hints change the behavior of an * Evas box when layouting its children. See the full @ref * Example_Evas_Size_Hints "example". * @@ -5072,7 +5146,7 @@ EAPI void evas_object_size_hint_max_get (const Evas_Object *obj * @skip evas_object_size_hint_max_set * @until return * - * In this example the maximum size hints change de behavior of an + * In this example the maximum size hints change the behavior of an * Evas box when layouting its children. See the full @ref * Example_Evas_Size_Hints "example". * @@ -5247,7 +5321,7 @@ EAPI void evas_object_size_hint_align_get (const Evas_Object *obj * @skip evas_object_size_hint_align_set * @until return * - * In this example the alignment hints change de behavior of an Evas + * In this example the alignment hints change the behavior of an Evas * box when layouting its children. See the full @ref * Example_Evas_Size_Hints "example". * @@ -5306,7 +5380,7 @@ EAPI void evas_object_size_hint_weight_get (const Evas_Object *obj * @skip evas_object_size_hint_weight_set * @until return * - * In this example the weight hints change de behavior of an Evas box + * In this example the weight hints change the behavior of an Evas box * when layouting its children. See the full @ref * Example_Evas_Size_Hints "example". * @@ -5342,7 +5416,7 @@ EAPI void evas_object_size_hint_weight_set (Evas_Object *obj, doub * @skip evas_object_size_hint_padding_set * @until return * - * In this example the padding hints change de behavior of an Evas box + * In this example the padding hints change the behavior of an Evas box * when layouting its children. See the full @ref * Example_Evas_Size_Hints "example". * @@ -5456,7 +5530,7 @@ EAPI void evas_object_data_set (Evas_Object *ob * else printf("No data was stored on the object\n"); * @endcode */ -EAPI void *evas_object_data_get (const Evas_Object *obj, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI void *evas_object_data_get (const Evas_Object *obj, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Delete an attached data pointer from an object. @@ -5510,7 +5584,7 @@ EAPI void evas_object_pointer_mode_set (Evas_Object *ob * @return pointer behavior. * @ingroup Evas_Object_Group_Extras */ -EAPI Evas_Object_Pointer_Mode evas_object_pointer_mode_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object_Pointer_Mode evas_object_pointer_mode_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -5528,7 +5602,7 @@ EAPI void evas_object_anti_alias_set (Evas_Object *ob * @return @c 1 if the object is to be anti_aliased. @c 0 otherwise. * @ingroup Evas_Object_Group_Extras */ -EAPI Eina_Bool evas_object_anti_alias_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_anti_alias_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -5562,7 +5636,7 @@ EAPI void evas_object_scale_set (Evas_Object *ob * * @see evas_object_scale_set() */ -EAPI double evas_object_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI double evas_object_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -5579,7 +5653,7 @@ EAPI void evas_object_render_op_set (Evas_Object *ob * @return one of the enumerated values in Evas_Render_Op. * @ingroup Evas_Object_Group_Extras */ -EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set whether to use precise (usually expensive) point collision @@ -5621,7 +5695,7 @@ EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Obje * * @ingroup Evas_Object_Group_Extras */ - EAPI Eina_Bool evas_object_precise_is_inside_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Eina_Bool evas_object_precise_is_inside_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set a hint flag on the given Evas object that it's used as a "static @@ -5653,7 +5727,7 @@ EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Obje * * @ingroup Evas_Object_Group_Extras */ - EAPI Eina_Bool evas_object_static_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Eina_Bool evas_object_static_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @} @@ -5710,7 +5784,7 @@ EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Obje * * @ingroup Evas_Object_Group_Find */ -EAPI Evas_Object *evas_focus_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_focus_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieves the object on the given evas with the given name. @@ -5718,9 +5792,36 @@ EAPI Evas_Object *evas_focus_get (const Evas *e) EINA_WA * @param name The given name. * @return If successful, the Evas object with the given name. Otherwise, * @c NULL. + * + * This looks for the evas object given a name by evas_object_name_set(). If + * the name is not unique canvas-wide, then which one of the many objects + * with that name is returned is undefined, so only use this if you can ensure + * the object name is unique. + * + * @ingroup Evas_Object_Group_Find + */ +EAPI Evas_Object *evas_object_name_find (const Evas *e, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +/** + * Retrieves the object from children of the given object with the given name. + * @param obj The parent (smart) object whose children to search. + * @param name The given name. + * @param recurse Set to the number of child levels to recurse (0 == don't recurse, 1 == only look at the children of @p obj or their immediate children, but no further etc.). + * @return If successful, the Evas object with the given name. Otherwise, + * @c NULL. + * + * This looks for the evas object given a name by evas_object_name_set(), but + * it ONLY looks at the children of the object *p obj, and will only recurse + * into those children if @p recurse is greater than 0. If the name is not + * unique within immediate children (or the whole child tree) then it is not + * defined which child object will be returned. If @p recurse is set to -1 then + * it will recurse without limit. + * + * @since 1.2 + * * @ingroup Evas_Object_Group_Find */ -EAPI Evas_Object *evas_object_name_find (const Evas *e, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_name_child_find (const Evas_Object *obj, const char *name, int recurse) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve the Evas object stacked at the top of a given position in @@ -5745,7 +5846,7 @@ EAPI Evas_Object *evas_object_name_find (const Evas *e, const c * objects, acting only on the ones at the "top level", with regard to * object parenting. */ -EAPI Evas_Object *evas_object_top_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_top_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve the Evas object stacked at the top at the position of the @@ -5763,7 +5864,7 @@ EAPI Evas_Object *evas_object_top_at_xy_get (const Evas *e, Evas_Co * objects, acting only on the ones at the "top level", with regard to * object parenting. */ -EAPI Evas_Object *evas_object_top_at_pointer_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_top_at_pointer_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve the Evas object stacked at the top of a given rectangular @@ -5793,7 +5894,7 @@ EAPI Evas_Object *evas_object_top_at_pointer_get (const Evas *e) EINA_WA * objects, acting only on the ones at the "top level", with regard to * object parenting. */ -EAPI Evas_Object *evas_object_top_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_top_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve a list of Evas objects lying over a given position in @@ -5818,8 +5919,8 @@ EAPI Evas_Object *evas_object_top_in_rectangle_get (const Evas *e, Evas_Co * objects, acting only on the ones at the "top level", with regard to * object parenting. */ -EAPI Eina_List *evas_objects_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Eina_List *evas_objects_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_List *evas_objects_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + EAPI Eina_List *evas_objects_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the lowest (stacked) Evas object on the canvas @p @@ -5840,7 +5941,7 @@ EAPI Eina_List *evas_objects_at_xy_get (const Evas *e, Evas_Co * objects, acting only on the ones at the "top level", with regard to * object parenting. */ -EAPI Evas_Object *evas_object_bottom_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_bottom_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the highest (stacked) Evas object on the canvas @p @@ -5862,7 +5963,7 @@ EAPI Evas_Object *evas_object_bottom_get (const Evas *e) EINA_WA * objects, acting only on the ones at the "top level", with regard to * object parenting. */ -EAPI Evas_Object *evas_object_top_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_top_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @} @@ -6502,7 +6603,7 @@ EAPI void evas_object_image_border_center_fill_set (Evas_Obj * * See @ref evas_object_image_fill_set() for more details. */ -EAPI Evas_Border_Fill_Mode evas_object_image_border_center_fill_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Border_Fill_Mode evas_object_image_border_center_fill_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set whether the image object's fill property should track the @@ -6532,7 +6633,7 @@ EAPI void evas_object_image_filled_set (Evas_Obj * * @see evas_object_image_filled_set() for more information */ -EAPI Eina_Bool evas_object_image_filled_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_image_filled_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the scaling factor (multiplier) for the borders of an image @@ -6633,7 +6734,7 @@ EAPI void evas_object_image_fill_spread_set (Evas_Obj * @param obj The given evas image object. * @return The current spread mode of the image object. */ -EAPI Evas_Fill_Spread evas_object_image_fill_spread_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Fill_Spread evas_object_image_fill_spread_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the size of the given image object. @@ -6670,7 +6771,7 @@ EAPI void evas_object_image_size_get (const Ev * The row stride is the number of bytes between the start of a row * and the start of the next row for image data. */ -EAPI int evas_object_image_stride_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_object_image_stride_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieves a number representing any error that occurred during the @@ -6681,7 +6782,7 @@ EAPI int evas_object_image_stride_get (const Ev * one of the #Evas_Load_Error values. #EVAS_LOAD_ERROR_NONE * is returned if there was no error. */ -EAPI Evas_Load_Error evas_object_image_load_error_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Load_Error evas_object_image_load_error_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the raw image data of the given image object. @@ -6730,7 +6831,7 @@ EAPI void evas_object_image_data_set (Evas_Obj * * @see evas_object_image_data_set() */ -EAPI void *evas_object_image_data_get (const Evas_Object *obj, Eina_Bool for_writing) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI void *evas_object_image_data_get (const Evas_Object *obj, Eina_Bool for_writing) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Converts the raw image data of the given image object to the @@ -6748,7 +6849,7 @@ EAPI void *evas_object_image_data_get (const Ev * @param to_cspace The colorspace to which the image raw data will be converted. * @return data A newly allocated data in the format specified by to_cspace. */ -EAPI void *evas_object_image_data_convert (Evas_Object *obj, Evas_Colorspace to_cspace) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI void *evas_object_image_data_convert (Evas_Object *obj, Evas_Colorspace to_cspace) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Replaces the raw image data of the given image object. @@ -6819,7 +6920,7 @@ EAPI void evas_object_image_alpha_set (Evas_Obj * * See @ref evas_object_image_alpha_set() for more details. */ -EAPI Eina_Bool evas_object_image_alpha_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_image_alpha_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets whether to use high-quality image scaling algorithm on the @@ -6849,7 +6950,7 @@ EAPI void evas_object_image_smooth_scale_set (Evas_Obj * * See @ref evas_object_image_smooth_scale_set() for more details. */ -EAPI Eina_Bool evas_object_image_smooth_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_image_smooth_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Preload an image object's image data in the background @@ -6947,7 +7048,7 @@ EAPI void evas_object_image_pixels_dirty_set (Evas_Obj * @param obj The given image object. * @return Whether the image is dirty. */ -EAPI Eina_Bool evas_object_image_pixels_dirty_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_image_pixels_dirty_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the DPI resolution of an image object's source image. @@ -6972,7 +7073,7 @@ EAPI void evas_object_image_load_dpi_set (Evas_Obj * * @see evas_object_image_load_dpi_set() for more details */ -EAPI double evas_object_image_load_dpi_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI double evas_object_image_load_dpi_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the size of a given image object's source image, when loading @@ -7026,7 +7127,7 @@ EAPI void evas_object_image_load_scale_down_set (Evas_Obj * * @see evas_object_image_load_scale_down_set() for more details */ -EAPI int evas_object_image_load_scale_down_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_object_image_load_scale_down_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Inform a given image object to load a selective region of its @@ -7103,7 +7204,18 @@ EAPI void evas_object_image_colorspace_set (Evas_Obj * This function returns the colorspace of given canvas image. * */ -EAPI Evas_Colorspace evas_object_image_colorspace_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Colorspace evas_object_image_colorspace_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +/** + * Get the support state of a given image + * + * @param obj The given image object pointer + * @return The region support state + * @since 1.2.0 + * + * This function returns the state of the region support of given image + */ +EAPI Eina_Bool evas_object_image_region_support_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the native surface of a given image of the canvas @@ -7125,7 +7237,7 @@ EAPI void evas_object_image_native_surface_set (Evas_Obj * This function returns the native surface of a given canvas image. * */ -EAPI Evas_Native_Surface *evas_object_image_native_surface_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Native_Surface *evas_object_image_native_surface_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the video surface linked to a given image of the canvas @@ -7149,7 +7261,7 @@ EAPI void evas_object_image_video_surface_set (Evas_Obj * This function returns the video surface linked to a given canvas image. * */ -EAPI const Evas_Video_Surface *evas_object_image_video_surface_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const Evas_Video_Surface *evas_object_image_video_surface_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the scale hint of a given image of the canvas. @@ -7178,7 +7290,7 @@ EAPI void evas_object_image_scale_hint_set (Evas_Obj * * @see evas_object_image_scale_hint_set() for more details. */ -EAPI Evas_Image_Scale_Hint evas_object_image_scale_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Image_Scale_Hint evas_object_image_scale_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the content hint setting of a given image object of the canvas. @@ -7210,7 +7322,7 @@ EAPI void evas_object_image_content_hint_set (Evas_Obj * * @see evas_object_image_content_hint_set() */ -EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -7563,7 +7675,7 @@ EAPI void evas_object_text_font_source_set (Evas_Object *obj, cons * * @see evas_object_text_font_get() for more details */ -EAPI const char *evas_object_text_font_source_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_object_text_font_source_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the font family and size on a given text object. @@ -7620,7 +7732,7 @@ EAPI void evas_object_text_text_set (Evas_Object *obj, cons * * @see evas_object_text_text_set() */ -EAPI const char *evas_object_text_text_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_object_text_text_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @brief Sets the BiDi delimiters used in the textblock. @@ -7648,13 +7760,13 @@ EAPI void evas_object_text_bidi_delimiters_set(Evas_Object *obj, co */ EAPI const char *evas_object_text_bidi_delimiters_get(const Evas_Object *obj); - EAPI Evas_Coord evas_object_text_ascent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Coord evas_object_text_descent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Coord evas_object_text_max_ascent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Coord evas_object_text_max_descent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Coord evas_object_text_horiz_advance_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Coord evas_object_text_vert_advance_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Coord evas_object_text_inset_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Evas_Coord evas_object_text_ascent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + EAPI Evas_Coord evas_object_text_descent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + EAPI Evas_Coord evas_object_text_max_ascent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + EAPI Evas_Coord evas_object_text_max_descent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + EAPI Evas_Coord evas_object_text_horiz_advance_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + EAPI Evas_Coord evas_object_text_vert_advance_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + EAPI Evas_Coord evas_object_text_inset_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve position and dimension information of a character within a text @c Evas_Object. @@ -7692,7 +7804,7 @@ EAPI int evas_object_text_last_up_to_pos (const Evas_Object *obj * * @see evas_object_text_style_set() for more details. */ -EAPI Evas_Text_Style_Type evas_object_text_style_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Text_Style_Type evas_object_text_style_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the style to apply on the given text object. @@ -7742,7 +7854,7 @@ EAPI void evas_object_text_style_set (Evas_Object *obj, Evas * - #EVAS_TEXT_STYLE_SOFT_SHADOW * - #EVAS_TEXT_STYLE_FAR_SOFT_SHADOW * - * One can also change de direction the shadow grows to, with + * One can also change the direction where the shadow grows to, with * evas_object_text_style_set(). * * @see evas_object_text_shadow_color_get() @@ -8081,7 +8193,7 @@ EAPI Evas_Object *evas_object_textblock_add(Evas *e) EINA_WARN_U * @param escape the string to be escaped * @return the unescaped version of escape */ -EAPI const char *evas_textblock_escape_string_get(const char *escape) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_textblock_escape_string_get(const char *escape) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Returns the escaped version of the string. @@ -8089,7 +8201,7 @@ EAPI const char *evas_textblock_escape_string_get(const char *e * @param len_ret the len of the part of the string that was used. * @return the escaped string. */ -EAPI const char *evas_textblock_string_escape_get(const char *string, int *len_ret) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_textblock_string_escape_get(const char *string, int *len_ret) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Return the unescaped version of the string between start and end. @@ -8098,8 +8210,35 @@ EAPI const char *evas_textblock_string_escape_get(const char *s * @param escape_end the end of the string. * @return the unescaped version of the range */ -EAPI const char *evas_textblock_escape_string_range_get(const char *escape_start, const char *escape_end) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI const char *evas_textblock_escape_string_range_get(const char *escape_start, const char *escape_end) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); +/** + * Return the plain version of the markup. + * + * Works as if you set the markup to a textblock and then retrieve the plain + * version of the text. i.e:
and <\n> will be replaced with \n, &...; with + * the actual char and etc. + * + * @param obj the textblock object to work with. (if NULL, tries the default) + * @param text the markup text (if NULL, return NULL) + * @return an allocated plain text version of the markup + * @since 1.2.0 + */ +EAPI char *evas_textblock_text_markup_to_utf8(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC; + +/** + * Return the markup version of the plain text. + * + * Replaces \n ->
\t -> and etc. Generally needed before you pass + * plain text to be set in a textblock. + * + * @param obj the textblock object to work with (if NULL, it just does the + * default behaviour, i.e with no extra object information). + * @param text the markup text (if NULL, return NULL) + * @return an allocated plain text version of the markup + * @since 1.2.0 + */ +EAPI char *evas_textblock_text_utf8_to_markup(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC; /** * Creates a new textblock style. @@ -8128,7 +8267,7 @@ EAPI void evas_textblock_style_set(Evas_Textblock_Style * @param ts the style to get it's text. * @return the text of the style or null on error. */ -EAPI const char *evas_textblock_style_get(const Evas_Textblock_Style *ts) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_textblock_style_get(const Evas_Textblock_Style *ts) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -8144,7 +8283,7 @@ EAPI void evas_object_textblock_style_set(Evas_Object *o * @param obj the object to get the style from. * @return the style of the object. */ -EAPI const Evas_Textblock_Style *evas_object_textblock_style_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const Evas_Textblock_Style *evas_object_textblock_style_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @brief Set the "replacement character" to use for the given textblock object. @@ -8161,7 +8300,7 @@ EAPI void evas_object_textblock_replace_char_set(Evas_Ob * @param obj The given textblock object * @return replacement character or @c NULL */ -EAPI const char *evas_object_textblock_replace_char_get(Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_object_textblock_replace_char_get(Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @brief Sets the vertical alignment of text within the textblock object @@ -8230,7 +8369,7 @@ EAPI void evas_object_textblock_legacy_newline_set(Evas_ * @return EINA_TRUE if in legacy mode, EINA_FALSE otherwise. * @since 1.1.0 */ -EAPI Eina_Bool evas_object_textblock_legacy_newline_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_textblock_legacy_newline_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -8270,7 +8409,7 @@ EAPI const char *evas_object_textblock_text_markup_get(const Ev * @param obj the object. * @return the obj's main cursor. */ -EAPI Evas_Textblock_Cursor *evas_object_textblock_cursor_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Textblock_Cursor *evas_object_textblock_cursor_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Create a new cursor, associate it to the obj and init it to point @@ -8421,7 +8560,7 @@ EAPI void evas_textblock_cursor_at_format_set(Evas_Textb * @return #EINA_TRUE if the cursor points to a visible format, #EINA_FALSE otherwise. * @see evas_textblock_cursor_format_get() */ -EAPI Eina_Bool evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Advances to the next format node @@ -8464,6 +8603,24 @@ EAPI Eina_Bool evas_textblock_cursor_char_next(Evas_Textblock EAPI Eina_Bool evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** + * Moves the cursor to the start of the word under the cursor. + * + * @param cur the cursor to move. + * @return #EINA_TRUE on success #EINA_FALSE otherwise. + * @since 1.2.0 + */ +EAPI Eina_Bool evas_textblock_cursor_word_start(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** + * Moves the cursor to the end of the word under the cursor. + * + * @param cur the cursor to move. + * @return #EINA_TRUE on success #EINA_FALSE otherwise. + * @since 1.2.0 + */ +EAPI Eina_Bool evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** * Go to the first char in the node the cursor is pointing on. * * @param cur the cursor to update. @@ -8501,7 +8658,7 @@ EAPI void evas_textblock_cursor_line_char_last(Evas_Text * @param cur the cursor to take the position from. * @return the position or -1 on error */ -EAPI int evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the cursor pos. @@ -8527,7 +8684,7 @@ EAPI Eina_Bool evas_textblock_cursor_line_set(Evas_Textblock_ * @param cur2 the second cursor. * @return -1 if cur1 < cur2, 0 if cur1 == cur2 and 1 otherwise. */ -EAPI int evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI int evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Make cur_dest point to the same place as cur. Does not work if they don't @@ -8630,7 +8787,7 @@ EAPI void evas_textblock_cursor_range_delete(Evas_Textbl * @param cur the cursor pointing to the paragraph. * @return the text on success, NULL otherwise. */ -EAPI const char *evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Return the length of the paragraph, cheaper the eina_unicode_strlen() @@ -8638,7 +8795,7 @@ EAPI const char *evas_textblock_cursor_paragraph_text_get(const * @param cur the position of the paragraph. * @return the length of the paragraph on success, -1 otehrwise. */ -EAPI int evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Return the currently visible range. @@ -8648,7 +8805,7 @@ EAPI int evas_textblock_cursor_paragraph_text_length_ge * @return EINA_TRUE on success. EINA_FALSE otherwise. * @since 1.1.0 */ -Eina_Bool evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textblock_Cursor *end) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textblock_Cursor *end) EINA_ARG_NONNULL(1, 2); /** * Return the format nodes in the range between cur1 and cur2. @@ -8658,7 +8815,7 @@ Eina_Bool evas_textblock_cursor_visible_range_get(Evas_T * @return the foramt nodes in the range. You have to free it. * @since 1.1.0 */ -EAPI Eina_List * evas_textblock_cursor_range_formats_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI Eina_List * evas_textblock_cursor_range_formats_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Return the text in the range between cur1 and cur2 @@ -8669,13 +8826,15 @@ EAPI Eina_List * evas_textblock_cursor_range_formats_get(const E * @return the text in the range * @see elm_entry_markup_to_utf8() */ -EAPI char *evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2, Evas_Textblock_Text_Type format) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI char *evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2, Evas_Textblock_Text_Type format) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Return the content of the cursor. * + * Free the returned string pointer when done (if it is not NULL). + * * @param cur the cursor - * @return the text in the range + * @return the text in the range, terminated by a nul byte (may be utf8). */ EAPI char *evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; @@ -8766,7 +8925,7 @@ EAPI int evas_textblock_cursor_line_coord_set(Evas_Text * @param cur2 other side of the range. * @return a list of Rectangles representing the geometry of the range. */ -EAPI Eina_List *evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI Eina_List *evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); EAPI Eina_Bool evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1); @@ -8776,7 +8935,7 @@ EAPI Eina_List *evas_textblock_cursor_range_geometry_get(const * @param cur the cursor to check. * @return #EINA_TRUE if true, #EINA_FALSE otherwise. */ -EAPI Eina_Bool evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -8931,6 +9090,12 @@ EAPI void evas_object_polygon_points_clear (Evas_Object *obj) EINA * @} */ +/* @since 1.2.0 */ +EAPI void evas_object_is_frame_object_set(Evas_Object *obj, Eina_Bool is_frame); + +/* @since 1.2.0 */ +EAPI Eina_Bool evas_object_is_frame_object_get(Evas_Object *obj); + /** * @defgroup Evas_Smart_Group Smart Functions * @@ -9273,7 +9438,7 @@ EAPI Evas_Smart *evas_smart_class_new (const * @param s a valid #Evas_Smart pointer * @return the #Evas_Smart_Class in it */ -EAPI const Evas_Smart_Class *evas_smart_class_get (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const Evas_Smart_Class *evas_smart_class_get (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -9284,7 +9449,7 @@ EAPI const Evas_Smart_Class *evas_smart_class_get (const * This data pointer is set as the data field in the #Evas_Smart_Class * passed in to evas_smart_class_new(). */ -EAPI void *evas_smart_data_get (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI void *evas_smart_data_get (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the smart callbacks known by this #Evas_Smart handle's smart @@ -9338,7 +9503,7 @@ EAPI const Evas_Smart_Cb_Description **evas_smart_callbacks_descriptions_get(con * * @see evas_smart_callbacks_descriptions_get() */ -EAPI const Evas_Smart_Cb_Description *evas_smart_callback_description_find(const Evas_Smart *s, const char *name) EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI const Evas_Smart_Cb_Description *evas_smart_callback_description_find(const Evas_Smart *s, const char *name) EINA_ARG_NONNULL(1, 2); /** @@ -9507,7 +9672,7 @@ EAPI void evas_object_smart_member_del (Evas_Object *obj) EINA * @see evas_object_smart_member_add() * @see evas_object_smart_member_del() */ -EAPI Eina_List *evas_object_smart_members_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_List *evas_object_smart_members_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Gets the parent smart object of a given Evas object, if it has one. @@ -9519,7 +9684,7 @@ EAPI Eina_List *evas_object_smart_members_get (const Evas_Object *obj * * @ingroup Evas_Smart_Object_Group */ -EAPI Evas_Object *evas_object_smart_parent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_smart_parent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Checks whether a given smart object or any of its smart object @@ -9546,7 +9711,7 @@ EAPI Evas_Object *evas_object_smart_parent_get (const Evas_Object *obj * * @ingroup Evas_Smart_Object_Group */ -EAPI Eina_Bool evas_object_smart_type_check (const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI Eina_Bool evas_object_smart_type_check (const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Checks whether a given smart object or any of its smart object @@ -9561,7 +9726,7 @@ EAPI Eina_Bool evas_object_smart_type_check (const Evas_Object *obj * * @ingroup Evas_Smart_Object_Group */ -EAPI Eina_Bool evas_object_smart_type_check_ptr (const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI Eina_Bool evas_object_smart_type_check_ptr (const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Get the #Evas_Smart from which @p obj smart object was created. @@ -9571,7 +9736,7 @@ EAPI Eina_Bool evas_object_smart_type_check_ptr (const Evas_Object *obj * * @ingroup Evas_Smart_Object_Group */ -EAPI Evas_Smart *evas_object_smart_smart_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Smart *evas_object_smart_smart_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve user data stored on a given smart object. @@ -9585,7 +9750,7 @@ EAPI Evas_Smart *evas_object_smart_smart_get (const Evas_Object *obj * * @ingroup Evas_Smart_Object_Group */ -EAPI void *evas_object_smart_data_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI void *evas_object_smart_data_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Store a pointer to user data for a given smart object. @@ -9683,6 +9848,34 @@ EAPI void evas_object_smart_callback_priority_add(Evas_Object *obj, EAPI void *evas_object_smart_callback_del (Evas_Object *obj, const char *event, Evas_Smart_Cb func) EINA_ARG_NONNULL(1, 2, 3); /** + * Delete (unregister) a callback function from the smart event + * specified by @p event on the smart object @p obj. + * + * @param obj a smart object + * @param event the event's name string + * @param func the callback function + * @param data the data pointer that was passed to the callback + * @return the data pointer + * + * This function removes the first added smart callback on the + * object @p obj matching the event name @p event, the registered + * function pointer @p func and the callback data pointer @p data. If + * the removal is successful it will also return the data pointer that + * was passed to evas_object_smart_callback_add() (that will be the same + * as the parameter) when the callback(s) was(were) added to the canvas. + * If not successful @c NULL will be returned. A common use would be to + * remove an exact match of a callback + * + * @see evas_object_smart_callback_add() for more details. + * @since 1.2.0 + * @ingroup Evas_Smart_Object_Group + * + * @note To delete all smart event callbacks which match @p type and @p func, + * use evas_object_smart_callback_del(). + */ +EAPI void *evas_object_smart_callback_del_full(Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1, 2, 3); + +/** * Call a given smart callback on the smart object @p obj. * * @param obj the smart object @@ -9856,7 +10049,7 @@ EAPI void evas_object_smart_need_recalculate_set(Evas_Object *obj, * * @ingroup Evas_Smart_Object_Group */ -EAPI Eina_Bool evas_object_smart_need_recalculate_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_smart_need_recalculate_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Call the @b calculate() smart function immediataly on a given smart @@ -9977,7 +10170,7 @@ EAPI void evas_object_smart_move_children_relative(Evas_Objec * * @see evas_object_smart_clipped_smart_add() */ -EAPI Evas_Object *evas_object_smart_clipped_clipper_get (Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_smart_clipped_clipper_get (Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set a given smart class' callbacks so it implements the clipped smart @@ -10885,7 +11078,7 @@ EAPI Eina_List *evas_object_box_children_get * _Evas_Object_Box_Api::property_name_get smart class function of the * box, which is originally set to @c NULL. */ -EAPI const char *evas_object_box_option_property_name_get (Evas_Object *o, int property) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_object_box_option_property_name_get (Evas_Object *o, int property) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the numerical identifier of the property of the child elements @@ -10904,7 +11097,7 @@ EAPI const char *evas_object_box_option_property_name_get * _Evas_Object_Box_Api::property_id_get smart class function of the * box, which is originally set to @c NULL. */ -EAPI int evas_object_box_option_property_id_get (Evas_Object *o, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI int evas_object_box_option_property_id_get (Evas_Object *o, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Set a property value (by its given numerical identifier), on a @@ -11081,7 +11274,7 @@ EAPI void evas_object_table_homogeneous_set (Evas * * @see evas_object_table_homogeneous_set() */ -EAPI Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set padding between cells. @@ -11455,7 +11648,7 @@ EAPI Eina_List *evas_object_grid_children_get (const * @return @c EINA_TRUE if it wants, @c EINA_FALSE otherwise. * @ingroup Evas_Cserve */ -EAPI Eina_Bool evas_cserve_want_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE; +EAPI Eina_Bool evas_cserve_want_get (void) EINA_WARN_UNUSED_RESULT; /** * Retrieves if the system is connected to the server used to share @@ -11482,7 +11675,7 @@ EAPI Eina_Bool evas_cserve_stats_get (Evas_Cserve_Stats * * @param cache A handle to the given images cache. */ -EAPI void evas_cserve_image_cache_contents_clean (Evas_Cserve_Image_Cache *cache) EINA_PURE; +EAPI void evas_cserve_image_cache_contents_clean (Evas_Cserve_Image_Cache *cache); /** * Retrieves the current configuration of the Evas image caching @@ -11501,7 +11694,7 @@ EAPI void evas_cserve_image_cache_contents_clean (Evas_Cserve_Image * * @ingroup Evas_Cserve */ -EAPI Eina_Bool evas_cserve_config_get (Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE; +EAPI Eina_Bool evas_cserve_config_get (Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT; /** * Changes the configurations of the Evas image caching server. @@ -11515,7 +11708,7 @@ EAPI Eina_Bool evas_cserve_config_get (Evas_Cserve_Confi * * @ingroup Evas_Cserve */ -EAPI Eina_Bool evas_cserve_config_set (const Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE; +EAPI Eina_Bool evas_cserve_config_set (const Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT; /** * Force the system to disconnect from the bitmap caching server. @@ -11711,7 +11904,7 @@ EAPI int evas_string_char_prev_get (const char *str, int p * @return The length in characters (not bytes) * @ingroup Evas_Utils */ -EAPI int evas_string_char_len_get (const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_string_char_len_get (const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @defgroup Evas_Keys Key Input Functions @@ -11769,7 +11962,7 @@ EAPI int evas_string_char_len_get (const char *str) EINA_ * @return An ::Evas_Modifier handle to query Evas' keys subsystem * with evas_key_modifier_is_set(), or @c NULL on error. */ -EAPI const Evas_Modifier *evas_key_modifier_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const Evas_Modifier *evas_key_modifier_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Returns a handle to the list of lock keys registered in the canvas @@ -11787,7 +11980,7 @@ EAPI const Evas_Modifier *evas_key_modifier_get (const Evas *e) EINA_WA * @return An ::Evas_Lock handle to query Evas' keys subsystem with * evas_key_lock_is_set(), or @c NULL on error. */ -EAPI const Evas_Lock *evas_key_lock_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const Evas_Lock *evas_key_lock_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -11808,7 +12001,7 @@ EAPI const Evas_Lock *evas_key_lock_get (const Evas *e) EINA_WA * @see evas_key_modifier_on * @see evas_key_modifier_off */ -EAPI Eina_Bool evas_key_modifier_is_set (const Evas_Modifier *m, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI Eina_Bool evas_key_modifier_is_set (const Evas_Modifier *m, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** @@ -11828,7 +12021,7 @@ EAPI Eina_Bool evas_key_modifier_is_set (const Evas_Modifier *m * @see evas_key_lock_on * @see evas_key_lock_off */ -EAPI Eina_Bool evas_key_lock_is_set (const Evas_Lock *l, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI Eina_Bool evas_key_lock_is_set (const Evas_Lock *l, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** @@ -12012,7 +12205,7 @@ EAPI void evas_key_lock_off (Evas *e, const char *k * @see evas_object_key_grab * @see evas_object_key_ungrab */ -EAPI Evas_Modifier_Mask evas_key_modifier_mask_get (const Evas *e, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI Evas_Modifier_Mask evas_key_modifier_mask_get (const Evas *e, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** diff --git a/libraries/evas/src/lib/Evas_GL.h b/libraries/evas/src/lib/Evas_GL.h index 04bedea..fdfbaad 100644 --- a/libraries/evas/src/lib/Evas_GL.h +++ b/libraries/evas/src/lib/Evas_GL.h @@ -28,7 +28,7 @@ typedef enum _Evas_GL_Depth_Bits EVAS_GL_DEPTH_BIT_8 = 1, EVAS_GL_DEPTH_BIT_16 = 2, EVAS_GL_DEPTH_BIT_24 = 3, - EVAS_GL_DEPTH_BIT_32 = 4, + EVAS_GL_DEPTH_BIT_32 = 4 } Evas_GL_Depth_Bits; typedef enum _Evas_GL_Stencil_Bits @@ -38,14 +38,21 @@ typedef enum _Evas_GL_Stencil_Bits EVAS_GL_STENCIL_BIT_2 = 2, EVAS_GL_STENCIL_BIT_4 = 3, EVAS_GL_STENCIL_BIT_8 = 4, - EVAS_GL_STENCIL_BIT_16 = 5, + EVAS_GL_STENCIL_BIT_16 = 5 } Evas_GL_Stencil_Bits; +typedef enum _Evas_GL_Options_Bits +{ + EVAS_GL_OPTIONS_NONE = 0, + EVAS_GL_OPTIONS_DIRECT = (1<<0) +} Evas_GL_Options_Bits; + struct _Evas_GL_Config { - Evas_GL_Color_Format color_format; - Evas_GL_Depth_Bits depth_bits; - Evas_GL_Stencil_Bits stencil_bits; + Evas_GL_Color_Format color_format; + Evas_GL_Depth_Bits depth_bits; + Evas_GL_Stencil_Bits stencil_bits; + Evas_GL_Options_Bits options_bits; }; #define EVAS_GL_EXTENSIONS 1 @@ -73,6 +80,7 @@ typedef struct _GLData { Evas_GL_Context *ctx; Evas_GL_Surface *sfc; + Evas_GL_Config *cfg; Evas_GL *evasgl; Evas_GL_API *glapi; GLuint program; @@ -93,13 +101,6 @@ static GLuint load_shader (GLData *gld, GLenum type, const char *shader_src) int main(int argc, char **argv) { - // config for the surface for evas_gl - Evas_GL_Config config = - { - EVAS_GL_RGBA_8888, - EVAS_GL_DEPTH_NONE, - EVAS_GL_STENCIL_NONE - }; // a size by default int w = 256, h = 256; // some variables we will use @@ -124,8 +125,16 @@ main(int argc, char **argv) // get the evas gl handle for doing gl things gld->evasgl = evas_gl_new(canvas); gld->glapi = evas_gl_api_get(gld->evasgl); + + // Set a surface config + gld->cfg = evas_gl_config_new(); + gld->cfg->color_format = EVAS_GL_RGBA_8888; + //gld->cfg->depth_bits = EVAS_GL_DEPTH_NONE; // Othe config options + //gld->cfg->stencil_bits = EVAS_GL_STENCIL_NONE; + //gld->cfg->options_bits = EVAS_GL_OPTIONS_NONE; + // create a surface and context - gld->sfc = evas_gl_surface_create(gld->evasgl, &config, w, h); + gld->sfc = evas_gl_surface_create(gld->evasgl, gld->cfg, w, h); gld->ctx = evas_gl_context_create(gld->evasgl, NULL); //-// //-//-//-// END GL INIT BLOB @@ -207,6 +216,7 @@ on_del(void *data, Evas *e, Evas_Object *obj, void *event_info) evas_gl_surface_destroy(gld->evasgl, gld->sfc); evas_gl_context_destroy(gld->evasgl, gld->ctx); + evas_gl_config_free(gld->cfg); evas_gl_free(gld->evasgl); free(gld); } @@ -389,6 +399,22 @@ EAPI Evas_GL *evas_gl_new (Evas *e) EINA_WARN_UNU EAPI void evas_gl_free (Evas_GL *evas_gl) EINA_ARG_NONNULL(1); /** + * Allocates a new config object for the user to fill out. + * + * As long as the Evas creates a config object for the user, it takes care + * of the backward compatibility issue. + */ +EAPI Evas_GL_Config *evas_gl_config_new (); + +/** + * Frees a config object created from evas_gl_config_new. + * + * As long as the Evas creates a config object for the user, it takes care + * of the backward compatibility issue. + */ +EAPI void evas_gl_config_free (Evas_GL_Config *cfg) EINA_ARG_NONNULL(1); + +/** * Creates and returns new Evas_GL_Surface object for GL Rendering. * * @param evas_gl The given Evas_GL object. diff --git a/libraries/evas/src/lib/Makefile.am b/libraries/evas/src/lib/Makefile.am index 6b1011a..2a1a92d 100644 --- a/libraries/evas/src/lib/Makefile.am +++ b/libraries/evas/src/lib/Makefile.am @@ -100,6 +100,11 @@ SUBDIRS += ../modules/engines/software_x11/ EVAS_STATIC_MODULE += ../modules/engines/software_x11/libevas_engine_software_x11.la EVAS_STATIC_LIBADD += @evas_engine_software_xlib_libs@ @evas_engine_software_xcb_libs@ endif +if EVAS_STATIC_BUILD_WAYLAND_SHM +SUBDIRS += ../modules/engines/wayland_shm/ +EVAS_STATIC_MODULE += ../modules/engines/wayland_shm/libevas_engine_wayland_shm.la +EVAS_STATIC_LIBADD += @evas_engine_wayland_shm_libs@ +endif if EVAS_STATIC_BUILD_BMP SUBDIRS += ../modules/loaders/bmp EVAS_STATIC_MODULE += ../modules/loaders/bmp/libevas_loader_bmp.la @@ -200,9 +205,7 @@ AM_CFLAGS = @WIN32_CFLAGS@ lib_LTLIBRARIES = libevas.la -### Evas_GL disabled for 1.1 -#includes_HEADERS = Evas.h Evas_GL.h -includes_HEADERS = Evas.h +includes_HEADERS = Evas.h Evas_GL.h includesdir = $(includedir)/evas-@VMAJ@ libevas_la_SOURCES = main.c diff --git a/libraries/evas/src/lib/Makefile.in b/libraries/evas/src/lib/Makefile.in index 87bbaac..ffe71d1 100644 --- a/libraries/evas/src/lib/Makefile.in +++ b/libraries/evas/src/lib/Makefile.in @@ -101,57 +101,60 @@ host_triplet = @host@ @EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_48 = ../modules/engines/software_x11/ @EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_49 = ../modules/engines/software_x11/libevas_engine_software_x11.la @EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_50 = @evas_engine_software_xlib_libs@ @evas_engine_software_xcb_libs@ -@EVAS_STATIC_BUILD_BMP_TRUE@am__append_51 = ../modules/loaders/bmp -@EVAS_STATIC_BUILD_BMP_TRUE@am__append_52 = ../modules/loaders/bmp/libevas_loader_bmp.la -@EVAS_STATIC_BUILD_BMP_TRUE@am__append_53 = @evas_image_loader_bmp_libs@ -@EVAS_STATIC_BUILD_EDB_TRUE@am__append_54 = ../modules/savers/edb ../modules/loaders/edb -@EVAS_STATIC_BUILD_EDB_TRUE@am__append_55 = ../modules/savers/edb/libevas_saver_edb.la ../modules/loaders/edb/libevas_loader_edb.la -@EVAS_STATIC_BUILD_EDB_TRUE@am__append_56 = @evas_image_loader_edb_libs@ -@EVAS_STATIC_BUILD_EET_TRUE@am__append_57 = ../modules/savers/eet ../modules/loaders/eet -@EVAS_STATIC_BUILD_EET_TRUE@am__append_58 = ../modules/savers/eet/libevas_saver_eet.la ../modules/loaders/eet/libevas_loader_eet.la -@EVAS_STATIC_BUILD_EET_TRUE@am__append_59 = @evas_image_loader_eet_libs@ -@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_60 = ../modules/loaders/generic -@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_61 = ../modules/loaders/generic/libevas_loader_generic.la -@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_62 = @evas_image_loader_generic_libs@ -@EVAS_STATIC_BUILD_GIF_TRUE@am__append_63 = ../modules/loaders/gif -@EVAS_STATIC_BUILD_GIF_TRUE@am__append_64 = ../modules/loaders/gif/libevas_loader_gif.la -@EVAS_STATIC_BUILD_GIF_TRUE@am__append_65 = @evas_image_loader_gif_libs@ -@EVAS_STATIC_BUILD_ICO_TRUE@am__append_66 = ../modules/loaders/ico -@EVAS_STATIC_BUILD_ICO_TRUE@am__append_67 = ../modules/loaders/ico/libevas_loader_ico.la -@EVAS_STATIC_BUILD_ICO_TRUE@am__append_68 = @evas_image_loader_ico_libs@ -@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_69 = ../modules/loaders/jpeg -@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_70 = ../modules/loaders/jpeg/libevas_loader_jpeg.la -@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_71 = ../modules/savers/jpeg -@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_72 = ../modules/savers/jpeg/libevas_saver_jpeg.la -@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_73 = @evas_image_loader_jpeg_libs@ -@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_74 = ../modules/loaders/pmaps -@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_75 = ../modules/loaders/pmaps/libevas_loader_pmaps.la -@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_76 = @evas_image_loader_pmaps_libs@ -@EVAS_STATIC_BUILD_PNG_TRUE@am__append_77 = ../modules/savers/png ../modules/loaders/png -@EVAS_STATIC_BUILD_PNG_TRUE@am__append_78 = ../modules/savers/png/libevas_saver_png.la ../modules/loaders/png/libevas_loader_png.la -@EVAS_STATIC_BUILD_PNG_TRUE@am__append_79 = @evas_image_loader_png_libs@ -@EVAS_STATIC_BUILD_PSD_TRUE@am__append_80 = ../modules/loaders/psd -@EVAS_STATIC_BUILD_PSD_TRUE@am__append_81 = ../modules/loaders/psd/libevas_loader_psd.la -@EVAS_STATIC_BUILD_PSD_TRUE@am__append_82 = @evas_image_loader_psd_libs@ -@EVAS_STATIC_BUILD_SVG_TRUE@am__append_83 = ../modules/loaders/svg -@EVAS_STATIC_BUILD_SVG_TRUE@am__append_84 = ../modules/loaders/svg/libevas_loader_svg.la -@EVAS_STATIC_BUILD_SVG_TRUE@am__append_85 = @evas_image_loader_svg_libs@ -@EVAS_STATIC_BUILD_TGA_TRUE@am__append_86 = ../modules/loaders/tga -@EVAS_STATIC_BUILD_TGA_TRUE@am__append_87 = ../modules/loaders/tga/libevas_loader_tga.la -@EVAS_STATIC_BUILD_TGA_TRUE@am__append_88 = @evas_image_loader_tga_libs@ -@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_89 = ../modules/savers/tiff ../modules/loaders/tiff -@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_90 = ../modules/savers/tiff/libevas_saver_tiff.la ../modules/loaders/tiff/libevas_loader_tiff.la -@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_91 = @evas_image_loader_tiff_libs@ -@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_92 = ../modules/loaders/wbmp -@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_93 = ../modules/loaders/wbmp/libevas_loader_wbmp.la -@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_94 = @evas_image_loader_wbmp_libs@ -@EVAS_STATIC_BUILD_XPM_TRUE@am__append_95 = ../modules/loaders/xpm -@EVAS_STATIC_BUILD_XPM_TRUE@am__append_96 = ../modules/loaders/xpm/libevas_loader_xpm.la -@EVAS_STATIC_BUILD_XPM_TRUE@am__append_97 = @evas_image_loader_xpm_libs@ -@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_98 = engines/common_16/libevas_engine_common_16.la -@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_99 = engines/common_16/libevas_engine_common_16.la -@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_100 = engines/common_8/libevas_engine_common_8.la -@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_101 = engines/common_8/libevas_engine_common_8.la +@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am__append_51 = ../modules/engines/wayland_shm/ +@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am__append_52 = ../modules/engines/wayland_shm/libevas_engine_wayland_shm.la +@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am__append_53 = @evas_engine_wayland_shm_libs@ +@EVAS_STATIC_BUILD_BMP_TRUE@am__append_54 = ../modules/loaders/bmp +@EVAS_STATIC_BUILD_BMP_TRUE@am__append_55 = ../modules/loaders/bmp/libevas_loader_bmp.la +@EVAS_STATIC_BUILD_BMP_TRUE@am__append_56 = @evas_image_loader_bmp_libs@ +@EVAS_STATIC_BUILD_EDB_TRUE@am__append_57 = ../modules/savers/edb ../modules/loaders/edb +@EVAS_STATIC_BUILD_EDB_TRUE@am__append_58 = ../modules/savers/edb/libevas_saver_edb.la ../modules/loaders/edb/libevas_loader_edb.la +@EVAS_STATIC_BUILD_EDB_TRUE@am__append_59 = @evas_image_loader_edb_libs@ +@EVAS_STATIC_BUILD_EET_TRUE@am__append_60 = ../modules/savers/eet ../modules/loaders/eet +@EVAS_STATIC_BUILD_EET_TRUE@am__append_61 = ../modules/savers/eet/libevas_saver_eet.la ../modules/loaders/eet/libevas_loader_eet.la +@EVAS_STATIC_BUILD_EET_TRUE@am__append_62 = @evas_image_loader_eet_libs@ +@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_63 = ../modules/loaders/generic +@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_64 = ../modules/loaders/generic/libevas_loader_generic.la +@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_65 = @evas_image_loader_generic_libs@ +@EVAS_STATIC_BUILD_GIF_TRUE@am__append_66 = ../modules/loaders/gif +@EVAS_STATIC_BUILD_GIF_TRUE@am__append_67 = ../modules/loaders/gif/libevas_loader_gif.la +@EVAS_STATIC_BUILD_GIF_TRUE@am__append_68 = @evas_image_loader_gif_libs@ +@EVAS_STATIC_BUILD_ICO_TRUE@am__append_69 = ../modules/loaders/ico +@EVAS_STATIC_BUILD_ICO_TRUE@am__append_70 = ../modules/loaders/ico/libevas_loader_ico.la +@EVAS_STATIC_BUILD_ICO_TRUE@am__append_71 = @evas_image_loader_ico_libs@ +@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_72 = ../modules/loaders/jpeg +@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_73 = ../modules/loaders/jpeg/libevas_loader_jpeg.la +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_74 = ../modules/savers/jpeg +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_75 = ../modules/savers/jpeg/libevas_saver_jpeg.la +@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_76 = @evas_image_loader_jpeg_libs@ +@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_77 = ../modules/loaders/pmaps +@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_78 = ../modules/loaders/pmaps/libevas_loader_pmaps.la +@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_79 = @evas_image_loader_pmaps_libs@ +@EVAS_STATIC_BUILD_PNG_TRUE@am__append_80 = ../modules/savers/png ../modules/loaders/png +@EVAS_STATIC_BUILD_PNG_TRUE@am__append_81 = ../modules/savers/png/libevas_saver_png.la ../modules/loaders/png/libevas_loader_png.la +@EVAS_STATIC_BUILD_PNG_TRUE@am__append_82 = @evas_image_loader_png_libs@ +@EVAS_STATIC_BUILD_PSD_TRUE@am__append_83 = ../modules/loaders/psd +@EVAS_STATIC_BUILD_PSD_TRUE@am__append_84 = ../modules/loaders/psd/libevas_loader_psd.la +@EVAS_STATIC_BUILD_PSD_TRUE@am__append_85 = @evas_image_loader_psd_libs@ +@EVAS_STATIC_BUILD_SVG_TRUE@am__append_86 = ../modules/loaders/svg +@EVAS_STATIC_BUILD_SVG_TRUE@am__append_87 = ../modules/loaders/svg/libevas_loader_svg.la +@EVAS_STATIC_BUILD_SVG_TRUE@am__append_88 = @evas_image_loader_svg_libs@ +@EVAS_STATIC_BUILD_TGA_TRUE@am__append_89 = ../modules/loaders/tga +@EVAS_STATIC_BUILD_TGA_TRUE@am__append_90 = ../modules/loaders/tga/libevas_loader_tga.la +@EVAS_STATIC_BUILD_TGA_TRUE@am__append_91 = @evas_image_loader_tga_libs@ +@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_92 = ../modules/savers/tiff ../modules/loaders/tiff +@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_93 = ../modules/savers/tiff/libevas_saver_tiff.la ../modules/loaders/tiff/libevas_loader_tiff.la +@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_94 = @evas_image_loader_tiff_libs@ +@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_95 = ../modules/loaders/wbmp +@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_96 = ../modules/loaders/wbmp/libevas_loader_wbmp.la +@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_97 = @evas_image_loader_wbmp_libs@ +@EVAS_STATIC_BUILD_XPM_TRUE@am__append_98 = ../modules/loaders/xpm +@EVAS_STATIC_BUILD_XPM_TRUE@am__append_99 = ../modules/loaders/xpm/libevas_loader_xpm.la +@EVAS_STATIC_BUILD_XPM_TRUE@am__append_100 = @evas_image_loader_xpm_libs@ +@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_101 = engines/common_16/libevas_engine_common_16.la +@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_102 = engines/common_16/libevas_engine_common_16.la +@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_103 = engines/common_8/libevas_engine_common_8.la +@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_104 = engines/common_8/libevas_engine_common_8.la subdir = src/lib DIST_COMMON = $(includes_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -213,7 +216,7 @@ am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_libevas_la_OBJECTS = main.lo libevas_la_OBJECTS = $(am_libevas_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) @@ -393,8 +396,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -411,6 +412,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -492,6 +495,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ @@ -576,9 +583,10 @@ SUBDIRS = canvas cache cserve file engines include $(am__append_1) \ $(am__append_45) $(am__append_48) $(am__append_51) \ $(am__append_54) $(am__append_57) $(am__append_60) \ $(am__append_63) $(am__append_66) $(am__append_69) \ - $(am__append_71) $(am__append_74) $(am__append_77) \ + $(am__append_72) $(am__append_74) $(am__append_77) \ $(am__append_80) $(am__append_83) $(am__append_86) \ - $(am__append_89) $(am__append_92) $(am__append_95) + $(am__append_89) $(am__append_92) $(am__append_95) \ + $(am__append_98) EVAS_STATIC_MODULE = $(am__append_2) $(am__append_4) $(am__append_6) \ $(am__append_9) $(am__append_12) $(am__append_15) \ $(am__append_18) $(am__append_21) $(am__append_24) \ @@ -587,20 +595,20 @@ EVAS_STATIC_MODULE = $(am__append_2) $(am__append_4) $(am__append_6) \ $(am__append_43) $(am__append_46) $(am__append_49) \ $(am__append_52) $(am__append_55) $(am__append_58) \ $(am__append_61) $(am__append_64) $(am__append_67) \ - $(am__append_70) $(am__append_72) $(am__append_75) \ + $(am__append_70) $(am__append_73) $(am__append_75) \ $(am__append_78) $(am__append_81) $(am__append_84) \ $(am__append_87) $(am__append_90) $(am__append_93) \ - $(am__append_96) + $(am__append_96) $(am__append_99) EVAS_STATIC_LIBADD = $(am__append_7) $(am__append_10) $(am__append_13) \ $(am__append_16) $(am__append_19) $(am__append_22) \ $(am__append_27) $(am__append_30) $(am__append_33) \ $(am__append_38) $(am__append_41) $(am__append_44) \ $(am__append_47) $(am__append_50) $(am__append_53) \ $(am__append_56) $(am__append_59) $(am__append_62) \ - $(am__append_65) $(am__append_68) $(am__append_73) \ + $(am__append_65) $(am__append_68) $(am__append_71) \ $(am__append_76) $(am__append_79) $(am__append_82) \ $(am__append_85) $(am__append_88) $(am__append_91) \ - $(am__append_94) $(am__append_97) + $(am__append_94) $(am__append_97) $(am__append_100) AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ @@ -619,10 +627,7 @@ AM_CPPFLAGS = \ AM_CFLAGS = @WIN32_CFLAGS@ lib_LTLIBRARIES = libevas.la - -### Evas_GL disabled for 1.1 -#includes_HEADERS = Evas.h Evas_GL.h -includes_HEADERS = Evas.h +includes_HEADERS = Evas.h Evas_GL.h includesdir = $(includedir)/evas-@VMAJ@ libevas_la_SOURCES = main.c @EVAS_CSERVE_TRUE@libevas_cserve_la = cserve/libevas_cserve.la @@ -631,12 +636,12 @@ libevas_la_LIBADD = canvas/libevas_canvas.la file/libevas_file.la \ engines/common/libevas_engine_common.la @FREETYPE_LIBS@ \ @FRIBIDI_LIBS@ @HARFBUZZ_LIBS@ @EET_LIBS@ @FONTCONFIG_LIBS@ \ @pthread_libs@ @EINA_LIBS@ $(EVAS_STATIC_MODULE) \ - $(EVAS_STATIC_LIBADD) @PIXMAN_LIBS@ -lm $(am__append_98) \ - $(am__append_100) + $(EVAS_STATIC_LIBADD) @PIXMAN_LIBS@ -lm $(am__append_101) \ + $(am__append_103) libevas_la_DEPENDENCIES = canvas/libevas_canvas.la \ file/libevas_file.la cache/libevas_cache.la \ $(libevas_cserve_la) engines/common/libevas_engine_common.la \ - $(EVAS_STATIC_MODULE) $(am__append_99) $(am__append_101) + $(EVAS_STATIC_MODULE) $(am__append_102) $(am__append_104) libevas_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ ### Evas_GL we are still using it in our code, so just don't install it. diff --git a/libraries/evas/src/lib/cache/Makefile.in b/libraries/evas/src/lib/cache/Makefile.in index b024731..2b50c81 100644 --- a/libraries/evas/src/lib/cache/Makefile.in +++ b/libraries/evas/src/lib/cache/Makefile.in @@ -197,8 +197,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -215,6 +213,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -296,6 +296,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/cache/evas_cache_engine_image.c b/libraries/evas/src/lib/cache/evas_cache_engine_image.c index 8ae4392..5ec1af2 100644 --- a/libraries/evas/src/lib/cache/evas_cache_engine_image.c +++ b/libraries/evas/src/lib/cache/evas_cache_engine_image.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include "evas_common.h" diff --git a/libraries/evas/src/lib/cache/evas_cache_image.c b/libraries/evas/src/lib/cache/evas_cache_image.c index d52c64e..73e4f8a 100644 --- a/libraries/evas/src/lib/cache/evas_cache_image.c +++ b/libraries/evas/src/lib/cache/evas_cache_image.c @@ -918,12 +918,8 @@ evas_cache_image_drop(Image_Entry *im) EAPI void evas_cache_image_data_not_needed(Image_Entry *im) { - Evas_Cache_Image *cache; int references; - /* FIXME: no one uses this api... well evas_cache_engine_parent_not_needed() - * does, but nothing uses that! */ - cache = im->cache; #ifdef EVAS_FRAME_QUEUING LKL(im->lock_references); #endif @@ -941,11 +937,12 @@ evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned { Image_Entry *im_dirty = im; Evas_Cache_Image *cache; - int references; cache = im->cache; if (!(im->flags.dirty)) { +#ifndef EVAS_CSERVE + int references; #ifdef EVAS_FRAME_QUEUING LKL(im->lock_references); #endif @@ -953,21 +950,18 @@ evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned #ifdef EVAS_FRAME_QUEUING LKU(im->lock_references); #endif -#ifndef EVAS_CSERVE // if ref 1 also copy if using shared cache as its read-only if (references == 1) im_dirty = im; else #endif { - int error; - im_dirty = evas_cache_image_copied_data(cache, im->w, im->h, evas_cache_image_pixels(im), im->flags.alpha, im->space); if (!im_dirty) goto on_error; if (cache->func.debug) cache->func.debug("dirty-src", im); - error = cache->func.dirty(im_dirty, im); + cache->func.dirty(im_dirty, im); if (cache->func.debug) cache->func.debug("dirty-out", im_dirty); #ifdef EVAS_FRAME_QUEUING LKL(im_dirty->lock_references); @@ -1014,15 +1008,13 @@ evas_cache_image_alone(Image_Entry *im) } else { - int error; - im_dirty = evas_cache_image_copied_data(cache, im->w, im->h, evas_cache_image_pixels(im), im->flags.alpha, im->space); if (!im_dirty) goto on_error; if (cache->func.debug) cache->func.debug("dirty-src", im); - error = cache->func.dirty(im_dirty, im); + cache->func.dirty(im_dirty, im); if (cache->func.debug) cache->func.debug("dirty-out", im_dirty); #ifdef EVAS_FRAME_QUEUING LKL(im_dirty->lock_references); @@ -1296,6 +1288,7 @@ evas_cache_image_preload_cancel(Image_Entry *im, const void *target) _evas_cache_image_entry_preload_remove(im, target); #else (void)im; + (void)target; #endif } diff --git a/libraries/evas/src/lib/cache/evas_preload.c b/libraries/evas/src/lib/cache/evas_preload.c index 6e0412a..5eebaed 100644 --- a/libraries/evas/src/lib/cache/evas_preload.c +++ b/libraries/evas/src/lib/cache/evas_preload.c @@ -225,6 +225,7 @@ evas_preload_thread_run(void (*func_heavy) (void *data), If no thread and as we don't want to break app that rely on this facility, we will lock the interface until we are done. */ + (void)func_cancel; func_heavy((void *)data); func_end((void *)data); return (void *)1; @@ -253,12 +254,13 @@ evas_preload_thread_cancel(Evas_Preload_Pthread *thread) } } LKU(_mutex); - + /* Delay the destruction */ work = (Evas_Preload_Pthread_Worker *)thread; work->cancel = EINA_TRUE; return EINA_FALSE; #else + (void) thread; return EINA_TRUE; #endif } diff --git a/libraries/evas/src/lib/canvas/Makefile.in b/libraries/evas/src/lib/canvas/Makefile.in index 0b4e15d..75da67a 100644 --- a/libraries/evas/src/lib/canvas/Makefile.in +++ b/libraries/evas/src/lib/canvas/Makefile.in @@ -211,8 +211,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -229,6 +227,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -310,6 +310,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/canvas/evas_callbacks.c b/libraries/evas/src/lib/canvas/evas_callbacks.c index 33b93bc..93f34f2 100644 --- a/libraries/evas/src/lib/canvas/evas_callbacks.c +++ b/libraries/evas/src/lib/canvas/evas_callbacks.c @@ -23,7 +23,7 @@ _evas_post_event_callback_call(Evas *e) { if (!pc->func((void*)pc->data, e)) skip = 1; } - EVAS_MEMPOOL_FREE(_mp_pc, pc); + EVAS_MEMPOOL_FREE(_mp_pc, pc); } _evas_unwalk(e); } @@ -32,10 +32,10 @@ void _evas_post_event_callback_free(Evas *e) { Evas_Post_Callback *pc; - + EINA_LIST_FREE(e->post_events, pc) { - EVAS_MEMPOOL_FREE(_mp_pc, pc); + EVAS_MEMPOOL_FREE(_mp_pc, pc); } _evas_unwalk(e); } @@ -48,15 +48,15 @@ evas_event_callback_list_post_free(Eina_Inlist **list) /* MEM OK */ for (l = *list; l;) { - Evas_Func_Node *fn; + Evas_Func_Node *fn; - fn = (Evas_Func_Node *)l; - l = l->next; - if (fn->delete_me) - { + fn = (Evas_Func_Node *)l; + l = l->next; + if (fn->delete_me) + { *list = eina_inlist_remove(*list, EINA_INLIST_GET(fn)); EVAS_MEMPOOL_FREE(_mp_fn, fn); - } + } } } @@ -70,7 +70,7 @@ evas_object_event_callback_clear(Evas_Object *obj) if (!obj->callbacks->callbacks) { EVAS_MEMPOOL_FREE(_mp_cb, obj->callbacks); - obj->callbacks = NULL; + obj->callbacks = NULL; } } @@ -84,7 +84,7 @@ evas_event_callback_clear(Evas *e) if (!e->callbacks->callbacks) { EVAS_MEMPOOL_FREE(_mp_cb, e->callbacks); - e->callbacks = NULL; + e->callbacks = NULL; } } @@ -95,7 +95,7 @@ evas_object_event_callback_all_del(Evas_Object *obj) if (!obj->callbacks) return; EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) - fn->delete_me = 1; + fn->delete_me = 1; } void @@ -115,7 +115,7 @@ evas_event_callback_all_del(Evas *e) if (!e->callbacks) return; EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) - fn->delete_me = 1; + fn->delete_me = 1; } void @@ -136,25 +136,25 @@ evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info) _evas_walk(e); if (e->callbacks) { - l_mod = &e->callbacks->callbacks; + l_mod = &e->callbacks->callbacks; e->callbacks->walking_list++; for (l = *l_mod; l; l = l->next) { - Evas_Func_Node *fn; - - fn = (Evas_Func_Node *)l; - if ((fn->type == type) && (!fn->delete_me)) - { - Evas_Event_Cb func = fn->func; - if (func) - func(fn->data, e, event_info); - } - if (e->delete_me) break; + Evas_Func_Node *fn; + + fn = (Evas_Func_Node *)l; + if ((fn->type == type) && (!fn->delete_me)) + { + Evas_Event_Cb func = fn->func; + if (func) + func(fn->data, e, event_info); + } + if (e->delete_me) break; } e->callbacks->walking_list--; if (!e->callbacks->walking_list) { - evas_event_callback_clear(e); + evas_event_callback_clear(e); l_mod = NULL; } } @@ -162,7 +162,7 @@ evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info) } void -evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info) +evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id) { /* MEM OK */ Eina_Inlist **l_mod = NULL, *l; @@ -170,67 +170,67 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void Evas *e; if ((obj->delete_me) || (!obj->layer)) return; - if ((obj->last_event == _evas_event_counter) && + if ((obj->last_event == event_id) && (obj->last_event_type == type)) return; - obj->last_event = _evas_event_counter; + obj->last_event = event_id; obj->last_event_type = type; if (!(e = obj->layer->evas)) return; _evas_walk(e); if (obj->callbacks) { - l_mod = &obj->callbacks->callbacks; + l_mod = &obj->callbacks->callbacks; switch (type) { - case EVAS_CALLBACK_MOUSE_DOWN: - { - Evas_Event_Mouse_Down *ev = event_info; - - flags = ev->flags; - if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) - { - if (obj->last_mouse_down_counter < (e->last_mouse_down_counter - 1)) - ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); - } - obj->last_mouse_down_counter = e->last_mouse_down_counter; - break; - } - case EVAS_CALLBACK_MOUSE_UP: - { - Evas_Event_Mouse_Up *ev = event_info; - - flags = ev->flags; - if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) - { - if (obj->last_mouse_up_counter < (e->last_mouse_up_counter - 1)) - ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); - } - obj->last_mouse_up_counter = e->last_mouse_up_counter; - break; - } - default: - break; + case EVAS_CALLBACK_MOUSE_DOWN: + { + Evas_Event_Mouse_Down *ev = event_info; + + flags = ev->flags; + if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) + { + if (obj->last_mouse_down_counter < (e->last_mouse_down_counter - 1)) + ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); + } + obj->last_mouse_down_counter = e->last_mouse_down_counter; + break; + } + case EVAS_CALLBACK_MOUSE_UP: + { + Evas_Event_Mouse_Up *ev = event_info; + + flags = ev->flags; + if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) + { + if (obj->last_mouse_up_counter < (e->last_mouse_up_counter - 1)) + ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); + } + obj->last_mouse_up_counter = e->last_mouse_up_counter; + break; + } + default: + break; } obj->callbacks->walking_list++; for (l = *l_mod; l; l = l->next) { - Evas_Func_Node *fn; - - fn = (Evas_Func_Node *)l; - if ((fn->type == type) && (!fn->delete_me)) - { - Evas_Object_Event_Cb func = fn->func; - if (func) - func(fn->data, obj->layer->evas, obj, event_info); - } - if (obj->delete_me) break; + Evas_Func_Node *fn; + + fn = (Evas_Func_Node *)l; + if ((fn->type == type) && (!fn->delete_me)) + { + Evas_Object_Event_Cb func = fn->func; + if (func) + func(fn->data, obj->layer->evas, obj, event_info); + } + if (obj->delete_me) break; } obj->callbacks->walking_list--; if (!obj->callbacks->walking_list) - { - evas_object_event_callback_clear(obj); - l_mod = NULL; - } + { + evas_object_event_callback_clear(obj); + l_mod = NULL; + } if (type == EVAS_CALLBACK_MOUSE_DOWN) { @@ -246,12 +246,12 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void if (!((obj->no_propagate) && (l_mod) && (*l_mod))) { - if (!obj->no_propagate) - { - if ((obj->smart.parent) && (type != EVAS_CALLBACK_FREE) && - (type <= EVAS_CALLBACK_KEY_UP)) - evas_object_event_callback_call(obj->smart.parent, type, event_info); - } + if (!obj->no_propagate) + { + if ((obj->smart.parent) && (type != EVAS_CALLBACK_FREE) && + (type <= EVAS_CALLBACK_KEY_UP)) + evas_object_event_callback_call(obj->smart.parent, type, event_info, event_id); + } } _evas_unwalk(e); } @@ -263,16 +263,16 @@ _callback_priority_cmp(const void *_a, const void *_b) a = EINA_INLIST_CONTAINER_GET(_a, Evas_Func_Node); b = EINA_INLIST_CONTAINER_GET(_b, Evas_Func_Node); if (a->priority < b->priority) - return -1; + return -1; else - return 1; + return 1; } EAPI void evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) { evas_object_event_callback_priority_add(obj, type, - EVAS_CALLBACK_PRIORITY_DEFAULT, func, data); + EVAS_CALLBACK_PRIORITY_DEFAULT, func, data); } EAPI void @@ -294,7 +294,7 @@ evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type typ if (!obj->callbacks) return; EVAS_MEMPOOL_PREP(_mp_cb, obj->callbacks, Evas_Callbacks); } - + EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 2048, ); fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node); if (!fn) return; @@ -305,8 +305,8 @@ evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type typ fn->priority = priority; obj->callbacks->callbacks = - eina_inlist_sorted_insert(obj->callbacks->callbacks, EINA_INLIST_GET(fn), - _callback_priority_cmp); + eina_inlist_sorted_insert(obj->callbacks->callbacks, EINA_INLIST_GET(fn), + _callback_priority_cmp); } EAPI void * @@ -325,17 +325,17 @@ evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, Evas_O EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) { - if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) - { - void *tmp; - - tmp = fn->data; - fn->delete_me = 1; - obj->callbacks->deletions_waiting = 1; - if (!obj->callbacks->walking_list) - evas_object_event_callback_clear(obj); - return tmp; - } + if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) + { + void *tmp; + + tmp = fn->data; + fn->delete_me = 1; + obj->callbacks->deletions_waiting = 1; + if (!obj->callbacks->walking_list) + evas_object_event_callback_clear(obj); + return tmp; + } } return NULL; } @@ -356,17 +356,17 @@ evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, E EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) { - if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) - { - void *tmp; - - tmp = fn->data; - fn->delete_me = 1; - obj->callbacks->deletions_waiting = 1; - if (!obj->callbacks->walking_list) - evas_object_event_callback_clear(obj); - return tmp; - } + if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) + { + void *tmp; + + tmp = fn->data; + fn->delete_me = 1; + obj->callbacks->deletions_waiting = 1; + if (!obj->callbacks->walking_list) + evas_object_event_callback_clear(obj); + return tmp; + } } return NULL; } @@ -375,7 +375,7 @@ EAPI void evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) { evas_event_callback_priority_add(e, type, EVAS_CALLBACK_PRIORITY_DEFAULT, - func, data); + func, data); } EAPI void @@ -397,7 +397,7 @@ evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback if (!e->callbacks) return; EVAS_MEMPOOL_PREP(_mp_cb, e->callbacks, Evas_Callbacks); } - + EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 2048, ); fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node); if (!fn) return; @@ -408,7 +408,7 @@ evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback fn->priority = priority; e->callbacks->callbacks = eina_inlist_sorted_insert(e->callbacks->callbacks, - EINA_INLIST_GET(fn), _callback_priority_cmp); + EINA_INLIST_GET(fn), _callback_priority_cmp); } EAPI void * @@ -427,17 +427,17 @@ evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) { - if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) - { - void *data; - - data = fn->data; - fn->delete_me = 1; - e->callbacks->deletions_waiting = 1; - if (!e->callbacks->walking_list) - evas_event_callback_clear(e); - return data; - } + if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) + { + void *data; + + data = fn->data; + fn->delete_me = 1; + e->callbacks->deletions_waiting = 1; + if (!e->callbacks->walking_list) + evas_event_callback_clear(e); + return data; + } } return NULL; } @@ -458,17 +458,17 @@ evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb fun EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) { - if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) - { - void *tmp; - - tmp = fn->data; - fn->delete_me = 1; - e->callbacks->deletions_waiting = 1; - if (!e->callbacks->walking_list) - evas_event_callback_clear(e); - return tmp; - } + if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) + { + void *tmp; + + tmp = fn->data; + fn->delete_me = 1; + e->callbacks->deletions_waiting = 1; + if (!e->callbacks->walking_list) + evas_event_callback_clear(e); + return tmp; + } } return NULL; } @@ -477,17 +477,17 @@ EAPI void evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const void *data) { Evas_Post_Callback *pc; - + MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); - + EVAS_MEMPOOL_INIT(_mp_pc, "evas_post_callback", Evas_Post_Callback, 64, ); pc = EVAS_MEMPOOL_ALLOC(_mp_pc, Evas_Post_Callback); if (!pc) return; EVAS_MEMPOOL_PREP(_mp_pc, pc, Evas_Post_Callback); if (e->delete_me) return; - + pc->func = func; pc->data = data; e->post_events = eina_list_prepend(e->post_events, pc); @@ -498,11 +498,11 @@ evas_post_event_callback_remove(Evas *e, Evas_Object_Event_Post_Cb func) { Evas_Post_Callback *pc; Eina_List *l; - + MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); - + EINA_LIST_FOREACH(e->post_events, l, pc) { if (pc->func == func) @@ -518,11 +518,11 @@ evas_post_event_callback_remove_full(Evas *e, Evas_Object_Event_Post_Cb func, co { Evas_Post_Callback *pc; Eina_List *l; - + MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); - + EINA_LIST_FOREACH(e->post_events, l, pc) { if ((pc->func == func) && (pc->data == data)) diff --git a/libraries/evas/src/lib/canvas/evas_events.c b/libraries/evas/src/lib/canvas/evas_events.c index 99ecf8c..9b7077e 100644 --- a/libraries/evas/src/lib/canvas/evas_events.c +++ b/libraries/evas/src/lib/canvas/evas_events.c @@ -1,6 +1,11 @@ #include "evas_common.h" #include "evas_private.h" +static Eina_List * +_evas_event_object_list_in_get(Evas *e, Eina_List *in, + const Eina_Inlist *list, Evas_Object *stop, + int x, int y, int *no_rep); + static void _evas_event_havemap_adjust(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Eina_Bool mouse_grabbed) { @@ -16,13 +21,17 @@ _evas_event_havemap_adjust(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Eina_ } static Eina_List * -_evas_event_object_list_in_get(Evas *e, Eina_List *in, - const Eina_Inlist *list, Evas_Object *stop, - int x, int y, int *no_rep) +_evas_event_object_list_raw_in_get(Evas *e, Eina_List *in, + const Eina_Inlist *list, Evas_Object *stop, + int x, int y, int *no_rep) { Evas_Object *obj; + int inside; + if (!list) return in; - EINA_INLIST_REVERSE_FOREACH(list, obj) + for (obj = _EINA_INLIST_CONTAINER(obj, list); + obj; + obj = _EINA_INLIST_CONTAINER(obj, EINA_INLIST_GET(obj)->prev)) { if (obj == stop) { @@ -37,9 +46,9 @@ _evas_event_object_list_in_get(Evas *e, Eina_List *in, if (obj->smart.smart) { int norep = 0; - int inside; - if (((obj->cur.usemap) && (obj->cur.map) && (obj->cur.map->count == 4))) + if ((obj->cur.usemap) && (obj->cur.map) && + (obj->cur.map->count == 4)) { inside = evas_object_is_in_output_rect(obj, x, y, 1, 1); if (inside) @@ -57,7 +66,8 @@ _evas_event_object_list_in_get(Evas *e, Eina_List *in, evas_object_smart_members_get_direct(obj), stop, obj->cur.geometry.x + obj->cur.map->mx, - obj->cur.geometry.y + obj->cur.map->my, &norep); + obj->cur.geometry.y + obj->cur.map->my, + &norep); } } } @@ -69,19 +79,24 @@ _evas_event_object_list_in_get(Evas *e, Eina_List *in, } if (norep) { - if (!obj->repeat_events) *no_rep = 1; - return in; + if (!obj->repeat_events) + { + *no_rep = 1; + return in; + } } } else { - int inside = evas_object_is_in_output_rect(obj, x, y, 1, 1); + inside = evas_object_is_in_output_rect(obj, x, y, 1, 1); - if (((obj->cur.usemap) && (obj->cur.map) && (obj->cur.map->count == 4))) + if ((obj->cur.usemap) && (obj->cur.map) && + (obj->cur.map->count == 4)) { - if ((inside) && (!evas_map_coords_get(obj->cur.map, x, y, - &(obj->cur.map->mx), - &(obj->cur.map->my), 0))) + if ((inside) && + (!evas_map_coords_get(obj->cur.map, x, y, + &(obj->cur.map->mx), + &(obj->cur.map->my), 0))) { inside = 0; } @@ -105,6 +120,16 @@ _evas_event_object_list_in_get(Evas *e, Eina_List *in, return in; } +static Eina_List * +_evas_event_object_list_in_get(Evas *e, Eina_List *in, + const Eina_Inlist *list, Evas_Object *stop, + int x, int y, int *no_rep) +{ + if (!list) return NULL; + return _evas_event_object_list_raw_in_get(e, in, list->last, stop, + x, y, no_rep); +} + Eina_List * evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y) { @@ -136,6 +161,24 @@ evas_event_list_copy(Eina_List *list) /* public functions */ EAPI void +evas_event_default_flags_set(Evas *e, Evas_Event_Flags flags) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + e->default_event_flags = flags; +} + +EAPI Evas_Event_Flags +evas_event_default_flags_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return EVAS_EVENT_FLAG_ON_HOLD; + MAGIC_CHECK_END(); + return e->default_event_flags; +} + +EAPI void evas_event_freeze(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); @@ -197,6 +240,8 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int Eina_List *l, *copy; Evas_Event_Mouse_Down ev; Evas_Object *obj; + int addgrab = 0; + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; @@ -205,12 +250,14 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int if ((b < 1) || (b > 32)) return; e->pointer.button |= (1 << (b - 1)); + e->pointer.downs++; if (e->events_frozen > 0) return; e->last_timestamp = timestamp; _evas_object_event_new(); + event_id = _evas_event_counter; ev.button = b; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; @@ -221,7 +268,7 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int ev.locks = &(e->locks); ev.flags = flags; ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; _evas_walk(e); /* append new touch point to the touch point list */ @@ -238,14 +285,23 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int e->pointer.object.in = eina_list_free(e->pointer.object.in); /* and set up the new one */ e->pointer.object.in = ins; + /* adjust grabbed count by the nuymber of currently held down + * fingers/buttons */ + if (e->pointer.downs > 1) addgrab = e->pointer.downs - 1; } copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { - if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) + if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) || + (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)) { - obj->mouse_grabbed++; - e->pointer.mouse_grabbed++; + obj->mouse_grabbed += addgrab + 1; + e->pointer.mouse_grabbed += addgrab + 1; + if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) + { + e->pointer.nogrep++; + break; + } } } EINA_LIST_FOREACH(copy, l, obj) @@ -256,8 +312,10 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_DOWN, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_DOWN, &ev, event_id); if (e->delete_me) break; + if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) + break; } if (copy) eina_list_free(copy); e->last_mouse_down_counter++; @@ -274,9 +332,11 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data) Evas_Event_Mouse_Out ev; Evas_Object *obj; int post_called = 0; + int event_id = 0; _evas_object_event_new(); + event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; @@ -286,7 +346,7 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data) ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; /* get new list of ins */ ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y); @@ -304,7 +364,7 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data) { obj->mouse_in = 0; if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); } } if (e->delete_me) break; @@ -319,6 +379,7 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data) _evas_object_event_new(); + event_id = _evas_event_counter; ev_in.buttons = e->pointer.button; ev_in.output.x = e->pointer.x; ev_in.output.y = e->pointer.y; @@ -328,7 +389,7 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data) ev_in.modifiers = &(e->modifiers); ev_in.locks = &(e->locks); ev_in.timestamp = timestamp; - ev_in.event_flags = EVAS_EVENT_FLAG_NONE; + ev_in.event_flags = e->default_event_flags; EINA_LIST_FOREACH(ins, l, obj_itr) { @@ -341,7 +402,7 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data) { obj_itr->mouse_in = 1; if (e->events_frozen <= 0) - evas_object_event_callback_call(obj_itr, EVAS_CALLBACK_MOUSE_IN, &ev_in); + evas_object_event_callback_call(obj_itr, EVAS_CALLBACK_MOUSE_IN, &ev_in, event_id); } } if (e->delete_me) break; @@ -383,6 +444,7 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t if ((b < 1) || (b > 32)) return; e->pointer.button &= ~(1 << (b - 1)); + e->pointer.downs--; if (e->events_frozen > 0) return; e->last_timestamp = timestamp; @@ -390,9 +452,11 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t { Evas_Event_Mouse_Up ev; Evas_Object *obj; + int event_id = 0; _evas_object_event_new(); + event_id = _evas_event_counter; ev.button = b; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; @@ -403,7 +467,7 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t ev.locks = &(e->locks); ev.flags = flags; ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; _evas_walk(e); /* update released touch point */ @@ -414,7 +478,7 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t ev.canvas.x = e->pointer.x; ev.canvas.y = e->pointer.y; _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); - if ((obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) && + if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) && (obj->mouse_grabbed > 0)) { obj->mouse_grabbed--; @@ -423,9 +487,14 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t if (!obj->delete_me) { if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_UP, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_UP, &ev, event_id); } if (e->delete_me) break; + if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) + { + if (e->pointer.nogrep > 0) e->pointer.nogrep--; + break; + } } if (copy) copy = eina_list_free(copy); e->last_mouse_up_counter++; @@ -442,9 +511,9 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t ERR("BUG? e->pointer.mouse_grabbed (=%d) < 0!", e->pointer.mouse_grabbed); } - /* remove released touch point from the touch point list */ + /* remove released touch point from the touch point list */ _evas_touch_point_remove(e, 0); - + _evas_unwalk(e); } @@ -465,6 +534,7 @@ evas_event_feed_mouse_cancel(Evas *e, unsigned int timestamp, const void *data) if ((e->pointer.button & (1 << i))) evas_event_feed_mouse_up(e, i + 1, 0, timestamp, data); } + // FIXME: multi cancel too? _evas_unwalk(e); } @@ -474,6 +544,7 @@ evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestam Eina_List *l, *copy; Evas_Event_Mouse_Wheel ev; Evas_Object *obj; + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; @@ -484,6 +555,7 @@ evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestam _evas_object_event_new(); + event_id = _evas_event_counter; ev.direction = direction; ev.z = z; ev.output.x = e->pointer.x; @@ -494,7 +566,7 @@ evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestam ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; _evas_walk(e); copy = evas_event_list_copy(e->pointer.object.in); @@ -505,7 +577,7 @@ evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestam ev.canvas.y = e->pointer.y; _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); if ((e->events_frozen <= 0) && !evas_event_freezes_through(obj)) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_WHEEL, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_WHEEL, &ev, event_id); if (e->delete_me) break; } if (copy) copy = eina_list_free(copy); @@ -517,6 +589,7 @@ evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestam EAPI void evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const void *data) { + Evas_Object *nogrep_obj = NULL; int px, py; //// Evas_Coord pcx, pcy; @@ -553,9 +626,11 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const { Evas_Event_Mouse_Move ev; Evas_Object *obj; + int event_id = 0; _evas_object_event_new(); + event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.cur.output.x = e->pointer.x; ev.cur.output.y = e->pointer.y; @@ -569,7 +644,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { @@ -586,19 +661,28 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const (!obj->clip.clipees)) { if ((px != x) || (py != y)) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); } else outs = eina_list_append(outs, obj); + if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) && + (e->pointer.nogrep > 0)) + { + eina_list_free(copy); + nogrep_obj = obj; + goto nogrep; + } if (e->delete_me) break; } _evas_post_event_callback_call(e); } { Evas_Event_Mouse_Out ev; + int event_id = 0; _evas_object_event_new(); + event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; @@ -608,7 +692,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; if (copy) eina_list_free(copy); while (outs) @@ -629,7 +713,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const if (!obj->delete_me) { if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); } } } @@ -645,9 +729,11 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const Evas_Event_Mouse_Out ev2; Evas_Event_Mouse_In ev3; Evas_Object *obj; + int event_id = 0, event_id2 = 0; _evas_object_event_new(); + event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.cur.output.x = e->pointer.x; ev.cur.output.y = e->pointer.y; @@ -661,7 +747,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; ev2.buttons = e->pointer.button; ev2.output.x = e->pointer.x; @@ -672,7 +758,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const ev2.modifiers = &(e->modifiers); ev2.locks = &(e->locks); ev2.timestamp = timestamp; - ev2.event_flags = EVAS_EVENT_FLAG_NONE; + ev2.event_flags = e->default_event_flags; ev3.buttons = e->pointer.button; ev3.output.x = e->pointer.x; @@ -683,7 +769,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const ev3.modifiers = &(e->modifiers); ev3.locks = &(e->locks); ev3.timestamp = timestamp; - ev3.event_flags = EVAS_EVENT_FLAG_NONE; + ev3.event_flags = e->default_event_flags; /* get all new in objects */ ins = evas_event_objects_event_list(e, NULL, x, y); @@ -711,7 +797,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const ev.cur.canvas.x = e->pointer.x; ev.cur.canvas.y = e->pointer.y; _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); } } /* otherwise it has left the object */ @@ -724,7 +810,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const ev2.canvas.y = e->pointer.y; _evas_event_havemap_adjust(obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed); if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev2); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id); } } if (e->delete_me) break; @@ -733,6 +819,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const _evas_object_event_new(); + event_id2 = _evas_event_counter; if (copy) copy = eina_list_free(copy); /* go thru our current list of ins */ EINA_LIST_FOREACH(ins, l, obj) @@ -747,7 +834,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const { obj->mouse_in = 1; if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev3); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2); } } if (e->delete_me) break; @@ -766,6 +853,160 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const } _evas_post_event_callback_call(e); } + _evas_unwalk(e); + return; +nogrep: + { + Eina_List *ins = NULL; + Eina_List *newin = NULL; + Eina_List *l, *copy, *lst = NULL; + Evas_Event_Mouse_Move ev; + Evas_Event_Mouse_Out ev2; + Evas_Event_Mouse_In ev3; + Evas_Object *obj, *below_obj; + int event_id = 0, event_id2 = 0; + int norep = 0, breaknext = 0; + + _evas_object_event_new(); + + event_id = _evas_event_counter; + ev.buttons = e->pointer.button; + ev.cur.output.x = e->pointer.x; + ev.cur.output.y = e->pointer.y; + ev.cur.canvas.x = e->pointer.x; + ev.cur.canvas.y = e->pointer.y; + ev.prev.output.x = px; + ev.prev.output.y = py; + ev.prev.canvas.x = px; + ev.prev.canvas.y = py; + ev.data = (void *)data; + ev.modifiers = &(e->modifiers); + ev.locks = &(e->locks); + ev.timestamp = timestamp; + ev.event_flags = e->default_event_flags; + + ev2.buttons = e->pointer.button; + ev2.output.x = e->pointer.x; + ev2.output.y = e->pointer.y; + ev2.canvas.x = e->pointer.x; + ev2.canvas.y = e->pointer.y; + ev2.data = (void *)data; + ev2.modifiers = &(e->modifiers); + ev2.locks = &(e->locks); + ev2.timestamp = timestamp; + ev2.event_flags = e->default_event_flags; + + ev3.buttons = e->pointer.button; + ev3.output.x = e->pointer.x; + ev3.output.y = e->pointer.y; + ev3.canvas.x = e->pointer.x; + ev3.canvas.y = e->pointer.y; + ev3.data = (void *)data; + ev3.modifiers = &(e->modifiers); + ev3.locks = &(e->locks); + ev3.timestamp = timestamp; + ev3.event_flags = e->default_event_flags; + + /* go thru old list of in objects */ + copy = evas_event_list_copy(e->pointer.object.in); + EINA_LIST_FOREACH(copy, l, obj) + { + if (breaknext) + { + lst = l; + break; + } + if (obj == nogrep_obj) breaknext = 1; + } + + /* get all new in objects */ + below_obj = evas_object_below_get(nogrep_obj); + if (below_obj) + ins = _evas_event_object_list_raw_in_get(e, NULL, + EINA_INLIST_GET(below_obj), NULL, + e->pointer.x, e->pointer.y, + &norep); + EINA_LIST_FOREACH(copy, l, obj) + { + newin = eina_list_append(newin, obj); + if (obj == nogrep_obj) break; + } + EINA_LIST_FOREACH(ins, l, obj) + { + newin = eina_list_append(newin, obj); + } + + EINA_LIST_FOREACH(lst, l, obj) + { + /* if its under the pointer and its visible and its in the new */ + /* in list */ + // FIXME: i don't think we need this + // evas_object_clip_recalc(obj); + if ((e->events_frozen <= 0) && + evas_object_is_in_output_rect(obj, x, y, 1, 1) && + (evas_object_clippers_is_visible(obj) || + obj->mouse_grabbed) && + eina_list_data_find(newin, obj) && + (!evas_event_passes_through(obj)) && + (!evas_event_freezes_through(obj)) && + (!obj->clip.clipees) && + ((!obj->precise_is_inside) || evas_object_is_inside(obj, x, y)) + ) + { + if ((px != x) || (py != y)) + { + ev.cur.canvas.x = e->pointer.x; + ev.cur.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); + } + } + /* otherwise it has left the object */ + else + { + if (obj->mouse_in) + { + obj->mouse_in = 0; + ev2.canvas.x = e->pointer.x; + ev2.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed); + if (e->events_frozen <= 0) + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id); + } + } + if (e->delete_me) break; + } + _evas_post_event_callback_call(e); + + _evas_object_event_new(); + + event_id2 = _evas_event_counter; + if (copy) copy = eina_list_free(copy); + /* go thru our current list of ins */ + EINA_LIST_FOREACH(newin, l, obj) + { + ev3.canvas.x = e->pointer.x; + ev3.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj, &ev3.canvas.x, &ev3.canvas.y, obj->mouse_grabbed); + /* if its not in the old list of ins send an enter event */ + if (!eina_list_data_find(e->pointer.object.in, obj)) + { + if (!obj->mouse_in) + { + obj->mouse_in = 1; + if (e->events_frozen <= 0) + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2); + } + } + if (e->delete_me) break; + } + /* free our old list of ins */ + eina_list_free(e->pointer.object.in); + /* and set up the new one */ + e->pointer.object.in = newin; + + _evas_post_event_callback_call(e); + } _evas_unwalk(e); } @@ -776,6 +1017,7 @@ evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data) Eina_List *l; Evas_Event_Mouse_In ev; Evas_Object *obj; + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; @@ -789,6 +1031,7 @@ evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data) _evas_object_event_new(); + event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; @@ -798,7 +1041,7 @@ evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data) ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; _evas_walk(e); /* get new list of ins */ @@ -814,7 +1057,7 @@ evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data) { obj->mouse_in = 1; if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev, event_id); } } if (e->delete_me) break; @@ -832,6 +1075,7 @@ EAPI void evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data) { Evas_Event_Mouse_Out ev; + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; @@ -843,6 +1087,7 @@ evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data) _evas_object_event_new(); + event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; @@ -852,11 +1097,10 @@ evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data) ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; _evas_walk(e); - /* if our mouse button is grabbed to any objects */ - if (e->pointer.mouse_grabbed == 0) + /* if our mouse button is inside any objects */ { /* go thru old list of in objects */ Eina_List *l, *copy; @@ -874,14 +1118,16 @@ evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data) if (!obj->delete_me) { if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); } + obj->mouse_grabbed = 0; } if (e->delete_me) break; } if (copy) copy = eina_list_free(copy); /* free our old list of ins */ e->pointer.object.in = eina_list_free(e->pointer.object.in); + e->pointer.mouse_grabbed = 0; _evas_post_event_callback_call(e); } _evas_unwalk(e); @@ -899,16 +1145,20 @@ evas_event_feed_multi_down(Evas *e, Eina_List *l, *copy; Evas_Event_Multi_Down ev; Evas_Object *obj; + int addgrab = 0; + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); + e->pointer.downs++; if (e->events_frozen > 0) return; e->last_timestamp = timestamp; _evas_object_event_new(); + event_id = _evas_event_counter; ev.device = d; ev.output.x = x; ev.output.y = y; @@ -926,18 +1176,22 @@ evas_event_feed_multi_down(Evas *e, ev.locks = &(e->locks); ev.flags = flags; ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; _evas_walk(e); /* append new touch point to the touch point list */ _evas_touch_point_append(e, d, x, y); + if (e->pointer.mouse_grabbed == 0) + { + if (e->pointer.downs > 1) addgrab = e->pointer.downs - 1; + } copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) { - obj->mouse_grabbed++; - e->pointer.mouse_grabbed++; + obj->mouse_grabbed += addgrab + 1; + e->pointer.mouse_grabbed += addgrab + 1; } } EINA_LIST_FOREACH(copy, l, obj) @@ -952,7 +1206,7 @@ evas_event_feed_multi_down(Evas *e, if (y != ev.canvas.y) ev.canvas.ysub = ev.canvas.y; // fixme - lost precision if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_DOWN, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_DOWN, &ev, event_id); if (e->delete_me) break; } if (copy) eina_list_free(copy); @@ -974,16 +1228,19 @@ evas_event_feed_multi_up(Evas *e, Eina_List *l, *copy; Evas_Event_Multi_Up ev; Evas_Object *obj; + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); + e->pointer.downs--; if (e->events_frozen > 0) return; e->last_timestamp = timestamp; _evas_object_event_new(); + event_id = _evas_event_counter; ev.device = d; ev.output.x = x; ev.output.y = y; @@ -1001,7 +1258,7 @@ evas_event_feed_multi_up(Evas *e, ev.locks = &(e->locks); ev.flags = flags; ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; _evas_walk(e); /* update released touch point */ @@ -1025,7 +1282,7 @@ evas_event_feed_multi_up(Evas *e, e->pointer.mouse_grabbed--; } if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_UP, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_UP, &ev, event_id); if (e->delete_me) break; } if (copy) copy = eina_list_free(copy); @@ -1051,7 +1308,7 @@ evas_event_feed_multi_move(Evas *e, if (e->events_frozen > 0) return; e->last_timestamp = timestamp; - if (!e->pointer.inside) return; + if ((!e->pointer.inside) && (e->pointer.mouse_grabbed == 0)) return; _evas_walk(e); /* update moved touch point */ @@ -1063,9 +1320,11 @@ evas_event_feed_multi_move(Evas *e, Eina_List *l, *copy; Evas_Event_Multi_Move ev; Evas_Object *obj; + int event_id = 0; _evas_object_event_new(); + event_id = _evas_event_counter; ev.device = d; ev.cur.output.x = x; ev.cur.output.y = y; @@ -1082,7 +1341,7 @@ evas_event_feed_multi_move(Evas *e, ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) @@ -1102,7 +1361,7 @@ evas_event_feed_multi_move(Evas *e, ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision if (y != ev.cur.canvas.y) ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision - evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id); } if (e->delete_me) break; } @@ -1114,9 +1373,11 @@ evas_event_feed_multi_move(Evas *e, Eina_List *l, *copy; Evas_Event_Multi_Move ev; Evas_Object *obj; + int event_id = 0; _evas_object_event_new(); + event_id = _evas_event_counter; ev.device = d; ev.cur.output.x = x; ev.cur.output.y = y; @@ -1133,7 +1394,7 @@ evas_event_feed_multi_move(Evas *e, ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; /* get all new in objects */ ins = evas_event_objects_event_list(e, NULL, x, y); @@ -1165,7 +1426,7 @@ evas_event_feed_multi_move(Evas *e, ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision if (y != ev.cur.canvas.y) ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision - evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id); } if (e->delete_me) break; } @@ -1190,6 +1451,7 @@ evas_event_feed_multi_move(Evas *e, EAPI void evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) { + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); @@ -1204,6 +1466,7 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch _evas_object_event_new(); + event_id = _evas_event_counter; exclusive = EINA_FALSE; ev.keyname = (char *)keyname; ev.data = (void *)data; @@ -1213,7 +1476,7 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch ev.string = string; ev.compose = compose; ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; if (e->grabs) { @@ -1239,7 +1502,7 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch !evas_event_freezes_through(g->object)) evas_object_event_callback_call(g->object, EVAS_CALLBACK_KEY_DOWN, - &ev); + &ev, event_id); if (g->exclusive) exclusive = EINA_TRUE; } } @@ -1266,7 +1529,7 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch { if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused)) evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_DOWN, - &ev); + &ev, event_id); } _evas_post_event_callback_call(e); _evas_unwalk(e); @@ -1275,6 +1538,7 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch EAPI void evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) { + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); @@ -1288,6 +1552,7 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char _evas_object_event_new(); + event_id = _evas_event_counter; exclusive = EINA_FALSE; ev.keyname = (char *)keyname; ev.data = (void *)data; @@ -1297,7 +1562,7 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char ev.string = string; ev.compose = compose; ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; if (e->grabs) { @@ -1322,7 +1587,7 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char if (e->events_frozen <= 0 && !evas_event_freezes_through(g->object)) evas_object_event_callback_call(g->object, - EVAS_CALLBACK_KEY_UP, &ev); + EVAS_CALLBACK_KEY_UP, &ev, event_id); if (g->exclusive) exclusive = EINA_TRUE; } if (e->delete_me) break; @@ -1349,7 +1614,7 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char { if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused)) evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_UP, - &ev); + &ev, event_id); } _evas_post_event_callback_call(e); _evas_unwalk(e); @@ -1361,6 +1626,7 @@ evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data Eina_List *l, *copy; Evas_Event_Hold ev; Evas_Object *obj; + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; @@ -1371,17 +1637,18 @@ evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data _evas_object_event_new(); + event_id = _evas_event_counter; ev.hold = hold; ev.data = (void *)data; ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; _evas_walk(e); copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { if ((e->events_frozen <= 0) && !evas_event_freezes_through(obj)) - evas_object_event_callback_call(obj, EVAS_CALLBACK_HOLD, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_HOLD, &ev, event_id); if (e->delete_me) break; } if (copy) copy = eina_list_free(copy); @@ -1528,75 +1795,84 @@ evas_object_pointer_mode_get(const Evas_Object *obj) EAPI void evas_event_refeed_event(Evas *e, void *event_copy, Evas_Callback_Type event_type) { - switch(event_type) + switch (event_type) { case EVAS_CALLBACK_MOUSE_IN: - { - Evas_Event_Mouse_In *ev = event_copy; - evas_event_feed_mouse_in(e, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Mouse_In *ev = event_copy; + evas_event_feed_mouse_in(e, ev->timestamp, ev->data); + break; + } case EVAS_CALLBACK_MOUSE_OUT: - { - Evas_Event_Mouse_Out *ev = event_copy; - evas_event_feed_mouse_out(e, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Mouse_Out *ev = event_copy; + evas_event_feed_mouse_out(e, ev->timestamp, ev->data); + break; + } case EVAS_CALLBACK_MOUSE_DOWN: - { - Evas_Event_Mouse_Down *ev = event_copy; - evas_event_feed_mouse_down(e, ev->button, ev->flags, ev-> timestamp, ev->data); - break; - } + { + Evas_Event_Mouse_Down *ev = event_copy; + evas_event_feed_mouse_down(e, ev->button, ev->flags, ev-> timestamp, ev->data); + break; + } case EVAS_CALLBACK_MOUSE_UP: - { - Evas_Event_Mouse_Up *ev = event_copy; - evas_event_feed_mouse_up(e, ev->button, ev->flags, ev-> timestamp, ev->data); - break; - } + { + Evas_Event_Mouse_Up *ev = event_copy; + evas_event_feed_mouse_up(e, ev->button, ev->flags, ev-> timestamp, ev->data); + break; + } case EVAS_CALLBACK_MOUSE_MOVE: - { - Evas_Event_Mouse_Move *ev = event_copy; - evas_event_feed_mouse_move(e, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Mouse_Move *ev = event_copy; + evas_event_feed_mouse_move(e, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp, ev->data); + break; + } case EVAS_CALLBACK_MOUSE_WHEEL: - { - Evas_Event_Mouse_Wheel *ev = event_copy; - evas_event_feed_mouse_wheel(e, ev->direction, ev-> z, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Mouse_Wheel *ev = event_copy; + evas_event_feed_mouse_wheel(e, ev->direction, ev-> z, ev->timestamp, ev->data); + break; + } case EVAS_CALLBACK_MULTI_DOWN: - { - Evas_Event_Multi_Down *ev = event_copy; - evas_event_feed_multi_down(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Multi_Down *ev = event_copy; + evas_event_feed_multi_down(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data); + break; + } case EVAS_CALLBACK_MULTI_UP: - { - Evas_Event_Multi_Up *ev = event_copy; - evas_event_feed_multi_up(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Multi_Up *ev = event_copy; + evas_event_feed_multi_up(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data); + break; + } case EVAS_CALLBACK_MULTI_MOVE: - { - Evas_Event_Multi_Move *ev = event_copy; - evas_event_feed_multi_move(e, ev->device, ev->cur.canvas.x, ev->cur.canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->cur.canvas.xsub, ev->cur.canvas.ysub, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Multi_Move *ev = event_copy; + evas_event_feed_multi_move(e, ev->device, ev->cur.canvas.x, ev->cur.canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->cur.canvas.xsub, ev->cur.canvas.ysub, ev->timestamp, ev->data); + break; + } case EVAS_CALLBACK_KEY_DOWN: - { - Evas_Event_Key_Down *ev = event_copy; - evas_event_feed_key_down(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Key_Down *ev = event_copy; + evas_event_feed_key_down(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data); + break; + } case EVAS_CALLBACK_KEY_UP: - { - Evas_Event_Key_Up *ev = event_copy; - evas_event_feed_key_up(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Key_Up *ev = event_copy; + evas_event_feed_key_up(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data); + break; + } default: /* All non-input events are not handeled */ - break; + break; } } + +EAPI int +evas_event_down_count_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return 0; + MAGIC_CHECK_END(); + return e->pointer.downs; +} diff --git a/libraries/evas/src/lib/canvas/evas_focus.c b/libraries/evas/src/lib/canvas/evas_focus.c index a1a3bca..29da7e7 100644 --- a/libraries/evas/src/lib/canvas/evas_focus.c +++ b/libraries/evas/src/lib/canvas/evas_focus.c @@ -10,29 +10,31 @@ EAPI void evas_object_focus_set(Evas_Object *obj, Eina_Bool focus) { + int event_id = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); _evas_object_event_new(); + event_id = _evas_event_counter; if (focus) { - if (obj->focused) goto end; - if (obj->layer->evas->focused) - evas_object_focus_set(obj->layer->evas->focused, 0); - obj->focused = 1; - obj->layer->evas->focused = obj; - evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_IN, NULL); + if (obj->focused) goto end; + if (obj->layer->evas->focused) + evas_object_focus_set(obj->layer->evas->focused, 0); + obj->focused = 1; + obj->layer->evas->focused = obj; + evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_IN, NULL, event_id); evas_event_callback_call(obj->layer->evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, obj); } else { - if (!obj->focused) goto end; - obj->focused = 0; - obj->layer->evas->focused = NULL; - evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL); + if (!obj->focused) goto end; + obj->focused = 0; + obj->layer->evas->focused = NULL; + evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL, event_id); evas_event_callback_call(obj->layer->evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, obj); } diff --git a/libraries/evas/src/lib/canvas/evas_gl.c b/libraries/evas/src/lib/canvas/evas_gl.c index 47bb583..85ed851 100644 --- a/libraries/evas/src/lib/canvas/evas_gl.c +++ b/libraries/evas/src/lib/canvas/evas_gl.c @@ -37,6 +37,13 @@ evas_gl_new(Evas *e) evas_gl->magic = MAGIC_EVAS_GL; evas_gl->evas = e; + if (!evas_gl->evas->engine.func->gl_context_create) + { + ERR("GL engine not available\n"); + free(evas_gl); + return NULL; + } + return evas_gl; } @@ -60,6 +67,24 @@ evas_gl_free(Evas_GL *evas_gl) free(evas_gl); } +EAPI Evas_GL_Config * +evas_gl_config_new() +{ + Evas_GL_Config *cfg; + + cfg = calloc(1, sizeof(Evas_GL_Config)); + + if (!cfg) return NULL; + + return cfg; +} + +EAPI void +evas_gl_config_free(Evas_GL_Config *cfg) +{ + if (cfg) free(cfg); +} + EAPI Evas_GL_Surface * evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *config, int width, int height) { @@ -77,6 +102,8 @@ evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *config, int width, int surf = calloc(1, sizeof(Evas_GL_Surface)); + if (!surf) return NULL; + surf->data = evas_gl->evas->engine.func->gl_surface_create(evas_gl->evas->engine.data.output, config, width, height); if (!surf->data) diff --git a/libraries/evas/src/lib/canvas/evas_main.c b/libraries/evas/src/lib/canvas/evas_main.c index 0a37b2c..687744f 100644 --- a/libraries/evas/src/lib/canvas/evas_main.c +++ b/libraries/evas/src/lib/canvas/evas_main.c @@ -118,12 +118,16 @@ evas_new(void) e->output.render_method = RENDER_METHOD_INVALID; e->viewport.w = 1; e->viewport.h = 1; + e->framespace.x = 0; + e->framespace.y = 0; + e->framespace.w = 0; + e->framespace.h = 0; e->hinting = EVAS_FONT_HINTING_BYTECODE; e->name_hash = eina_hash_string_superfast_new(NULL); eina_clist_init(&e->calc_list); eina_clist_init(&e->calc_done); -#define EVAS_ARRAY_SET(E, Array) \ +#define EVAS_ARRAY_SET(E, Array) \ eina_array_step_set(&E->Array, sizeof (E->Array), 4096); EVAS_ARRAY_SET(e, delete_objects); @@ -408,6 +412,41 @@ evas_output_viewport_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord if (h) *h = e->viewport.h; } +EAPI void +evas_output_framespace_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if ((x == e->framespace.x) && (y == e->framespace.y) && + (w == e->framespace.w) && (h == e->framespace.h)) return; + e->framespace.x = x; + e->framespace.y = y; + e->framespace.w = w; + e->framespace.h = h; + e->framespace.changed = 1; + e->output_validity++; + e->changed = 1; +} + +EAPI void +evas_output_framespace_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + if (x) *x = 0; + if (y) *y = 0; + if (w) *w = 0; + if (h) *h = 0; + return; + MAGIC_CHECK_END(); + + if (x) *x = e->framespace.x; + if (y) *y = e->framespace.y; + if (w) *w = e->framespace.w; + if (h) *h = e->framespace.h; +} + EAPI Evas_Coord evas_coord_screen_x_to_world(const Evas *e, int x) { diff --git a/libraries/evas/src/lib/canvas/evas_map.c b/libraries/evas/src/lib/canvas/evas_map.c index fca8b3a..2359d5a 100644 --- a/libraries/evas/src/lib/canvas/evas_map.c +++ b/libraries/evas/src/lib/canvas/evas_map.c @@ -81,17 +81,19 @@ _evas_map_calc_map_geometry(Evas_Object *obj) p = obj->cur.map->points; p_end = p + obj->cur.map->count; - x1 = lround(p->x); - x2 = lround(p->x); - y1 = lround(p->y); - y2 = lround(p->y); + x1 = x2 = lround(p->x); + y1 = y2 = lround(p->y); p++; for (; p < p_end; p++) { - if (p->x < x1) x1 = p->x; - if (p->x > x2) x2 = p->x; - if (p->y < y1) y1 = p->y; - if (p->y > y2) y2 = p->y; + Evas_Coord x, y; + + x = lround(p->x); + y = lround(p->y); + if (x < x1) x1 = x; + if (x > x2) x2 = x; + if (y < y1) y1 = y; + if (y > y2) y2 = y; } // this causes clip-out bugs now mapped objs canbe opaque!!! // // add 1 pixel of fuzz around the map region to ensure updates are correct diff --git a/libraries/evas/src/lib/canvas/evas_name.c b/libraries/evas/src/lib/canvas/evas_name.c index c42f941..1a9d20f 100644 --- a/libraries/evas/src/lib/canvas/evas_name.c +++ b/libraries/evas/src/lib/canvas/evas_name.c @@ -38,3 +38,35 @@ evas_object_name_find(const Evas *e, const char *name) if (!name) return NULL; return (Evas_Object *)eina_hash_find(e->name_hash, name); } + +static Evas_Object * +_evas_object_name_child_find(const Evas_Object *obj, const char *name, int recurse) +{ + const Eina_Inlist *lst; + Evas_Object *child; + + if (!obj->smart.smart) return NULL; + lst = evas_object_smart_members_get_direct(obj); + EINA_INLIST_FOREACH(lst, child) + { + if (child->delete_me) continue; + if (!child->name) continue; + if (!strcmp(name, child->name)) return child; + if (recurse != 0) + { + if ((obj = _evas_object_name_child_find(child, name, recurse - 1))) + return (Evas_Object *)obj; + } + } + return NULL; +} + +EAPI Evas_Object * +evas_object_name_child_find(const Evas_Object *obj, const char *name, int recurse) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (!name) return NULL; + return _evas_object_name_child_find(obj, name, recurse); +} diff --git a/libraries/evas/src/lib/canvas/evas_object_box.c b/libraries/evas/src/lib/canvas/evas_object_box.c index ab2f222..228d37c 100644 --- a/libraries/evas/src/lib/canvas/evas_object_box.c +++ b/libraries/evas/src/lib/canvas/evas_object_box.c @@ -1363,7 +1363,7 @@ _evas_object_box_layout_flow_horizontal_row_info_collect(Evas_Object_Box_Data *p EAPI void evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) { - int n_children, v_justify; + int n_children; int r, row_count = 0; int min_w = 0, min_h = 0; int max_h, inc_y; @@ -1398,7 +1398,6 @@ evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *pri (priv, w, &row_count, row_max_h, row_break, row_width, &offset_y, &max_h); inc_y = 0; - v_justify = 0; remain_y = h - (offset_y + max_h); if (remain_y > 0) diff --git a/libraries/evas/src/lib/canvas/evas_object_grid.c b/libraries/evas/src/lib/canvas/evas_object_grid.c index ac96f04..db0f43d 100644 --- a/libraries/evas/src/lib/canvas/evas_object_grid.c +++ b/libraries/evas/src/lib/canvas/evas_object_grid.c @@ -1,5 +1,5 @@ -#include #include "evas_common.h" +#include typedef struct _Evas_Object_Grid_Data Evas_Object_Grid_Data; typedef struct _Evas_Object_Grid_Option Evas_Object_Grid_Option; diff --git a/libraries/evas/src/lib/canvas/evas_object_image.c b/libraries/evas/src/lib/canvas/evas_object_image.c index 7f757a6..d9f6378 100644 --- a/libraries/evas/src/lib/canvas/evas_object_image.c +++ b/libraries/evas/src/lib/canvas/evas_object_image.c @@ -1,7 +1,13 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" /* so that EAPI in Evas.h is correctly defined */ +#endif + #include #include #include -#include +#ifdef HAVE_SYS_MMAN_H +# include +#endif #include #include "evas_common.h" @@ -192,8 +198,9 @@ evas_object_image_filled_add(Evas *e) static void _cleanup_tmpf(Evas_Object *obj) { +#ifdef HAVE_SYS_MMAN_H Evas_Object_Image *o; - + o = (Evas_Object_Image *)(obj->object_data); if (!o->tmpf) return; #ifdef __linux__ @@ -204,11 +211,15 @@ _cleanup_tmpf(Evas_Object *obj) eina_stringshare_del(o->tmpf); o->tmpf_fd = -1; o->tmpf = NULL; +#else + (void) obj; +#endif } static void _create_tmpf(Evas_Object *obj, void *data, int size, char *format __UNUSED__) { +#ifdef HAVE_SYS_MMAN_H Evas_Object_Image *o; char buf[4096]; void *dst; @@ -253,6 +264,12 @@ _create_tmpf(Evas_Object *obj, void *data, int size, char *format __UNUSED__) o->tmpf = eina_stringshare_add(buf); memcpy(dst, data, size); munmap(dst, size); +#else + (void) obj; + (void) data; + (void) size; + (void) format; +#endif } EAPI void @@ -1917,6 +1934,24 @@ evas_object_image_content_hint_get(const Evas_Object *obj) return o->content_hint; } +EAPI Eina_Bool +evas_object_image_region_support_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *) (obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return EINA_FALSE; + MAGIC_CHECK_END(); + + return obj->layer->evas->engine.func->image_can_region_get( + obj->layer->evas->engine.data.output, + o->engine_data); +} + /* animated feature */ EAPI Eina_Bool evas_object_image_animated_get(const Evas_Object *obj) @@ -3770,8 +3805,7 @@ evas_object_image_data_convert_internal(Evas_Object_Image *o, void *data, Evas_C to_cspace); break; case EVAS_COLORSPACE_YCBCR422601_PL: - fprintf(stderr, "EVAS_COLORSPACE_YCBCR422601_PL:\n"); - out = evas_common_convert_yuv_422_601_to(data, + out = evas_common_convert_yuv_422_601_to(data, o->cur.image.w, o->cur.image.h, to_cspace); @@ -3795,7 +3829,7 @@ evas_object_image_data_convert_internal(Evas_Object_Image *o, void *data, Evas_C to_cspace); break; default: - fprintf(stderr, "unknow colorspace: %i\n", o->cur.cspace); + WRN("unknow colorspace: %i\n", o->cur.cspace); break; } @@ -3806,9 +3840,7 @@ static void evas_object_image_filled_resize_listener(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *einfo __UNUSED__) { Evas_Coord w, h; - Evas_Object_Image *o; - o = obj->object_data; evas_object_geometry_get(obj, NULL, NULL, &w, &h); evas_object_image_fill_set(obj, 0, 0, w, h); } diff --git a/libraries/evas/src/lib/canvas/evas_object_inform.c b/libraries/evas/src/lib/canvas/evas_object_inform.c index bc09eb9..302da42 100644 --- a/libraries/evas/src/lib/canvas/evas_object_inform.c +++ b/libraries/evas/src/lib/canvas/evas_object_inform.c @@ -8,7 +8,7 @@ evas_object_inform_call_show(Evas_Object *obj) { _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_SHOW, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_SHOW, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } @@ -17,7 +17,7 @@ evas_object_inform_call_hide(Evas_Object *obj) { _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_HIDE, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_HIDE, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } @@ -26,7 +26,7 @@ evas_object_inform_call_move(Evas_Object *obj) { _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOVE, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOVE, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } @@ -35,7 +35,7 @@ evas_object_inform_call_resize(Evas_Object *obj) { _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_RESIZE, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_RESIZE, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } @@ -44,7 +44,7 @@ evas_object_inform_call_restack(Evas_Object *obj) { _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_RESTACK, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_RESTACK, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } @@ -53,7 +53,7 @@ evas_object_inform_call_changed_size_hints(Evas_Object *obj) { _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } @@ -65,7 +65,7 @@ evas_object_inform_call_image_preloaded(Evas_Object *obj) _evas_object_image_preloading_set(obj, 0); _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_PRELOADED, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_PRELOADED, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } @@ -74,6 +74,6 @@ evas_object_inform_call_image_unloaded(Evas_Object *obj) { _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_UNLOADED, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_UNLOADED, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } diff --git a/libraries/evas/src/lib/canvas/evas_object_intercept.c b/libraries/evas/src/lib/canvas/evas_object_intercept.c index c3e5e24..54f7265 100644 --- a/libraries/evas/src/lib/canvas/evas_object_intercept.c +++ b/libraries/evas/src/lib/canvas/evas_object_intercept.c @@ -9,7 +9,6 @@ static void evas_object_intercept_deinit(Evas_Object *obj); static void evas_object_intercept_init(Evas_Object *obj) { - /* MEM OK */ if (!obj->interceptors) obj->interceptors = evas_mem_calloc(sizeof(Evas_Intercept_Func)); } @@ -17,7 +16,6 @@ evas_object_intercept_init(Evas_Object *obj) static void evas_object_intercept_deinit(Evas_Object *obj) { - /* MEM OK */ if (!obj->interceptors) return; if ((obj->interceptors->show.func) || (obj->interceptors->hide.func) || @@ -41,199 +39,186 @@ evas_object_intercept_deinit(Evas_Object *obj) void evas_object_intercept_cleanup(Evas_Object *obj) { - /* MEM OK */ if (obj->interceptors) free(obj->interceptors); } int evas_object_intercept_call_show(Evas_Object *obj) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->show.func); - if (obj->interceptors->show.func) + if (ret) obj->interceptors->show.func(obj->interceptors->show.data, obj); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_hide(Evas_Object *obj) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->hide.func); - if (obj->interceptors->hide.func) + if (ret) obj->interceptors->hide.func(obj->interceptors->hide.data, obj); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->move.func); - if (obj->interceptors->move.func) + if (ret) obj->interceptors->move.func(obj->interceptors->move.data, obj, x, y); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->resize.func); - if (obj->interceptors->resize.func) + if (ret) obj->interceptors->resize.func(obj->interceptors->resize.data, obj, w, h); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_raise(Evas_Object *obj) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->raise.func); - if (obj->interceptors->raise.func) + if (ret) obj->interceptors->raise.func(obj->interceptors->raise.data, obj); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_lower(Evas_Object *obj) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->lower.func); - if (obj->interceptors->lower.func) + if (ret) obj->interceptors->lower.func(obj->interceptors->lower.data, obj); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->stack_above.func); - if (obj->interceptors->stack_above.func) + if (ret) obj->interceptors->stack_above.func(obj->interceptors->stack_above.data, obj, above); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->stack_below.func); - if (obj->interceptors->stack_below.func) + if (ret) obj->interceptors->stack_below.func(obj->interceptors->stack_below.data, obj, below); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_layer_set(Evas_Object *obj, int l) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->layer_set.func); - if (obj->interceptors->layer_set.func) + if (ret) obj->interceptors->layer_set.func(obj->interceptors->layer_set.data, obj, l); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->color_set.func); - if (obj->interceptors->color_set.func) + if (ret) obj->interceptors->color_set.func(obj->interceptors->color_set.data, obj, r, g, b, a); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->clip_set.func); - if (obj->interceptors->clip_set.func) + if (ret) obj->interceptors->clip_set.func(obj->interceptors->clip_set.data, obj, clip); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_clip_unset(Evas_Object *obj) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->clip_unset.func); - if (obj->interceptors->clip_unset.func) + if (ret) obj->interceptors->clip_unset.func(obj->interceptors->clip_unset.data, obj); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } @@ -242,8 +227,6 @@ evas_object_intercept_call_clip_unset(Evas_Object *obj) EAPI void evas_object_intercept_show_callback_add(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func, const void *data) { - /* MEM OK */ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -257,7 +240,6 @@ evas_object_intercept_show_callback_add(Evas_Object *obj, Evas_Object_Intercept_ EAPI void * evas_object_intercept_show_callback_del(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -275,7 +257,6 @@ evas_object_intercept_show_callback_del(Evas_Object *obj, Evas_Object_Intercept_ EAPI void evas_object_intercept_hide_callback_add(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -289,7 +270,6 @@ evas_object_intercept_hide_callback_add(Evas_Object *obj, Evas_Object_Intercept_ EAPI void * evas_object_intercept_hide_callback_del(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -307,7 +287,6 @@ evas_object_intercept_hide_callback_del(Evas_Object *obj, Evas_Object_Intercept_ EAPI void evas_object_intercept_move_callback_add(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -321,7 +300,6 @@ evas_object_intercept_move_callback_add(Evas_Object *obj, Evas_Object_Intercept_ EAPI void * evas_object_intercept_move_callback_del(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -339,7 +317,6 @@ evas_object_intercept_move_callback_del(Evas_Object *obj, Evas_Object_Intercept_ EAPI void evas_object_intercept_resize_callback_add(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -353,7 +330,6 @@ evas_object_intercept_resize_callback_add(Evas_Object *obj, Evas_Object_Intercep EAPI void * evas_object_intercept_resize_callback_del(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -371,7 +347,6 @@ evas_object_intercept_resize_callback_del(Evas_Object *obj, Evas_Object_Intercep EAPI void evas_object_intercept_raise_callback_add(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -385,7 +360,6 @@ evas_object_intercept_raise_callback_add(Evas_Object *obj, Evas_Object_Intercept EAPI void * evas_object_intercept_raise_callback_del(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -403,7 +377,6 @@ evas_object_intercept_raise_callback_del(Evas_Object *obj, Evas_Object_Intercept EAPI void evas_object_intercept_lower_callback_add(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -417,7 +390,6 @@ evas_object_intercept_lower_callback_add(Evas_Object *obj, Evas_Object_Intercept EAPI void * evas_object_intercept_lower_callback_del(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -435,7 +407,6 @@ evas_object_intercept_lower_callback_del(Evas_Object *obj, Evas_Object_Intercept EAPI void evas_object_intercept_stack_above_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -449,7 +420,6 @@ evas_object_intercept_stack_above_callback_add(Evas_Object *obj, Evas_Object_Int EAPI void * evas_object_intercept_stack_above_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -467,7 +437,6 @@ evas_object_intercept_stack_above_callback_del(Evas_Object *obj, Evas_Object_Int EAPI void evas_object_intercept_stack_below_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -481,7 +450,6 @@ evas_object_intercept_stack_below_callback_add(Evas_Object *obj, Evas_Object_Int EAPI void * evas_object_intercept_stack_below_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -499,7 +467,6 @@ evas_object_intercept_stack_below_callback_del(Evas_Object *obj, Evas_Object_Int EAPI void evas_object_intercept_layer_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -513,7 +480,6 @@ evas_object_intercept_layer_set_callback_add(Evas_Object *obj, Evas_Object_Inter EAPI void * evas_object_intercept_layer_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -531,7 +497,6 @@ evas_object_intercept_layer_set_callback_del(Evas_Object *obj, Evas_Object_Inter EAPI void evas_object_intercept_color_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -545,7 +510,6 @@ evas_object_intercept_color_set_callback_add(Evas_Object *obj, Evas_Object_Inter EAPI void * evas_object_intercept_color_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -563,7 +527,6 @@ evas_object_intercept_color_set_callback_del(Evas_Object *obj, Evas_Object_Inter EAPI void evas_object_intercept_clip_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -577,7 +540,6 @@ evas_object_intercept_clip_set_callback_add(Evas_Object *obj, Evas_Object_Interc EAPI void * evas_object_intercept_clip_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -595,7 +557,6 @@ evas_object_intercept_clip_set_callback_del(Evas_Object *obj, Evas_Object_Interc EAPI void evas_object_intercept_clip_unset_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -609,7 +570,6 @@ evas_object_intercept_clip_unset_callback_add(Evas_Object *obj, Evas_Object_Inte EAPI void * evas_object_intercept_clip_unset_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); diff --git a/libraries/evas/src/lib/canvas/evas_object_main.c b/libraries/evas/src/lib/canvas/evas_object_main.c index 3eaded9..86ab498 100644 --- a/libraries/evas/src/lib/canvas/evas_object_main.c +++ b/libraries/evas/src/lib/canvas/evas_object_main.c @@ -25,6 +25,7 @@ evas_object_new(Evas *e __UNUSED__) obj->magic = MAGIC_OBJ; obj->cur.scale = 1.0; obj->prev.scale = 1.0; + obj->is_frame = EINA_FALSE; return obj; } @@ -99,7 +100,8 @@ evas_object_change(Evas_Object *obj) /* set changed flag on all objects this one clips too */ if (!((movch) && (obj->is_static_clip))) { - EINA_LIST_FOREACH(obj->clip.clipees, l, obj2) evas_object_change(obj2); + EINA_LIST_FOREACH(obj->clip.clipees, l, obj2) + evas_object_change(obj2); } EINA_LIST_FOREACH(obj->proxy.proxies, l, obj2) { @@ -111,8 +113,8 @@ evas_object_change(Evas_Object *obj) void evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v) { - if (obj->smart.smart) return ; - if (is_v == was_v) return ; + if (obj->smart.smart) return; + if (is_v == was_v) return; if (is_v) { evas_add_rect(rects, @@ -134,8 +136,8 @@ evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int i void evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj) { - if (obj->smart.smart) return ; - if (obj->cur.clipper == obj->prev.clipper) return ; + if (obj->smart.smart) return; + if (obj->cur.clipper == obj->prev.clipper) return; if ((obj->cur.clipper) && (obj->prev.clipper)) { /* get difference rects between clippers */ @@ -223,7 +225,8 @@ evas_object_clip_changes_clean(Evas_Object *obj) { Eina_Rectangle *r; - EINA_LIST_FREE(obj->clip.changes, r) eina_rectangle_free(r); + EINA_LIST_FREE(obj->clip.changes, r) + eina_rectangle_free(r); } void @@ -408,11 +411,11 @@ evas_object_del(Evas_Object *obj) obj->focused = 0; obj->layer->evas->focused = NULL; _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_DEL, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_DEL, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); if (obj->mouse_grabbed > 0) obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed; @@ -426,9 +429,6 @@ evas_object_del(Evas_Object *obj) evas_object_free(obj, 1); return; } - obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed; - obj->mouse_grabbed = 0; - obj->mouse_in = 0; evas_object_grabs_cleanup(obj); while (obj->clip.clipees) evas_object_clip_unset(obj->clip.clipees->data); @@ -438,7 +438,7 @@ evas_object_del(Evas_Object *obj) if (obj->smart.smart) evas_object_smart_del(obj); evas_object_map_set(obj, NULL); _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_FREE, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_FREE, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); evas_object_smart_cleanup(obj); obj->delete_me = 1; @@ -449,18 +449,38 @@ EAPI void evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) { int is, was = 0, pass = 0, freeze = 0; + int nx = 0, ny = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; - if (evas_object_intercept_call_move(obj, x, y)) return; + + nx = x; + ny = y; + + if (!obj->is_frame) + { + int fx, fy; + + evas_output_framespace_get(obj->layer->evas, &fx, &fy, NULL, NULL); + if (!obj->smart.parent) + { + nx += fx; + ny += fy; + } + } + + if (evas_object_intercept_call_move(obj, nx, ny)) return; + if (obj->doing.in_move > 0) { WRN("evas_object_move() called on object %p when in the middle of moving the same object", obj); return; } - if ((obj->cur.geometry.x == x) && (obj->cur.geometry.y == y)) return; + + if ((obj->cur.geometry.x == nx) && (obj->cur.geometry.y == ny)) return; + if (obj->layer->evas->events_frozen <= 0) { pass = evas_event_passes_through(obj); @@ -471,13 +491,16 @@ evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) obj->layer->evas->pointer.y, 1, 1); } obj->doing.in_move++; + if (obj->smart.smart) { if (obj->smart.smart->smart_class->move) - obj->smart.smart->smart_class->move(obj, x, y); + obj->smart.smart->smart_class->move(obj, nx, ny); } - obj->cur.geometry.x = x; - obj->cur.geometry.y = y; + + obj->cur.geometry.x = nx; + obj->cur.geometry.y = ny; + //// obj->cur.cache.geometry.validity = 0; obj->changed_move = 1; evas_object_change(obj); @@ -509,19 +532,40 @@ EAPI void evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) { int is, was = 0, pass = 0, freeze =0; + int nw = 0, nh = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; if (w < 0) w = 0; if (h < 0) h = 0; - if (evas_object_intercept_call_resize(obj, w, h)) return; + + nw = w; + nh = h; + if (!obj->is_frame) + { + int fw, fh; + + evas_output_framespace_get(obj->layer->evas, NULL, NULL, &fw, &fh); + if (!obj->smart.parent) + { + nw = w - fw; + nh = h - fh; + if (nw < 0) nw = 0; + if (nh < 0) nh = 0; + } + } + + if (evas_object_intercept_call_resize(obj, nw, nh)) return; + if (obj->doing.in_resize > 0) { WRN("evas_object_resize() called on object %p when in the middle of resizing the same object", obj); return; } - if ((obj->cur.geometry.w == w) && (obj->cur.geometry.h == h)) return; + + if ((obj->cur.geometry.w == nw) && (obj->cur.geometry.h == nh)) return; + if (obj->layer->evas->events_frozen <= 0) { pass = evas_event_passes_through(obj); @@ -532,13 +576,16 @@ evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) obj->layer->evas->pointer.y, 1, 1); } obj->doing.in_resize++; + if (obj->smart.smart) { if (obj->smart.smart->smart_class->resize) - obj->smart.smart->smart_class->resize(obj, w, h); + obj->smart.smart->smart_class->resize(obj, nw, nh); } - obj->cur.geometry.w = w; - obj->cur.geometry.h = h; + + obj->cur.geometry.w = nw; + obj->cur.geometry.h = nh; + //// obj->cur.cache.geometry.validity = 0; evas_object_change(obj); evas_object_clip_dirty(obj); @@ -581,6 +628,7 @@ evas_object_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, E if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0; return; } + if (x) *x = obj->cur.geometry.x; if (y) *y = obj->cur.geometry.y; if (w) *w = obj->cur.geometry.w; @@ -1084,8 +1132,7 @@ evas_object_render_op_set(Evas_Object *obj, Evas_Render_Op render_op) return; MAGIC_CHECK_END(); if (obj->delete_me) return; - if ((Evas_Render_Op)obj->cur.render_op == render_op) - return; + if (obj->cur.render_op == render_op) return; obj->cur.render_op = render_op; evas_object_change(obj); } @@ -1317,3 +1364,20 @@ evas_object_static_clip_get(const Evas_Object *obj) return obj->is_static_clip; } +EAPI void +evas_object_is_frame_object_set(Evas_Object *obj, Eina_Bool is_frame) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + obj->is_frame = is_frame; +} + +EAPI Eina_Bool +evas_object_is_frame_object_get(Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + return obj->is_frame; +} diff --git a/libraries/evas/src/lib/canvas/evas_object_smart.c b/libraries/evas/src/lib/canvas/evas_object_smart.c index a7dfcdf..69d7f3b 100644 --- a/libraries/evas/src/lib/canvas/evas_object_smart.c +++ b/libraries/evas/src/lib/canvas/evas_object_smart.c @@ -402,6 +402,37 @@ evas_object_smart_callback_del(Evas_Object *obj, const char *event, Evas_Smart_C return NULL; } +EAPI void * +evas_object_smart_callback_del_full(Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data) +{ + Evas_Object_Smart *o; + Eina_List *l; + Evas_Smart_Callback *cb; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + o = (Evas_Object_Smart *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); + return NULL; + MAGIC_CHECK_END(); + if (!event) return NULL; + EINA_LIST_FOREACH(o->callbacks, l, cb) + { + if ((!strcmp(cb->event, event)) && (cb->func == func) && (cb->func_data == data)) + { + void *ret; + + ret = cb->func_data; + cb->delete_me = 1; + o->deletions_waiting = 1; + evas_object_smart_callbacks_clear(obj); + return ret; + } + } + return NULL; +} + EAPI void evas_object_smart_callback_call(Evas_Object *obj, const char *event, void *event_info) { diff --git a/libraries/evas/src/lib/canvas/evas_object_table.c b/libraries/evas/src/lib/canvas/evas_object_table.c index 6e28fce..cdfa07f 100644 --- a/libraries/evas/src/lib/canvas/evas_object_table.c +++ b/libraries/evas/src/lib/canvas/evas_object_table.c @@ -1,5 +1,5 @@ -#include #include "evas_common.h" +#include typedef struct _Evas_Object_Table_Data Evas_Object_Table_Data; typedef struct _Evas_Object_Table_Option Evas_Object_Table_Option; diff --git a/libraries/evas/src/lib/canvas/evas_object_text.c b/libraries/evas/src/lib/canvas/evas_object_text.c index 6c30fcc..dbe5e08 100644 --- a/libraries/evas/src/lib/canvas/evas_object_text.c +++ b/libraries/evas/src/lib/canvas/evas_object_text.c @@ -531,8 +531,9 @@ _evas_object_text_layout(Evas_Object *obj, Evas_Object_Text *o, const Eina_Unico { EvasBiDiStrIndex *v_to_l = NULL; size_t pos, visual_pos; - int len = eina_unicode_strlen(text), par_len; + int len = eina_unicode_strlen(text); #ifdef BIDI_SUPPORT + int par_len = len; int *segment_idxs = NULL; if (o->bidi_delimiters) segment_idxs = evas_bidi_segment_idxs_get(text, o->bidi_delimiters); @@ -543,7 +544,6 @@ _evas_object_text_layout(Evas_Object *obj, Evas_Object_Text *o, const Eina_Unico #endif visual_pos = pos = 0; - par_len = len; while (len > 0) { Evas_Font_Instance *script_fi = NULL; diff --git a/libraries/evas/src/lib/canvas/evas_object_textblock.c b/libraries/evas/src/lib/canvas/evas_object_textblock.c index 7941a45..568911c 100644 --- a/libraries/evas/src/lib/canvas/evas_object_textblock.c +++ b/libraries/evas/src/lib/canvas/evas_object_textblock.c @@ -61,13 +61,13 @@ * @subsection textblock_layout The layout system * @todo write @ref textblock_layout */ -#include - #include "evas_common.h" #include "evas_private.h" +#include #ifdef HAVE_LINEBREAK #include "linebreak.h" +#include "wordbreak.h" #endif /* save typing */ @@ -78,12 +78,19 @@ static const char o_type[] = "textblock"; /* The char to be inserted instead of visible formats */ -#define EVAS_TEXTBLOCK_REPLACEMENT_CHAR 0xFFFC +#define _REPLACEMENT_CHAR 0xFFFC #define _PARAGRAPH_SEPARATOR 0x2029 +#define _NEWLINE '\n' +#define _TAB '\t' + +#define _REPLACEMENT_CHAR_UTF8 "\xEF\xBF\xBC" +#define _PARAGRAPH_SEPARATOR_UTF8 "\xE2\x80\xA9" +#define _NEWLINE_UTF8 "\n" +#define _TAB_UTF8 "\t" #define EVAS_TEXTBLOCK_IS_VISIBLE_FORMAT_CHAR(ch) \ - (((ch) == EVAS_TEXTBLOCK_REPLACEMENT_CHAR) || \ - ((ch) == '\n') || \ - ((ch) == '\t') || \ + (((ch) == _REPLACEMENT_CHAR) || \ + ((ch) == _NEWLINE) || \ + ((ch) == _TAB) || \ ((ch) == _PARAGRAPH_SEPARATOR)) /* private struct for textblock object internal data */ @@ -101,6 +108,12 @@ typedef struct _Evas_Object_Textblock Evas_Object_Textblock; typedef struct _Evas_Object_Style_Tag Evas_Object_Style_Tag; /** * @internal + * @typedef Evas_Object_Style_Tag + * The structure used for finding style tags. + */ +typedef struct _Evas_Object_Style_Tag_Base Evas_Object_Style_Tag_Base; +/** + * @internal * @typedef Evas_Object_Textblock_Node_Text * A text node. */ @@ -195,21 +208,26 @@ typedef struct _Evas_Object_Textblock_Format Evas_Object_Textblock_Format; * Returns true if closer is the closer of base. */ #define _FORMAT_IS_CLOSER_OF(base, closer, closer_len) \ - (!strncmp(base + 1, closer, closer_len) && \ - (!base[closer_len + 1] || \ - (base[closer_len + 1] == '=') || \ - _is_white(base[closer_len + 1]))) + (!strncmp(base, closer, closer_len) && \ + (!base[closer_len] || \ + (base[closer_len] == '=') || \ + _is_white(base[closer_len]))) /*FIXME: document the structs and struct items. */ -struct _Evas_Object_Style_Tag +struct _Evas_Object_Style_Tag_Base { - EINA_INLIST; char *tag; char *replace; size_t tag_len; size_t replace_len; }; +struct _Evas_Object_Style_Tag +{ + EINA_INLIST; + Evas_Object_Style_Tag_Base tag; +}; + struct _Evas_Object_Textblock_Node_Text { EINA_INLIST; @@ -229,11 +247,18 @@ struct _Evas_Object_Textblock_Node_Format Evas_Object_Textblock_Node_Text *text_node; size_t offset; unsigned char anchor : 2; + Eina_Bool opener : 1; + Eina_Bool own_closer : 1; Eina_Bool visible : 1; Eina_Bool format_change : 1; Eina_Bool is_new : 1; }; +/* The default tags to use */ +static const Evas_Object_Style_Tag_Base default_tags[] = { + { "b", "+ font_weight=Bold", 1, 18 }, + { "i", "+ font_style=Italic", 1, 19 }}; + #define ANCHOR_NONE 0 #define ANCHOR_A 1 #define ANCHOR_ITEM 2 @@ -538,8 +563,8 @@ _style_replace(Evas_Textblock_Style *ts, const char *style_text) tag = (Evas_Object_Style_Tag *)ts->tags; ts->tags = (Evas_Object_Style_Tag *)eina_inlist_remove(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag)); - free(tag->tag); - free(tag->replace); + free(tag->tag.tag); + free(tag->tag.replace); free(tag); } ts->default_tag = NULL; @@ -567,19 +592,38 @@ _style_clear(Evas_Textblock_Style *ts) * @return The replacement string found. */ static inline const char * -_style_match_tag(Evas_Textblock_Style *ts, const char *s, size_t tag_len, size_t *replace_len) +_style_match_tag(const Evas_Textblock_Style *ts, const char *s, size_t tag_len, size_t *replace_len) { Evas_Object_Style_Tag *tag; + /* Try the style tags */ EINA_INLIST_FOREACH(ts->tags, tag) { - if (tag->tag_len != tag_len) continue; - if (!strncmp(tag->tag, s, tag_len)) + if (tag->tag.tag_len != tag_len) continue; + if (!strncmp(tag->tag.tag, s, tag_len)) { - *replace_len = tag->replace_len; - return tag->replace; + *replace_len = tag->tag.replace_len; + return tag->tag.replace; } } + + /* Try the default tags */ + { + size_t i; + const Evas_Object_Style_Tag_Base *btag; + for (btag = default_tags, i = 0 ; + i < (sizeof(default_tags) / sizeof(default_tags[0])) ; + btag++, i++) + { + if (btag->tag_len != tag_len) continue; + if (!strncmp(btag->tag, s, tag_len)) + { + *replace_len = btag->replace_len; + return btag->replace; + } + } + } + *replace_len = 0; return NULL; } @@ -1689,8 +1733,8 @@ _format_fill(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char *st s = str; - /* get rid of anything +s or -s off the start of the string */ - while ((*s == ' ') || (*s == '+') || (*s == '-')) s++; + /* get rid of any spaces at the start of the string */ + while (*s == ' ') s++; while ((item = _format_parse(&s))) { @@ -2131,7 +2175,6 @@ _layout_format_pop(Ctxt *c, const char *format) if ((c->format_stack) && (c->format_stack->next)) { Eina_List *redo_nodes = NULL; - format++; /* Skip the '-' */ /* Generic pop, should just pop. */ if (((format[0] == ' ') && !format[1]) || @@ -2994,21 +3037,29 @@ _format_finalize(Evas_Object *obj, Evas_Object_Textblock_Format *fmt) * @def _IS_TAB(item) */ #define _IS_TAB(item) \ - (!strcmp(item, "\t") || !strcmp(item, "\\t")) + (!strcmp(item, "tab") || !strcmp(item, "\t") || !strcmp(item, "\\t")) /** * @internal * Returns true if the item is a line spearator, false otherwise * @def _IS_LINE_SEPARATOR(item) */ #define _IS_LINE_SEPARATOR(item) \ - (!strcmp(item, "\n") || !strcmp(item, "\\n")) + (!strcmp(item, "br") || !strcmp(item, "\n") || !strcmp(item, "\\n")) /** * @internal * Returns true if the item is a paragraph separator, false otherwise * @def _IS_PARAGRAPH_SEPARATOR(item) */ +#define _IS_PARAGRAPH_SEPARATOR_SIMPLE(item) \ + (!strcmp(item, "ps")) +/** + * @internal + * Returns true if the item is a paragraph separator, false otherwise + * takes legacy mode into account. + * @def _IS_PARAGRAPH_SEPARATOR(item) + */ #define _IS_PARAGRAPH_SEPARATOR(o, item) \ - (!strcmp(item, "ps") || \ + (_IS_PARAGRAPH_SEPARATOR_SIMPLE(item) || \ (o->legacy_newline && _IS_LINE_SEPARATOR(item))) /* Paragraph separator */ /** @@ -3041,7 +3092,7 @@ _layout_do_format(const Evas_Object *obj __UNUSED__, Ctxt *c, int handled = 0; s = n->format; - if (!strncmp(s, "+ item ", 7)) + if (!strncmp(s, "item ", 5)) { // one of: // item size=20x10 href=name @@ -3133,16 +3184,14 @@ _layout_do_format(const Evas_Object *obj __UNUSED__, Ctxt *c, if (!handled) { Eina_Bool push_fmt = EINA_FALSE; - if (s[0] == '+') + if (n->opener && !n->own_closer) { fmt = _layout_format_push(c, fmt, n); - s++; push_fmt = EINA_TRUE; } - else if (s[0] == '-') + else if (!n->opener) { fmt = _layout_format_pop(c, n->orig_format); - s++; } while ((item = _format_parse(&s))) { @@ -3166,7 +3215,7 @@ _layout_do_format(const Evas_Object *obj __UNUSED__, Ctxt *c, fi->parent.w = fi->parent.adv = 0; } - else if ((!strcmp(item, "\t")) || (!strcmp(item, "\\t"))) + else if (_IS_TAB(item)) { Evas_Object_Textblock_Format_Item *fi; @@ -3215,28 +3264,33 @@ _layout_update_par(Ctxt *c) /* -1 means no wrap */ static int _layout_get_charwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt, - const Evas_Object_Textblock_Text_Item *ti, size_t line_start, + const Evas_Object_Textblock_Item *it, size_t line_start, const char *breaks) { int wrap; size_t uwrap; - size_t len = eina_ustrbuf_length_get(ti->parent.text_node->unicode); + size_t len = eina_ustrbuf_length_get(it->text_node->unicode); /* Currently not being used, because it doesn't contain relevant * information */ (void) breaks; { - wrap = _layout_text_cutoff_get(c, fmt, ti); + if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) + wrap = 0; + else + wrap = _layout_text_cutoff_get(c, fmt, _ITEM_TEXT(it)); + if (wrap < 0) return -1; - uwrap = (size_t) wrap + ti->parent.text_pos; + uwrap = (size_t) wrap + it->text_pos; } - if (uwrap == line_start) + if ((uwrap == line_start) && (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)) { - uwrap = ti->parent.text_pos + - (size_t) evas_common_text_props_cluster_next(&ti->text_props, wrap); + uwrap = it->text_pos + + (size_t) evas_common_text_props_cluster_next( + &_ITEM_TEXT(it)->text_props, wrap); } if ((uwrap <= line_start) || (uwrap > len)) return -1; @@ -3259,16 +3313,16 @@ _layout_get_charwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt, #endif static int _layout_get_word_mixwrap_common(Ctxt *c, Evas_Object_Textblock_Format *fmt, - const Evas_Object_Textblock_Text_Item *ti, Eina_Bool mixed_wrap, + const Evas_Object_Textblock_Item *it, Eina_Bool mixed_wrap, size_t line_start, const char *breaks) { Eina_Bool wrap_after = EINA_FALSE; size_t wrap; size_t orig_wrap; const Eina_Unicode *str = eina_ustrbuf_string_get( - ti->parent.text_node->unicode); - int item_start = ti->parent.text_pos; - size_t len = eina_ustrbuf_length_get(ti->parent.text_node->unicode); + it->text_node->unicode); + int item_start = it->text_pos; + size_t len = eina_ustrbuf_length_get(it->text_node->unicode); #ifndef HAVE_LINEBREAK /* Not used without liblinebreak ATM. */ (void) breaks; @@ -3276,7 +3330,10 @@ _layout_get_word_mixwrap_common(Ctxt *c, Evas_Object_Textblock_Format *fmt, { int swrap = -1; - swrap = _layout_text_cutoff_get(c, fmt, ti); + if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) + swrap = 0; + else + swrap = _layout_text_cutoff_get(c, fmt, _ITEM_TEXT(it)); /* Avoiding too small textblocks to even contain one char. * FIXME: This can cause breaking inside ligatures. */ @@ -3331,7 +3388,7 @@ _layout_get_word_mixwrap_common(Ctxt *c, Evas_Object_Textblock_Format *fmt, { if (mixed_wrap) { - return _layout_get_charwrap(c, fmt, ti, + return _layout_get_charwrap(c, fmt, it, line_start, breaks); } else @@ -3362,20 +3419,20 @@ _layout_get_word_mixwrap_common(Ctxt *c, Evas_Object_Textblock_Format *fmt, /* -1 means no wrap */ static int _layout_get_wordwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt, - const Evas_Object_Textblock_Text_Item *ti, size_t line_start, + const Evas_Object_Textblock_Item *it, size_t line_start, const char *breaks) { - return _layout_get_word_mixwrap_common(c, fmt, ti, EINA_FALSE, line_start, + return _layout_get_word_mixwrap_common(c, fmt, it, EINA_FALSE, line_start, breaks); } /* -1 means no wrap */ static int _layout_get_mixedwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt, - const Evas_Object_Textblock_Text_Item *ti, size_t line_start, + const Evas_Object_Textblock_Item *it, size_t line_start, const char *breaks) { - return _layout_get_word_mixwrap_common(c, fmt, ti, EINA_TRUE, line_start, + return _layout_get_word_mixwrap_common(c, fmt, it, EINA_TRUE, line_start, breaks); } @@ -3503,7 +3560,7 @@ _layout_paragraph_reorder_lines(Evas_Object_Textblock_Paragraph *par) static void _layout_paragraph_render(Evas_Object_Textblock *o, - Evas_Object_Textblock_Paragraph *par) + Evas_Object_Textblock_Paragraph *par) { if (par->rendered) return; @@ -3521,6 +3578,8 @@ _layout_paragraph_render(Evas_Object_Textblock *o, par->bidi_props = NULL; } } +#else + (void) o; #endif } @@ -3656,120 +3715,127 @@ _layout_par(Ctxt *c) else if ((it->format->wrap_word || it->format->wrap_char || it->format->wrap_mixed) && it->text_node) { - if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) + size_t line_start; + size_t it_len; + + it_len = (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) ? + 1 : _ITEM_TEXT(it)->text_props.text_len; + + +#ifdef HAVE_LINEBREAK + /* If we haven't calculated the linebreaks yet, + * do */ + if (!line_breaks) { - /* Don't wrap if it's the only item */ - if (c->ln->items) + /* Only relevant in those cases */ + if (it->format->wrap_word || it->format->wrap_mixed) { - /*FIXME: I should handle format correctly, - i.e verify we are allowed to break here */ - _layout_line_advance(c, it->format); - wrap = -1; + const char *lang; + lang = (it->format->font.fdesc) ? + it->format->font.fdesc->lang : ""; + size_t len = + eina_ustrbuf_length_get( + it->text_node->unicode); + line_breaks = malloc(len); + set_linebreaks_utf32((const utf32_t *) + eina_ustrbuf_string_get( + it->text_node->unicode), + len, lang, line_breaks); } } +#endif + if (c->ln->items) + line_start = c->ln->items->text_pos; else - { - Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it); - size_t line_start; + line_start = it->text_pos; -#ifdef HAVE_LINEBREAK - /* If we haven't calculated the linebreaks yet, - * do */ - if (!line_breaks) - { - /* Only relevant in those cases */ - if (it->format->wrap_word || it->format->wrap_mixed) - { - const char *lang; - lang = (it->format->font.fdesc) ? - it->format->font.fdesc->lang : ""; - size_t len = - eina_ustrbuf_length_get( - it->text_node->unicode); - line_breaks = malloc(len); - set_linebreaks_utf32((const utf32_t *) - eina_ustrbuf_string_get( - it->text_node->unicode), - len, lang, line_breaks); - } - } -#endif - if (c->ln->items) - line_start = c->ln->items->text_pos; + adv_line = 1; + /* If we don't already have a wrap point from before */ + if (wrap < 0) + { + if (it->format->wrap_word) + wrap = _layout_get_wordwrap(c, it->format, it, + line_start, line_breaks); + else if (it->format->wrap_char) + wrap = _layout_get_charwrap(c, it->format, it, + line_start, line_breaks); + else if (it->format->wrap_mixed) + wrap = _layout_get_mixedwrap(c, it->format, it, + line_start, line_breaks); else - line_start = ti->parent.text_pos; - - adv_line = 1; - /* If we don't already have a wrap point from before */ - if (wrap < 0) - { - if (it->format->wrap_word) - wrap = _layout_get_wordwrap(c, it->format, ti, - line_start, line_breaks); - else if (it->format->wrap_char) - wrap = _layout_get_charwrap(c, it->format, ti, - line_start, line_breaks); - else if (it->format->wrap_mixed) - wrap = _layout_get_mixedwrap(c, it->format, ti, - line_start, line_breaks); - else - wrap = -1; - } + wrap = -1; + } - /* If it's before the item, rollback and apply. - if it's in the item, cut. - If it's after the item, delay the cut */ - if (wrap > 0) + /* If it's before the item, rollback and apply. + if it's in the item, cut. + If it's after the item, delay the cut */ + if (wrap > 0) + { + size_t uwrap = (size_t) wrap; + if (uwrap < it->text_pos) { - size_t uwrap = (size_t) wrap; - if (uwrap < ti->parent.text_pos) + /* Rollback latest additions, and cut that + item */ + i = eina_list_prev(i); + it = eina_list_data_get(i); + while (uwrap < it->text_pos) { - /* Rollback latest additions, and cut that - item */ - i = eina_list_prev(i); - it = eina_list_data_get(i); - while (uwrap < it->text_pos) - { - c->ln->items = _ITEM( - eina_inlist_remove( - EINA_INLIST_GET(c->ln->items), - EINA_INLIST_GET(it))); - i = eina_list_prev(i); - it = eina_list_data_get(i); - } - c->x = it->x; c->ln->items = _ITEM( eina_inlist_remove( EINA_INLIST_GET(c->ln->items), EINA_INLIST_GET(it))); - continue; + i = eina_list_prev(i); + it = eina_list_data_get(i); } - /* If it points to the end, it means the previous - * char is a whitespace we should remove, so this - * is a wanted cutting point. */ - else if (uwrap > ti->parent.text_pos + - ti->text_props.text_len) - wrap = -1; /* Delay the cut in a smart way - i.e use the item_pos as the line_start, because - there's already no cut before*/ - else - wrap -= ti->parent.text_pos; /* Cut here */ + c->x = it->x; + c->ln->items = _ITEM( + eina_inlist_remove( + EINA_INLIST_GET(c->ln->items), + EINA_INLIST_GET(it))); + continue; } - - if (wrap > 0) + /* If it points to the end, it means the previous + * char is a whitespace we should remove, so this + * is a wanted cutting point. */ + else if (uwrap > it->text_pos + it_len) { - _layout_item_text_split_strip_white(c, ti, i, wrap); - } - else if (wrap == 0) + /* FIXME: Should redo the ellipsis handling. + * If we can do ellipsis, just cut here. */ + if (it->format->ellipsis == 1.0) + { + _layout_handle_ellipsis(c, it, i); + ret = 1; + goto end; + } + else + { + /* Delay the cut in a smart way i.e use the + item_pos as the line_start, because + there's already no cut before*/ + wrap = -1; + } + } + else + wrap -= it->text_pos; /* Cut here */ + } + + if (wrap > 0) + { + if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) { - /* Should wrap before the item */ - adv_line = 0; - redo_item = 1; - _layout_line_advance(c, it->format); + _layout_item_text_split_strip_white(c, + _ITEM_TEXT(it), i, wrap); } - /* Reset wrap */ - wrap = -1; } + else if (wrap == 0) + { + /* Should wrap before the item */ + adv_line = 0; + redo_item = 1; + _layout_line_advance(c, it->format); + } + /* Reset wrap */ + wrap = -1; } } @@ -3844,18 +3910,16 @@ _format_changes_invalidate_text_nodes(Ctxt *c) const char *fstr = fnode->orig_format; /* balance < 0 means we gave up and everything should be * invalidated */ - if (*fstr == '+') + if (fnode->opener && !fnode->own_closer) { balance++; if (!fstack) start_n = fnode->text_node; fstack = eina_list_prepend(fstack, fnode); } - else if (*fstr == '-') + else if (!fnode->opener) { size_t fstr_len; - /* Skip the '-' */ - fstr++; fstr_len = strlen(fstr); /* Generic popper, just pop */ if (((fstr[0] == ' ') && !fstr[1]) || !fstr[0]) @@ -4429,12 +4493,12 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) { if (!key_start) { - if (!isspace(*p)) + if (!isspace((unsigned char)(*p))) key_start = p; } else if (!key_stop) { - if ((*p == '=') || (isspace(*p))) + if ((*p == '=') || (isspace((unsigned char)(*p)))) key_stop = p; } else if (!val_start) @@ -4479,10 +4543,10 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) tag = calloc(1, sizeof(Evas_Object_Style_Tag)); if (tag) { - tag->tag = tags; - tag->replace = replaces; - tag->tag_len = tag_len; - tag->replace_len = replace_len; + tag->tag.tag = tags; + tag->tag.replace = replaces; + tag->tag.tag_len = tag_len; + tag->tag.replace_len = replace_len; ts->tags = (Evas_Object_Style_Tag *)eina_inlist_append(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag)); } else @@ -4689,7 +4753,11 @@ _escaped_char_match(const char *s, int *adv) while ((*mc) && (*sc)) { if ((unsigned char)*sc < (unsigned char)*mc) return NULL; - if (*sc != *mc) match = 0; + if (*sc != *mc) + { + match = 0; + break; + } mc++; sc++; } @@ -4723,7 +4791,7 @@ _escaped_char_get(const char *s, const char *s_end) int base = 10; s += 2; /* Skip "&#" */ - if (tolower(*s) == 'x') + if (tolower((unsigned char)(*s)) == 'x') { s++; base = 16; @@ -4876,6 +4944,7 @@ evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char * NULL is reached. */ for (;;) { + size_t text_len; /* If we got to the end of string or just finished/started tag * or escape sequence handling. */ if ((*p == 0) || @@ -4953,14 +5022,22 @@ evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char } } /* Unicode object replcament char */ - else if (!strncmp("\xEF\xBF\xBC", p, 3)) + else if (!strncmp(_REPLACEMENT_CHAR_UTF8, p, + text_len = strlen(_REPLACEMENT_CHAR_UTF8)) || + !strncmp(_NEWLINE_UTF8, p, + text_len = strlen(_NEWLINE_UTF8)) || + !strncmp(_TAB_UTF8, p, + text_len = strlen(_TAB_UTF8)) || + !strncmp(_PARAGRAPH_SEPARATOR_UTF8, p, + text_len = strlen(_PARAGRAPH_SEPARATOR_UTF8))) { /*FIXME: currently just remove them, maybe do something * fancier in the future, atm it breaks if this char * is inside <> */ _prepend_text_run(cur, s, p); - p += 2; /* it's also advanced later in this loop need +3 - * in total*/ + /* it's also advanced later in this loop need +text_len + in total*/ + p += text_len - 1; s = p + 1; /* One after the end of the replacement char */ } p++; @@ -4979,19 +5056,19 @@ evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char * @param fnode the format node to process. */ static void -_markup_get_format_append(Evas_Object_Textblock *o __UNUSED__, Eina_Strbuf *txt, Evas_Object_Textblock_Node_Format *fnode) +_markup_get_format_append(Eina_Strbuf *txt, Evas_Object_Textblock_Node_Format *fnode) { eina_strbuf_append_char(txt, '<'); { const char *s; - int pop = 0; // FIXME: need to escape s = fnode->orig_format; - if (*s == '-') pop = 1; - while ((*s == ' ') || (*s == '+') || (*s == '-')) s++; - if (pop) eina_strbuf_append_char(txt, '/'); + if (!fnode->opener && !fnode->own_closer) + eina_strbuf_append_char(txt, '/'); eina_strbuf_append(txt, s); + if (fnode->own_closer) + eina_strbuf_append_char(txt, '/'); } eina_strbuf_append_char(txt, '>'); } @@ -5061,7 +5138,7 @@ evas_object_textblock_text_markup_get(const Evas_Object *obj) tmp_ch = text[off]; text[off] = 0; /* Null terminate the part of the string */ _markup_get_text_append(txt, text); - _markup_get_format_append(o, txt, fnode); + _markup_get_format_append(txt, fnode); text[off] = tmp_ch; /* Restore the char */ text += off; if (fnode->visible) @@ -5086,6 +5163,190 @@ evas_object_textblock_text_markup_get(const Evas_Object *obj) return o->markup_text; } +EAPI char * +evas_textblock_text_markup_to_utf8(const Evas_Object *obj, const char *text) +{ + /* FIXME: Redundant and awful, should be merged with markup_prepend */ + Eina_Strbuf *sbuf; + char *s, *p, *ret; + char *tag_start, *tag_end, *esc_start, *esc_end; + + if (!text) return NULL; + + + tag_start = tag_end = esc_start = esc_end = NULL; + sbuf = eina_strbuf_new(); + p = (char *)text; + s = p; + /* This loop goes through all of the mark up text until it finds format + * tags, escape sequences or the terminating NULL. When it finds either + * of those, it appends the text found up until that point to the textblock + * proccesses whatever found. It repeats itself until the termainating + * NULL is reached. */ + for (;;) + { + /* If we got to the end of string or just finished/started tag + * or escape sequence handling. */ + if ((*p == 0) || + (tag_end) || (esc_end) || + (tag_start) || (esc_start)) + { + if (tag_end) + { + /* If we reached to a tag ending, analyze the tag */ + char *ttag; + size_t ttag_len; + + tag_start++; /* Skip the < */ + tag_end--; /* Skip the > */ + if ((tag_end > tag_start) && (*(tag_end - 1) == '/')) + { + tag_end --; /* Skip the terminating '/' */ + while (*(tag_end - 1) == ' ') + tag_end--; /* skip trailing ' ' */ + } + + ttag_len = tag_end - tag_start; + + ttag = malloc(ttag_len + 1); + if (ttag) + { + const char *match = NULL; + size_t replace_len; + memcpy(ttag, tag_start, ttag_len); + ttag[ttag_len] = 0; + + + if (obj) + { + match = _style_match_tag( + evas_object_textblock_style_get(obj), + ttag, ttag_len, &replace_len); + } + + if (!match) match = ttag; + + if (_IS_PARAGRAPH_SEPARATOR_SIMPLE(match)) + eina_strbuf_append(sbuf, _PARAGRAPH_SEPARATOR_UTF8); + else if (_IS_LINE_SEPARATOR(match)) + eina_strbuf_append(sbuf, _NEWLINE_UTF8); + else if (_IS_TAB(match)) + eina_strbuf_append(sbuf, _TAB_UTF8); + else if (!strncmp(match, "item", 4)) + eina_strbuf_append(sbuf, _REPLACEMENT_CHAR_UTF8); + + free(ttag); + } + tag_start = tag_end = NULL; + } + else if (esc_end) + { + const char *escape; + + escape = _escaped_char_get(esc_start, esc_end + 1); + eina_strbuf_append(sbuf, escape); + esc_start = esc_end = NULL; + } + else if (*p == 0) + { + eina_strbuf_append_length(sbuf, s, p - s); + s = NULL; + } + if (*p == 0) + break; + } + if (*p == '<') + { + if (!esc_start) + { + /* Append the text prior to this to the textblock and + * mark the start of the tag */ + tag_start = p; + tag_end = NULL; + eina_strbuf_append_length(sbuf, s, p - s); + s = NULL; + } + } + else if (*p == '>') + { + if (tag_start) + { + tag_end = p + 1; + s = p + 1; + } + } + else if (*p == '&') + { + if (!tag_start) + { + /* Append the text prior to this to the textblock and mark + * the start of the escape sequence */ + esc_start = p; + esc_end = NULL; + eina_strbuf_append_length(sbuf, s, p - s); + s = NULL; + } + } + else if (*p == ';') + { + if (esc_start) + { + esc_end = p; + s = p + 1; + } + } + p++; + } + + ret = eina_strbuf_string_steal(sbuf); + eina_strbuf_free(sbuf); + return ret; +} + +EAPI char * +evas_textblock_text_utf8_to_markup(const Evas_Object *obj, const char *text) +{ + Eina_Strbuf *sbuf; + char *str = NULL; + int ch, pos = 0, pos2 = 0; + + (void) obj; + + if (!text) return NULL; + + sbuf = eina_strbuf_new(); + + for (;;) + { + pos = pos2; + pos2 = evas_string_char_next_get(text, pos2, &ch); + if ((ch <= 0) || (pos2 <= 0)) break; + + if (ch == _NEWLINE) + eina_strbuf_append(sbuf, "
"); + else if (ch == _TAB) + eina_strbuf_append(sbuf, ""); + else if (ch == '<') + eina_strbuf_append(sbuf, "<"); + else if (ch == '>') + eina_strbuf_append(sbuf, ">"); + else if (ch == '&') + eina_strbuf_append(sbuf, "&"); + else if (ch == _PARAGRAPH_SEPARATOR) + eina_strbuf_append(sbuf, ""); + else if (ch == _REPLACEMENT_CHAR) + eina_strbuf_append(sbuf, ""); + else + { + eina_strbuf_append_length(sbuf, text + pos, pos2 - pos); + } + } + str = eina_strbuf_string_steal(sbuf); + eina_strbuf_free(sbuf); + return str; + +} + /* cursors */ /** @@ -5453,15 +5714,13 @@ evas_textblock_node_format_remove_pair(Evas_Object *obj, { const char *fstr = fmt->orig_format; - if (fstr && (*fstr == '+')) + if (fmt->opener && !fmt->own_closer) { fstack = eina_list_prepend(fstack, fmt); } - else if (fstr && (*fstr == '-')) + else if (fstr && !fmt->opener) { size_t fstr_len; - /* Skip the '-' */ - fstr++; fstr_len = strlen(fstr); /* Generic popper, just pop */ if (((fstr[0] == ' ') && !fstr[1]) || !fstr[0]) @@ -5708,6 +5967,111 @@ evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur) return EINA_FALSE; } +#ifdef HAVE_LINEBREAK + +/* BREAK_AFTER: true if we can break after the current char. + * Both macros assume str[i] is not the terminating nul */ +#define BREAK_AFTER(i) \ + (breaks[i] == WORDBREAK_BREAK) + +#else + +#define BREAK_AFTER(i) \ + ((!str[i + 1]) || \ + (_is_white(str[i]) && !_is_white(str[i + 1])) || \ + (!_is_white(str[i]) && _is_white(str[i + 1]))) + +#endif + +EAPI Eina_Bool +evas_textblock_cursor_word_start(Evas_Textblock_Cursor *cur) +{ + const Eina_Unicode *text; + size_t i; +#ifdef HAVE_LINEBREAK + char *breaks; +#endif + + if (!cur) return EINA_FALSE; + if (!cur->node) return EINA_FALSE; + + text = eina_ustrbuf_string_get(cur->node->unicode); + +#ifdef HAVE_LINEBREAK + { + const char *lang = ""; /* FIXME: get lang */ + size_t len = eina_ustrbuf_length_get(cur->node->unicode); + breaks = malloc(len); + set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks); + } +#endif + + i = cur->pos; + + /* Skip the first one. This ensures we don't point to the nul, and also + * we just don't care about it anyway. */ + if (i > 0) i--; + + for ( ; i > 0 ; i--) + { + if (BREAK_AFTER(i)) + { + /* Advance to the current char */ + i++; + break; + } + } + + cur->pos = i; + +#ifdef HAVE_LINEBREAK + free(breaks); +#endif + return EINA_TRUE; +} + +EAPI Eina_Bool +evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur) +{ + const Eina_Unicode *text; + size_t i; +#ifdef HAVE_LINEBREAK + char *breaks; +#endif + + if (!cur) return EINA_FALSE; + if (!cur->node) return EINA_FALSE; + + text = eina_ustrbuf_string_get(cur->node->unicode); + +#ifdef HAVE_LINEBREAK + { + const char *lang = ""; /* FIXME: get lang */ + size_t len = eina_ustrbuf_length_get(cur->node->unicode); + breaks = malloc(len); + set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks); + } +#endif + + i = cur->pos; + + for ( ; text[i] ; i++) + { + if (BREAK_AFTER(i)) + { + /* This is the one to break after. */ + break; + } + } + + cur->pos = i; + +#ifdef HAVE_LINEBREAK + free(breaks); +#endif + return EINA_TRUE;; +} + EAPI Eina_Bool evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur) { @@ -5887,10 +6251,9 @@ _evas_textblock_format_is_visible(Evas_Object_Textblock_Node_Format *fnode, fnode->anchor = ANCHOR_NONE; if (!s) return; - if (s[0] == '+' || s[0] == '-') + if (!fnode->own_closer) { - is_opener = (s[0] == '+'); - s++; + is_opener = fnode->opener; fnode->format_change = EINA_TRUE; } @@ -5902,6 +6265,8 @@ _evas_textblock_format_is_visible(Evas_Object_Textblock_Node_Format *fnode, * closing */ if ((!strncmp(item, "\n", itlen) || !strncmp(item, "\\n", itlen)) || (!strncmp(item, "\t", itlen) || !strncmp(item, "\\t", itlen)) || + (!strncmp(item, "br", itlen) && (itlen >= 2)) || + (!strncmp(item, "tab", itlen) && (itlen >= 3)) || (!strncmp(item, "ps", itlen) && (itlen >= 2)) || (!strncmp(item, "item", itlen) && (itlen >= 4) && is_opener)) { @@ -5986,19 +6351,17 @@ _evas_textblock_node_format_remove_matching(Evas_Object_Textblock *o, } - if (fstr && (*fstr == '+')) + if (fmt->opener && !fmt->own_closer) { formats = eina_list_prepend(formats, fmt); } - else if (fstr && (*fstr == '-')) + else if (fstr && !fmt->opener) { Evas_Object_Textblock_Node_Format *fnode; size_t fstr_len; - /* Skip the '-' */ - fstr++; fstr_len = strlen(fstr); - /* Generic popper, just pop */ - if (((fstr[0] == ' ') && !fstr[1]) || !fstr[0]) + /* Generic popper, just pop (if there's anything to pop). */ + if (formats && (((fstr[0] == ' ') && !fstr[1]) || !fstr[0])) { fnode = eina_list_data_get(formats); formats = eina_list_remove_list(formats, formats); @@ -6855,6 +7218,7 @@ _evas_textblock_node_format_new(Evas_Object_Textblock *o, const char *_format) { Evas_Object_Textblock_Node_Format *n; const char *format = _format; + const char *pre_stripped_format = NULL; n = calloc(1, sizeof(Evas_Object_Textblock_Node_Format)); /* Create orig_format and format */ @@ -6866,62 +7230,80 @@ _evas_textblock_node_format_new(Evas_Object_Textblock *o, const char *_format) format++; /* Advance after '<' */ format_len = strlen(format); - if (format[format_len - 1] == '>') - format_len--; /* We don't care about '>' */ + if ((format_len > 0) && format[format_len - 1] == '>') + { + format_len--; /* We don't care about '>' */ + /* Check if it closes itself. Skip the case. */ + if ((format_len > 1) && format[format_len - 1] == '/') + { + format_len--; /* We don't care about '/' */ + n->own_closer = EINA_TRUE; + } + } match = _style_match_tag(o->style, format, format_len, &replace_len); if (match) { - if ((match[0] == '+') || (match[0] == '-')) - { - char *norm_format; - norm_format = malloc(format_len + 2 + 1); - memcpy(norm_format, match, 2); - memcpy(norm_format + 2, format, format_len); - norm_format[format_len + 2] = '\0'; - n->orig_format = - eina_stringshare_add_length(norm_format, format_len + 2); - free(norm_format); - } - else + if (match[0] != '-') { - n->orig_format = - eina_stringshare_add_length(format, format_len); + n->opener = EINA_TRUE; + if (match[0] != '+') + { + n->own_closer = EINA_TRUE; + } } - n->format = eina_stringshare_add(match); + + pre_stripped_format = match; } else { - char *norm_format; - - norm_format = malloc(format_len + 2 + 1); - if (norm_format) + if (format[0] == '/') { - if (format[0] == '/') - { - memcpy(norm_format, "- ", 2); - memcpy(norm_format + 2, format + 1, format_len - 1); - norm_format[format_len + 2 - 1] = '\0'; - } - else - { - memcpy(norm_format, "+ ", 2); - memcpy(norm_format + 2, format, format_len); - norm_format[format_len + 2] = '\0'; - } - n->orig_format = eina_stringshare_add(norm_format); - free(norm_format); + format++; + format_len--; + } + else + { + n->opener = EINA_TRUE; } - n->format = eina_stringshare_ref(n->orig_format); } + + n->orig_format = eina_stringshare_add_length(format, format_len); + + if (!pre_stripped_format) + pre_stripped_format = n->orig_format; } /* Just use as is, it's a special format. */ else { - n->orig_format = eina_stringshare_add(format); - n->format = eina_stringshare_ref(n->orig_format); + const char *tmp = format; + if (format[0] != '-') + { + n->opener = EINA_TRUE; + if (format[0] != '+') + { + n->own_closer = EINA_TRUE; + } + } + if ((*tmp == '+') || (*tmp == '-')) + { + tmp++; + while (*tmp == ' ') tmp++; + } + n->orig_format = eina_stringshare_add(tmp); + pre_stripped_format = n->orig_format; } + /* Strip format */ + { + const char *tmp = pre_stripped_format; + if ((*tmp == '+') || (*tmp == '-')) + { + tmp++; + while (*tmp == ' ') tmp++; + } + n->format = eina_stringshare_add(tmp); + } format = n->format; _evas_textblock_format_is_visible(n, format); @@ -7051,11 +7433,11 @@ evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *form if (_IS_PARAGRAPH_SEPARATOR(o, format)) insert_char = _PARAGRAPH_SEPARATOR; else if (_IS_LINE_SEPARATOR(format)) - insert_char = '\n'; + insert_char = _NEWLINE; else if (_IS_TAB(format)) - insert_char = '\t'; + insert_char = _TAB; else - insert_char = EVAS_TEXTBLOCK_REPLACEMENT_CHAR; + insert_char = _REPLACEMENT_CHAR; eina_ustrbuf_insert_char(cur->node->unicode, insert_char, cur->pos); @@ -7142,7 +7524,7 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur) should_merge = EINA_TRUE; } /* If a singnular, mark as invisible, so we'll delete it. */ - if (!format || ((*format != '+') && (*format != '-'))) + if (!format || last_fmt->own_closer) { last_fmt->visible = EINA_FALSE; } @@ -7271,60 +7653,40 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C EAPI char * evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur) { - const Eina_Unicode *ustr; - Eina_Unicode buf[2]; - char *s; if (!cur || !cur->node) return NULL; if (evas_textblock_cursor_format_is_visible_get(cur)) { - size_t len; - const char *fstr; + Eina_Strbuf *buf; + Evas_Object_Textblock_Node_Format *fnode; char *ret; - int pop = 0; - fstr = evas_textblock_node_format_text_get( - _evas_textblock_node_visible_at_pos_get( - evas_textblock_cursor_format_get(cur))); - - if (!fstr) - return NULL; + fnode = _evas_textblock_node_visible_at_pos_get( + evas_textblock_cursor_format_get(cur)); - if (*fstr == '-') pop = 1; - while ((*fstr == ' ') || (*fstr == '+') || (*fstr == '-')) fstr++; - len = strlen(fstr); - - { - char *tmp; - if (pop) - { - ret = tmp = malloc(len + 3 + 1); /* and the null */ - memcpy(tmp, " and the null */ - *tmp = '<'; - tmp++; - } - memcpy(tmp, fstr, len); - memcpy(tmp + len, ">", 2); /* Including the null */ - } + buf = eina_strbuf_new(); + _markup_get_format_append(buf, fnode); + ret = eina_strbuf_string_steal(buf); + eina_strbuf_free(buf); return ret; } + else + { + const Eina_Unicode *ustr; + Eina_Unicode buf[2]; + char *s; - ustr = eina_ustrbuf_string_get(cur->node->unicode); - buf[0] = ustr[cur->pos]; - buf[1] = 0; - s = eina_unicode_unicode_to_utf8(buf, NULL); + ustr = eina_ustrbuf_string_get(cur->node->unicode); + buf[0] = ustr[cur->pos]; + buf[1] = 0; + s = eina_unicode_unicode_to_utf8(buf, NULL); - return s; + return s; + } } static char * _evas_textblock_cursor_range_text_markup_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *_cur2) { - Evas_Object_Textblock *o; Evas_Object_Textblock_Node_Text *tnode; Eina_Strbuf *buf; Evas_Textblock_Cursor *cur2; @@ -7333,7 +7695,6 @@ _evas_textblock_cursor_range_text_markup_get(const Evas_Textblock_Cursor *cur1, if (!cur1 || !cur1->node) return NULL; if (!_cur2 || !_cur2->node) return NULL; if (cur1->obj != _cur2->obj) return NULL; - o = (Evas_Object_Textblock *)(cur1->obj->object_data); if (evas_textblock_cursor_compare(cur1, _cur2) > 0) { const Evas_Textblock_Cursor *tc; @@ -7401,7 +7762,7 @@ _evas_textblock_cursor_range_text_markup_get(const Evas_Textblock_Cursor *cur1, tmp_ch = text[off]; text[off] = 0; /* Null terminate the part of the string */ _markup_get_text_append(buf, text); - _markup_get_format_append(o, buf, fnode); + _markup_get_format_append(buf, fnode); text[off] = tmp_ch; /* Restore the char */ text += off; if (fnode->visible) @@ -7623,8 +7984,27 @@ evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur) EAPI const char * evas_textblock_node_format_text_get(const Evas_Object_Textblock_Node_Format *fmt) { + static char *ret = NULL; + char *tmp; + if (!fmt) return NULL; - return fmt->orig_format; + + if (ret) free(ret); + ret = malloc(strlen(fmt->orig_format) + 2 + 1); + tmp = ret; + + if (fmt->opener && !fmt->own_closer) + { + *(tmp++) = '+'; + *(tmp++) = ' '; + } + else if (!fmt->opener) + { + *(tmp++) = '-'; + *(tmp++) = ' '; + } + strcpy(tmp, fmt->orig_format); + return ret; } EAPI void @@ -7673,7 +8053,9 @@ evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord * the position of the previous */ if ((cur->pos > 0) && !_evas_textblock_cursor_is_at_the_end(cur)) { +#ifdef BIDI_SUPPORT Eina_Bool before_char = EINA_FALSE; +#endif cur2.obj = cur->obj; evas_textblock_cursor_copy(cur, &cur2); evas_textblock_cursor_char_prev(&cur2); @@ -7683,12 +8065,16 @@ evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord if (!fmt || !_IS_LINE_SEPARATOR(fmt->format)) { dir_cur = &cur2; +#ifdef BIDI_SUPPORT before_char = EINA_FALSE; +#endif } +#ifdef BIDI_SUPPORT else { before_char = EINA_TRUE; } +#endif ret = evas_textblock_cursor_pen_geometry_get( dir_cur, &x, &y, &w, &h); #ifdef BIDI_SUPPORT @@ -8788,6 +9174,7 @@ evas_object_textblock_init(Evas_Object *obj) { linebreak_init = EINA_TRUE; init_linebreak(); + init_wordbreak(); } #endif diff --git a/libraries/evas/src/lib/canvas/evas_render.c b/libraries/evas/src/lib/canvas/evas_render.c index 0abee97..cdedaec 100644 --- a/libraries/evas/src/lib/canvas/evas_render.c +++ b/libraries/evas/src/lib/canvas/evas_render.c @@ -1139,7 +1139,7 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, } } } - if (surface == e->engine.data.output) +// if (surface == e->engine.data.output) e->engine.func->context_clip_clip(e->engine.data.output, e->engine.data.context, ecx, ecy, ecw, ech); @@ -1360,6 +1360,8 @@ evas_render_updates_internal(Evas *e, RD("[--- RENDER EVAS (size: %ix%i)\n", e->viewport.w, e->viewport.h); + evas_event_callback_call(e, EVAS_CALLBACK_RENDER_PRE, NULL); + /* Check if the modified object mean recalculating every thing */ if (!e->invalidate) _evas_render_check_pending_objects(&e->pending_objects, e); @@ -1399,6 +1401,7 @@ evas_render_updates_internal(Evas *e, _evas_render_prev_cur_clip_cache_add(e, obj); } eina_array_clean(&e->restack_objects); + /* phase 3. add exposes */ EINA_LIST_FREE(e->damages, r) { @@ -1406,7 +1409,20 @@ evas_render_updates_internal(Evas *e, r->x, r->y, r->w, r->h); eina_rectangle_free(r); } - /* phase 4. output & viewport changes */ + + /* phase 4. framespace, output & viewport changes */ + if (e->framespace.changed) + { + int fx, fy, fw, fh; + + fx = e->viewport.x - e->framespace.x; + fy = e->viewport.y - e->framespace.y; + fw = e->viewport.w + e->framespace.w; + fh = e->viewport.h + e->framespace.h; + e->engine.func->output_redraws_rect_add(e->engine.data.output, + fx, fy, fw, fh); + } + if (e->viewport.changed) { e->engine.func->output_redraws_rect_add(e->engine.data.output, @@ -1431,6 +1447,7 @@ evas_render_updates_internal(Evas *e, 0, 0, e->output.w, e->output.h); } + /* phase 5. add obscures */ EINA_LIST_FOREACH(e->obscures, ll, r) { @@ -1562,13 +1579,6 @@ evas_render_updates_internal(Evas *e, else e->engine.func->context_mask_unset(e->engine.data.output, e->engine.data.context); - if (obj->cur.clipper) - e->engine.func->context_clip_set(e->engine.data.output, - e->engine.data.context, - x, y, w, h); - else - e->engine.func->context_clip_unset(e->engine.data.output, - e->engine.data.context); #if 1 /* FIXME: this can slow things down... figure out optimum... coverage */ for (j = offset; j < e->temporary_objects.count; ++j) { @@ -1671,6 +1681,7 @@ evas_render_updates_internal(Evas *e, e->changed = 0; e->viewport.changed = 0; e->output.changed = 0; + e->framespace.changed = 0; e->invalidate = 0; /* If their are some object to restack or some object to delete, @@ -1686,6 +1697,8 @@ evas_render_updates_internal(Evas *e, } evas_module_clean(); + + evas_event_callback_call(e, EVAS_CALLBACK_RENDER_POST, NULL); RD("---]\n"); diff --git a/libraries/evas/src/lib/cserve/Makefile.in b/libraries/evas/src/lib/cserve/Makefile.in index 74b5ff9..7599ca2 100644 --- a/libraries/evas/src/lib/cserve/Makefile.in +++ b/libraries/evas/src/lib/cserve/Makefile.in @@ -198,8 +198,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -216,6 +214,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -297,6 +297,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/Makefile.in b/libraries/evas/src/lib/engines/Makefile.in index 12e28c1..4c3c1da 100644 --- a/libraries/evas/src/lib/engines/Makefile.in +++ b/libraries/evas/src/lib/engines/Makefile.in @@ -208,8 +208,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -226,6 +224,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -307,6 +307,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/Makefile.in b/libraries/evas/src/lib/engines/common/Makefile.in index b0162df..7d1f20a 100644 --- a/libraries/evas/src/lib/engines/common/Makefile.in +++ b/libraries/evas/src/lib/engines/common/Makefile.in @@ -252,8 +252,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -270,6 +268,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -351,6 +351,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c index b30ec1e..796ff17 100644 --- a/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c +++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c @@ -117,7 +117,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int sr } #endif return; - pal = 0; + (void)pal; #else DATA16 *d = (DATA16 *)dst; int w0 = w; @@ -144,7 +144,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int sr d += dst_jump; } return; - pal = 0; + (void)pal; #endif } #endif @@ -216,7 +216,7 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src } #endif return; - pal = 0; + (void)pal; #else DATA16 *d = (DATA16 *)dst; int w0 = w; @@ -233,7 +233,7 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src d += dst_jump; } return; - pal = 0; + (void)pal; #endif } #endif @@ -295,7 +295,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -333,7 +333,7 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -394,7 +394,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -432,7 +432,7 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -493,7 +493,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP2_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -531,7 +531,7 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -592,7 +592,7 @@ evas_common_convert_rgba2_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int sr CONVERT_LOOP2_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -630,7 +630,7 @@ evas_common_convert_rgba_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src CONVERT_LOOP_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -691,7 +691,7 @@ evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -731,7 +731,7 @@ evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -792,7 +792,7 @@ evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -830,7 +830,7 @@ evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -891,7 +891,7 @@ evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP2_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -929,7 +929,7 @@ evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -988,7 +988,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int sr CONVERT_LOOP2_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1025,7 +1025,7 @@ evas_common_convert_rgba_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src CONVERT_LOOP_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1084,7 +1084,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1121,7 +1121,7 @@ evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1180,7 +1180,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1217,7 +1217,7 @@ evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1276,7 +1276,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP2_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1313,7 +1313,7 @@ evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1372,7 +1372,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int CONVERT_LOOP2_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1409,7 +1409,7 @@ evas_common_convert_rgba_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int CONVERT_LOOP_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1468,7 +1468,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 * CONVERT_LOOP2_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1505,7 +1505,7 @@ evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *d CONVERT_LOOP_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1565,7 +1565,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 * CONVERT_LOOP2_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1602,7 +1602,7 @@ evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *d CONVERT_LOOP_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1661,7 +1661,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *d CONVERT_LOOP2_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1698,7 +1698,7 @@ evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *ds CONVERT_LOOP_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1757,7 +1757,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int sr CONVERT_LOOP2_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1794,7 +1794,7 @@ evas_common_convert_rgba_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src CONVERT_LOOP_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1853,7 +1853,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1890,7 +1890,7 @@ evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1949,7 +1949,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1986,7 +1986,7 @@ evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -2045,7 +2045,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP2_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -2082,7 +2082,7 @@ evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c index 41dac6f..0401a4a 100644 --- a/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c +++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c @@ -48,15 +48,167 @@ evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180 (DATA32 *src, DATA8 *dst, int #endif #endif +#ifdef TILE_ROTATE +#define FAST_SIMPLE_ROTATE(suffix, pix_type) \ + static void \ + blt_rotated_90_trivial_##suffix(pix_type *dst, \ + int dst_stride, \ + const pix_type *src, \ + int src_stride, \ + int w, \ + int h) \ + { \ + int x, y; \ + for (y = 0; y < h; y++) \ + { \ + const pix_type *s = src + (h - y - 1); \ + pix_type *d = dst + (dst_stride * y); \ + for (x = 0; x < w; x++) \ + { \ + *d++ = *s; \ + s += src_stride; \ + } \ + } \ + } \ + static void \ + blt_rotated_270_trivial_##suffix(pix_type *dst, \ + int dst_stride, \ + const pix_type *src, \ + int src_stride, \ + int w, \ + int h) \ + { \ + int x, y; \ + for (y = 0; y < h; y++) \ + { \ + const pix_type *s = src + (src_stride * (w - 1)) + y; \ + pix_type *d = dst + (dst_stride * y); \ + for (x = 0; x < w; x++) \ + { \ + *d++ = *s; \ + s -= src_stride; \ + } \ + } \ + } \ + static void \ + blt_rotated_90_##suffix(pix_type *dst, \ + int dst_stride, \ + const pix_type *src, \ + int src_stride, \ + int w, \ + int h) \ + { \ + int x, leading_pixels = 0, trailing_pixels = 0; \ + const int TILE_SIZE = TILE_CACHE_LINE_SIZE / sizeof(pix_type); \ + if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) \ + { \ + leading_pixels = TILE_SIZE - \ + (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ + if (leading_pixels > w) \ + leading_pixels = w; \ + blt_rotated_90_trivial_##suffix(dst, \ + dst_stride, \ + src, \ + src_stride, \ + leading_pixels, \ + h); \ + dst += leading_pixels; \ + src += leading_pixels * src_stride; \ + w -= leading_pixels; \ + } \ + if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) \ + { \ + trailing_pixels = (((uintptr_t)(dst + w) & \ + (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ + if (trailing_pixels > w) \ + trailing_pixels = w; \ + w -= trailing_pixels; \ + } \ + for (x = 0; x < w; x += TILE_SIZE) \ + { \ + blt_rotated_90_trivial_##suffix(dst + x, \ + dst_stride, \ + src + (src_stride * x), \ + src_stride, \ + TILE_SIZE, \ + h); \ + } \ + if (trailing_pixels) \ + blt_rotated_90_trivial_##suffix(dst + w, \ + dst_stride, \ + src + (w * src_stride), \ + src_stride, \ + trailing_pixels, \ + h); \ + } \ + static void \ + blt_rotated_270_##suffix(pix_type *dst, \ + int dst_stride, \ + const pix_type *src, \ + int src_stride, \ + int w, \ + int h) \ + { \ + int x, leading_pixels = 0, trailing_pixels = 0; \ + const int TILE_SIZE = TILE_CACHE_LINE_SIZE / sizeof(pix_type); \ + if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) \ + { \ + leading_pixels = TILE_SIZE - \ + (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ + if (leading_pixels > w) \ + leading_pixels = w; \ + blt_rotated_270_trivial_##suffix(dst, \ + dst_stride, \ + src + (src_stride * (w - leading_pixels)), \ + src_stride, \ + leading_pixels, \ + h); \ + dst += leading_pixels; \ + w -= leading_pixels; \ + } \ + if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) \ + { \ + trailing_pixels = (((uintptr_t)(dst + w) & \ + (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ + if (trailing_pixels > w) \ + trailing_pixels = w; \ + w -= trailing_pixels; \ + src += trailing_pixels * src_stride; \ + } \ + for (x = 0; x < w; x += TILE_SIZE) \ + { \ + blt_rotated_270_trivial_##suffix(dst + x, \ + dst_stride, \ + src + (src_stride * (w - x - TILE_SIZE)), \ + src_stride, \ + TILE_SIZE, \ + h); \ + } \ + if (trailing_pixels) \ + blt_rotated_270_trivial_##suffix(dst + w, \ + dst_stride, \ + src - (trailing_pixels * src_stride), \ + src_stride, \ + trailing_pixels, \ + h); \ + } + +FAST_SIMPLE_ROTATE(8888, DATA8) +#endif + + #ifdef BUILD_CONVERT_32_RGB_8888 #ifdef BUILD_CONVERT_32_RGB_ROT270 void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { +#ifdef TILE_ROTATE + blt_rotated_270_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ; +#else DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; - + dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_270(); @@ -64,6 +216,7 @@ evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int *dst_ptr = *src_ptr; CONVERT_LOOP_END_ROT_270(); +#endif return; } #endif @@ -74,106 +227,118 @@ evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { -#ifndef BUILD_NEON +# ifndef BUILD_NEON +# ifdef TILE_ROTATE + blt_rotated_90_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ; +# else DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; - + dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_90(); *dst_ptr = *src_ptr; CONVERT_LOOP_END_ROT_90(); -#else +# endif + +# else + +# ifdef TILE_ROTATE + blt_rotated_90_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ; +# else if ((w & 1) || (h & 1)) { - /* Rarely (if ever) if ever: so slow path is fine */ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - CONVERT_LOOP_START_ROT_90(); - - *dst_ptr = *src_ptr; - - CONVERT_LOOP_END_ROT_90(); - } else { -#define AP "convert_rgba32_rot_90_" - asm volatile ( - ".fpu neon \n\t" - " mov %[s1], %[src] \n\t" - " add %[s1], %[h],lsl #2 \n\t" - " sub %[s1], #8 \n\t" - - " mov %[s2], %[src] \n\t" - " add %[s2], %[h], lsl #3 \n\t" - " add %[s2], %[sjmp], lsr #1 \n\t" - " sub %[s2], #8 \n\t" - - " mov %[d1], %[dst] \n\t" - - " add %[d2], %[d1], %[djmp] \n\t" - " add %[d2], %[w], lsl #2 \n\t" - - " mov %[sadv], %[h], lsl #3 \n\t" - " add %[sadv], %[sjmp], lsl #1 \n\t" - - " mov %[y], #0 \n\t" - " mov %[x], #0 \n\t" - AP"loop: \n\t" - " vld1.u32 d0, [%[s1]] \n\t" - " vld1.u32 d1, [%[s2]] \n\t" - " add %[x], #2 \n\t" - " add %[s1], %[sadv] \n\t" - " add %[s2], %[sadv] \n\t" - " vtrn.u32 d0, d1 \n\t" - " cmp %[x], %[w] \n\t" - " vst1.u32 d1, [%[d1]]! \n\t" - " vst1.u32 d0, [%[d2]]! \n\t" - " blt "AP"loop \n\t" - - " mov %[x], #0 \n\t" - " add %[d1], %[djmp] \n\t" - " add %[d1], %[w], lsl #2 \n\t" - " add %[d2], %[djmp] \n\t" - " add %[d2], %[w], lsl #2 \n\t" - - " mov %[s1], %[src] \n\t" - " add %[s1], %[h], lsl #2 \n\t" - " sub %[s1], %[y], lsl #2 \n\t" - " sub %[s1], #16 \n\t" - - " add %[s2], %[s1], %[h], lsl #2 \n\t" - " add %[s2], %[sjmp], lsl #2 \n\t" - - " add %[y], #2 \n\t" - - " cmp %[y], %[h] \n\t" - " blt "AP"loop \n\t" - - : // Out - : [s1] "r" (1), - [s2] "r" (11), - [d1] "r" (2), - [d2] "r" (12), - [src] "r" (src), - [dst] "r" (dst), - [x] "r" (3), - [y] "r" (4), - [w] "r" (w), - [h] "r" (h), - [sadv] "r" (5), - [sjmp] "r" (src_jump * 4), - [djmp] "r" (dst_jump * 4 * 2) - : "d0", "d1", "memory", "cc"// Clober - - - ); - } -#undef AP -#endif + /* Rarely (if ever) if ever: so slow path is fine */ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + CONVERT_LOOP_START_ROT_90(); + + *dst_ptr = *src_ptr; + + CONVERT_LOOP_END_ROT_90(); + } + else + { +# define AP "convert_rgba32_rot_90_" + asm volatile ( + ".fpu neon \n\t" + " mov %[s1], %[src] \n\t" + " add %[s1], %[s1], %[h],lsl #2 \n\t" + " sub %[s1], #8 \n\t" + + " mov %[s2], %[src] \n\t" + " add %[s2], %[s2], %[h], lsl #3 \n\t" + " add %[s2], %[s2], %[sjmp], lsr #1 \n\t" + " sub %[s2], #8 \n\t" + + " mov %[d1], %[dst] \n\t" + + " add %[d2], %[d1], %[djmp] \n\t" + " add %[d2], %[d2], %[w], lsl #2 \n\t" + + " mov %[sadv], %[h], lsl #3 \n\t" + " add %[sadv], %[sadv], %[sjmp], lsl #1\n\t" + + " mov %[y], #0 \n\t" + " mov %[x], #0 \n\t" + AP"loop: \n\t" + " vld1.u32 d0, [%[s1]] \n\t" + " vld1.u32 d1, [%[s2]] \n\t" + " add %[x], #2 \n\t" + " add %[s1], %[sadv] \n\t" + " add %[s2], %[sadv] \n\t" + " vtrn.u32 d0, d1 \n\t" + " cmp %[x], %[w] \n\t" + " vst1.u32 d1, [%[d1]]! \n\t" + " vst1.u32 d0, [%[d2]]! \n\t" + " blt "AP"loop \n\t" + + " mov %[x], #0 \n\t" + " add %[d1], %[djmp] \n\t" + " add %[d1], %[d1], %[w], lsl #2 \n\t" + " add %[d2], %[djmp] \n\t" + " add %[d2], %[d2], %[w], lsl #2 \n\t" + + " mov %[s1], %[src] \n\t" + " add %[s1], %[s1], %[h], lsl #2 \n\t" + " sub %[s1], %[s1], %[y], lsl #2 \n\t" + " sub %[s1], #16 \n\t" + + " add %[s2], %[s1], %[h], lsl #2 \n\t" + " add %[s2], %[s2], %[sjmp], lsl #2 \n\t" + + " add %[y], #2 \n\t" + + " cmp %[y], %[h] \n\t" + " blt "AP"loop \n\t" + + : // Out + : [s1] "r" (1), + [s2] "r" (11), + [d1] "r" (2), + [d2] "r" (12), + [src] "r" (src), + [dst] "r" (dst), + [x] "r" (3), + [y] "r" (4), + [w] "r" (w), + [h] "r" (h), + [sadv] "r" (5), + [sjmp] "r" (src_jump * 4), + [djmp] "r" (dst_jump * 4 * 2) + : "d0", "d1", "memory", "cc"// Clober + + + ); + } +# undef AP +# endif +# endif return; } #endif @@ -448,7 +613,7 @@ evas_common_convert_rgba_to_32bpp_rgb_666(DATA32 *src, DATA8 *dst, int src_jump, CONVERT_LOOP_START_ROT_0(); - *dst_ptr = + *dst_ptr = (((R_VAL(src_ptr) << 12) | (B_VAL(src_ptr) >> 2)) & 0x03f03f) | ((G_VAL(src_ptr) << 4) & 0x000fc0); diff --git a/libraries/evas/src/lib/engines/common/evas_convert_yuv.c b/libraries/evas/src/lib/engines/common/evas_convert_yuv.c index a0d155c..000cb01 100644 --- a/libraries/evas/src/lib/engines/common/evas_convert_yuv.c +++ b/libraries/evas/src/lib/engines/common/evas_convert_yuv.c @@ -1091,7 +1091,7 @@ _evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int const int offset_value[2] = { 0, 64 * 16 }; int mb_x, mb_y, mb_w, mb_h; int base_h; - int uv_x, uv_y, uv_step; + int uv_x, uv_step; int stride; /* Idea iterate over each macroblock and convert each of them using _evas_nv12torgb_raster */ @@ -1128,7 +1128,7 @@ _evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int base_h = (mb_h >> 1) + (mb_h & 0x1); stride = w * sizeof (int); - uv_x = 0; uv_y = 0; + uv_x = 0; /* In this format we linearize macroblock on two line to form a Z and it's invert */ for (mb_y = 0; mb_y < (mb_h >> 1); mb_y++) diff --git a/libraries/evas/src/lib/engines/common/evas_cpu.c b/libraries/evas/src/lib/engines/common/evas_cpu.c index cff8b2b..fe90c5b 100644 --- a/libraries/evas/src/lib/engines/common/evas_cpu.c +++ b/libraries/evas/src/lib/engines/common/evas_cpu.c @@ -74,6 +74,7 @@ evas_common_cpu_sse3_test(void) #endif } +#ifdef BUILD_ALTIVEC void evas_common_cpu_altivec_test(void) { @@ -85,6 +86,7 @@ evas_common_cpu_altivec_test(void) #endif /* __VEC__ */ #endif /* __POWERPC__ */ } +#endif /* BUILD_ALTIVEC */ void evas_common_cpu_neon_test(void) @@ -177,6 +179,7 @@ evas_common_cpu_init(void) #endif /* BUILD_SSE3 */ #endif /* BUILD_SSE */ #endif /* BUILD_MMX */ +#ifdef BUILD_ALTIVEC #ifdef __POWERPC__ #ifdef __VEC__ cpu_feature_mask |= CPU_FEATURE_ALTIVEC * @@ -186,6 +189,7 @@ evas_common_cpu_init(void) cpu_feature_mask &= ~CPU_FEATURE_ALTIVEC; #endif /* __VEC__ */ #endif /* __POWERPC__ */ +#endif /* BUILD_ALTIVEC */ #ifdef __SPARC__ cpu_feature_mask |= CPU_FEATURE_VIS * evas_common_cpu_feature_test(evas_common_cpu_vis_test); diff --git a/libraries/evas/src/lib/engines/common/evas_draw_main.c b/libraries/evas/src/lib/engines/common/evas_draw_main.c index 7652708..def19a8 100644 --- a/libraries/evas/src/lib/engines/common/evas_draw_main.c +++ b/libraries/evas/src/lib/engines/common/evas_draw_main.c @@ -75,6 +75,14 @@ evas_common_draw_context_free(RGBA_Draw_Context *dc) { if (!dc) return; +#ifdef HAVE_PIXMAN + if (dc->col.pixman_color_image) + { + pixman_image_unref(dc->col.pixman_color_image); + dc->col.pixman_color_image = NULL; + } +#endif + evas_common_draw_context_apply_clean_cutouts(&dc->cutout); free(dc); } @@ -133,6 +141,20 @@ evas_common_draw_context_set_color(RGBA_Draw_Context *dc, int r, int g, int b, i G_VAL(&(dc->col.col)) = (DATA8)g; B_VAL(&(dc->col.col)) = (DATA8)b; A_VAL(&(dc->col.col)) = (DATA8)a; +#ifdef HAVE_PIXMAN + if (dc && dc->col.pixman_color_image) + pixman_image_unref(dc->col.pixman_color_image); + + pixman_color_t pixman_color; + + pixman_color.alpha = (dc->col.col & 0xff000000) >> 16; + pixman_color.red = (dc->col.col & 0x00ff0000) >> 8; + pixman_color.green = (dc->col.col & 0x0000ff00); + pixman_color.blue = (dc->col.col & 0x000000ff) << 8; + + dc->col.pixman_color_image = pixman_image_create_solid_fill(&pixman_color); +#endif + } EAPI void @@ -159,12 +181,42 @@ evas_common_draw_context_set_mask(RGBA_Draw_Context *dc, RGBA_Image *mask, int x dc->mask.y = y; dc->mask.w = w; dc->mask.h = h; + +#ifdef HAVE_PIXMAN + if (mask->pixman.im) + pixman_image_unref(mask->pixman.im); + + if (mask->cache_entry.flags.alpha) + { + mask->pixman.im = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h, + (uint32_t *)mask->mask.mask, + w * 4); + } + else + { + mask->pixman.im = pixman_image_create_bits(PIXMAN_x8r8g8b8, w, h, + (uint32_t *)mask->mask.mask, + w * 4); + } +#endif + } EAPI void evas_common_draw_context_unset_mask(RGBA_Draw_Context *dc) { dc->mask.mask = NULL; + +#ifdef HAVE_PIXMAN + RGBA_Image *mask; + mask = (RGBA_Image *)dc->mask.mask; + + if (mask && mask->pixman.im) + { + pixman_image_unref(mask->pixman.im); + mask->pixman.im = NULL; + } +#endif } @@ -179,32 +231,32 @@ evas_common_draw_context_add_cutout(RGBA_Draw_Context *dc, int x, int y, int w, { #if 1 // this is a bit faster int xa1, xa2, xb1, xb2; - + xa1 = x; xa2 = xa1 + w - 1; xb1 = dc->clip.x; if (xa2 < xb1) return; xb2 = xb1 + dc->clip.w - 1; if (xa1 >= xb2) return; - if (xa2 > xb2) xa2 = xb2; + if (xa2 > xb2) xa2 = xb2; if (xb1 > xa1) xa1 = xb1; x = xa1; w = xa2 - xa1 + 1; - + xa1 = y; xa2 = xa1 + h - 1; xb1 = dc->clip.y; if (xa2 < xb1) return; - xb2 = xb1 + dc->clip.h - 1; + xb2 = xb1 + dc->clip.h - 1; if (xa1 >= xb2) return; - if (xa2 > xb2) xa2 = xb2; + if (xa2 > xb2) xa2 = xb2; if (xb1 > xa1) xa1 = xb1; y = xa1; h = xa2 - xa1 + 1; -#else +#else RECTS_CLIP_TO_RECT(x, y, w, h, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); -#endif +#endif if ((w < 1) || (h < 1)) return; } evas_common_draw_context_cutouts_add(&dc->cutout, x, y, w, h); @@ -513,7 +565,7 @@ evas_common_draw_context_apply_cutouts(RGBA_Draw_Context *dc) if (!dc->clip.use) return NULL; if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) return NULL; - + res = evas_common_draw_context_cutouts_new(); evas_common_draw_context_cutouts_add(res, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); diff --git a/libraries/evas/src/lib/engines/common/evas_font_draw.c b/libraries/evas/src/lib/engines/common/evas_font_draw.c index 94aa085..638cdfe 100644 --- a/libraries/evas/src/lib/engines/common/evas_font_draw.c +++ b/libraries/evas/src/lib/engines/common/evas_font_draw.c @@ -22,7 +22,7 @@ static int max_cached_words = WORD_CACHE_NWORDS; -struct prword +struct prword { EINA_INLIST; struct cinfo *cinfo; @@ -34,16 +34,16 @@ struct prword int baseline; }; -struct cinfo +struct cinfo { FT_UInt index; - struct + struct { int x, y; } pos; int posx; RGBA_Font_Glyph *fg; - struct + struct { int w,h; int rows; @@ -77,11 +77,11 @@ evas_common_font_draw_init(void) #ifdef EVAS_FRAME_QUEUING EAPI void evas_common_font_draw_finish(void) -{ +{ } #endif -/* +/* * BiDi handling: We receive the shaped string + other props from text_props, * we need to reorder it so we'll have the visual string (the way we draw) * and then for kerning we have to switch the order of the kerning query (as the prev @@ -89,7 +89,7 @@ evas_common_font_draw_finish(void) */ static void evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn __UNUSED__, int x, int y, - const Evas_Text_Props *text_props, RGBA_Gfx_Func func, int ext_x, int ext_y, int ext_w, + const Evas_Text_Props *text_props, RGBA_Gfx_Func func, int ext_x, int ext_y, int ext_w, int ext_h, int im_w, int im_h __UNUSED__) { DATA32 *im; @@ -136,7 +136,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font { xrun -= x + xrun - ext_x - ext_w; } - if (x < ext_x) + if (x < ext_x) { int excess = ext_x - x; xstart = excess - 1; @@ -244,10 +244,29 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font if (j < w) j = w; h = fg->glyph_out->bitmap.rows; /* - if ((fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays) - && (fg->glyph_out->bitmap.num_grays == 256) - ) - */ + if ((fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays) + && (fg->glyph_out->bitmap.num_grays == 256) + ) + */ + +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_FONT + int index; + DATA32 *font_alpha_buffer; + pixman_image_t *font_mask_image; + + font_alpha_buffer = alloca(w * h * sizeof(DATA32)); + for (index = 0; index < (w * h); index++) + font_alpha_buffer[index] = data[index] << 24; + + font_mask_image = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h, + font_alpha_buffer, + w * sizeof(DATA32)); + + if (!font_mask_image) return; +# endif +#endif + { if ((j > 0) && (chr_x + w > ext_x)) { @@ -255,44 +274,63 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font { /* ext glyph draw */ dc->font_ext.func.gl_draw(dc->font_ext.data, - (void *)dst, - dc, fg, chr_x, - y - (chr_y - y)); + (void *)dst, + dc, fg, chr_x, + y - (chr_y - y)); } else { if ((fg->glyph_out->bitmap.num_grays == 256) && - (fg->glyph_out->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY)) + (fg->glyph_out->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY)) { - for (i = 0; i < h; i++) +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_FONT + if ((dst->pixman.im) && + (dc->col.pixman_color_image)) + pixman_image_composite(PIXMAN_OP_OVER, + dc->col.pixman_color_image, + font_mask_image, + dst->pixman.im, + chr_x, + y - (chr_y - y), + 0, 0, + chr_x, + y - (chr_y - y), + w, h); + else +# endif +#endif { - int dx, dy; - int in_x, in_w; - - in_x = 0; - in_w = 0; - dx = chr_x; - dy = y - (chr_y - i - y); + for (i = 0; i < h; i++) + { + int dx, dy; + int in_x, in_w; + + in_x = 0; + in_w = 0; + dx = chr_x; + dy = y - (chr_y - i - y); #ifdef EVAS_SLI - if (((dy) % dc->sli.h) == dc->sli.y) + if (((dy) % dc->sli.h) == dc->sli.y) #endif - { - if ((dx < (ext_x + ext_w)) && - (dy >= (ext_y)) && - (dy < (ext_y + ext_h))) { - if (dx + w > (ext_x + ext_w)) - in_w += (dx + w) - (ext_x + ext_w); - if (dx < ext_x) + if ((dx < (ext_x + ext_w)) && + (dy >= (ext_y)) && + (dy < (ext_y + ext_h))) { - in_w += ext_x - dx; - in_x = ext_x - dx; - dx = ext_x; - } - if (in_w < w) - { - func(NULL, data + (i * j) + in_x, dc->col.col, - im + (dy * im_w) + dx, w - in_w); + if (dx + w > (ext_x + ext_w)) + in_w += (dx + w) - (ext_x + ext_w); + if (dx < ext_x) + { + in_w += ext_x - dx; + in_x = ext_x - dx; + dx = ext_x; + } + if (in_w < w) + { + func(NULL, data + (i * j) + in_x, dc->col.col, + im + (dy * im_w) + dx, w - in_w); + } } } } @@ -309,7 +347,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font { int dx, dy; int in_x, in_w, end; - + in_x = 0; in_w = 0; dx = chr_x; @@ -333,8 +371,8 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font dp++; } if ((dx < (ext_x + ext_w)) && - (dy >= (ext_y)) && - (dy < (ext_y + ext_h))) + (dy >= (ext_y)) && + (dy < (ext_y + ext_h))) { if (dx + w > (ext_x + ext_w)) in_w += (dx + w) - (ext_x + ext_w); @@ -347,7 +385,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font if (in_w < w) { func(NULL, tmpbuf + in_x, dc->col.col, - im + (dy * im_w) + dx, w - in_w); + im + (dy * im_w) + dx, w - in_w); } } } @@ -356,6 +394,11 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font } } } +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_FONT + pixman_image_unref(font_mask_image); +# endif +#endif } else break; @@ -573,7 +616,7 @@ evas_font_word_prerender(RGBA_Draw_Context *dc, const Evas_Text_Props *text_prop } } } - else + else { im = NULL; } @@ -599,7 +642,7 @@ evas_font_word_prerender(RGBA_Draw_Context *dc, const Evas_Text_Props *text_prop { struct prword *last = (struct prword *)(words->last); - if (last) + if (last) { if (last->im) free(last->im); if (last->cinfo) free(last->cinfo); diff --git a/libraries/evas/src/lib/engines/common/evas_font_main.c b/libraries/evas/src/lib/engines/common/evas_font_main.c index 64b1d5e..7b3dabe 100644 --- a/libraries/evas/src/lib/engines/common/evas_font_main.c +++ b/libraries/evas/src/lib/engines/common/evas_font_main.c @@ -39,8 +39,6 @@ evas_common_font_init(void) EAPI void evas_common_font_shutdown(void) { - int error; - if (initialised < 1) return; initialised--; if (initialised != 0) return; @@ -53,7 +51,7 @@ evas_common_font_shutdown(void) evas_common_font_cache_set(0); evas_common_font_flush(); - error = FT_Done_FreeType(evas_ft_lib); + FT_Done_FreeType(evas_ft_lib); #ifdef EVAS_FRAME_QUEUING evas_common_font_draw_finish(); #endif diff --git a/libraries/evas/src/lib/engines/common/evas_image_data.c b/libraries/evas/src/lib/engines/common/evas_image_data.c index 10b3988..2815ff8 100644 --- a/libraries/evas/src/lib/engines/common/evas_image_data.c +++ b/libraries/evas/src/lib/engines/common/evas_image_data.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include "evas_common.h" diff --git a/libraries/evas/src/lib/engines/common/evas_image_load.c b/libraries/evas/src/lib/engines/common/evas_image_load.c index c7eff3f..21ac5d4 100644 --- a/libraries/evas/src/lib/engines/common/evas_image_load.c +++ b/libraries/evas/src/lib/engines/common/evas_image_load.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include diff --git a/libraries/evas/src/lib/engines/common/evas_image_main.c b/libraries/evas/src/lib/engines/common/evas_image_main.c index d4d847c..d2f8c0b 100644 --- a/libraries/evas/src/lib/engines/common/evas_image_main.c +++ b/libraries/evas/src/lib/engines/common/evas_image_main.c @@ -145,7 +145,7 @@ _evas_common_rgba_image_new(void) #endif evas_common_rgba_image_scalecache_init(&im->cache_entry); - + return &im->cache_entry; } @@ -161,7 +161,7 @@ _evas_common_rgba_image_delete(Image_Entry *ie) LKD(im->cache_entry.ref_fq_del); eina_condition_free(&(im->cache_entry.cond_fq_del)); # endif -#endif +#endif evas_common_rgba_image_scalecache_shutdown(&im->cache_entry); if (ie->info.module) evas_module_unref((Evas_Module *)ie->info.module); /* memset the image to 0x99 because i recently saw a segv where an @@ -173,13 +173,13 @@ _evas_common_rgba_image_delete(Image_Entry *ie) // memset(im, 0x99, sizeof(im)); #ifdef EVAS_CSERVE if (ie->data1) evas_cserve_image_free(ie); -#endif +#endif /* * FIXME: This doesn't seem to be needed... But I'm not sure why. * -- nash { Filtered_Image *fi; - + EINA_LIST_FREE(im->filtered, fi) { free(fi->key); @@ -249,8 +249,8 @@ evas_common_rgba_image_unload(Image_Entry *ie) #endif return; } -#endif - +#endif + if (im->image.data && !im->image.no_free) free(im->image.data); im->image.data = NULL; @@ -266,18 +266,19 @@ void _evas_common_rgba_image_post_surface(Image_Entry *ie) { #ifdef HAVE_PIXMAN - RGBA_Image *im = (RGBA_Image *) ie; - +# ifdef PIXMAN_IMAGE + RGBA_Image *im = (RGBA_Image *)ie; + if (im->pixman.im) pixman_image_unref(im->pixman.im); if (im->cache_entry.flags.alpha) { im->pixman.im = pixman_image_create_bits ( -// FIXME: endianess determines this +// FIXME: endianess determines this PIXMAN_a8r8g8b8, -// PIXMAN_b8g8r8a8, +// PIXMAN_b8g8r8a8, im->cache_entry.w, im->cache_entry.h, - im->image.data, + im->image.data, im->cache_entry.w * 4 ); } @@ -285,16 +286,19 @@ _evas_common_rgba_image_post_surface(Image_Entry *ie) { im->pixman.im = pixman_image_create_bits ( -// FIXME: endianess determines this +// FIXME: endianess determines this PIXMAN_x8r8g8b8, // PIXMAN_b8g8r8x8, im->cache_entry.w, im->cache_entry.h, - im->image.data, + im->image.data, im->cache_entry.w * 4 ); } +# else + (void)ie; +# endif #else - ie = NULL; + (void)ie; #endif } @@ -306,7 +310,7 @@ _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned #ifdef EVAS_CSERVE if (ie->data1) return 0; -#endif +#endif if (im->image.no_free) return 0; if (im->flags & RGBA_IMAGE_ALPHA_ONLY) @@ -328,7 +332,7 @@ _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned # endif #endif _evas_common_rgba_image_post_surface(ie); - + return 0; } @@ -338,12 +342,14 @@ _evas_common_rgba_image_surface_delete(Image_Entry *ie) RGBA_Image *im = (RGBA_Image *) ie; #ifdef HAVE_PIXMAN +# ifdef PIXMAN_IMAGE if (im->pixman.im) { pixman_image_unref(im->pixman.im); im->pixman.im = NULL; } -#endif +# endif +#endif if (ie->file) DBG("unload: [%p] %s %s", ie, ie->file, ie->key); if ((im->cs.data) && (im->image.data)) @@ -364,7 +370,7 @@ _evas_common_rgba_image_surface_delete(Image_Entry *ie) #ifdef EVAS_CSERVE else if (ie->data1) evas_cserve_image_free(ie); -#endif +#endif im->image.data = NULL; ie->allocated.w = 0; @@ -391,7 +397,7 @@ _evas_common_rgba_image_dirty_region(Image_Entry* ie, unsigned int x __UNUSED__, #ifdef EVAS_CSERVE if (ie->data1) evas_cserve_image_free(ie); -#endif +#endif im->flags |= RGBA_IMAGE_IS_DIRTY; evas_common_rgba_image_scalecache_dirty(&im->cache_entry); } @@ -411,13 +417,13 @@ _evas_common_rgba_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src) { #ifdef EVAS_CSERVE if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src); -#endif +#endif return 1; } #ifdef EVAS_CSERVE if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src); -#endif +#endif evas_common_image_colorspace_normalize(src); evas_common_image_colorspace_normalize(dst); /* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */ @@ -431,18 +437,18 @@ _evas_common_rgba_image_ram_usage(Image_Entry *ie) { RGBA_Image *im = (RGBA_Image *)ie; int size = sizeof(struct _RGBA_Image); - + if (ie->cache_key) size += strlen(ie->cache_key); if (ie->file) size += strlen(ie->file); if (ie->key) size += strlen(ie->key); - + if (im->image.data) { #ifdef EVAS_CSERVE if ((!im->image.no_free) || (ie->data1)) #else if ((!im->image.no_free)) -#endif +#endif size += im->cache_entry.w * im->cache_entry.h * sizeof(DATA32); } size += evas_common_rgba_image_scalecache_usage_get(&im->cache_entry); @@ -590,7 +596,7 @@ evas_common_image_colorspace_normalize(RGBA_Image *im) { #ifdef EVAS_CSERVE if (((Image_Entry *)im)->data1) evas_cserve_image_free(&im->cache_entry); -#endif +#endif if (!im->image.no_free) free(im->image.data); im->image.data = im->cs.data; im->cs.no_free = im->image.no_free; diff --git a/libraries/evas/src/lib/engines/common/evas_image_scalecache.c b/libraries/evas/src/lib/engines/common/evas_image_scalecache.c index 24a4f2d..e4e4790 100644 --- a/libraries/evas/src/lib/engines/common/evas_image_scalecache.c +++ b/libraries/evas/src/lib/engines/common/evas_image_scalecache.c @@ -48,9 +48,7 @@ struct _Scaleitem #ifdef SCALECACHE static unsigned long long use_counter = 0; -#ifdef BUILD_PTHREAD static LK(cache_lock); -#endif static Eina_Inlist *cache_list = NULL; static unsigned int cache_size = 0; static int init = 0; diff --git a/libraries/evas/src/lib/engines/common/evas_line_main.c b/libraries/evas/src/lib/engines/common/evas_line_main.c index 04401cb..aacf805 100644 --- a/libraries/evas/src/lib/engines/common/evas_line_main.c +++ b/libraries/evas/src/lib/engines/common/evas_line_main.c @@ -109,9 +109,24 @@ _evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y) return; if ((dc->clip.use) && (!IN_RECT(x, y, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h))) return; - pfunc = evas_common_gfx_func_composite_color_pt_get(dc->col.col, dst, dc->render_op); - if (pfunc) - pfunc(0, 255, dc->col.col, dst->image.data + (dst->cache_entry.w * y) + x); +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_op_t op = PIXMAN_OP_SRC; + + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; + + if ((dst->pixman.im) && (dc->col.pixman_color_image)) + pixman_image_composite(op, dc->col.pixman_color_image, NULL, + dst->pixman.im, x, y, 0, 0, x, y, 1, 1); + else +# endif +#endif + { + pfunc = evas_common_gfx_func_composite_color_pt_get(dc->col.col, dst, dc->render_op); + if (pfunc) + pfunc(0, 255, dc->col.col, dst->image.data + (dst->cache_entry.w * y) + x); + } } /* @@ -130,6 +145,14 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i RGBA_Gfx_Pt_Func pfunc; RGBA_Gfx_Func sfunc; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; +# endif +#endif + dstw = dst->cache_entry.w; color = dc->col.col; @@ -172,12 +195,30 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i len = x1 - x0 + 1; p = dst->image.data + (dstw * y0) + x0; - sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op); - if (sfunc) - sfunc(NULL, NULL, color, p, len); - } - } - return; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + NULL, dst->pixman.im, + x0, y0, 0, 0, x0, y0, len, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + x0, y0, 0, 0, x0, y0, len, 1); + else +# endif +#endif + { + sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op); + if (sfunc) + sfunc(NULL, NULL, color, p, len); + } + } + } + return; } pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, dc->render_op); @@ -192,17 +233,34 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i len = y1 - y0 + 1; p = dst->image.data + (dstw * y0) + x0; - while (len--) - { +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + NULL, dst->pixman.im, + x0, y0, 0, 0, x0, y0, 1, len); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, dst->pixman.im, + x0, y0, 0, 0, x0, y0, 1, len); + else +# endif +#endif + { + while (len--) + { #ifdef EVAS_SLI - if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y) + if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y) #endif - { - pfunc(0, 255, color, p); - } - p += dstw; - } - } + { + pfunc(0, 255, color, p); + } + p += dstw; + } + } + } return; } @@ -281,16 +339,52 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i if (dx > 0) dstw--; else dstw++; } - +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + int pixman_x_position = x0; + int pixman_y_position = y0; + int x_unit = dstw - dst->cache_entry.w; +# endif +#endif + + while (len--) { #ifdef EVAS_SLI if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y) #endif { - pfunc(0, 255, color, p); - } - p += dstw; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + NULL, dst->pixman.im, + pixman_x_position, + pixman_y_position, + 0, 0, pixman_x_position, + pixman_y_position, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pixman_x_position, + pixman_y_position, 0, 0, + pixman_x_position, + pixman_y_position, 1, 1); + else +# endif +#endif + pfunc(0, 255, color, p); + } +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_x_position += x_unit; + pixman_y_position += 1; +# endif +#endif + p += dstw; } } } @@ -456,6 +550,31 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, dx = x1 - x0; dy = y1 - y0; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + int pix_x; + int pix_y; + int pix_x_unit; + int pix_y_unit; + + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; + pix_x = x0; + pix_y = y0; + + if (dx < 0) + pix_x_unit = -1; + else + pix_x_unit = 1; + + if (dy < 0) + pix_y_unit = -1; + else + pix_y_unit = 1; +# endif +#endif + if ( (dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy) ) { _evas_draw_simple_line(dst, dc, x0, y0, x1, y1); @@ -494,6 +613,11 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, prev_y = y; p += dh; py += dely; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_y += pix_y_unit; +# endif +#endif } if (!p1_in) { @@ -509,12 +633,37 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, #endif { if (IN_RANGE(px, py, clw, clh)) - pfunc(0, 255, color, p); - } - next_x: - yy += dyy; - px++; - p++; + { +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + NULL, dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else +# endif +#endif + pfunc(0, 255, color, p); + } + } +next_x: + yy += dyy; + px++; + p++; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_x += pix_x_unit; +# endif +#endif } return; } @@ -529,9 +678,14 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, x += ((xx - (x << 16)) >> 15); if (prev_x != x) { - prev_x = x; - px += delx; - p += delx; + prev_x = x; + px += delx; + p += delx; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_x += pix_x_unit; +# endif +#endif } if (!p1_in) { @@ -547,12 +701,38 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, #endif { if (IN_RANGE(px, py, clw, clh)) - pfunc(0, 255, color, p); - } - next_y: + { +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + NULL, dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else +# endif +#endif + pfunc(0, 255, color, p); + } + } +next_y: xx += dxx; py++; p += dstw; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_y += pix_y_unit; +# endif +#endif + } } @@ -568,12 +748,43 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x DATA32 *p, *data, color; RGBA_Gfx_Pt_Func pfunc; + dx = x1 - x0; + dy = y1 - y0; + +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + int pix_x; + int pix_y; + int pix_x_unit; + int pix_y_unit; + + pixman_image_t *aa_mask_image; + int alpha_data_buffer; + + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; + pix_x = x0; + pix_y = y0; + + if (dx < 0) + pix_x_unit = -1; + else + pix_x_unit = 1; + + if (dy < 0) + pix_y_unit = -1; + else + pix_y_unit = 1; +# endif +#endif if (y0 > y1) EXCHANGE_POINTS(x0, y0, x1, y1); + dx = x1 - x0; dy = y1 - y0; - if ( (dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy) ) + if ((dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy)) { _evas_draw_simple_line(dst, dc, x0, y0, x1, y1); return; @@ -609,9 +820,14 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x y = (yy >> 16); if (prev_y != y) { - prev_y = y; - p += dh; - py += dely; + prev_y = y; + p += dh; + py += dely; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_y += pix_y_unit; +# endif +#endif } if (!p1_in) { @@ -624,39 +840,109 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x } if (px < clw) { - aa = ((yy - (y << 16)) >> 8); - if ((py) < clh) - pfunc(0, 255 - aa, color, p); - if ((py + 1) < clh) - pfunc(0, aa, color, p + dstw); - } - - next_x: - yy += dyy; - px++; - p++; + aa = ((yy - (y << 16)) >> 8); + if ((py) < clh) + { +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + alpha_data_buffer = 255 - aa; + aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, + (uint32_t *)&alpha_data_buffer, 4); + + if ((dst->pixman.im) && (dc->col.pixman_color_image ) && + (!dc->mask.mask)) + pixman_image_composite(PIXMAN_OP_OVER, + dc->col.pixman_color_image, + aa_mask_image, dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask) ) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else +# endif +#endif + pfunc(0, 255 - aa, color, p); +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_image_unref(aa_mask_image); +# endif +#endif + } + if ((py + 1) < clh) + { +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + alpha_data_buffer = aa; + aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, + (uint32_t *)&alpha_data_buffer, 4); + + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(PIXMAN_OP_OVER, + dc->col.pixman_color_image, + aa_mask_image, dst->pixman.im, + pix_x, pix_y + 1, 0, 0, + pix_x, pix_y + 1, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x, pix_y + 1, 0, 0, + pix_x, pix_y + 1, 1, 1); + else +# endif +#endif + pfunc(0, aa, color, p + dstw); +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_image_unref(aa_mask_image); +# endif +#endif + } + } + +next_x: + yy += dyy; + px++; + p++; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_x += pix_x_unit; +# endif +#endif } return; } - + /* steep: y-parametric */ SETUP_LINE_STEEP; while (py < by) { DATA8 aa; - + x = (xx >> 16); if (prev_x != x) { - prev_x = x; - px += delx; - p += delx; + prev_x = x; + px += delx; + p += delx; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_x += pix_x_unit; +# endif +#endif } if (!p1_in) { - if ((px < 0) && (delx < 0)) return; - if ((px > rx) && (delx > 0)) return; + if ((px < 0) && (delx < 0)) return; + if ((px > rx) && (delx > 0)) return; } if (!p0_in) { @@ -664,15 +950,80 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x } if (py < clh) { - aa = ((xx - (x << 16)) >> 8); - if ((px) < clw) - pfunc(0, 255 - aa, color, p); - if ((px + 1) < clw) - pfunc(0, aa, color, p + 1); - } + aa = ((xx - (x << 16)) >> 8); + if ((px) < clw) + { +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + alpha_data_buffer = 255 - aa; + aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, (uint32_t *)&alpha_data_buffer, 4); + + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(PIXMAN_OP_OVER, + dc->col.pixman_color_image, + aa_mask_image, dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else +# endif +#endif + pfunc(0, 255 - aa, color, p); +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_image_unref(aa_mask_image); +# endif +#endif + + } + if ((px + 1) < clw) + { +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + alpha_data_buffer = aa; + aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, + (uint32_t *)&alpha_data_buffer, 4); + + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(PIXMAN_OP_OVER, + dc->col.pixman_color_image, + aa_mask_image, dst->pixman.im, + pix_x + 1, pix_y, 0, 0, + pix_x + 1, pix_y, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x + 1, pix_y, 0, 0, + pix_x + 1, pix_y, 1, 1); + else +# endif +#endif + pfunc(0, aa, color, p + 1); +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_image_unref(aa_mask_image); +# endif +#endif + } + } next_y: xx += dxx; py++; p += dstw; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_y += pix_y_unit; +# endif +#endif } } diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in index 4c721f9..78e893d 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in @@ -166,8 +166,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -184,6 +182,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -265,6 +265,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in index e796ef2..e00dac8 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in @@ -203,8 +203,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -221,6 +219,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -302,6 +302,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c index 64d5a86..1843265 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c @@ -53,7 +53,8 @@ _op_blend_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 static void init_blend_color_span_funcs_sse3(void) { - op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_c_dp_sse3; +// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) +// op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_c_dp_sse3; op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_caa_dp_sse3; // FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c index 83230e5..5883d15 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c @@ -168,7 +168,8 @@ _op_blend_mas_can_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, i static void init_blend_mask_color_span_funcs_sse3(void) { - op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_mas_c_dp_sse3; +// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) +// op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_mas_c_dp_sse3; op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_mas_cn_dp_sse3; op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_mas_can_dp_sse3; op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_mas_caa_dp_sse3; diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c index 2e72fec..69c597c 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c @@ -146,7 +146,6 @@ init_blend_pixel_span_funcs_sse3(void) op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pas_dp_sse3; op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pan_dp_sse3; - // FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) // op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_p_dpan_sse3; op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pas_dpan_sse3; diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in index 52658a4..40536c0 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in @@ -166,8 +166,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -184,6 +182,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -265,6 +265,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in index 0ccd7f3..d5764b1 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in @@ -166,8 +166,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -184,6 +182,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -265,6 +265,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in index f239cf7..d5452fe 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in @@ -166,8 +166,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -184,6 +182,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -265,6 +265,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in index b68ed3b..4b93b1b 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in @@ -166,8 +166,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -184,6 +182,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -265,6 +265,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_polygon_main.c b/libraries/evas/src/lib/engines/common/evas_polygon_main.c index bca3f83..ea0bf13 100644 --- a/libraries/evas/src/lib/engines/common/evas_polygon_main.c +++ b/libraries/evas/src/lib/engines/common/evas_polygon_main.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include "evas_common.h" @@ -133,6 +137,14 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po int ext_x, ext_y, ext_w, ext_h; int *sorted_index; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_POLY + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; +# endif +#endif + ext_x = 0; ext_y = 0; ext_w = dst->cache_entry.w; @@ -279,10 +291,30 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po if (((span->y) % dc->sli.h) == dc->sli.y) #endif { - ptr = dst->image.data + (span->y * (dst->cache_entry.w)) + span->x; - func(NULL, NULL, dc->col.col, ptr, span->w); - } - } +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_POLY + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + NULL, dst->pixman.im, + span->x, span->y, 0, 0, + span->x, span->y, span->w, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + span->x, span->y, 0, 0, + span->x, span->y, span->w, 1); + else +# endif +#endif + { + ptr = dst->image.data + (span->y * (dst->cache_entry.w)) + span->x; + func(NULL, NULL, dc->col.col, ptr, span->w); + } + } + } while (spans) { span = (RGBA_Span *)spans; diff --git a/libraries/evas/src/lib/engines/common/evas_rectangle_main.c b/libraries/evas/src/lib/engines/common/evas_rectangle_main.c index 28aaf16..fc25fd0 100644 --- a/libraries/evas/src/lib/engines/common/evas_rectangle_main.c +++ b/libraries/evas/src/lib/engines/common/evas_rectangle_main.c @@ -58,16 +58,34 @@ rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, in RECTS_CLIP_TO_RECT(x, y, w, h, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); if ((w <= 0) || (h <= 0)) return; - func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, w, dc->render_op); - ptr = dst->image.data + (y * dst->cache_entry.w) + x; - for (yy = 0; yy < h; yy++) +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_RECT + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; + + if ((dst->pixman.im) && (dc->col.pixman_color_image)) { + pixman_image_composite(op, dc->col.pixman_color_image, NULL, + dst->pixman.im, x, y, 0, 0, + x, y, w, h); + } + else +# endif +#endif + { + func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, w, dc->render_op); + ptr = dst->image.data + (y * dst->cache_entry.w) + x; + for (yy = 0; yy < h; yy++) + { #ifdef EVAS_SLI - if (((yy + y) % dc->sli.h) == dc->sli.y) + if (((yy + y) % dc->sli.h) == dc->sli.y) #endif - { - func(NULL, NULL, dc->col.col, ptr, w); - } - ptr += dst->cache_entry.w; + { + func(NULL, NULL, dc->col.col, ptr, w); + } + ptr += dst->cache_entry.w; + } } } diff --git a/libraries/evas/src/lib/engines/common/evas_scale_sample.c b/libraries/evas/src/lib/engines/common/evas_scale_sample.c index 54b8e92..a8951b8 100644 --- a/libraries/evas/src/lib/engines/common/evas_scale_sample.c +++ b/libraries/evas/src/lib/engines/common/evas_scale_sample.c @@ -154,7 +154,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, dst_clip_w = m_clip_w; dst_clip_h = m_clip_h; } - + if (dst_clip_x < dst_region_x) { dst_clip_w += dst_clip_x - dst_region_x; @@ -258,7 +258,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, func = evas_common_gfx_func_composite_pixel_mask_span_get(src, dst, dst_clip_w, dc->render_op); maskobj = dc->mask.mask; mask = maskobj->mask.mask; -/* +/* if (1 || dst_region_w > src_region_w || dst_region_h > src_region_h){ printf("Mask w/h: %d/%d\n",maskobj->cache_entry.w, maskobj->cache_entry.h); @@ -276,26 +276,47 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, if ((dst_region_w == src_region_w) && (dst_region_h == src_region_h)) { #ifdef HAVE_PIXMAN - if ((1) && - (src->pixman.im) && (dst->pixman.im) && +# ifdef PIXMAN_IMAGE_SCALE_SAMPLE + if ((src->pixman.im) && (dst->pixman.im) && (!dc->mask.mask) && ((!dc->mul.use) || ((dc->mul.use) && (dc->mul.col == 0xffffffff))) && ((dc->render_op == _EVAS_RENDER_COPY) || - (dc->render_op == _EVAS_RENDER_BLEND)) - ) + (dc->render_op == _EVAS_RENDER_BLEND))) { pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY - if (dc->render_op == _EVAS_RENDER_BLEND) op = PIXMAN_OP_OVER; + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; + pixman_image_composite(op, src->pixman.im, NULL, dst->pixman.im, (dst_clip_x - dst_region_x) + src_region_x, - (dst_clip_y - dst_region_y) + src_region_y, + (dst_clip_y - dst_region_y) + src_region_y, 0, 0, - dst_clip_x, dst_clip_y, + dst_clip_x, dst_clip_y, + dst_clip_w, dst_clip_h); + } + else if ((src->pixman.im) && (dst->pixman.im) && + (dc->mask.mask) && (dc->mask.mask->pixman.im) && + ((dc->render_op == _EVAS_RENDER_COPY) || + (dc->render_op == _EVAS_RENDER_BLEND))) + { + // In case of pixel and color operation. + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; + + pixman_image_composite(op, + src->pixman.im, dc->mask.mask->pixman.im, + dst->pixman.im, + (dst_clip_x - dst_region_x) + src_region_x, + (dst_clip_y - dst_region_y) + src_region_y, + 0, 0, + dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h); } else +# endif #endif { ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x; @@ -322,59 +343,59 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, } else { - /* fill scale tables */ + /* fill scale tables */ for (x = 0; x < dst_clip_w; x++) - lin_ptr[x] = (((x + dst_clip_x - dst_region_x) * src_region_w) / dst_region_w) + src_region_x; + lin_ptr[x] = (((x + dst_clip_x - dst_region_x) * src_region_w) / dst_region_w) + src_region_x; for (y = 0; y < dst_clip_h; y++) - row_ptr[y] = src_data + (((((y + dst_clip_y - dst_region_y) * src_region_h) / dst_region_h) - + src_region_y) * src_w); + row_ptr[y] = src_data + (((((y + dst_clip_y - dst_region_y) * src_region_h) / dst_region_h) + + src_region_y) * src_w); /* scale to dst */ dptr = dst_ptr; #ifdef DIRECT_SCALE if ((!src->cache_entry.flags.alpha) && - (!dst->cache_entry.flags.alpha) && - (!dc->mul.use)) + (!dst->cache_entry.flags.alpha) && + (!dc->mul.use)) { for (y = 0; y < dst_clip_h; y++) { -#ifdef EVAS_SLI - if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) -#endif - { - dst_ptr = dptr; - for (x = 0; x < dst_clip_w; x++) - { - ptr = row_ptr[y] + lin_ptr[x]; - *dst_ptr = *ptr; - dst_ptr++; - } - } - dptr += dst_w; - } +# ifdef EVAS_SLI + if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) +# endif + { + dst_ptr = dptr; + for (x = 0; x < dst_clip_w; x++) + { + ptr = row_ptr[y] + lin_ptr[x]; + *dst_ptr = *ptr; + dst_ptr++; + } + } + dptr += dst_w; + } } else #endif { /* a scanline buffer */ - buf = alloca(dst_clip_w * sizeof(DATA32)); - for (y = 0; y < dst_clip_h; y++) - { + buf = alloca(dst_clip_w * sizeof(DATA32)); + for (y = 0; y < dst_clip_h; y++) + { #ifdef EVAS_SLI - if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) + if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) #endif - { - dst_ptr = buf; - for (x = 0; x < dst_clip_w; x++) - { - ptr = row_ptr[y] + lin_ptr[x]; - *dst_ptr = *ptr; - dst_ptr++; - } - /* * blend here [clip_w *] buf -> dptr * */ - func(buf, NULL, dc->mul.col, dptr, dst_clip_w); - } - dptr += dst_w; - } + { + dst_ptr = buf; + for (x = 0; x < dst_clip_w; x++) + { + ptr = row_ptr[y] + lin_ptr[x]; + *dst_ptr = *ptr; + dst_ptr++; + } + /* * blend here [clip_w *] buf -> dptr * */ + func(buf, NULL, dc->mul.col, dptr, dst_clip_w); + } + dptr += dst_w; + } } } } diff --git a/libraries/evas/src/lib/engines/common/evas_tiler.c b/libraries/evas/src/lib/engines/common/evas_tiler.c index 0bbe811..ff359a4 100644 --- a/libraries/evas/src/lib/engines/common/evas_tiler.c +++ b/libraries/evas/src/lib/engines/common/evas_tiler.c @@ -19,7 +19,9 @@ static inline list_node_t *rect_list_add_split_fuzzy(list_t *rects, list_node_t static inline void rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error); static inline void rect_list_add_split_fuzzy_and_merge(list_t *rects, list_node_t *node, int split_accepted_error, int merge_accepted_error); static inline void rect_print(const rect_t r); +#if 0 static inline void rect_list_print(const list_t rects); +#endif static const list_node_t list_node_zeroed = { NULL }; static const list_t list_zeroed = { NULL, NULL }; @@ -117,6 +119,7 @@ rect_print(const rect_t r) INF("", r.left, r.top, r.width, r.height); } +#if 0 static inline void rect_list_print(const list_t rects) { @@ -143,6 +146,7 @@ rect_list_print(const list_t rects) } putchar(']'); } +#endif static inline void rect_list_append_node(list_t *rects, list_node_t *node) diff --git a/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c b/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c index 9f7859b..002cfbe 100644 --- a/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c +++ b/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include diff --git a/libraries/evas/src/lib/engines/common/language/evas_language_utils.c b/libraries/evas/src/lib/engines/common/language/evas_language_utils.c index 9c9b3e3..b362f10 100644 --- a/libraries/evas/src/lib/engines/common/language/evas_language_utils.c +++ b/libraries/evas/src/lib/engines/common/language/evas_language_utils.c @@ -13,6 +13,12 @@ * * @{ */ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + #include #include "evas_language_utils.h" diff --git a/libraries/evas/src/lib/engines/common_16/Makefile.in b/libraries/evas/src/lib/engines/common_16/Makefile.in index 9097a8d..313cbda 100644 --- a/libraries/evas/src/lib/engines/common_16/Makefile.in +++ b/libraries/evas/src/lib/engines/common_16/Makefile.in @@ -201,8 +201,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -219,6 +217,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -300,6 +300,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common_8/Makefile.in b/libraries/evas/src/lib/engines/common_8/Makefile.in index 06c13de..7fa4fbb 100644 --- a/libraries/evas/src/lib/engines/common_8/Makefile.in +++ b/libraries/evas/src/lib/engines/common_8/Makefile.in @@ -200,8 +200,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -218,6 +216,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -299,6 +299,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/file/Makefile.in b/libraries/evas/src/lib/file/Makefile.in index 599d980..2ac89b1 100644 --- a/libraries/evas/src/lib/file/Makefile.in +++ b/libraries/evas/src/lib/file/Makefile.in @@ -196,8 +196,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -214,6 +212,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -295,6 +295,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/file/evas_module.c b/libraries/evas/src/lib/file/evas_module.c index 6b4d4f6..21d5cd0 100644 --- a/libraries/evas/src/lib/file/evas_module.c +++ b/libraries/evas/src/lib/file/evas_module.c @@ -285,7 +285,7 @@ evas_module_register(const Evas_Module_Api *module, Evas_Module_Type type) if (type == EVAS_MODULE_TYPE_ENGINE) { eina_array_push(evas_engines, em); - em->id_engine = eina_array_count_get(evas_engines); + em->id_engine = eina_array_count(evas_engines); } eina_hash_direct_add(evas_modules[type], module->name, em); @@ -398,7 +398,7 @@ Evas_Module * evas_module_engine_get(int render_method) { if ((render_method <= 0) || - ((unsigned int)render_method > eina_array_count_get(evas_engines))) + ((unsigned int)render_method > eina_array_count(evas_engines))) return NULL; return eina_array_data_get(evas_engines, render_method - 1); } diff --git a/libraries/evas/src/lib/file/evas_path.c b/libraries/evas/src/lib/file/evas_path.c index ff13e20..c663c16 100644 --- a/libraries/evas/src/lib/file/evas_path.c +++ b/libraries/evas/src/lib/file/evas_path.c @@ -123,7 +123,7 @@ evas_file_path_list(char *path, const char *match, int match_case) else files = eina_list_append(files, strdup(info->path + info->name_start)); } - eina_iterator_free(it); + if (it) eina_iterator_free(it); return files; } diff --git a/libraries/evas/src/lib/include/Makefile.in b/libraries/evas/src/lib/include/Makefile.in index 9d5c371..21f0099 100644 --- a/libraries/evas/src/lib/include/Makefile.in +++ b/libraries/evas/src/lib/include/Makefile.in @@ -166,8 +166,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -184,6 +182,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -265,6 +265,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/include/evas_common.h b/libraries/evas/src/lib/include/evas_common.h index f817202..a9063e6 100644 --- a/libraries/evas/src/lib/include/evas_common.h +++ b/libraries/evas/src/lib/include/evas_common.h @@ -1,9 +1,9 @@ #ifndef EVAS_COMMON_H #define EVAS_COMMON_H -#ifdef HAVE_CONFIG_H -# include "config.h" /* so that EAPI in Evas.h is correctly defined */ -#endif +//#ifdef HAVE_CONFIG_H +#include "config.h" /* so that EAPI in Evas.h is correctly defined */ +//#endif #ifdef HAVE_EVIL # include @@ -138,8 +138,6 @@ extern EAPI int _evas_log_dom_global; # define BUILD_PTHREAD #endif -#ifdef BUILD_PTHREAD - #define LK(x) Eina_Lock x #define LKI(x) eina_lock_new(&(x)) #define LKD(x) eina_lock_free(&(x)) @@ -148,42 +146,28 @@ extern EAPI int _evas_log_dom_global; #define LKU(x) eina_lock_release(&(x)) #define LKDBG(x) eina_lock_debug(&(x)) +/* for rwlocks */ +#define RWLK(x) Eina_RWLock x +#define RWLKI(x) eina_rwlock_new(&(x)) +#define RWLKD(x) eina_rwlock_free(&(x)) +#define RDLKL(x) eina_rwlock_take_read(&(x)) +#define WRLKL(x) eina_rwlock_take_write(&(x)) +#define RWLKU(x) eina_rwlock_release(&(x)) + +#ifdef BUILD_PTHREAD + # define TH(x) pthread_t x # define THI(x) int x # define TH_MAX 8 -/* for rwlocks */ -#define RWLK(x) pthread_rwlock_t x -#define RWLKI(x) pthread_rwlock_init(&(x), NULL) -#define RWLKD(x) pthread_rwlock_destroy(&(x)) -#define RDLKL(x) pthread_rwlock_rdlock(&(x)) -#define WRLKL(x) pthread_rwlock_wrlock(&(x)) -#define RWLKU(x) pthread_rwlock_unlock(&(x)) - - // even though in theory having every Nth rendered line done by a different // thread might even out load across threads - it actually slows things down. //#define EVAS_SLI 1 #else -# define LK(x) -# define LKI(x) -# define LKD(x) -# define LKL(x) -# define LKT(x) 1 -# define LKU(x) # define TH(x) # define THI(x) # define TH_MAX 0 -# define LKDBG(x) - -/* for rwlocks */ -#define RWLK(x) -#define RWLKI(x) -#define RWLKD(x) -#define RDLKL(x) -#define WRLKL(x) -#define RWLKU(x) #endif @@ -338,6 +322,21 @@ void *alloca (size_t); #define pld(addr, off) #endif /* __ARMEL__ */ +// these here are in config.h - just here for documentation +//#ifdef __ARM_ARCH__ +// *IF* you enable pixman, this determines which things pixman will do +////#define PIXMAN_FONT 1 +////#define PIXMAN_RECT 1 +////#define PIXMAN_LINE 1 +////#define PIXMAN_POLY 1 +//#define PIXMAN_IMAGE 1 +//#define PIXMAN_IMAGE_SCALE_SAMPLE 1 +//#endif +// not related to pixman but an alternate rotate code +//#define TILE_ROTATE 1 + +#define TILE_CACHE_LINE_SIZE 64 + /*****************************************************************************/ #define UNROLL2(op...) op op @@ -678,6 +677,9 @@ struct _RGBA_Draw_Context DATA32 col; } mul; struct { +#ifdef HAVE_PIXMAN + pixman_image_t *pixman_color_image; +#endif DATA32 col; } col; struct RGBA_Draw_Context_clip { @@ -1032,14 +1034,14 @@ struct _Tilebuf int x, y, w, h; } prev_add, prev_del; #ifdef RECTUPDATE -/* +/* Regionbuf *rb; */ #elif defined(EVAS_RECT_SPLIT) int need_merge; list_t rects; #else -/* +/* struct { int w, h; Tilebuf_Tile *tiles; diff --git a/libraries/evas/src/lib/include/evas_private.h b/libraries/evas/src/lib/include/evas_private.h index 90498d0..84c1d36 100644 --- a/libraries/evas/src/lib/include/evas_private.h +++ b/libraries/evas/src/lib/include/evas_private.h @@ -301,12 +301,13 @@ struct _Evas struct { unsigned char inside : 1; int mouse_grabbed; + int downs; DATA32 button; Evas_Coord x, y; + int nogrep; struct { Eina_List *in; } object; - } pointer; struct { @@ -320,6 +321,12 @@ struct _Evas unsigned char changed : 1; } output; + struct + { + Evas_Coord x, y, w, h; + Eina_Bool changed : 1; + } framespace; + Eina_List *damages; Eina_List *obscures; @@ -331,6 +338,7 @@ struct _Evas int walking_list; int events_frozen; + Evas_Event_Flags default_event_flags; struct { Evas_Module *module; @@ -577,7 +585,7 @@ struct _Evas_Object unsigned char recalculate_cycle; Eina_Clist calc_entry; - Evas_Object_Pointer_Mode pointer_mode : 1; + Evas_Object_Pointer_Mode pointer_mode : 2; Eina_Bool store : 1; Eina_Bool pass_events : 1; @@ -608,6 +616,8 @@ struct _Evas_Object Eina_Bool changed_move_only : 1; Eina_Bool changed_nomove : 1; Eina_Bool del_ref : 1; + + Eina_Bool is_frame : 1; }; struct _Evas_Func_Node @@ -772,6 +782,7 @@ struct _Evas_Func char *(*image_format_get) (void *data, void *image); void (*image_colorspace_set) (void *data, void *image, int cspace); int (*image_colorspace_get) (void *data, void *image); + Eina_Bool (*image_can_region_get) (void *data, void *image); void (*image_mask_create) (void *data, void *image); void *(*image_native_set) (void *data, void *image, void *native); void *(*image_native_get) (void *data, void *image); @@ -861,6 +872,7 @@ struct _Evas_Image_Load_Func Eina_Bool (*file_head) (Image_Entry *ie, const char *file, const char *key, int *error); Eina_Bool (*file_data) (Image_Entry *ie, const char *file, const char *key, int *error); double (*frame_duration) (Image_Entry *ie, const char *file, const int start, const int frame_num); + Eina_Bool do_region; }; struct _Evas_Image_Save_Func @@ -904,7 +916,7 @@ void evas_object_clip_across_check(Evas_Object *obj); void evas_object_clip_across_clippees_check(Evas_Object *obj); void evas_object_mapped_clip_across_mark(Evas_Object *obj); void evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info); -void evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info); +void evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id); Eina_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y); int evas_mem_free(int mem_required); int evas_mem_degrade(int mem_required); diff --git a/libraries/evas/src/modules/Makefile.in b/libraries/evas/src/modules/Makefile.in index 9cd0201..e4f1cbc 100644 --- a/libraries/evas/src/modules/Makefile.in +++ b/libraries/evas/src/modules/Makefile.in @@ -206,8 +206,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -224,6 +222,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -305,6 +305,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/Makefile.am b/libraries/evas/src/modules/engines/Makefile.am index 7d870a1..42585cc 100644 --- a/libraries/evas/src/modules/engines/Makefile.am +++ b/libraries/evas/src/modules/engines/Makefile.am @@ -68,4 +68,9 @@ endif if !EVAS_STATIC_BUILD_SOFTWARE_X11 SUBDIRS += software_x11 endif - +if !EVAS_STATIC_BUILD_WAYLAND_SHM +SUBDIRS += wayland_shm +endif +if !EVAS_STATIC_BUILD_WAYLAND_EGL +SUBDIRS += wayland_egl +endif diff --git a/libraries/evas/src/modules/engines/Makefile.in b/libraries/evas/src/modules/engines/Makefile.in index 3994fca..5820026 100644 --- a/libraries/evas/src/modules/engines/Makefile.in +++ b/libraries/evas/src/modules/engines/Makefile.in @@ -54,6 +54,8 @@ host_triplet = @host@ @EVAS_STATIC_BUILD_SOFTWARE_DDRAW_FALSE@am__append_19 = software_ddraw @EVAS_STATIC_BUILD_SOFTWARE_GDI_FALSE@am__append_20 = software_gdi @EVAS_STATIC_BUILD_SOFTWARE_X11_FALSE@am__append_21 = software_x11 +@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@am__append_22 = wayland_shm +@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@am__append_23 = wayland_egl subdir = src/modules/engines DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -102,7 +104,7 @@ DIST_SUBDIRS = software_generic buffer direct3d directfb fb psl1ght \ gl_common gl_x11 gl_sdl gl_cocoa software_8 software_8_x11 \ software_16 software_16_ddraw software_16_wince \ software_16_x11 software_sdl software_16_sdl software_ddraw \ - software_gdi software_x11 + software_gdi software_x11 wayland_shm wayland_egl DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -231,8 +233,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +249,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +332,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ @@ -411,7 +417,8 @@ SUBDIRS = $(am__append_1) $(am__append_2) $(am__append_3) \ $(am__append_10) $(am__append_11) $(am__append_12) \ $(am__append_13) $(am__append_14) $(am__append_15) \ $(am__append_16) $(am__append_17) $(am__append_18) \ - $(am__append_19) $(am__append_20) $(am__append_21) + $(am__append_19) $(am__append_20) $(am__append_21) \ + $(am__append_22) $(am__append_23) all: all-recursive .SUFFIXES: diff --git a/libraries/evas/src/modules/engines/buffer/Makefile.in b/libraries/evas/src/modules/engines/buffer/Makefile.in index 2311344..ec9c0b8 100644 --- a/libraries/evas/src/modules/engines/buffer/Makefile.in +++ b/libraries/evas/src/modules/engines/buffer/Makefile.in @@ -240,8 +240,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -258,6 +256,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -339,6 +339,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/direct3d/Makefile.in b/libraries/evas/src/modules/engines/direct3d/Makefile.in index 03d892e..85baff8 100644 --- a/libraries/evas/src/modules/engines/direct3d/Makefile.in +++ b/libraries/evas/src/modules/engines/direct3d/Makefile.in @@ -293,8 +293,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -311,6 +309,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -392,6 +392,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/directfb/Makefile.in b/libraries/evas/src/modules/engines/directfb/Makefile.in index cd5651a..df2f63b 100644 --- a/libraries/evas/src/modules/engines/directfb/Makefile.in +++ b/libraries/evas/src/modules/engines/directfb/Makefile.in @@ -240,8 +240,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -258,6 +256,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -339,6 +339,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/fb/Makefile.in b/libraries/evas/src/modules/engines/fb/Makefile.in index aec24ff..1e82b34 100644 --- a/libraries/evas/src/modules/engines/fb/Makefile.in +++ b/libraries/evas/src/modules/engines/fb/Makefile.in @@ -244,8 +244,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -262,6 +260,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -343,6 +343,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/gl_cocoa/Makefile.in b/libraries/evas/src/modules/engines/gl_cocoa/Makefile.in index ceea03d..6e616f4 100644 --- a/libraries/evas/src/modules/engines/gl_cocoa/Makefile.in +++ b/libraries/evas/src/modules/engines/gl_cocoa/Makefile.in @@ -258,8 +258,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -276,6 +274,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -357,6 +357,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/gl_common/Makefile.in b/libraries/evas/src/modules/engines/gl_common/Makefile.in index 61ed478..27284f9 100644 --- a/libraries/evas/src/modules/engines/gl_common/Makefile.in +++ b/libraries/evas/src/modules/engines/gl_common/Makefile.in @@ -245,8 +245,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -263,6 +261,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -344,6 +344,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_common.h b/libraries/evas/src/modules/engines/gl_common/evas_gl_common.h index a088748..051fb3b 100644 --- a/libraries/evas/src/modules/engines/gl_common/evas_gl_common.h +++ b/libraries/evas/src/modules/engines/gl_common/evas_gl_common.h @@ -15,7 +15,7 @@ #define GL_GLEXT_PROTOTYPES -#ifdef BUILD_ENGINE_GL_QUARTZ +#ifdef BUILD_ENGINE_GL_COCOA # include # include #else diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_texture.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_texture.c index c99f4bd..8162cd1 100644 --- a/libraries/evas/src/modules/engines/gl_common/evas_gl_texture.c +++ b/libraries/evas/src/modules/engines/gl_common/evas_gl_texture.c @@ -109,7 +109,9 @@ _tex_format_index(GLuint format) static void _tex_2d(int intfmt, int w, int h, int fmt, int type) { +#ifdef GL_TEXTURE_INTERNAL_FORMAT int intfmtret = -1; +#endif glTexImage2D(GL_TEXTURE_2D, 0, intfmt, w, h, 0, fmt, type, NULL); GLERR(__FUNCTION__, __FILE__, __LINE__, ""); #ifdef GL_TEXTURE_INTERNAL_FORMAT @@ -479,7 +481,6 @@ _pool_tex_dynamic_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, i #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) int fmt; // EGL_MAP_GL_TEXTURE_RGBA_SEC or EGL_MAP_GL_TEXTURE_RGB_SEC or bust int pixtype; // EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC or bust - int glformat; int attr[] = { EGL_MAP_GL_TEXTURE_WIDTH_SEC, 32, @@ -914,7 +915,7 @@ evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im) tpix = alloca(im->cache_entry.h * sizeof(DATA32)); pd = tpix; ps = im->image.data; - for (i = 0; i < im->cache_entry.h; i++) + for (i = 0; i < (int)im->cache_entry.h; i++) { *pd = *ps; pd++; @@ -929,7 +930,7 @@ evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im) tpix); pd = tpix; ps = im->image.data + (im->cache_entry.w - 1); - for (i = 0; i < im->cache_entry.h; i++) + for (i = 0; i < (int)im->cache_entry.h; i++) { *pd = *ps; pd++; diff --git a/libraries/evas/src/modules/engines/gl_sdl/Makefile.in b/libraries/evas/src/modules/engines/gl_sdl/Makefile.in index 5d4135d..bfb29ac 100644 --- a/libraries/evas/src/modules/engines/gl_sdl/Makefile.in +++ b/libraries/evas/src/modules/engines/gl_sdl/Makefile.in @@ -239,8 +239,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -257,6 +255,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -338,6 +338,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/gl_x11/Makefile.in b/libraries/evas/src/modules/engines/gl_x11/Makefile.in index f589e61..ad4944e 100644 --- a/libraries/evas/src/modules/engines/gl_x11/Makefile.in +++ b/libraries/evas/src/modules/engines/gl_x11/Makefile.in @@ -242,8 +242,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -260,6 +258,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -341,6 +341,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/gl_x11/evas_engine.c b/libraries/evas/src/modules/engines/gl_x11/evas_engine.c index 38e0c13..fbbd1a2 100644 --- a/libraries/evas/src/modules/engines/gl_x11/evas_engine.c +++ b/libraries/evas/src/modules/engines/gl_x11/evas_engine.c @@ -584,25 +584,30 @@ _extensions_init(Render_Engine *re) #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) // EGL Extensions - evasglexts = glsym_eglQueryString(re->win->egl_disp, EGL_EXTENSIONS); + if (glsym_eglQueryString) + { + evasglexts = glsym_eglQueryString(re->win->egl_disp, EGL_EXTENSIONS); #else - evasglexts = glXQueryExtensionsString(re->info->info.display, - re->info->info.screen); + if (glsym_glXQueryExtensionsString) + { + evasglexts = glXQueryExtensionsString(re->info->info.display, + re->info->info.screen); #endif - DBG("--------EvasGL Extensions----------"); - for (i = 0; _evasgl_ext_entries[i].name != NULL; i++) - { - if ( (strstr(evasglexts, _evasgl_ext_entries[i].name) != NULL) || - (strstr(evasglexts, _evasgl_ext_entries[i].real_name) != NULL) ) + DBG("--------EvasGL Extensions----------"); + for (i = 0; _evasgl_ext_entries[i].name != NULL; i++) { - _evasgl_ext_entries[i].supported = 1; - strcat(_evasgl_ext_string, _evasgl_ext_entries[i].name); - strcat(_evasgl_ext_string, " "); - DBG("\t%s", _evasgl_ext_entries[i].name); + if ( (strstr(evasglexts, _evasgl_ext_entries[i].name) != NULL) || + (strstr(evasglexts, _evasgl_ext_entries[i].real_name) != NULL) ) + { + _evasgl_ext_entries[i].supported = 1; + strcat(_evasgl_ext_string, _evasgl_ext_entries[i].name); + strcat(_evasgl_ext_string, " "); + DBG("\t%s", _evasgl_ext_entries[i].name); + } } + DBG(" "); } - DBG(" "); } int _evas_engine_GL_X11_log_dom = -1; @@ -1125,12 +1130,12 @@ eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) eng_window_use(re->win); evas_gl_common_context_resize(re->win->gl_context, re->win->w, re->win->h, re->win->rot); evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); -/* + RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, re->win->w, re->win->h); if ((w <= 0) || (h <= 0)) return; if (!re->win->draw.redraw) { -#if 0 +#if 1 re->win->draw.x1 = x; re->win->draw.y1 = y; re->win->draw.x2 = x + w - 1; @@ -1150,11 +1155,10 @@ eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) 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 __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__) +eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) { Render_Engine *re; @@ -1244,10 +1248,10 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i //#define FRAMECOUNT 1 #ifdef FRAMECOUNT -double +static double get_time(void) { - struct timeval timev; + struct timeval timev; gettimeofday(&timev, NULL); return (double)timev.tv_sec + (((double)timev.tv_usec) / 1000000); @@ -1391,44 +1395,46 @@ eng_output_flush(void *data) { re->info->callback.pre_swap(re->info->callback.data, re->evas); } -/* - if ((1) -// (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)) - ) - */ +#if 1 + if (1) +#else + if ((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))) +#endif { +// double t, t2 = 0.0; +// t = get_time(); glXSwapBuffers(re->win->disp, re->win->win); - if (!safe_native) glXWaitGL(); +// t = get_time() - t; +// if (!safe_native) +// { +// t2 = get_time(); +// glXWaitGL(); +// t2 = get_time() - t2; +// } +// printf("swap: %3.5f (%3.5fms), x wait gl: %3.5f (%3.5fms)\n", +// t, t * 1000.0, t2, t2 * 1000.0); } -/* else { // FIXME: this doesn't work.. why oh why? int sx, sy, sw, sh; - // fimxe - reset when done -// glEnable(GL_SCISSOR_TEST); - glDrawBuffer(GL_FRONT); - sx = re->win->draw.x1; sy = re->win->draw.y1; sw = (re->win->draw.x2 - re->win->draw.x1) + 1; sh = (re->win->draw.y2 - re->win->draw.y1) + 1; sy = re->win->h - sy - sh; - -// glScissor(sx, sy, sw, sh); - glRasterPos2i(sx, re->win->h - sy); + + glBitmap(0, 0, 0, 0, sx, re->win->h - sy, NULL); + glEnable(GL_SCISSOR_TEST); + glScissor(sx, sy, sw, sh); + glDrawBuffer(GL_FRONT); glCopyPixels(sx, sy, sw, sh, GL_COLOR); - glRasterPos2i(0, 0); - -// glDisable(GL_SCISSOR_TEST); glDrawBuffer(GL_BACK); + glDisable(GL_SCISSOR_TEST); + glBitmap(0, 0, 0, 0, 0, 0, NULL); glFlush(); } - */ if (re->info->callback.post_swap) { re->info->callback.post_swap(re->info->callback.data, re->evas); @@ -3469,7 +3475,10 @@ evgl_evasglCreateImage(int target, void* buffer, int *attrib_list) attrib_list); } else - ERR("Invalid Engine... (Can't acccess EGL Display)\n"); + { + ERR("Invalid Engine... (Can't acccess EGL Display)\n"); + return NULL; + } } static void @@ -3826,6 +3835,18 @@ eng_image_animated_frame_set(void *data __UNUSED__, void *image, int frame_index return EINA_TRUE; } +static Eina_Bool +eng_image_can_region_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + if (!gim) return EINA_FALSE; + im = (Image_Entry *)gim->im; + if (!im) return EINA_FALSE; + return ((Evas_Image_Load_Func*) im->info.loader)->do_region; +} + + static void eng_image_max_size_get(void *data, int *maxw, int *maxh) { @@ -3903,6 +3924,7 @@ module_open(Evas_Module *em) ORD(image_format_get); ORD(image_colorspace_set); ORD(image_colorspace_get); + ORD(image_can_region_get); ORD(image_mask_create); ORD(image_native_set); ORD(image_native_get); diff --git a/libraries/evas/src/modules/engines/gl_x11/evas_x_main.c b/libraries/evas/src/modules/engines/gl_x11/evas_x_main.c index 323c976..c29ab67 100644 --- a/libraries/evas/src/modules/engines/gl_x11/evas_x_main.c +++ b/libraries/evas/src/modules/engines/gl_x11/evas_x_main.c @@ -531,13 +531,13 @@ eng_window_free(Evas_GL_X11_Window *gw) #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) if (gw->egl_surface[0] != EGL_NO_SURFACE) eglDestroySurface(gw->egl_disp, gw->egl_surface[0]); + eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); if (ref == 0) { if (context) eglDestroyContext(gw->egl_disp, context); eglTerminate(gw->egl_disp); context = EGL_NO_CONTEXT; } - eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); #else if (gw->glxwin) glXDestroyWindow(gw->disp, gw->glxwin); if (ref == 0) diff --git a/libraries/evas/src/modules/engines/psl1ght/Makefile.in b/libraries/evas/src/modules/engines/psl1ght/Makefile.in index 6b553ac..f8524a4 100644 --- a/libraries/evas/src/modules/engines/psl1ght/Makefile.in +++ b/libraries/evas/src/modules/engines/psl1ght/Makefile.in @@ -240,8 +240,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -258,6 +256,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -339,6 +339,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_16/Makefile.in b/libraries/evas/src/modules/engines/software_16/Makefile.in index 1fc95cf..88164e1 100644 --- a/libraries/evas/src/modules/engines/software_16/Makefile.in +++ b/libraries/evas/src/modules/engines/software_16/Makefile.in @@ -235,8 +235,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -253,6 +251,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -334,6 +334,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_16_ddraw/Makefile.in b/libraries/evas/src/modules/engines/software_16_ddraw/Makefile.in index f588c4f..0039410 100644 --- a/libraries/evas/src/modules/engines/software_16_ddraw/Makefile.in +++ b/libraries/evas/src/modules/engines/software_16_ddraw/Makefile.in @@ -265,8 +265,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -283,6 +281,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -364,6 +364,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_16_sdl/Makefile.in b/libraries/evas/src/modules/engines/software_16_sdl/Makefile.in index 219e392..6ebf0db 100644 --- a/libraries/evas/src/modules/engines/software_16_sdl/Makefile.in +++ b/libraries/evas/src/modules/engines/software_16_sdl/Makefile.in @@ -238,8 +238,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -256,6 +254,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -337,6 +337,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_16_wince/Makefile.in b/libraries/evas/src/modules/engines/software_16_wince/Makefile.in index 571891e..95c484e 100644 --- a/libraries/evas/src/modules/engines/software_16_wince/Makefile.in +++ b/libraries/evas/src/modules/engines/software_16_wince/Makefile.in @@ -271,8 +271,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -289,6 +287,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -370,6 +370,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_16_x11/Makefile.in b/libraries/evas/src/modules/engines/software_16_x11/Makefile.in index be43dad..3232681 100644 --- a/libraries/evas/src/modules/engines/software_16_x11/Makefile.in +++ b/libraries/evas/src/modules/engines/software_16_x11/Makefile.in @@ -244,8 +244,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -262,6 +260,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -343,6 +343,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_8/Makefile.in b/libraries/evas/src/modules/engines/software_8/Makefile.in index bf16fcf..3ee42fd 100644 --- a/libraries/evas/src/modules/engines/software_8/Makefile.in +++ b/libraries/evas/src/modules/engines/software_8/Makefile.in @@ -234,8 +234,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -252,6 +250,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -333,6 +333,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_8_x11/Makefile.in b/libraries/evas/src/modules/engines/software_8_x11/Makefile.in index fa88a4d..22577af 100644 --- a/libraries/evas/src/modules/engines/software_8_x11/Makefile.in +++ b/libraries/evas/src/modules/engines/software_8_x11/Makefile.in @@ -244,8 +244,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -262,6 +260,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -343,6 +343,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_ddraw/Makefile.in b/libraries/evas/src/modules/engines/software_ddraw/Makefile.in index be4c977..da65f92 100644 --- a/libraries/evas/src/modules/engines/software_ddraw/Makefile.in +++ b/libraries/evas/src/modules/engines/software_ddraw/Makefile.in @@ -266,8 +266,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -284,6 +282,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -365,6 +365,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_gdi/Makefile.in b/libraries/evas/src/modules/engines/software_gdi/Makefile.in index 5dea632..a2421ef 100644 --- a/libraries/evas/src/modules/engines/software_gdi/Makefile.in +++ b/libraries/evas/src/modules/engines/software_gdi/Makefile.in @@ -249,8 +249,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -267,6 +265,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -348,6 +348,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_generic/Makefile.in b/libraries/evas/src/modules/engines/software_generic/Makefile.in index 6d75f23..4f66536 100644 --- a/libraries/evas/src/modules/engines/software_generic/Makefile.in +++ b/libraries/evas/src/modules/engines/software_generic/Makefile.in @@ -236,8 +236,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -254,6 +252,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -335,6 +335,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_generic/evas_engine.c b/libraries/evas/src/modules/engines/software_generic/evas_engine.c index b2c53c5..48944dd 100644 --- a/libraries/evas/src/modules/engines/software_generic/evas_engine.c +++ b/libraries/evas/src/modules/engines/software_generic/evas_engine.c @@ -1,6 +1,275 @@ #include "evas_common.h" /* Also includes international specific stuff */ #include "evas_private.h" +#ifdef HAVE_DLSYM +# include /* dlopen,dlclose,etc */ + +# define EVAS_GL 1 +# define EVAS_GL_NO_GL_H_CHECK 1 +# include "Evas_GL.h" + +#else +# warning software_generic will not be able to have Evas_GL API. +#endif + +#ifdef EVAS_GL +//----------------------------------// +// OSMesa... + +#define OSMESA_MAJOR_VERSION 6 +#define OSMESA_MINOR_VERSION 5 +#define OSMESA_PATCH_VERSION 0 + +/* + * Values for the format parameter of OSMesaCreateContext() + * New in version 2.0. + */ +#define OSMESA_COLOR_INDEX GL_COLOR_INDEX +#define OSMESA_RGBA GL_RGBA +#define OSMESA_BGRA 0x1 +#define OSMESA_ARGB 0x2 +#define OSMESA_RGB GL_RGB +#define OSMESA_BGR 0x4 +#define OSMESA_RGB_565 0x5 + + +/* + * OSMesaPixelStore() parameters: + * New in version 2.0. + */ +#define OSMESA_ROW_LENGTH 0x10 +#define OSMESA_Y_UP 0x11 + + +/* + * Accepted by OSMesaGetIntegerv: + */ +#define OSMESA_WIDTH 0x20 +#define OSMESA_HEIGHT 0x21 +#define OSMESA_FORMAT 0x22 +#define OSMESA_TYPE 0x23 +#define OSMESA_MAX_WIDTH 0x24 /* new in 4.0 */ +#define OSMESA_MAX_HEIGHT 0x25 /* new in 4.0 */ + + +typedef void (*OSMESAproc)(); +typedef struct osmesa_context *OSMesaContext; +#endif + +typedef struct _Render_Engine_GL_Surface Render_Engine_GL_Surface; +typedef struct _Render_Engine_GL_Context Render_Engine_GL_Context; + +struct _Render_Engine_GL_Surface +{ + int initialized; + int w, h; + +#ifdef EVAS_GL + GLenum internal_fmt; +#endif + int internal_cpp; // Component per pixel. ie. RGB = 3 + + int depth_bits; + int stencil_bits; + + // Data + void *buffer; + + Render_Engine_GL_Context *current_ctx; +}; + +#ifdef EVAS_GL +struct _Render_Engine_GL_Context +{ + int initialized; + + OSMesaContext context; + + Render_Engine_GL_Context *share_ctx; + + Render_Engine_GL_Surface *current_sfc; +}; + +//------------------------------------------------------// +typedef void (*_eng_fn) (void ); +typedef _eng_fn (*glsym_func_eng_fn) (); +typedef void (*glsym_func_void) (); +typedef unsigned int (*glsym_func_uint) (); +typedef int (*glsym_func_int) (); +typedef unsigned char (*glsym_func_uchar) (); +typedef unsigned char *(*glsym_func_uchar_ptr) (); +typedef const unsigned char *(*glsym_func_const_uchar_ptr) (); +typedef char const *(*glsym_func_char_const_ptr) (); +typedef GLboolean (*glsym_func_bool) (); +typedef OSMesaContext (*glsym_func_osm_ctx) (); +//------------------------------------------------------// + +/* Function table for GL APIs */ +static Evas_GL_API gl_funcs; +static void *gl_lib_handle; +static int gl_lib_is_gles = 0; +static Evas_GL_API gl_funcs; + +//------------------------------------------------------// +// OSMesa APIS... +static OSMesaContext (*_sym_OSMesaCreateContextExt) (GLenum format, GLint depthBits, GLint stencilBits, GLint accumBits, OSMesaContext sharelist) = NULL; +static void (*_sym_OSMesaDestroyContext) (OSMesaContext ctx) = NULL; +static GLboolean (*_sym_OSMesaMakeCurrent) (OSMesaContext ctx, void *buffer, GLenum type, GLsizei width, GLsizei height) = NULL; +static void (*_sym_OSMesaPixelStore) (GLint pname, GLint value) = NULL; +static OSMESAproc (*_sym_OSMesaGetProcAddress) (const char *funcName); + + +//------------------------------------------------------// +// GLES 2.0 APIs... +static void (*_sym_glActiveTexture) (GLenum texture) = NULL; +static void (*_sym_glAttachShader) (GLuint program, GLuint shader) = NULL; +static void (*_sym_glBindAttribLocation) (GLuint program, GLuint index, const char* name) = NULL; +static void (*_sym_glBindBuffer) (GLenum target, GLuint buffer) = NULL; +static void (*_sym_glBindFramebuffer) (GLenum target, GLuint framebuffer) = NULL; +static void (*_sym_glBindRenderbuffer) (GLenum target, GLuint renderbuffer) = NULL; +static void (*_sym_glBindTexture) (GLenum target, GLuint texture) = NULL; +static void (*_sym_glBlendColor) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) = NULL; +static void (*_sym_glBlendEquation) (GLenum mode) = NULL; +static void (*_sym_glBlendEquationSeparate) (GLenum modeRGB, GLenum modeAlpha) = NULL; +static void (*_sym_glBlendFunc) (GLenum sfactor, GLenum dfactor) = NULL; +static void (*_sym_glBlendFuncSeparate) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) = NULL; +static void (*_sym_glBufferData) (GLenum target, GLsizeiptr size, const void* data, GLenum usage) = NULL; +static void (*_sym_glBufferSubData) (GLenum target, GLintptr offset, GLsizeiptr size, const void* data) = NULL; +static GLenum (*_sym_glCheckFramebufferStatus) (GLenum target) = NULL; +static void (*_sym_glClear) (GLbitfield mask) = NULL; +static void (*_sym_glClearColor) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) = NULL; +static void (*_sym_glClearDepthf) (GLclampf depth) = NULL; +static void (*_sym_glClearStencil) (GLint s) = NULL; +static void (*_sym_glColorMask) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) = NULL; +static void (*_sym_glCompileShader) (GLuint shader) = NULL; +static void (*_sym_glCompressedTexImage2D) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data) = NULL; +static void (*_sym_glCompressedTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data) = NULL; +static void (*_sym_glCopyTexImage2D) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) = NULL; +static void (*_sym_glCopyTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) = NULL; +static GLuint (*_sym_glCreateProgram) (void) = NULL; +static GLuint (*_sym_glCreateShader) (GLenum type) = NULL; +static void (*_sym_glCullFace) (GLenum mode) = NULL; +static void (*_sym_glDeleteBuffers) (GLsizei n, const GLuint* buffers) = NULL; +static void (*_sym_glDeleteFramebuffers) (GLsizei n, const GLuint* framebuffers) = NULL; +static void (*_sym_glDeleteProgram) (GLuint program) = NULL; +static void (*_sym_glDeleteRenderbuffers) (GLsizei n, const GLuint* renderbuffers) = NULL; +static void (*_sym_glDeleteShader) (GLuint shader) = NULL; +static void (*_sym_glDeleteTextures) (GLsizei n, const GLuint* textures) = NULL; +static void (*_sym_glDepthFunc) (GLenum func) = NULL; +static void (*_sym_glDepthMask) (GLboolean flag) = NULL; +static void (*_sym_glDepthRangef) (GLclampf zNear, GLclampf zFar) = NULL; +static void (*_sym_glDetachShader) (GLuint program, GLuint shader) = NULL; +static void (*_sym_glDisable) (GLenum cap) = NULL; +static void (*_sym_glDisableVertexAttribArray) (GLuint index) = NULL; +static void (*_sym_glDrawArrays) (GLenum mode, GLint first, GLsizei count) = NULL; +static void (*_sym_glDrawElements) (GLenum mode, GLsizei count, GLenum type, const void* indices) = NULL; +static void (*_sym_glEnable) (GLenum cap) = NULL; +static void (*_sym_glEnableVertexAttribArray) (GLuint index) = NULL; +static void (*_sym_glFinish) (void) = NULL; +static void (*_sym_glFlush) (void) = NULL; +static void (*_sym_glFramebufferRenderbuffer) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) = NULL; +static void (*_sym_glFramebufferTexture2D) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) = NULL; +static void (*_sym_glFrontFace) (GLenum mode) = NULL; +static void (*_sym_glGenBuffers) (GLsizei n, GLuint* buffers) = NULL; +static void (*_sym_glGenerateMipmap) (GLenum target) = NULL; +static void (*_sym_glGenFramebuffers) (GLsizei n, GLuint* framebuffers) = NULL; +static void (*_sym_glGenRenderbuffers) (GLsizei n, GLuint* renderbuffers) = NULL; +static void (*_sym_glGenTextures) (GLsizei n, GLuint* textures) = NULL; +static void (*_sym_glGetActiveAttrib) (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) = NULL; +static void (*_sym_glGetActiveUniform) (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) = NULL; +static void (*_sym_glGetAttachedShaders) (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) = NULL; +static int (*_sym_glGetAttribLocation) (GLuint program, const char* name) = NULL; +static void (*_sym_glGetBooleanv) (GLenum pname, GLboolean* params) = NULL; +static void (*_sym_glGetBufferParameteriv) (GLenum target, GLenum pname, GLint* params) = NULL; +static GLenum (*_sym_glGetError) (void) = NULL; +static void (*_sym_glGetFloatv) (GLenum pname, GLfloat* params) = NULL; +static void (*_sym_glGetFramebufferAttachmentParameteriv) (GLenum target, GLenum attachment, GLenum pname, GLint* params) = NULL; +static void (*_sym_glGetIntegerv) (GLenum pname, GLint* params) = NULL; +static void (*_sym_glGetProgramiv) (GLuint program, GLenum pname, GLint* params) = NULL; +static void (*_sym_glGetProgramInfoLog) (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) = NULL; +static void (*_sym_glGetRenderbufferParameteriv) (GLenum target, GLenum pname, GLint* params) = NULL; +static void (*_sym_glGetShaderiv) (GLuint shader, GLenum pname, GLint* params) = NULL; +static void (*_sym_glGetShaderInfoLog) (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) = NULL; +static void (*_sym_glGetShaderPrecisionFormat) (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) = NULL; +static void (*_sym_glGetShaderSource) (GLuint shader, GLsizei bufsize, GLsizei* length, char* source) = NULL; +static const GLubyte *(*_sym_glGetString) (GLenum name) = NULL; +static void (*_sym_glGetTexParameterfv) (GLenum target, GLenum pname, GLfloat* params) = NULL; +static void (*_sym_glGetTexParameteriv) (GLenum target, GLenum pname, GLint* params) = NULL; +static void (*_sym_glGetUniformfv) (GLuint program, GLint location, GLfloat* params) = NULL; +static void (*_sym_glGetUniformiv) (GLuint program, GLint location, GLint* params) = NULL; +static int (*_sym_glGetUniformLocation) (GLuint program, const char* name) = NULL; +static void (*_sym_glGetVertexAttribfv) (GLuint index, GLenum pname, GLfloat* params) = NULL; +static void (*_sym_glGetVertexAttribiv) (GLuint index, GLenum pname, GLint* params) = NULL; +static void (*_sym_glGetVertexAttribPointerv) (GLuint index, GLenum pname, void** pointer) = NULL; +static void (*_sym_glHint) (GLenum target, GLenum mode) = NULL; +static GLboolean (*_sym_glIsBuffer) (GLuint buffer) = NULL; +static GLboolean (*_sym_glIsEnabled) (GLenum cap) = NULL; +static GLboolean (*_sym_glIsFramebuffer) (GLuint framebuffer) = NULL; +static GLboolean (*_sym_glIsProgram) (GLuint program) = NULL; +static GLboolean (*_sym_glIsRenderbuffer) (GLuint renderbuffer) = NULL; +static GLboolean (*_sym_glIsShader) (GLuint shader) = NULL; +static GLboolean (*_sym_glIsTexture) (GLuint texture) = NULL; +static void (*_sym_glLineWidth) (GLfloat width) = NULL; +static void (*_sym_glLinkProgram) (GLuint program) = NULL; +static void (*_sym_glPixelStorei) (GLenum pname, GLint param) = NULL; +static void (*_sym_glPolygonOffset) (GLfloat factor, GLfloat units) = NULL; +static void (*_sym_glReadPixels) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels) = NULL; +static void (*_sym_glReleaseShaderCompiler) (void) = NULL; +static void (*_sym_glRenderbufferStorage) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height) = NULL; +static void (*_sym_glSampleCoverage) (GLclampf value, GLboolean invert) = NULL; +static void (*_sym_glScissor) (GLint x, GLint y, GLsizei width, GLsizei height) = NULL; +static void (*_sym_glShaderBinary) (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) = NULL; +static void (*_sym_glShaderSource) (GLuint shader, GLsizei count, const char** string, const GLint* length) = NULL; +static void (*_sym_glStencilFunc) (GLenum func, GLint ref, GLuint mask) = NULL; +static void (*_sym_glStencilFuncSeparate) (GLenum face, GLenum func, GLint ref, GLuint mask) = NULL; +static void (*_sym_glStencilMask) (GLuint mask) = NULL; +static void (*_sym_glStencilMaskSeparate) (GLenum face, GLuint mask) = NULL; +static void (*_sym_glStencilOp) (GLenum fail, GLenum zfail, GLenum zpass) = NULL; +static void (*_sym_glStencilOpSeparate) (GLenum face, GLenum fail, GLenum zfail, GLenum zpass) = NULL; +static void (*_sym_glTexImage2D) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels) = NULL; +static void (*_sym_glTexParameterf) (GLenum target, GLenum pname, GLfloat param) = NULL; +static void (*_sym_glTexParameterfv) (GLenum target, GLenum pname, const GLfloat* params) = NULL; +static void (*_sym_glTexParameteri) (GLenum target, GLenum pname, GLint param) = NULL; +static void (*_sym_glTexParameteriv) (GLenum target, GLenum pname, const GLint* params) = NULL; +static void (*_sym_glTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) = NULL; +static void (*_sym_glUniform1f) (GLint location, GLfloat x) = NULL; +static void (*_sym_glUniform1fv) (GLint location, GLsizei count, const GLfloat* v) = NULL; +static void (*_sym_glUniform1i) (GLint location, GLint x) = NULL; +static void (*_sym_glUniform1iv) (GLint location, GLsizei count, const GLint* v) = NULL; +static void (*_sym_glUniform2f) (GLint location, GLfloat x, GLfloat y) = NULL; +static void (*_sym_glUniform2fv) (GLint location, GLsizei count, const GLfloat* v) = NULL; +static void (*_sym_glUniform2i) (GLint location, GLint x, GLint y) = NULL; +static void (*_sym_glUniform2iv) (GLint location, GLsizei count, const GLint* v) = NULL; +static void (*_sym_glUniform3f) (GLint location, GLfloat x, GLfloat y, GLfloat z) = NULL; +static void (*_sym_glUniform3fv) (GLint location, GLsizei count, const GLfloat* v) = NULL; +static void (*_sym_glUniform3i) (GLint location, GLint x, GLint y, GLint z) = NULL; +static void (*_sym_glUniform3iv) (GLint location, GLsizei count, const GLint* v) = NULL; +static void (*_sym_glUniform4f) (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) = NULL; +static void (*_sym_glUniform4fv) (GLint location, GLsizei count, const GLfloat* v) = NULL; +static void (*_sym_glUniform4i) (GLint location, GLint x, GLint y, GLint z, GLint w) = NULL; +static void (*_sym_glUniform4iv) (GLint location, GLsizei count, const GLint* v) = NULL; +static void (*_sym_glUniformMatrix2fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = NULL; +static void (*_sym_glUniformMatrix3fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = NULL; +static void (*_sym_glUniformMatrix4fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = NULL; +static void (*_sym_glUseProgram) (GLuint program) = NULL; +static void (*_sym_glValidateProgram) (GLuint program) = NULL; +static void (*_sym_glVertexAttrib1f) (GLuint indx, GLfloat x) = NULL; +static void (*_sym_glVertexAttrib1fv) (GLuint indx, const GLfloat* values) = NULL; +static void (*_sym_glVertexAttrib2f) (GLuint indx, GLfloat x, GLfloat y) = NULL; +static void (*_sym_glVertexAttrib2fv) (GLuint indx, const GLfloat* values) = NULL; +static void (*_sym_glVertexAttrib3f) (GLuint indx, GLfloat x, GLfloat y, GLfloat z) = NULL; +static void (*_sym_glVertexAttrib3fv) (GLuint indx, const GLfloat* values) = NULL; +static void (*_sym_glVertexAttrib4f) (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) = NULL; +static void (*_sym_glVertexAttrib4fv) (GLuint indx, const GLfloat* values) = NULL; +static void (*_sym_glVertexAttribPointer) (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr) = NULL; +static void (*_sym_glViewport) (GLint x, GLint y, GLsizei width, GLsizei height) = NULL; + +// GLES Extensions... +/* static void (*_sym_glGetProgramBinary) (GLuint a, GLsizei b, GLsizei* c, GLenum* d, void* e) = NULL; */ +/* static void (*_sym_glProgramBinary) (GLuint a, GLenum b, const void* c, GLint d) = NULL; */ +/* static void (*_sym_glProgramParameteri) (GLuint a, GLuint b, GLint d) = NULL; */ +#endif + /* ***** ** @@ -258,6 +527,15 @@ eng_image_colorspace_get(void *data __UNUSED__, void *image) return im->space; } +static Eina_Bool +eng_image_can_region_get(void *data __UNUSED__, void *image) +{ + Image_Entry *im; + if (!image) return EINA_FALSE; + im = image; + return ((Evas_Image_Load_Func*) im->info.loader)->do_region; +} + static void eng_image_mask_create(void *data __UNUSED__, void *image) { @@ -349,7 +627,37 @@ eng_image_colorspace_set(void *data __UNUSED__, void *image, int cspace) static void * eng_image_native_set(void *data __UNUSED__, void *image, void *native __UNUSED__) { - return image; + //return image; + Evas_Native_Surface *ns = native; + Image_Entry *im = image, *im2 = NULL; + + if (!im) + { + if ((!ns) && (ns->data.x11.visual)) + { + im = evas_cache_image_data(evas_common_image_cache_get(), + im->w, im->h, + ns->data.x11.visual, 1, + EVAS_COLORSPACE_ARGB8888); + return im; + } + else + return NULL; + } + + if ((!ns) && (!im)) return im; + + if (!ns) return im; + + im2 = evas_cache_image_data(evas_common_image_cache_get(), + im->w, im->h, + ns->data.x11.visual, 1, + EVAS_COLORSPACE_ARGB8888); + evas_cache_image_drop(im); + im = im2; + + return im; + } static void * @@ -1035,6 +1343,311 @@ eng_image_load_error_get(void *data __UNUSED__, void *image) return im->cache_entry.load_error; } +//------------ Evas GL engine code ---------------// +static void * +eng_gl_surface_create(void *data __UNUSED__, void *config, int w, int h) +{ +#ifdef EVAS_GL + Render_Engine_GL_Surface *sfc; + Evas_GL_Config *cfg; + + sfc = calloc(1, sizeof(Render_Engine_GL_Surface)); + if (!sfc) return NULL; + + cfg = (Evas_GL_Config *)config; + + sfc->initialized = 0; + sfc->w = w; + sfc->h = h; + + // Color Format + switch (cfg->color_format) + { + + case EVAS_GL_RGB_888: + sfc->internal_fmt = OSMESA_RGB; + sfc->internal_cpp = 3; + break; + case EVAS_GL_RGBA_8888: + sfc->internal_fmt = OSMESA_BGRA; + sfc->internal_cpp = 4; + break; + default: + sfc->internal_fmt = OSMESA_RGBA; + sfc->internal_cpp = 4; + break; + } + + // Depth Bits + switch (cfg->depth_bits) + { + case EVAS_GL_DEPTH_BIT_8: + sfc->depth_bits = 8; + break; + case EVAS_GL_DEPTH_BIT_16: + sfc->depth_bits = 16; + break; + case EVAS_GL_DEPTH_BIT_24: + sfc->depth_bits = 24; + break; + case EVAS_GL_DEPTH_BIT_32: + sfc->depth_bits = 32; + break; + case EVAS_GL_DEPTH_NONE: + default: + sfc->depth_bits = 0; + break; + } + + // Stencil Bits + switch (cfg->stencil_bits) + { + case EVAS_GL_STENCIL_BIT_1: + sfc->stencil_bits = 1; + break; + case EVAS_GL_STENCIL_BIT_2: + sfc->stencil_bits = 2; + break; + case EVAS_GL_STENCIL_BIT_4: + sfc->stencil_bits = 4; + break; + case EVAS_GL_STENCIL_BIT_8: + sfc->stencil_bits = 8; + break; + case EVAS_GL_STENCIL_BIT_16: + sfc->stencil_bits = 16; + break; + case EVAS_GL_STENCIL_NONE: + default: + sfc->stencil_bits = 0; + break; + } + + sfc->buffer = malloc(sizeof(unsigned char)*sfc->internal_cpp*w*h); + + if (!sfc->buffer) + { + free(sfc); + return NULL; + } + + return sfc; +#else + (void) config; + (void) w; + (void) h; + return NULL; +#endif +} + +static int +eng_gl_surface_destroy(void *data __UNUSED__, void *surface) +{ +#ifdef EVAS_GL + Render_Engine_GL_Surface *sfc; + + sfc = (Render_Engine_GL_Surface*)surface; + + if (!sfc) return 0; + + if (sfc->buffer) free(sfc->buffer); + + free(sfc); + + surface = NULL; + + return 1; +#else + (void) surface; + return 1; +#endif +} + +static void * +eng_gl_context_create(void *data __UNUSED__, void *share_context) +{ +#ifdef EVAS_GL + Render_Engine_GL_Context *ctx; + Render_Engine_GL_Context *share_ctx; + + ctx = calloc(1, sizeof(Render_Engine_GL_Context)); + + if (!ctx) return NULL; + + share_ctx = (Render_Engine_GL_Context *)share_context; + + ctx->share_ctx = share_ctx; + + /* + if (share_ctx) + ctx->context = OSMesaCreateContextExt( OSMESA_RGBA, 8, 0, 0, share_ctx->context ); + else + ctx->context = OSMesaCreateContextExt( OSMESA_RGBA, 8, 0, 0, NULL ); + + + if (!ctx->context) + { + ERR("Error creating OSMesa Context."); + free(ctx); + return NULL; + } + */ + + ctx->initialized = 0; + + return ctx; +#else + (void) share_context; + return NULL; +#endif +} + +static int +eng_gl_context_destroy(void *data __UNUSED__, void *context) +{ +#ifdef EVAS_GL + Render_Engine_GL_Context *ctx; + + ctx = (Render_Engine_GL_Context*)context; + + if (!ctx) return 0; + + _sym_OSMesaDestroyContext(ctx->context); + + free(ctx); + context = NULL; + + return 1; +#else + (void) context; + return 0; +#endif +} + +static int +eng_gl_make_current(void *data __UNUSED__, void *surface, void *context) +{ +#ifdef EVAS_GL + Render_Engine_GL_Surface *sfc; + Render_Engine_GL_Context *ctx; + OSMesaContext share_ctx; + GLboolean ret; + + sfc = (Render_Engine_GL_Surface*)surface; + ctx = (Render_Engine_GL_Context*)context; + + // Unset surface/context + if ((!sfc) || (!ctx)) + { + if (ctx) ctx->current_sfc = NULL; + if (sfc) sfc->current_ctx = NULL; + return 1; + } + + // Initialize Context if it hasn't been. + if (!ctx->initialized) + { + if (ctx->share_ctx) + share_ctx = ctx->share_ctx->context; + else + share_ctx = NULL; + + ctx->context = _sym_OSMesaCreateContextExt(sfc->internal_fmt, + sfc->depth_bits, + sfc->stencil_bits, + 0, + share_ctx); + if (!ctx->context) + { + ERR("Error initializing context."); + return 0; + } + + ctx->initialized = 1; + } + + + // Call MakeCurrent + ret = _sym_OSMesaMakeCurrent(ctx->context, sfc->buffer, GL_UNSIGNED_BYTE, + sfc->w, sfc->h); + + if (ret == GL_FALSE) + { + ERR("Error doing MakeCurrent."); + return 0; + } + + _sym_OSMesaPixelStore(OSMESA_Y_UP, 0); + + // Set the current surface/context + ctx->current_sfc = sfc; + sfc->current_ctx = ctx; + + return 1; +#else + (void) surface; + (void) context; + return 1; +#endif +} + +// FIXME!!! Implement later +static void * +eng_gl_string_query(void *data __UNUSED__, int name __UNUSED__) +{ + return NULL; +} + +static void * +eng_gl_proc_address_get(void *data __UNUSED__, const char *name) +{ +#ifdef EVAS_GL + if (_sym_OSMesaGetProcAddress) return _sym_OSMesaGetProcAddress(name); + return dlsym(RTLD_DEFAULT, name); +#else + (void) name; + return NULL; +#endif +} + +static int +eng_gl_native_surface_get(void *data __UNUSED__, void *surface, void *native_surface) +{ +#ifdef EVAS_GL + Render_Engine_GL_Surface *sfc; + Evas_Native_Surface *ns; + + sfc = (Render_Engine_GL_Surface*)surface; + ns = (Evas_Native_Surface*)native_surface; + + if (!sfc) return 0; + + ns->type = EVAS_NATIVE_SURFACE_OPENGL; + ns->version = EVAS_NATIVE_SURFACE_VERSION; + ns->data.x11.visual = sfc->buffer; + + return 1; +#else + (void) surface; + (void) native_surface; + return 1; +#endif +} + + +static void * +eng_gl_api_get(void *data __UNUSED__) +{ +#ifdef EVAS_GL + return &gl_funcs; +#else + return NULL; +#endif +} + +//------------------------------------------------// + + /* ***** ** @@ -1112,6 +1725,7 @@ static Evas_Func func = eng_image_format_get, eng_image_colorspace_set, eng_image_colorspace_get, + eng_image_can_region_get, eng_image_mask_create, eng_image_native_set, eng_image_native_get, @@ -1161,15 +1775,15 @@ static Evas_Func func = eng_image_filtered_save, eng_image_filtered_free, #endif - NULL, // FIXME: need software mesa for gl rendering <- gl_surface_create - NULL, // FIXME: need software mesa for gl rendering <- gl_surface_destroy - NULL, // FIXME: need software mesa for gl rendering <- gl_context_create - NULL, // FIXME: need software mesa for gl rendering <- gl_context_destroy - NULL, // FIXME: need software mesa for gl rendering <- gl_make_current - NULL, // FIXME: need software mesa for gl rendering <- gl_string_query - NULL, // FIXME: need software mesa for gl rendering <- gl_proc_address_get - NULL, // FIXME: need software mesa for gl rendering <- gl_native_surface_get - NULL, // FIXME: need software mesa for gl rendering <- gl_api_get + NULL, // need software mesa for gl rendering <- gl_surface_create + NULL, // need software mesa for gl rendering <- gl_surface_destroy + NULL, // need software mesa for gl rendering <- gl_context_create + NULL, // need software mesa for gl rendering <- gl_context_destroy + NULL, // need software mesa for gl rendering <- gl_make_current + NULL, // need software mesa for gl rendering <- gl_string_query + NULL, // need software mesa for gl rendering <- gl_proc_address_get + NULL, // need software mesa for gl rendering <- gl_native_surface_get + NULL, // need software mesa for gl rendering <- gl_api_get eng_image_load_error_get, eng_font_run_font_end_get, eng_image_animated_get, @@ -1182,6 +1796,981 @@ static Evas_Func func = /* FUTURE software generic calls go here */ }; + +//----------------------------------------------------------------// +// // +// Load Symbols // +// // +//----------------------------------------------------------------// +#ifdef EVAS_GL +static void +sym_missing(void) +{ + ERR("GL symbols missing!\n"); +} + +static int +glue_sym_init(void) +{ + //------------------------------------------------// + // Use eglGetProcAddress +#define FINDSYM(dst, sym, typ) \ + if (!dst) dst = (typeof(dst))dlsym(gl_lib_handle, sym); \ + if (!dst) \ + { \ + ERR("Symbol not found %s\n", sym); \ + return 0; \ + } +#define FALLBAK(dst, typ) if (!dst) dst = (typeof(dst))sym_missing; + + //------------------------------------------------------// + // OSMesa APIs... + FINDSYM(_sym_OSMesaCreateContextExt, "OSMesaCreateContextExt", glsym_func_osm_ctx); + FALLBAK(_sym_OSMesaCreateContextExt, glsym_func_void); + + FINDSYM(_sym_OSMesaDestroyContext, "OSMesaDestroyContext", glsym_func_void); + FALLBAK(_sym_OSMesaDestroyContext, glsym_func_void); + + FINDSYM(_sym_OSMesaMakeCurrent, "OSMesaMakeCurrent", glsym_func_bool); + FALLBAK(_sym_OSMesaMakeCurrent, glsym_func_void); + + FINDSYM(_sym_OSMesaPixelStore, "OSMesaPixelStore", glsym_func_void); + FALLBAK(_sym_OSMesaPixelStore, glsym_func_void); + + FINDSYM(_sym_OSMesaGetProcAddress, "OSMesaGetProcAddress", glsym_func_eng_fn); + FALLBAK(_sym_OSMesaGetProcAddress, glsym_func_void); + +#undef FINDSYM +#undef FALLBAK + + return 1; +} + +static int +gl_sym_init(void) +{ + //------------------------------------------------// +#define FINDSYM(dst, sym, typ) \ + if (!dst) dst = (typeof(dst))dlsym(gl_lib_handle, sym); \ + if (!dst) DBG("Symbol not found %s\n", sym); +#define FALLBAK(dst, typ) if (!dst) dst = (typeof(dst))sym_missing; + + + //------------------------------------------------------// + // GLES 2.0 APIs... + FINDSYM(_sym_glActiveTexture, "glActiveTexture", glsym_func_void); + FALLBAK(_sym_glActiveTexture, glsym_func_void); + + FINDSYM(_sym_glAttachShader, "glAttachShader", glsym_func_void); + FALLBAK(_sym_glAttachShader, glsym_func_void); + + FINDSYM(_sym_glBindAttribLocation, "glBindAttribLocation", glsym_func_void); + FALLBAK(_sym_glBindAttribLocation, glsym_func_void); + + FINDSYM(_sym_glBindBuffer, "glBindBuffer", glsym_func_void); + FALLBAK(_sym_glBindBuffer, glsym_func_void); + + FINDSYM(_sym_glBindFramebuffer, "glBindFramebuffer", glsym_func_void); + FALLBAK(_sym_glBindFramebuffer, glsym_func_void); + + FINDSYM(_sym_glBindRenderbuffer, "glBindRenderbuffer", glsym_func_void); + FALLBAK(_sym_glBindRenderbuffer, glsym_func_void); + + FINDSYM(_sym_glBindTexture, "glBindTexture", glsym_func_void); + FALLBAK(_sym_glBindTexture, glsym_func_void); + + FINDSYM(_sym_glBlendColor, "glBlendColor", glsym_func_void); + FALLBAK(_sym_glBlendColor, glsym_func_void); + + FINDSYM(_sym_glBlendEquation, "glBlendEquation", glsym_func_void); + FALLBAK(_sym_glBlendEquation, glsym_func_void); + + FINDSYM(_sym_glBlendEquationSeparate, "glBlendEquationSeparate", glsym_func_void); + FALLBAK(_sym_glBlendEquationSeparate, glsym_func_void); + + FINDSYM(_sym_glBlendFunc, "glBlendFunc", glsym_func_void); + FALLBAK(_sym_glBlendFunc, glsym_func_void); + + FINDSYM(_sym_glBlendFuncSeparate, "glBlendFuncSeparate", glsym_func_void); + FALLBAK(_sym_glBlendFuncSeparate, glsym_func_void); + + FINDSYM(_sym_glBufferData, "glBufferData", glsym_func_void); + FALLBAK(_sym_glBufferData, glsym_func_void); + + FINDSYM(_sym_glBufferSubData, "glBufferSubData", glsym_func_void); + FALLBAK(_sym_glBufferSubData, glsym_func_void); + + FINDSYM(_sym_glCheckFramebufferStatus, "glCheckFramebufferStatus", glsym_func_uint); + FALLBAK(_sym_glCheckFramebufferStatus, glsym_func_uint); + + FINDSYM(_sym_glClear, "glClear", glsym_func_void); + FALLBAK(_sym_glClear, glsym_func_void); + + FINDSYM(_sym_glClearColor, "glClearColor", glsym_func_void); + FALLBAK(_sym_glClearColor, glsym_func_void); + + FINDSYM(_sym_glClearDepthf, "glClearDepthf", glsym_func_void); + FINDSYM(_sym_glClearDepthf, "glClearDepth", glsym_func_void); + FALLBAK(_sym_glClearDepthf, glsym_func_void); + + FINDSYM(_sym_glClearStencil, "glClearStencil", glsym_func_void); + FALLBAK(_sym_glClearStencil, glsym_func_void); + + FINDSYM(_sym_glColorMask, "glColorMask", glsym_func_void); + FALLBAK(_sym_glColorMask, glsym_func_void); + + FINDSYM(_sym_glCompileShader, "glCompileShader", glsym_func_void); + FALLBAK(_sym_glCompileShader, glsym_func_void); + + FINDSYM(_sym_glCompressedTexImage2D, "glCompressedTexImage2D", glsym_func_void); + FALLBAK(_sym_glCompressedTexImage2D, glsym_func_void); + + FINDSYM(_sym_glCompressedTexSubImage2D, "glCompressedTexSubImage2D", glsym_func_void); + FALLBAK(_sym_glCompressedTexSubImage2D, glsym_func_void); + + FINDSYM(_sym_glCopyTexImage2D, "glCopyTexImage2D", glsym_func_void); + FALLBAK(_sym_glCopyTexImage2D, glsym_func_void); + + FINDSYM(_sym_glCopyTexSubImage2D, "glCopyTexSubImage2D", glsym_func_void); + FALLBAK(_sym_glCopyTexSubImage2D, glsym_func_void); + + FINDSYM(_sym_glCreateProgram, "glCreateProgram", glsym_func_uint); + FALLBAK(_sym_glCreateProgram, glsym_func_uint); + + FINDSYM(_sym_glCreateShader, "glCreateShader", glsym_func_uint); + FALLBAK(_sym_glCreateShader, glsym_func_uint); + + FINDSYM(_sym_glCullFace, "glCullFace", glsym_func_void); + FALLBAK(_sym_glCullFace, glsym_func_void); + + FINDSYM(_sym_glDeleteBuffers, "glDeleteBuffers", glsym_func_void); + FALLBAK(_sym_glDeleteBuffers, glsym_func_void); + + FINDSYM(_sym_glDeleteFramebuffers, "glDeleteFramebuffers", glsym_func_void); + FALLBAK(_sym_glDeleteFramebuffers, glsym_func_void); + + FINDSYM(_sym_glDeleteProgram, "glDeleteProgram", glsym_func_void); + FALLBAK(_sym_glDeleteProgram, glsym_func_void); + + FINDSYM(_sym_glDeleteRenderbuffers, "glDeleteRenderbuffers", glsym_func_void); + FALLBAK(_sym_glDeleteRenderbuffers, glsym_func_void); + + FINDSYM(_sym_glDeleteShader, "glDeleteShader", glsym_func_void); + FALLBAK(_sym_glDeleteShader, glsym_func_void); + + FINDSYM(_sym_glDeleteTextures, "glDeleteTextures", glsym_func_void); + FALLBAK(_sym_glDeleteTextures, glsym_func_void); + + FINDSYM(_sym_glDepthFunc, "glDepthFunc", glsym_func_void); + FALLBAK(_sym_glDepthFunc, glsym_func_void); + + FINDSYM(_sym_glDepthMask, "glDepthMask", glsym_func_void); + FALLBAK(_sym_glDepthMask, glsym_func_void); + + FINDSYM(_sym_glDepthRangef, "glDepthRangef", glsym_func_void); + FINDSYM(_sym_glDepthRangef, "glDepthRange", glsym_func_void); + FALLBAK(_sym_glDepthRangef, glsym_func_void); + + FINDSYM(_sym_glDetachShader, "glDetachShader", glsym_func_void); + FALLBAK(_sym_glDetachShader, glsym_func_void); + + FINDSYM(_sym_glDisable, "glDisable", glsym_func_void); + FALLBAK(_sym_glDisable, glsym_func_void); + + FINDSYM(_sym_glDisableVertexAttribArray, "glDisableVertexAttribArray", glsym_func_void); + FALLBAK(_sym_glDisableVertexAttribArray, glsym_func_void); + + FINDSYM(_sym_glDrawArrays, "glDrawArrays", glsym_func_void); + FALLBAK(_sym_glDrawArrays, glsym_func_void); + + FINDSYM(_sym_glDrawElements, "glDrawElements", glsym_func_void); + FALLBAK(_sym_glDrawElements, glsym_func_void); + + FINDSYM(_sym_glEnable, "glEnable", glsym_func_void); + FALLBAK(_sym_glEnable, glsym_func_void); + + FINDSYM(_sym_glEnableVertexAttribArray, "glEnableVertexAttribArray", glsym_func_void); + FALLBAK(_sym_glEnableVertexAttribArray, glsym_func_void); + + FINDSYM(_sym_glFinish, "glFinish", glsym_func_void); + FALLBAK(_sym_glFinish, glsym_func_void); + + FINDSYM(_sym_glFlush, "glFlush", glsym_func_void); + FALLBAK(_sym_glFlush, glsym_func_void); + + FINDSYM(_sym_glFramebufferRenderbuffer, "glFramebufferRenderbuffer", glsym_func_void); + FALLBAK(_sym_glFramebufferRenderbuffer, glsym_func_void); + + FINDSYM(_sym_glFramebufferTexture2D, "glFramebufferTexture2D", glsym_func_void); + FALLBAK(_sym_glFramebufferTexture2D, glsym_func_void); + + FINDSYM(_sym_glFrontFace, "glFrontFace", glsym_func_void); + FALLBAK(_sym_glFrontFace, glsym_func_void); + + FINDSYM(_sym_glGenBuffers, "glGenBuffers", glsym_func_void); + FALLBAK(_sym_glGenBuffers, glsym_func_void); + + FINDSYM(_sym_glGenerateMipmap, "glGenerateMipmap", glsym_func_void); + FALLBAK(_sym_glGenerateMipmap, glsym_func_void); + + FINDSYM(_sym_glGenFramebuffers, "glGenFramebuffers", glsym_func_void); + FALLBAK(_sym_glGenFramebuffers, glsym_func_void); + + FINDSYM(_sym_glGenRenderbuffers, "glGenRenderbuffers", glsym_func_void); + FALLBAK(_sym_glGenRenderbuffers, glsym_func_void); + + FINDSYM(_sym_glGenTextures, "glGenTextures", glsym_func_void); + FALLBAK(_sym_glGenTextures, glsym_func_void); + + FINDSYM(_sym_glGetActiveAttrib, "glGetActiveAttrib", glsym_func_void); + FALLBAK(_sym_glGetActiveAttrib, glsym_func_void); + + FINDSYM(_sym_glGetActiveUniform, "glGetActiveUniform", glsym_func_void); + FALLBAK(_sym_glGetActiveUniform, glsym_func_void); + + FINDSYM(_sym_glGetAttachedShaders, "glGetAttachedShaders", glsym_func_void); + FALLBAK(_sym_glGetAttachedShaders, glsym_func_void); + + FINDSYM(_sym_glGetAttribLocation, "glGetAttribLocation", glsym_func_int); + FALLBAK(_sym_glGetAttribLocation, glsym_func_int); + + FINDSYM(_sym_glGetBooleanv, "glGetBooleanv", glsym_func_void); + FALLBAK(_sym_glGetBooleanv, glsym_func_void); + + FINDSYM(_sym_glGetBufferParameteriv, "glGetBufferParameteriv", glsym_func_void); + FALLBAK(_sym_glGetBufferParameteriv, glsym_func_void); + + FINDSYM(_sym_glGetError, "glGetError", glsym_func_uint); + FALLBAK(_sym_glGetError, glsym_func_uint); + + FINDSYM(_sym_glGetFloatv, "glGetFloatv", glsym_func_void); + FALLBAK(_sym_glGetFloatv, glsym_func_void); + + FINDSYM(_sym_glGetFramebufferAttachmentParameteriv, "glGetFramebufferAttachmentParameteriv", glsym_func_void); + FALLBAK(_sym_glGetFramebufferAttachmentParameteriv, glsym_func_void); + + FINDSYM(_sym_glGetIntegerv, "glGetIntegerv", glsym_func_void); + FALLBAK(_sym_glGetIntegerv, glsym_func_void); + + FINDSYM(_sym_glGetProgramiv, "glGetProgramiv", glsym_func_void); + FALLBAK(_sym_glGetProgramiv, glsym_func_void); + + FINDSYM(_sym_glGetProgramInfoLog, "glGetProgramInfoLog", glsym_func_void); + FALLBAK(_sym_glGetProgramInfoLog, glsym_func_void); + + FINDSYM(_sym_glGetRenderbufferParameteriv, "glGetRenderbufferParameteriv", glsym_func_void); + FALLBAK(_sym_glGetRenderbufferParameteriv, glsym_func_void); + + FINDSYM(_sym_glGetShaderiv, "glGetShaderiv", glsym_func_void); + FALLBAK(_sym_glGetShaderiv, glsym_func_void); + + FINDSYM(_sym_glGetShaderInfoLog, "glGetShaderInfoLog", glsym_func_void); + FALLBAK(_sym_glGetShaderInfoLog, glsym_func_void); + + FINDSYM(_sym_glGetShaderPrecisionFormat, "glGetShaderPrecisionFormat", glsym_func_void); + FALLBAK(_sym_glGetShaderPrecisionFormat, glsym_func_void); + + FINDSYM(_sym_glGetShaderSource, "glGetShaderSource", glsym_func_void); + FALLBAK(_sym_glGetShaderSource, glsym_func_void); + + FINDSYM(_sym_glGetString, "glGetString", glsym_func_uchar_ptr); + FALLBAK(_sym_glGetString, glsym_func_const_uchar_ptr); + + FINDSYM(_sym_glGetTexParameterfv, "glGetTexParameterfv", glsym_func_void); + FALLBAK(_sym_glGetTexParameterfv, glsym_func_void); + + FINDSYM(_sym_glGetTexParameteriv, "glGetTexParameteriv", glsym_func_void); + FALLBAK(_sym_glGetTexParameteriv, glsym_func_void); + + FINDSYM(_sym_glGetUniformfv, "glGetUniformfv", glsym_func_void); + FALLBAK(_sym_glGetUniformfv, glsym_func_void); + + FINDSYM(_sym_glGetUniformiv, "glGetUniformiv", glsym_func_void); + FALLBAK(_sym_glGetUniformiv, glsym_func_void); + + FINDSYM(_sym_glGetUniformLocation, "glGetUniformLocation", glsym_func_int); + FALLBAK(_sym_glGetUniformLocation, glsym_func_int); + + FINDSYM(_sym_glGetVertexAttribfv, "glGetVertexAttribfv", glsym_func_void); + FALLBAK(_sym_glGetVertexAttribfv, glsym_func_void); + + FINDSYM(_sym_glGetVertexAttribiv, "glGetVertexAttribiv", glsym_func_void); + FALLBAK(_sym_glGetVertexAttribiv, glsym_func_void); + + FINDSYM(_sym_glGetVertexAttribPointerv, "glGetVertexAttribPointerv", glsym_func_void); + FALLBAK(_sym_glGetVertexAttribPointerv, glsym_func_void); + + FINDSYM(_sym_glHint, "glHint", glsym_func_void); + FALLBAK(_sym_glHint, glsym_func_void); + + FINDSYM(_sym_glIsBuffer, "glIsBuffer", glsym_func_uchar); + FALLBAK(_sym_glIsBuffer, glsym_func_uchar); + + FINDSYM(_sym_glIsEnabled, "glIsEnabled", glsym_func_uchar); + FALLBAK(_sym_glIsEnabled, glsym_func_uchar); + + FINDSYM(_sym_glIsFramebuffer, "glIsFramebuffer", glsym_func_uchar); + FALLBAK(_sym_glIsFramebuffer, glsym_func_uchar); + + FINDSYM(_sym_glIsProgram, "glIsProgram", glsym_func_uchar); + FALLBAK(_sym_glIsProgram, glsym_func_uchar); + + FINDSYM(_sym_glIsRenderbuffer, "glIsRenderbuffer", glsym_func_uchar); + FALLBAK(_sym_glIsRenderbuffer, glsym_func_uchar); + + FINDSYM(_sym_glIsShader, "glIsShader", glsym_func_uchar); + FALLBAK(_sym_glIsShader, glsym_func_uchar); + + FINDSYM(_sym_glIsTexture, "glIsTexture", glsym_func_uchar); + FALLBAK(_sym_glIsTexture, glsym_func_uchar); + + FINDSYM(_sym_glLineWidth, "glLineWidth", glsym_func_void); + FALLBAK(_sym_glLineWidth, glsym_func_void); + + FINDSYM(_sym_glLinkProgram, "glLinkProgram", glsym_func_void); + FALLBAK(_sym_glLinkProgram, glsym_func_void); + + FINDSYM(_sym_glPixelStorei, "glPixelStorei", glsym_func_void); + FALLBAK(_sym_glPixelStorei, glsym_func_void); + + FINDSYM(_sym_glPolygonOffset, "glPolygonOffset", glsym_func_void); + FALLBAK(_sym_glPolygonOffset, glsym_func_void); + + FINDSYM(_sym_glReadPixels, "glReadPixels", glsym_func_void); + FALLBAK(_sym_glReadPixels, glsym_func_void); + + FINDSYM(_sym_glReleaseShaderCompiler, "glReleaseShaderCompiler", glsym_func_void); + FALLBAK(_sym_glReleaseShaderCompiler, glsym_func_void); + + FINDSYM(_sym_glRenderbufferStorage, "glRenderbufferStorage", glsym_func_void); + FALLBAK(_sym_glRenderbufferStorage, glsym_func_void); + + FINDSYM(_sym_glSampleCoverage, "glSampleCoverage", glsym_func_void); + FALLBAK(_sym_glSampleCoverage, glsym_func_void); + + FINDSYM(_sym_glScissor, "glScissor", glsym_func_void); + FALLBAK(_sym_glScissor, glsym_func_void); + + FINDSYM(_sym_glShaderBinary, "glShaderBinary", glsym_func_void); + FALLBAK(_sym_glShaderBinary, glsym_func_void); + + FINDSYM(_sym_glShaderSource, "glShaderSource", glsym_func_void); + FALLBAK(_sym_glShaderSource, glsym_func_void); + + FINDSYM(_sym_glStencilFunc, "glStencilFunc", glsym_func_void); + FALLBAK(_sym_glStencilFunc, glsym_func_void); + + FINDSYM(_sym_glStencilFuncSeparate, "glStencilFuncSeparate", glsym_func_void); + FALLBAK(_sym_glStencilFuncSeparate, glsym_func_void); + + FINDSYM(_sym_glStencilMask, "glStencilMask", glsym_func_void); + FALLBAK(_sym_glStencilMask, glsym_func_void); + + FINDSYM(_sym_glStencilMaskSeparate, "glStencilMaskSeparate", glsym_func_void); + FALLBAK(_sym_glStencilMaskSeparate, glsym_func_void); + + FINDSYM(_sym_glStencilOp, "glStencilOp", glsym_func_void); + FALLBAK(_sym_glStencilOp, glsym_func_void); + + FINDSYM(_sym_glStencilOpSeparate, "glStencilOpSeparate", glsym_func_void); + FALLBAK(_sym_glStencilOpSeparate, glsym_func_void); + + FINDSYM(_sym_glTexImage2D, "glTexImage2D", glsym_func_void); + FALLBAK(_sym_glTexImage2D, glsym_func_void); + + FINDSYM(_sym_glTexParameterf, "glTexParameterf", glsym_func_void); + FALLBAK(_sym_glTexParameterf, glsym_func_void); + + FINDSYM(_sym_glTexParameterfv, "glTexParameterfv", glsym_func_void); + FALLBAK(_sym_glTexParameterfv, glsym_func_void); + + FINDSYM(_sym_glTexParameteri, "glTexParameteri", glsym_func_void); + FALLBAK(_sym_glTexParameteri, glsym_func_void); + + FINDSYM(_sym_glTexParameteriv, "glTexParameteriv", glsym_func_void); + FALLBAK(_sym_glTexParameteriv, glsym_func_void); + + FINDSYM(_sym_glTexSubImage2D, "glTexSubImage2D", glsym_func_void); + FALLBAK(_sym_glTexSubImage2D, glsym_func_void); + + FINDSYM(_sym_glUniform1f, "glUniform1f", glsym_func_void); + FALLBAK(_sym_glUniform1f, glsym_func_void); + + FINDSYM(_sym_glUniform1fv, "glUniform1fv", glsym_func_void); + FALLBAK(_sym_glUniform1fv, glsym_func_void); + + FINDSYM(_sym_glUniform1i, "glUniform1i", glsym_func_void); + FALLBAK(_sym_glUniform1i, glsym_func_void); + + FINDSYM(_sym_glUniform1iv, "glUniform1iv", glsym_func_void); + FALLBAK(_sym_glUniform1iv, glsym_func_void); + + FINDSYM(_sym_glUniform2f, "glUniform2f", glsym_func_void); + FALLBAK(_sym_glUniform2f, glsym_func_void); + + FINDSYM(_sym_glUniform2fv, "glUniform2fv", glsym_func_void); + FALLBAK(_sym_glUniform2fv, glsym_func_void); + + FINDSYM(_sym_glUniform2i, "glUniform2i", glsym_func_void); + FALLBAK(_sym_glUniform2i, glsym_func_void); + + FINDSYM(_sym_glUniform2iv, "glUniform2iv", glsym_func_void); + FALLBAK(_sym_glUniform2iv, glsym_func_void); + + FINDSYM(_sym_glUniform3f, "glUniform3f", glsym_func_void); + FALLBAK(_sym_glUniform3f, glsym_func_void); + + FINDSYM(_sym_glUniform3fv, "glUniform3fv", glsym_func_void); + FALLBAK(_sym_glUniform3fv, glsym_func_void); + + FINDSYM(_sym_glUniform3i, "glUniform3i", glsym_func_void); + FALLBAK(_sym_glUniform3i, glsym_func_void); + + FINDSYM(_sym_glUniform3iv, "glUniform3iv", glsym_func_void); + FALLBAK(_sym_glUniform3iv, glsym_func_void); + + FINDSYM(_sym_glUniform4f, "glUniform4f", glsym_func_void); + FALLBAK(_sym_glUniform4f, glsym_func_void); + + FINDSYM(_sym_glUniform4fv, "glUniform4fv", glsym_func_void); + FALLBAK(_sym_glUniform4fv, glsym_func_void); + + FINDSYM(_sym_glUniform4i, "glUniform4i", glsym_func_void); + FALLBAK(_sym_glUniform4i, glsym_func_void); + + FINDSYM(_sym_glUniform4iv, "glUniform4iv", glsym_func_void); + FALLBAK(_sym_glUniform4iv, glsym_func_void); + + FINDSYM(_sym_glUniformMatrix2fv, "glUniformMatrix2fv", glsym_func_void); + FALLBAK(_sym_glUniformMatrix2fv, glsym_func_void); + + FINDSYM(_sym_glUniformMatrix3fv, "glUniformMatrix3fv", glsym_func_void); + FALLBAK(_sym_glUniformMatrix3fv, glsym_func_void); + + FINDSYM(_sym_glUniformMatrix4fv, "glUniformMatrix4fv", glsym_func_void); + FALLBAK(_sym_glUniformMatrix4fv, glsym_func_void); + + FINDSYM(_sym_glUseProgram, "glUseProgram", glsym_func_void); + FALLBAK(_sym_glUseProgram, glsym_func_void); + + FINDSYM(_sym_glValidateProgram, "glValidateProgram", glsym_func_void); + FALLBAK(_sym_glValidateProgram, glsym_func_void); + + FINDSYM(_sym_glVertexAttrib1f, "glVertexAttrib1f", glsym_func_void); + FALLBAK(_sym_glVertexAttrib1f, glsym_func_void); + + FINDSYM(_sym_glVertexAttrib1fv, "glVertexAttrib1fv", glsym_func_void); + FALLBAK(_sym_glVertexAttrib1fv, glsym_func_void); + + FINDSYM(_sym_glVertexAttrib2f, "glVertexAttrib2f", glsym_func_void); + FALLBAK(_sym_glVertexAttrib2f, glsym_func_void); + + FINDSYM(_sym_glVertexAttrib2fv, "glVertexAttrib2fv", glsym_func_void); + FALLBAK(_sym_glVertexAttrib2fv, glsym_func_void); + + FINDSYM(_sym_glVertexAttrib3f, "glVertexAttrib3f", glsym_func_void); + FALLBAK(_sym_glVertexAttrib3f, glsym_func_void); + + FINDSYM(_sym_glVertexAttrib3fv, "glVertexAttrib3fv", glsym_func_void); + FALLBAK(_sym_glVertexAttrib3fv, glsym_func_void); + + FINDSYM(_sym_glVertexAttrib4f, "glVertexAttrib4f", glsym_func_void); + FALLBAK(_sym_glVertexAttrib4f, glsym_func_void); + + FINDSYM(_sym_glVertexAttrib4fv, "glVertexAttrib4fv", glsym_func_void); + FALLBAK(_sym_glVertexAttrib4fv, glsym_func_void); + + FINDSYM(_sym_glVertexAttribPointer, "glVertexAttribPointer", glsym_func_void); + FALLBAK(_sym_glVertexAttribPointer, glsym_func_void); + + FINDSYM(_sym_glViewport, "glViewport", glsym_func_void); + FALLBAK(_sym_glViewport, glsym_func_void); + +#undef FINDSYM +#undef FALLBAK + + // Checking to see if this function exists is a poor but reasonable way to + // check if it's gles but it works for now + if (_sym_glGetShaderPrecisionFormat != (typeof(_sym_glGetShaderPrecisionFormat))sym_missing ) + { + DBG("GL Library is GLES."); + gl_lib_is_gles = 1; + } + + return 1; +} + +//--------------------------------------------------------------// +// Wrapped GL APIs to handle desktop compatibility + +// Stripping precision code from GLES shader for desktop compatibility +// Code adopted from Meego GL code. Temporary Fix. +static const char * +opengl_strtok(const char *s, int *n, char **saveptr, char *prevbuf) +{ + char *start; + char *ret; + char *p; + int retlen; + static const char *delim = " \t\n\r/"; + + if (prevbuf) free(prevbuf); + + if (s) + *saveptr = (char *)s; + else + { + if (!(*saveptr) || !(*n)) + return NULL; + s = *saveptr; + } + + for (; *n && strchr(delim, *s); s++, (*n)--) + { + if (*s == '/' && *n > 1) + { + if (s[1] == '/') + { + do + { + s++, (*n)--; + } + while (*n > 1 && s[1] != '\n' && s[1] != '\r'); + } + else if (s[1] == '*') + { + do + { + s++, (*n)--; + } + while (*n > 2 && (s[1] != '*' || s[2] != '/')); + s++, (*n)--; + } + } + } + + start = (char *)s; + for (; *n && *s && !strchr(delim, *s); s++, (*n)--); + if (*n > 0) s++, (*n)--; + + *saveptr = (char *)s; + + retlen = s - start; + ret = malloc(retlen + 1); + p = ret; + + while (retlen > 0) + { + if (*start == '/' && retlen > 1) + { + if (start[1] == '/') + { + do + { + start++, retlen--; + } + while (retlen > 1 && start[1] != '\n' && start[1] != '\r'); + start++, retlen--; + continue; + } + else if (start[1] == '*') + { + do + { + start++, retlen--; + } + while (retlen > 2 && (start[1] != '*' || start[2] != '/')); + start += 3, retlen -= 3; + continue; + } + } + *(p++) = *(start++), retlen--; + } + + *p = 0; + return ret; +} + +static char * +patch_gles_shader(const char *source, int length, int *patched_len) +{ + char *saveptr = NULL; + char *sp; + char *p = NULL; + + if (!length) length = strlen(source); + + *patched_len = 0; + int patched_size = length; + char *patched = malloc(patched_size + 1); + + if (!patched) return NULL; + + p = (char *)opengl_strtok(source, &length, &saveptr, NULL); + for (; p; p = (char *)opengl_strtok(0, &length, &saveptr, p)) + { + if (!strncmp(p, "lowp", 4) || !strncmp(p, "mediump", 7) || !strncmp(p, "highp", 5)) + { + continue; + } + else if (!strncmp(p, "precision", 9)) + { + while ((p = (char *)opengl_strtok(0, &length, &saveptr, p)) && !strchr(p, ';')); + } + else + { + if (!strncmp(p, "gl_MaxVertexUniformVectors", 26)) + { + p = "(gl_MaxVertexUniformComponents / 4)"; + } + else if (!strncmp(p, "gl_MaxFragmentUniformVectors", 28)) + { + p = "(gl_MaxFragmentUniformComponents / 4)"; + } + else if (!strncmp(p, "gl_MaxVaryingVectors", 20)) + { + p = "(gl_MaxVaryingFloats / 4)"; + } + + int new_len = strlen(p); + if (*patched_len + new_len > patched_size) + { + patched_size *= 2; + patched = realloc(patched, patched_size + 1); + + if (!patched) + return NULL; + } + + memcpy(patched + *patched_len, p, new_len); + *patched_len += new_len; + } + } + + patched[*patched_len] = 0; + /* check that we don't leave dummy preprocessor lines */ + for (sp = patched; *sp;) + { + for (; *sp == ' ' || *sp == '\t'; sp++); + if (!strncmp(sp, "#define", 7)) + { + for (p = sp + 7; *p == ' ' || *p == '\t'; p++); + if (*p == '\n' || *p == '\r' || *p == '/') + { + memset(sp, 0x20, 7); + } + } + for (; *sp && *sp != '\n' && *sp != '\r'; sp++); + for (; *sp == '\n' || *sp == '\r'; sp++); + } + return patched; +} + +static void +evgl_glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length) +{ + int i = 0, len = 0; + + char **s = malloc(count * sizeof(char*)); + GLint *l = malloc(count * sizeof(GLint)); + + memset(s, 0, count * sizeof(char*)); + memset(l, 0, count * sizeof(GLint)); + + for (i = 0; i < count; ++i) + { + if (length) + { + len = length[i]; + if (len < 0) + len = string[i] ? strlen(string[i]) : 0; + } + else + len = string[i] ? strlen(string[i]) : 0; + + if (string[i]) + { + s[i] = patch_gles_shader(string[i], len, &l[i]); + if (!s[i]) + { + while(i) + free(s[--i]); + free(l); + free(s); + + DBG("Patching Shader Failed."); + return; + } + } + else + { + s[i] = NULL; + l[i] = 0; + } + } + + _sym_glShaderSource(shader, count, (const char **)s, l); + + while(i) + free(s[--i]); + free(l); + free(s); +} + + +static void +evgl_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) +{ + if (range) + { + range[0] = -126; // floor(log2(FLT_MIN)) + range[1] = 127; // floor(log2(FLT_MAX)) + } + if (precision) + { + precision[0] = 24; // floor(-log2((1.0/16777218.0))); + } + return; + shadertype = precisiontype = 0; +} + +static void +evgl_glReleaseShaderCompiler(void) +{ + DBG("Not supported in Desktop GL"); + return; +} + +static void +evgl_glShaderBinary(GLsizei n __UNUSED__, const GLuint* shaders __UNUSED__, GLenum binaryformat __UNUSED__, const void* binary __UNUSED__, GLsizei length __UNUSED__) +{ + // FIXME: need to dlsym/getprocaddress for this + DBG("Not supported in Desktop GL"); + return; + //n = binaryformat = length = 0; + //shaders = binary = 0; +} +#endif +//--------------------------------------------------------------// + + +#ifdef EVAS_GL +static void +override_gl_apis(Evas_GL_API *api) +{ + + api->version = EVAS_GL_API_VERSION; + +#define ORD(f) EVAS_API_OVERRIDE(f, api, _sym_) + // GLES 2.0 + ORD(glActiveTexture); + ORD(glAttachShader); + ORD(glBindAttribLocation); + ORD(glBindBuffer); + ORD(glBindTexture); + ORD(glBlendColor); + ORD(glBlendEquation); + ORD(glBlendEquationSeparate); + ORD(glBlendFunc); + ORD(glBlendFuncSeparate); + ORD(glBufferData); + ORD(glBufferSubData); + ORD(glCheckFramebufferStatus); + ORD(glClear); + ORD(glClearColor); + ORD(glClearDepthf); + ORD(glClearStencil); + ORD(glColorMask); + ORD(glCompileShader); + ORD(glCompressedTexImage2D); + ORD(glCompressedTexSubImage2D); + ORD(glCopyTexImage2D); + ORD(glCopyTexSubImage2D); + ORD(glCreateProgram); + ORD(glCreateShader); + ORD(glCullFace); + ORD(glDeleteBuffers); + ORD(glDeleteFramebuffers); + ORD(glDeleteProgram); + ORD(glDeleteRenderbuffers); + ORD(glDeleteShader); + ORD(glDeleteTextures); + ORD(glDepthFunc); + ORD(glDepthMask); + ORD(glDepthRangef); + ORD(glDetachShader); + ORD(glDisable); + ORD(glDisableVertexAttribArray); + ORD(glDrawArrays); + ORD(glDrawElements); + ORD(glEnable); + ORD(glEnableVertexAttribArray); + ORD(glFinish); + ORD(glFlush); + ORD(glFramebufferRenderbuffer); + ORD(glFramebufferTexture2D); + ORD(glFrontFace); + ORD(glGenBuffers); + ORD(glGenerateMipmap); + ORD(glGenFramebuffers); + ORD(glGenRenderbuffers); + ORD(glGenTextures); + ORD(glGetActiveAttrib); + ORD(glGetActiveUniform); + ORD(glGetAttachedShaders); + ORD(glGetAttribLocation); + ORD(glGetBooleanv); + ORD(glGetBufferParameteriv); + ORD(glGetError); + ORD(glGetFloatv); + ORD(glGetFramebufferAttachmentParameteriv); + ORD(glGetIntegerv); + ORD(glGetProgramiv); + ORD(glGetProgramInfoLog); + ORD(glGetRenderbufferParameteriv); + ORD(glGetShaderiv); + ORD(glGetShaderInfoLog); + ORD(glGetShaderPrecisionFormat); + ORD(glGetShaderSource); + ORD(glGetString); // FIXME + ORD(glGetTexParameterfv); + ORD(glGetTexParameteriv); + ORD(glGetUniformfv); + ORD(glGetUniformiv); + ORD(glGetUniformLocation); + ORD(glGetVertexAttribfv); + ORD(glGetVertexAttribiv); + ORD(glGetVertexAttribPointerv); + ORD(glHint); + ORD(glIsBuffer); + ORD(glIsEnabled); + ORD(glIsFramebuffer); + ORD(glIsProgram); + ORD(glIsRenderbuffer); + ORD(glIsShader); + ORD(glIsTexture); + ORD(glLineWidth); + ORD(glLinkProgram); + ORD(glPixelStorei); + ORD(glPolygonOffset); + ORD(glReadPixels); + ORD(glReleaseShaderCompiler); + ORD(glRenderbufferStorage); + ORD(glSampleCoverage); + ORD(glScissor); + ORD(glShaderBinary); + ORD(glShaderSource); + ORD(glStencilFunc); + ORD(glStencilFuncSeparate); + ORD(glStencilMask); + ORD(glStencilMaskSeparate); + ORD(glStencilOp); + ORD(glStencilOpSeparate); + ORD(glTexImage2D); + ORD(glTexParameterf); + ORD(glTexParameterfv); + ORD(glTexParameteri); + ORD(glTexParameteriv); + ORD(glTexSubImage2D); + ORD(glUniform1f); + ORD(glUniform1fv); + ORD(glUniform1i); + ORD(glUniform1iv); + ORD(glUniform2f); + ORD(glUniform2fv); + ORD(glUniform2i); + ORD(glUniform2iv); + ORD(glUniform3f); + ORD(glUniform3fv); + ORD(glUniform3i); + ORD(glUniform3iv); + ORD(glUniform4f); + ORD(glUniform4fv); + ORD(glUniform4i); + ORD(glUniform4iv); + ORD(glUniformMatrix2fv); + ORD(glUniformMatrix3fv); + ORD(glUniformMatrix4fv); + ORD(glUseProgram); + ORD(glValidateProgram); + ORD(glVertexAttrib1f); + ORD(glVertexAttrib1fv); + ORD(glVertexAttrib2f); + ORD(glVertexAttrib2fv); + ORD(glVertexAttrib3f); + ORD(glVertexAttrib3fv); + ORD(glVertexAttrib4f); + ORD(glVertexAttrib4fv); + ORD(glVertexAttribPointer); + ORD(glViewport); +#undef ORD + +#define ORD(f) EVAS_API_OVERRIDE(f, &gl_funcs, evgl_) + if (!gl_lib_is_gles) + { + // Override functions wrapped by Evas_GL + // GLES2.0 API compat on top of desktop gl + ORD(glGetShaderPrecisionFormat); + ORD(glReleaseShaderCompiler); + ORD(glShaderBinary); + } + + ORD(glShaderSource); // Do precision stripping in both cases +#undef ORD +} +#endif + +//-------------------------------------------// +static int +gl_lib_init(void) +{ +#ifdef EVAS_GL + // dlopen OSMesa + gl_lib_handle = dlopen("libOSMesa.so.1", RTLD_NOW); + if (!gl_lib_handle) gl_lib_handle = dlopen("libOSMesa.so", RTLD_NOW); + if (!gl_lib_handle) + { + DBG("Unable to open libOSMesa: %s", dlerror()); + return 0; + } + + //------------------------------------------------// + if (!glue_sym_init()) return 0; + if (!gl_sym_init()) return 0; + + override_gl_apis(&gl_funcs); + + return 1; +#else + return 0; +#endif +} + + +static void +init_gl(void) +{ + DBG("Initializing Software OpenGL APIs...\n"); + + if (!gl_lib_init()) + DBG("Unable to support EvasGL in this engine module. Install OSMesa to get it running"); + else + { +#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(gl_surface_create); + ORD(gl_surface_destroy); + ORD(gl_context_create); + ORD(gl_context_destroy); + ORD(gl_make_current); + ORD(gl_string_query); // FIXME: Need to implement + ORD(gl_proc_address_get); // FIXME: Need to implement + ORD(gl_native_surface_get); + ORD(gl_api_get); +#undef ORD + } +} + + /* ***** ** @@ -1201,6 +2790,9 @@ module_open(Evas_Module *em) EINA_LOG_ERR("Can not create a module log domain."); return 0; } + + init_gl(); + em->functions = (void *)(&func); cpunum = eina_cpu_count(); return 1; diff --git a/libraries/evas/src/modules/engines/software_sdl/Makefile.in b/libraries/evas/src/modules/engines/software_sdl/Makefile.in index d1052c1..f63f3eb 100644 --- a/libraries/evas/src/modules/engines/software_sdl/Makefile.in +++ b/libraries/evas/src/modules/engines/software_sdl/Makefile.in @@ -241,8 +241,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -259,6 +257,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -340,6 +340,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_x11/Makefile.in b/libraries/evas/src/modules/engines/software_x11/Makefile.in index f5c73af..5fd2971 100644 --- a/libraries/evas/src/modules/engines/software_x11/Makefile.in +++ b/libraries/evas/src/modules/engines/software_x11/Makefile.in @@ -282,8 +282,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -300,6 +298,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -381,6 +381,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xlib_outbuf.c b/libraries/evas/src/modules/engines/software_x11/evas_xlib_outbuf.c index 1b1d3d9..24c45df 100644 --- a/libraries/evas/src/modules/engines/software_x11/evas_xlib_outbuf.c +++ b/libraries/evas/src/modules/engines/software_x11/evas_xlib_outbuf.c @@ -579,6 +579,8 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w free(obr); return NULL; } + im->cache_entry.w = w; + im->cache_entry.h = h; im->cache_entry.flags.alpha |= alpha ? 1 : 0; evas_cache_image_surface_alloc(&im->cache_entry, w, h); im->extended_info = obr; diff --git a/libraries/evas/src/modules/engines/wayland_egl/Evas_Engine_Wayland_Egl.h b/libraries/evas/src/modules/engines/wayland_egl/Evas_Engine_Wayland_Egl.h new file mode 100644 index 0000000..92ffe25 --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_egl/Evas_Engine_Wayland_Egl.h @@ -0,0 +1,42 @@ +#ifndef _EVAS_ENGINE_WAYLAND_EGL_H +#define _EVAS_ENGINE_WAYLAND_EGL_H + +#include + +typedef struct _Evas_Engine_Info_Wayland_Egl Evas_Engine_Info_Wayland_Egl; + +struct _Evas_Engine_Info_Wayland_Egl +{ + /* 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 { + struct wl_display *display; + struct wl_surface *surface; + int depth; + int screen; + int rotation; + unsigned int destination_alpha : 1; + } info; + /* engine specific function calls to query stuff about the destination */ + /* engine (what visual & colormap & depth to use, performance info etc. */ + struct { + int (*best_depth_get) (Evas_Engine_Info_Wayland_Egl *einfo); + } func; + + struct { + void (*pre_swap) (void *data, Evas *e); + void (*post_swap) (void *data, Evas *e); + + void *data; // data for callback calls + } callback; + + /* non-blocking or blocking mode */ + Evas_Engine_Render_Mode render_mode; + + unsigned char vsync : 1; // does nothing right now + unsigned char indirect : 1; // use indirect rendering +}; +#endif diff --git a/libraries/evas/src/modules/engines/wayland_egl/Makefile.am b/libraries/evas/src/modules/engines/wayland_egl/Makefile.am new file mode 100644 index 0000000..100614f --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_egl/Makefile.am @@ -0,0 +1,47 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines/gl_common \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@GL_EET_CFLAGS@ \ +@evas_engine_wayland_egl_cflags@ + +if BUILD_ENGINE_WAYLAND_EGL + +WAYLAND_EGL_SOURCES = \ +evas_engine.c \ +evas_wl_main.c + +WAYLAND_EGL_LIBADD = @FREETYPE_LIBS@ @GL_EET_LIBS@ @EINA_LIBS@ @evas_engine_wayland_egl_libs@ $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la + +includes_HEADERS = Evas_Engine_Wayland_Egl.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_WAYLAND_EGL + +pkgdir = $(libdir)/evas/modules/engines/wayland_egl/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = $(WAYLAND_EGL_SOURCES) +module_la_LIBADD = $(WAYLAND_EGL_LIBADD) $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + + +else + +noinst_LTLIBRARIES = libevas_engine_wayland_egl.la + +libevas_engine_wayland_egl_la_SOURCES = $(WAYLAND_EGL_SOURCES) +libevas_engine_wayland_egl_la_LIBADD = $(WAYLAND_EGL_LIBADD) + +endif +endif + +EXTRA_DIST = evas_engine.h diff --git a/libraries/evas/src/modules/engines/wayland_egl/Makefile.in b/libraries/evas/src/modules/engines/wayland_egl/Makefile.in new file mode 100644 index 0000000..0df0c63 --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_egl/Makefile.in @@ -0,0 +1,816 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/wayland_egl +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +@BUILD_ENGINE_WAYLAND_EGL_TRUE@am__DEPENDENCIES_1 = $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE@libevas_engine_wayland_egl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_wayland_egl_la_SOURCES_DIST = evas_engine.c \ + evas_wl_main.c +@BUILD_ENGINE_WAYLAND_EGL_TRUE@am__objects_1 = evas_engine.lo \ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@ evas_wl_main.lo +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE@am_libevas_engine_wayland_egl_la_OBJECTS = $(am__objects_1) +libevas_engine_wayland_egl_la_OBJECTS = \ + $(am_libevas_engine_wayland_egl_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE@am_libevas_engine_wayland_egl_la_rpath = +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@module_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@ $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c evas_wl_main.c +@BUILD_ENGINE_WAYLAND_EGL_TRUE@am__objects_2 = \ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@ module_la-evas_engine.lo \ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@ module_la-evas_wl_main.lo +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_wayland_egl_la_SOURCES) \ + $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_wayland_egl_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_Wayland_Egl.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines/gl_common \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@GL_EET_CFLAGS@ \ +@evas_engine_wayland_egl_cflags@ + +@BUILD_ENGINE_WAYLAND_EGL_TRUE@WAYLAND_EGL_SOURCES = \ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@evas_engine.c \ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@evas_wl_main.c + +@BUILD_ENGINE_WAYLAND_EGL_TRUE@WAYLAND_EGL_LIBADD = @FREETYPE_LIBS@ @GL_EET_LIBS@ @EINA_LIBS@ @evas_engine_wayland_egl_libs@ $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la +@BUILD_ENGINE_WAYLAND_EGL_TRUE@includes_HEADERS = Evas_Engine_Wayland_Egl.h +@BUILD_ENGINE_WAYLAND_EGL_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@pkgdir = $(libdir)/evas/modules/engines/wayland_egl/$(MODULE_ARCH) +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@module_la_SOURCES = $(WAYLAND_EGL_SOURCES) +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@module_la_LIBADD = $(WAYLAND_EGL_LIBADD) $(top_builddir)/src/lib/libevas.la +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@module_la_LDFLAGS = -no-undefined -module -avoid-version +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE@noinst_LTLIBRARIES = libevas_engine_wayland_egl.la +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE@libevas_engine_wayland_egl_la_SOURCES = $(WAYLAND_EGL_SOURCES) +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE@libevas_engine_wayland_egl_la_LIBADD = $(WAYLAND_EGL_LIBADD) +EXTRA_DIST = evas_engine.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/wayland_egl/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/wayland_egl/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_wayland_egl.la: $(libevas_engine_wayland_egl_la_OBJECTS) $(libevas_engine_wayland_egl_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_wayland_egl_la_rpath) $(libevas_engine_wayland_egl_la_OBJECTS) $(libevas_engine_wayland_egl_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_wl_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_wl_main.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +module_la-evas_wl_main.lo: evas_wl_main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_wl_main.lo -MD -MP -MF $(DEPDIR)/module_la-evas_wl_main.Tpo -c -o module_la-evas_wl_main.lo `test -f 'evas_wl_main.c' || echo '$(srcdir)/'`evas_wl_main.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_wl_main.Tpo $(DEPDIR)/module_la-evas_wl_main.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_wl_main.c' object='module_la-evas_wl_main.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_wl_main.lo `test -f 'evas_wl_main.c' || echo '$(srcdir)/'`evas_wl_main.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/wayland_egl/evas_engine.c b/libraries/evas/src/modules/engines/wayland_egl/evas_engine.c new file mode 100644 index 0000000..d2a6a0d --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_egl/evas_engine.c @@ -0,0 +1,3174 @@ +#include "evas_common.h" /* Also includes international specific stuff */ +#include "evas_engine.h" + +#ifdef HAVE_DLSYM +# include /* dlopen,dlclose,etc */ +#else +# error gl_x11 should not get compiled if dlsym is not found on the system! +#endif + +#define EVAS_GL_NO_GL_H_CHECK 1 +#include "Evas_GL.h" + +typedef struct _Render_Engine Render_Engine; +typedef struct _Render_Engine_GL_Surface Render_Engine_GL_Surface; +typedef struct _Render_Engine_GL_Context Render_Engine_GL_Context; +typedef struct _Render_Engine_GL_Resource Render_Engine_GL_Resource; +typedef struct _Extension_Entry Extension_Entry; + +struct _Render_Engine +{ + Evas_GL_Wl_Window *win; + Evas_Engine_Info_Wayland_Egl *info; + Evas *evas; + Tilebuf *tb; + int end; + int w, h; + int vsync; + +}; + +struct _Render_Engine_GL_Surface +{ + int initialized; + int fbo_attached; + int w, h; + int depth_bits; + int stencil_bits; + + // Render target texture/buffers + GLuint rt_tex; + GLint rt_internal_fmt; + GLenum rt_fmt; + GLuint rb_depth; + GLenum rb_depth_fmt; + GLuint rb_stencil; + GLenum rb_stencil_fmt; + + Render_Engine_GL_Context *current_ctx; +}; + +struct _Render_Engine_GL_Context +{ + int initialized; + EGLContext context; + GLuint context_fbo; + GLuint current_fbo; + + Render_Engine_GL_Surface *current_sfc; +}; + +// Resources used per thread +struct _Render_Engine_GL_Resource +{ + // Resource context/surface per Thread in TLS for evasgl use + EGLContext context; + EGLSurface surface; +}; + +// Extension Handling +struct _Extension_Entry +{ + const char *name; + const char *real_name; + int supported; +}; + +static int initted = 0; +static int gl_wins = 0; +static Render_Engine_GL_Context *current_evgl_ctx; +static Render_Engine *current_engine; + +static char _gl_ext_string[1024]; +static char _evasgl_ext_string[1024]; + +// Resource context/surface per Thread in TLS for evasgl use +static Eina_TLS resource_key; +static Eina_List *resource_list; +LK(resource_lock); + +typedef void (*_eng_fn) (void); +typedef _eng_fn (*glsym_func_eng_fn) (); +typedef void (*glsym_func_void) (); +typedef void *(*glsym_func_void_ptr) (); +typedef int (*glsym_func_int) (); +typedef unsigned int (*glsym_func_uint) (); +typedef unsigned char (*glsym_func_uchar) (); +typedef unsigned char *(*glsym_func_uchar_ptr) (); +typedef const char *(*glsym_func_const_char_ptr) (); + +#ifndef EGL_NATIVE_PIXMAP_KHR +# define EGL_NATIVE_PIXMAP_KHR 0x30b0 +#endif +_eng_fn (*glsym_eglGetProcAddress) (const char *a) = NULL; +void (*glsym_eglBindTexImage) (EGLDisplay a, EGLSurface b, int c) = NULL; +void (*glsym_eglReleaseTexImage) (EGLDisplay a, EGLSurface b, int c) = NULL; +void *(*glsym_eglCreateImage) (EGLDisplay a, EGLContext b, EGLenum c, EGLClientBuffer d, const int *e) = NULL; +void (*glsym_eglDestroyImage) (EGLDisplay a, void *b) = NULL; +void (*glsym_glEGLImageTargetTexture2DOES) (int a, void *b) = NULL; +void (*glsym_glEGLImageTargetRenderbufferStorageOES) (int a, void *b) = NULL; +void *(*glsym_eglMapImageSEC) (void *a, void *b) = NULL; +unsigned int (*glsym_eglUnmapImageSEC) (void *a, void *b) = NULL; +const char *(*glsym_eglQueryString) (EGLDisplay a, int name) = NULL; + +unsigned int (*glsym_eglLockSurface) (EGLDisplay a, EGLSurface b, const int *attrib_list) = NULL; +unsigned int (*glsym_eglUnlockSurface) (EGLDisplay a, EGLSurface b) = NULL; + +// GLES2 Extensions +void (*glsym_glGetProgramBinaryOES) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary) = NULL; +void (*glsym_glProgramBinaryOES) (GLuint program, GLenum binaryFormat, const void *binary, GLint length) = NULL; +void* (*glsym_glMapBufferOES) (GLenum target, GLenum access) = NULL; +unsigned char (*glsym_glUnmapBufferOES) (GLenum target) = NULL; +void (*glsym_glGetBufferPointervOES) (GLenum target, GLenum pname, void** params) = NULL; +void (*glsym_glTexImage3DOES) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels) = NULL; +void (*glsym_glTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels) = NULL; +void (*glsym_glCopyTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) = NULL; +void (*glsym_glCompressedTexImage3DOES) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data) = NULL; +void (*glsym_glCompressedTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data) = NULL; +void (*glsym_glFramebufferTexture3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) = NULL; +void (*glsym_glGetPerfMonitorGroupsAMD) (GLint* numGroups, GLsizei groupsSize, GLuint* groups) = NULL; +void (*glsym_glGetPerfMonitorCountersAMD) (GLuint group, GLint* numCounters, GLint* maxActiveCounters, GLsizei counterSize, GLuint* counters) = NULL; +void (*glsym_glGetPerfMonitorGroupStringAMD) (GLuint group, GLsizei bufSize, GLsizei* length, char* groupString) = NULL; +void (*glsym_glGetPerfMonitorCounterStringAMD) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei* length, char* counterString) = NULL; +void (*glsym_glGetPerfMonitorCounterInfoAMD) (GLuint group, GLuint counter, GLenum pname, void* data) = NULL; +void (*glsym_glGenPerfMonitorsAMD) (GLsizei n, GLuint* monitors) = NULL; +void (*glsym_glDeletePerfMonitorsAMD) (GLsizei n, GLuint* monitors) = NULL; +void (*glsym_glSelectPerfMonitorCountersAMD) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint* countersList) = NULL; +void (*glsym_glBeginPerfMonitorAMD) (GLuint monitor) = NULL; +void (*glsym_glEndPerfMonitorAMD) (GLuint monitor) = NULL; +void (*glsym_glGetPerfMonitorCounterDataAMD) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data, GLint* bytesWritten) = NULL; +void (*glsym_glDiscardFramebufferEXT) (GLenum target, GLsizei numAttachments, const GLenum* attachments) = NULL; +void (*glsym_glMultiDrawArraysEXT) (GLenum mode, GLint* first, GLsizei* count, GLsizei primcount) = NULL; +void (*glsym_glMultiDrawElementsEXT) (GLenum mode, const GLsizei* count, GLenum type, const GLvoid** indices, GLsizei primcount) = NULL; +void (*glsym_glDeleteFencesNV) (GLsizei n, const GLuint* fences) = NULL; +void (*glsym_glGenFencesNV) (GLsizei n, GLuint* fences) = NULL; +unsigned char (*glsym_glIsFenceNV) (GLuint fence) = NULL; +unsigned char (*glsym_glTestFenceNV) (GLuint fence) = NULL; +void (*glsym_glGetFenceivNV) (GLuint fence, GLenum pname, GLint* params) = NULL; +void (*glsym_glFinishFenceNV) (GLuint fence) = NULL; +void (*glsym_glSetFenceNV) (GLuint, GLenum) = NULL; +void (*glsym_glGetDriverControlsQCOM) (GLint* num, GLsizei size, GLuint* driverControls) = NULL; +void (*glsym_glGetDriverControlStringQCOM) (GLuint driverControl, GLsizei bufSize, GLsizei* length, char* driverControlString) = NULL; +void (*glsym_glEnableDriverControlQCOM) (GLuint driverControl) = NULL; +void (*glsym_glDisableDriverControlQCOM) (GLuint driverControl) = NULL; +void (*glsym_glExtGetTexturesQCOM) (GLuint* textures, GLint maxTextures, GLint* numTextures) = NULL; +void (*glsym_glExtGetBuffersQCOM) (GLuint* buffers, GLint maxBuffers, GLint* numBuffers) = NULL; +void (*glsym_glExtGetRenderbuffersQCOM) (GLuint* renderbuffers, GLint maxRenderbuffers, GLint* numRenderbuffers) = NULL; +void (*glsym_glExtGetFramebuffersQCOM) (GLuint* framebuffers, GLint maxFramebuffers, GLint* numFramebuffers) = NULL; +void (*glsym_glExtGetTexLevelParameterivQCOM) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint* params) = NULL; +void (*glsym_glExtTexObjectStateOverrideiQCOM) (GLenum target, GLenum pname, GLint param) = NULL; +void (*glsym_glExtGetTexSubImageQCOM) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void* texels) = NULL; +void (*glsym_glExtGetBufferPointervQCOM) (GLenum target, void** params) = NULL; +void (*glsym_glExtGetShadersQCOM) (GLuint* shaders, GLint maxShaders, GLint* numShaders) = NULL; +void (*glsym_glExtGetProgramsQCOM) (GLuint* programs, GLint maxPrograms, GLint* numPrograms) = NULL; +unsigned char (*glsym_glExtIsProgramBinaryQCOM) (GLuint program) = NULL; +void (*glsym_glExtGetProgramBinarySourceQCOM) (GLuint program, GLenum shadertype, char* source, GLint* length) = NULL; + + +//------ GLES 2.0 Extensions supported in EvasGL -----// +static Extension_Entry _gl_ext_entries[] = { + //--- Function Extensions ---// + { "GL_OES_get_program_binary", "get_program_binary", 0 }, + { "GL_OES_mapbuffer", "mapbuffer", 0 }, + { "GL_OES_texture_3D", "texture_3D", 0 }, + { "AMD_performance_monitor", "AMD_performance_monitor", 0 }, + { "GL_EXT_discard_framebuffer", "discard_framebuffer", 0 }, + { "GL_EXT_multi_draw_arrays", "multi_draw_arrays", 0 }, + { "GL_NV_fence", "NV_fence", 0 }, + { "GL_QCOM_driver_control", "QCOM_driver_control", 0 }, + { "GL_QCOM_extended_get", "QCOM_extended_get", 0 }, + { "GL_QCOM_extended_get2", "QCOM_extended_get2", 0 }, + + //--- Define Extensions ---// + { "GL_OES_compressed_ETC1_RGB8_texture", "compressed_ETC1_RGB8_texture", 0 }, + { "GL_OES_compressed_paletted_texture", "compressed_paletted_texture", 0 }, + { "GL_OES_depth24", "depth24", 0 }, + { "GL_OES_depth32", "depth32", 0 }, + { "GL_OES_EvasGL_image", "EGL_image", 0 }, + { "GL_OES_packed_depth_stencil", "packed_depth_stencil", 0 }, + { "GL_OES_rgb8_rgba8", "rgb8_rgba8", 0 }, + { "GL_OES_standard_derivatives", "standard_derivatives", 0 }, + { "GL_OES_stencil1", "stencil1", 0 }, + { "GL_OES_stencil4", "stencil4", 0 }, + { "GL_OES_texture_float", "texture_float", 0 }, + { "GL_OES_texture_half_float", "texture_half_float", 0 }, + { "GL_OES_texture_half_float_linear", "texture_half_float_linear", 0 }, + { "GL_OES_texture_npot", "texture_npot", 0 }, + { "GL_OES_vertex_half_float", "vertex_half_float", 0 }, + { "GL_OES_vertex_type_10_10_10_2", "vertex_type_10_10_10_2", 0 }, + { "GL_AMD_compressed_3DC_texture", "compressed_3DC_texture", 0 }, + { "GL_AMD_compressed_ATC_texture", "compressed_ATC_texture", 0 }, + { "GL_AMD_program_binary_Z400", "program_binary_Z400", 0 }, + { "GL_EXT_blend_minmax", "blend_minmax", 0 }, + { "GL_EXT_read_format_bgra", "read_format_bgra", 0 }, + { "GL_EXT_texture_filter_anisotropic", "texture_filter_anisotrophic", 0 }, + { "GL_EXT_texture_format_BGRA8888", "texture_format_BGRA8888", 0 }, + { "GL_EXT_texture_type_2_10_10_10_REV", "texture_type_2_10_10_10_rev", 0 }, + { "GL_IMG_program_binary", "IMG_program_binary", 0 }, + { "GL_IMG_read_format", "IMG_read_format", 0 }, + { "GL_IMG_shader_binary", "IMG_shader_binary", 0 }, + { "GL_IMG_texture_compression_pvrtc", "IMG_texture_compression_pvrtc", 0 }, + { "GL_QCOM_perfmon_global_mode", "QCOM_perfmon_global_mode", 0 }, + { "GL_QCOM_writeonly_rendering", "QCOM_writeonly_rendering", 0 }, + { NULL, NULL, 0} +}; + +//------ Extensions supported in EvasGL -----// +static Extension_Entry _evasgl_ext_entries[] = { + { "EvasGL_KHR_image", "EGL_KHR_image", 0 }, + { "EvasGL_KHR_vg_parent_image", "EGL_KHR_vg_parent_image", 0 }, + { "EvasGL_KHR_gl_texture_2D_image", "EGL_KHR_gl_texture_2D_image", 0 }, + { "EvasGL_KHR_gl_texture_cubemap_image", "EGL_KHR_gl_texture_cubemap_image", 0 }, + { "EvasGL_KHR_gl_texture_3D_image", "EGL_KHR_gl_texture_3D_image", 0 }, + { "EvasGL_KHR_gl_renderbuffer_image", "EGL_KHR_gl_renderbuffer_image", 0 }, + { NULL, NULL, 0 } +}; + +static void +_sym_init(void) +{ + static int done = 0; + + if (done) return; + +#define FINDSYM(dst, sym, typ) \ + if ((!dst) && (glsym_eglGetProcAddress)) dst = (typ)glsym_eglGetProcAddress(sym); \ + if (!dst) dst = (typ)dlsym(RTLD_DEFAULT, sym) + + FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddress", glsym_func_eng_fn); + FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddressEXT", glsym_func_eng_fn); + FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddressARB", glsym_func_eng_fn); + FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddressKHR", glsym_func_eng_fn); + + FINDSYM(glsym_eglBindTexImage, "eglBindTexImage", glsym_func_void); + FINDSYM(glsym_eglBindTexImage, "eglBindTexImageEXT", glsym_func_void); + FINDSYM(glsym_eglBindTexImage, "eglBindTexImageARB", glsym_func_void); + FINDSYM(glsym_eglBindTexImage, "eglBindTexImageKHR", glsym_func_void); + + FINDSYM(glsym_eglReleaseTexImage, "eglReleaseTexImage", glsym_func_void); + FINDSYM(glsym_eglReleaseTexImage, "eglReleaseTexImageEXT", glsym_func_void); + FINDSYM(glsym_eglReleaseTexImage, "eglReleaseTexImageARB", glsym_func_void); + FINDSYM(glsym_eglReleaseTexImage, "eglReleaseTexImageKHR", glsym_func_void); + + FINDSYM(glsym_eglCreateImage, "eglCreateImage", glsym_func_void_ptr); + FINDSYM(glsym_eglCreateImage, "eglCreateImageEXT", glsym_func_void_ptr); + FINDSYM(glsym_eglCreateImage, "eglCreateImageARB", glsym_func_void_ptr); + FINDSYM(glsym_eglCreateImage, "eglCreateImageKHR", glsym_func_void_ptr); + + FINDSYM(glsym_eglDestroyImage, "eglDestroyImage", glsym_func_void); + FINDSYM(glsym_eglDestroyImage, "eglDestroyImageEXT", glsym_func_void); + FINDSYM(glsym_eglDestroyImage, "eglDestroyImageARB", glsym_func_void); + FINDSYM(glsym_eglDestroyImage, "eglDestroyImageKHR", glsym_func_void); + + FINDSYM(glsym_glEGLImageTargetTexture2DOES, "glEGLImageTargetTexture2DOES", glsym_func_void); + + FINDSYM(glsym_glEGLImageTargetRenderbufferStorageOES, "glEGLImageTargetRenderbufferStorageOES", glsym_func_void); + + FINDSYM(glsym_eglMapImageSEC, "eglMapImageSEC", glsym_func_void_ptr); + FINDSYM(glsym_eglUnmapImageSEC, "eglUnmapImageSEC", glsym_func_uint); + + FINDSYM(glsym_eglQueryString, "eglQueryString", glsym_func_const_char_ptr); + + FINDSYM(glsym_eglLockSurface, "eglLockSurface", glsym_func_uint); + FINDSYM(glsym_eglLockSurface, "eglLockSurfaceEXT", glsym_func_uint); + FINDSYM(glsym_eglLockSurface, "eglLockSurfaceARB", glsym_func_uint); + FINDSYM(glsym_eglLockSurface, "eglLockSurfaceKHR", glsym_func_uint); + + FINDSYM(glsym_eglUnlockSurface, "eglUnlockSurface", glsym_func_uint); + FINDSYM(glsym_eglUnlockSurface, "eglUnlockSurfaceEXT", glsym_func_uint); + FINDSYM(glsym_eglUnlockSurface, "eglUnlockSurfaceARB", glsym_func_uint); + FINDSYM(glsym_eglUnlockSurface, "eglUnlockSurfaceKHR", glsym_func_uint); + + //----------- GLES 2.0 Extensions ------------// + // If the symbol's not found, they get set to NULL + // If one of the functions in the extension exists, the extension in supported + /* GL_OES_get_program_binary */ + FINDSYM(glsym_glGetProgramBinaryOES, "glGetProgramBinary", glsym_func_void); + FINDSYM(glsym_glGetProgramBinaryOES, "glGetProgramBinaryEXT", glsym_func_void); + FINDSYM(glsym_glGetProgramBinaryOES, "glGetProgramBinaryARB", glsym_func_void); + FINDSYM(glsym_glGetProgramBinaryOES, "glGetProgramBinaryOES", glsym_func_void); + + FINDSYM(glsym_glProgramBinaryOES, "glProgramBinary", glsym_func_void); + FINDSYM(glsym_glProgramBinaryOES, "glProgramBinaryEXT", glsym_func_void); + FINDSYM(glsym_glProgramBinaryOES, "glProgramBinaryARB", glsym_func_void); + FINDSYM(glsym_glProgramBinaryOES, "glProgramBinaryOES", glsym_func_void); + + // Check the first function to see if the extension is supported... + if (glsym_glGetProgramBinaryOES) _gl_ext_entries[0].supported = 1; + + /* GL_OES_mapbuffer */ + FINDSYM(glsym_glMapBufferOES, "glMapBuffer", glsym_func_void_ptr); + FINDSYM(glsym_glMapBufferOES, "glMapBufferEXT", glsym_func_void_ptr); + FINDSYM(glsym_glMapBufferOES, "glMapBufferARB", glsym_func_void_ptr); + FINDSYM(glsym_glMapBufferOES, "glMapBufferOES", glsym_func_void_ptr); + + FINDSYM(glsym_glUnmapBufferOES, "glUnmapBuffer", glsym_func_uchar); + FINDSYM(glsym_glUnmapBufferOES, "glUnmapBufferEXT", glsym_func_uchar); + FINDSYM(glsym_glUnmapBufferOES, "glUnmapBufferARB", glsym_func_uchar); + FINDSYM(glsym_glUnmapBufferOES, "glUnmapBufferOES", glsym_func_uchar); + + FINDSYM(glsym_glGetBufferPointervOES, "glGetBufferPointerv", glsym_func_void); + FINDSYM(glsym_glGetBufferPointervOES, "glGetBufferPointervEXT", glsym_func_void); + FINDSYM(glsym_glGetBufferPointervOES, "glGetBufferPointervARB", glsym_func_void); + FINDSYM(glsym_glGetBufferPointervOES, "glGetBufferPointervOES", glsym_func_void); + + if (glsym_glMapBufferOES) _gl_ext_entries[1].supported = 1; + + /* GL_OES_texture_3D */ + FINDSYM(glsym_glTexImage3DOES, "glTexImage3D", glsym_func_void); + FINDSYM(glsym_glTexImage3DOES, "glTexImage3DEXT", glsym_func_void); + FINDSYM(glsym_glTexImage3DOES, "glTexImage3DARB", glsym_func_void); + FINDSYM(glsym_glTexImage3DOES, "glTexImage3DOES", glsym_func_void); + + FINDSYM(glsym_glTexSubImage3DOES, "glTexSubImage3D", glsym_func_void); + FINDSYM(glsym_glTexSubImage3DOES, "glTexSubImage3DEXT", glsym_func_void); + FINDSYM(glsym_glTexSubImage3DOES, "glTexSubImage3DARB", glsym_func_void); + FINDSYM(glsym_glTexSubImage3DOES, "glTexSubImage3DOES", glsym_func_void); + + FINDSYM(glsym_glCopyTexSubImage3DOES, "glCopyTexSubImage3D", glsym_func_void); + FINDSYM(glsym_glCopyTexSubImage3DOES, "glCopyTexSubImage3DARB", glsym_func_void); + FINDSYM(glsym_glCopyTexSubImage3DOES, "glCopyTexSubImage3DEXT", glsym_func_void); + FINDSYM(glsym_glCopyTexSubImage3DOES, "glCopyTexSubImage3DOES", glsym_func_void); + + FINDSYM(glsym_glCompressedTexImage3DOES, "glCompressedTexImage3D", glsym_func_void); + FINDSYM(glsym_glCompressedTexImage3DOES, "glCompressedTexImage3DARB", glsym_func_void); + FINDSYM(glsym_glCompressedTexImage3DOES, "glCompressedTexImage3DEXT", glsym_func_void); + FINDSYM(glsym_glCompressedTexImage3DOES, "glCompressedTexImage3DOES", glsym_func_void); + + FINDSYM(glsym_glCompressedTexSubImage3DOES, "glCompressedTexSubImage3D", glsym_func_void); + FINDSYM(glsym_glCompressedTexSubImage3DOES, "glCompressedTexSubImage3DARB", glsym_func_void); + FINDSYM(glsym_glCompressedTexSubImage3DOES, "glCompressedTexSubImage3DEXT", glsym_func_void); + FINDSYM(glsym_glCompressedTexSubImage3DOES, "glCompressedTexSubImage3DOES", glsym_func_void); + + FINDSYM(glsym_glFramebufferTexture3DOES, "glFramebufferTexture3D", glsym_func_void); + FINDSYM(glsym_glFramebufferTexture3DOES, "glFramebufferTexture3DARB", glsym_func_void); + FINDSYM(glsym_glFramebufferTexture3DOES, "glFramebufferTexture3DEXT", glsym_func_void); + FINDSYM(glsym_glFramebufferTexture3DOES, "glFramebufferTexture3DOES", glsym_func_void); + + if (glsym_glTexSubImage3DOES) _gl_ext_entries[2].supported = 1; + + /* AMD_performance_monitor */ + FINDSYM(glsym_glGetPerfMonitorGroupsAMD, "glGetPerfMonitorGroupsAMD", glsym_func_void); + FINDSYM(glsym_glGetPerfMonitorCountersAMD, "glGetPerfMonitorCountersAMD", glsym_func_void); + FINDSYM(glsym_glGetPerfMonitorGroupStringAMD, "glGetPerfMonitorGroupStringAMD", glsym_func_void); + FINDSYM(glsym_glGetPerfMonitorCounterStringAMD, "glGetPerfMonitorCounterStringAMD", glsym_func_void); + FINDSYM(glsym_glGetPerfMonitorCounterInfoAMD, "glGetPerfMonitorCounterInfoAMD", glsym_func_void); + FINDSYM(glsym_glGenPerfMonitorsAMD, "glGenPerfMonitorsAMD", glsym_func_void); + FINDSYM(glsym_glDeletePerfMonitorsAMD, "glDeletePerfMonitorsAMD", glsym_func_void); + FINDSYM(glsym_glSelectPerfMonitorCountersAMD, "glSelectPerfMonitorCountersAMD", glsym_func_void); + FINDSYM(glsym_glBeginPerfMonitorAMD, "glBeginPerfMonitorAMD", glsym_func_void); + FINDSYM(glsym_glEndPerfMonitorAMD, "glEndPerfMonitorAMD", glsym_func_void); + FINDSYM(glsym_glGetPerfMonitorCounterDataAMD, "glGetPerfMonitorCounterDataAMD", glsym_func_void); + + if (glsym_glGetPerfMonitorGroupsAMD) _gl_ext_entries[3].supported = 1; + + /* GL_EXT_discard_framebuffer */ + FINDSYM(glsym_glDiscardFramebufferEXT, "glDiscardFramebuffer", glsym_func_void); + FINDSYM(glsym_glDiscardFramebufferEXT, "glDiscardFramebufferARB", glsym_func_void); + FINDSYM(glsym_glDiscardFramebufferEXT, "glDiscardFramebufferEXT", glsym_func_void); + + if (glsym_glDiscardFramebufferEXT) _gl_ext_entries[4].supported = 1; + + /* GL_EXT_multi_draw_arrays */ + FINDSYM(glsym_glMultiDrawArraysEXT, "glMultiDrawArrays", glsym_func_void); + FINDSYM(glsym_glMultiDrawArraysEXT, "glMultiDrawArraysARB", glsym_func_void); + FINDSYM(glsym_glMultiDrawArraysEXT, "glMultiDrawArraysEXT", glsym_func_void); + + FINDSYM(glsym_glMultiDrawElementsEXT, "glMultiDrawElements", glsym_func_void); + FINDSYM(glsym_glMultiDrawElementsEXT, "glMultiDrawElementsARB", glsym_func_void); + FINDSYM(glsym_glMultiDrawElementsEXT, "glMultiDrawElementsEXT", glsym_func_void); + + if (glsym_glMultiDrawArraysEXT) _gl_ext_entries[5].supported = 1; + + /* GL_NV_fence */ + FINDSYM(glsym_glDeleteFencesNV, "glDeleteFencesNV", glsym_func_void); + FINDSYM(glsym_glGenFencesNV, "glGenFencesNV", glsym_func_void); + FINDSYM(glsym_glIsFenceNV, "glIsFenceNV", glsym_func_uchar); + FINDSYM(glsym_glTestFenceNV, "glTestFenceNV", glsym_func_uchar); + FINDSYM(glsym_glGetFenceivNV, "glGetFenceivNV", glsym_func_void); + FINDSYM(glsym_glFinishFenceNV, "glFinishFenceNV", glsym_func_void); + FINDSYM(glsym_glSetFenceNV, "glSetFenceNV", glsym_func_void); + + if (glsym_glDeleteFencesNV) _gl_ext_entries[6].supported = 1; + + /* GL_QCOM_driver_control */ + FINDSYM(glsym_glGetDriverControlsQCOM, "glGetDriverControlsQCOM", glsym_func_void); + FINDSYM(glsym_glGetDriverControlStringQCOM, "glGetDriverControlStringQCOM", glsym_func_void); + FINDSYM(glsym_glEnableDriverControlQCOM, "glEnableDriverControlQCOM", glsym_func_void); + FINDSYM(glsym_glDisableDriverControlQCOM, "glDisableDriverControlQCOM", glsym_func_void); + + if (glsym_glGetDriverControlsQCOM) _gl_ext_entries[7].supported = 1; + + /* GL_QCOM_extended_get */ + FINDSYM(glsym_glExtGetTexturesQCOM, "glExtGetTexturesQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetBuffersQCOM, "glExtGetBuffersQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetRenderbuffersQCOM, "glExtGetRenderbuffersQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetFramebuffersQCOM, "glExtGetFramebuffersQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetTexLevelParameterivQCOM, "glExtGetTexLevelParameterivQCOM", glsym_func_void); + FINDSYM(glsym_glExtTexObjectStateOverrideiQCOM, "glExtTexObjectStateOverrideiQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetTexSubImageQCOM, "glExtGetTexSubImageQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetBufferPointervQCOM, "glExtGetBufferPointervQCOM", glsym_func_void); + + if (glsym_glExtGetTexturesQCOM) _gl_ext_entries[8].supported = 1; + + /* GL_QCOM_extended_get2 */ + FINDSYM(glsym_glExtGetShadersQCOM, "glExtGetShadersQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetProgramsQCOM, "glExtGetProgramsQCOM", glsym_func_void); + FINDSYM(glsym_glExtIsProgramBinaryQCOM, "glExtIsProgramBinaryQCOM", glsym_func_uchar); + FINDSYM(glsym_glExtGetProgramBinarySourceQCOM, "glExtGetProgramBinarySourceQCOM", glsym_func_void); + + if (glsym_glExtGetShadersQCOM) _gl_ext_entries[9].supported = 1; +} + +static void +_extensions_init(Render_Engine *re) +{ + int i; + const char *glexts, *evasglexts; + + memset(_gl_ext_string, 0, 1024); + memset(_evasgl_ext_string, 0, 1024); + + // GLES 2.0 Extensions + glexts = (const char*)glGetString(GL_EXTENSIONS); + + DBG("--------GLES 2.0 Extensions--------"); + for (i = 0; _gl_ext_entries[i].name != NULL; i++) + { + if ( (strstr(glexts, _gl_ext_entries[i].name) != NULL) || + (strstr(glexts, _gl_ext_entries[i].real_name) != NULL) ) + { + _gl_ext_entries[i].supported = 1; + strcat(_gl_ext_string, _gl_ext_entries[i].name); + strcat(_gl_ext_string, " "); + DBG("\t%s", _gl_ext_entries[i].name); + } + + } + DBG(" "); + + // EGL Extensions + evasglexts = glsym_eglQueryString(re->win->egl_disp, EGL_EXTENSIONS); + + DBG("--------EvasGL Extensions----------"); + for (i = 0; _evasgl_ext_entries[i].name != NULL; i++) + { + if ( (strstr(evasglexts, _evasgl_ext_entries[i].name) != NULL) || + (strstr(evasglexts, _evasgl_ext_entries[i].real_name) != NULL) ) + { + _evasgl_ext_entries[i].supported = 1; + strcat(_evasgl_ext_string, _evasgl_ext_entries[i].name); + strcat(_evasgl_ext_string, " "); + DBG("\t%s", _evasgl_ext_entries[i].name); + } + } + DBG(" "); +} + +int _evas_engine_wl_egl_log_dom = -1; + +/* function tables - filled in later (func and parent func) */ +static Evas_Func func, pfunc; + +/* Function table for GL APIs */ +static Evas_GL_API gl_funcs; + +static void * +eng_info(Evas *e) +{ + Evas_Engine_Info_Wayland_Egl *info; + + info = calloc(1, sizeof(Evas_Engine_Info_Wayland_Egl)); + info->magic.magic = rand(); + info->func.best_depth_get = eng_best_depth_get; + info->render_mode = EVAS_RENDER_MODE_BLOCKING; + return info; + e = NULL; +} + +static void +eng_info_free(Evas *e __UNUSED__, void *info) +{ + Evas_Engine_Info_Wayland_Egl *in; +// dont free! why bother? its not worth it +// eina_log_domain_unregister(_evas_engine_GL_X11_log_dom); + in = (Evas_Engine_Info_Wayland_Egl *)info; + free(in); +} + +static int +_re_wincheck(Render_Engine *re) +{ + if (!re) return 0; + if (re->win->surf) return 1; + eng_window_resurf(re->win); + if (!re->win->surf) + { + ERR("GL engine can't re-create window surface!"); + } + return 0; +} + +static void +_re_winfree(Render_Engine *re) +{ + if (!re->win->surf) return; + eng_window_unsurf(re->win); +} + +static Render_Engine_GL_Resource * +_create_internal_glue_resources(void *data) +{ + Render_Engine *re; + Render_Engine_GL_Resource *rsc; + + if (!(re = (Render_Engine *)data)) return NULL; + + rsc = calloc(1, sizeof(Render_Engine_GL_Resource)); + if (!rsc) return NULL; + + // EGL + int context_attrs[3]; + context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION; + context_attrs[1] = 2; + context_attrs[2] = EGL_NONE; + + // Create resource surface for EGL + rsc->surface = + eglCreateWindowSurface(re->win->egl_disp, re->win->egl_config, + (EGLNativeWindowType)re->win->win, NULL); + if (!rsc->surface) + { + ERR("Creating internal resource surface failed."); + free(rsc); + return NULL; + } + + // Create a resource context for EGL + rsc->context = + eglCreateContext(re->win->egl_disp, re->win->egl_config, + re->win->egl_context[0], context_attrs); + if (!rsc->context) + { + ERR("Internal Resource Context Creations Failed."); + free(rsc); + return NULL; + } + + // Add to the resource resource list for cleanup + LKL(resource_lock); + resource_list = eina_list_prepend(resource_list, rsc); + LKU(resource_lock); + + // Set the resource in TLS + if (eina_tls_set(resource_key, (void*)rsc) == EINA_FALSE) + { + ERR("Failed setting TLS Resource"); + free(rsc); + return NULL; + } + + return rsc; +} + +static int +_destroy_internal_glue_resources(void *data) +{ + Render_Engine *re = (Render_Engine *)data; + Eina_List *l; + Render_Engine_GL_Resource *rsc; + + // EGL + // Delete the Resources + LKL(resource_lock); + EINA_LIST_FOREACH(resource_list, l, rsc) + { + if (rsc->surface) eglDestroySurface(re->win->egl_disp, rsc->surface); + if (rsc->context) eglDestroyContext(re->win->egl_disp, rsc->context); + free(rsc); + } + eina_list_free(resource_list); + LKU(resource_lock); + + // Destroy TLS + eina_tls_free(resource_key); + + return 1; +} + +static int +eng_setup(Evas *e, void *in) +{ + Render_Engine *re; + Evas_Engine_Info_Wayland_Egl *info; + + info = (Evas_Engine_Info_Wayland_Egl *)in; + if (!e->engine.data.output) + { + re = calloc(1, sizeof(Render_Engine)); + if (!re) return 0; + re->info = info; + re->evas = e; + e->engine.data.output = re; + re->w = e->output.w; + re->h = e->output.h; + + re->win = eng_window_new(re->info->info.display, + re->info->info.surface, + re->info->info.screen, + re->info->info.depth, re->w, re->h, + re->info->indirect, + re->info->info.destination_alpha, + re->info->info.rotation); + if (!re->win) + { + free(re); + e->engine.data.output = NULL; + return 0; + } + + gl_wins++; + if (!initted) + { + 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(); + + // Initialize TLS + if (eina_tls_new(&resource_key) == EINA_FALSE) + ERR("Error creating tls key"); + + DBG("TLS KEY create... %d", resource_key); + + initted = 1; + } + } + else + { + if (!(re = e->engine.data.output)) return 0; + if (_re_wincheck(re)) + { + if ((re->info->info.display != re->win->disp) || + (re->info->info.surface != re->win->surface) || + (re->info->info.screen != re->win->screen) || + (re->info->info.depth != re->win->depth) || + (re->info->info.destination_alpha != re->win->alpha) || + (re->info->info.rotation != re->win->rot)) + { + int inc = 0; + + /* if we already have a window surface, check for NULL input surface. + * this will mean we are hiding the window and should destroy + * things properly */ + if ((re->win->surface) && (re->info->info.surface = NULL)) + { + if (re->win) + { + eng_window_free(re->win); + gl_wins--; + } + free(re); + e->engine.data.output = NULL; + return 0; + } + + if (re->win) + { + re->win->gl_context->references++; + eng_window_free(re->win); + inc = 1; + gl_wins--; + } + re->w = e->output.w; + re->h = e->output.h; + re->win = eng_window_new(re->info->info.display, + re->info->info.surface, + re->info->info.screen, + re->info->info.depth, + re->w, re->h, + re->info->indirect, + re->info->info.destination_alpha, + re->info->info.rotation); + eng_window_use(re->win); + if (re->win) gl_wins++; + if ((re->win) && (inc)) + re->win->gl_context->references--; + } + else if ((re->win->w != e->output.w) || + (re->win->h != e->output.h)) + { + re->w = e->output.w; + re->h = e->output.h; + re->win->w = e->output.w; + re->win->h = e->output.h; + eng_window_use(re->win); + evas_gl_common_context_resize(re->win->gl_context, + re->win->w, re->win->h, + re->win->rot); + } + } + } + + if (!re->win) + { + free(re); + e->engine.data.output = NULL; + return 0; + } + + if (!e->engine.data.output) + { + if (re->win) + { + eng_window_free(re->win); + gl_wins--; + } + free(re); + e->engine.data.output = NULL; + return 0; + } + re->tb = evas_common_tilebuf_new(re->win->w, re->win->h); + if (!re->tb) + { + if (re->win) + { + eng_window_free(re->win); + gl_wins--; + } + free(re); + e->engine.data.output = NULL; + return 0; + } + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + + if (!e->engine.data.context) + { + e->engine.data.context = + e->engine.func->context_new(e->engine.data.output); + } + + eng_window_use(re->win); + + re->vsync = 0; + _sym_init(); + _extensions_init(re); + + // This is used in extensions. Not pretty but can't get display otherwise. + current_engine = re; + + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + + if (re) + { +#if 0 + // Destroy the resource surface + // Only required for EGL case + if (re->surface) + eglDestroySurface(re->win->egl_disp, re->surface); + + // Destroy the resource context + _destroy_internal_context(re, context); +#endif + if (re->win) + { + if ((initted == 1) && (gl_wins == 1)) + _destroy_internal_glue_resources(re); + eng_window_free(re->win); + gl_wins--; + } + evas_common_tilebuf_free(re->tb); + free(re); + } + if ((initted == 1) && (gl_wins == 0)) + { + evas_common_image_shutdown(); + evas_common_font_shutdown(); + initted = 0; + } +} + +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_use(re->win); + + if (re->win->win) + wl_egl_window_resize(re->win->win, w, h, 0, 0); + + evas_gl_common_context_resize(re->win->gl_context, w, h, re->win->rot); + evas_common_tilebuf_free(re->tb); + re->tb = evas_common_tilebuf_new(w, h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); +} + +static void +eng_output_tile_size_set(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_resize(re->win->gl_context, re->win->w, re->win->h, re->win->rot); + evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); + + RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, re->win->w, re->win->h); + if ((w <= 0) || (h <= 0)) return; + if (!re->win->draw.redraw) + { +#if 1 + re->win->draw.x1 = x; + re->win->draw.y1 = y; + re->win->draw.x2 = x + w - 1; + re->win->draw.y2 = y + h - 1; +#else + 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; +#endif + } + 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; + evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_clear(re->tb); +/* re->win->draw.redraw = 0;*/ +// INF("GL: finish update cycle!"); +} + +/* vsync games - not for now though */ +#define VSYNC_TO_SCREEN 1 + +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; + Tilebuf_Rect *rects; + + re = (Render_Engine *)data; + /* get the upate rect surface - return engine data as dummy */ + rects = evas_common_tilebuf_get_render_rects(re->tb); + if (rects) + { + evas_common_tilebuf_free_render_rects(rects); + evas_common_tilebuf_clear(re->tb); + eng_window_use(re->win); + if (!_re_wincheck(re)) return NULL; + evas_gl_common_context_flush(re->win->gl_context); + evas_gl_common_context_newframe(re->win->gl_context); + if (x) *x = 0; + if (y) *y = 0; + if (w) *w = re->win->w; + if (h) *h = re->win->h; + if (cx) *cx = 0; + if (cy) *cy = 0; + if (cw) *cw = re->win->w; + if (ch) *ch = re->win->h; + return re->win->gl_context->def_surface; + } + return NULL; +} + +//#define FRAMECOUNT 1 + +#ifdef FRAMECOUNT +static double +get_time(void) +{ + struct timeval timev; + + gettimeofday(&timev, NULL); + return (double)timev.tv_sec + (((double)timev.tv_usec) / 1000000); +} +#endif + +static int safe_native = -1; + +static void +eng_output_redraws_next_update_push(void *data, void *surface __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__) +{ + Render_Engine *re; +#ifdef FRAMECOUNT + static double pt = 0.0; + double ta, tb; +#endif + + re = (Render_Engine *)data; + /* put back update surface.. in this case just unflag redraw */ + if (!_re_wincheck(re)) return; + re->win->draw.redraw = 0; + re->win->draw.drew = 1; + evas_gl_common_context_flush(re->win->gl_context); + if (safe_native == -1) + { + const char *s; + + s = getenv("EVAS_GL_SAFE_NATIVE"); + safe_native = 0; + if (s) + safe_native = atoi(s); + else + { + s = (const char *)glGetString(GL_RENDERER); + if (s) + { + if (strstr(s, "PowerVR SGX 540") || strstr(s, "Mali-400 MP")) + safe_native = 1; + } + } + } + // this is needed to make sure all previous rendering is flushed to + // buffers/surfaces +# ifdef FRAMECOUNT + double t0 = get_time(); + ta = t0 - pt; + pt = t0; +# endif + // previous rendering should be done and swapped + if (!safe_native) eglWaitNative(EGL_CORE_NATIVE_ENGINE); +# ifdef FRAMECOUNT + double t1 = get_time(); + tb = t1 - t0; + printf("... %1.5f -> %1.5f | ", ta, tb); +# endif + if (eglGetError() != EGL_SUCCESS) + { + printf("Error: eglWaitNative(EGL_CORE_NATIVE_ENGINE) fail.\n"); + } +} + +static void +eng_output_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (!_re_wincheck(re)) return; + if (!re->win->draw.drew) return; +//x// printf("frame -> flush\n"); + re->win->draw.drew = 0; + eng_window_use(re->win); + +# ifdef FRAMECOUNT + double t0 = get_time(); +# endif + + if (!re->vsync) + { + if (re->info->vsync) eglSwapInterval(re->win->egl_disp, 1); + else eglSwapInterval(re->win->egl_disp, 0); + re->vsync = 1; + } + + if (re->info->callback.pre_swap) + re->info->callback.pre_swap(re->info->callback.data, re->evas); + + eglSwapBuffers(re->win->egl_disp, re->win->egl_surface[0]); + if (!safe_native) eglWaitGL(); + + if (re->info->callback.post_swap) + re->info->callback.post_swap(re->info->callback.data, re->evas); + + if (eglGetError() != EGL_SUCCESS) + printf("Error: eglSwapBuffers() fail.\n"); + +# ifdef FRAMECOUNT + double t1 = get_time(); + printf("%1.5f\n", t1 - t0); +# endif +} + +static void +eng_output_idle_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; +} + +static void +eng_output_dump(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_image_image_all_unload(); + evas_common_font_font_all_unload(); + evas_gl_common_image_all_unload(re->win->gl_context); + _re_winfree(re); +} + +static void +eng_context_cutout_add(void *data __UNUSED__, void *context, int x, int y, int w, int h) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; +// re->win->gl_context->dc = context; + evas_common_draw_context_add_cutout(context, x, y, w, h); +} + +static void +eng_context_cutout_clear(void *data __UNUSED__, void *context) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; +// re->win->gl_context->dc = context; + evas_common_draw_context_clear_cutouts(context); +} + +static void +eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + evas_gl_common_rect_draw(re->win->gl_context, x, y, w, h); +} + +static void +eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int x2, int y2) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + evas_gl_common_line_draw(re->win->gl_context, x1, y1, x2, y2); +} + +static void * +eng_polygon_point_add(void *data, void *context __UNUSED__, void *polygon, int x, int y) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_gl_common_poly_point_add(polygon, x, y); +} + +static void * +eng_polygon_points_clear(void *data, void *context __UNUSED__, void *polygon) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_gl_common_poly_points_clear(polygon); +} + +static void +eng_polygon_draw(void *data, void *context, void *surface __UNUSED__, void *polygon, int x, int y) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + evas_gl_common_poly_draw(re->win->gl_context, polygon, x, y); +} + +static int +eng_image_alpha_get(void *data __UNUSED__, void *image) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + if (!image) return 1; + im = image; + return im->alpha; +} + +static int +eng_image_colorspace_get(void *data __UNUSED__, void *image) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + if (!image) return EVAS_COLORSPACE_ARGB8888; + im = image; + return im->cs.space; +} + +static void +eng_image_mask_create(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *im; + + if (!image) return; + im = image; + if (!im->im->image.data) + evas_cache_image_load_data(&im->im->cache_entry); + if (!im->tex) + im->tex = evas_gl_common_texture_new(im->gc, im->im); +} + + +static void * +eng_image_alpha_set(void *data, void *image, int has_alpha) +{ + Render_Engine *re; + Evas_GL_Image *im; + + re = (Render_Engine *)data; + if (!image) return NULL; + im = image; + if (im->alpha == has_alpha) return image; + if (im->native.data) + { + im->alpha = has_alpha; + return image; + } + eng_window_use(re->win); + if ((im->tex) && (im->tex->pt->dyn.img)) + { + im->alpha = has_alpha; + im->tex->alpha = im->alpha; + return image; + } + /* FIXME: can move to gl_common */ + if (im->cs.space != EVAS_COLORSPACE_ARGB8888) return im; + if ((has_alpha) && (im->im->cache_entry.flags.alpha)) return image; + else if ((!has_alpha) && (!im->im->cache_entry.flags.alpha)) return image; + if (im->references > 1) + { + Evas_GL_Image *im_new; + + im_new = evas_gl_common_image_new_from_copied_data + (im->gc, im->im->cache_entry.w, im->im->cache_entry.h, + im->im->image.data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im_new) return im; + evas_gl_common_image_free(im); + im = im_new; + } + else + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + return evas_gl_common_image_alpha_set(im, has_alpha ? 1 : 0); +// im->im->cache_entry.flags.alpha = has_alpha ? 1 : 0; +// return image; +} + +static void * +eng_image_border_set(void *data __UNUSED__, void *image, int l __UNUSED__, int r __UNUSED__, int t __UNUSED__, int b __UNUSED__) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; + return image; +} + +static void +eng_image_border_get(void *data __UNUSED__, void *image __UNUSED__, int *l __UNUSED__, int *r __UNUSED__, int *t __UNUSED__, int *b __UNUSED__) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; +} + +static char * +eng_image_comment_get(void *data __UNUSED__, void *image, char *key __UNUSED__) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + if (!image) return NULL; + im = image; + if (!im->im) return NULL; + return im->im->info.comment; +} + +static char * +eng_image_format_get(void *data __UNUSED__, void *image) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + im = image; + return NULL; +} + +static void +eng_image_colorspace_set(void *data, void *image, int cspace) +{ + Render_Engine *re; + Evas_GL_Image *im; + + re = (Render_Engine *)data; + if (!image) return; + im = image; + if (im->native.data) return; + /* FIXME: can move to gl_common */ + if (im->cs.space == cspace) return; + eng_window_use(re->win); + evas_cache_image_colorspace(&im->im->cache_entry, cspace); + switch (cspace) + { + case EVAS_COLORSPACE_ARGB8888: + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + im->cs.data = NULL; + im->cs.no_free = 0; + } + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + if (im->tex) evas_gl_common_texture_free(im->tex); + im->tex = NULL; + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + } + if (im->im->cache_entry.h > 0) + im->cs.data = + calloc(1, im->im->cache_entry.h * sizeof(unsigned char *) * 2); + else + im->cs.data = NULL; + im->cs.no_free = 0; + break; + default: + abort(); + break; + } + im->cs.space = cspace; +} + +///////////////////////////////////////////////////////////////////////// +// +// +typedef struct _Native Native; + +struct _Native +{ + Evas_Native_Surface ns; + struct wl_egl_pixmap *pixmap; + + void *egl_surface; +}; + +// FIXME: this is enabled so updates happen - but its SLOOOOOOOOOOOOOOOW +// (i am sure this is the reason) not to mention seemingly superfluous. but +// i need to enable it for it to work on fglrx at least. havent tried nvidia. +// +// why is this the case? does anyone know? has anyone tried it on other gfx +// drivers? +// +//#define GLX_TEX_PIXMAP_RECREATE 1 + +static void +_native_bind_cb(void *data, void *image) +{ + Evas_GL_Image *im = image; + Native *n = im->native.data; + + if (n->egl_surface) + { + if (glsym_glEGLImageTargetTexture2DOES) + { + glsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, n->egl_surface); + if (eglGetError() != EGL_SUCCESS) + ERR("glEGLImageTargetTexture2DOES() failed."); + } + else + ERR("Try glEGLImageTargetTexture2DOES on EGL with no support"); + } + return; + data = NULL; +} + +static void +_native_unbind_cb(void *data, void *image) +{ + Evas_GL_Image *im = image; + /* Native *n = im->native.data; */ + + /* if (n->ns.type == EVAS_NATIVE_SURFACE_X11) */ + /* { */ + /* // nothing */ + /* } */ + /* else if (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL) */ + /* { */ + /* glBindTexture(GL_TEXTURE_2D, 0); */ + /* GLERR(__FUNCTION__, __FILE__, __LINE__, ""); */ + /* } */ + return; + data = NULL; +} + +static void +_native_free_cb(void *data, void *image) +{ + Render_Engine *re = data; + Evas_GL_Image *im = image; + Native *n = im->native.data; + uint32_t texid; +// uint32_t pmid, texid; + + /* eina_hash_del(re->win->gl_context->shared->native_pm_hash, &pmid, im); */ + if (n->egl_surface) + { + if (glsym_eglDestroyImage) + { + glsym_eglDestroyImage(re->win->egl_disp, n->egl_surface); + if (eglGetError() != EGL_SUCCESS) + ERR("eglDestroyImage() failed."); + } + else + ERR("Try eglDestroyImage on EGL with no support"); + } + + im->native.data = NULL; + im->native.func.data = NULL; + im->native.func.bind = NULL; + im->native.func.unbind = NULL; + im->native.func.free = NULL; + free(n); +} + +static void * +eng_image_native_set(void *data, void *image, void *native) +{ + Render_Engine *re = (Render_Engine *)data; + Evas_Native_Surface *ns = native; + Evas_GL_Image *im = image, *im2 = NULL; + Native *n = NULL; +// uint32_t pmid; +// uint32_t texid; + unsigned int tex = 0; + unsigned int fbo = 0; + + if (!im) + { + if ((!ns) && (ns->type == EVAS_NATIVE_SURFACE_OPENGL)) + { + im = evas_gl_common_image_new_from_data(re->win->gl_context, + ns->data.opengl.w, + ns->data.opengl.h, + NULL, 1, + EVAS_COLORSPACE_ARGB8888); + } + else + return NULL; + } + + if (ns) + { + /* vis = ns->data.x11.visual; */ + /* pm = ns->data.x11.pixmap; */ + if (im->native.data) + { + Evas_Native_Surface *ens = im->native.data; + /* if ((ens->data.x11.visual == vis) && */ + /* (ens->data.x11.pixmap == pm)) */ + return im; + } + } + if ((!ns) && (!im->native.data)) return im; + + eng_window_use(re->win); + + if (im->native.data) + { + if (im->native.func.free) + im->native.func.free(im->native.func.data, im); + evas_gl_common_image_native_disable(im); + } + + if (!ns) return im; + + /* if (ns->type == EVAS_NATIVE_SURFACE_X11) */ + /* { */ + /* pmid = pm; */ + /* im2 = eina_hash_find(re->win->gl_context->shared->native_pm_hash, &pmid); */ + if (im2 == im) return im; + if (im2) + { + n = im2->native.data; + if (n) + { + evas_gl_common_image_ref(im2); + evas_gl_common_image_free(im); + return im2; + } + } + + im2 = evas_gl_common_image_new_from_data(re->win->gl_context, + im->w, im->h, NULL, im->alpha, + EVAS_COLORSPACE_ARGB8888); + evas_gl_common_image_free(im); + im = im2; + /* if (native) */ + /* { */ + /* n = calloc(1, sizeof(Native)); */ + /* if (n) */ + /* { */ + /* EGLConfig egl_config; */ + /* int config_attrs[20]; */ + /* int num_config, i = 0; */ + + /* eina_hash_add(re->win->gl_context->shared->native_pm_hash, &pmid, im); */ + + /* config_attrs[i++] = EGL_RED_SIZE; */ + /* config_attrs[i++] = 8; */ + /* config_attrs[i++] = EGL_GREEN_SIZE; */ + /* config_attrs[i++] = 8; */ + /* config_attrs[i++] = EGL_BLUE_SIZE; */ + /* config_attrs[i++] = 8; */ + /* config_attrs[i++] = EGL_ALPHA_SIZE; */ + /* config_attrs[i++] = 8; */ + /* config_attrs[i++] = EGL_DEPTH_SIZE; */ + /* config_attrs[i++] = 0; */ + /* config_attrs[i++] = EGL_STENCIL_SIZE; */ + /* config_attrs[i++] = 0; */ + /* config_attrs[i++] = EGL_RENDERABLE_TYPE; */ + /* config_attrs[i++] = EGL_OPENGL_ES2_BIT; */ + /* config_attrs[i++] = EGL_SURFACE_TYPE; */ + /* config_attrs[i++] = EGL_PIXMAP_BIT; */ + /* config_attrs[i++] = EGL_NONE; */ + + /* if (!eglChooseConfig(re->win->egl_disp, config_attrs, */ + /* &egl_config, 1, &num_config)) */ + /* ERR("eglChooseConfig() failed for, num_config = %i", num_config); */ + /* memcpy(&(n->ns), ns, sizeof(Evas_Native_Surface)); */ + /* n->pixmap = pm; */ + /* if (glsym_eglCreateImage) */ + /* n->egl_surface = glsym_eglCreateImage(re->win->egl_disp, */ + /* EGL_NO_CONTEXT, */ + /* EGL_NATIVE_PIXMAP_KHR, */ + /* (void *)pm, */ + /* NULL); */ + /* else */ + /* ERR("Try eglCreateImage on EGL with no support"); */ + /* if (!n->egl_surface) */ + /* ERR("eglCreatePixmapSurface() for 0x%x failed", (unsigned int)pm); */ + /* im->native.yinvert = 1; */ + /* im->native.loose = 0; */ + /* im->native.data = n; */ + /* im->native.func.data = re; */ + /* im->native.func.bind = _native_bind_cb; */ + /* im->native.func.unbind = _native_unbind_cb; */ + /* im->native.func.free = _native_free_cb; */ + /* im->native.target = GL_TEXTURE_2D; */ + /* im->native.mipmap = 0; */ + /* evas_gl_common_image_native_enable(im); */ + /* } */ + /* } */ + return im; +} + +static void * +eng_image_native_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *im = image; + Native *n; + if (!im) return NULL; + n = im->native.data; + if (!n) return NULL; + return &(n->ns); +} + +#if 0 // filtering disabled +static void +eng_image_draw_filtered(void *data, void *context, void *surface, + void *image, Evas_Filter_Info *filter) +{ + Render_Engine *re = data; + + if (!image) return; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + + evas_gl_common_filter_draw(re->win->gl_context, image, filter); +} + +static Filtered_Image * +eng_image_filtered_get(void *im, uint8_t *key, size_t keylen) +{ + return evas_gl_common_image_filtered_get(im, key, keylen); +} + +static Filtered_Image * +eng_image_filtered_save(void *im, void *fim, uint8_t *key, size_t keylen) +{ + return evas_gl_common_image_filtered_save(im, fim, key, keylen); +} + +static void +eng_image_filtered_free(void *im, Filtered_Image *fim) +{ + evas_gl_common_image_filtered_free(im, fim); +} +#endif + +static void * +eng_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + *error = EVAS_LOAD_ERROR_NONE; + eng_window_use(re->win); + return evas_gl_common_image_load(re->win->gl_context, file, key, lo, error); +} + +static void * +eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + return evas_gl_common_image_new_from_data(re->win->gl_context, w, h, image_data, alpha, cspace); +} + +static void * +eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + return evas_gl_common_image_new_from_copied_data(re->win->gl_context, w, h, image_data, alpha, cspace); +} + +static void +eng_image_free(void *data, void *image) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (!image) return; + eng_window_use(re->win); + evas_gl_common_image_free(image); +} + +static void +eng_image_size_get(void *data __UNUSED__, void *image, int *w, int *h) +{ + if (!image) + { + *w = 0; + *h = 0; + return; + } + if (w) *w = ((Evas_GL_Image *)image)->w; + if (h) *h = ((Evas_GL_Image *)image)->h; +} + +static void * +eng_image_size_set(void *data, void *image, int w, int h) +{ + Render_Engine *re; + Evas_GL_Image *im = image; + Evas_GL_Image *im_old; + + re = (Render_Engine *)data; + if (!im) return NULL; + if (im->native.data) + { + im->w = w; + im->h = h; + return image; + } + eng_window_use(re->win); + if ((im->tex) && (im->tex->pt->dyn.img)) + { + evas_gl_common_texture_free(im->tex); + im->tex = NULL; + im->w = w; + im->h = h; + im->tex = evas_gl_common_texture_dynamic_new(im->gc, im); + return image; + } + im_old = image; + + switch (eng_image_colorspace_get(data, image)) + { + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + w &= ~0x1; + break; + } + + if ((im_old) && + ((int)im_old->im->cache_entry.w == w) && + ((int)im_old->im->cache_entry.h == h)) + return image; + if (im_old) + { + im = evas_gl_common_image_new(re->win->gl_context, w, h, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + /* + evas_common_load_image_data_from_file(im_old->im); + if (im_old->im->image->data) + { + evas_common_blit_rectangle(im_old->im, im->im, 0, 0, w, h, 0, 0); + evas_common_cpu_end_opt(); + } + */ + evas_gl_common_image_free(im_old); + } + else + im = evas_gl_common_image_new(re->win->gl_context, w, h, 1, EVAS_COLORSPACE_ARGB8888); + return im; +} + +static void * +eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h) +{ + Render_Engine *re; + Evas_GL_Image *im = image; + + re = (Render_Engine *)data; + if (!image) return NULL; + if (im->native.data) return image; + eng_window_use(re->win); + evas_gl_common_image_dirty(image, x, y, w, h); + return image; +} + +static void * +eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, int *err) +{ + Render_Engine *re; + Evas_GL_Image *im; + int error; + + re = (Render_Engine *)data; + if (!image) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_GENERIC; + return NULL; + } + im = image; + if (im->native.data) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_NONE; + return im; + } + + eng_window_use(re->win); + + if ((im->tex) && (im->tex->pt) && (im->tex->pt->dyn.img) && (im->cs.space == EVAS_COLORSPACE_ARGB8888)) + { + if (im->tex->pt->dyn.checked_out > 0) + { + im->tex->pt->dyn.checked_out++; + *image_data = im->tex->pt->dyn.data; + if (err) *err = EVAS_LOAD_ERROR_NONE; + return im; + } + *image_data = im->tex->pt->dyn.data = glsym_eglMapImageSEC(re->win->egl_disp, im->tex->pt->dyn.img); + + if (!im->tex->pt->dyn.data) + { + if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + return im; + } + im->tex->pt->dyn.checked_out++; + + if (err) *err = EVAS_LOAD_ERROR_NONE; + return im; + } + + /* Engine can fail to create texture after cache drop like eng_image_content_hint_set function, + so it is need to add code which check im->im's NULL value*/ + + if (!im->im) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return NULL; + } + + error = evas_cache_image_load_data(&im->im->cache_entry); + switch (im->cs.space) + { + case EVAS_COLORSPACE_ARGB8888: + if (to_write) + { + if (im->references > 1) + { + Evas_GL_Image *im_new; + + im_new = evas_gl_common_image_new_from_copied_data + (im->gc, im->im->cache_entry.w, im->im->cache_entry.h, + im->im->image.data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im_new) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return NULL; + } + evas_gl_common_image_free(im); + im = im_new; + } + else + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + } + *image_data = im->im->image.data; + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + *image_data = im->cs.data; + break; + default: + abort(); + break; + } + if (err) *err = error; + return im; +} + +static void * +eng_image_data_put(void *data, void *image, DATA32 *image_data) +{ + Render_Engine *re; + Evas_GL_Image *im, *im2; + + re = (Render_Engine *)data; + if (!image) return NULL; + im = image; + if (im->native.data) return image; + eng_window_use(re->win); + if ((im->tex) && (im->tex->pt) + && (im->tex->pt->dyn.data) + && (im->cs.space == EVAS_COLORSPACE_ARGB8888)) + { + int w, h; + + if (im->tex->pt->dyn.data == image_data) + { + im->tex->pt->dyn.checked_out--; + if (im->tex->pt->dyn.checked_out == 0) + glsym_eglUnmapImageSEC(re->win->egl_disp, im->tex->pt->dyn.img); + return image; + } + + w = im->im->cache_entry.w; + h = im->im->cache_entry.h; + im2 = eng_image_new_from_data(data, w, h, image_data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im2) return im; + evas_gl_common_image_free(im); + im = im2; + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + return im; + } + switch (im->cs.space) + { + case EVAS_COLORSPACE_ARGB8888: + if (image_data != im->im->image.data) + { + int w, h; + + w = im->im->cache_entry.w; + h = im->im->cache_entry.h; + im2 = eng_image_new_from_data(data, w, h, image_data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im2) return im; + evas_gl_common_image_free(im); + im = im2; + } + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + if (image_data != im->cs.data) + { + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + } + im->cs.data = image_data; + } + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + break; + default: + abort(); + break; + } + return im; +} + +static void +eng_image_data_preload_request(void *data __UNUSED__, void *image, const void *target) +{ + Evas_GL_Image *gim = image; + RGBA_Image *im; + + if (!gim) return; + if (gim->native.data) return; + im = (RGBA_Image *)gim->im; + if (!im) return; + evas_cache_image_preload_data(&im->cache_entry, target); +} + +static void +eng_image_data_preload_cancel(void *data __UNUSED__, void *image, const void *target) +{ + Evas_GL_Image *gim = image; + RGBA_Image *im; + + if (!gim) return; + if (gim->native.data) return; + im = (RGBA_Image *)gim->im; + if (!im) return; + evas_cache_image_preload_cancel(&im->cache_entry, target); +} + +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; + + re = (Render_Engine *)data; + if (!image) return; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + evas_gl_common_image_draw(re->win->gl_context, image, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h, + smooth); +} + +static void +eng_image_scale_hint_set(void *data __UNUSED__, void *image, int hint) +{ + if (image) evas_gl_common_image_scale_hint_set(image, hint); +} + +static int +eng_image_scale_hint_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + if (!gim) return EVAS_IMAGE_SCALE_HINT_NONE; + return gim->scale_hint; +} + +static void +eng_image_map_draw(void *data, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level) +{ + Evas_GL_Image *gim = image; + Render_Engine *re; + + re = (Render_Engine *)data; + if (!image) return; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + if (npoints != 4) + { + // FIXME: nash - you didn't fix this + abort(); + } + if ((p[0].x == p[3].x) && + (p[1].x == p[2].x) && + (p[0].y == p[1].y) && + (p[3].y == p[2].y) && + (p[0].x <= p[1].x) && + (p[0].y <= p[2].y) && + (p[0].u == 0) && + (p[0].v == 0) && + (p[1].u == (gim->w << FP)) && + (p[1].v == 0) && + (p[2].u == (gim->w << FP)) && + (p[2].v == (gim->h << FP)) && + (p[3].u == 0) && + (p[3].v == (gim->h << FP)) && + (p[0].col == 0xffffffff) && + (p[1].col == 0xffffffff) && + (p[2].col == 0xffffffff) && + (p[3].col == 0xffffffff)) + { + int dx, dy, dw, dh; + + dx = p[0].x >> FP; + dy = p[0].y >> FP; + dw = (p[2].x >> FP) - dx; + dh = (p[2].y >> FP) - dy; + eng_image_draw(data, context, surface, image, + 0, 0, gim->w, gim->h, dx, dy, dw, dh, smooth); + } + else + { + evas_gl_common_image_map_draw(re->win->gl_context, image, npoints, p, + smooth, level); + } +} + +static void * +eng_image_map_surface_new(void *data, int w, int h, int alpha) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_gl_common_image_surface_new(re->win->gl_context, w, h, alpha); +} + +static void +eng_image_map_surface_free(void *data __UNUSED__, void *surface) +{ + evas_gl_common_image_free(surface); +} + +static void +eng_image_content_hint_set(void *data __UNUSED__, void *image, int hint) +{ + if (image) evas_gl_common_image_content_hint_set(image, hint); +} + +static int +eng_image_content_hint_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + if (!gim) return EVAS_IMAGE_CONTENT_HINT_NONE; + return gim->content_hint; +} + +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_rgba_image_scalecache_flush(); + evas_gl_common_image_cache_flush(re->win->gl_context); + 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); + evas_common_rgba_image_scalecache_size_set(bytes); + evas_gl_common_image_cache_flush(re->win->gl_context); +} + +static int +eng_image_cache_get(void *data __UNUSED__) +{ + return evas_common_image_get_cache(); +} + +static void +eng_image_stride_get(void *data __UNUSED__, void *image, int *stride) +{ + Evas_GL_Image *im = image; + + if ((im->tex) && (im->tex->pt->dyn.img)) + *stride = im->tex->pt->dyn.stride; + else + *stride = im->w * 4; +} + +static void +eng_font_draw(void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *intl_props) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + { + // FIXME: put im into context so we can free it + static RGBA_Image *im = NULL; + + if (!im) + im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); + im->cache_entry.w = re->win->w; + im->cache_entry.h = re->win->h; + evas_common_draw_context_font_ext_set(context, + re->win->gl_context, + evas_gl_font_texture_new, + evas_gl_font_texture_free, + evas_gl_font_texture_draw); + evas_common_font_draw(im, context, (RGBA_Font *) font, x, y, + intl_props); + evas_common_draw_context_font_ext_set(context, NULL, NULL, NULL, NULL); + } +} + +static Eina_Bool +eng_canvas_alpha_get(void *data, void *info __UNUSED__) +{ + Render_Engine *re = (Render_Engine *)data; + return re->win->alpha; +} + +static int +_set_internal_config(Render_Engine_GL_Surface *sfc, Evas_GL_Config *cfg) +{ + // Also initialize pixel format here as well... + switch(cfg->color_format) + { + case EVAS_GL_RGB_888: + sfc->rt_fmt = GL_RGB; + sfc->rt_internal_fmt = GL_RGB; + break; + case EVAS_GL_RGBA_8888: + sfc->rt_fmt = GL_RGBA; + sfc->rt_internal_fmt = GL_RGBA; + break; + default: + ERR("Invalid Color Format!"); + return 0; + } + + switch(cfg->depth_bits) + { + case EVAS_GL_DEPTH_NONE: + break; + case EVAS_GL_DEPTH_BIT_8: + case EVAS_GL_DEPTH_BIT_16: + case EVAS_GL_DEPTH_BIT_24: + // 24 bit doesn't work... just cover it with 16 for now.. + sfc->rb_depth_fmt = GL_DEPTH_COMPONENT16; + break; + case EVAS_GL_DEPTH_BIT_32: + default: + ERR("Unsupported Depth Bits Format!"); + return 0; + } + + switch(cfg->stencil_bits) + { + case EVAS_GL_STENCIL_NONE: + break; + case EVAS_GL_STENCIL_BIT_1: + case EVAS_GL_STENCIL_BIT_2: + case EVAS_GL_STENCIL_BIT_4: + case EVAS_GL_STENCIL_BIT_8: + sfc->rb_stencil_fmt = GL_STENCIL_INDEX8; + break; + case EVAS_GL_STENCIL_BIT_16: + default: + ERR("Unsupported Stencil Bits Format!"); + return 0; + } + + // Do Packed Depth24_Stencil8 Later... + + return 1; +} + +static int +_create_rt_buffers(Render_Engine *data __UNUSED__, + Render_Engine_GL_Surface *sfc) +{ + // Render Target texture + glGenTextures(1, &sfc->rt_tex ); + + // Depth RenderBuffer - Create storage here... + if (sfc->depth_bits != EVAS_GL_DEPTH_NONE) + glGenRenderbuffers(1, &sfc->rb_depth); + + // Stencil RenderBuffer - Create Storage here... + if (sfc->stencil_bits != EVAS_GL_STENCIL_NONE) + glGenRenderbuffers(1, &sfc->rb_stencil); + + return 1; +} + +static int +_attach_fbo_surface(Render_Engine *data __UNUSED__, + Render_Engine_GL_Surface *sfc, + Render_Engine_GL_Context *ctx) +{ + int fb_status; + + // Initialize Texture + glBindTexture(GL_TEXTURE_2D, sfc->rt_tex ); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, sfc->w, sfc->h, 0, + GL_RGBA, GL_UNSIGNED_BYTE, NULL); + glBindTexture(GL_TEXTURE_2D, 0); + + + // Attach texture to FBO + glBindFramebuffer(GL_FRAMEBUFFER, ctx->context_fbo); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_TEXTURE_2D, sfc->rt_tex, 0); + + // Depth RenderBuffer - Attach it to FBO + if (sfc->depth_bits != EVAS_GL_DEPTH_NONE) + { + glBindRenderbuffer(GL_RENDERBUFFER, sfc->rb_depth); + glRenderbufferStorage(GL_RENDERBUFFER, sfc->rb_depth_fmt, + sfc->w, sfc->h); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, + GL_RENDERBUFFER, sfc->rb_depth); + glBindRenderbuffer(GL_RENDERBUFFER, 0); + } + + // Stencil RenderBuffer - Attach it to FBO + if (sfc->stencil_bits != EVAS_GL_STENCIL_NONE) + { + glBindRenderbuffer(GL_RENDERBUFFER, sfc->rb_stencil); + glRenderbufferStorage(GL_RENDERBUFFER, sfc->rb_stencil_fmt, + sfc->w, sfc->h); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, + GL_RENDERBUFFER, sfc->rb_stencil); + glBindRenderbuffer(GL_RENDERBUFFER, 0); + } + + // Check FBO for completeness + fb_status = glCheckFramebufferStatus(GL_FRAMEBUFFER); + if (fb_status != GL_FRAMEBUFFER_COMPLETE) + { + ERR("FBO not complete!"); + return 0; + } + + return 1; +} + + +static void * +eng_gl_surface_create(void *data, void *config, int w, int h) +{ + Render_Engine *re; + Render_Engine_GL_Surface *sfc; + Render_Engine_GL_Resource *rsc; + Evas_GL_Config *cfg; + int ret; + + sfc = calloc(1, sizeof(Render_Engine_GL_Surface)); + if (!sfc) return NULL; + + re = (Render_Engine *)data; + cfg = (Evas_GL_Config *)config; + + sfc->initialized = 0; + sfc->fbo_attached = 0; + sfc->w = w; + sfc->h = h; + sfc->depth_bits = cfg->depth_bits; + sfc->stencil_bits = cfg->stencil_bits; + sfc->rt_tex = 0; + sfc->rb_depth = 0; + sfc->rb_stencil = 0; + + // Set the internal format based on the config + if (!_set_internal_config(sfc, cfg)) + { + ERR("Unsupported Format!"); + free(sfc); + return NULL; + } + + // Create internal resource context if it hasn't been created already + if ((rsc = eina_tls_get(resource_key)) == NULL) + { + if ((rsc = _create_internal_glue_resources(re)) == NULL) + { + ERR("Error creating internal resources."); + free(sfc); + return NULL; + } + } + + // I'm using evas's original context to create the render target texture + // This is to prevent awkwardness in using native_surface_get() function + // If the rt texture creation is deferred till the context is created and + // make_current called, the user can't call native_surface_get() right + // after the surface is created. hence this is done here using evas' context. + ret = eglMakeCurrent(re->win->egl_disp, rsc->surface, rsc->surface, rsc->context); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + free(sfc); + return NULL; + } + + // Create Render texture + if (!_create_rt_buffers(re, sfc)) + { + ERR("_create_rt_buffers() failed."); + free(sfc); + return NULL; + } + + ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + free(sfc); + return NULL; + } + + return sfc; +} + +static int +eng_gl_surface_destroy(void *data, void *surface) +{ + Render_Engine *re; + Render_Engine_GL_Surface *sfc; + Render_Engine_GL_Resource *rsc; + int ret; + + re = (Render_Engine *)data; + sfc = (Render_Engine_GL_Surface*)surface; + + if (!sfc) return 0; + + if ((rsc = eina_tls_get(resource_key)) == EINA_FALSE) return 0; + + ret = eglMakeCurrent(re->win->egl_disp, rsc->surface, rsc->surface, rsc->context); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + return 0; + } + + // Delete FBO/RBO and Texture here + if (sfc->rt_tex) + glDeleteTextures(1, &sfc->rt_tex); + + if (sfc->rb_depth) + glDeleteRenderbuffers(1, &sfc->rb_depth); + + if (sfc->rb_stencil) + glDeleteRenderbuffers(1, &sfc->rb_stencil); + + ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + free(sfc); + return 0; + } + + free(sfc); + surface = NULL; + + return 1; +} + +static void * +eng_gl_context_create(void *data, void *share_context) +{ + Render_Engine *re; + Render_Engine_GL_Context *ctx; + Render_Engine_GL_Context *share_ctx; + int context_attrs[3]; + + ctx = calloc(1, sizeof(Render_Engine_GL_Context)); + + if (!ctx) return NULL; + + re = (Render_Engine *)data; + share_ctx = (Render_Engine_GL_Context *)share_context; + + // Set the share context to Evas' GL context if share_context is NULL. + // Otherwise set it to the given share_context. + + // EGL + context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION; + context_attrs[1] = 2; + context_attrs[2] = EGL_NONE; + + if (share_ctx) + { + ctx->context = eglCreateContext(re->win->egl_disp, + re->win->egl_config, + share_ctx->context, // Share Context + context_attrs); + } + else + { + ctx->context = eglCreateContext(re->win->egl_disp, + re->win->egl_config, + re->win->egl_context[0], // Evas' GL Context + context_attrs); + } + + if (!ctx->context) + { + ERR("eglCreateContext() fail. code=%#x", eglGetError()); + return NULL; + } + + ctx->initialized = 0; + ctx->context_fbo = 0; + ctx->current_sfc = NULL; + + return ctx; +} + +static int +eng_gl_context_destroy(void *data, void *context) +{ + Render_Engine *re; + Render_Engine_GL_Context *ctx; + Render_Engine_GL_Resource *rsc; + int ret; + + re = (Render_Engine *)data; + ctx = (Render_Engine_GL_Context*)context; + + if (!ctx) return 0; + + if ((rsc = eina_tls_get(resource_key)) == EINA_FALSE) return 0; + + // 1. Do a make current with the given context + ret = eglMakeCurrent(re->win->egl_disp, rsc->surface, + rsc->surface, ctx->context); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + return 0; + } + + // 2. Delete the FBO + if (ctx->context_fbo) + glDeleteFramebuffers(1, &ctx->context_fbo); + + // 3. Destroy the Context + eglDestroyContext(re->win->egl_disp, ctx->context); + + ctx->context = EGL_NO_CONTEXT; + + ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, + EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + return 0; + } + + free(ctx); + context = NULL; + + return 1; +} + +static int +eng_gl_make_current(void *data __UNUSED__, void *surface, void *context) +{ + Render_Engine *re; + Render_Engine_GL_Surface *sfc; + Render_Engine_GL_Context *ctx; + int ret = 0; + Render_Engine_GL_Resource *rsc; + + re = (Render_Engine *)data; + sfc = (Render_Engine_GL_Surface*)surface; + ctx = (Render_Engine_GL_Context*)context; + + // Unset surface/context + if ((!sfc) || (!ctx)) + { + ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, + EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + return 0; + } + + if (ctx) ctx->current_sfc = NULL; + if (sfc) sfc->current_ctx = NULL; + current_evgl_ctx = NULL; + return 1; + } + + // Do a make current only if it's not already current + if ((rsc = eina_tls_get(resource_key)) == EINA_FALSE) return 0; + + if ((eglGetCurrentContext() != ctx->context) || + (eglGetCurrentSurface(EGL_READ) != rsc->surface) || + (eglGetCurrentSurface(EGL_DRAW) != rsc->surface) ) + { + // Flush remainder of what's in Evas' pipeline + if (re->win) eng_window_use(NULL); + + // Do a make current + ret = eglMakeCurrent(re->win->egl_disp, rsc->surface, + rsc->surface, ctx->context); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + return 0; + } + } + + // Create FBO if not already created + if (!ctx->initialized) + { + glGenFramebuffers(1, &ctx->context_fbo); + ctx->initialized = 1; + } + + // Attach FBO if it hasn't been attached or if surface changed + if ((!sfc->fbo_attached) || (ctx->current_sfc != sfc)) + { + if (!_attach_fbo_surface(re, sfc, ctx)) + { + ERR("_attach_fbo_surface() failed."); + return 0; + } + + if (ctx->current_fbo) + // Bind to the previously bound buffer + glBindFramebuffer(GL_FRAMEBUFFER, ctx->current_fbo); + else + // Bind FBO + glBindFramebuffer(GL_FRAMEBUFFER, ctx->context_fbo); + + sfc->fbo_attached = 1; + } + + // Set the current surface/context + ctx->current_sfc = sfc; + sfc->current_ctx = ctx; + current_evgl_ctx = ctx; + + return 1; +} + +static void * +eng_gl_string_query(void *data __UNUSED__, int name) +{ + switch(name) + { + case EVAS_GL_EXTENSIONS: + return (void*)_evasgl_ext_string; + default: + return NULL; + }; +} + +static void * +eng_gl_proc_address_get(void *data __UNUSED__, const char *name) +{ + if (glsym_eglGetProcAddress) return glsym_eglGetProcAddress(name); + return dlsym(RTLD_DEFAULT, name); +} + +static int +eng_gl_native_surface_get(void *data, void *surface, void *native_surface) +{ + Render_Engine *re; + Render_Engine_GL_Surface *sfc; + Evas_Native_Surface *ns; + + re = (Render_Engine *)data; + sfc = (Render_Engine_GL_Surface*)surface; + ns = (Evas_Native_Surface*)native_surface; + + ns->type = EVAS_NATIVE_SURFACE_OPENGL; + ns->version = EVAS_NATIVE_SURFACE_VERSION; + ns->data.opengl.texture_id = sfc->rt_tex; + ns->data.opengl.x = 0; + ns->data.opengl.y = 0; + ns->data.opengl.w = sfc->w; + ns->data.opengl.h = sfc->h; + + return 1; +} + + +static const GLubyte * +evgl_glGetString(GLenum name) +{ + if (name == GL_EXTENSIONS) + return (GLubyte *)_gl_ext_string; //glGetString(GL_EXTENSIONS); + else + return glGetString(name); +} + +static void +evgl_glBindFramebuffer(GLenum target, GLuint framebuffer) +{ + Render_Engine_GL_Context *ctx = current_evgl_ctx; + + // Take care of BindFramebuffer 0 issue + if (framebuffer==0) + { + if (ctx) + { + glBindFramebuffer(target, ctx->context_fbo); + ctx->current_fbo = 0; + } + } + else + { + glBindFramebuffer(target, framebuffer); + + // Save this for restore when doing make current + if (ctx) + ctx->current_fbo = framebuffer; + } +} + +static void +evgl_glBindRenderbuffer(GLenum target, GLuint renderbuffer) +{ + // Add logic to take care when renderbuffer=0 + // On a second thought we don't need this + glBindRenderbuffer(target, renderbuffer); +} + +static void +evgl_glClearDepthf(GLclampf depth) +{ + glClearDepthf(depth); +} + +static void +evgl_glDepthRangef(GLclampf zNear, GLclampf zFar) +{ + glDepthRangef(zNear, zFar); +} + +static void +evgl_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) +{ + glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); +} + +static void +evgl_glReleaseShaderCompiler(void) +{ + glReleaseShaderCompiler(); +} + +static void +evgl_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) +{ + glShaderBinary(n, shaders, binaryformat, binary, length); +} + +//--------------------------------// +//#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +// EGL Extensions +static void * +evgl_evasglCreateImage(int target, void* buffer, int *attrib_list) +{ + if (current_engine) + { + return glsym_eglCreateImage(current_engine->win->egl_disp, + EGL_NO_CONTEXT, + target, + buffer, + attrib_list); + } + else + { + ERR("Invalid Engine... (Can't acccess EGL Display)\n"); + return NULL; + } +} + +static void +evgl_evasglDestroyImage(EvasGLImage image) +{ + if (current_engine) + glsym_eglDestroyImage(current_engine->win->egl_disp, image); + else + ERR("Invalid Engine... (Can't acccess EGL Display)\n"); +} + +static void +evgl_glEvasGLImageTargetTexture2DOES(GLenum target, EvasGLImage image) +{ + glsym_glEGLImageTargetTexture2DOES(target, image); +} + +static void +evgl_glEvasGLImageTargetRenderbufferStorageOES(GLenum target, EvasGLImage image) +{ + glsym_glEGLImageTargetTexture2DOES(target, image); +} + +//--------------------------------// + + +static void * +eng_gl_api_get(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + + gl_funcs.version = EVAS_GL_API_VERSION; + +#define ORD(f) EVAS_API_OVERRIDE(f, &gl_funcs, ) + // GLES 2.0 + ORD(glActiveTexture); + ORD(glAttachShader); + ORD(glBindAttribLocation); + ORD(glBindBuffer); + ORD(glBindTexture); + ORD(glBlendColor); + ORD(glBlendEquation); + ORD(glBlendEquationSeparate); + ORD(glBlendFunc); + ORD(glBlendFuncSeparate); + ORD(glBufferData); + ORD(glBufferSubData); + ORD(glCheckFramebufferStatus); + ORD(glClear); + ORD(glClearColor); +// ORD(glClearDepthf); + ORD(glClearStencil); + ORD(glColorMask); + ORD(glCompileShader); + ORD(glCompressedTexImage2D); + ORD(glCompressedTexSubImage2D); + ORD(glCopyTexImage2D); + ORD(glCopyTexSubImage2D); + ORD(glCreateProgram); + ORD(glCreateShader); + ORD(glCullFace); + ORD(glDeleteBuffers); + ORD(glDeleteFramebuffers); + ORD(glDeleteProgram); + ORD(glDeleteRenderbuffers); + ORD(glDeleteShader); + ORD(glDeleteTextures); + ORD(glDepthFunc); + ORD(glDepthMask); +// ORD(glDepthRangef); + ORD(glDetachShader); + ORD(glDisable); + ORD(glDisableVertexAttribArray); + ORD(glDrawArrays); + ORD(glDrawElements); + ORD(glEnable); + ORD(glEnableVertexAttribArray); + ORD(glFinish); + ORD(glFlush); + ORD(glFramebufferRenderbuffer); + ORD(glFramebufferTexture2D); + ORD(glFrontFace); + ORD(glGenBuffers); + ORD(glGenerateMipmap); + ORD(glGenFramebuffers); + ORD(glGenRenderbuffers); + ORD(glGenTextures); + ORD(glGetActiveAttrib); + ORD(glGetActiveUniform); + ORD(glGetAttachedShaders); + ORD(glGetAttribLocation); + ORD(glGetBooleanv); + ORD(glGetBufferParameteriv); + ORD(glGetError); + ORD(glGetFloatv); + ORD(glGetFramebufferAttachmentParameteriv); + ORD(glGetIntegerv); + ORD(glGetProgramiv); + ORD(glGetProgramInfoLog); + ORD(glGetRenderbufferParameteriv); + ORD(glGetShaderiv); + ORD(glGetShaderInfoLog); +// ORD(glGetShaderPrecisionFormat); + ORD(glGetShaderSource); +// ORD(glGetString); + ORD(glGetTexParameterfv); + ORD(glGetTexParameteriv); + ORD(glGetUniformfv); + ORD(glGetUniformiv); + ORD(glGetUniformLocation); + ORD(glGetVertexAttribfv); + ORD(glGetVertexAttribiv); + ORD(glGetVertexAttribPointerv); + ORD(glHint); + ORD(glIsBuffer); + ORD(glIsEnabled); + ORD(glIsFramebuffer); + ORD(glIsProgram); + ORD(glIsRenderbuffer); + ORD(glIsShader); + ORD(glIsTexture); + ORD(glLineWidth); + ORD(glLinkProgram); + ORD(glPixelStorei); + ORD(glPolygonOffset); + ORD(glReadPixels); +// ORD(glReleaseShaderCompiler); + ORD(glRenderbufferStorage); + ORD(glSampleCoverage); + ORD(glScissor); +// ORD(glShaderBinary); + ORD(glShaderSource); + ORD(glStencilFunc); + ORD(glStencilFuncSeparate); + ORD(glStencilMask); + ORD(glStencilMaskSeparate); + ORD(glStencilOp); + ORD(glStencilOpSeparate); + ORD(glTexImage2D); + ORD(glTexParameterf); + ORD(glTexParameterfv); + ORD(glTexParameteri); + ORD(glTexParameteriv); + ORD(glTexSubImage2D); + ORD(glUniform1f); + ORD(glUniform1fv); + ORD(glUniform1i); + ORD(glUniform1iv); + ORD(glUniform2f); + ORD(glUniform2fv); + ORD(glUniform2i); + ORD(glUniform2iv); + ORD(glUniform3f); + ORD(glUniform3fv); + ORD(glUniform3i); + ORD(glUniform3iv); + ORD(glUniform4f); + ORD(glUniform4fv); + ORD(glUniform4i); + ORD(glUniform4iv); + ORD(glUniformMatrix2fv); + ORD(glUniformMatrix3fv); + ORD(glUniformMatrix4fv); + ORD(glUseProgram); + ORD(glValidateProgram); + ORD(glVertexAttrib1f); + ORD(glVertexAttrib1fv); + ORD(glVertexAttrib2f); + ORD(glVertexAttrib2fv); + ORD(glVertexAttrib3f); + ORD(glVertexAttrib3fv); + ORD(glVertexAttrib4f); + ORD(glVertexAttrib4fv); + ORD(glVertexAttribPointer); + ORD(glViewport); +#undef ORD + +#define ORD(f) EVAS_API_OVERRIDE(f, &gl_funcs, glsym_) + // Extensions + ORD(glGetProgramBinaryOES); + ORD(glProgramBinaryOES); + ORD(glMapBufferOES); + ORD(glUnmapBufferOES); + ORD(glGetBufferPointervOES); + ORD(glTexImage3DOES); + ORD(glTexSubImage3DOES); + ORD(glCopyTexSubImage3DOES); + ORD(glCompressedTexImage3DOES); + ORD(glCompressedTexSubImage3DOES); + ORD(glFramebufferTexture3DOES); + ORD(glGetPerfMonitorGroupsAMD); + ORD(glGetPerfMonitorCountersAMD); + ORD(glGetPerfMonitorGroupStringAMD); + ORD(glGetPerfMonitorCounterStringAMD); + ORD(glGetPerfMonitorCounterInfoAMD); + ORD(glGenPerfMonitorsAMD); + ORD(glDeletePerfMonitorsAMD); + ORD(glSelectPerfMonitorCountersAMD); + ORD(glBeginPerfMonitorAMD); + ORD(glEndPerfMonitorAMD); + ORD(glGetPerfMonitorCounterDataAMD); + ORD(glDiscardFramebufferEXT); + ORD(glMultiDrawArraysEXT); + ORD(glMultiDrawElementsEXT); + ORD(glDeleteFencesNV); + ORD(glGenFencesNV); + ORD(glIsFenceNV); + ORD(glTestFenceNV); + ORD(glGetFenceivNV); + ORD(glFinishFenceNV); + ORD(glSetFenceNV); + ORD(glGetDriverControlsQCOM); + ORD(glGetDriverControlStringQCOM); + ORD(glEnableDriverControlQCOM); + ORD(glDisableDriverControlQCOM); + ORD(glExtGetTexturesQCOM); + ORD(glExtGetBuffersQCOM); + ORD(glExtGetRenderbuffersQCOM); + ORD(glExtGetFramebuffersQCOM); + ORD(glExtGetTexLevelParameterivQCOM); + ORD(glExtTexObjectStateOverrideiQCOM); + ORD(glExtGetTexSubImageQCOM); + ORD(glExtGetBufferPointervQCOM); + ORD(glExtGetShadersQCOM); + ORD(glExtGetProgramsQCOM); + ORD(glExtIsProgramBinaryQCOM); + ORD(glExtGetProgramBinarySourceQCOM); +#undef ORD + +// Override functions wrapped by Evas_GL +#define ORD(f) EVAS_API_OVERRIDE(f, &gl_funcs, evgl_) + ORD(glBindFramebuffer); + ORD(glBindRenderbuffer); + + // GLES2.0 API compat on top of desktop gl + ORD(glClearDepthf); + ORD(glDepthRangef); + ORD(glGetShaderPrecisionFormat); + ORD(glReleaseShaderCompiler); + ORD(glShaderBinary); + + ORD(glGetString); + + // GLES 2.0 Extensions that needs wrapping + ORD(evasglCreateImage); + ORD(evasglDestroyImage); + ORD(glEvasGLImageTargetTexture2DOES); + ORD(glEvasGLImageTargetRenderbufferStorageOES); + +#undef ORD + + return &gl_funcs; +} + +static int +eng_image_load_error_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *im; + + if (!image) return EVAS_LOAD_ERROR_NONE; + im = image; + return im->im->cache_entry.load_error; +} + +static Eina_Bool +eng_image_animated_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return EINA_FALSE; + im = (Image_Entry *)gim->im; + if (!im) return EINA_FALSE; + + return im->flags.animated; +} + +static int +eng_image_animated_frame_count_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return -1; + im = (Image_Entry *)gim->im; + if (!im) return -1; + + if (!im->flags.animated) return -1; + return im->frame_count; +} + +static Evas_Image_Animated_Loop_Hint +eng_image_animated_loop_type_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return EVAS_IMAGE_ANIMATED_HINT_NONE; + im = (Image_Entry *)gim->im; + if (!im) return EVAS_IMAGE_ANIMATED_HINT_NONE; + + if (!im->flags.animated) return EVAS_IMAGE_ANIMATED_HINT_NONE; + return im->loop_hint; +} + +static int +eng_image_animated_loop_count_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return -1; + im = (Image_Entry *)gim->im; + if (!im) return -1; + + if (!im->flags.animated) return -1; + return im->loop_count; +} + +static double +eng_image_animated_frame_duration_get(void *data __UNUSED__, void *image, int start_frame, int frame_num) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return -1; + im = (Image_Entry *)gim->im; + if (!im) return -1; + + if (!im->flags.animated) return -1; + return evas_common_load_rgba_image_frame_duration_from_file(im, start_frame, frame_num); +} + +static Eina_Bool +eng_image_animated_frame_set(void *data __UNUSED__, void *image, int frame_index) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return EINA_FALSE; + im = (Image_Entry *)gim->im; + if (!im) return EINA_FALSE; + + if (!im->flags.animated) return EINA_FALSE; + if (im->cur_frame == frame_index) return EINA_FALSE; + + im->cur_frame = frame_index; + return EINA_TRUE; +} + +static Eina_Bool +eng_image_can_region_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + if (!gim) return EINA_FALSE; + im = (Image_Entry *)gim->im; + if (!im) return EINA_FALSE; + return ((Evas_Image_Load_Func*) im->info.loader)->do_region; +} + + +static void +eng_image_max_size_get(void *data, int *maxw, int *maxh) +{ + Render_Engine *re = (Render_Engine *)data; + if (maxw) *maxw = re->win->gl_context->shared->info.max_texture_size; + if (maxh) *maxh = re->win->gl_context->shared->info.max_texture_size; +} + +static int +module_open(Evas_Module *em) +{ + static Eina_Bool xrm_inited = EINA_FALSE; + if (!xrm_inited) + { + xrm_inited = EINA_TRUE; + XrmInitialize(); + } + + if (!em) return 0; + if (!evas_gl_common_module_open()) return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; + if (_evas_engine_wl_egl_log_dom < 0) + { + _evas_engine_wl_egl_log_dom = + eina_log_domain_register("evas-gl_x11", EVAS_DEFAULT_LOG_COLOR); + } + + if (_evas_engine_wl_egl_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + /* store it for later use */ + func = pfunc; + /* now to override methods */ + #define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(context_cutout_add); + ORD(context_cutout_clear); + ORD(output_flush); + ORD(output_idle_flush); + ORD(output_dump); + ORD(rectangle_draw); + ORD(line_draw); + ORD(polygon_point_add); + ORD(polygon_points_clear); + ORD(polygon_draw); + + ORD(image_load); + ORD(image_new_from_data); + ORD(image_new_from_copied_data); + ORD(image_free); + ORD(image_size_get); + ORD(image_size_set); + ORD(image_dirty_region); + ORD(image_data_get); + ORD(image_data_put); + ORD(image_data_preload_request); + ORD(image_data_preload_cancel); + ORD(image_alpha_set); + ORD(image_alpha_get); + ORD(image_border_set); + ORD(image_border_get); + ORD(image_draw); + ORD(image_comment_get); + ORD(image_format_get); + ORD(image_colorspace_set); + ORD(image_colorspace_get); + ORD(image_can_region_get); + ORD(image_mask_create); + ORD(image_native_set); + ORD(image_native_get); +#if 0 // filtering disabled + ORD(image_draw_filtered); + ORD(image_filtered_get); + ORD(image_filtered_save); + ORD(image_filtered_free); +#endif + + ORD(font_draw); + + ORD(image_scale_hint_set); + ORD(image_scale_hint_get); + ORD(image_stride_get); + + ORD(image_map_draw); + ORD(image_map_surface_new); + ORD(image_map_surface_free); + + ORD(image_content_hint_set); + ORD(image_content_hint_get); + + ORD(image_cache_flush); + ORD(image_cache_set); + ORD(image_cache_get); + + ORD(gl_surface_create); + ORD(gl_surface_destroy); + ORD(gl_context_create); + ORD(gl_context_destroy); + ORD(gl_make_current); + ORD(gl_string_query); + ORD(gl_proc_address_get); + ORD(gl_native_surface_get); + ORD(gl_api_get); + + ORD(image_load_error_get); + + /* now advertise out own api */ + ORD(image_animated_get); + ORD(image_animated_frame_count_get); + ORD(image_animated_loop_type_get); + ORD(image_animated_loop_count_get); + ORD(image_animated_frame_duration_get); + ORD(image_animated_frame_set); + + ORD(image_max_size_get); + + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ + eina_log_domain_unregister(_evas_engine_wl_egl_log_dom); + evas_gl_common_module_close(); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, "wayland_egl", "none", {module_open, module_close} +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, gl_x11); + +#ifndef EVAS_STATIC_BUILD_GL_XLIB +EVAS_EINA_MODULE_DEFINE(engine, gl_x11); +#endif + +/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ diff --git a/libraries/evas/src/modules/engines/wayland_egl/evas_engine.h b/libraries/evas/src/modules/engines/wayland_egl/evas_engine.h new file mode 100644 index 0000000..204d793 --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_egl/evas_engine.h @@ -0,0 +1,82 @@ +#ifndef EVAS_ENGINE_H +#define EVAS_ENGINE_H + +#include "config.h" +#include "evas_common.h" +#include "evas_private.h" +#include "evas_gl_common.h" +#include "Evas.h" +#include "Evas_Engine_Wayland_Egl.h" + +#define GL_GLEXT_PROTOTYPES + +#include +#include +#include +#include + +extern int _evas_engine_wl_egl_log_dom; +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_wl_egl_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_wl_egl_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_wl_egl_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_wl_egl_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_wl_egl_log_dom, __VA_ARGS__) + +typedef struct _Evas_GL_Wl_Window Evas_GL_Wl_Window; + +struct _Evas_GL_Wl_Window +{ + struct wl_display *disp; + struct wl_egl_window *win; + struct wl_surface *surface; + int w, h; + int screen; +// XVisualInfo *visualinfo; +// Visual *visual; +// Colormap colormap; + int depth; + int alpha; + int rot; + Evas_Engine_GL_Context *gl_context; + struct { + int redraw : 1; + int drew : 1; + int x1, y1, x2, y2; + } draw; + EGLContext egl_context[1]; + EGLSurface egl_surface[1]; + EGLConfig egl_config; + EGLDisplay egl_disp; + int surf : 1; +}; + +Evas_GL_Wl_Window *eng_window_new(struct wl_display *disp, struct wl_surface *surface, int screen, + int depth, int w, int h, int indirect, + int alpha, int rot); +void eng_window_free(Evas_GL_Wl_Window *gw); +void eng_window_use(Evas_GL_Wl_Window *gw); +void eng_window_unsurf(Evas_GL_Wl_Window *gw); +void eng_window_resurf(Evas_GL_Wl_Window *gw); + +int eng_best_depth_get(Evas_Engine_Info_Wayland_Egl *einfo); + +#endif diff --git a/libraries/evas/src/modules/engines/wayland_egl/evas_wl_main.c b/libraries/evas/src/modules/engines/wayland_egl/evas_wl_main.c new file mode 100644 index 0000000..537fcc6 --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_egl/evas_wl_main.c @@ -0,0 +1,323 @@ +#include "evas_engine.h" + +static Evas_GL_Wl_Window *_evas_gl_wl_window = NULL; + +static EGLContext context = EGL_NO_CONTEXT; + +// fixme: something is up/wrong here - dont know what tho... +//#define NEWGL 1 + +static int win_count = 0; + +Evas_GL_Wl_Window * +eng_window_new(struct wl_display *disp, struct wl_surface *surface, int screen, + int depth, int w, int h, int indirect, int alpha, int rot) +{ + Evas_GL_Wl_Window *gw; + int context_attrs[3]; + int config_attrs[40]; + int major_version, minor_version; + int num_config, n = 0; + const GLubyte *vendor, *renderer, *version; + + gw = calloc(1, sizeof(Evas_GL_Wl_Window)); + if (!gw) return NULL; + + win_count++; + gw->disp = disp; + gw->surface = surface; + gw->screen = screen; + gw->depth = depth; + gw->alpha = alpha; + gw->w = w; + gw->h = h; + gw->rot = rot; + +// EGL / GLES + context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION; + context_attrs[1] = 2; + context_attrs[2] = EGL_NONE; + +#if defined(GLES_VARIETY_S3C6410) + if (gw->visualinfo->depth == 16) // 16bpp + { + config_attrs[n++] = EGL_SURFACE_TYPE; + config_attrs[n++] = EGL_WINDOW_BIT; + config_attrs[n++] = EGL_RENDERABLE_TYPE; + config_attrs[n++] = EGL_OPENGL_ES2_BIT; + config_attrs[n++] = EGL_RED_SIZE; + config_attrs[n++] = 5; + config_attrs[n++] = EGL_GREEN_SIZE; + config_attrs[n++] = 6; + config_attrs[n++] = EGL_BLUE_SIZE; + config_attrs[n++] = 5; + config_attrs[n++] = EGL_DEPTH_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_STENCIL_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_NONE; + } + else // 24/32bit. no one does 8bpp anymore. and 15bpp... dead + { + config_attrs[n++] = EGL_SURFACE_TYPE; + config_attrs[n++] = EGL_WINDOW_BIT; + config_attrs[n++] = EGL_RENDERABLE_TYPE; + config_attrs[n++] = EGL_OPENGL_ES2_BIT; + config_attrs[n++] = EGL_RED_SIZE; + config_attrs[n++] = 8; + config_attrs[n++] = EGL_GREEN_SIZE; + config_attrs[n++] = 8; + config_attrs[n++] = EGL_BLUE_SIZE; + config_attrs[n++] = 8; + config_attrs[n++] = EGL_DEPTH_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_STENCIL_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_NONE; + } +#elif defined(GLES_VARIETY_SGX) + config_attrs[n++] = EGL_SURFACE_TYPE; + config_attrs[n++] = EGL_WINDOW_BIT; + config_attrs[n++] = EGL_RENDERABLE_TYPE; + config_attrs[n++] = EGL_OPENGL_ES2_BIT; +# if 0 +// FIXME: n900 - omap3 sgx libs break here + config_attrs[n++] = EGL_RED_SIZE; + config_attrs[n++] = 1; + config_attrs[n++] = EGL_GREEN_SIZE; + config_attrs[n++] = 1; + config_attrs[n++] = EGL_BLUE_SIZE; + config_attrs[n++] = 1; +// FIXME: end n900 breakage +# endif + if (gw->alpha) + { + config_attrs[n++] = EGL_ALPHA_SIZE; + config_attrs[n++] = 1; + } + else + { + config_attrs[n++] = EGL_ALPHA_SIZE; + config_attrs[n++] = 0; + } + config_attrs[n++] = EGL_DEPTH_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_STENCIL_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_NONE; +#endif + + gw->egl_disp = eglGetDisplay((EGLNativeDisplayType)(gw->disp)); + if (!gw->egl_disp) + { + ERR("eglGetDisplay() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + if (!eglInitialize(gw->egl_disp, &major_version, &minor_version)) + { + ERR("eglInitialize() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + eglBindAPI(EGL_OPENGL_ES_API); + if (eglGetError() != EGL_SUCCESS) + { + ERR("eglBindAPI() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + + num_config = 0; + if (!eglChooseConfig(gw->egl_disp, config_attrs, &gw->egl_config, + 1, &num_config) || (num_config != 1)) + { + ERR("eglChooseConfig() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + + gw->win = wl_egl_window_create(gw->surface, gw->w, gw->h); + + gw->egl_surface[0] = eglCreateWindowSurface(gw->egl_disp, gw->egl_config, + (EGLNativeWindowType)gw->win, + NULL); + if (gw->egl_surface[0] == EGL_NO_SURFACE) + { + ERR("eglCreateWindowSurface() fail for %#x. code=%#x", + (unsigned int)gw->win, eglGetError()); + eng_window_free(gw); + return NULL; + } + + if (context == EGL_NO_CONTEXT) + context = eglCreateContext(gw->egl_disp, gw->egl_config, NULL, + context_attrs); + gw->egl_context[0] = context; + if (gw->egl_context[0] == EGL_NO_CONTEXT) + { + ERR("eglCreateContext() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + + if (eglMakeCurrent(gw->egl_disp, gw->egl_surface[0], gw->egl_surface[0], + gw->egl_context[0]) == EGL_FALSE) + { + ERR("eglMakeCurrent() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + + vendor = glGetString(GL_VENDOR); + renderer = glGetString(GL_RENDERER); + version = glGetString(GL_VERSION); + if (!vendor) vendor = (unsigned char *)"-UNKNOWN-"; + if (!renderer) renderer = (unsigned char *)"-UNKNOWN-"; + if (!version) version = (unsigned char *)"-UNKNOWN-"; + if (getenv("EVAS_GL_INFO")) + { + fprintf(stderr, "vendor: %s\n", vendor); + fprintf(stderr, "renderer: %s\n", renderer); + fprintf(stderr, "version: %s\n", version); + } + + gw->gl_context = evas_gl_common_context_new(); + if (!gw->gl_context) + { + eng_window_free(gw); + return NULL; + } + gw->gl_context->egldisp = gw->egl_disp; + eng_window_use(gw); + evas_gl_common_context_resize(gw->gl_context, w, h, rot); + gw->surf = 1; + return gw; + indirect = 0; +} + +void +eng_window_free(Evas_GL_Wl_Window *gw) +{ + int ref = 0; + + win_count--; + eng_window_use(gw); + if (gw == _evas_gl_wl_window) _evas_gl_wl_window = NULL; +// if (gw->win) wl_egl_window_destroy(gw->win); + if (gw->gl_context) + { + ref = gw->gl_context->references - 1; + evas_gl_common_context_free(gw->gl_context); + } + if (gw->egl_surface[0] != EGL_NO_SURFACE) + eglDestroySurface(gw->egl_disp, gw->egl_surface[0]); + eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (ref == 0) + { + if (context) eglDestroyContext(gw->egl_disp, context); + context = EGL_NO_CONTEXT; + eglTerminate(gw->egl_disp); + eglReleaseThread(); + } + free(gw); +} + +void +eng_window_use(Evas_GL_Wl_Window *gw) +{ + Eina_Bool force_use = EINA_FALSE; + + if (_evas_gl_wl_window) + { + if ((eglGetCurrentContext() != + _evas_gl_wl_window->egl_context[0]) || + (eglGetCurrentSurface(EGL_READ) != + _evas_gl_wl_window->egl_surface[0]) || + (eglGetCurrentSurface(EGL_DRAW) != + _evas_gl_wl_window->egl_surface[0])) + force_use = EINA_TRUE; + } + if ((_evas_gl_wl_window != gw) || (force_use)) + { + if (_evas_gl_wl_window) + { + evas_gl_common_context_use(_evas_gl_wl_window->gl_context); + evas_gl_common_context_flush(_evas_gl_wl_window->gl_context); + } + _evas_gl_wl_window = gw; + if (gw) + { + // EGL / GLES + if (gw->egl_surface[0] != EGL_NO_SURFACE) + { + if (eglMakeCurrent(gw->egl_disp, gw->egl_surface[0], + gw->egl_surface[0], + gw->egl_context[0]) == EGL_FALSE) + { + ERR("eglMakeCurrent() failed!"); + } + } + } + } + if (gw) evas_gl_common_context_use(gw->gl_context); +} + +void +eng_window_unsurf(Evas_GL_Wl_Window *gw) +{ + if (!gw->surf) return; + if (!getenv("EVAS_GL_WIN_RESURF")) return; + if (getenv("EVAS_GL_INFO")) printf("unsurf %p\n", gw); + + if (_evas_gl_wl_window) + evas_gl_common_context_flush(_evas_gl_wl_window->gl_context); + if (_evas_gl_wl_window == gw) + { + eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (gw->egl_surface[0] != EGL_NO_SURFACE) + eglDestroySurface(gw->egl_disp, gw->egl_surface[0]); + gw->egl_surface[0] = EGL_NO_SURFACE; + _evas_gl_wl_window = NULL; + } + gw->surf = 0; +} + +void +eng_window_resurf(Evas_GL_Wl_Window *gw) +{ + if (gw->surf) return; + if (getenv("EVAS_GL_INFO")) printf("resurf %p\n", gw); + + gw->egl_surface[0] = + eglCreateWindowSurface(gw->egl_disp, gw->egl_config, + (EGLNativeWindowType)gw->win, NULL); + + if (gw->egl_surface[0] == EGL_NO_SURFACE) + { + ERR("eglCreateWindowSurface() fail for %#x. code=%#x", + (unsigned int)gw->win, eglGetError()); + return; + } + if (eglMakeCurrent(gw->egl_disp, gw->egl_surface[0], gw->egl_surface[0], + gw->egl_context[0]) == EGL_FALSE) + { + ERR("eglMakeCurrent() failed!"); + } + gw->surf = 1; +} + +int +eng_best_depth_get(Evas_Engine_Info_Wayland_Egl *einfo) +{ + if (!einfo) return 0; + if (!einfo->info.display) return 0; + return 32; + /* if (!_evas_gl_x11_vi) eng_best_visual_get(einfo); */ + /* if (!_evas_gl_x11_vi) return 0; */ + /* if (einfo->info.destination_alpha) */ + /* { */ + /* if (_evas_gl_x11_rgba_vi) return _evas_gl_x11_rgba_vi->depth; */ + /* } */ + /* return _evas_gl_x11_vi->depth; */ +} diff --git a/libraries/evas/src/modules/engines/wayland_shm/Evas_Engine_Wayland_Shm.h b/libraries/evas/src/modules/engines/wayland_shm/Evas_Engine_Wayland_Shm.h new file mode 100644 index 0000000..b34b2c1 --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_shm/Evas_Engine_Wayland_Shm.h @@ -0,0 +1,20 @@ +#ifndef _EVAS_ENGINE_WAYLAND_SHM_H +# define _EVAS_ENGINE_WAYLAND_SHM_H + +typedef struct _Evas_Engine_Info_Wayland_Shm Evas_Engine_Info_Wayland_Shm; +struct _Evas_Engine_Info_Wayland_Shm +{ + Evas_Engine_Info magic; + + struct + { + void *dest; + int rotation; + + unsigned char debug : 1; + } info; + + Evas_Engine_Render_Mode render_mode; +}; + +#endif diff --git a/libraries/evas/src/modules/engines/wayland_shm/Makefile.am b/libraries/evas/src/modules/engines/wayland_shm/Makefile.am new file mode 100644 index 0000000..455b82c --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_shm/Makefile.am @@ -0,0 +1,45 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_engine_wayland_shm_cflags@ + +if BUILD_ENGINE_WAYLAND_SHM + +WAYLAND_SHM_SOURCES = \ +evas_engine.c \ +evas_outbuf.c + +WAYLAND_SHM_LIBADD = @FREETYPE_LIBS@ @EINA_LIBS@ @evas_engine_wayland_shm_libs@ + +includes_HEADERS = Evas_Engine_Wayland_Shm.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_WAYLAND_SHM + +pkgdir = $(libdir)/evas/modules/engines/wayland_shm/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = $(WAYLAND_SHM_SOURCES) +module_la_LIBADD = $(WAYLAND_SHM_LIBADD) $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_wayland_shm.la + +libevas_engine_wayland_shm_la_SOURCES = $(WAYLAND_SHM_SOURCES) +libevas_engine_wayland_shm_la_LIBADD = $(WAYLAND_SHM_LIBADD) + +endif +endif + +EXTRA_DIST = \ +evas_engine.h diff --git a/libraries/evas/src/modules/engines/wayland_shm/Makefile.in b/libraries/evas/src/modules/engines/wayland_shm/Makefile.in new file mode 100644 index 0000000..4d69209 --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_shm/Makefile.in @@ -0,0 +1,816 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/wayland_shm +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +am__DEPENDENCIES_1 = +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@libevas_engine_wayland_shm_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_wayland_shm_la_SOURCES_DIST = evas_engine.c \ + evas_outbuf.c +@BUILD_ENGINE_WAYLAND_SHM_TRUE@am__objects_1 = evas_engine.lo \ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@ evas_outbuf.lo +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am_libevas_engine_wayland_shm_la_OBJECTS = $(am__objects_1) +libevas_engine_wayland_shm_la_OBJECTS = \ + $(am_libevas_engine_wayland_shm_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am_libevas_engine_wayland_shm_la_rpath = +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@module_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@ $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c evas_outbuf.c +@BUILD_ENGINE_WAYLAND_SHM_TRUE@am__objects_2 = \ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@ module_la-evas_engine.lo \ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@ module_la-evas_outbuf.lo +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_wayland_shm_la_SOURCES) \ + $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_wayland_shm_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_Wayland_Shm.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_engine_wayland_shm_cflags@ + +@BUILD_ENGINE_WAYLAND_SHM_TRUE@WAYLAND_SHM_SOURCES = \ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@evas_engine.c \ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@evas_outbuf.c + +@BUILD_ENGINE_WAYLAND_SHM_TRUE@WAYLAND_SHM_LIBADD = @FREETYPE_LIBS@ @EINA_LIBS@ @evas_engine_wayland_shm_libs@ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@includes_HEADERS = Evas_Engine_Wayland_Shm.h +@BUILD_ENGINE_WAYLAND_SHM_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@pkgdir = $(libdir)/evas/modules/engines/wayland_shm/$(MODULE_ARCH) +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@module_la_SOURCES = $(WAYLAND_SHM_SOURCES) +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@module_la_LIBADD = $(WAYLAND_SHM_LIBADD) $(top_builddir)/src/lib/libevas.la +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@module_la_LDFLAGS = -no-undefined -module -avoid-version +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@noinst_LTLIBRARIES = libevas_engine_wayland_shm.la +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@libevas_engine_wayland_shm_la_SOURCES = $(WAYLAND_SHM_SOURCES) +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@libevas_engine_wayland_shm_la_LIBADD = $(WAYLAND_SHM_LIBADD) +EXTRA_DIST = \ +evas_engine.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/wayland_shm/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/wayland_shm/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_wayland_shm.la: $(libevas_engine_wayland_shm_la_OBJECTS) $(libevas_engine_wayland_shm_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_wayland_shm_la_rpath) $(libevas_engine_wayland_shm_la_OBJECTS) $(libevas_engine_wayland_shm_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_outbuf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_outbuf.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +module_la-evas_outbuf.lo: evas_outbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_outbuf.lo -MD -MP -MF $(DEPDIR)/module_la-evas_outbuf.Tpo -c -o module_la-evas_outbuf.lo `test -f 'evas_outbuf.c' || echo '$(srcdir)/'`evas_outbuf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_outbuf.Tpo $(DEPDIR)/module_la-evas_outbuf.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_outbuf.c' object='module_la-evas_outbuf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_outbuf.lo `test -f 'evas_outbuf.c' || echo '$(srcdir)/'`evas_outbuf.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/wayland_shm/evas_engine.c b/libraries/evas/src/modules/engines/wayland_shm/evas_engine.c new file mode 100644 index 0000000..7c55517 --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_shm/evas_engine.c @@ -0,0 +1,370 @@ +#include "evas_common.h" +#include "evas_private.h" +#include "evas_engine.h" +#include "Evas_Engine_Wayland_Shm.h" + +/* local structures */ +typedef struct _Render_Engine Render_Engine; +struct _Render_Engine +{ + Tilebuf *tb; + Tilebuf_Rect *rects; + Outbuf *ob; + Eina_Inlist *cur_rect; + + Eina_Bool end : 1; + + void (*outbuf_free)(Outbuf *ob); + void (*outbuf_resize)(Outbuf *ob, int w, int h); + RGBA_Image *(*outbuf_new_region_for_update)(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); + void (*outbuf_push_updated_region)(Outbuf *ob, RGBA_Image *surface, int x, int y, int w, int h); + void (*outbuf_free_region_for_update)(Outbuf *ob, RGBA_Image *update); +}; + +/* local variables */ +static Evas_Func func, pfunc; + +/* external variables */ +int _evas_engine_way_shm_log_dom = -1; + +/* local function prototypes */ +static void *_output_setup(int w, int h, int rotation, void *dest); + +/* engine function prototypes */ +static void *eng_info(Evas *evas __UNUSED__); +static void eng_info_free(Evas *evas __UNUSED__, void *info); +static int eng_setup(Evas *evas, void *info); +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_output_idle_flush(void *data); +static Eina_Bool eng_canvas_alpha_get(void *data, void *context __UNUSED__); + +/* local functions */ +static void * +_output_setup(int w, int h, int rotation, void *dest) +{ + Render_Engine *re = NULL; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(re = calloc(1, sizeof(Render_Engine)))) return NULL; + + if (!(re->ob = evas_outbuf_setup(w, h, rotation, dest))) + { + free(re); + return NULL; + } + + if (!(re->tb = evas_common_tilebuf_new(w, h))) + { + evas_outbuf_free(re->ob); + free(re); + return NULL; + } + + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + return re; +} + +/* engine functions */ +static void * +eng_info(Evas *evas __UNUSED__) +{ + Evas_Engine_Info_Wayland_Shm *info; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(info = calloc(1, sizeof(Evas_Engine_Info_Wayland_Shm)))) + return NULL; + + info->magic.magic = rand(); + info->info.debug = EINA_FALSE; + info->render_mode = EVAS_RENDER_MODE_BLOCKING; + + return info; +} + +static void +eng_info_free(Evas *evas __UNUSED__, void *info) +{ + Evas_Engine_Info_Wayland_Shm *in; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(in = (Evas_Engine_Info_Wayland_Shm *)info)) return; + free(in); +} + +static int +eng_setup(Evas *evas, void *info) +{ + Evas_Engine_Info_Wayland_Shm *in; + Render_Engine *re = NULL; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(in = (Evas_Engine_Info_Wayland_Shm *)info)) return 0; + + if (!evas->engine.data.output) + { + 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(); + + re = _output_setup(evas->output.w, evas->output.h, + in->info.rotation, in->info.dest); + if (!re) return 0; + + re->outbuf_free = evas_outbuf_free; + re->outbuf_resize = evas_outbuf_resize; + re->outbuf_new_region_for_update = evas_outbuf_new_region_for_update; + re->outbuf_push_updated_region = evas_outbuf_push_updated_region; + re->outbuf_free_region_for_update = evas_outbuf_free_region_for_update; + } + else + { + if (!(re = evas->engine.data.output)) return 0; + if (re->ob) re->outbuf_free(re->ob); + re->ob = evas_outbuf_setup(evas->output.w, evas->output.h, + in->info.rotation, in->info.dest); + if (re->tb) evas_common_tilebuf_free(re->tb); + if ((re->tb = evas_common_tilebuf_new(evas->output.w, evas->output.h))) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + } + + evas->engine.data.output = re; + + if (!evas->engine.data.context) + { + evas->engine.data.context = + evas->engine.func->context_new(evas->engine.data.output); + } + + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re = NULL; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if ((re = (Render_Engine *)data)) + { + if (re->ob) re->outbuf_free(re->ob); + if (re->tb) evas_common_tilebuf_free(re->tb); + if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); + free(re); + } + evas_common_font_shutdown(); + evas_common_image_shutdown(); +} + +static void +eng_output_resize(void *data, int w, int h) +{ + Render_Engine *re = NULL; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(re = (Render_Engine *)data)) return; + + if (re->ob) re->outbuf_resize(re->ob, w, h); + if (re->tb) evas_common_tilebuf_free(re->tb); + if ((re->tb = evas_common_tilebuf_new(w, h))) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); +} + +static void +eng_output_tile_size_set(void *data, int w, int h) +{ + Render_Engine *re = NULL; + + if (!(re = (Render_Engine *)data)) return; + if (re->tb) evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re = NULL; + + if (!(re = (Render_Engine *)data)) return; + if (re->tb) evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) +{ + Render_Engine *re = NULL; + + if (!(re = (Render_Engine *)data)) return; + if (re->tb) evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re = NULL; + + if (!(re = (Render_Engine *)data)) return; + if (re->tb) evas_common_tilebuf_clear(re->tb); +} + +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 = NULL; + RGBA_Image *surface; + Tilebuf_Rect *rect; + int ux = 0, uy = 0, uw = 0, uh = 0; + + if (!(re = (Render_Engine *)data)) return NULL; + if (re->end) + { + re->end = EINA_FALSE; + return NULL; + } + if (!re->rects) + { + re->rects = evas_common_tilebuf_get_render_rects(re->tb); + re->cur_rect = EINA_INLIST_GET(re->rects); + } + if (!re->cur_rect) return NULL; + rect = (Tilebuf_Rect *)re->cur_rect; + ux = rect->x; + uy = rect->y; + uw = rect->w; + uh = rect->h; + re->cur_rect = re->cur_rect->next; + if (!re->cur_rect) + { + evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + re->end = EINA_TRUE; + } + if ((ux + uw) > re->ob->w) uw = re->ob->w - ux; + if ((uy + uh) > re->ob->h) uh = re->ob->h - uy; + if ((uw <= 0) || (uh <= 0)) return NULL; + surface = + re->outbuf_new_region_for_update(re->ob, ux, uy, uw, uh, cx, cy, cw, ch); + if (x) *x = ux; + if (y) *y = uy; + if (w) *w = uw; + if (h) *h = uh; + return surface; +} + +static void +eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h) +{ + Render_Engine *re = NULL; + + if (!(re = (Render_Engine *)data)) return; +#ifdef BUILD_PIPE_RENDER + evas_common_pipe_map_begin(surface); +#endif + if (re->ob) + { + re->outbuf_push_updated_region(re->ob, surface, x, y, w, h); + re->outbuf_free_region_for_update(re->ob, surface); + } + evas_common_cpu_end_opt(); +} + +static void +eng_output_flush(void *data) +{ + Render_Engine *re = NULL; + + if (!(re = (Render_Engine *)data)) return; +} + +static void +eng_output_idle_flush(void *data) +{ + Render_Engine *re = NULL; + + if (!(re = (Render_Engine *)data)) return; +} + +static Eina_Bool +eng_canvas_alpha_get(void *data, void *context __UNUSED__) +{ + Render_Engine *re = NULL; + + if (!(re = (Render_Engine *)data)) return EINA_FALSE; + return EINA_TRUE; +} + +/* module functions */ +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + + if (!_evas_module_engine_inherit(&pfunc, "software_generic")) + return 0; + + _evas_engine_way_shm_log_dom = + eina_log_domain_register("evas-wayland_shm", EVAS_DEFAULT_LOG_COLOR); + if (_evas_engine_way_shm_log_dom < 0) + { + EINA_LOG_ERR("Could not create a module log domain."); + return 0; + } + + func = pfunc; + +#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(output_flush); + ORD(output_idle_flush); + + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ + eina_log_domain_unregister(_evas_engine_way_shm_log_dom); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, "wayland_shm", "none", {module_open, module_close} +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, wayland_shm); + +#ifndef EVAS_STATIC_BUILD_WAYLAND_SHM +EVAS_EINA_MODULE_DEFINE(engine, wayland_shm); +#endif diff --git a/libraries/evas/src/modules/engines/wayland_shm/evas_engine.h b/libraries/evas/src/modules/engines/wayland_shm/evas_engine.h new file mode 100644 index 0000000..878851a --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_shm/evas_engine.h @@ -0,0 +1,60 @@ +#ifndef _EVAS_ENGINE_H +# define _EVAS_ENGINE_H + +//# define LOGFNS 1 + +# ifdef LOGFNS +# include +# define LOGFN(fl, ln, fn) printf("-EVAS-WL: %25s: %5i - %s\n", fl, ln, fn); +# else +# define LOGFN(fl, ln, fn) +# endif + +extern int _evas_engine_way_shm_log_dom; + +# ifdef ERR +# undef ERR +# endif +# define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_way_shm_log_dom, __VA_ARGS__) + +# ifdef DBG +# undef DBG +# endif +# define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_way_shm_log_dom, __VA_ARGS__) + +# ifdef INF +# undef INF +# endif +# define INF(...) EINA_LOG_DOM_INFO(_evas_engine_way_shm_log_dom, __VA_ARGS__) + +# ifdef WRN +# undef WRN +# endif +# define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_way_shm_log_dom, __VA_ARGS__) + +# ifdef CRIT +# undef CRIT +# endif +# define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_way_shm_log_dom, __VA_ARGS__) + +typedef struct _Outbuf Outbuf; +struct _Outbuf +{ + int w, h; + int rotation; + + struct + { + void *dest; + RGBA_Image *buffer; + } priv; +}; + +void evas_outbuf_free(Outbuf *ob); +void evas_outbuf_resize(Outbuf *ob, int w, int h); +Outbuf *evas_outbuf_setup(int w, int h, int rot, void *dest); +RGBA_Image *evas_outbuf_new_region_for_update(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); +void evas_outbuf_push_updated_region(Outbuf *ob, RGBA_Image *update, int x __UNUSED__, int y, int w, int h); +void evas_outbuf_free_region_for_update(Outbuf *ob, RGBA_Image *update); + +#endif diff --git a/libraries/evas/src/modules/engines/wayland_shm/evas_outbuf.c b/libraries/evas/src/modules/engines/wayland_shm/evas_outbuf.c new file mode 100644 index 0000000..490a978 --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_shm/evas_outbuf.c @@ -0,0 +1,100 @@ +#include "evas_common.h" +#include "evas_engine.h" + +void +evas_outbuf_free(Outbuf *ob) +{ + if (!ob) return; + if (ob->priv.buffer) evas_cache_image_drop(&ob->priv.buffer->cache_entry); + free(ob); +} + +void +evas_outbuf_resize(Outbuf *ob, int w, int h) +{ + if (!ob) return; + if ((ob->w == w) && (ob->h == h)) return; + ob->w = w; + ob->h = h; + if (ob->priv.buffer) evas_cache_image_drop(&ob->priv.buffer->cache_entry); + ob->priv.buffer = NULL; +} + +Outbuf * +evas_outbuf_setup(int w, int h, int rot, void *dest) +{ + Outbuf *ob = NULL; + + if (!(ob = calloc(1, sizeof(Outbuf)))) return NULL; + + ob->w = w; + ob->h = h; + ob->rotation = rot; + ob->priv.dest = dest; + + ob->priv.buffer = + (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(), + w, h, ob->priv.dest, + 1, EVAS_COLORSPACE_ARGB8888); + + return ob; +} + +RGBA_Image * +evas_outbuf_new_region_for_update(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch) +{ + if (ob->priv.buffer) + { + *cx = x; *cy = y; *cw = w; *ch = h; + return ob->priv.buffer; + } + else + { + RGBA_Image *im; + + *cx = 0; *cy = 0; *cw = w; *ch = h; + im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); + if (im) + { + im->cache_entry.flags.alpha = 1; + im = (RGBA_Image *)evas_cache_image_size_set(&im->cache_entry, w, h); + } + + return im; + } + + return NULL; +} + +void +evas_outbuf_push_updated_region(Outbuf *ob, RGBA_Image *update, int x __UNUSED__, int y, int w, int h) +{ + if (!ob->priv.dest) return; + if (!ob->priv.buffer) + { + Gfx_Func_Copy func; + + func = evas_common_draw_func_copy_get(w, 0); + if (func) + { + DATA32 *dst, *src; + int yy = 0, bytes = 0; + + bytes = ((w * sizeof(int)) * h); + for (yy = 0; yy < h; yy++) + { + src = update->image.data + (yy * update->cache_entry.w); + dst = (DATA32 *)((DATA8 *)(ob->priv.dest) + + ((y + yy) * bytes)); + func(src, dst, w); + } + } + } +} + +void +evas_outbuf_free_region_for_update(Outbuf *ob, RGBA_Image *update) +{ + if (!ob) return; + if (update != ob->priv.buffer) evas_cache_image_drop(&update->cache_entry); +} diff --git a/libraries/evas/src/modules/loaders/Makefile.in b/libraries/evas/src/modules/loaders/Makefile.in index 2120a33..454dcd8 100644 --- a/libraries/evas/src/modules/loaders/Makefile.in +++ b/libraries/evas/src/modules/loaders/Makefile.in @@ -49,7 +49,7 @@ host_triplet = @host@ @BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_FALSE@am__append_14 = wbmp @BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_FALSE@am__append_15 = xpm subdir = src/modules/loaders -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ @@ -222,8 +222,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -240,6 +238,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -321,6 +321,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/TODO b/libraries/evas/src/modules/loaders/TODO deleted file mode 100644 index 3b82543..0000000 --- a/libraries/evas/src/modules/loaders/TODO +++ /dev/null @@ -1,5 +0,0 @@ -DONE -> bmp tga ico -id3 gz bz2 <- extraction loaders -lbm <- aaah amiga days -ani <- why> - diff --git a/libraries/evas/src/modules/loaders/bmp/Makefile.in b/libraries/evas/src/modules/loaders/bmp/Makefile.in index f2c3e20..943fb74 100644 --- a/libraries/evas/src/modules/loaders/bmp/Makefile.in +++ b/libraries/evas/src/modules/loaders/bmp/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/bmp/evas_image_load_bmp.c b/libraries/evas/src/modules/loaders/bmp/evas_image_load_bmp.c index 38e3680..6d15783 100644 --- a/libraries/evas/src/modules/loaders/bmp/evas_image_load_bmp.c +++ b/libraries/evas/src/modules/loaders/bmp/evas_image_load_bmp.c @@ -21,50 +21,91 @@ static Evas_Image_Load_Func evas_image_load_bmp_func = EINA_TRUE, evas_image_load_file_head_bmp, evas_image_load_file_data_bmp, - NULL + NULL, + EINA_FALSE }; -static int -read_short(FILE *file, short *ret) +static Eina_Bool +read_short(unsigned char *map, size_t length, size_t *position, short *ret) { unsigned char b[2]; - if (fread(b, sizeof(unsigned char), 2, file) != 2) return 0; + + if (*position + 2 > length) return EINA_FALSE; + b[0] = map[(*position)++]; + b[1] = map[(*position)++]; *ret = (b[1] << 8) | b[0]; - return 1; + return EINA_TRUE; } -static int -read_ushort(FILE *file, unsigned short *ret) +static Eina_Bool +read_ushort(unsigned char *map, size_t length, size_t *position, unsigned short *ret) { unsigned char b[2]; - if (fread(b, sizeof(unsigned char), 2, file) != 2) return 0; + + if (*position + 2 > length) return EINA_FALSE; + b[0] = map[(*position)++]; + b[1] = map[(*position)++]; *ret = (b[1] << 8) | b[0]; - return 1; + return EINA_TRUE; } -static int -read_int(FILE *file, int *ret) +static Eina_Bool +read_int(unsigned char *map, size_t length, size_t *position, int *ret) { unsigned char b[4]; - if (fread(b, sizeof(unsigned char), 4, file) != 4) return 0; + int i; + + if (*position + 4 > length) return EINA_FALSE; + for (i = 0; i < 4; i++) + b[i] = map[(*position)++]; *ret = ARGB_JOIN(b[3], b[2], b[1], b[0]); - return 1; + return EINA_TRUE; } -static int -read_uint(FILE *file, unsigned int *ret) +static Eina_Bool +read_uint(unsigned char *map, size_t length, size_t *position, unsigned int *ret) { - unsigned char b[4]; - if (fread(b, sizeof(unsigned char), 4, file) != 4) return 0; + unsigned char b[4]; + int i; + + if (*position + 4 > length) return EINA_FALSE; + for (i = 0; i < 4; i++) + b[i] = map[(*position)++]; *ret = ARGB_JOIN(b[3], b[2], b[1], b[0]); - return 1; + return EINA_TRUE; +} + +static Eina_Bool +read_uchar(unsigned char *map, size_t length, size_t *position, unsigned char *ret) +{ + if (*position + 1 > length) return EINA_FALSE; + *ret = map[(*position)++]; + return EINA_TRUE; +} + +static Eina_Bool +read_skip(size_t length, size_t *position, int skip) +{ + if (*position + skip > length) return EINA_FALSE; + *position += skip; + return EINA_TRUE; +} + +static Eina_Bool +read_mem(unsigned char *map, size_t length, size_t *position, void *buffer, int size) +{ + if (*position + size > length) return EINA_FALSE; + memcpy(buffer, map + *position, size); + *position += size; + return EINA_TRUE; } static Eina_Bool evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) { - FILE *f; - char buf[4096]; + Eina_File *f; + void *map = NULL; + size_t position = 0; char hasa = 0; int w = 0, h = 0, planes = 0, bit_count = 0, image_size = 0, comp = 0, hdpi = 0, vdpi = 0, @@ -76,7 +117,7 @@ evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key unsigned int bmpsize; unsigned short res1, res2; - f = fopen(file, "rb"); + f = eina_file_open(file, 0); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; @@ -84,84 +125,85 @@ evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key } *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; - fseek(f, 0, SEEK_END); - fsize = ftell(f); - fseek(f, 0, SEEK_SET); + fsize = eina_file_size_get(f); if (fsize < 2) goto close_file; - - if (fread(buf, 2, 1, f) != 1) goto close_file; - if (strncmp(buf, "BM", 2)) goto close_file; // magic number + + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (!map) goto close_file; + + if (strncmp(map, "BM", 2)) goto close_file; // magic number + position += 2; *error = EVAS_LOAD_ERROR_CORRUPT_FILE; - if (!read_uint(f, &bmpsize)) goto close_file; - if (!read_ushort(f, &res1)) goto close_file; - if (!read_ushort(f, &res2)) goto close_file; - if (!read_uint(f, &offset)) goto close_file; - if (!read_uint(f, &head_size)) goto close_file; + if (!read_uint(map, fsize, &position, &bmpsize)) goto close_file; + if (!read_ushort(map, fsize, &position, &res1)) goto close_file; + if (!read_ushort(map, fsize, &position, &res2)) goto close_file; + if (!read_uint(map, fsize, &position, &offset)) goto close_file; + if (!read_uint(map, fsize, &position, &head_size)) goto close_file; if (head_size == 12) // OS/2 V1 + Windows 3.0 { short tmp; - - if (!read_short(f, &tmp)) goto close_file; + + if (!read_short(map, fsize, &position, &tmp)) goto close_file; w = tmp; // width - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; h = tmp; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8 & 24 } else if (head_size == 64) // OS/2 V2 { short tmp; int tmp2; - - if (!read_int(f, &tmp2)) goto close_file; + + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all - if (fread(buf, 24, 1, f) != 1) goto close_file; // skip unused header + if (!read_skip(fsize, &position, 24)) goto close_file; // skip unused header if (image_size == 0) image_size = fsize - offset; } else if (head_size == 40) // Windows 3.0 + (v3) { short tmp; int tmp2; - - if (!read_int(f, &tmp2)) goto close_file; + + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all if (image_size == 0) image_size = fsize - offset; if ((comp == 0) && (bit_count == 32)) hasa = 1; // GIMP seems to store it this way @@ -170,37 +212,37 @@ evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key { short tmp; int tmp2; - - if (!read_int(f, &tmp2)) goto close_file; + + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; rmask = tmp2; // red mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; gmask = tmp2; // green mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; bmask = tmp2; // blue mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; amask = tmp2; // alpha mask - if (fread(buf, 36, 1, f) != 1) goto close_file; // skip unused cie - if (fread(buf, 12, 1, f) != 1) goto close_file; // skip unused gamma + if (!read_skip(fsize, &position, 36)) goto close_file; // skip unused cie + if (!read_skip(fsize, &position, 12)) goto close_file; // skip unused gamma if (image_size == 0) image_size = fsize - offset; if ((amask) && (bit_count == 32)) hasa = 1; } @@ -208,38 +250,38 @@ evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key { short tmp; int tmp2; - - if (!read_int(f, &tmp2)) goto close_file; + + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; rmask = tmp2; // red mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; gmask = tmp2; // green mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; bmask = tmp2; // blue mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; amask = tmp2; // alpha mask - if (fread(buf, 36, 1, f) != 1) goto close_file; // skip unused cie - if (fread(buf, 12, 1, f) != 1) goto close_file; // skip unused gamma - if (fread(buf, 16, 1, f) != 1) goto close_file; // skip others + if (!read_skip(fsize, &position, 36)) goto close_file; // skip unused cie + if (!read_skip(fsize, &position, 12)) goto close_file; // skip unused gamma + if (!read_skip(fsize, &position, 16)) goto close_file; // skip others if (image_size == 0) image_size = fsize - offset; if ((amask) && (bit_count == 32)) hasa = 1; } @@ -251,7 +293,7 @@ evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key h = -h; right_way_up = 1; } - + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || IMG_TOO_BIG(w, h)) { @@ -327,21 +369,24 @@ evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key ie->w = w; ie->h = h; if (hasa) ie->flags.alpha = 1; - - fclose(f); + + eina_file_map_free(f, map); + eina_file_close(f); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; close_file: - fclose(f); + if (map) eina_file_map_free(f, map); + eina_file_close(f); return EINA_FALSE; } static Eina_Bool evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) { - FILE *f; - char buf[4096]; + Eina_File *f; + void *map = NULL; + size_t position = 0; unsigned char *buffer = NULL, *buffer_end = NULL, *p; char hasa = 0; int x = 0, y = 0, w = 0, h = 0, planes = 0, bit_count = 0, image_size = 0, @@ -361,96 +406,96 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key int row_size = 0; /* Row size is rounded up to a multiple of 4bytes */ int read_line = 0; /* total read line */ - - f = fopen(file, "rb"); + f = eina_file_open(file, 0); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } - + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; - fseek(f, 0, SEEK_END); - fsize = ftell(f); - fseek(f, 0, SEEK_SET); + fsize = eina_file_size_get(f); if (fsize < 2) goto close_file; + + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (!map) goto close_file; - if (fread(buf, 2, 1, f) != 1) goto close_file; - if (strncmp(buf, "BM", 2)) goto close_file; // magic number + if (strncmp(map, "BM", 2)) goto close_file; // magic number + position += 2; *error = EVAS_LOAD_ERROR_CORRUPT_FILE; - if (!read_uint(f, &bmpsize)) goto close_file; - if (!read_ushort(f, &res1)) goto close_file; - if (!read_ushort(f, &res2)) goto close_file; - if (!read_uint(f, &offset)) goto close_file; - if (!read_uint(f, &head_size)) goto close_file; + if (!read_uint(map, fsize, &position, &bmpsize)) goto close_file; + if (!read_ushort(map, fsize, &position, &res1)) goto close_file; + if (!read_ushort(map, fsize, &position, &res2)) goto close_file; + if (!read_uint(map, fsize, &position, &offset)) goto close_file; + if (!read_uint(map, fsize, &position, &head_size)) goto close_file; image_size = fsize - offset; if (image_size < 1) goto close_file; - + if (head_size == 12) // OS/2 V1 + Windows 3.0 { short tmp; - - if (!read_short(f, &tmp)) goto close_file; + + if (!read_short(map, fsize, &position, &tmp)) goto close_file; w = tmp; // width - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; h = tmp; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8 & 24 } else if (head_size == 64) // OS/2 V2 { short tmp; int tmp2; - - if (!read_int(f, &tmp2)) goto close_file; + + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all - if (fread(buf, 24, 1, f) != 1) goto close_file; // skip unused header + if (!read_skip(fsize, &position, 24)) goto close_file; // skip unused header if (image_size == 0) image_size = fsize - offset; } else if (head_size == 40) // Windows 3.0 + (v3) { short tmp; int tmp2; - - if (!read_int(f, &tmp2)) goto close_file; + + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all if (image_size == 0) image_size = fsize - offset; if ((comp == 0) && (bit_count == 32)) hasa = 1; // GIMP seems to store it this way @@ -459,37 +504,37 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key { short tmp; int tmp2; - - if (!read_int(f, &tmp2)) goto close_file; + + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; rmask = tmp2; // red mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; gmask = tmp2; // green mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; bmask = tmp2; // blue mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; amask = tmp2; // alpha mask - if (fread(buf, 36, 1, f) != 1) goto close_file; // skip unused cie - if (fread(buf, 12, 1, f) != 1) goto close_file; // skip unused gamma + if (!read_skip(fsize, &position, 36)) goto close_file; // skip unused cie + if (!read_skip(fsize, &position, 12)) goto close_file; // skip unused gamma if (image_size == 0) image_size = fsize - offset; if ((amask) && (bit_count == 32)) hasa = 1; } @@ -497,38 +542,38 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key { short tmp; int tmp2; - - if (!read_int(f, &tmp2)) goto close_file; + + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; rmask = tmp2; // red mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; gmask = tmp2; // green mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; bmask = tmp2; // blue mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; amask = tmp2; // alpha mask - if (fread(buf, 36, 1, f) != 1) goto close_file; // skip unused cie - if (fread(buf, 12, 1, f) != 1) goto close_file; // skip unused gamma - if (fread(buf, 16, 1, f) != 1) goto close_file; // skip others + if (!read_skip(fsize, &position, 36)) goto close_file; // skip unused cie + if (!read_skip(fsize, &position, 12)) goto close_file; // skip unused gamma + if (!read_skip(fsize, &position, 16)) goto close_file; // skip others if (image_size == 0) image_size = fsize - offset; if ((amask) && (bit_count == 32)) hasa = 1; } @@ -605,17 +650,17 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key pal = alloca(256 * 4); for (i = 0; i < pal_num; i++) { - if (fread(&b, 1, 1, f) != 1) goto close_file; - if (fread(&g, 1, 1, f) != 1) goto close_file; - if (fread(&r, 1, 1, f) != 1) goto close_file; + if (!read_uchar(map, fsize, &position, &b)) goto close_file; + if (!read_uchar(map, fsize, &position, &g)) goto close_file; + if (!read_uchar(map, fsize, &position, &r)) goto close_file; if ((head_size != 12) /*&& (palette_size != 0)*/) { // OS/2 V1 doesn't do the pad byte - if (fread(&a, 1, 1, f) != 1) goto close_file; + if (!read_uchar(map, fsize, &position, &a)) goto close_file; } a = 0xff; // fillin a as solid for paletted images pal[i] = ARGB_JOIN(a, r, g, b); } - fseek(f, offset, SEEK_SET); + position = offset; if ((scale_ratio == 1) || (comp !=0)) buffer = malloc(image_size + 8); // add 8 for padding to avoid checks @@ -643,11 +688,11 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key if ((scale_ratio == 1) || (comp !=0)) { - if (fread(buffer, image_size, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, buffer, image_size)) goto close_file; } else { - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; } if (bit_count == 1) @@ -715,8 +760,8 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -770,8 +815,8 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -960,8 +1005,8 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -1088,7 +1133,7 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key { if (comp == 0) // no compression { - fseek(f, offset, SEEK_SET); + position = offset; if (scale_ratio == 1) buffer = malloc(image_size + 8); // add 8 for padding to avoid checks else @@ -1106,11 +1151,11 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key p = buffer; if (scale_ratio == 1) { - if (fread(buffer, image_size, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, buffer, image_size)) goto close_file; } else { - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; } if (bit_count == 16) { @@ -1139,8 +1184,8 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -1173,8 +1218,8 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -1212,8 +1257,8 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -1230,7 +1275,7 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key if (hasa) { unsigned int *pixend = surface + (w * h); - + for (pix = surface; pix < pixend; pix++) A_VAL(pix) = 0xff; } @@ -1241,11 +1286,11 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key } else if (comp == 3) // bit field { - if (!read_uint(f, &rmask)) goto close_file; - if (!read_uint(f, &gmask)) goto close_file; - if (!read_uint(f, &bmask)) goto close_file; + if (!read_uint(map, fsize, &position, &rmask)) goto close_file; + if (!read_uint(map, fsize, &position, &gmask)) goto close_file; + if (!read_uint(map, fsize, &position, &bmask)) goto close_file; - fseek(f, offset, SEEK_SET); + position = offset; if (scale_ratio == 1) buffer = malloc(image_size + 8); // add 8 for padding to avoid checks else @@ -1264,14 +1309,14 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key p = buffer; if (scale_ratio == 1) { - if (fread(buffer, image_size, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, buffer, image_size)) goto close_file; } else { - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; } - if ((bit_count == 16) && + if ((bit_count == 16) && (rmask == 0xf800) && (gmask == 0x07e0) && (bmask == 0x001f) ) { @@ -1299,8 +1344,9 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key { read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -1338,8 +1384,9 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key { read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer_end, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -1375,8 +1422,9 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key { read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -1404,10 +1452,12 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key } else goto close_file; - + if (buffer) free(buffer); if (scale_surface) free(scale_surface); - fclose(f); + + eina_file_map_free(f, map); + eina_file_close(f); evas_common_image_premul(ie); *error = EVAS_LOAD_ERROR_NONE; @@ -1416,7 +1466,8 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key close_file: if (buffer) free(buffer); if (scale_surface) free(scale_surface); - fclose(f); + if (map) eina_file_map_free(f, map); + eina_file_close(f); return EINA_FALSE; } diff --git a/libraries/evas/src/modules/loaders/edb/Makefile.in b/libraries/evas/src/modules/loaders/edb/Makefile.in index 38c1fa2..87356b4 100644 --- a/libraries/evas/src/modules/loaders/edb/Makefile.in +++ b/libraries/evas/src/modules/loaders/edb/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/edb/evas_image_load_edb.c b/libraries/evas/src/modules/loaders/edb/evas_image_load_edb.c index 94b121e..521161f 100644 --- a/libraries/evas/src/modules/loaders/edb/evas_image_load_edb.c +++ b/libraries/evas/src/modules/loaders/edb/evas_image_load_edb.c @@ -16,7 +16,8 @@ static Evas_Image_Load_Func evas_image_load_edb_func = EINA_TRUE, evas_image_load_file_head_edb, evas_image_load_file_data_edb, - NULL + NULL, + EINA_FALSE }; static Eina_Bool diff --git a/libraries/evas/src/modules/loaders/eet/Makefile.in b/libraries/evas/src/modules/loaders/eet/Makefile.in index 6a6c40e..25a30cf 100644 --- a/libraries/evas/src/modules/loaders/eet/Makefile.in +++ b/libraries/evas/src/modules/loaders/eet/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/eet/evas_image_load_eet.c b/libraries/evas/src/modules/loaders/eet/evas_image_load_eet.c index a187b9e..f86246a 100644 --- a/libraries/evas/src/modules/loaders/eet/evas_image_load_eet.c +++ b/libraries/evas/src/modules/loaders/eet/evas_image_load_eet.c @@ -16,7 +16,8 @@ Evas_Image_Load_Func evas_image_load_eet_func = EINA_TRUE, evas_image_load_file_head_eet, evas_image_load_file_data_eet, - NULL + NULL, + EINA_FALSE }; diff --git a/libraries/evas/src/modules/loaders/generic/Makefile.in b/libraries/evas/src/modules/loaders/generic/Makefile.in index 65a0bac..dfd5294 100644 --- a/libraries/evas/src/modules/loaders/generic/Makefile.in +++ b/libraries/evas/src/modules/loaders/generic/Makefile.in @@ -232,8 +232,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -250,6 +248,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -331,6 +331,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/generic/evas_image_load_generic.c b/libraries/evas/src/modules/loaders/generic/evas_image_load_generic.c index 88c189d..2bbfd3e 100644 --- a/libraries/evas/src/modules/loaders/generic/evas_image_load_generic.c +++ b/libraries/evas/src/modules/loaders/generic/evas_image_load_generic.c @@ -24,7 +24,8 @@ Evas_Image_Load_Func evas_image_load_generic_func = EINA_TRUE, evas_image_load_file_head_generic, evas_image_load_file_data_generic, - NULL + NULL, + EINA_FALSE }; static Eina_Bool @@ -117,7 +118,7 @@ _load(Image_Entry *ie, const char *file, const char *key, int *error, Eina_Bool int read_data = 0; char *tmpfname = NULL, *shmfname = NULL; DATA32 *body; - FILE *f; + FILE *f = NULL; libdir = _evas_module_libdir_get(); cmd_len = strlen(libdir); @@ -125,6 +126,7 @@ _load(Image_Entry *ie, const char *file, const char *key, int *error, Eina_Bool img_loader = alloca(cmd_len + 1); strcpy(img_loader, libdir); strcat(img_loader, loader); + // params excluding file, key and loadopts cmd_len += 1024; cmd_len += strlen(file) * 2; @@ -188,6 +190,8 @@ _load(Image_Entry *ie, const char *file, const char *key, int *error, Eina_Bool // will interpret shell stuff and path hunt that will then exec the // program itself that will dynamically link that will again // parse the arguments and finally do something... + if (access(decoders[try_count], X_OK)) continue; + strcpy(cmd, decoders[try_count]); strcat(cmd, " "); // filename first arg diff --git a/libraries/evas/src/modules/loaders/gif/Makefile.in b/libraries/evas/src/modules/loaders/gif/Makefile.in index 7fcd6a7..f32fcf4 100644 --- a/libraries/evas/src/modules/loaders/gif/Makefile.in +++ b/libraries/evas/src/modules/loaders/gif/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/gif/evas_image_load_gif.c b/libraries/evas/src/modules/loaders/gif/evas_image_load_gif.c index 976df0d..9cd6f6e 100644 --- a/libraries/evas/src/modules/loaders/gif/evas_image_load_gif.c +++ b/libraries/evas/src/modules/loaders/gif/evas_image_load_gif.c @@ -50,7 +50,8 @@ static Evas_Image_Load_Func evas_image_load_gif_func = EINA_TRUE, evas_image_load_file_head_gif, evas_image_load_file_data_gif, - evas_image_load_frame_duration_gif + evas_image_load_frame_duration_gif, + EINA_FALSE }; #define byte2_to_int(a,b) (((b)<<8)|(a)) diff --git a/libraries/evas/src/modules/loaders/ico/Makefile.in b/libraries/evas/src/modules/loaders/ico/Makefile.in index 5c26adf..f65ace0 100644 --- a/libraries/evas/src/modules/loaders/ico/Makefile.in +++ b/libraries/evas/src/modules/loaders/ico/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c b/libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c index 17a7f7e..6e31191 100644 --- a/libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c +++ b/libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c @@ -19,32 +19,57 @@ static Evas_Image_Load_Func evas_image_load_ico_func = EINA_TRUE, evas_image_load_file_head_ico, evas_image_load_file_data_ico, - NULL + NULL, + EINA_FALSE }; -static int -read_ushort(FILE *file, unsigned short *ret) +static Eina_Bool +read_ushort(unsigned char *map, size_t length, size_t *position, unsigned short *ret) { unsigned char b[2]; - if (fread(b, sizeof(unsigned char), 2, file) != 2) return 0; + + if (*position + 2 > length) return EINA_FALSE; + b[0] = map[(*position)++]; + b[1] = map[(*position)++]; *ret = (b[1] << 8) | b[0]; - return 1; + return EINA_TRUE; } -static int -read_uint(FILE *file, unsigned int *ret) +static Eina_Bool +read_uint(unsigned char *map, size_t length, size_t *position, unsigned int *ret) { - unsigned char b[4]; - if (fread(b, sizeof(unsigned char), 4, file) != 4) return 0; + unsigned char b[4]; + unsigned int i; + + if (*position + 4 > length) return EINA_FALSE; + for (i = 0; i < 4; i++) + b[i] = map[(*position)++]; *ret = ARGB_JOIN(b[3], b[2], b[1], b[0]); - return 1; + return EINA_TRUE; +} + +static Eina_Bool +read_uchar(unsigned char *map, size_t length, size_t *position, unsigned char *ret) +{ + if (*position + 1 > length) return EINA_FALSE; + *ret = map[(*position)++]; + return EINA_TRUE; +} + +static Eina_Bool +read_mem(unsigned char *map, size_t length, size_t *position, void *buffer, int size) +{ + if (*position + size > length) return EINA_FALSE; + memcpy(buffer, map + *position, size); + *position += size; + return EINA_TRUE; } enum { - SMALLEST, - BIGGEST, - SMALLER, + SMALLEST, + BIGGEST, + SMALLER, BIGGER }; @@ -57,9 +82,11 @@ enum static Eina_Bool evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key, int *error) { + Eina_File *f; + void *map = NULL; + size_t position = 0; unsigned short word; unsigned char byte; - FILE *f; int wanted_w = 0, wanted_h = 0, w, h, cols, i, planes = 0, hot_x = 0, hot_y = 0, bpp = 0, pdelta, search = -1, have_choice = 0, hasa = 1; @@ -74,7 +101,7 @@ evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key unsigned int bmoffset, bmsize; } chosen = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - f = fopen(file, "rb"); + f = eina_file_open(file, EINA_FALSE); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; @@ -82,16 +109,17 @@ evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key } *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; - fseek(f, 0, SEEK_END); - fsize = ftell(f); - fseek(f, 0, SEEK_SET); + fsize = eina_file_size_get(f); if (fsize < (6 + 16 + 40)) goto close_file; + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (!map) goto close_file; + // key: // NULL == highest res // biggest == highest res // smallest == lowest res - // + // // smaller == next size SMALLER than load opts WxH (if possible) // bigger == next size BIGGER than load opts WxH (if possible) // more ? @@ -103,10 +131,10 @@ evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key wanted_h = ie->load_opts.h; search = SMALLER; } - - if (!read_ushort(f, &reserved)) goto close_file; - if (!read_ushort(f, &type)) goto close_file; - if (!read_ushort(f, &count)) goto close_file; + + if (!read_ushort(map, fsize, &position, &reserved)) goto close_file; + if (!read_ushort(map, fsize, &position, &type)) goto close_file; + if (!read_ushort(map, fsize, &position, &count)) goto close_file; if (!((reserved == 0) && ((type == ICON) || (type == CURSOR)) && (count > 0))) goto close_file; @@ -141,24 +169,25 @@ evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key } for (i = 0; i < count; i++) { - if (fread(&byte, 1, 1, f) != 1) goto close_file; - w = byte; + unsigned char tw = 0, th = 0, tcols = 0; + if (!read_uchar(map, fsize, &position, &tw)) goto close_file; + w = tw; if (w <= 0) w = 256; - if (fread(&byte, 1, 1, f) != 1) goto close_file; - h = byte; + if (!read_uchar(map, fsize, &position, &th)) goto close_file; + h = th; if (h <= 0) h = 256; - if (fread(&byte, 1, 1, f) != 1) goto close_file; - cols = byte; + if (!read_uchar(map, fsize, &position, &tcols)) goto close_file; + cols = tcols; if (cols <= 0) cols = 256; - if (fread(&byte, 1, 1, f) != 1) goto close_file; - if (!read_ushort(f, &word)) goto close_file; + if (!read_uchar(map, fsize, &position, &byte)) goto close_file; + if (!read_ushort(map, fsize, &position, &word)) goto close_file; if (type == CURSOR) planes = word; else hot_x = word; - if (!read_ushort(f, &word)) goto close_file; + if (!read_ushort(map, fsize, &position, &word)) goto close_file; if (type == CURSOR) bpp = word; else hot_y = word; - if (!read_uint(f, &bmsize)) goto close_file; - if (!read_uint(f, &bmoffset)) goto close_file; + if (!read_uint(map, fsize, &position, &bmsize)) goto close_file; + if (!read_uint(map, fsize, &position, &bmoffset)) goto close_file; if ((bmsize <= 0) || (bmoffset <= 0) || (bmoffset >= fsize)) goto close_file; if (search == BIGGEST) { @@ -245,7 +274,7 @@ evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key } } if (chosen.bmoffset == 0) goto close_file; - if (fseek(f, chosen.bmoffset, SEEK_SET) != 0) goto close_file; + position = chosen.bmoffset; w = chosen.w; h = chosen.h; @@ -263,23 +292,28 @@ evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key ie->w = w; ie->h = h; if (hasa) ie->flags.alpha = 1; - - fclose(f); + + eina_file_map_free(f, map); + eina_file_close(f); + *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; close_file: - fclose(f); + if (map) eina_file_map_free(f, map); + eina_file_close(f); return EINA_FALSE; } static Eina_Bool evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key, int *error) { + Eina_File *f; + void *map = NULL; + size_t position = 0; unsigned short word; unsigned char byte; unsigned int dword; - FILE *f; int wanted_w = 0, wanted_h = 0, w, h, cols, i, planes = 0, hot_x = 0, hot_y = 0, bpp = 0, pdelta, search = -1, have_choice = 0, stride, pstride, j, right_way_up = 0, diff_size = 0, cols2; @@ -296,7 +330,7 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key unsigned int bmoffset, bmsize; } chosen = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - f = fopen(file, "rb"); + f = eina_file_open(file, EINA_FALSE); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; @@ -304,11 +338,12 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key } *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; - fseek(f, 0, SEEK_END); - fsize = ftell(f); - fseek(f, 0, SEEK_SET); + fsize = eina_file_size_get(f); if (fsize < (6 + 16 + 40)) goto close_file; + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (!map) goto close_file; + // key: // NULL == highest res // biggest == highest res @@ -325,11 +360,11 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key wanted_h = ie->load_opts.h; search = SMALLER; } - - if (!read_ushort(f, &reserved)) goto close_file; - if (!read_ushort(f, &type)) goto close_file; - if (!read_ushort(f, &count)) goto close_file; - if (!((reserved == 0) && + + if (!read_ushort(map, fsize, &position, &reserved)) goto close_file; + if (!read_ushort(map, fsize, &position, &type)) goto close_file; + if (!read_ushort(map, fsize, &position, &count)) goto close_file; + if (!((reserved == 0) && ((type == ICON) || (type == CURSOR)) && (count > 0))) goto close_file; *error = EVAS_LOAD_ERROR_CORRUPT_FILE; @@ -363,24 +398,25 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key } for (i = 0; i < count; i++) { - if (fread(&byte, 1, 1, f) != 1) goto close_file; - w = byte; + unsigned char tw = 0, th = 0, tcols = 0; + if (!read_uchar(map, fsize, &position, &tw)) goto close_file; + w = tw; if (w <= 0) w = 256; - if (fread(&byte, 1, 1, f) != 1) goto close_file; - h = byte; + if (!read_uchar(map, fsize, &position, &th)) goto close_file; + h = th; if (h <= 0) h = 256; - if (fread(&byte, 1, 1, f) != 1) goto close_file; - cols = byte; + if (!read_uchar(map, fsize, &position, &tcols)) goto close_file; + cols = tcols; if (cols <= 0) cols = 256; - if (fread(&byte, 1, 1, f) != 1) goto close_file; - if (!read_ushort(f, &word)) goto close_file; + if (!read_uchar(map, fsize, &position, &byte)) goto close_file; + if (!read_ushort(map, fsize, &position, &word)) goto close_file; if (type == 1) planes = word; else hot_x = word; - if (!read_ushort(f, &word)) goto close_file; + if (!read_ushort(map, fsize, &position, &word)) goto close_file; if (type == 1) bpp = word; else hot_y = word; - if (!read_uint(f, &bmsize)) goto close_file; - if (!read_uint(f, &bmoffset)) goto close_file; + if (!read_uint(map, fsize, &position, &bmsize)) goto close_file; + if (!read_uint(map, fsize, &position, &bmoffset)) goto close_file; if ((bmsize <= 0) || (bmoffset <= 0) || (bmoffset >= fsize)) goto close_file; if (search == BIGGEST) { @@ -467,7 +503,7 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key } } if (chosen.bmoffset == 0) goto close_file; - if (fseek(f, chosen.bmoffset, SEEK_SET) != 0) goto close_file; + position = chosen.bmoffset; w = chosen.w; h = chosen.h; @@ -477,8 +513,8 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key if (((int)ie->w != w) || ((int)ie->h != h)) goto close_file; // read bmp header time... let's do some checking - if (!read_uint(f, &dword)) goto close_file; // headersize - dont care - if (!read_uint(f, &dword)) goto close_file; // width + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // headersize - dont care + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // width if (dword > 0) { if ((int)dword != w) @@ -487,7 +523,7 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key diff_size = 1; } } - if (!read_uint(f, &dword)) goto close_file; // height + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // height if (dword > 0) { if ((int)dword != (h * 2)) @@ -503,19 +539,19 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key " May be expanded or cropped.", file, ie->w, ie->h, w, h); } - if (!read_ushort(f, &word)) goto close_file; // planes + if (!read_ushort(map, fsize, &position, &word)) goto close_file; // planes planes2 = word; - if (!read_ushort(f, &word)) goto close_file; // bitcount + if (!read_ushort(map, fsize, &position, &word)) goto close_file; // bitcount bitcount = word; - if (!read_uint(f, &dword)) goto close_file; // compression + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // compression compression = dword; - if (!read_uint(f, &dword)) goto close_file; // imagesize + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // imagesize imagesize = dword; - if (!read_uint(f, &dword)) goto close_file; // z pixels per m - if (!read_uint(f, &dword)) goto close_file; // y pizels per m - if (!read_uint(f, &dword)) goto close_file; // colors used + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // z pixels per m + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // y pizels per m + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // colors used colorsused = dword; - if (!read_uint(f, &dword)) goto close_file; // colors important + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // colors important colorsimportant = dword; evas_cache_image_surface_alloc(ie, ie->w, ie->h); @@ -545,11 +581,11 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key for (i = 0; i < cols; i++) { unsigned char a, r, g, b; - - if (fread(&b, 1, 1, f) != 1) goto close_file; - if (fread(&g, 1, 1, f) != 1) goto close_file; - if (fread(&r, 1, 1, f) != 1) goto close_file; - if (fread(&a, 1, 1, f) != 1) goto close_file; + + if (!read_uchar(map, fsize, &position, &b)) goto close_file; + if (!read_uchar(map, fsize, &position, &g)) goto close_file; + if (!read_uchar(map, fsize, &position, &r)) goto close_file; + if (!read_uchar(map, fsize, &position, &a)) goto close_file; a = 0xff; pal[i] = ARGB_JOIN(a, r, g, b); } @@ -563,7 +599,7 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key { pix = surface + (i * ie->w); if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); - if (fread(pixbuf, pstride, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, pixbuf, pstride)) goto close_file; p = pixbuf; if (i >= (int)ie->h) continue; for (j = 0; j < w; j++) @@ -613,7 +649,7 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key { pix = surface + (i * ie->w); if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); - if (fread(pixbuf, pstride, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, pixbuf, pstride)) goto close_file; p = pixbuf; if (i >= (int)ie->h) continue; for (j = 0; j < w; j++) @@ -639,7 +675,7 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key { pix = surface + (i * ie->w); if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); - if (fread(pixbuf, pstride, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, pixbuf, pstride)) goto close_file; p = pixbuf; if (i >= (int)ie->h) continue; for (j = 0; j < w; j++) @@ -658,13 +694,13 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key { pix = surface + (i * ie->w); if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); - if (fread(pixbuf, pstride, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, pixbuf, pstride)) goto close_file; p = pixbuf; if (i >= (int)ie->h) continue; for (j = 0; j < w; j++) { unsigned char a, r, g, b; - + if (j >= (int)ie->w) break; b = p[0]; g = p[1]; @@ -683,13 +719,13 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key { pix = surface + (i * ie->w); if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); - if (fread(pixbuf, pstride, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, pixbuf, pstride)) goto close_file; p = pixbuf; if (i >= (int)ie->h) continue; for (j = 0; j < w; j++) { unsigned char a, r, g, b; - + if (j >= (int)ie->w) break; b = p[0]; g = p[1]; @@ -704,13 +740,13 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key } if (!none_zero_alpha) { - if (fread(maskbuf, stride * 4 * h, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, maskbuf, stride * 4 * h)) goto close_file; // apply mask pix = surface; for (i = 0; i < h; i++) { unsigned char *m; - + pix = surface + (i * ie->w); if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); m = maskbuf + (stride * i * 4); @@ -727,15 +763,17 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key } } } - - fclose(f); - + + eina_file_map_free(f, map); + eina_file_close(f); + evas_common_image_premul(ie); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; close_file: - fclose(f); + if (map) eina_file_map_free(f, map); + eina_file_close(f); return EINA_FALSE; } diff --git a/libraries/evas/src/modules/loaders/jpeg/Makefile.in b/libraries/evas/src/modules/loaders/jpeg/Makefile.in index ce4b194..7c0ca18 100644 --- a/libraries/evas/src/modules/loaders/jpeg/Makefile.in +++ b/libraries/evas/src/modules/loaders/jpeg/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c b/libraries/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c index 0dbabab..797c76d 100644 --- a/libraries/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c +++ b/libraries/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c @@ -46,7 +46,8 @@ static Evas_Image_Load_Func evas_image_load_jpeg_func = EINA_TRUE, evas_image_load_file_head_jpeg, evas_image_load_file_data_jpeg, - NULL + NULL, + EINA_TRUE }; diff --git a/libraries/evas/src/modules/loaders/pmaps/Makefile.in b/libraries/evas/src/modules/loaders/pmaps/Makefile.in index de7b779..745e79b 100644 --- a/libraries/evas/src/modules/loaders/pmaps/Makefile.in +++ b/libraries/evas/src/modules/loaders/pmaps/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/pmaps/evas_image_load_pmaps.c b/libraries/evas/src/modules/loaders/pmaps/evas_image_load_pmaps.c index 9ba8f81..393e407 100644 --- a/libraries/evas/src/modules/loaders/pmaps/evas_image_load_pmaps.c +++ b/libraries/evas/src/modules/loaders/pmaps/evas_image_load_pmaps.c @@ -19,7 +19,8 @@ Evas_Image_Load_Func evas_image_load_pmaps_func = { EINA_TRUE, evas_image_load_file_head_pmaps, evas_image_load_file_data_pmaps, - NULL + NULL, + EINA_FALSE }; /* The buffer to load pmaps images */ @@ -27,7 +28,9 @@ typedef struct Pmaps_Buffer Pmaps_Buffer; struct Pmaps_Buffer { - FILE *file; + Eina_File *file; + void *map; + size_t position; /* the buffer */ DATA8 buffer[FILE_BUFFER_SIZE]; @@ -160,13 +163,23 @@ pmaps_buffer_open(Pmaps_Buffer *b, const char *filename, int *error) { size_t len; - b->file = fopen(filename, "rb"); + b->file = eina_file_open(filename, EINA_FALSE); if (!b->file) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } + b->map = eina_file_map_all(b->file, EINA_FILE_SEQUENTIAL); + if (!b->map) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + eina_file_close(b->file); + b->file = NULL; + return EINA_FALSE; + } + + b->position = 0; *b->buffer = 0; *b->unread = 0; b->last_buffer = 0; @@ -177,7 +190,9 @@ pmaps_buffer_open(Pmaps_Buffer *b, const char *filename, int *error) if (len < 3) { *error = EVAS_LOAD_ERROR_CORRUPT_FILE; - fclose(b->file); + eina_file_map_free(b->file, b->map); + eina_file_close(b->file); + b->map = NULL; b->file = NULL; return EINA_FALSE; } @@ -197,7 +212,12 @@ static void pmaps_buffer_close(Pmaps_Buffer *b) { if (b->file) - fclose(b->file); + { + if (b->map) eina_file_map_free(b->file, b->map); + b->map = NULL; + eina_file_close(b->file); + b->file = NULL; + } } static Eina_Bool @@ -295,6 +315,7 @@ static size_t pmaps_buffer_plain_update(Pmaps_Buffer *b) { size_t r; + size_t max; /* if we already are in the last buffer we can not update it */ if (b->last_buffer) @@ -304,9 +325,14 @@ pmaps_buffer_plain_update(Pmaps_Buffer *b) * stuff */ if (b->unread_len) memcpy(b->buffer, b->unread, b->unread_len); - - r = fread(&b->buffer[b->unread_len], 1, - FILE_BUFFER_SIZE - b->unread_len - 1, b->file) + b->unread_len; + + max = FILE_BUFFER_SIZE - b->unread_len - 1; + if (b->position + max > eina_file_size_get(b->file)) + max = eina_file_size_get(b->file) - b->position; + + memcpy(&b->buffer[b->unread_len], b->map + b->position, max); + b->position += max; + r = max + b->unread_len; /* we haven't read anything nor have we bytes in the unread buffer */ if (r == 0) @@ -324,7 +350,7 @@ pmaps_buffer_plain_update(Pmaps_Buffer *b) } b->buffer[r] = 0; - + b->unread[0] = '\0'; b->unread_len = 0; @@ -339,6 +365,7 @@ static size_t pmaps_buffer_raw_update(Pmaps_Buffer *b) { size_t r; + size_t max; if (b->last_buffer) return 0; @@ -346,8 +373,13 @@ pmaps_buffer_raw_update(Pmaps_Buffer *b) if (b->unread_len) memcpy(b->buffer, b->unread, b->unread_len); - r = fread(&b->buffer[b->unread_len], 1, FILE_BUFFER_SIZE - b->unread_len, - b->file) + b->unread_len; + max = FILE_BUFFER_SIZE - b->unread_len; + if (b->position + max > eina_file_size_get(b->file)) + max = eina_file_size_get(b->file) - b->position; + + memcpy(&b->buffer[b->unread_len], b->map + b->position, max); + b->position += max; + r = max + b->unread_len; if (r < FILE_BUFFER_SIZE) { diff --git a/libraries/evas/src/modules/loaders/png/Makefile.in b/libraries/evas/src/modules/loaders/png/Makefile.in index 0717299..3bd4919 100644 --- a/libraries/evas/src/modules/loaders/png/Makefile.in +++ b/libraries/evas/src/modules/loaders/png/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/png/evas_image_load_png.c b/libraries/evas/src/modules/loaders/png/evas_image_load_png.c index a1480ae..3007a57 100644 --- a/libraries/evas/src/modules/loaders/png/evas_image_load_png.c +++ b/libraries/evas/src/modules/loaders/png/evas_image_load_png.c @@ -35,7 +35,8 @@ static Evas_Image_Load_Func evas_image_load_png_func = EINA_TRUE, evas_image_load_file_head_png, evas_image_load_file_data_png, - NULL + NULL, + EINA_FALSE }; static Eina_Bool diff --git a/libraries/evas/src/modules/loaders/psd/Makefile.in b/libraries/evas/src/modules/loaders/psd/Makefile.in index 98d340a..3dc9c38 100644 --- a/libraries/evas/src/modules/loaders/psd/Makefile.in +++ b/libraries/evas/src/modules/loaders/psd/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/psd/evas_image_load_psd.c b/libraries/evas/src/modules/loaders/psd/evas_image_load_psd.c index 5a85e17..27f5f24 100644 --- a/libraries/evas/src/modules/loaders/psd/evas_image_load_psd.c +++ b/libraries/evas/src/modules/loaders/psd/evas_image_load_psd.c @@ -61,48 +61,57 @@ enum { }; static Eina_Bool get_compressed_channels_length(PSD_Header *Head, - FILE *file, + const unsigned char *map, size_t length, size_t *position, unsigned short *rle_table, unsigned int *chanlen); static int -read_ushort(FILE *file, unsigned short *ret) +read_ushort(const unsigned char *map, size_t length, size_t *position, unsigned short *ret) { - unsigned char b[2]; - if (fread(b, sizeof(unsigned char), 2, file) != 2) return 0; + if (*position + 2 > length) return 0; // FIXME: need to check order - *ret = (b[0] << 8) | b[1]; + *ret = (map[(*position) + 0] << 8) | map[(*position) + 1]; + *position += 2; return 1; } static int -read_uint(FILE *file, unsigned int *ret) +read_uint(const unsigned char *map, size_t length, size_t *position, unsigned int *ret) { - unsigned char b[4]; - if (fread(b, sizeof(unsigned char), 4, file) != 4) return 0; + if (*position + 4 > length) return 0; // FIXME: need to check order - *ret = ARGB_JOIN(b[0], b[1], b[2], b[3]); + *ret = ARGB_JOIN(map[(*position) + 0], map[(*position) + 1], map[(*position) + 2], map[(*position) + 3]); + *position += 4; + return 1; +} + +static int +read_block(const unsigned char *map, size_t length, size_t *position, void *target, size_t size) +{ + if (*position + size > length) return 0; + memcpy(target, map + *position, size); + *position += size; return 1; } // Internal function used to get the Psd header from the current file. Eina_Bool -psd_get_header(PSD_Header *header, FILE * file) +psd_get_header(PSD_Header *header, const unsigned char *map, size_t length, size_t *position) { unsigned short tmp; -#define CHECK_RET(Call, Value) \ - if (Call != Value) return EINA_FALSE; +#define CHECK_RET(Call) \ + if (!Call) return EINA_FALSE; - CHECK_RET(fread(header->signature, sizeof (unsigned char), 4, file), 4); - CHECK_RET(read_ushort(file, &header->version), 1); - CHECK_RET(fread(header->reserved, sizeof (unsigned char), 6, file), 6); - CHECK_RET(read_ushort(file, &header->channels), 1); - CHECK_RET(read_uint(file, &header->height), 1); - CHECK_RET(read_uint(file, &header->width), 1); - CHECK_RET(read_ushort(file, &header->depth), 1); + CHECK_RET(read_block(map, length, position, header->signature, 4)); + CHECK_RET(read_ushort(map, length, position, &header->version)); + CHECK_RET(read_block(map, length, position, header->reserved, 6)); + CHECK_RET(read_ushort(map, length, position, &header->channels)); + CHECK_RET(read_uint(map, length, position, &header->height)); + CHECK_RET(read_uint(map, length, position, &header->width)); + CHECK_RET(read_ushort(map, length, position, &header->depth)); - CHECK_RET(read_ushort(file, &tmp), 1); + CHECK_RET(read_ushort(map, length, position, &tmp)); header->mode = tmp; #undef CHECK_RET @@ -144,20 +153,35 @@ static Eina_Bool evas_image_load_file_head_psd(Image_Entry *ie, const char *FileName, const char *key __UNUSED__, int *error) { - FILE *f; + Eina_File *f; + void *map; + size_t length; + size_t position; PSD_Header header; Eina_Bool correct; *error = EVAS_LOAD_ERROR_NONE; - f = fopen(FileName, "rb"); + f = eina_file_open(FileName, 0); if (f == NULL) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } - correct = psd_get_header(&header, f); - fclose(f); + + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + length = eina_file_size_get(f); + position = 0; + if (!map || length < 1) + { + eina_file_close(f); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + correct = psd_get_header(&header, map, length, &position); + + eina_file_map_free(f, map); + eina_file_close(f); if (!correct || !is_psd(&header)) { @@ -174,7 +198,7 @@ evas_image_load_file_head_psd(Image_Entry *ie, const char *FileName, } static unsigned int -read_compressed_channel(FILE* file, +read_compressed_channel(const unsigned char *map, size_t length, size_t *position, const unsigned int channel_length __UNUSED__, unsigned int size, unsigned char* channel) @@ -183,19 +207,18 @@ read_compressed_channel(FILE* file, unsigned int i; char headbyte, c; -#define CHECK_RET(Call, Value) \ - if (Call != Value) return READ_COMPRESSED_ERROR_FILE_READ_ERROR; +#define CHECK_RET(Call) \ + if (!Call) return READ_COMPRESSED_ERROR_FILE_READ_ERROR; \ for (i = 0; i < size; ) { - CHECK_RET(fread(&headbyte, 1, 1, file), 1); + CHECK_RET(read_block(map, length, position, &headbyte, 1)); if (headbyte >= 0) { if (i + headbyte > size) - return READ_COMPRESSED_ERROR_FILE_CORRUPT; - - CHECK_RET(fread(channel + i, headbyte + 1, 1, file), 1); + return READ_COMPRESSED_ERROR_FILE_CORRUPT; + CHECK_RET(read_block(map, length, position, channel + i, headbyte + 1)); i += headbyte + 1; } @@ -203,14 +226,14 @@ read_compressed_channel(FILE* file, { int run; - CHECK_RET(fread(&c, 1, 1, file), 1); + CHECK_RET(read_block(map, length, position, &c, 1)); run = c; /* if (run == -1) */ /* return READ_COMPRESSED_ERROR_FILE_READ_ERROR; */ if (i + (-headbyte + 1) > size) - return READ_COMPRESSED_ERROR_FILE_CORRUPT; + return READ_COMPRESSED_ERROR_FILE_CORRUPT; memset(channel + i, run, -headbyte + 1); i += -headbyte + 1; @@ -226,7 +249,7 @@ read_compressed_channel(FILE* file, Eina_Bool psd_get_data(Image_Entry *ie __UNUSED__, PSD_Header *head, - FILE *f, + const unsigned char *map, size_t length, size_t *position, unsigned char *buffer, Eina_Bool compressed, int *error) { @@ -268,13 +291,12 @@ psd_get_data(Image_Entry *ie __UNUSED__, { free(data); free(channel); - fprintf(stderr, "unsupported file format.\n"); *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; return EINA_FALSE; } -#define CHECK_RET(Call, Value) \ - if (Call != Value) \ +#define CHECK_RET(Call) \ + if (!Call) \ { \ free(data); \ free(channel); \ @@ -289,7 +311,7 @@ psd_get_data(Image_Entry *ie __UNUSED__, { unsigned char *tmp = channel; - CHECK_RET(fread(tmp, pixels_count, 1, f), 1); + CHECK_RET(read_block(map, length, position, tmp, pixels_count)); for (y = 0; y < head->height * bps; y += bps) { @@ -306,7 +328,7 @@ psd_get_data(Image_Entry *ie __UNUSED__, { unsigned char *tmp = channel; - CHECK_RET(fread(channel, pixels_count, 1, f), 1); + CHECK_RET(read_block(map, length, position, channel, pixels_count)); for (y = 0; y < head->height * bps; y += bps) { @@ -333,7 +355,7 @@ psd_get_data(Image_Entry *ie __UNUSED__, { unsigned short *shortptr = (unsigned short*) channel; - CHECK_RET(fread(channel, pixels_count * 2, 1, f), 1); + CHECK_RET(read_block(map, length, position, channel, pixels_count * 2)); for (y = 0; y < head->height * bps2; y += bps2) { @@ -350,7 +372,7 @@ psd_get_data(Image_Entry *ie __UNUSED__, { unsigned short *shortptr = (unsigned short*) channel; - CHECK_RET(fread(channel, pixels_count * 2, 1, f), 1); + CHECK_RET(read_block(map, length, position, channel, pixels_count * 2)); for (y = 0; y < head->height * bps2; y += bps2) { @@ -373,7 +395,7 @@ psd_get_data(Image_Entry *ie __UNUSED__, rle_table = alloca(head->height * head->channel_num * sizeof (unsigned short)); chanlen = alloca(head->channel_num * sizeof (unsigned int)); - if (!get_compressed_channels_length(head, f, rle_table, chanlen)) + if (!get_compressed_channels_length(head, map, length, position, rle_table, chanlen)) goto file_read_error; for (c = 0; c < numchan; c++) @@ -381,7 +403,7 @@ psd_get_data(Image_Entry *ie __UNUSED__, unsigned char *tmp = channel; int err; - err = read_compressed_channel(f, + err = read_compressed_channel(map, length, position, chanlen[c], pixels_count, channel); @@ -416,7 +438,7 @@ psd_get_data(Image_Entry *ie __UNUSED__, unsigned char *tmp = channel; int err; - err = read_compressed_channel(f, + err = read_compressed_channel(map, length, position, chanlen[c], pixels_count, channel); @@ -482,7 +504,7 @@ psd_get_data(Image_Entry *ie __UNUSED__, Eina_Bool get_single_channel(Image_Entry *ie __UNUSED__, PSD_Header *head, - FILE *f, + const unsigned char *map, size_t length, size_t *position, unsigned char *buffer, Eina_Bool compressed) { @@ -496,29 +518,29 @@ get_single_channel(Image_Entry *ie __UNUSED__, bpc = (head->depth / 8); pixels_count = head->width * head->height; -#define CHECK_RET(Call, Value) \ - if (Call != Value) return EINA_FALSE; +#define CHECK_RET(Call) \ + if (!Call) return EINA_FALSE; if (!compressed) { if (bpc == 1) { - CHECK_RET(fread(buffer, pixels_count, 1, f), 1); + CHECK_RET(read_block(map, length, position, buffer, pixels_count)); } else { // Bpc == 2 - CHECK_RET(fread(buffer, pixels_count * 2, 1, f), 1); + CHECK_RET(read_block(map, length, position, buffer, pixels_count * 2)); } } else { for (i = 0; i < (unsigned int)pixels_count; ) { - CHECK_RET(fread(&headbyte, 1, 1, f), 1); + CHECK_RET(read_block(map, length, position, &headbyte, 1)); if (headbyte >= 0) { // && HeadByte <= 127 - CHECK_RET(fread(buffer + i, headbyte + 1, 1, f), 1); + CHECK_RET(read_block(map, length, position, buffer + i, headbyte + 1)); i += headbyte + 1; } @@ -526,7 +548,7 @@ get_single_channel(Image_Entry *ie __UNUSED__, { int run; - CHECK_RET(fread(&c, 1, 1, f), 1); + CHECK_RET(read_block(map, length, position, &c, 1)); run = c; if (run == -1) return EINA_FALSE; @@ -543,7 +565,7 @@ get_single_channel(Image_Entry *ie __UNUSED__, } Eina_Bool -read_psd_grey(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) +read_psd_grey(Image_Entry *ie, PSD_Header *head, const unsigned char *map, size_t length, size_t *position, int *error) { unsigned int color_mode, resource_size, misc_info; unsigned short compressed; @@ -552,22 +574,21 @@ read_psd_grey(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) *error = EVAS_LOAD_ERROR_CORRUPT_FILE; -#define CHECK_RET(Call, Value) \ - if (Call != Value) return EINA_FALSE; +#define CHECK_RET(Call) \ + if (!Call) return EINA_FALSE; - CHECK_RET(read_uint(f, &color_mode), 1); + CHECK_RET(read_uint(map, length, position, &color_mode)); // Skip over the 'color mode data section' - CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0); + *position += color_mode; - CHECK_RET(read_uint(f, &resource_size), 1); + CHECK_RET(read_uint(map, length, position, &resource_size)); // Read the 'image resources section' + *position += resource_size; - CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0); + CHECK_RET(read_uint(map, length, position, &misc_info)); + *position += misc_info; - CHECK_RET(read_uint(f, &misc_info), 1); - CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0); - - CHECK_RET(read_ushort(f, &compressed), 1); + CHECK_RET(read_ushort(map, length, position, &compressed)); ie->w = head->width; ie->h = head->height; @@ -599,7 +620,7 @@ read_psd_grey(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) goto cleanup_error; } - if (!psd_get_data(ie, head, f, surface, compressed, error)) + if (!psd_get_data(ie, head, map, length, position, surface, compressed, error)) goto cleanup_error; return EINA_TRUE; @@ -612,7 +633,7 @@ read_psd_grey(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) Eina_Bool -read_psd_indexed(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) +read_psd_indexed(Image_Entry *ie, PSD_Header *head, const unsigned char *map, size_t length, size_t *position, int *error) { unsigned int color_mode, resource_size, misc_info; unsigned short compressed; @@ -620,11 +641,11 @@ read_psd_indexed(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) *error = EVAS_LOAD_ERROR_CORRUPT_FILE; -#define CHECK_RET(Call, Value) \ - if (Call != Value) return EINA_FALSE; +#define CHECK_RET(Call) \ + if (!(Call)) return EINA_FALSE; - CHECK_RET(read_uint(f, &color_mode), 1); - CHECK_RET((color_mode % 3), 0); + CHECK_RET(read_uint(map, length, position, &color_mode)); + CHECK_RET(!(color_mode % 3)); /* Palette = (unsigned char*)malloc(Colormode); if (Palette == NULL) @@ -633,16 +654,16 @@ read_psd_indexed(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) goto cleanup_error; */ // Skip over the 'color mode data section' - CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0); + *position += color_mode; // Read the 'image resources section' - CHECK_RET(read_uint(f, &resource_size), 1); - CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0); + CHECK_RET(read_uint(map, length, position, &resource_size)); + *position += resource_size; - CHECK_RET(read_uint(f, &misc_info), 1); - CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0); + CHECK_RET(read_uint(map, length, position, &misc_info)); + *position += misc_info; - CHECK_RET(read_ushort(f, &compressed), 1); + CHECK_RET(read_ushort(map, length, position, &compressed)); if (head->channels != 1 || head->depth != 8) { @@ -664,7 +685,7 @@ read_psd_indexed(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) return EINA_FALSE; } - if (!psd_get_data(ie, head, f, surface, compressed, error)) + if (!psd_get_data(ie, head, map, length, position, surface, compressed, error)) return EINA_FALSE; return EINA_TRUE; @@ -672,28 +693,28 @@ read_psd_indexed(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) } Eina_Bool -read_psd_rgb(Image_Entry *ie, PSD_Header *head, FILE *f, int *error) +read_psd_rgb(Image_Entry *ie, PSD_Header *head, const unsigned char *map, size_t length, size_t *position, int *error) { unsigned int color_mode, resource_size, misc_info; unsigned short compressed; unsigned int type; void *surface; -#define CHECK_RET(Call, Value) \ - if (Call != Value) return EINA_FALSE; +#define CHECK_RET(Call) \ + if (!Call) return EINA_FALSE; - CHECK_RET(read_uint(f, &color_mode), 1); + CHECK_RET(read_uint(map, length, position, &color_mode)); // Skip over the 'color mode data section' - CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0); + *position += color_mode; // Read the 'image resources section' - CHECK_RET(read_uint(f, &resource_size), 1); - CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0); + CHECK_RET(read_uint(map, length, position, &resource_size)); + *position += resource_size; - CHECK_RET(read_uint(f, &misc_info), 1); - CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0); + CHECK_RET(read_uint(map, length, position, &misc_info)); + *position += misc_info; - CHECK_RET(read_ushort(f, &compressed), 1); + CHECK_RET(read_ushort(map, length, position, &compressed)); head->channel_num = head->channels; @@ -722,7 +743,7 @@ read_psd_rgb(Image_Entry *ie, PSD_Header *head, FILE *f, int *error) goto cleanup_error; } - if (!psd_get_data(ie, head, f, surface, compressed, error)) + if (!psd_get_data(ie, head, map, length, position, surface, compressed, error)) goto cleanup_error; evas_common_image_premul(ie); @@ -735,7 +756,7 @@ read_psd_rgb(Image_Entry *ie, PSD_Header *head, FILE *f, int *error) } Eina_Bool -read_psd_cmyk(Image_Entry *ie, PSD_Header *head, FILE *f, int *error) +read_psd_cmyk(Image_Entry *ie, PSD_Header *head, const unsigned char *map, size_t length, size_t *position, int *error) { unsigned int color_mode, resource_size, misc_info, size, i, j, data_size; unsigned short compressed; @@ -745,21 +766,21 @@ read_psd_cmyk(Image_Entry *ie, PSD_Header *head, FILE *f, int *error) *error = EVAS_LOAD_ERROR_CORRUPT_FILE; -#define CHECK_RET(Call, Value) \ - if (Call != Value) return EINA_FALSE; +#define CHECK_RET(Call) \ + if (!Call) return EINA_FALSE; - CHECK_RET(read_uint(f, &color_mode), 1); + CHECK_RET(read_uint(map, length, position, &color_mode)); // Skip over the 'color mode data section' - CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0); + *position += color_mode; - CHECK_RET(read_uint(f, &resource_size), 1); + CHECK_RET(read_uint(map, length, position, &resource_size)); // Read the 'image resources section' - CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0); + *position += resource_size; - CHECK_RET(read_uint(f, &misc_info), 1); - CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0); + CHECK_RET(read_uint(map, length, position, &misc_info)); + *position += misc_info; - CHECK_RET(read_ushort(f, &compressed), 1); + CHECK_RET(read_ushort(map, length, position, &compressed)); switch (head->channels) { @@ -804,14 +825,14 @@ read_psd_cmyk(Image_Entry *ie, PSD_Header *head, FILE *f, int *error) goto cleanup_error; } - if (!psd_get_data(ie, head, f, surface, compressed, error)) + if (!psd_get_data(ie, head, map, length, position, surface, compressed, error)) goto cleanup_error; size = type * ie->w * ie->h; kchannel = malloc(size); if (kchannel == NULL) goto cleanup_error; - if (!get_single_channel(ie, head, f, kchannel, compressed)) + if (!get_single_channel(ie, head, map, length, position, kchannel, compressed)) goto cleanup_error; data_size = head->channels * type * ie->w * ie->h; @@ -861,20 +882,34 @@ evas_image_load_file_data_psd(Image_Entry *ie, const char *key __UNUSED__, int *error) { - FILE *f; + Eina_File *f; + void *map; + size_t length; + size_t position; PSD_Header header; Eina_Bool bpsd = EINA_FALSE; - f = fopen(file, "rb"); + f = eina_file_open(file, 0); if (f == NULL) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return bpsd; } - if (!psd_get_header(&header, f) || !is_psd(&header)) + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + length = eina_file_size_get(f); + position = 0; + if (!map || length < 1) + { + eina_file_close(f); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + + if (!psd_get_header(&header, map, length, &position) || !is_psd(&header)) { - fclose(f); + eina_file_map_free(f, map); + eina_file_close(f); *error = EVAS_LOAD_ERROR_GENERIC; return EINA_FALSE; } @@ -887,39 +922,39 @@ evas_image_load_file_data_psd(Image_Entry *ie, switch (header.mode) { case PSD_GREYSCALE: // Greyscale - bpsd = read_psd_grey(ie, &header, f, error); + bpsd = read_psd_grey(ie, &header, map, length, &position, error); break; case PSD_INDEXED: // Indexed - bpsd = read_psd_indexed(ie, &header, f, error); + bpsd = read_psd_indexed(ie, &header, map, length, &position, error); break; case PSD_RGB: // RGB - bpsd = read_psd_rgb(ie, &header, f, error); + bpsd = read_psd_rgb(ie, &header, map, length, &position, error); break; case PSD_CMYK: // CMYK - bpsd = read_psd_cmyk(ie, &header, f, error); + bpsd = read_psd_cmyk(ie, &header, map, length, &position, error); break; default : *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; bpsd = EINA_FALSE; } - fclose(f); + + eina_file_map_free(f, map); + eina_file_close(f); return bpsd; } static Eina_Bool get_compressed_channels_length(PSD_Header *head, - FILE * file, + const unsigned char *map, size_t length, size_t *position, unsigned short *rle_table, unsigned int *chanlen) { unsigned int j; unsigned int c; - if (fread(rle_table, - sizeof(unsigned short), - head->height * head->channel_num, - file) != head->height * head->channel_num) + if (!read_block(map, length, position, rle_table, + sizeof (unsigned short) * head->height * head->channel_num)) return EINA_FALSE; memset(chanlen, 0, head->channel_num * sizeof(unsigned int)); @@ -941,7 +976,8 @@ static const Evas_Image_Load_Func evas_image_load_psd_func = { EINA_TRUE, evas_image_load_file_head_psd, evas_image_load_file_data_psd, - NULL + NULL, + EINA_FALSE }; static int diff --git a/libraries/evas/src/modules/loaders/svg/Makefile.in b/libraries/evas/src/modules/loaders/svg/Makefile.in index f81a3c3..b742842 100644 --- a/libraries/evas/src/modules/loaders/svg/Makefile.in +++ b/libraries/evas/src/modules/loaders/svg/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/svg/evas_image_load_svg.c b/libraries/evas/src/modules/loaders/svg/evas_image_load_svg.c index f1c8452..dc0fc8d 100644 --- a/libraries/evas/src/modules/loaders/svg/evas_image_load_svg.c +++ b/libraries/evas/src/modules/loaders/svg/evas_image_load_svg.c @@ -13,7 +13,8 @@ Evas_Image_Load_Func evas_image_load_svg_func = EINA_FALSE, evas_image_load_file_head_svg, evas_image_load_file_data_svg, - NULL + NULL, + EINA_FALSE }; static int rsvg_initialized = 0; diff --git a/libraries/evas/src/modules/loaders/tga/Makefile.in b/libraries/evas/src/modules/loaders/tga/Makefile.in index 645c77a..4d822d1 100644 --- a/libraries/evas/src/modules/loaders/tga/Makefile.in +++ b/libraries/evas/src/modules/loaders/tga/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/tga/evas_image_load_tga.c b/libraries/evas/src/modules/loaders/tga/evas_image_load_tga.c index 61b99f6..9b4073c 100644 --- a/libraries/evas/src/modules/loaders/tga/evas_image_load_tga.c +++ b/libraries/evas/src/modules/loaders/tga/evas_image_load_tga.c @@ -65,7 +65,8 @@ static Evas_Image_Load_Func evas_image_load_tga_func = EINA_TRUE, evas_image_load_file_head_tga, evas_image_load_file_data_tga, - NULL + NULL, + EINA_FALSE }; static Eina_Bool diff --git a/libraries/evas/src/modules/loaders/tiff/Makefile.in b/libraries/evas/src/modules/loaders/tiff/Makefile.in index a2deea7..2b102a1 100644 --- a/libraries/evas/src/modules/loaders/tiff/Makefile.in +++ b/libraries/evas/src/modules/loaders/tiff/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/tiff/evas_image_load_tiff.c b/libraries/evas/src/modules/loaders/tiff/evas_image_load_tiff.c index b9bea91..e17d5a6 100644 --- a/libraries/evas/src/modules/loaders/tiff/evas_image_load_tiff.c +++ b/libraries/evas/src/modules/loaders/tiff/evas_image_load_tiff.c @@ -34,7 +34,8 @@ static Evas_Image_Load_Func evas_image_load_tiff_func = EINA_TRUE, evas_image_load_file_head_tiff, evas_image_load_file_data_tiff, - NULL + NULL, + EINA_FALSE }; typedef struct TIFFRGBAImage_Extra TIFFRGBAImage_Extra; diff --git a/libraries/evas/src/modules/loaders/wbmp/Makefile.in b/libraries/evas/src/modules/loaders/wbmp/Makefile.in index 41a3bb9..5c01e1c 100644 --- a/libraries/evas/src/modules/loaders/wbmp/Makefile.in +++ b/libraries/evas/src/modules/loaders/wbmp/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/wbmp/evas_image_load_wbmp.c b/libraries/evas/src/modules/loaders/wbmp/evas_image_load_wbmp.c index fa6fab2..54e28d5 100644 --- a/libraries/evas/src/modules/loaders/wbmp/evas_image_load_wbmp.c +++ b/libraries/evas/src/modules/loaders/wbmp/evas_image_load_wbmp.c @@ -19,21 +19,22 @@ static Evas_Image_Load_Func evas_image_load_wbmp_func = EINA_TRUE, evas_image_load_file_head_wbmp, evas_image_load_file_data_wbmp, - NULL + NULL, + EINA_FALSE }; static int -read_mb(unsigned int *data, FILE *f) +read_mb(unsigned int *data, void *map, size_t length, size_t *position) { int ac = 0, ct; unsigned char buf; - + for (ct = 0;;) { if ((ct++) == 5) return -1; - if ((fread(&buf, 1, 1, f)) < 1) - return -1; + if (*position > length) return -1; + buf = ((unsigned char *) map)[(*position)++]; ac = (ac << 7) | (buf & 0x7f); if ((buf & 0x80) == 0) break; } @@ -44,70 +45,105 @@ read_mb(unsigned int *data, FILE *f) static Eina_Bool evas_image_load_file_head_wbmp(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) { - FILE *f; + Eina_File *f; + void *map = NULL; + size_t position = 0; + size_t length; unsigned int type, w, h; - unsigned char fixed_header; - struct stat statbuf; - + *error = EVAS_LOAD_ERROR_GENERIC; - f = fopen(file, "rb"); + f = eina_file_open(file, 0); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } - - if (stat(file, &statbuf) == -1) goto bail; - if (read_mb(&type, f) < 0) goto bail; - + + length = eina_file_size_get(f); + if (length <= 4) goto bail; + + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (!map) goto bail; + + if (read_mb(&type, map, length, &position) < 0) goto bail; + if (type != 0) { *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; goto bail; } - - if (fread(&fixed_header, 1, 1, f) != 1) goto bail; - if (read_mb(&w, f) < 0) goto bail; - if (read_mb(&h, f) < 0) goto bail; + + position++; /* skipping one byte */ + if (read_mb(&w, map, length, &position) < 0) goto bail; + if (read_mb(&h, map, length, &position) < 0) goto bail; if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || IMG_TOO_BIG(w, h)) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto bail; } - - fclose(f); + + eina_file_map_free(f, map); + eina_file_close(f); ie->w = w; ie->h = h; - + *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; bail: - fclose(f); + if (map) eina_file_map_free(f, map); + eina_file_close(f); return EINA_FALSE; } static Eina_Bool evas_image_load_file_data_wbmp(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) { - FILE *f; - unsigned int dummy, line_length; + Eina_File *f; + void *map = NULL; + size_t position = 0; + size_t length; + unsigned int type, w, h; + unsigned int line_length; unsigned char *line = NULL; int cur = 0, x, y; DATA32 *dst_data; - + *error = EVAS_LOAD_ERROR_GENERIC; - f = fopen(file, "rb"); + f = eina_file_open(file, EINA_FALSE); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } - if (read_mb(&dummy, f) < 0) goto bail; - if (fread(&dummy, 1, 1, f) != 1) goto bail; - if (read_mb(&dummy, f) < 0) goto bail; - if (read_mb(&dummy, f) < 0) goto bail; - + + length = eina_file_size_get(f); + if (length <= 4) goto bail; + + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (!map) goto bail; + + if (read_mb(&type, map, length, &position) < 0) goto bail; + position++; /* skipping one byte */ + if (read_mb(&w, map, length, &position) < 0) goto bail; + if (read_mb(&h, map, length, &position) < 0) goto bail; + + if (type != 0) + { + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + goto bail; + } + + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || + IMG_TOO_BIG(w, h)) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto bail; + } + + ie->w = w; + ie->h = h; + evas_cache_image_surface_alloc(ie, ie->w, ie->h); dst_data = evas_cache_image_pixels(ie); if (!dst_data) @@ -115,13 +151,14 @@ evas_image_load_file_data_wbmp(Image_Entry *ie, const char *file, const char *ke *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto bail; } - + line_length = (ie->w + 7) >> 3; - line = alloca(line_length); - + for (y = 0; y < (int)ie->h; y++) { - if (fread(line, 1, line_length, f) != line_length) goto bail; + if (position + line_length > length) goto bail; + line = ((unsigned char*) map) + position; + position += line_length; for (x = 0; x < (int)ie->w; x++) { int idx = x >> 3; @@ -131,11 +168,13 @@ evas_image_load_file_data_wbmp(Image_Entry *ie, const char *file, const char *ke cur++; } } - fclose(f); + eina_file_map_free(f, map); + eina_file_close(f); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; bail: - fclose(f); + if (map) eina_file_map_free(f, map); + eina_file_close(f); return EINA_FALSE; } diff --git a/libraries/evas/src/modules/loaders/xpm/Makefile.in b/libraries/evas/src/modules/loaders/xpm/Makefile.in index eba8f60..6383d9e 100644 --- a/libraries/evas/src/modules/loaders/xpm/Makefile.in +++ b/libraries/evas/src/modules/loaders/xpm/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/xpm/evas_image_load_xpm.c b/libraries/evas/src/modules/loaders/xpm/evas_image_load_xpm.c index 3a04f84..c764f6d 100644 --- a/libraries/evas/src/modules/loaders/xpm/evas_image_load_xpm.c +++ b/libraries/evas/src/modules/loaders/xpm/evas_image_load_xpm.c @@ -24,16 +24,20 @@ static Evas_Image_Load_Func evas_image_load_xpm_func = EINA_FALSE, evas_image_load_file_head_xpm, evas_image_load_file_data_xpm, - NULL + NULL, + EINA_FALSE }; -// TODO: REWRITE THIS WITH THREAD SAFE VERSION NOT USING THIS HANDLE!!!! -static FILE *rgb_txt = NULL; +static Eina_File *rgb_txt; +static void *rgb_txt_map; static void xpm_parse_color(char *color, int *r, int *g, int *b) { - char buf[4096]; + char *tmp; + char *max; + char *endline; + char buf[4096]; /* is a #ff00ff like color */ if (color[0] == '#') @@ -75,20 +79,23 @@ xpm_parse_color(char *color, int *r, int *g, int *b) return; } /* look in rgb txt database */ - if (!rgb_txt) rgb_txt = fopen("/usr/lib/X11/rgb.txt", "r"); - if (!rgb_txt) rgb_txt = fopen("/usr/X11/lib/X11/rgb.txt", "r"); - if (!rgb_txt) rgb_txt = fopen("/usr/X11R6/lib/X11/rgb.txt", "r"); - if (!rgb_txt) rgb_txt = fopen("/usr/openwin/lib/X11/rgb.txt", "r"); if (!rgb_txt) return; - fseek(rgb_txt, 0, SEEK_SET); - while (fgets(buf, sizeof(buf), rgb_txt)) + tmp = rgb_txt_map; + max = tmp + eina_file_size_get(rgb_txt); + + while (tmp < max) { - buf[sizeof(buf) - 1] = 0; - if (buf[0] != '!') + endline = memchr(tmp, '\n', max - tmp); + if (!endline) endline = max; + if ((*tmp != '!') && ((endline - tmp) < (int) (sizeof(buf) - 1))) { int rr, gg, bb; char name[4096]; + /* FIXME: not really efficient */ + memcpy(buf, tmp, endline - tmp); + buf[endline - tmp + 1] = '\0'; + if (sscanf(buf, "%i %i %i %[^\n]", &rr, &gg, &bb, name) == 4) { if (!strcasecmp(name, color)) @@ -100,33 +107,30 @@ xpm_parse_color(char *color, int *r, int *g, int *b) } } } + tmp = endline + 1; } } -static void -xpm_parse_done(void) -{ - if (rgb_txt) fclose(rgb_txt); - rgb_txt = NULL; -} - - /** FIXME: clean this up and make more efficient **/ static Eina_Bool evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UNUSED__, int load_data, int *error) { DATA32 *ptr, *end; - FILE *f; + Eina_File *f; + const char *map; + size_t length; + size_t position; int pc, c, i, j, k, w, h, ncolors, cpp, comment, transp, quote, context, len, done, r, g, b, backslash, lu1, lu2; - char *line, s[256], tok[128], col[256], *tl; + char *line = NULL; + char s[256], tok[128], col[256], *tl; int lsz = 256; struct _cmap { char str[6]; unsigned char transp; short r, g, b; - } *cmap; + } *cmap = NULL; short lookup[128 - 32][128 - 32]; int count, pixels; @@ -138,30 +142,39 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN /* if immediate_load is 1, then dont delay image laoding as below, or */ /* already data in this image - dont load it again */ - f = fopen(file, "rb"); + f = eina_file_open(file, 0); if (!f) { - xpm_parse_done(); + ERR("XPM ERROR: file failed to open"); *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } - if (fread(s, 9, 1, f) != 1) + length = eina_file_size_get(f); + position = 0; + if (length < 9) { - fclose(f); - xpm_parse_done(); + ERR("XPM ERROR: file size, %i, is to small", length); + eina_file_close(f); *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } - rewind(f); - s[9] = 0; - if (strcmp("/* XPM */", s)) + + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (!map) { - fclose(f); - xpm_parse_done(); - *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + ERR("XPM ERROR: file failed to mmap"); + eina_file_close(f); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } + if (strncmp("/* XPM */", map, 9)) + { + ERR("XPM ERROR: header not found"); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + goto on_error; + } + i = 0; j = 0; cmap = NULL; @@ -178,10 +191,8 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN line = malloc(lsz); if (!line) { - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; - return EINA_FALSE; + goto on_error; } backslash = 0; @@ -189,8 +200,8 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN while (!done) { pc = c; - c = fgetc(f); - if (c == EOF) break; + if (position == length) break ; + c = (char) map[position++]; if (!quote) { if ((pc == '/') && (c == '*')) @@ -215,56 +226,38 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN if (sscanf(line, "%i %i %i %i", &w, &h, &ncolors, &cpp) != 4) { ERR("XPM ERROR: XPM file malformed header"); - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_CORRUPT_FILE; - return EINA_FALSE; + goto on_error; } if ((ncolors > 32766) || (ncolors < 1)) { ERR("XPM ERROR: XPM files with colors > 32766 or < 1 not supported"); - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; - return EINA_FALSE; + goto on_error; } if ((cpp > 5) || (cpp < 1)) { ERR("XPM ERROR: XPM files with characters per pixel > 5 or < 1not supported"); - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; - return EINA_FALSE; + goto on_error; } if ((w > IMG_MAX_SIZE) || (w < 1)) { ERR("XPM ERROR: Image width > IMG_MAX_SIZE or < 1 pixels for file"); - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_GENERIC; - return EINA_FALSE; + goto on_error; } if ((h > IMG_MAX_SIZE) || (h < 1)) { ERR("XPM ERROR: Image height > IMG_MAX_SIZE or < 1 pixels for file"); - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_GENERIC; - return EINA_FALSE; + goto on_error; } if (IMG_TOO_BIG(w, h)) { ERR("XPM ERROR: Image just too big to ever allocate"); - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; - return EINA_FALSE; + goto on_error; } if (!cmap) @@ -272,11 +265,8 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN cmap = malloc(sizeof(struct _cmap) * ncolors); if (!cmap) { - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; - return EINA_FALSE; + goto on_error; } } ie->w = w; @@ -398,24 +388,16 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN ptr = evas_cache_image_pixels(ie); if (!ptr) { - free(cmap); - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; - return EINA_FALSE; + goto on_error; } pixels = w * h; end = ptr + pixels; } else { - free(cmap); - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_NONE; - return EINA_TRUE; + goto on_success; } } else @@ -631,13 +613,21 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN break; } + on_success: free(cmap); free(line); - fclose(f); - xpm_parse_done(); + eina_file_map_free(f, (void*) map); + eina_file_close(f); + *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; + + on_error: + free(line); + eina_file_map_free(f, (void*) map); + eina_file_close(f); + return EINA_FALSE; } static Eina_Bool @@ -663,6 +653,14 @@ module_open(Evas_Module *em) EINA_LOG_ERR("Can not create a module log domain."); return 0; } + + /* Shouldn't we make that PATH configurable ? */ + rgb_txt = eina_file_open("/usr/lib/X11/rgb.txt", 0); + if (!rgb_txt) rgb_txt = eina_file_open("/usr/X11/lib/X11/rgb.txt", 0); + if (!rgb_txt) rgb_txt = eina_file_open("/usr/X11R6/lib/X11/rgb.txt", 0); + if (!rgb_txt) rgb_txt = eina_file_open("/usr/openwin/lib/X11/rgb.txt", 0); + if (rgb_txt) + rgb_txt_map = eina_file_map_all(rgb_txt, EINA_FILE_SEQUENTIAL); em->functions = (void *)(&evas_image_load_xpm_func); return 1; } @@ -670,6 +668,12 @@ module_open(Evas_Module *em) static void module_close(Evas_Module *em __UNUSED__) { + if (rgb_txt) + { + eina_file_map_free(rgb_txt, rgb_txt_map); + eina_file_close(rgb_txt); + rgb_txt = NULL; + } eina_log_domain_unregister(_evas_loader_xpm_log_dom); } diff --git a/libraries/evas/src/modules/savers/Makefile.in b/libraries/evas/src/modules/savers/Makefile.in index 6d64b4c..28236d9 100644 --- a/libraries/evas/src/modules/savers/Makefile.in +++ b/libraries/evas/src/modules/savers/Makefile.in @@ -211,8 +211,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -229,6 +227,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -310,6 +310,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/savers/edb/Makefile.in b/libraries/evas/src/modules/savers/edb/Makefile.in index e319b56..2ed29ec 100644 --- a/libraries/evas/src/modules/savers/edb/Makefile.in +++ b/libraries/evas/src/modules/savers/edb/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/savers/eet/Makefile.in b/libraries/evas/src/modules/savers/eet/Makefile.in index c80e946..6564c18 100644 --- a/libraries/evas/src/modules/savers/eet/Makefile.in +++ b/libraries/evas/src/modules/savers/eet/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/savers/jpeg/Makefile.in b/libraries/evas/src/modules/savers/jpeg/Makefile.in index 3c1bd8b..e57c4f9 100644 --- a/libraries/evas/src/modules/savers/jpeg/Makefile.in +++ b/libraries/evas/src/modules/savers/jpeg/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/savers/png/Makefile.in b/libraries/evas/src/modules/savers/png/Makefile.in index 3b905a5..da04ff2 100644 --- a/libraries/evas/src/modules/savers/png/Makefile.in +++ b/libraries/evas/src/modules/savers/png/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/savers/tiff/Makefile.in b/libraries/evas/src/modules/savers/tiff/Makefile.in index 27acddd..8f4411f 100644 --- a/libraries/evas/src/modules/savers/tiff/Makefile.in +++ b/libraries/evas/src/modules/savers/tiff/Makefile.in @@ -231,8 +231,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/static_deps/Makefile.in b/libraries/evas/src/static_deps/Makefile.in index 94f534e..514e79c 100644 --- a/libraries/evas/src/static_deps/Makefile.in +++ b/libraries/evas/src/static_deps/Makefile.in @@ -207,8 +207,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -225,6 +223,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -306,6 +306,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/static_deps/liblinebreak/AUTHORS b/libraries/evas/src/static_deps/liblinebreak/AUTHORS index 523106f..22786d4 100644 --- a/libraries/evas/src/static_deps/liblinebreak/AUTHORS +++ b/libraries/evas/src/static_deps/liblinebreak/AUTHORS @@ -4,3 +4,5 @@ Nikolay Pultsin. Put forward the original requirements on liblinebreak, performed tests, and made a lot of suggestions on the initial versions. Thomas Klausner. Autoconfiscated and libtoolized liblinebreak. + +Tom Hacohen. Added word boundaries support. diff --git a/libraries/evas/src/static_deps/liblinebreak/Makefile.am b/libraries/evas/src/static_deps/liblinebreak/Makefile.am index f386455..68e9c4a 100644 --- a/libraries/evas/src/static_deps/liblinebreak/Makefile.am +++ b/libraries/evas/src/static_deps/liblinebreak/Makefile.am @@ -1,13 +1,15 @@ MAINTAINERCLEANFILES = Makefile.in #noinst_PROGRAMS = filter_dup -noinst_HEADERS = linebreak.h linebreakdef.h +noinst_HEADERS = linebreak.h linebreakdef.h wordbreakdef.h wordbreak.h noinst_LTLIBRARIES = liblinebreak.la liblinebreak_la_SOURCES = \ linebreak.c \ linebreakdata.c \ - linebreakdef.c + linebreakdef.c \ + wordbreak.c \ + wordbreakdata.x EXTRA_DIST = \ LineBreak1.sed \ diff --git a/libraries/evas/src/static_deps/liblinebreak/Makefile.in b/libraries/evas/src/static_deps/liblinebreak/Makefile.in index 909f75e..9d44327 100644 --- a/libraries/evas/src/static_deps/liblinebreak/Makefile.in +++ b/libraries/evas/src/static_deps/liblinebreak/Makefile.in @@ -61,7 +61,7 @@ CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) liblinebreak_la_LIBADD = am_liblinebreak_la_OBJECTS = linebreak.lo linebreakdata.lo \ - linebreakdef.lo + linebreakdef.lo wordbreak.lo liblinebreak_la_OBJECTS = $(am_liblinebreak_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) @@ -200,8 +200,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -218,6 +216,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -299,6 +299,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ @@ -376,12 +380,14 @@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in #noinst_PROGRAMS = filter_dup -noinst_HEADERS = linebreak.h linebreakdef.h +noinst_HEADERS = linebreak.h linebreakdef.h wordbreakdef.h wordbreak.h noinst_LTLIBRARIES = liblinebreak.la liblinebreak_la_SOURCES = \ linebreak.c \ linebreakdata.c \ - linebreakdef.c + linebreakdef.c \ + wordbreak.c \ + wordbreakdata.x EXTRA_DIST = \ LineBreak1.sed \ @@ -446,6 +452,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linebreak.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linebreakdata.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linebreakdef.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wordbreak.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< diff --git a/libraries/evas/src/static_deps/liblinebreak/wordbreak.c b/libraries/evas/src/static_deps/liblinebreak/wordbreak.c new file mode 100644 index 0000000..bbbb7f4 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/wordbreak.c @@ -0,0 +1,435 @@ +/* vim: set tabstop=4 shiftwidth=4: */ + +/* + * Word breaking in a Unicode sequence. Designed to be used in a + * generic text renderer. + * + * Copyright (C) 2011-2011 Tom Hacohen + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the author be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute + * it freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must + * not claim that you wrote the original software. If you use this + * software in a product, an acknowledgement in the product + * documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must + * not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source + * distribution. + * + * The main reference is Unicode Standard Annex 29 (UAX #29): + * + * + * When this library was designed, this annex was at Revision 17, for + * Unicode 6.0.0: + * + * + * The Unicode Terms of Use are available at + * + */ + +/** + * @file wordbreak.c + * + * Implementation of the word breaking algorithm as described in Unicode + * Standard Annex 29. + * + * @version 2.0, 2011/12/12 + * @author Tom Hacohen + */ + + +#include +#include +#include +#include "linebreak.h" +#include "linebreakdef.h" + +#include "wordbreak.h" +#include "wordbreakdata.x" + +#define ARRAY_LEN(x) (sizeof(x) / sizeof(x[0])) + +/* Init the wordbreak internals. */ +void init_wordbreak(void) +{ + /* Currently does nothing, may be needed in the future. */ + return; +} + +/** + * Gets the word breaking class of a character. + * + * @param ch character to check + * @param wbp pointer to the wbp breaking properties array + * @param len the size of the wbp array in number of items. + * @return the word breaking class if found; \c WBP_Any otherwise + */ +static enum WordBreakClass get_char_wb_class( + utf32_t ch, + struct WordBreakProperties *wbp, + size_t len) +{ + int min = 0; + int max = len - 1; + int mid; + + do + { + mid = (min + max) / 2; + + if (ch < wbp[mid].start) + max = mid - 1; + else if (ch > wbp[mid].end) + min = mid + 1; + else + return wbp[mid].prop; + } + while (min <= max); + + return WBP_Any; +} + +/** + * Sets the break types in brks starting from posLast up to posStop. + * + * It sets the inside chars to #WORDBREAK_INSIDECHAR and the rest to brkType. + * Assumes brks is initialized - all the cells with #WORDBREAK_NOBREAK are + * cells that we really don't want to break after. + * + * @param s the string + * @param brks[out] the breaks array to fill. + * @param posStart the start position + * @param posEnd the end position + * @param len the length of the string + * @param brkType the breaks type to use + * @param get_next_char function to get the next UTF-32 character + */ +static void set_brks_to(const void *s, + char *brks, + size_t posStart, + size_t posEnd, + size_t len, + char brkType, + get_next_char_t get_next_char) +{ + size_t posCur = posStart; + while (posCur < posEnd) + { + get_next_char(s, len, &posCur); + for ( ; posStart < posCur - 1; ++posStart) + { + brks[posStart] = WORDBREAK_INSIDECHAR; + } + assert(posStart == posCur - 1); + + /* Only set it if we haven't set it not to break before. */ + if (brks[posStart] != WORDBREAK_NOBREAK) + brks[posStart] = brkType; + posStart = posCur; + } +} + +/* Checks to see if newline, cr, or lf. for WB3a and b */ +#define IS_WB3ab(cls) ((cls == WBP_Newline) || (cls == WBP_CR) || \ + (cls == WBP_LF)) + +/** + * Sets the word breaking information for a generic input string. + * + * @param[in] s input string + * @param[in] len length of the input + * @param[in] lang language of the input + * @param[out] brks pointer to the output breaking data, containing + * #WORDBREAK_BREAK, #WORDBREAK_NOBREAK, or + * #WORDBREAK_INSIDEACHAR + * @param[in] get_next_char function to get the next UTF-32 character + */ +static void set_wordbreaks( + const void *s, + size_t len, + const char *lang, + char *brks, + get_next_char_t get_next_char) +{ + /* Previous class */ + enum WordBreakClass p_cls = WBP_Undefined; + /* Strong previous class. */ + enum WordBreakClass sp_cls = WBP_Undefined; + utf32_t ch; + size_t posCur = 0; + size_t posCurSt = 0; + size_t posLast = 0; + + /* FIXME: unused atm. */ + (void) lang; + + + /* Init brks */ + memset(brks, WORDBREAK_BREAK, len); + + ch = get_next_char(s, len, &posCur); + + /* WB3a, WB3b are implied. */ + for ( ; ch != EOS ; ) + { + /* Current class */ + enum WordBreakClass c_cls; + c_cls = get_char_wb_class(ch, wb_prop_default, + ARRAY_LEN(wb_prop_default)); + + switch (c_cls) + { + case WBP_CR: + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + sp_cls = c_cls; + posLast = posCurSt; + break; + + case WBP_LF: + if (sp_cls == WBP_CR) /* WB3 */ + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_NOBREAK, + get_next_char); + sp_cls = c_cls; + posLast = posCurSt; + } + sp_cls = c_cls; + posLast = posCurSt; + break; + + case WBP_Newline: + /* WB3a, WB3b */ + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + sp_cls = c_cls; + posLast = posCurSt; + break; + + case WBP_Extend: + case WBP_Format: + /* WB4 - If not the first char/after a newline (W3ab), + * skip this class, set it to be the same as the prev, and mark + * brks not to break before them. */ + if ((sp_cls == WBP_Undefined) || IS_WB3ab(sp_cls)) + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + sp_cls = c_cls; + } + else + { + /* It's surely not the first */ + brks[posCurSt - 1] = WORDBREAK_NOBREAK; + /* "inherit" the previous class. */ + c_cls = p_cls; + } + break; + + case WBP_Katakana: + if ((sp_cls == WBP_Katakana) || /* WB13 */ + (sp_cls == WBP_ExtendNumLet)) /* WB13b */ + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_NOBREAK, + get_next_char); + } + /* No rule found, reset */ + else + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + } + sp_cls = c_cls; + posLast = posCurSt; + break; + + case WBP_ALetter: + if ((sp_cls == WBP_ALetter) || /* WB5,6,7 */ + ((sp_cls == WBP_Numeric) && (p_cls == WBP_Numeric)) || /* WB10 */ + (sp_cls == WBP_ExtendNumLet)) /* WB13b */ + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_NOBREAK, + get_next_char); + } + /* No rule found, reset */ + else + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + } + sp_cls = c_cls; + posLast = posCurSt; + break; + + case WBP_MidNumLet: + if ((p_cls == WBP_ALetter) || /* WBP6,7 */ + (p_cls == WBP_Numeric)) /* WBP11,12 */ + { + /* Go on */ + } + else + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + sp_cls = c_cls; + posLast = posCurSt; + } + break; + + case WBP_MidLetter: + if (p_cls == WBP_ALetter) /* WBP6,7 */ + { + /* Go on */ + } + else + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + sp_cls = c_cls; + posLast = posCurSt; + } + break; + + case WBP_MidNum: + if (p_cls == WBP_Numeric) /* WBP11,12 */ + { + /* Go on */ + } + else + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + sp_cls = c_cls; + posLast = posCurSt; + } + break; + + case WBP_Numeric: + if ((sp_cls == WBP_Numeric) || /* WB8,11,12 */ + ((sp_cls == WBP_ALetter) && (p_cls == WBP_ALetter)) || /* WB9 */ + (sp_cls == WBP_ExtendNumLet)) /* WB13b */ + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_NOBREAK, + get_next_char); + } + /* No rule found, reset */ + else + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + } + sp_cls = c_cls; + posLast = posCurSt; + break; + + case WBP_ExtendNumLet: + /* WB13a,13b */ + if ((sp_cls == p_cls) && + ((p_cls == WBP_ALetter) || + (p_cls == WBP_Numeric) || + (p_cls == WBP_Katakana) || + (p_cls == WBP_ExtendNumLet))) + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_NOBREAK, + get_next_char); + } + /* No rule found, reset */ + else + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + } + sp_cls = c_cls; + posLast = posCurSt; + break; + + case WBP_Any: + /* Allow breaks and reset */ + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + sp_cls = c_cls; + posLast = posCurSt; + break; + + default: + /* Error, should never get here! */ + assert(0); + break; + } + + p_cls = c_cls; + posCurSt = posCur; + ch = get_next_char(s, len, &posCur); + } + + /* WB2 */ + set_brks_to(s, brks, posLast, posCur, len, WORDBREAK_BREAK, + get_next_char); +} + +/** + * Sets the word breaking information for a UTF-8 input string. + * + * @param[in] s input UTF-8 string + * @param[in] len length of the input + * @param[in] lang language of the input + * @param[out] brks pointer to the output breaking data, containing + * #WORDBREAK_BREAK, #WORDBREAK_NOBREAK, or + * #WORDBREAK_INSIDEACHAR + */ +void set_wordbreaks_utf8( + const utf8_t *s, + size_t len, + const char *lang, + char *brks) +{ + set_wordbreaks(s, len, lang, brks, + (get_next_char_t)lb_get_next_char_utf8); +} + +/** + * Sets the word breaking information for a UTF-16 input string. + * + * @param[in] s input UTF-16 string + * @param[in] len length of the input + * @param[in] lang language of the input + * @param[out] brks pointer to the output breaking data, containing + * #WORDBREAK_BREAK, #WORDBREAK_NOBREAK, or + * #WORDBREAK_INSIDEACHAR + */ +void set_wordbreaks_utf16( + const utf16_t *s, + size_t len, + const char *lang, + char *brks) +{ + set_wordbreaks(s, len, lang, brks, + (get_next_char_t)lb_get_next_char_utf16); +} + +/** + * Sets the word breaking information for a UTF-32 input string. + * + * @param[in] s input UTF-32 string + * @param[in] len length of the input + * @param[in] lang language of the input + * @param[out] brks pointer to the output breaking data, containing + * #WORDBREAK_BREAK, #WORDBREAK_NOBREAK, or + * #WORDBREAK_INSIDEACHAR + */ +void set_wordbreaks_utf32( + const utf32_t *s, + size_t len, + const char *lang, + char *brks) +{ + set_wordbreaks(s, len, lang, brks, + (get_next_char_t)lb_get_next_char_utf32); +} diff --git a/libraries/evas/src/static_deps/liblinebreak/wordbreak.h b/libraries/evas/src/static_deps/liblinebreak/wordbreak.h new file mode 100644 index 0000000..7b7bea7 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/wordbreak.h @@ -0,0 +1,72 @@ +/* vim: set tabstop=4 shiftwidth=4: */ + +/* + * Word breaking in a Unicode sequence. Designed to be used in a + * generic text renderer. + * + * Copyright (C) 2011-2011 Tom Hacohen + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the author be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute + * it freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must + * not claim that you wrote the original software. If you use this + * software in a product, an acknowledgement in the product + * documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must + * not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source + * distribution. + * + * The main reference is Unicode Standard Annex 29 (UAX #29): + * + * + * When this library was designed, this annex was at Revision 17, for + * Unicode 6.0.0: + * + * + * The Unicode Terms of Use are available at + * + */ + +/** + * @file wordbreak.h + * + * Header file for the word breaking (segmentation) algorithm. + * + * @version 2.0, 2011/12/12 + * @author Tom Hacohen + */ + +#ifndef WORDBREAK_H +#define WORDBREAK_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define WORDBREAK_BREAK 0 /* Break found */ +#define WORDBREAK_NOBREAK 1 /**< Break not found */ +#define WORDBREAK_INSIDECHAR 2 /**< A UTF-8/16 sequence is unfinished */ + +void init_wordbreak(void); +void set_wordbreaks_utf8( + const utf8_t *s, size_t len, const char* lang, char *brks); +void set_wordbreaks_utf16( + const utf16_t *s, size_t len, const char* lang, char *brks); +void set_wordbreaks_utf32( + const utf32_t *s, size_t len, const char* lang, char *brks); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/libraries/evas/src/static_deps/liblinebreak/wordbreakdata.x b/libraries/evas/src/static_deps/liblinebreak/wordbreakdata.x new file mode 100644 index 0000000..c7278ef --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/wordbreakdata.x @@ -0,0 +1,858 @@ +/* The content of this file is generated from: +# WordBreakProperty-6.0.0.txt +# Date: 2010-08-19, 00:48:48 GMT [MD] +*/ +#include "linebreak.h" +#include "wordbreakdef.h" +static struct WordBreakProperties wb_prop_default[] = { + {0x000A, 0x000A, WBP_LF}, + {0x000B, 0x000C, WBP_Newline}, + {0x000D, 0x000D, WBP_CR}, + {0x0027, 0x0027, WBP_MidNumLet}, + {0x002C, 0x002C, WBP_MidNum}, + {0x002E, 0x002E, WBP_MidNumLet}, + {0x0030, 0x0039, WBP_Numeric}, + {0x003A, 0x003A, WBP_MidLetter}, + {0x003B, 0x003B, WBP_MidNum}, + {0x0041, 0x005A, WBP_ALetter}, + {0x005F, 0x005F, WBP_ExtendNumLet}, + {0x0061, 0x007A, WBP_ALetter}, + {0x0085, 0x0085, WBP_Newline}, + {0x00AA, 0x00AA, WBP_ALetter}, + {0x00AD, 0x00AD, WBP_Format}, + {0x00B5, 0x00B5, WBP_ALetter}, + {0x00B7, 0x00B7, WBP_MidLetter}, + {0x00BA, 0x00BA, WBP_ALetter}, + {0x00C0, 0x00D6, WBP_ALetter}, + {0x00D8, 0x00F6, WBP_ALetter}, + {0x00F8, 0x01BA, WBP_ALetter}, + {0x01BB, 0x01BB, WBP_ALetter}, + {0x01BC, 0x01BF, WBP_ALetter}, + {0x01C0, 0x01C3, WBP_ALetter}, + {0x01C4, 0x0293, WBP_ALetter}, + {0x0294, 0x0294, WBP_ALetter}, + {0x0295, 0x02AF, WBP_ALetter}, + {0x02B0, 0x02C1, WBP_ALetter}, + {0x02C6, 0x02D1, WBP_ALetter}, + {0x02E0, 0x02E4, WBP_ALetter}, + {0x02EC, 0x02EC, WBP_ALetter}, + {0x02EE, 0x02EE, WBP_ALetter}, + {0x0300, 0x036F, WBP_Extend}, + {0x0370, 0x0373, WBP_ALetter}, + {0x0374, 0x0374, WBP_ALetter}, + {0x0376, 0x0377, WBP_ALetter}, + {0x037A, 0x037A, WBP_ALetter}, + {0x037B, 0x037D, WBP_ALetter}, + {0x037E, 0x037E, WBP_MidNum}, + {0x0386, 0x0386, WBP_ALetter}, + {0x0387, 0x0387, WBP_MidLetter}, + {0x0388, 0x038A, WBP_ALetter}, + {0x038C, 0x038C, WBP_ALetter}, + {0x038E, 0x03A1, WBP_ALetter}, + {0x03A3, 0x03F5, WBP_ALetter}, + {0x03F7, 0x0481, WBP_ALetter}, + {0x0483, 0x0487, WBP_Extend}, + {0x0488, 0x0489, WBP_Extend}, + {0x048A, 0x0527, WBP_ALetter}, + {0x0531, 0x0556, WBP_ALetter}, + {0x0559, 0x0559, WBP_ALetter}, + {0x0561, 0x0587, WBP_ALetter}, + {0x0589, 0x0589, WBP_MidNum}, + {0x0591, 0x05BD, WBP_Extend}, + {0x05BF, 0x05BF, WBP_Extend}, + {0x05C1, 0x05C2, WBP_Extend}, + {0x05C4, 0x05C5, WBP_Extend}, + {0x05C7, 0x05C7, WBP_Extend}, + {0x05D0, 0x05EA, WBP_ALetter}, + {0x05F0, 0x05F2, WBP_ALetter}, + {0x05F3, 0x05F3, WBP_ALetter}, + {0x05F4, 0x05F4, WBP_MidLetter}, + {0x0600, 0x0603, WBP_Format}, + {0x060C, 0x060D, WBP_MidNum}, + {0x0610, 0x061A, WBP_Extend}, + {0x0620, 0x063F, WBP_ALetter}, + {0x0640, 0x0640, WBP_ALetter}, + {0x0641, 0x064A, WBP_ALetter}, + {0x064B, 0x065F, WBP_Extend}, + {0x0660, 0x0669, WBP_Numeric}, + {0x066B, 0x066B, WBP_Numeric}, + {0x066C, 0x066C, WBP_MidNum}, + {0x066E, 0x066F, WBP_ALetter}, + {0x0670, 0x0670, WBP_Extend}, + {0x0671, 0x06D3, WBP_ALetter}, + {0x06D5, 0x06D5, WBP_ALetter}, + {0x06D6, 0x06DC, WBP_Extend}, + {0x06DD, 0x06DD, WBP_Format}, + {0x06DF, 0x06E4, WBP_Extend}, + {0x06E5, 0x06E6, WBP_ALetter}, + {0x06E7, 0x06E8, WBP_Extend}, + {0x06EA, 0x06ED, WBP_Extend}, + {0x06EE, 0x06EF, WBP_ALetter}, + {0x06F0, 0x06F9, WBP_Numeric}, + {0x06FA, 0x06FC, WBP_ALetter}, + {0x06FF, 0x06FF, WBP_ALetter}, + {0x070F, 0x070F, WBP_Format}, + {0x0710, 0x0710, WBP_ALetter}, + {0x0711, 0x0711, WBP_Extend}, + {0x0712, 0x072F, WBP_ALetter}, + {0x0730, 0x074A, WBP_Extend}, + {0x074D, 0x07A5, WBP_ALetter}, + {0x07A6, 0x07B0, WBP_Extend}, + {0x07B1, 0x07B1, WBP_ALetter}, + {0x07C0, 0x07C9, WBP_Numeric}, + {0x07CA, 0x07EA, WBP_ALetter}, + {0x07EB, 0x07F3, WBP_Extend}, + {0x07F4, 0x07F5, WBP_ALetter}, + {0x07F8, 0x07F8, WBP_MidNum}, + {0x07FA, 0x07FA, WBP_ALetter}, + {0x0800, 0x0815, WBP_ALetter}, + {0x0816, 0x0819, WBP_Extend}, + {0x081A, 0x081A, WBP_ALetter}, + {0x081B, 0x0823, WBP_Extend}, + {0x0824, 0x0824, WBP_ALetter}, + {0x0825, 0x0827, WBP_Extend}, + {0x0828, 0x0828, WBP_ALetter}, + {0x0829, 0x082D, WBP_Extend}, + {0x0840, 0x0858, WBP_ALetter}, + {0x0859, 0x085B, WBP_Extend}, + {0x0900, 0x0902, WBP_Extend}, + {0x0903, 0x0903, WBP_Extend}, + {0x0904, 0x0939, WBP_ALetter}, + {0x093A, 0x093A, WBP_Extend}, + {0x093B, 0x093B, WBP_Extend}, + {0x093C, 0x093C, WBP_Extend}, + {0x093D, 0x093D, WBP_ALetter}, + {0x093E, 0x0940, WBP_Extend}, + {0x0941, 0x0948, WBP_Extend}, + {0x0949, 0x094C, WBP_Extend}, + {0x094D, 0x094D, WBP_Extend}, + {0x094E, 0x094F, WBP_Extend}, + {0x0950, 0x0950, WBP_ALetter}, + {0x0951, 0x0957, WBP_Extend}, + {0x0958, 0x0961, WBP_ALetter}, + {0x0962, 0x0963, WBP_Extend}, + {0x0966, 0x096F, WBP_Numeric}, + {0x0971, 0x0971, WBP_ALetter}, + {0x0972, 0x0977, WBP_ALetter}, + {0x0979, 0x097F, WBP_ALetter}, + {0x0981, 0x0981, WBP_Extend}, + {0x0982, 0x0983, WBP_Extend}, + {0x0985, 0x098C, WBP_ALetter}, + {0x098F, 0x0990, WBP_ALetter}, + {0x0993, 0x09A8, WBP_ALetter}, + {0x09AA, 0x09B0, WBP_ALetter}, + {0x09B2, 0x09B2, WBP_ALetter}, + {0x09B6, 0x09B9, WBP_ALetter}, + {0x09BC, 0x09BC, WBP_Extend}, + {0x09BD, 0x09BD, WBP_ALetter}, + {0x09BE, 0x09C0, WBP_Extend}, + {0x09C1, 0x09C4, WBP_Extend}, + {0x09C7, 0x09C8, WBP_Extend}, + {0x09CB, 0x09CC, WBP_Extend}, + {0x09CD, 0x09CD, WBP_Extend}, + {0x09CE, 0x09CE, WBP_ALetter}, + {0x09D7, 0x09D7, WBP_Extend}, + {0x09DC, 0x09DD, WBP_ALetter}, + {0x09DF, 0x09E1, WBP_ALetter}, + {0x09E2, 0x09E3, WBP_Extend}, + {0x09E6, 0x09EF, WBP_Numeric}, + {0x09F0, 0x09F1, WBP_ALetter}, + {0x0A01, 0x0A02, WBP_Extend}, + {0x0A03, 0x0A03, WBP_Extend}, + {0x0A05, 0x0A0A, WBP_ALetter}, + {0x0A0F, 0x0A10, WBP_ALetter}, + {0x0A13, 0x0A28, WBP_ALetter}, + {0x0A2A, 0x0A30, WBP_ALetter}, + {0x0A32, 0x0A33, WBP_ALetter}, + {0x0A35, 0x0A36, WBP_ALetter}, + {0x0A38, 0x0A39, WBP_ALetter}, + {0x0A3C, 0x0A3C, WBP_Extend}, + {0x0A3E, 0x0A40, WBP_Extend}, + {0x0A41, 0x0A42, WBP_Extend}, + {0x0A47, 0x0A48, WBP_Extend}, + {0x0A4B, 0x0A4D, WBP_Extend}, + {0x0A51, 0x0A51, WBP_Extend}, + {0x0A59, 0x0A5C, WBP_ALetter}, + {0x0A5E, 0x0A5E, WBP_ALetter}, + {0x0A66, 0x0A6F, WBP_Numeric}, + {0x0A70, 0x0A71, WBP_Extend}, + {0x0A72, 0x0A74, WBP_ALetter}, + {0x0A75, 0x0A75, WBP_Extend}, + {0x0A81, 0x0A82, WBP_Extend}, + {0x0A83, 0x0A83, WBP_Extend}, + {0x0A85, 0x0A8D, WBP_ALetter}, + {0x0A8F, 0x0A91, WBP_ALetter}, + {0x0A93, 0x0AA8, WBP_ALetter}, + {0x0AAA, 0x0AB0, WBP_ALetter}, + {0x0AB2, 0x0AB3, WBP_ALetter}, + {0x0AB5, 0x0AB9, WBP_ALetter}, + {0x0ABC, 0x0ABC, WBP_Extend}, + {0x0ABD, 0x0ABD, WBP_ALetter}, + {0x0ABE, 0x0AC0, WBP_Extend}, + {0x0AC1, 0x0AC5, WBP_Extend}, + {0x0AC7, 0x0AC8, WBP_Extend}, + {0x0AC9, 0x0AC9, WBP_Extend}, + {0x0ACB, 0x0ACC, WBP_Extend}, + {0x0ACD, 0x0ACD, WBP_Extend}, + {0x0AD0, 0x0AD0, WBP_ALetter}, + {0x0AE0, 0x0AE1, WBP_ALetter}, + {0x0AE2, 0x0AE3, WBP_Extend}, + {0x0AE6, 0x0AEF, WBP_Numeric}, + {0x0B01, 0x0B01, WBP_Extend}, + {0x0B02, 0x0B03, WBP_Extend}, + {0x0B05, 0x0B0C, WBP_ALetter}, + {0x0B0F, 0x0B10, WBP_ALetter}, + {0x0B13, 0x0B28, WBP_ALetter}, + {0x0B2A, 0x0B30, WBP_ALetter}, + {0x0B32, 0x0B33, WBP_ALetter}, + {0x0B35, 0x0B39, WBP_ALetter}, + {0x0B3C, 0x0B3C, WBP_Extend}, + {0x0B3D, 0x0B3D, WBP_ALetter}, + {0x0B3E, 0x0B3E, WBP_Extend}, + {0x0B3F, 0x0B3F, WBP_Extend}, + {0x0B40, 0x0B40, WBP_Extend}, + {0x0B41, 0x0B44, WBP_Extend}, + {0x0B47, 0x0B48, WBP_Extend}, + {0x0B4B, 0x0B4C, WBP_Extend}, + {0x0B4D, 0x0B4D, WBP_Extend}, + {0x0B56, 0x0B56, WBP_Extend}, + {0x0B57, 0x0B57, WBP_Extend}, + {0x0B5C, 0x0B5D, WBP_ALetter}, + {0x0B5F, 0x0B61, WBP_ALetter}, + {0x0B62, 0x0B63, WBP_Extend}, + {0x0B66, 0x0B6F, WBP_Numeric}, + {0x0B71, 0x0B71, WBP_ALetter}, + {0x0B82, 0x0B82, WBP_Extend}, + {0x0B83, 0x0B83, WBP_ALetter}, + {0x0B85, 0x0B8A, WBP_ALetter}, + {0x0B8E, 0x0B90, WBP_ALetter}, + {0x0B92, 0x0B95, WBP_ALetter}, + {0x0B99, 0x0B9A, WBP_ALetter}, + {0x0B9C, 0x0B9C, WBP_ALetter}, + {0x0B9E, 0x0B9F, WBP_ALetter}, + {0x0BA3, 0x0BA4, WBP_ALetter}, + {0x0BA8, 0x0BAA, WBP_ALetter}, + {0x0BAE, 0x0BB9, WBP_ALetter}, + {0x0BBE, 0x0BBF, WBP_Extend}, + {0x0BC0, 0x0BC0, WBP_Extend}, + {0x0BC1, 0x0BC2, WBP_Extend}, + {0x0BC6, 0x0BC8, WBP_Extend}, + {0x0BCA, 0x0BCC, WBP_Extend}, + {0x0BCD, 0x0BCD, WBP_Extend}, + {0x0BD0, 0x0BD0, WBP_ALetter}, + {0x0BD7, 0x0BD7, WBP_Extend}, + {0x0BE6, 0x0BEF, WBP_Numeric}, + {0x0C01, 0x0C03, WBP_Extend}, + {0x0C05, 0x0C0C, WBP_ALetter}, + {0x0C0E, 0x0C10, WBP_ALetter}, + {0x0C12, 0x0C28, WBP_ALetter}, + {0x0C2A, 0x0C33, WBP_ALetter}, + {0x0C35, 0x0C39, WBP_ALetter}, + {0x0C3D, 0x0C3D, WBP_ALetter}, + {0x0C3E, 0x0C40, WBP_Extend}, + {0x0C41, 0x0C44, WBP_Extend}, + {0x0C46, 0x0C48, WBP_Extend}, + {0x0C4A, 0x0C4D, WBP_Extend}, + {0x0C55, 0x0C56, WBP_Extend}, + {0x0C58, 0x0C59, WBP_ALetter}, + {0x0C60, 0x0C61, WBP_ALetter}, + {0x0C62, 0x0C63, WBP_Extend}, + {0x0C66, 0x0C6F, WBP_Numeric}, + {0x0C82, 0x0C83, WBP_Extend}, + {0x0C85, 0x0C8C, WBP_ALetter}, + {0x0C8E, 0x0C90, WBP_ALetter}, + {0x0C92, 0x0CA8, WBP_ALetter}, + {0x0CAA, 0x0CB3, WBP_ALetter}, + {0x0CB5, 0x0CB9, WBP_ALetter}, + {0x0CBC, 0x0CBC, WBP_Extend}, + {0x0CBD, 0x0CBD, WBP_ALetter}, + {0x0CBE, 0x0CBE, WBP_Extend}, + {0x0CBF, 0x0CBF, WBP_Extend}, + {0x0CC0, 0x0CC4, WBP_Extend}, + {0x0CC6, 0x0CC6, WBP_Extend}, + {0x0CC7, 0x0CC8, WBP_Extend}, + {0x0CCA, 0x0CCB, WBP_Extend}, + {0x0CCC, 0x0CCD, WBP_Extend}, + {0x0CD5, 0x0CD6, WBP_Extend}, + {0x0CDE, 0x0CDE, WBP_ALetter}, + {0x0CE0, 0x0CE1, WBP_ALetter}, + {0x0CE2, 0x0CE3, WBP_Extend}, + {0x0CE6, 0x0CEF, WBP_Numeric}, + {0x0CF1, 0x0CF2, WBP_ALetter}, + {0x0D02, 0x0D03, WBP_Extend}, + {0x0D05, 0x0D0C, WBP_ALetter}, + {0x0D0E, 0x0D10, WBP_ALetter}, + {0x0D12, 0x0D3A, WBP_ALetter}, + {0x0D3D, 0x0D3D, WBP_ALetter}, + {0x0D3E, 0x0D40, WBP_Extend}, + {0x0D41, 0x0D44, WBP_Extend}, + {0x0D46, 0x0D48, WBP_Extend}, + {0x0D4A, 0x0D4C, WBP_Extend}, + {0x0D4D, 0x0D4D, WBP_Extend}, + {0x0D4E, 0x0D4E, WBP_ALetter}, + {0x0D57, 0x0D57, WBP_Extend}, + {0x0D60, 0x0D61, WBP_ALetter}, + {0x0D62, 0x0D63, WBP_Extend}, + {0x0D66, 0x0D6F, WBP_Numeric}, + {0x0D7A, 0x0D7F, WBP_ALetter}, + {0x0D82, 0x0D83, WBP_Extend}, + {0x0D85, 0x0D96, WBP_ALetter}, + {0x0D9A, 0x0DB1, WBP_ALetter}, + {0x0DB3, 0x0DBB, WBP_ALetter}, + {0x0DBD, 0x0DBD, WBP_ALetter}, + {0x0DC0, 0x0DC6, WBP_ALetter}, + {0x0DCA, 0x0DCA, WBP_Extend}, + {0x0DCF, 0x0DD1, WBP_Extend}, + {0x0DD2, 0x0DD4, WBP_Extend}, + {0x0DD6, 0x0DD6, WBP_Extend}, + {0x0DD8, 0x0DDF, WBP_Extend}, + {0x0DF2, 0x0DF3, WBP_Extend}, + {0x0E31, 0x0E31, WBP_Extend}, + {0x0E34, 0x0E3A, WBP_Extend}, + {0x0E47, 0x0E4E, WBP_Extend}, + {0x0E50, 0x0E59, WBP_Numeric}, + {0x0EB1, 0x0EB1, WBP_Extend}, + {0x0EB4, 0x0EB9, WBP_Extend}, + {0x0EBB, 0x0EBC, WBP_Extend}, + {0x0EC8, 0x0ECD, WBP_Extend}, + {0x0ED0, 0x0ED9, WBP_Numeric}, + {0x0F00, 0x0F00, WBP_ALetter}, + {0x0F18, 0x0F19, WBP_Extend}, + {0x0F20, 0x0F29, WBP_Numeric}, + {0x0F35, 0x0F35, WBP_Extend}, + {0x0F37, 0x0F37, WBP_Extend}, + {0x0F39, 0x0F39, WBP_Extend}, + {0x0F3E, 0x0F3F, WBP_Extend}, + {0x0F40, 0x0F47, WBP_ALetter}, + {0x0F49, 0x0F6C, WBP_ALetter}, + {0x0F71, 0x0F7E, WBP_Extend}, + {0x0F7F, 0x0F7F, WBP_Extend}, + {0x0F80, 0x0F84, WBP_Extend}, + {0x0F86, 0x0F87, WBP_Extend}, + {0x0F88, 0x0F8C, WBP_ALetter}, + {0x0F8D, 0x0F97, WBP_Extend}, + {0x0F99, 0x0FBC, WBP_Extend}, + {0x0FC6, 0x0FC6, WBP_Extend}, + {0x102B, 0x102C, WBP_Extend}, + {0x102D, 0x1030, WBP_Extend}, + {0x1031, 0x1031, WBP_Extend}, + {0x1032, 0x1037, WBP_Extend}, + {0x1038, 0x1038, WBP_Extend}, + {0x1039, 0x103A, WBP_Extend}, + {0x103B, 0x103C, WBP_Extend}, + {0x103D, 0x103E, WBP_Extend}, + {0x1040, 0x1049, WBP_Numeric}, + {0x1056, 0x1057, WBP_Extend}, + {0x1058, 0x1059, WBP_Extend}, + {0x105E, 0x1060, WBP_Extend}, + {0x1062, 0x1064, WBP_Extend}, + {0x1067, 0x106D, WBP_Extend}, + {0x1071, 0x1074, WBP_Extend}, + {0x1082, 0x1082, WBP_Extend}, + {0x1083, 0x1084, WBP_Extend}, + {0x1085, 0x1086, WBP_Extend}, + {0x1087, 0x108C, WBP_Extend}, + {0x108D, 0x108D, WBP_Extend}, + {0x108F, 0x108F, WBP_Extend}, + {0x1090, 0x1099, WBP_Numeric}, + {0x109A, 0x109C, WBP_Extend}, + {0x109D, 0x109D, WBP_Extend}, + {0x10A0, 0x10C5, WBP_ALetter}, + {0x10D0, 0x10FA, WBP_ALetter}, + {0x10FC, 0x10FC, WBP_ALetter}, + {0x1100, 0x1248, WBP_ALetter}, + {0x124A, 0x124D, WBP_ALetter}, + {0x1250, 0x1256, WBP_ALetter}, + {0x1258, 0x1258, WBP_ALetter}, + {0x125A, 0x125D, WBP_ALetter}, + {0x1260, 0x1288, WBP_ALetter}, + {0x128A, 0x128D, WBP_ALetter}, + {0x1290, 0x12B0, WBP_ALetter}, + {0x12B2, 0x12B5, WBP_ALetter}, + {0x12B8, 0x12BE, WBP_ALetter}, + {0x12C0, 0x12C0, WBP_ALetter}, + {0x12C2, 0x12C5, WBP_ALetter}, + {0x12C8, 0x12D6, WBP_ALetter}, + {0x12D8, 0x1310, WBP_ALetter}, + {0x1312, 0x1315, WBP_ALetter}, + {0x1318, 0x135A, WBP_ALetter}, + {0x135D, 0x135F, WBP_Extend}, + {0x1380, 0x138F, WBP_ALetter}, + {0x13A0, 0x13F4, WBP_ALetter}, + {0x1401, 0x166C, WBP_ALetter}, + {0x166F, 0x167F, WBP_ALetter}, + {0x1681, 0x169A, WBP_ALetter}, + {0x16A0, 0x16EA, WBP_ALetter}, + {0x16EE, 0x16F0, WBP_ALetter}, + {0x1700, 0x170C, WBP_ALetter}, + {0x170E, 0x1711, WBP_ALetter}, + {0x1712, 0x1714, WBP_Extend}, + {0x1720, 0x1731, WBP_ALetter}, + {0x1732, 0x1734, WBP_Extend}, + {0x1740, 0x1751, WBP_ALetter}, + {0x1752, 0x1753, WBP_Extend}, + {0x1760, 0x176C, WBP_ALetter}, + {0x176E, 0x1770, WBP_ALetter}, + {0x1772, 0x1773, WBP_Extend}, + {0x17B4, 0x17B5, WBP_Format}, + {0x17B6, 0x17B6, WBP_Extend}, + {0x17B7, 0x17BD, WBP_Extend}, + {0x17BE, 0x17C5, WBP_Extend}, + {0x17C6, 0x17C6, WBP_Extend}, + {0x17C7, 0x17C8, WBP_Extend}, + {0x17C9, 0x17D3, WBP_Extend}, + {0x17DD, 0x17DD, WBP_Extend}, + {0x17E0, 0x17E9, WBP_Numeric}, + {0x180B, 0x180D, WBP_Extend}, + {0x1810, 0x1819, WBP_Numeric}, + {0x1820, 0x1842, WBP_ALetter}, + {0x1843, 0x1843, WBP_ALetter}, + {0x1844, 0x1877, WBP_ALetter}, + {0x1880, 0x18A8, WBP_ALetter}, + {0x18A9, 0x18A9, WBP_Extend}, + {0x18AA, 0x18AA, WBP_ALetter}, + {0x18B0, 0x18F5, WBP_ALetter}, + {0x1900, 0x191C, WBP_ALetter}, + {0x1920, 0x1922, WBP_Extend}, + {0x1923, 0x1926, WBP_Extend}, + {0x1927, 0x1928, WBP_Extend}, + {0x1929, 0x192B, WBP_Extend}, + {0x1930, 0x1931, WBP_Extend}, + {0x1932, 0x1932, WBP_Extend}, + {0x1933, 0x1938, WBP_Extend}, + {0x1939, 0x193B, WBP_Extend}, + {0x1946, 0x194F, WBP_Numeric}, + {0x19B0, 0x19C0, WBP_Extend}, + {0x19C8, 0x19C9, WBP_Extend}, + {0x19D0, 0x19D9, WBP_Numeric}, + {0x1A00, 0x1A16, WBP_ALetter}, + {0x1A17, 0x1A18, WBP_Extend}, + {0x1A19, 0x1A1B, WBP_Extend}, + {0x1A55, 0x1A55, WBP_Extend}, + {0x1A56, 0x1A56, WBP_Extend}, + {0x1A57, 0x1A57, WBP_Extend}, + {0x1A58, 0x1A5E, WBP_Extend}, + {0x1A60, 0x1A60, WBP_Extend}, + {0x1A61, 0x1A61, WBP_Extend}, + {0x1A62, 0x1A62, WBP_Extend}, + {0x1A63, 0x1A64, WBP_Extend}, + {0x1A65, 0x1A6C, WBP_Extend}, + {0x1A6D, 0x1A72, WBP_Extend}, + {0x1A73, 0x1A7C, WBP_Extend}, + {0x1A7F, 0x1A7F, WBP_Extend}, + {0x1A80, 0x1A89, WBP_Numeric}, + {0x1A90, 0x1A99, WBP_Numeric}, + {0x1B00, 0x1B03, WBP_Extend}, + {0x1B04, 0x1B04, WBP_Extend}, + {0x1B05, 0x1B33, WBP_ALetter}, + {0x1B34, 0x1B34, WBP_Extend}, + {0x1B35, 0x1B35, WBP_Extend}, + {0x1B36, 0x1B3A, WBP_Extend}, + {0x1B3B, 0x1B3B, WBP_Extend}, + {0x1B3C, 0x1B3C, WBP_Extend}, + {0x1B3D, 0x1B41, WBP_Extend}, + {0x1B42, 0x1B42, WBP_Extend}, + {0x1B43, 0x1B44, WBP_Extend}, + {0x1B45, 0x1B4B, WBP_ALetter}, + {0x1B50, 0x1B59, WBP_Numeric}, + {0x1B6B, 0x1B73, WBP_Extend}, + {0x1B80, 0x1B81, WBP_Extend}, + {0x1B82, 0x1B82, WBP_Extend}, + {0x1B83, 0x1BA0, WBP_ALetter}, + {0x1BA1, 0x1BA1, WBP_Extend}, + {0x1BA2, 0x1BA5, WBP_Extend}, + {0x1BA6, 0x1BA7, WBP_Extend}, + {0x1BA8, 0x1BA9, WBP_Extend}, + {0x1BAA, 0x1BAA, WBP_Extend}, + {0x1BAE, 0x1BAF, WBP_ALetter}, + {0x1BB0, 0x1BB9, WBP_Numeric}, + {0x1BC0, 0x1BE5, WBP_ALetter}, + {0x1BE6, 0x1BE6, WBP_Extend}, + {0x1BE7, 0x1BE7, WBP_Extend}, + {0x1BE8, 0x1BE9, WBP_Extend}, + {0x1BEA, 0x1BEC, WBP_Extend}, + {0x1BED, 0x1BED, WBP_Extend}, + {0x1BEE, 0x1BEE, WBP_Extend}, + {0x1BEF, 0x1BF1, WBP_Extend}, + {0x1BF2, 0x1BF3, WBP_Extend}, + {0x1C00, 0x1C23, WBP_ALetter}, + {0x1C24, 0x1C2B, WBP_Extend}, + {0x1C2C, 0x1C33, WBP_Extend}, + {0x1C34, 0x1C35, WBP_Extend}, + {0x1C36, 0x1C37, WBP_Extend}, + {0x1C40, 0x1C49, WBP_Numeric}, + {0x1C4D, 0x1C4F, WBP_ALetter}, + {0x1C50, 0x1C59, WBP_Numeric}, + {0x1C5A, 0x1C77, WBP_ALetter}, + {0x1C78, 0x1C7D, WBP_ALetter}, + {0x1CD0, 0x1CD2, WBP_Extend}, + {0x1CD4, 0x1CE0, WBP_Extend}, + {0x1CE1, 0x1CE1, WBP_Extend}, + {0x1CE2, 0x1CE8, WBP_Extend}, + {0x1CE9, 0x1CEC, WBP_ALetter}, + {0x1CED, 0x1CED, WBP_Extend}, + {0x1CEE, 0x1CF1, WBP_ALetter}, + {0x1CF2, 0x1CF2, WBP_Extend}, + {0x1D00, 0x1D2B, WBP_ALetter}, + {0x1D2C, 0x1D61, WBP_ALetter}, + {0x1D62, 0x1D77, WBP_ALetter}, + {0x1D78, 0x1D78, WBP_ALetter}, + {0x1D79, 0x1D9A, WBP_ALetter}, + {0x1D9B, 0x1DBF, WBP_ALetter}, + {0x1DC0, 0x1DE6, WBP_Extend}, + {0x1DFC, 0x1DFF, WBP_Extend}, + {0x1E00, 0x1F15, WBP_ALetter}, + {0x1F18, 0x1F1D, WBP_ALetter}, + {0x1F20, 0x1F45, WBP_ALetter}, + {0x1F48, 0x1F4D, WBP_ALetter}, + {0x1F50, 0x1F57, WBP_ALetter}, + {0x1F59, 0x1F59, WBP_ALetter}, + {0x1F5B, 0x1F5B, WBP_ALetter}, + {0x1F5D, 0x1F5D, WBP_ALetter}, + {0x1F5F, 0x1F7D, WBP_ALetter}, + {0x1F80, 0x1FB4, WBP_ALetter}, + {0x1FB6, 0x1FBC, WBP_ALetter}, + {0x1FBE, 0x1FBE, WBP_ALetter}, + {0x1FC2, 0x1FC4, WBP_ALetter}, + {0x1FC6, 0x1FCC, WBP_ALetter}, + {0x1FD0, 0x1FD3, WBP_ALetter}, + {0x1FD6, 0x1FDB, WBP_ALetter}, + {0x1FE0, 0x1FEC, WBP_ALetter}, + {0x1FF2, 0x1FF4, WBP_ALetter}, + {0x1FF6, 0x1FFC, WBP_ALetter}, + {0x200C, 0x200D, WBP_Extend}, + {0x200E, 0x200F, WBP_Format}, + {0x2018, 0x2018, WBP_MidNumLet}, + {0x2019, 0x2019, WBP_MidNumLet}, + {0x2024, 0x2024, WBP_MidNumLet}, + {0x2027, 0x2027, WBP_MidLetter}, + {0x2028, 0x2028, WBP_Newline}, + {0x2029, 0x2029, WBP_Newline}, + {0x202A, 0x202E, WBP_Format}, + {0x203F, 0x2040, WBP_ExtendNumLet}, + {0x2044, 0x2044, WBP_MidNum}, + {0x2054, 0x2054, WBP_ExtendNumLet}, + {0x2060, 0x2064, WBP_Format}, + {0x206A, 0x206F, WBP_Format}, + {0x2071, 0x2071, WBP_ALetter}, + {0x207F, 0x207F, WBP_ALetter}, + {0x2090, 0x209C, WBP_ALetter}, + {0x20D0, 0x20DC, WBP_Extend}, + {0x20DD, 0x20E0, WBP_Extend}, + {0x20E1, 0x20E1, WBP_Extend}, + {0x20E2, 0x20E4, WBP_Extend}, + {0x20E5, 0x20F0, WBP_Extend}, + {0x2102, 0x2102, WBP_ALetter}, + {0x2107, 0x2107, WBP_ALetter}, + {0x210A, 0x2113, WBP_ALetter}, + {0x2115, 0x2115, WBP_ALetter}, + {0x2119, 0x211D, WBP_ALetter}, + {0x2124, 0x2124, WBP_ALetter}, + {0x2126, 0x2126, WBP_ALetter}, + {0x2128, 0x2128, WBP_ALetter}, + {0x212A, 0x212D, WBP_ALetter}, + {0x212F, 0x2134, WBP_ALetter}, + {0x2135, 0x2138, WBP_ALetter}, + {0x2139, 0x2139, WBP_ALetter}, + {0x213C, 0x213F, WBP_ALetter}, + {0x2145, 0x2149, WBP_ALetter}, + {0x214E, 0x214E, WBP_ALetter}, + {0x2160, 0x2182, WBP_ALetter}, + {0x2183, 0x2184, WBP_ALetter}, + {0x2185, 0x2188, WBP_ALetter}, + {0x24B6, 0x24E9, WBP_ALetter}, + {0x2C00, 0x2C2E, WBP_ALetter}, + {0x2C30, 0x2C5E, WBP_ALetter}, + {0x2C60, 0x2C7C, WBP_ALetter}, + {0x2C7D, 0x2C7D, WBP_ALetter}, + {0x2C7E, 0x2CE4, WBP_ALetter}, + {0x2CEB, 0x2CEE, WBP_ALetter}, + {0x2CEF, 0x2CF1, WBP_Extend}, + {0x2D00, 0x2D25, WBP_ALetter}, + {0x2D30, 0x2D65, WBP_ALetter}, + {0x2D6F, 0x2D6F, WBP_ALetter}, + {0x2D7F, 0x2D7F, WBP_Extend}, + {0x2D80, 0x2D96, WBP_ALetter}, + {0x2DA0, 0x2DA6, WBP_ALetter}, + {0x2DA8, 0x2DAE, WBP_ALetter}, + {0x2DB0, 0x2DB6, WBP_ALetter}, + {0x2DB8, 0x2DBE, WBP_ALetter}, + {0x2DC0, 0x2DC6, WBP_ALetter}, + {0x2DC8, 0x2DCE, WBP_ALetter}, + {0x2DD0, 0x2DD6, WBP_ALetter}, + {0x2DD8, 0x2DDE, WBP_ALetter}, + {0x2DE0, 0x2DFF, WBP_Extend}, + {0x2E2F, 0x2E2F, WBP_ALetter}, + {0x3005, 0x3005, WBP_ALetter}, + {0x302A, 0x302F, WBP_Extend}, + {0x3031, 0x3035, WBP_Katakana}, + {0x303B, 0x303B, WBP_ALetter}, + {0x303C, 0x303C, WBP_ALetter}, + {0x3099, 0x309A, WBP_Extend}, + {0x309B, 0x309C, WBP_Katakana}, + {0x30A0, 0x30A0, WBP_Katakana}, + {0x30A1, 0x30FA, WBP_Katakana}, + {0x30FC, 0x30FE, WBP_Katakana}, + {0x30FF, 0x30FF, WBP_Katakana}, + {0x3105, 0x312D, WBP_ALetter}, + {0x3131, 0x318E, WBP_ALetter}, + {0x31A0, 0x31BA, WBP_ALetter}, + {0x31F0, 0x31FF, WBP_Katakana}, + {0x32D0, 0x32FE, WBP_Katakana}, + {0x3300, 0x3357, WBP_Katakana}, + {0xA000, 0xA014, WBP_ALetter}, + {0xA015, 0xA015, WBP_ALetter}, + {0xA016, 0xA48C, WBP_ALetter}, + {0xA4D0, 0xA4F7, WBP_ALetter}, + {0xA4F8, 0xA4FD, WBP_ALetter}, + {0xA500, 0xA60B, WBP_ALetter}, + {0xA60C, 0xA60C, WBP_ALetter}, + {0xA610, 0xA61F, WBP_ALetter}, + {0xA620, 0xA629, WBP_Numeric}, + {0xA62A, 0xA62B, WBP_ALetter}, + {0xA640, 0xA66D, WBP_ALetter}, + {0xA66E, 0xA66E, WBP_ALetter}, + {0xA66F, 0xA66F, WBP_Extend}, + {0xA670, 0xA672, WBP_Extend}, + {0xA67C, 0xA67D, WBP_Extend}, + {0xA67F, 0xA67F, WBP_ALetter}, + {0xA680, 0xA697, WBP_ALetter}, + {0xA6A0, 0xA6E5, WBP_ALetter}, + {0xA6E6, 0xA6EF, WBP_ALetter}, + {0xA6F0, 0xA6F1, WBP_Extend}, + {0xA717, 0xA71F, WBP_ALetter}, + {0xA722, 0xA76F, WBP_ALetter}, + {0xA770, 0xA770, WBP_ALetter}, + {0xA771, 0xA787, WBP_ALetter}, + {0xA788, 0xA788, WBP_ALetter}, + {0xA78B, 0xA78E, WBP_ALetter}, + {0xA790, 0xA791, WBP_ALetter}, + {0xA7A0, 0xA7A9, WBP_ALetter}, + {0xA7FA, 0xA7FA, WBP_ALetter}, + {0xA7FB, 0xA801, WBP_ALetter}, + {0xA802, 0xA802, WBP_Extend}, + {0xA803, 0xA805, WBP_ALetter}, + {0xA806, 0xA806, WBP_Extend}, + {0xA807, 0xA80A, WBP_ALetter}, + {0xA80B, 0xA80B, WBP_Extend}, + {0xA80C, 0xA822, WBP_ALetter}, + {0xA823, 0xA824, WBP_Extend}, + {0xA825, 0xA826, WBP_Extend}, + {0xA827, 0xA827, WBP_Extend}, + {0xA840, 0xA873, WBP_ALetter}, + {0xA880, 0xA881, WBP_Extend}, + {0xA882, 0xA8B3, WBP_ALetter}, + {0xA8B4, 0xA8C3, WBP_Extend}, + {0xA8C4, 0xA8C4, WBP_Extend}, + {0xA8D0, 0xA8D9, WBP_Numeric}, + {0xA8E0, 0xA8F1, WBP_Extend}, + {0xA8F2, 0xA8F7, WBP_ALetter}, + {0xA8FB, 0xA8FB, WBP_ALetter}, + {0xA900, 0xA909, WBP_Numeric}, + {0xA90A, 0xA925, WBP_ALetter}, + {0xA926, 0xA92D, WBP_Extend}, + {0xA930, 0xA946, WBP_ALetter}, + {0xA947, 0xA951, WBP_Extend}, + {0xA952, 0xA953, WBP_Extend}, + {0xA960, 0xA97C, WBP_ALetter}, + {0xA980, 0xA982, WBP_Extend}, + {0xA983, 0xA983, WBP_Extend}, + {0xA984, 0xA9B2, WBP_ALetter}, + {0xA9B3, 0xA9B3, WBP_Extend}, + {0xA9B4, 0xA9B5, WBP_Extend}, + {0xA9B6, 0xA9B9, WBP_Extend}, + {0xA9BA, 0xA9BB, WBP_Extend}, + {0xA9BC, 0xA9BC, WBP_Extend}, + {0xA9BD, 0xA9C0, WBP_Extend}, + {0xA9CF, 0xA9CF, WBP_ALetter}, + {0xA9D0, 0xA9D9, WBP_Numeric}, + {0xAA00, 0xAA28, WBP_ALetter}, + {0xAA29, 0xAA2E, WBP_Extend}, + {0xAA2F, 0xAA30, WBP_Extend}, + {0xAA31, 0xAA32, WBP_Extend}, + {0xAA33, 0xAA34, WBP_Extend}, + {0xAA35, 0xAA36, WBP_Extend}, + {0xAA40, 0xAA42, WBP_ALetter}, + {0xAA43, 0xAA43, WBP_Extend}, + {0xAA44, 0xAA4B, WBP_ALetter}, + {0xAA4C, 0xAA4C, WBP_Extend}, + {0xAA4D, 0xAA4D, WBP_Extend}, + {0xAA50, 0xAA59, WBP_Numeric}, + {0xAA7B, 0xAA7B, WBP_Extend}, + {0xAAB0, 0xAAB0, WBP_Extend}, + {0xAAB2, 0xAAB4, WBP_Extend}, + {0xAAB7, 0xAAB8, WBP_Extend}, + {0xAABE, 0xAABF, WBP_Extend}, + {0xAAC1, 0xAAC1, WBP_Extend}, + {0xAB01, 0xAB06, WBP_ALetter}, + {0xAB09, 0xAB0E, WBP_ALetter}, + {0xAB11, 0xAB16, WBP_ALetter}, + {0xAB20, 0xAB26, WBP_ALetter}, + {0xAB28, 0xAB2E, WBP_ALetter}, + {0xABC0, 0xABE2, WBP_ALetter}, + {0xABE3, 0xABE4, WBP_Extend}, + {0xABE5, 0xABE5, WBP_Extend}, + {0xABE6, 0xABE7, WBP_Extend}, + {0xABE8, 0xABE8, WBP_Extend}, + {0xABE9, 0xABEA, WBP_Extend}, + {0xABEC, 0xABEC, WBP_Extend}, + {0xABED, 0xABED, WBP_Extend}, + {0xABF0, 0xABF9, WBP_Numeric}, + {0xAC00, 0xD7A3, WBP_ALetter}, + {0xD7B0, 0xD7C6, WBP_ALetter}, + {0xD7CB, 0xD7FB, WBP_ALetter}, + {0xFB00, 0xFB06, WBP_ALetter}, + {0xFB13, 0xFB17, WBP_ALetter}, + {0xFB1D, 0xFB1D, WBP_ALetter}, + {0xFB1E, 0xFB1E, WBP_Extend}, + {0xFB1F, 0xFB28, WBP_ALetter}, + {0xFB2A, 0xFB36, WBP_ALetter}, + {0xFB38, 0xFB3C, WBP_ALetter}, + {0xFB3E, 0xFB3E, WBP_ALetter}, + {0xFB40, 0xFB41, WBP_ALetter}, + {0xFB43, 0xFB44, WBP_ALetter}, + {0xFB46, 0xFBB1, WBP_ALetter}, + {0xFBD3, 0xFD3D, WBP_ALetter}, + {0xFD50, 0xFD8F, WBP_ALetter}, + {0xFD92, 0xFDC7, WBP_ALetter}, + {0xFDF0, 0xFDFB, WBP_ALetter}, + {0xFE00, 0xFE0F, WBP_Extend}, + {0xFE10, 0xFE10, WBP_MidNum}, + {0xFE13, 0xFE13, WBP_MidLetter}, + {0xFE14, 0xFE14, WBP_MidNum}, + {0xFE20, 0xFE26, WBP_Extend}, + {0xFE33, 0xFE34, WBP_ExtendNumLet}, + {0xFE4D, 0xFE4F, WBP_ExtendNumLet}, + {0xFE50, 0xFE50, WBP_MidNum}, + {0xFE52, 0xFE52, WBP_MidNumLet}, + {0xFE54, 0xFE54, WBP_MidNum}, + {0xFE55, 0xFE55, WBP_MidLetter}, + {0xFE70, 0xFE74, WBP_ALetter}, + {0xFE76, 0xFEFC, WBP_ALetter}, + {0xFEFF, 0xFEFF, WBP_Format}, + {0xFF07, 0xFF07, WBP_MidNumLet}, + {0xFF0C, 0xFF0C, WBP_MidNum}, + {0xFF0E, 0xFF0E, WBP_MidNumLet}, + {0xFF1A, 0xFF1A, WBP_MidLetter}, + {0xFF1B, 0xFF1B, WBP_MidNum}, + {0xFF21, 0xFF3A, WBP_ALetter}, + {0xFF3F, 0xFF3F, WBP_ExtendNumLet}, + {0xFF41, 0xFF5A, WBP_ALetter}, + {0xFF66, 0xFF6F, WBP_Katakana}, + {0xFF70, 0xFF70, WBP_Katakana}, + {0xFF71, 0xFF9D, WBP_Katakana}, + {0xFF9E, 0xFF9F, WBP_Extend}, + {0xFFA0, 0xFFBE, WBP_ALetter}, + {0xFFC2, 0xFFC7, WBP_ALetter}, + {0xFFCA, 0xFFCF, WBP_ALetter}, + {0xFFD2, 0xFFD7, WBP_ALetter}, + {0xFFDA, 0xFFDC, WBP_ALetter}, + {0xFFF9, 0xFFFB, WBP_Format}, + {0x10000, 0x1000B, WBP_ALetter}, + {0x1000D, 0x10026, WBP_ALetter}, + {0x10028, 0x1003A, WBP_ALetter}, + {0x1003C, 0x1003D, WBP_ALetter}, + {0x1003F, 0x1004D, WBP_ALetter}, + {0x10050, 0x1005D, WBP_ALetter}, + {0x10080, 0x100FA, WBP_ALetter}, + {0x10140, 0x10174, WBP_ALetter}, + {0x101FD, 0x101FD, WBP_Extend}, + {0x10280, 0x1029C, WBP_ALetter}, + {0x102A0, 0x102D0, WBP_ALetter}, + {0x10300, 0x1031E, WBP_ALetter}, + {0x10330, 0x10340, WBP_ALetter}, + {0x10341, 0x10341, WBP_ALetter}, + {0x10342, 0x10349, WBP_ALetter}, + {0x1034A, 0x1034A, WBP_ALetter}, + {0x10380, 0x1039D, WBP_ALetter}, + {0x103A0, 0x103C3, WBP_ALetter}, + {0x103C8, 0x103CF, WBP_ALetter}, + {0x103D1, 0x103D5, WBP_ALetter}, + {0x10400, 0x1044F, WBP_ALetter}, + {0x10450, 0x1049D, WBP_ALetter}, + {0x104A0, 0x104A9, WBP_Numeric}, + {0x10800, 0x10805, WBP_ALetter}, + {0x10808, 0x10808, WBP_ALetter}, + {0x1080A, 0x10835, WBP_ALetter}, + {0x10837, 0x10838, WBP_ALetter}, + {0x1083C, 0x1083C, WBP_ALetter}, + {0x1083F, 0x10855, WBP_ALetter}, + {0x10900, 0x10915, WBP_ALetter}, + {0x10920, 0x10939, WBP_ALetter}, + {0x10A00, 0x10A00, WBP_ALetter}, + {0x10A01, 0x10A03, WBP_Extend}, + {0x10A05, 0x10A06, WBP_Extend}, + {0x10A0C, 0x10A0F, WBP_Extend}, + {0x10A10, 0x10A13, WBP_ALetter}, + {0x10A15, 0x10A17, WBP_ALetter}, + {0x10A19, 0x10A33, WBP_ALetter}, + {0x10A38, 0x10A3A, WBP_Extend}, + {0x10A3F, 0x10A3F, WBP_Extend}, + {0x10A60, 0x10A7C, WBP_ALetter}, + {0x10B00, 0x10B35, WBP_ALetter}, + {0x10B40, 0x10B55, WBP_ALetter}, + {0x10B60, 0x10B72, WBP_ALetter}, + {0x10C00, 0x10C48, WBP_ALetter}, + {0x11000, 0x11000, WBP_Extend}, + {0x11001, 0x11001, WBP_Extend}, + {0x11002, 0x11002, WBP_Extend}, + {0x11003, 0x11037, WBP_ALetter}, + {0x11038, 0x11046, WBP_Extend}, + {0x11066, 0x1106F, WBP_Numeric}, + {0x11080, 0x11081, WBP_Extend}, + {0x11082, 0x11082, WBP_Extend}, + {0x11083, 0x110AF, WBP_ALetter}, + {0x110B0, 0x110B2, WBP_Extend}, + {0x110B3, 0x110B6, WBP_Extend}, + {0x110B7, 0x110B8, WBP_Extend}, + {0x110B9, 0x110BA, WBP_Extend}, + {0x110BD, 0x110BD, WBP_Format}, + {0x12000, 0x1236E, WBP_ALetter}, + {0x12400, 0x12462, WBP_ALetter}, + {0x13000, 0x1342E, WBP_ALetter}, + {0x16800, 0x16A38, WBP_ALetter}, + {0x1B000, 0x1B000, WBP_Katakana}, + {0x1D165, 0x1D166, WBP_Extend}, + {0x1D167, 0x1D169, WBP_Extend}, + {0x1D16D, 0x1D172, WBP_Extend}, + {0x1D173, 0x1D17A, WBP_Format}, + {0x1D17B, 0x1D182, WBP_Extend}, + {0x1D185, 0x1D18B, WBP_Extend}, + {0x1D1AA, 0x1D1AD, WBP_Extend}, + {0x1D242, 0x1D244, WBP_Extend}, + {0x1D400, 0x1D454, WBP_ALetter}, + {0x1D456, 0x1D49C, WBP_ALetter}, + {0x1D49E, 0x1D49F, WBP_ALetter}, + {0x1D4A2, 0x1D4A2, WBP_ALetter}, + {0x1D4A5, 0x1D4A6, WBP_ALetter}, + {0x1D4A9, 0x1D4AC, WBP_ALetter}, + {0x1D4AE, 0x1D4B9, WBP_ALetter}, + {0x1D4BB, 0x1D4BB, WBP_ALetter}, + {0x1D4BD, 0x1D4C3, WBP_ALetter}, + {0x1D4C5, 0x1D505, WBP_ALetter}, + {0x1D507, 0x1D50A, WBP_ALetter}, + {0x1D50D, 0x1D514, WBP_ALetter}, + {0x1D516, 0x1D51C, WBP_ALetter}, + {0x1D51E, 0x1D539, WBP_ALetter}, + {0x1D53B, 0x1D53E, WBP_ALetter}, + {0x1D540, 0x1D544, WBP_ALetter}, + {0x1D546, 0x1D546, WBP_ALetter}, + {0x1D54A, 0x1D550, WBP_ALetter}, + {0x1D552, 0x1D6A5, WBP_ALetter}, + {0x1D6A8, 0x1D6C0, WBP_ALetter}, + {0x1D6C2, 0x1D6DA, WBP_ALetter}, + {0x1D6DC, 0x1D6FA, WBP_ALetter}, + {0x1D6FC, 0x1D714, WBP_ALetter}, + {0x1D716, 0x1D734, WBP_ALetter}, + {0x1D736, 0x1D74E, WBP_ALetter}, + {0x1D750, 0x1D76E, WBP_ALetter}, + {0x1D770, 0x1D788, WBP_ALetter}, + {0x1D78A, 0x1D7A8, WBP_ALetter}, + {0x1D7AA, 0x1D7C2, WBP_ALetter}, + {0x1D7C4, 0x1D7CB, WBP_ALetter}, + {0x1D7CE, 0x1D7FF, WBP_Numeric}, + {0xE0001, 0xE0001, WBP_Format}, + {0xE0020, 0xE007F, WBP_Format}, + {0xE0100, 0xE01EF, WBP_Extend}, + {0xFFFFFFFF, 0xFFFFFFFF, WBP_Undefined} +}; diff --git a/libraries/evas/src/static_deps/liblinebreak/wordbreakdef.h b/libraries/evas/src/static_deps/liblinebreak/wordbreakdef.h new file mode 100644 index 0000000..331cd01 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/wordbreakdef.h @@ -0,0 +1,80 @@ +/* vim: set tabstop=4 shiftwidth=4: */ + +/* + * Word breaking in a Unicode sequence. Designed to be used in a + * generic text renderer. + * + * Copyright (C) 2011-2011 Tom Hacohen + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the author be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute + * it freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must + * not claim that you wrote the original software. If you use this + * software in a product, an acknowledgement in the product + * documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must + * not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source + * distribution. + * + * The main reference is Unicode Standard Annex 29 (UAX #29): + * + * + * When this library was designed, this annex was at Revision 17, for + * Unicode 6.0.0: + * + * + * The Unicode Terms of Use are available at + * + */ + +/** + * @file wordbreakdef.h + * + * Definitions of internal data structures, declarations of global + * variables, and function prototypes for the word breaking algorithm. + * + * @version 2.0, 2011/12/12 + * @author Tom Hacohen + */ + +/** + * Word break classes. This is a direct mapping of Table 3 of Unicode + * Standard Annex 29, Revision 17. + */ +enum WordBreakClass +{ + WBP_Undefined, + + /* The following break classes are treated in the pair table. */ + WBP_CR, + WBP_LF, + WBP_Newline, + WBP_Extend, + WBP_Format, + WBP_Katakana, + WBP_ALetter, + WBP_MidNumLet, + WBP_MidLetter, + WBP_MidNum, + WBP_Numeric, + WBP_ExtendNumLet, + WBP_Any +}; + +/** + * Struct for entries of word break properties. The array of the + * entries \e must be sorted. + */ +struct WordBreakProperties +{ + utf32_t start; /**< Starting coding point */ + utf32_t end; /**< End coding point */ + enum WordBreakClass prop; /**< The word breaking property */ +}; diff --git a/libraries/evas/src/tests/Makefile.in b/libraries/evas/src/tests/Makefile.in index c598c3d..8790c33 100644 --- a/libraries/evas/src/tests/Makefile.in +++ b/libraries/evas/src/tests/Makefile.in @@ -203,8 +203,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -221,6 +219,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -302,6 +302,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/tests/evas_test_callbacks.c b/libraries/evas/src/tests/evas_test_callbacks.c index 675ee1c..164851e 100644 --- a/libraries/evas/src/tests/evas_test_callbacks.c +++ b/libraries/evas/src/tests/evas_test_callbacks.c @@ -28,7 +28,7 @@ do \ } \ while (0) -static int counter = 1; +static uintptr_t counter = 1; static void _obj_event_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) @@ -37,7 +37,7 @@ _obj_event_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) (void) obj; (void) event_info; - fail_if(((int) data) != counter); + fail_if(((uintptr_t) data) != counter); counter++; } @@ -83,7 +83,7 @@ _event_cb(void *data, Evas *e, void *event_info) (void) e; (void) event_info; - fail_if(((int) data) != counter); + fail_if(((uintptr_t) data) != counter); counter++; } diff --git a/libraries/evas/src/tests/evas_test_textblock.c b/libraries/evas/src/tests/evas_test_textblock.c index 6a28353..cf6a78b 100644 --- a/libraries/evas/src/tests/evas_test_textblock.c +++ b/libraries/evas/src/tests/evas_test_textblock.c @@ -21,9 +21,7 @@ _evas_textblock_format_offset_get(const Evas_Object_Textblock_Node_Format *n); static const char *style_buf = "DEFAULT='font=Sans font_size=10 color=#000 text_class=entry'" - "br='\n'" - "ps='ps'" - "tab='\t'" + "newline='br'" "b='+ font=Sans:style=bold'"; #define START_TB_TEST() \ @@ -61,7 +59,7 @@ while (0) START_TEST(evas_textblock_simple) { START_TB_TEST(); - const char *buf = "This is a
test."; + const char *buf = "This is a
test."; evas_object_textblock_text_markup_set(tb, buf); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf)); END_TB_TEST(); @@ -95,12 +93,12 @@ START_TEST(evas_textblock_cursor) Evas_Coord x, y, w, h; size_t i, len; Evas_Coord nw, nh; - const char *buf = "This is a
test.Lets see if this works.עוד פסקה."; + const char *buf = "This is a
test.Lets see if this works.עוד פסקה."; /* Walk the textblock using cursor_char_next */ evas_object_textblock_text_markup_set(tb, buf); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf)); - len = eina_unicode_utf8_get_len(buf) - 9; /* 9 because len(
) == 1 and len() == 1 */ + len = eina_unicode_utf8_get_len(buf) - 12; /* 12 because len(
) == 1 and len() == 1 */ for (i = 0 ; i < len ; i++) { _CHECK_CURSOR_COORDS(); @@ -284,7 +282,7 @@ START_TEST(evas_textblock_cursor) /* Paragraph text get */ evas_textblock_cursor_paragraph_first(cur); fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), - "This is a
test.")); + "This is a
test.")); evas_textblock_cursor_paragraph_next(cur); fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), "Lets see if this works.")); @@ -294,9 +292,9 @@ START_TEST(evas_textblock_cursor) /* Paragraph length get */ evas_textblock_cursor_paragraph_first(cur); - /* -3 because len(
) == 1 */ + /* -4 because len(
) == 1 */ fail_if(evas_textblock_cursor_paragraph_text_length_get(cur) != - eina_unicode_utf8_get_len("This is a
test.") - 3); + eina_unicode_utf8_get_len("This is a
test.") - 4); evas_textblock_cursor_paragraph_next(cur); fail_if(evas_textblock_cursor_paragraph_text_length_get(cur) != eina_unicode_utf8_get_len("Lets see if this works.")); @@ -308,7 +306,7 @@ START_TEST(evas_textblock_cursor) evas_textblock_cursor_pos_set(cur, 0); fail_if(strcmp(evas_textblock_cursor_content_get(cur), "T")); evas_textblock_cursor_pos_set(cur, 9); - fail_if(strcmp(evas_textblock_cursor_content_get(cur), "
")); + fail_if(strcmp(evas_textblock_cursor_content_get(cur), "
")); evas_textblock_cursor_pos_set(cur, 43); fail_if(strcmp(evas_textblock_cursor_content_get(cur), "ד")); @@ -414,12 +412,12 @@ START_TEST(evas_textblock_cursor) #ifdef HAVE_FRIBIDI evas_object_textblock_text_markup_set(tb, - "testנסיוןtestנסיון" - "נסיוןtestנסיוןtest" - "testנסיוןtest" - "נסיוןtestנסיון" - "testנסיון
נסיון" - "נסיוןtest
test" + "testנסיוןtestנסיון" + "נסיוןtestנסיוןtest" + "testנסיוןtest" + "נסיוןtestנסיון" + "testנסיון
נסיון" + "נסיוןtest
test" ); for (i = 0 ; i < 8 ; i++) @@ -568,6 +566,32 @@ START_TEST(evas_textblock_cursor) fail_if(evas_textblock_cursor_compare(main_cur, cur)); } + { + const char *buf_wb = "a This is_a t:e.s't a"; + evas_object_textblock_text_markup_set(tb, buf_wb); + + /* Word start/end */ + evas_textblock_cursor_pos_set(cur, 3); + evas_textblock_cursor_word_start(cur); + fail_if(2 != evas_textblock_cursor_pos_get(cur)); + evas_textblock_cursor_word_end(cur); + fail_if(5 != evas_textblock_cursor_pos_get(cur)); + + evas_textblock_cursor_pos_set(cur, 13); + evas_textblock_cursor_word_end(cur); + fail_if(18 != evas_textblock_cursor_pos_get(cur)); + evas_textblock_cursor_word_start(cur); + fail_if(12 != evas_textblock_cursor_pos_get(cur)); + evas_textblock_cursor_word_start(cur); + fail_if(12 != evas_textblock_cursor_pos_get(cur)); + evas_textblock_cursor_word_start(cur); + fail_if(12 != evas_textblock_cursor_pos_get(cur)); + evas_textblock_cursor_word_end(cur); + fail_if(18 != evas_textblock_cursor_pos_get(cur)); + evas_textblock_cursor_word_end(cur); + fail_if(18 != evas_textblock_cursor_pos_get(cur)); + } + END_TB_TEST(); } END_TEST @@ -723,7 +747,7 @@ START_TEST(evas_textblock_format_removal) /* Range deletion across paragraphs */ evas_object_textblock_text_markup_set(tb, - "This ate" + "This ate" "sst."); evas_textblock_cursor_pos_set(cur, 6); evas_textblock_cursor_pos_set(main_cur, 10); @@ -749,14 +773,14 @@ START_TEST(evas_textblock_format_removal) fail_if (fnode); /* Two formats across different paragraphs with notihng in between. */ - evas_object_textblock_text_markup_set(tb, ""); + evas_object_textblock_text_markup_set(tb, ""); evas_textblock_cursor_pos_set(cur, 0); evas_textblock_cursor_char_delete(cur); fnode = evas_textblock_node_format_first_get(tb); fail_if (fnode); /* Try with range */ - evas_object_textblock_text_markup_set(tb, ""); + evas_object_textblock_text_markup_set(tb, ""); evas_textblock_cursor_pos_set(cur, 0); evas_textblock_cursor_pos_set(main_cur, 1); evas_textblock_cursor_range_delete(cur, main_cur); @@ -765,7 +789,7 @@ START_TEST(evas_textblock_format_removal) /* Verify fmt position and REP_CHAR positions are the same */ evas_object_textblock_text_markup_set(tb, - "This isan a."); + "This isan a."); evas_textblock_cursor_pos_set(cur, 7); evas_textblock_cursor_char_delete(cur); fnode = evas_textblock_node_format_first_get(tb); @@ -1091,9 +1115,9 @@ START_TEST(evas_textblock_wrapping) evas_object_textblock_text_markup_set(tb, "a"); evas_object_textblock_size_formatted_get(tb, &bw, &bh); evas_object_textblock_text_markup_set(tb, - "aaaa aaaa aaa aa aaa" - "aaaa aaa aaa aaa aaa" - "a aaaaa aaaaaaaaaaaaaa
aaaaa" + "aaaa aaaa aaa aa aaa" + "aaaa aaa aaa aaa aaa" + "a aaaaa aaaaaaaaaaaaaa
aaaaa" "aaaaaa" ); evas_textblock_cursor_format_prepend(cur, "+ wrap=char"); @@ -1113,9 +1137,9 @@ START_TEST(evas_textblock_wrapping) evas_object_textblock_text_markup_set(tb, "aaaaaa"); evas_object_textblock_size_formatted_get(tb, &bw, &bh); evas_object_textblock_text_markup_set(tb, - "aaaa aaaa aaa aa aaa" - "aaaa aaa aaa aaa aaa" - "a aaaaa aaaaaa
aaaaa" + "aaaa aaaa aaa aa aaa" + "aaaa aaa aaa aaa aaa" + "a aaaaa aaaaaa
aaaaa" "aaaaa" ); evas_textblock_cursor_format_prepend(cur, "+ wrap=word"); @@ -1134,9 +1158,9 @@ START_TEST(evas_textblock_wrapping) evas_object_textblock_text_markup_set(tb, "a"); evas_object_textblock_size_formatted_get(tb, &bw, &bh); evas_object_textblock_text_markup_set(tb, - "aaaa aaaa aaa aa aaa" - "aaaa aaa aaa aaa aaa" - "a aaaaa aaaaaa
aaaaa" + "aaaa aaaa aaa aa aaa" + "aaaa aaa aaa aaa aaa" + "a aaaaa aaaaaa
aaaaa" "aaaaa" ); evas_textblock_cursor_format_prepend(cur, "+ wrap=mixed"); @@ -1156,26 +1180,26 @@ START_TEST(evas_textblock_wrapping) int wrap_items = sizeof(wrap_style) / sizeof(*wrap_style); evas_object_textblock_text_markup_set(tb, - "This is an entry widget in this window that
" - "uses markup like this for styling and
" - "formatting like this, as well as
" - "links in the text, so enter text
" - "in here to edit it. By the way, links are
" - "called Anchors so you will need
" - "to refer to them this way.
" - "
" + "This is an entry widget in this window that
" + "uses markup like this for styling and
" + "formatting like this, as well as
" + "links in the text, so enter text
" + "in here to edit it. By the way, links are
" + "called Anchors so you will need
" + "to refer to them this way.
" + "
" "Also you can stick in items with (relsize + ascent): " "" " (full) " "" - " (to the left)
" + " (to the left)
" "Also (size + ascent): " "" " (full) " "" - " (before this)
" + " (before this)
" "And as well (absize + ascent): " "" @@ -1214,6 +1238,13 @@ START_TEST(evas_textblock_wrapping) evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if((w > (nw / 2)) || (h != nh)); + evas_object_textblock_text_markup_set(tb, "aaaaaaaaaaaaaaaaaa
b"); + evas_textblock_cursor_format_prepend(cur, "+ ellipsis=1.0 wrap=word"); + evas_object_textblock_size_native_get(tb, &nw, &nh); + evas_object_resize(tb, nw / 2, nh * 2); + evas_object_textblock_size_formatted_get(tb, &w, &h); + fail_if(w > (nw / 2)); + END_TB_TEST(); } END_TEST @@ -1223,7 +1254,7 @@ START_TEST(evas_textblock_various) { Evas_Coord w, h, bw, bh; START_TB_TEST(); - const char *buf = "Thistextblockhasalotoflines."; + const char *buf = "Thistextblockhasalotoflines."; evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_formatted_get(tb, &w, &h); /* Move outside of the screen so it'll have to search for the correct @@ -1241,15 +1272,15 @@ START_TEST(evas_textblock_various) /* Items have correct text node information */ evas_object_textblock_text_markup_set(tb, ""); fail_if(!_evas_textblock_check_item_node_link(tb)); - evas_object_textblock_text_markup_set(tb, ""); + evas_object_textblock_text_markup_set(tb, ""); fail_if(!_evas_textblock_check_item_node_link(tb)); - evas_object_textblock_text_markup_set(tb, "a"); + evas_object_textblock_text_markup_set(tb, "a"); fail_if(!_evas_textblock_check_item_node_link(tb)); - evas_object_textblock_text_markup_set(tb, "aa"); + evas_object_textblock_text_markup_set(tb, "aa"); fail_if(!_evas_textblock_check_item_node_link(tb)); - evas_object_textblock_text_markup_set(tb, "aa"); + evas_object_textblock_text_markup_set(tb, "aa"); fail_if(!_evas_textblock_check_item_node_link(tb)); - evas_object_textblock_text_markup_set(tb, "aaa"); + evas_object_textblock_text_markup_set(tb, "aaa"); fail_if(!_evas_textblock_check_item_node_link(tb)); END_TB_TEST(); @@ -1260,7 +1291,7 @@ END_TEST START_TEST(evas_textblock_geometries) { START_TB_TEST(); - const char *buf = "This is a
test."; + const char *buf = "This is a
test."; evas_object_textblock_text_markup_set(tb, buf); /* Single line range */ @@ -1327,7 +1358,7 @@ END_TEST START_TEST(evas_textblock_editing) { START_TB_TEST(); - const char *buf = "First par.Second par."; + const char *buf = "First par.Second par."; evas_object_textblock_text_markup_set(tb, buf); Evas_Textblock_Cursor *main_cur = evas_object_textblock_cursor_get(tb); @@ -1346,7 +1377,7 @@ START_TEST(evas_textblock_editing) evas_textblock_cursor_paragraph_first(cur); evas_textblock_cursor_char_delete(cur); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), - "irst par.Second par.")); + "irst par.Second par.")); /* Delete some arbitrary char */ evas_textblock_cursor_char_next(cur); @@ -1354,14 +1385,14 @@ START_TEST(evas_textblock_editing) evas_textblock_cursor_char_next(cur); evas_textblock_cursor_char_delete(cur); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), - "irs par.Second par.")); + "irs par.Second par.")); /* Delete a range */ evas_textblock_cursor_pos_set(main_cur, 1); evas_textblock_cursor_pos_set(cur, 6); evas_textblock_cursor_range_delete(cur, main_cur); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), - "ir.Second par.")); + "ir.Second par.")); evas_textblock_cursor_paragraph_char_first(main_cur); evas_textblock_cursor_paragraph_char_last(cur); evas_textblock_cursor_char_next(cur); @@ -1376,7 +1407,7 @@ START_TEST(evas_textblock_editing) evas_textblock_cursor_paragraph_char_first(main_cur); evas_textblock_cursor_range_delete(cur, main_cur); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), - "First par.")); + "First par.")); /* Merging paragraphs */ evas_object_textblock_text_markup_set(tb, buf); @@ -1406,6 +1437,27 @@ START_TEST(evas_textblock_editing) evas_textblock_cursor_paragraph_first(cur); fail_if(evas_textblock_cursor_paragraph_next(cur)); + /* Insert illegal characters inside the format. */ + { + const char *content; + evas_object_textblock_text_markup_set(tb, "a\n"); + evas_textblock_cursor_pos_set(cur, 1); + content = evas_textblock_cursor_content_get(cur); + + evas_object_textblock_text_markup_set(tb, "a\t"); + evas_textblock_cursor_pos_set(cur, 1); + content = evas_textblock_cursor_content_get(cur); + + evas_object_textblock_text_markup_set(tb, "a\xEF\xBF\xBC"); + evas_textblock_cursor_pos_set(cur, 1); + content = evas_textblock_cursor_content_get(cur); + + evas_object_textblock_text_markup_set(tb, "a\xE2\x80\xA9"); + evas_textblock_cursor_pos_set(cur, 1); + content = evas_textblock_cursor_content_get(cur); + (void) content; + } + /* FIXME: Also add text appending/prepending */ END_TB_TEST(); @@ -1416,13 +1468,13 @@ END_TEST START_TEST(evas_textblock_text_getters) { START_TB_TEST(); - const char *buf = "This is a
test." - "טקסט בעבריתand now in english."; + const char *buf = "This is a
test." + "טקסט בעבריתand now in english."; evas_object_textblock_text_markup_set(tb, buf); evas_textblock_cursor_paragraph_first(cur); fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), - "This is a
test.")); + "This is a
test.")); evas_textblock_cursor_paragraph_next(cur); fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), @@ -1447,17 +1499,17 @@ START_TEST(evas_textblock_text_getters) evas_textblock_cursor_pos_set(main_cur, 5); evas_textblock_cursor_pos_set(cur, 14); fail_if(strcmp(evas_textblock_cursor_range_text_get(main_cur, cur, - EVAS_TEXTBLOCK_TEXT_MARKUP), "is a
te")); + EVAS_TEXTBLOCK_TEXT_MARKUP), "is a
te")); evas_textblock_cursor_pos_set(main_cur, 14); evas_textblock_cursor_pos_set(cur, 20); fail_if(strcmp(evas_textblock_cursor_range_text_get(main_cur, cur, - EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טק")); + EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טק")); evas_textblock_cursor_pos_set(main_cur, 14); evas_textblock_cursor_pos_set(cur, 32); fail_if(strcmp(evas_textblock_cursor_range_text_get(main_cur, cur, - EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טקסט בעבריתan")); + EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טקסט בעבריתan")); /* Backward range get */ evas_textblock_cursor_pos_set(main_cur, 2); @@ -1473,17 +1525,17 @@ START_TEST(evas_textblock_text_getters) evas_textblock_cursor_pos_set(main_cur, 5); evas_textblock_cursor_pos_set(cur, 14); fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, - EVAS_TEXTBLOCK_TEXT_MARKUP), "is a
te")); + EVAS_TEXTBLOCK_TEXT_MARKUP), "is a
te")); evas_textblock_cursor_pos_set(main_cur, 14); evas_textblock_cursor_pos_set(cur, 20); fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, - EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טק")); + EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טק")); evas_textblock_cursor_pos_set(main_cur, 14); evas_textblock_cursor_pos_set(cur, 32); fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, - EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טקסט בעבריתan")); + EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טקסט בעבריתan")); /* Uninit cursors and other weird cases */ evas_object_textblock_clear(tb); @@ -1492,6 +1544,97 @@ START_TEST(evas_textblock_text_getters) fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, EVAS_TEXTBLOCK_TEXT_MARKUP), "aaa")); + /* Markup to plain and vice versa */ + { + char *tmp, *tmp2; + + /* Real textblock object */ + tmp = evas_textblock_text_markup_to_utf8(tb, "
aa<\n/>bb<\t/>"); + fail_if(strcmp(tmp, "\naa\nbb\t")); + tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); + fail_if(strcmp(tmp2, "
aa
bb")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(tb, "a"); + fail_if(strcmp(tmp, "a\xEF\xBF\xBC")); + tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); + fail_if(strcmp(tmp2, "a")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(tb, "a "); + fail_if(strcmp(tmp, "a\xC2\xA0")); + tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); + fail_if(strcmp(tmp2, "a\xC2\xA0")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(tb, "aba"); + fail_if(strcmp(tmp, "aba")); + tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); + fail_if(strcmp(tmp2, "aba")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(tb, "a&a"); + fail_if(strcmp(tmp, "a&a")); + tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); + fail_if(strcmp(tmp2, "a&a")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(tb, "aa"); + fail_if(strcmp(tmp, "a\na")); + tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); + fail_if(strcmp(tmp2, "a
a")); + free(tmp2); + free(tmp); + + /* NULL textblock object */ + tmp = evas_textblock_text_markup_to_utf8(NULL, "
aa<\n/>bb<\t/>"); + fail_if(strcmp(tmp, "\naa\nbb\t")); + tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp); + fail_if(strcmp(tmp2, "
aa
bb")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(NULL, "a"); + fail_if(strcmp(tmp, "a\xEF\xBF\xBC")); + tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp); + fail_if(strcmp(tmp2, "a")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(NULL, "a "); + fail_if(strcmp(tmp, "a\xC2\xA0")); + tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp); + fail_if(strcmp(tmp2, "a\xC2\xA0")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(NULL, "aba"); + fail_if(strcmp(tmp, "aba")); + tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp); + fail_if(strcmp(tmp2, "aba")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(tb, "a&a"); + fail_if(strcmp(tmp, "a&a")); + tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); + fail_if(strcmp(tmp2, "a&a")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(NULL, "aa"); + fail_if(strcmp(tmp, "aa")); + tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp); + fail_if(strcmp(tmp2, "aa")); + free(tmp2); + free(tmp); + } + END_TB_TEST(); } END_TEST @@ -1500,7 +1643,7 @@ END_TEST START_TEST(evas_textblock_formats) { START_TB_TEST(); - const char *buf = "This is a
test."; + const char *buf = "This is a
test."; const Evas_Object_Textblock_Node_Format *fnode; evas_object_textblock_text_markup_set(tb, buf); @@ -1652,25 +1795,25 @@ START_TEST(evas_textblock_formats) * verify them visually, well, we can some of them. Possibly in the * future we will */ evas_object_textblock_text_markup_set(tb, - "font_size=40" - "color=#F210B3FF" - "underline=single underline_color=#A2B3C4" - "underline=double underline_color=#F00 underline2_color=#00F" - "underline=dashed underline_dash_color=#0F0 underline_dash_width=2 underline_dash_gap=1" - "style=outline outline_color=#F0FA" - "style=shadow shadow_color=#F0F" - "style=glow glow_color=#BBB" - "style=glow glow2_color=#0F0" - "style=glow color=#fff glow2_color=#fe87 glow_color=#f214" - "backing=on backing_color=#00F" - "strikethrough=on strikethrough_color=#FF0" - "align=right" - "valign=0.0" - "tabstops=<\\t>50" - "linesize=40" - "linerelsize=200%" - "linegap=20" - "linerelgap=100%"); + "font_size=40" + "color=#F210B3FF" + "underline=single underline_color=#A2B3C4" + "underline=double underline_color=#F00 underline2_color=#00F" + "underline=dashed underline_dash_color=#0F0 underline_dash_width=2 underline_dash_gap=1" + "style=outline outline_color=#F0FA" + "style=shadow shadow_color=#F0F" + "style=glow glow_color=#BBB" + "style=glow glow2_color=#0F0" + "style=glow color=#fff glow2_color=#fe87 glow_color=#f214" + "backing=on backing_color=#00F" + "strikethrough=on strikethrough_color=#FF0" + "align=right" + "valign=0.0" + "tabstops=<\\t>50" + "linesize=40" + "linerelsize=200%" + "linegap=20" + "linerelgap=100%"); /* Force a relayout */ evas_object_textblock_size_formatted_get(tb, NULL, NULL); @@ -1714,22 +1857,22 @@ START_TEST(evas_textblock_formats) } /* Make sure we get all the types of visible formats correctly. */ - evas_object_textblock_text_markup_set(tb, "a
aa"); + evas_object_textblock_text_markup_set(tb, "a
aa"); fail_if(strcmp(evas_textblock_node_format_text_get( evas_textblock_cursor_format_get(cur)), "ps")); - fail_if(strcmp(evas_textblock_cursor_content_get(cur), "")); + fail_if(strcmp(evas_textblock_cursor_content_get(cur), "")); fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(strcmp(evas_textblock_node_format_text_get( evas_textblock_cursor_format_get(cur)), "br")); - fail_if(strcmp(evas_textblock_cursor_content_get(cur), "
")); + fail_if(strcmp(evas_textblock_cursor_content_get(cur), "
")); fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(strcmp(evas_textblock_node_format_text_get( evas_textblock_cursor_format_get(cur)), "tab")); - fail_if(strcmp(evas_textblock_cursor_content_get(cur), "")); + fail_if(strcmp(evas_textblock_cursor_content_get(cur), "")); fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); @@ -1749,7 +1892,7 @@ START_TEST(evas_textblock_style) Evas_Coord l, r, t, b; START_TB_TEST(); Evas_Textblock_Style *newst; - const char *buf = "TestTest2נסיון"; + const char *buf = "TestTest2נסיון"; evas_object_textblock_text_markup_set(tb, buf); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf)); @@ -1850,7 +1993,7 @@ START_TEST(evas_textblock_set_get) fail_if(strcmp(evas_object_textblock_bidi_delimiters_get(tb), ",|")); /* Hinting */ - evas_object_textblock_text_markup_set(tb, "This isa test
bla"); + evas_object_textblock_text_markup_set(tb, "This isa test
bla"); /* Force relayout */ evas_object_textblock_size_formatted_get(tb, NULL, NULL); evas_font_hinting_set(evas, EVAS_FONT_HINTING_NONE); @@ -1923,7 +2066,7 @@ START_TEST(evas_textblock_size) { START_TB_TEST(); Evas_Coord w, h, h2, nw, nh; - const char *buf = "This is a
test.
גם בעברית"; + const char *buf = "This is a
test.
גם בעברית"; /* When wrapping is off, native size should be the same as formatted * size */ @@ -1932,7 +2075,7 @@ START_TEST(evas_textblock_size) fail_if((w != nw) || (h != nh)); fail_if(w != 0); - evas_object_textblock_text_markup_set(tb, "a
a"); + evas_object_textblock_text_markup_set(tb, "a
a"); evas_object_textblock_size_formatted_get(tb, &w, &h2); evas_object_textblock_size_native_get(tb, &nw, &nh); fail_if((w != nw) || (h2 != nh)); -- cgit v1.1