svn update: 60295 (latest:60295)
authorJaehwan Kim <jae.hwan.kim@samsung.com>
Thu, 23 Jun 2011 10:35:07 +0000 (19:35 +0900)
committerJaehwan Kim <jae.hwan.kim@samsung.com>
Thu, 23 Jun 2011 10:35:07 +0000 (19:35 +0900)
332 files changed:
AUTHORS
ChangeLog
Makefile.am
README.in
autogen.sh
configure.ac
doc/.cvsignore [deleted file]
doc/Doxyfile.in [moved from doc/Doxyfile with 78% similarity]
doc/Makefile.am
doc/evas.dox.in
doc/examples.dox [new file with mode: 0644]
evas-cairo-x11.pc.in [deleted file]
evas-opengl-glew.pc.in [deleted file]
evas-quartz.pc.in [deleted file]
evas-software-qtopia.pc.in [deleted file]
evas-xrender-x11.pc.in [deleted file]
evas-xrender-xcb.pc.in [deleted file]
evas.spec.in
m4/evas_check_engine.m4
m4/evas_check_loader.m4
src/.cvsignore [deleted file]
src/Makefile.am
src/bin/Makefile.am
src/bin/evas_cserve_main.c
src/bin/evas_cserve_tool.c
src/examples/Makefile.am
src/examples/enlightenment.png [new file with mode: 0644]
src/examples/evas-events.c [new file with mode: 0644]
src/examples/evas-init-shutdown.c [new file with mode: 0644]
src/examples/evas-load-error-str.c [new file with mode: 0644]
src/lib/.cvsignore [deleted file]
src/lib/Evas.h
src/lib/Evas_GL.h [new file with mode: 0644]
src/lib/Makefile.am
src/lib/cache/.cvsignore [deleted file]
src/lib/cache/Makefile.am
src/lib/cache/evas_cache.h
src/lib/cache/evas_cache_image.c
src/lib/cache/evas_preload.c
src/lib/canvas/.cvsignore [deleted file]
src/lib/canvas/Makefile.am
src/lib/canvas/evas_async_events.c
src/lib/canvas/evas_callbacks.c
src/lib/canvas/evas_clip.c
src/lib/canvas/evas_data.c
src/lib/canvas/evas_events.c
src/lib/canvas/evas_filter.c [new file with mode: 0644]
src/lib/canvas/evas_focus.c
src/lib/canvas/evas_font_dir.c
src/lib/canvas/evas_gl.c [new file with mode: 0644]
src/lib/canvas/evas_key.c
src/lib/canvas/evas_key_grab.c
src/lib/canvas/evas_layer.c
src/lib/canvas/evas_main.c
src/lib/canvas/evas_map.c
src/lib/canvas/evas_name.c
src/lib/canvas/evas_object_box.c
src/lib/canvas/evas_object_grid.c [new file with mode: 0644]
src/lib/canvas/evas_object_image.c
src/lib/canvas/evas_object_inform.c
src/lib/canvas/evas_object_intercept.c
src/lib/canvas/evas_object_line.c
src/lib/canvas/evas_object_main.c
src/lib/canvas/evas_object_polygon.c
src/lib/canvas/evas_object_rectangle.c
src/lib/canvas/evas_object_smart.c
src/lib/canvas/evas_object_smart_clipped.c
src/lib/canvas/evas_object_table.c
src/lib/canvas/evas_object_text.c
src/lib/canvas/evas_object_textblock.c
src/lib/canvas/evas_rectangle.c
src/lib/canvas/evas_render.c
src/lib/canvas/evas_smart.c
src/lib/canvas/evas_stack.c
src/lib/canvas/evas_stats.c
src/lib/canvas/evas_transform.c [deleted file]
src/lib/cserve/Makefile.am
src/lib/cserve/evas_cs.h
src/lib/cserve/evas_cs_client.c
src/lib/cserve/evas_cs_mem.c
src/lib/engines/.cvsignore [deleted file]
src/lib/engines/common/.cvsignore [deleted file]
src/lib/engines/common/Makefile.am
src/lib/engines/common/evas_blit_main.c
src/lib/engines/common/evas_draw.h
src/lib/engines/common/evas_draw_main.c
src/lib/engines/common/evas_font.h
src/lib/engines/common/evas_font_default_walk.x
src/lib/engines/common/evas_font_draw.c
src/lib/engines/common/evas_font_load.c
src/lib/engines/common/evas_font_main.c
src/lib/engines/common/evas_font_ot.c
src/lib/engines/common/evas_font_ot.h
src/lib/engines/common/evas_font_query.c
src/lib/engines/common/evas_image.h
src/lib/engines/common/evas_image_data.c
src/lib/engines/common/evas_image_load.c
src/lib/engines/common/evas_image_main.c
src/lib/engines/common/evas_image_private.h
src/lib/engines/common/evas_image_scalecache.c
src/lib/engines/common/evas_op_add/.cvsignore [deleted file]
src/lib/engines/common/evas_op_blend/.cvsignore [deleted file]
src/lib/engines/common/evas_op_blend/op_blend_pixel_color_neon.c
src/lib/engines/common/evas_op_copy/.cvsignore [deleted file]
src/lib/engines/common/evas_op_copy_main_.c
src/lib/engines/common/evas_op_mask/.cvsignore [deleted file]
src/lib/engines/common/evas_op_mul/.cvsignore [deleted file]
src/lib/engines/common/evas_op_sub/.cvsignore [deleted file]
src/lib/engines/common/evas_pipe.c
src/lib/engines/common/evas_pipe.h
src/lib/engines/common/evas_rectangle_main.c
src/lib/engines/common/evas_scale_sample.c
src/lib/engines/common/evas_scale_smooth_scaler_noscale.c
src/lib/engines/common/evas_text_utils.c
src/lib/engines/common/evas_text_utils.h
src/lib/engines/common/language/evas_bidi_utils.c
src/lib/engines/common/language/evas_bidi_utils.h
src/lib/engines/common/language/evas_language_utils.c
src/lib/engines/common/language/evas_language_utils.h
src/lib/engines/common/language/evas_script_table.h [new file with mode: 0644]
src/lib/engines/common_16/.cvsignore [deleted file]
src/lib/engines/common_16/Makefile.am
src/lib/engines/common_16/evas_soft16_line.c
src/lib/engines/common_8/Makefile.am
src/lib/file/.cvsignore [deleted file]
src/lib/file/Makefile.am
src/lib/file/evas_module.c
src/lib/include/.cvsignore [deleted file]
src/lib/include/evas_cairo_common.h [deleted file]
src/lib/include/evas_common.h
src/lib/include/evas_private.h
src/lib/main.c
src/modules/.cvsignore [deleted file]
src/modules/engines/.cvsignore [deleted file]
src/modules/engines/Makefile.am
src/modules/engines/buffer/.cvsignore [deleted file]
src/modules/engines/buffer/Makefile.am
src/modules/engines/cairo_common/.cvsignore [deleted file]
src/modules/engines/cairo_common/Makefile.am [deleted file]
src/modules/engines/cairo_common/evas_cairo_common.h [deleted file]
src/modules/engines/cairo_common/evas_cairo_main.c [deleted file]
src/modules/engines/cairo_common/evas_cairo_private.h [deleted file]
src/modules/engines/cairo_x11/.cvsignore [deleted file]
src/modules/engines/cairo_x11/Evas_Engine_Cairo_X11.h [deleted file]
src/modules/engines/cairo_x11/Makefile.am [deleted file]
src/modules/engines/cairo_x11/evas_engine.c [deleted file]
src/modules/engines/cairo_x11/evas_engine.h [deleted file]
src/modules/engines/cairo_x11/evas_x_main.c [deleted file]
src/modules/engines/direct3d/.cvsignore [deleted file]
src/modules/engines/direct3d/Makefile.am
src/modules/engines/direct3d/evas_engine.c
src/modules/engines/directfb/Makefile.am
src/modules/engines/directfb/evas_engine.c
src/modules/engines/fb/.cvsignore [deleted file]
src/modules/engines/fb/Makefile.am
src/modules/engines/gl_common/.cvsignore [deleted file]
src/modules/engines/gl_common/Makefile.am
src/modules/engines/gl_common/evas_gl_common.h
src/modules/engines/gl_common/evas_gl_context.c
src/modules/engines/gl_common/evas_gl_filter.c [new file with mode: 0644]
src/modules/engines/gl_common/evas_gl_image.c
src/modules/engines/gl_common/evas_gl_shader.c
src/modules/engines/gl_common/evas_gl_texture.c
src/modules/engines/gl_common/shader/compile-s3c6410.sh
src/modules/engines/gl_common/shader/compile-sgx.sh
src/modules/engines/gl_common/shader/filter_blur.h [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_blur.shd [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_blur_bgra.h [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_blur_bgra.shd [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.h [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.shd [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_blur_nomul.h [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_blur_nomul.shd [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_blur_vert.h [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_blur_vert.shd [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_greyscale.h [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_greyscale.shd [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_greyscale_bgra.h [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_greyscale_bgra.shd [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.h [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.shd [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_greyscale_nomul.h [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_greyscale_nomul.shd [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_invert.h [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_invert.shd [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_invert_bgra.h [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_invert_bgra.shd [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.h [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.shd [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_invert_nomul.h [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_invert_nomul.shd [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_sepia.h [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_sepia.shd [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_sepia_bgra.h [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_sepia_bgra.shd [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.h [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.shd [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_sepia_nomul.h [new file with mode: 0644]
src/modules/engines/gl_common/shader/filter_sepia_nomul.shd [new file with mode: 0644]
src/modules/engines/gl_glew/.cvsignore [deleted file]
src/modules/engines/gl_glew/Evas_Engine_GL_Glew.h [deleted file]
src/modules/engines/gl_glew/Makefile.am [deleted file]
src/modules/engines/gl_glew/evas_engine.c [deleted file]
src/modules/engines/gl_glew/evas_engine.h [deleted file]
src/modules/engines/gl_glew/evas_glew_win32_main.c [deleted file]
src/modules/engines/gl_sdl/Makefile.am
src/modules/engines/gl_sdl/evas_engine.c
src/modules/engines/gl_x11/.cvsignore [deleted file]
src/modules/engines/gl_x11/Makefile.am
src/modules/engines/gl_x11/evas_engine.c
src/modules/engines/gl_x11/evas_engine.h
src/modules/engines/gl_x11/evas_x_main.c
src/modules/engines/quartz/Evas_Engine_Quartz.h [deleted file]
src/modules/engines/quartz/Makefile.am [deleted file]
src/modules/engines/quartz/README [deleted file]
src/modules/engines/quartz/evas_engine.c [deleted file]
src/modules/engines/quartz/evas_engine.h [deleted file]
src/modules/engines/quartz/evas_quartz_private.h [deleted file]
src/modules/engines/software_16/.cvsignore [deleted file]
src/modules/engines/software_16/Makefile.am
src/modules/engines/software_16/evas_engine.c
src/modules/engines/software_16_ddraw/.cvsignore [deleted file]
src/modules/engines/software_16_ddraw/Makefile.am
src/modules/engines/software_16_sdl/.cvsignore [deleted file]
src/modules/engines/software_16_sdl/Makefile.am
src/modules/engines/software_16_sdl/evas_engine.c
src/modules/engines/software_16_wince/.cvsignore [deleted file]
src/modules/engines/software_16_wince/Makefile.am
src/modules/engines/software_16_x11/.cvsignore [deleted file]
src/modules/engines/software_16_x11/Makefile.am
src/modules/engines/software_8/Makefile.am
src/modules/engines/software_8/evas_engine.c
src/modules/engines/software_8_x11/Makefile.am
src/modules/engines/software_ddraw/.cvsignore [deleted file]
src/modules/engines/software_ddraw/Makefile.am
src/modules/engines/software_gdi/Makefile.am
src/modules/engines/software_generic/.cvsignore [deleted file]
src/modules/engines/software_generic/Makefile.am
src/modules/engines/software_generic/evas_engine.c
src/modules/engines/software_qtopia/.cvsignore [deleted file]
src/modules/engines/software_qtopia/Evas_Engine_Software_Qtopia.h [deleted file]
src/modules/engines/software_qtopia/Makefile.am [deleted file]
src/modules/engines/software_qtopia/evas_engine.c [deleted file]
src/modules/engines/software_qtopia/evas_engine.h [deleted file]
src/modules/engines/software_qtopia/evas_outbuf.c [deleted file]
src/modules/engines/software_qtopia/evas_qt_main.cpp [deleted file]
src/modules/engines/software_sdl/.cvsignore [deleted file]
src/modules/engines/software_sdl/Makefile.am
src/modules/engines/software_sdl/evas_engine.c
src/modules/engines/software_x11/.cvsignore [deleted file]
src/modules/engines/software_x11/Makefile.am
src/modules/engines/software_x11/evas_xcb_outbuf.c
src/modules/engines/software_x11/evas_xlib_buffer.c
src/modules/engines/software_x11/evas_xlib_outbuf.c
src/modules/engines/xrender_x11/.cvsignore [deleted file]
src/modules/engines/xrender_x11/Evas_Engine_XRender_X11.h [deleted file]
src/modules/engines/xrender_x11/Makefile.am [deleted file]
src/modules/engines/xrender_x11/evas_engine.c [deleted file]
src/modules/engines/xrender_x11/evas_engine.h [deleted file]
src/modules/engines/xrender_x11/evas_engine_xcb_font.c [deleted file]
src/modules/engines/xrender_x11/evas_engine_xcb_image.c [deleted file]
src/modules/engines/xrender_x11/evas_engine_xcb_render.c [deleted file]
src/modules/engines/xrender_x11/evas_engine_xcb_ximage.c [deleted file]
src/modules/engines/xrender_x11/evas_engine_xlib_font.c [deleted file]
src/modules/engines/xrender_x11/evas_engine_xlib_image.c [deleted file]
src/modules/engines/xrender_x11/evas_engine_xlib_render.c [deleted file]
src/modules/engines/xrender_x11/evas_engine_xlib_ximage.c [deleted file]
src/modules/loaders/.cvsignore [deleted file]
src/modules/loaders/Makefile.am
src/modules/loaders/bmp/Makefile.am
src/modules/loaders/edb/.cvsignore [deleted file]
src/modules/loaders/edb/Makefile.am
src/modules/loaders/eet/.cvsignore [deleted file]
src/modules/loaders/eet/Makefile.am
src/modules/loaders/eet/evas_image_load_eet.c
src/modules/loaders/generic/Makefile.am [new file with mode: 0644]
src/modules/loaders/generic/evas_image_load_generic.c [new file with mode: 0644]
src/modules/loaders/gif/.cvsignore [deleted file]
src/modules/loaders/gif/Makefile.am
src/modules/loaders/ico/Makefile.am
src/modules/loaders/jpeg/.cvsignore [deleted file]
src/modules/loaders/jpeg/Makefile.am
src/modules/loaders/jpeg/evas_image_load_jpeg.c
src/modules/loaders/pmaps/.cvsignore [deleted file]
src/modules/loaders/pmaps/Makefile.am
src/modules/loaders/pmaps/evas_image_load_pmaps.c
src/modules/loaders/png/.cvsignore [deleted file]
src/modules/loaders/png/Makefile.am
src/modules/loaders/psd/Makefile.am [new file with mode: 0644]
src/modules/loaders/psd/evas_image_load_psd.c [new file with mode: 0644]
src/modules/loaders/svg/.cvsignore [deleted file]
src/modules/loaders/svg/Makefile.am
src/modules/loaders/svg/evas_image_load_svg.c
src/modules/loaders/tga/Makefile.am
src/modules/loaders/tga/evas_image_load_tga.c
src/modules/loaders/tiff/.cvsignore [deleted file]
src/modules/loaders/tiff/Makefile.am
src/modules/loaders/tiff/evas_image_load_tiff.c
src/modules/loaders/wbmp/Makefile.am
src/modules/loaders/xpm/.cvsignore [deleted file]
src/modules/loaders/xpm/Makefile.am
src/modules/savers/.cvsignore [deleted file]
src/modules/savers/edb/.cvsignore [deleted file]
src/modules/savers/edb/Makefile.am
src/modules/savers/eet/.cvsignore [deleted file]
src/modules/savers/eet/Makefile.am
src/modules/savers/jpeg/.cvsignore [deleted file]
src/modules/savers/jpeg/Makefile.am
src/modules/savers/png/.cvsignore [deleted file]
src/modules/savers/png/Makefile.am
src/modules/savers/png/evas_image_save_png.c
src/modules/savers/tiff/.cvsignore [deleted file]
src/modules/savers/tiff/Makefile.am
src/static_deps/Makefile.am [new file with mode: 0644]
src/static_deps/liblinebreak/AUTHORS [new file with mode: 0644]
src/static_deps/liblinebreak/ChangeLog [new file with mode: 0644]
src/static_deps/liblinebreak/LICENCE [new file with mode: 0644]
src/static_deps/liblinebreak/LineBreak1.sed [new file with mode: 0644]
src/static_deps/liblinebreak/LineBreak2.sed [new file with mode: 0644]
src/static_deps/liblinebreak/Makefile.am [new file with mode: 0644]
src/static_deps/liblinebreak/NEWS [new file with mode: 0644]
src/static_deps/liblinebreak/README [new file with mode: 0644]
src/static_deps/liblinebreak/filter_dup.c [new file with mode: 0644]
src/static_deps/liblinebreak/gen_linebreak_data.sh [new file with mode: 0755]
src/static_deps/liblinebreak/linebreak.c [new file with mode: 0644]
src/static_deps/liblinebreak/linebreak.h [new file with mode: 0644]
src/static_deps/liblinebreak/linebreakdata.c [new file with mode: 0644]
src/static_deps/liblinebreak/linebreakdata1.tmpl [new file with mode: 0644]
src/static_deps/liblinebreak/linebreakdata2.tmpl [new file with mode: 0644]
src/static_deps/liblinebreak/linebreakdata3.tmpl [new file with mode: 0644]
src/static_deps/liblinebreak/linebreakdef.c [new file with mode: 0644]
src/static_deps/liblinebreak/linebreakdef.h [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
index 75b5960..ed740ca 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -22,3 +22,7 @@ Samsung Electronics <tbd>
 Samsung SAIT <tbd>
 Sung W. Park <sungwoo@gmail.com>
 Jiyoun Park <jy0703.park@samsung.com>
+Myoungwoon Roy Kim(roy_kim) <myoungwoon.kim@samsung.com> <myoungwoon@gmail.com>
+Thierry el Borgi <thierry@substantiel.fr>
+Shilpa Singh <shilpa.singh@samsung.com> <shilpasingh.o@gmail.com>
+
index bdefc25..13d27a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -72,7 +72,7 @@
 
 2011-02-12  Carsten Haitzler (The Rasterman)
 
-       * Fix "rediculous scaling size" bug, where scaling images to
+       * Fix "ridiculous scaling size" bug, where scaling images to
          sizes like 1 billion pixels high or wide caused evas to try
          allocate scaletables on the stack and the stack just couldn't
          handle it. Now it only allocates a table for the visible
 2011-02-22  Carsten Haitzler (The Rasterman)
 
        * Fixed bug smart calc array where it'd nuke the array when nested
-         process calls hapen and leave some objects uncalculated, but
+         process calls happen and leave some objects uncalculated, but
          removed from the array and marked as needing a calc thus never
          getting back into the array.
 
 
        * Added vertical alignment support to textblock.
          API: evas_object_textblock_valign_set/get
+
+2011-04-04  Sung W. Park
+
+       * Added Evas OpenGL interface to be able to get an OpenGL API for
+        rendering to image objects. This is the beginning so not
+        totally functional yet.
+
+2011-04-05  Cedric Bail
+
+       * Remove Evas Quartz backend.
+       * Remove Evas Cairo backend.
+       * Remove Evas Qtopia backend.
+       * Remove Evas Xrender backend.
+
+2011-04-06  Carsten Haitzler (The Rasterman)
+
+       * Fix bug in GL engine with someone stealing the GLX context away
+        as well as scissor clips when rotated output is not 0 (90, 180, 270).
+
+2011-04-07 Tom Hacohen (TAsn)
+
+       * Textblock: Major speed improvements.
+       * Textblock: Only relayout and remake paragraphs that have actually
+         changed. This means we are a lot faster than before, especially with
+         long texts.
+
+2011-04-10 Tom Hacohen (TAsn)
+
+       * Textblock: Fixed a bug in evas_object_textblock_text_markup_prepend
+         that caused it to use the object's cursor instead of the cursor
+         passed.
+
+2011-04-11  Carsten Haitzler (The Rasterman)
+
+       * Feature: Text & Textblock - Add 8 explicit shadow directions for
+        text style effects.
+
+2011-04-12 Myoungwoon Roy Kim (roy_kim)
+
+       * Font-engine: Added runtime italic (actually slanting) and
+         emboldening. - Automatically slants/emboldens a font at runtime if
+         italic/bold/crusiva and etc are requested but not found in the
+         system.
+
+2011-04-14 Tom Hacohen (TAsn)
+
+       * Font-engine: Implemented higher level override API for the bidi
+         functions. This implements clause HL4 of the bidi algorithm.
+         This is very cool actually, it lets us to force-separate paragraphs
+         so each part will get his bidi calculated on it's own. This is very
+         useful for "to" field of email/sms applications where ',' is used to
+         separate different text entities.
+
+2011-04-19 Brett Nash (nash)
+
+       * Filters: So filtering of various flavours.  They work only on images
+         (use a proxy if you want it on other objects).  Documentation inline.
+         Supports a filter object or filter under (the area where the object
+         is filtered).  Various parameters to tweak, and potential for
+         additional filters (but you get to write the shader ;-)
+
+2011-04-24 Thierry el Borgi
+
+       * Add PSD file format support.
+
+2011-04-26  Carsten Haitzler (The Rasterman)
+
+       * Added "generic" image loader that can just execute some command
+        to load any given file format and read the RGBA data as stdout
+        from the command, or from an intermediate temporary file or
+        shared memory segment the executable loader provides. Evas
+        doesn't care about the loader beyond it providing output via
+        stdout to define image parameters (size, alpha channel and data
+        information), and evas will call a specific loader binary
+        based on extension name of srouce file. This allows for evas to
+        load image data from files where the loader may be prone to
+        instability, or require use of libraries that are GPL or
+        otherwise undesirable in terms of the result to applications
+        using evas. So basically, if you want a GPL loader or have a
+        very unstable one, write a loader binary and call it
+        evas_image_loader.extension e.g. evas_image_loader.pdf or
+        evas_image_loader.xcf or evas_image_loader.xcf.gz etc. etc.
+
+2011-04-28 Shilpaonkar Singh
+
+       * Textblock: Add "password" tag to turn on/off password in the middle
+         of the textblok. Especially useful for implementing "show last char"
+         for password entries.
+
+2011-05-04  Carsten Haitzler (The Rasterman)
+
+       * Improved table layout for homogenous mode to handle not column
+        or row multiple sized table better.
+
+2011-05-04  Jiyoun Park
+
+       * OpenGL binary shader ability to cache (save and load back
+        later) to avoid re-compiling shaders on every time an app starts and
+        uses the GL engine. Faster startup time.
+
+2011-05-04 Tom Hacohen (TAsn)
+
+       * Textblock: Do standard compliant line breaks. In order to achieve
+         that we now statically link against liblinebreak (available in
+         src/static_deps/liblinebreak). It's usage can be disabled using the
+         configure flag: "--disable-liblinebreak"; Disabling it will activate
+         the fallback line breaking methods which are not very correct, but
+         are possibly faster. I haven't noticed any difference between the
+         two speed-wise, but there probably are in some rare cases.
+
+2011-05-06 Cedric Bail
+
+       * Don't try all image loader when user is pointing them on a directory.
+
+2011-05-11  Carsten Haitzler (The Rasterman)
+
+       * Fix problem with Evas engine not calling pre/post swap functions
+        in the GL engine when using EGL/OpenGL-ES2
+        * Fix SVG loader 2 phase loader having differing scale down code
+        for first and 2nd phase. Resulted in crash when loading some SVGs
+
+2011-05-11 Tom Hacohen (TAsn)
+
+       * Textblock: Added evas_textblock_node_format_list_get. This is very
+         useful for edje_entry that uses anchors in the text.
+
+2011-05-12  Carsten Haitzler (The Rasterman)
+
+       * Add smart instance usage count get function for ability to free
+        data from memory from a smart class if needed.
+
+2011-05-12 Brian Wang
+
+       * Textblock: fix segfault with evas_textblock_cursor_content_get
+
+2011-05-12  Carsten Haitzler (The Rasterman)
+
+       * Add a smart "Grid" layout object that lays out objects in a regular
+        "virtual resolution" grid (eg 100x100) so you can lay them out
+        as a "scaled percentage" of the virtual resolution. virtual
+        resolution is defineable as is the geometry of each member.
+
+2011-05-18  Sung W. Park
+
+       * Fix some internal stencil and depth requests for OpenGL-ES2
+        due to OpenGL-ES limitations.
+        * Fix Surface recreation for FBO in Evas GL support.
+
+2011-05-23  Vincent Torri
+
+       * Fix compilation with libjpeg 8 on Windows.
+
+2011-05-24  Cedric Bail
+
+       * Use Eina_File when possible.
+
+2011-05-26  Carsten Haitzler (The Rasterman)
+
+       * Fix Evas table to handle weighting correctly for items and veto
+        rows or columns that have any child spanning that column not
+        able to expand.
+        * Fix Evas table to use actual fractional weights, not just
+        boolean expand/not expand from weight value.
+
+2011-05-27  Carsten Haitzler (The Rasterman)
+
+       * Add evas_event_thaw_eval() for conveneince of evaluating in state
+        and callbacks of the pointer after a thaw is complete.
+
+2011-05-29  Tom Hacohen (TAsn)
+
+       * Font-engine: Fixed a bug in glyph search causing inconsistent return
+         values. The found fi should always be NULL if there was no fi found.
+
+2011-05-29  Tom Hacohen (TAsn)
+
+       * Font-engine: Conform to the API changes in Harfbuzz 0.6.0
+
+2011-05-29  Raoul Hecky
+
+       * Textblock: Added support for numeric escape codes. e.g "&#x3c;".
+
+2011-05-29  Vincent Torri
+
+       * Fix compilation when --disable-async-preload is passed to configure.
+
+2011-06-01  Cedric Bail
+
+       * Add +evas_object_image_extension_can_load_get and
+       evas_object_image_extension_can_load_fast_get that check if a file
+       may be opened by Evas_Object_Image.
+
+2011-06-07  Cedric Bail
+
+       * Use Eina_File for JPEG loader.
+       * Add evas_object_image_load_orientation_get and evas_object_image_load_orientation_set,
+       that tell if we should honor the orientation information when loading image file.
index 235b7b6..1f44c81 100644 (file)
@@ -32,19 +32,14 @@ autogen.sh \
 README.in \
 README \
 evas.pc.in \
-evas-cairo-x11.pc.in \
 evas-directfb.pc.in \
 evas-fb.pc.in \
 evas-opengl-x11.pc.in \
 evas-opengl-sdl.pc.in \
-evas-opengl-glew.pc.in \
 evas-software-buffer.pc.in \
-evas-software-qtopia.pc.in \
 evas-software-x11.pc.in \
 evas-software-16-x11.pc.in \
 evas-software-8-x11.pc.in \
-evas-xrender-x11.pc.in \
-evas-xrender-xcb.pc.in \
 evas-software-gdi.pc.in \
 evas-software-ddraw.pc.in \
 evas-software-16-ddraw.pc.in \
@@ -81,10 +76,6 @@ if BUILD_ENGINE_BUFFER
 pkgconfig_DATA += evas-software-buffer.pc
 endif
 
-#if BUILD_ENGINE_SOFTWARE_QTOPIA
-#pkgconfig_DATA += evas-software-qtopia.pc
-#endif
-
 if BUILD_ENGINE_GL_X11
 pkgconfig_DATA += evas-opengl-x11.pc
 endif
@@ -93,26 +84,6 @@ if BUILD_ENGINE_GL_SDL
 pkgconfig_DATA += evas-opengl-sdl.pc
 endif
 
-if BUILD_ENGINE_QUARTZ
-pkgconfig_DATA += evas-quartz.pc
-endif
-
-if BUILD_ENGINE_GL_GLEW
-pkgconfig_DATA += evas-opengl-glew.pc
-endif
-
-#if BUILD_ENGINE_CAIRO_X11
-#pkgconfig_DATA += evas-cairo-x11.pc
-#endif
-
-if BUILD_ENGINE_XRENDER_X11
-pkgconfig_DATA += evas-xrender-x11.pc
-endif
-
-if BUILD_ENGINE_XRENDER_XCB
-pkgconfig_DATA += evas-xrender-xcb.pc
-endif
-
 if BUILD_ENGINE_SOFTWARE_GDI
 pkgconfig_DATA += evas-software-gdi.pc
 endif
index bfcfaba..4625f68 100644 (file)
--- a/README.in
+++ b/README.in
@@ -19,7 +19,6 @@ Must:
 Recommended:
   libX11
   libXext
-  libXrender
   fontconfig
   libpng
   libjpeg
@@ -27,7 +26,7 @@ Recommended:
   libpthread
 
 Optional:
-  XCB SDL OpenGL Qtopia librsvg libtiff libgif edb DirectFB
+  XCB SDL OpenGL librsvg libtiff libgif edb DirectFB
 
 Evas is a clean display canvas API for several target display systems
 that can draw anti-aliased text, smooth super and sub-sampled scaled
@@ -192,22 +191,6 @@ pixels, allowing the results of rendering to be directly read out or
 used again for other purposes.
 
 
---enable-xrender-x11[=static]
-
-this engine uses the xrender api to do drawing via (possibly)
-accelerated 2d or 3d hardware means. as such xrender has never lived
-up to its possible performance levels and has fallen into disrepair.
-use this engine at your own risk. it is considered to be "bitrotting"
-and be unmaintained.
-
-
---enable-xrender-xcb[=static]
-
-this is the same as xrender-x11 but uses/exposes an xcb api. It is not
-recommended to use this as it's experimental and will create problems
-with both ecore_evas and enlightenment itself.
-
-
 --enable-gl-x11[=static]
 
 this is the opengl engine. it is intended for an x11 target (via xlib)
@@ -352,16 +335,6 @@ windows direct-draw engine for evas
 evas direct3d engine (experimental)
 
 
---enable-quartz[=static]
-
-macos-x quartz engine (experimental)
-
-
---enable-gl-glew[=static]
-
-opengl glew based gl engine for evas (experimental)
-
-
 --enable-software-sdl[=static]
 
 this is the sdl engine that uses sdl library (http://www.libsdl.org). This
@@ -876,5 +849,3 @@ found here:
   http://www.koders.com/c/fid2B518462CB1EED3D4E31E271DB83CD1582F6EEBE.aspx
 It should be installed in the mingw include directory.
 
-For the OpenGL engine on Windows, the glew library is needed:
-  http://glew.sourceforge.net/
index 6499736..b7397d4 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 touch README
+touch ABOUT-NLS
 
 echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1
 echo "Running autoheader..." ; autoheader || exit 1
@@ -8,6 +9,28 @@ echo "Running autoconf..." ; autoconf || exit 1
 echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
 echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
 
+W=0
+
+rm -f config.cache-env.tmp
+echo "OLD_PARM=\"$@\"" >> config.cache-env.tmp
+echo "OLD_CFLAGS=\"$CFLAGS\"" >> config.cache-env.tmp
+echo "OLD_PATH=\"$PATH\"" >> config.cache-env.tmp
+echo "OLD_PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\"" >> config.cache-env.tmp
+echo "OLD_LDFLAGS=\"$LDFLAGS\"" >> config.cache-env.tmp
+
+cmp config.cache-env.tmp config.cache-env >> /dev/null
+if [ $? -ne 0 ]; then
+       W=1;
+fi
+
+if [ $W -ne 0 ]; then
+       echo "Cleaning configure cache...";
+       rm -f config.cache config.cache-env
+       mv config.cache-env.tmp config.cache-env
+else
+       rm -f config.cache-env.tmp
+fi
+
 if [ -z "$NOCONFIGURE" ]; then
        ./configure -C "$@"
 fi
index 344847c..d8f4646 100644 (file)
@@ -90,25 +90,20 @@ AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
 want_fontconfig="auto"
 want_fribidi="auto"
 want_harfbuzz="auto"
+want_pixman="no"
 want_evas_cserve="yes"
 
 want_evas_engine_buffer="yes"
 want_evas_engine_software_xlib="no"
-want_evas_engine_xrender_x11="no"
 want_evas_engine_gl_x11="no"
 want_evas_engine_gl_sdl="no"
-want_evas_engine_cairo_x11="no"
 want_evas_engine_software_xcb="no"
-want_evas_engine_xrender_xcb="no"
 want_evas_engine_software_gdi="no"
 want_evas_engine_software_ddraw="no"
 want_evas_engine_direct3d="no"
-want_evas_engine_quartz="no"
-want_evas_engine_gl_glew="no"
 want_evas_engine_software_sdl="no"
 want_evas_engine_fb="no"
 want_evas_engine_directfb="no"
-want_evas_engine_software_qtopia="no"
 want_evas_engine_software_8_x11="no"
 want_evas_engine_software_16_x11="no"
 want_evas_engine_software_16_ddraw="no"
@@ -127,6 +122,8 @@ want_evas_image_loader_bmp="yes"
 want_evas_image_loader_tga="yes"
 want_evas_image_loader_wbmp="yes"
 want_evas_image_loader_ico="yes"
+want_evas_image_loader_psd="yes"
+want_evas_image_loader_generic="yes"
 
 want_evas_font_loader_eet="yes"
 
@@ -149,7 +146,6 @@ case "$host_os" in
       ;;
    darwin*)
       want_evas_engine_software_xlib="auto"
-      want_evas_engine_quartz="auto"
       ;;
    *)
       want_evas_engine_software_xlib="auto"
@@ -157,7 +153,6 @@ case "$host_os" in
       want_evas_engine_fb="auto"
 ### no - not ready/usable/complete
 #      want_evas_engine_software_8_x11="auto"
-#      want_evas_engine_xrender_x11="auto"
 #      want_evas_engine_software_16_x11="auto"
       ;;
 esac
@@ -236,6 +231,10 @@ esac
 
 # Eina
 PKG_CHECK_MODULES([EINA], [eina >= 1.0.0])
+CPPFLAGS_SAVE="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $EINA_CFLAGS"
+AC_CHECK_SIZEOF(Eina_Unicode,, [#include <Eina.h>])
+CPPFLAGS="$CPPFLAGS_SAVE"
 
 # Freetype
 PKG_CHECK_MODULES([FREETYPE], [freetype2 >= 9.3.0])
@@ -273,6 +272,33 @@ if test "x${want_fontconfig}" = "xyes" -o "x${want_fontconfig}" = "xauto" ; then
       ])
 fi
 
+# linebreak
+have_linebreak="no"
+want_linebreak="yes"
+AC_ARG_ENABLE([liblinebreak],
+   AC_HELP_STRING([--disable-liblinebreak],
+      [disable linking against liblinebreak. @<:@default=enabled@:>@]),
+   [
+    if test "x${enableval}" = "xyes" ; then
+       want_linebreak="yes"
+    else
+       want_linebreak="no"
+    fi
+   ])
+
+
+AM_CONDITIONAL(EVAS_USE_LINEBREAK, test "x${want_linebreak}" = "xyes")
+if test "x${want_linebreak}" = "xyes" ; then
+   have_linebreak="yes"
+   LINEBREAK_CFLAGS='-I$(top_srcdir)/src/static_deps/liblinebreak'
+   LINEBREAK_LIBS='$(top_builddir)/src/static_deps/liblinebreak/liblinebreak.la'
+   AC_SUBST(LINEBREAK_CFLAGS)
+   AC_SUBST(LINEBREAK_LIBS)
+   AC_DEFINE(HAVE_LINEBREAK, 1, [have liblinebreak support])
+else
+   have_linebreak="no"
+fi
+
 # fribidi support
 have_fribidi="no"
 AC_ARG_ENABLE([fribidi],
@@ -293,6 +319,10 @@ if test "x${want_fribidi}" = "xyes" -o "x${want_fribidi}" = "xauto" ; then
        have_fribidi="yes"
        AC_DEFINE(HAVE_FRIBIDI, 1, [have fribidi support])
        requirement_evas="fribidi ${requirement_evas}"
+       CPPFLAGS_SAVE="$CPPFLAGS"
+       CPPFLAGS="$CPPFLAGS $FRIBIDI_CFLAGS"
+       AC_CHECK_SIZEOF(FriBidiChar,, [#include <fribidi/fribidi.h>])
+       CPPFLAGS="$CPPFLAGS_SAVE"
       ],
       [
        if test "x$want_fribidi" = "xyes" -a "x$use_strict" = "xyes" ; then
@@ -307,7 +337,6 @@ fi
 
 # harfbuzz support
 have_harfbuzz="no"
-have_harfbuzz_glib="no"
 have_harfbuzz_ft="no"
 AC_ARG_ENABLE([harfbuzz],
    AC_HELP_STRING([--disable-harfbuzz],
@@ -322,7 +351,7 @@ AC_ARG_ENABLE([harfbuzz],
 
 if test "x${want_harfbuzz}" = "xyes" -o "x${want_harfbuzz}" = "xauto" ; then
    PKG_CHECK_MODULES([HARFBUZZ],
-      [harfbuzz >= 0.2],
+      [harfbuzz >= 0.6.0],
       [
        have_harfbuzz="yes"
        requirement_evas="harfbuzz ${requirement_evas}"
@@ -350,15 +379,6 @@ if test "x${want_harfbuzz}" = "xyes" -o "x${want_harfbuzz}" = "xauto" ; then
            fi
            have_harfbuzz="no"
           ])
-# nice to have if harfbuzz has it
-      AC_CHECK_HEADER(hb-glib.h,
-          [
-           have_harfbuzz_glib="yes"
-           AC_DEFINE(HAVE_HARFBUZZ_GLIB, 1, [have harfbuzz glib support])
-          ],
-          [
-           have_harfbuzz_glib="no"
-          ])
       CPPFLAGS="$CPPFLAGS_SAVE"
    fi
 fi
@@ -367,9 +387,38 @@ if test "x${have_harfbuzz}" = "xno"; then
   HAS_HARFBUZZ=0
 fi
 
+# Pixman
+have_pixman="no"
+AC_ARG_ENABLE([pixman],
+   AC_HELP_STRING([--disable-pixman],
+      [disable pixman for software rendering. @<:@default=enabled@:>@]),
+   [
+    if test "x${enableval}" = "xyes" ; then
+       want_pixman="yes"
+    else
+       want_pixman="no"
+    fi
+   ])
+
+
+if test "x${want_pixman}" = "xyes" -o "x${want_pixman}" = "xauto" ; then
+   PKG_CHECK_MODULES([PIXMAN],
+      [pixman-1],
+      [
+       have_pixman="yes"
+       AC_DEFINE(HAVE_PIXMAN, 1, [have pixman for rendering])
+       requirement_evas="pixman-1 ${requirement_evas}"
+      ],
+      [
+       if test "x${want_pixman}" = "xyes" -a "x${use_strict}" = "xyes" ; then
+          AC_MSG_ERROR([Pixman not found (strict dependencies checking)])
+       fi
+      ])
+fi
+
 ### Checks for header files
 AC_HEADER_STDC
-AC_CHECK_HEADERS([unistd.h stdint.h sys/param.h])
+AC_CHECK_HEADERS([unistd.h stdint.h sys/param.h netinet/in.h])
 
 EFL_CHECK_PATH_MAX
 
@@ -453,6 +502,32 @@ case "$host_os" in
 esac
 AC_SUBST(dlopen_libs)
 
+SHM_OPEN_LINK=""
+AC_MSG_CHECKING([whether shm_open() is present])
+LIBS_save=${LIBS}
+LIBS="${LIBS} -lrt"
+AC_LINK_IFELSE(
+   [AC_LANG_PROGRAM(
+      [[
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+      ]],
+      [[
+int fd;
+fd = shm_open("/", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+shm_unlink("/");
+      ]])],
+   [
+    have_shm_open="yes"
+    AC_DEFINE(HAVE_SHM_OPEN, 1, [Have shm_open() call])
+    SHM_OPEN_LINK="-lrt"
+   ],
+   [have_shm_open="no"])
+LIBS=${LIBS_save}
+AC_MSG_RESULT([${have_shm_open}])
+AC_SUBST(SHM_OPEN_LINK)
+
 # (shm_open (for cache server)
 AC_ARG_ENABLE([evas-cserve],
    AC_HELP_STRING([--disable-evas-cserve],
@@ -583,27 +658,16 @@ EVAS_CHECK_ENGINE([buffer], [${want_evas_engine_buffer}], [yes], [Buffer])
 
 EVAS_CHECK_ENGINE([software-xlib], [${want_evas_engine_software_xlib}], [yes], [Software Xlib])
 
-EVAS_CHECK_ENGINE([xrender-x11], [${want_evas_engine_xrender_x11}], [yes], [XRender X11])
-
 EVAS_CHECK_ENGINE([gl-x11], [${want_evas_engine_gl_x11}], [yes], [OpenGL X11])
 
-# disable cairo engine for the release
-#EVAS_CHECK_ENGINE([cairo-x11], [${want_evas_engine_cairo_x11}], [yes], [Cairo X11])
-
 EVAS_CHECK_ENGINE([software-xcb], [${want_evas_engine_software_xcb}], [no], [Software XCB])
 
-EVAS_CHECK_ENGINE([xrender-xcb], [${want_evas_engine_xrender_xcb}], [no], [XRender XCB])
-
 EVAS_CHECK_ENGINE([software-gdi], [${want_evas_engine_software_gdi}], [no], [Software GDI])
 
 EVAS_CHECK_ENGINE([software-ddraw], [${want_evas_engine_software_ddraw}], [no], [Software DirectDraw])
 
 EVAS_CHECK_ENGINE([direct3d], [${want_evas_engine_direct3d}], [no], [Direct3D])
 
-EVAS_CHECK_ENGINE([quartz], [${want_evas_engine_quartz}], [no], [Quartz])
-
-EVAS_CHECK_ENGINE([gl-glew], [${want_evas_engine_gl_glew}], [no], [OpenGL Glew])
-
 EVAS_CHECK_ENGINE([software-sdl], [${want_evas_engine_software_sdl}], [no], [Software SDL])
 
 EVAS_CHECK_ENGINE([gl-sdl], [${want_evas_engine_gl_sdl}], [yes], [OpenGL SDL])
@@ -612,9 +676,6 @@ EVAS_CHECK_ENGINE([fb], [${want_evas_engine_fb}], [yes], [Framebuffer])
 
 EVAS_CHECK_ENGINE([directfb], [${want_evas_engine_directfb}], [no], [DirectFB])
 
-# disable qtopia engine for the release
-#EVAS_CHECK_ENGINE([software-qtopia], [${want_evas_engine_software_qtopia}], [no], [Qtopia])
-
 EVAS_CHECK_ENGINE([software-8-x11], [${want_evas_engine_software_8_x11}], [yes], [Software X11 8 bits grayscale])
 
 EVAS_CHECK_ENGINE([software-16-x11], [${want_evas_engine_software_16_x11}], [yes], [Software X11 16 bits])
@@ -623,24 +684,14 @@ EVAS_CHECK_ENGINE([software-16-ddraw], [${want_evas_engine_software_16_ddraw}],
 
 EVAS_CHECK_ENGINE([software-16-wince], [${want_evas_engine_software_16_wince}], [no], [Software Windows CE 16 bits])
 
-# common cairo
-#have_evas_engine_cairo_common="no"
-#if test "x${have_evas_engine_cairo_x11}" = "xyes" ; then
-#   have_evas_engine_cairo_common="yes"
-#   AC_DEFINE([BUILD_ENGINE_CAIRO_COMMON], [1], [Generic Cairo Rendering Support])
-#fi
-#AM_CONDITIONAL([BUILD_ENGINE_CAIRO_COMMON], [test "x$have_evas_engine_cairo_common" = "xyes"])
-
 # common gl
 have_evas_engine_gl_common="no"
 have_static_evas_engine_gl_common="no"
 if test "x$have_evas_engine_gl_x11" = "xyes" \
-   || test "x$have_evas_engine_gl_glew" = "xyes" \
    || test "x$have_evas_engine_gl_sdl" = "xyes"; then
    have_evas_engine_gl_common="yes"
 fi
 if test "x$have_evas_engine_gl_x11" = "xstatic" \
-   || test "x$have_evas_engine_gl_glew" = "xstatic" \
    || test "x$have_evas_engine_gl_sdl" = "xstatic"; then
    have_evas_engine_gl_common="yes"
    have_static_evas_engine_gl_common="yes"
@@ -837,6 +888,10 @@ EVAS_CHECK_IMAGE_LOADER([WBMP], [${want_evas_image_loader_wbmp}])
 
 EVAS_CHECK_IMAGE_LOADER([ICO], [${want_evas_image_loader_ico}])
 
+EVAS_CHECK_IMAGE_LOADER([PSD], [${want_evas_image_loader_psd}])
+
+EVAS_CHECK_IMAGE_LOADER([GENERIC], [${want_evas_image_loader_generic}])
+
 #####################################################################
 ## Cpu based optimizations
 
@@ -1514,10 +1569,14 @@ AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"])
 build_examples="no"
 AC_ARG_ENABLE([build-examples],
    AC_HELP_STRING([--enable-build-examples],
-                  [enable building examples. @<:@default==disabled@:>@]),
+                  [enable building examples (this requires extra denpendencies. if you don't have them installed yet, don't build with this option or it will fail. build again when you have it, overriding the previous installation). @<:@default==disabled@:>@]),
    [
     if test "x${enableval}" = "xyes" ; then
        build_examples="yes"
+       # put in here the dependencies for Evas' examples. they are
+       # meant to be 'real world' usage examples, thus one will be
+       # using higher level libraries on these programs
+       PKG_CHECK_MODULES([ECORE_EVAS], [ecore-evas ecore])
     else
        build_examples="no"
     fi
@@ -1542,16 +1601,12 @@ AC_OUTPUT([
 Makefile
 evas-directfb.pc
 evas-fb.pc
-evas-opengl-glew.pc
 evas-opengl-x11.pc
 evas-opengl-sdl.pc
-evas-quartz.pc
 evas-software-buffer.pc
 evas-software-x11.pc
 evas-software-8-x11.pc
 evas-software-16-x11.pc
-evas-xrender-x11.pc
-evas-xrender-xcb.pc
 evas-software-gdi.pc
 evas-software-ddraw.pc
 evas-software-16-ddraw.pc
@@ -1561,6 +1616,7 @@ evas-software-sdl.pc
 evas.pc
 doc/evas.dox
 doc/Makefile
+doc/Doxyfile
 src/Makefile
 src/bin/Makefile
 src/lib/Makefile
@@ -1590,11 +1646,8 @@ 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_glew/Makefile
 src/modules/engines/gl_x11/Makefile
 src/modules/engines/gl_sdl/Makefile
-src/modules/engines/quartz/Makefile
-src/modules/engines/xrender_x11/Makefile
 src/modules/engines/software_sdl/Makefile
 src/modules/engines/software_8/Makefile
 src/modules/engines/software_8_x11/Makefile
@@ -1616,26 +1669,22 @@ 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
 README
 evas.spec
 ])
 
-#disabled for the release:
-# evas-cairo-x11.pc
-# evas-software-qtopia.pc
-# src/modules/engines/cairo_common/Makefile
-# src/modules/engines/cairo_x11/Makefile
-# src/modules/engines/software_qtopia/Makefile
-
-
 #####################################################################
 ## Sanity Checks
 
@@ -1675,19 +1724,15 @@ echo
 echo "Engines:"
 echo "  Software Memory Buffer.....: $have_evas_engine_buffer"
 echo "  Software X11...............: $have_evas_engine_software_x11 (Xlib: $have_evas_engine_software_xlib) (XCB: $have_evas_engine_software_xcb)"
-echo "  XRender X11................: $have_evas_engine_xrender_x11 (XCB: $have_evas_engine_xrender_xcb)"
 echo $ECHO_N "  OpenGL X11.................: $have_evas_engine_gl_x11 $ECHO_C"
 if test "x$have_evas_engine_gl_x11" = "xyes"; then
   echo "(GLES: $gl_flavor_gles) (SGX: $gles_variety_sgx) (s3c6410: $gles_variety_s3c6410)"
 else
   echo
 fi
-dnl echo "  Cairo X11..................: $have_evas_engine_cairo_x11"
 echo "  Software GDI...............: $have_evas_engine_software_gdi"
 echo "  Software DirectDraw........: $have_evas_engine_software_ddraw"
 echo "  Direct3d...................: $have_evas_engine_direct3d"
-echo "  Quartz.....................: $have_evas_engine_quartz"
-echo "  OpenGL Glew................: $have_evas_engine_gl_glew"
 echo "  Software SDL...............: $have_evas_engine_software_sdl (primitive: $sdl_primitive)"
 echo $ECHO_N "  OpenGL SDL.................: $have_evas_engine_gl_sdl $ECHO_C"
 if test "x$have_evas_engine_gl_sdl" = "xyes"; then
@@ -1697,7 +1742,6 @@ else
 fi
 echo "  Software Framebuffer.......: $have_evas_engine_fb"
 echo "  DirectFB...................: $have_evas_engine_directfb"
-dnl echo "  Software Qtopia............: $have_evas_engine_software_qtopia"
 echo "  Software 8bit grayscale....: $have_evas_engine_software_8"
 # FIXME: kill software 16bit
 echo "  Software 16bit ............: $have_evas_engine_software_16"
@@ -1710,11 +1754,13 @@ echo "Image Loaders:"
 echo "  BMP.....................: $have_evas_image_loader_bmp"
 echo "  EDB.....................: $have_evas_image_loader_edb"
 echo "  EET.....................: $have_evas_image_loader_eet"
+echo "  GENERIC.................: $have_evas_image_loader_generic"
 echo "  GIF.....................: $have_evas_image_loader_gif"
 echo "  ICO.....................: $have_evas_image_loader_ico"
 echo "  JPEG....................: $have_evas_image_loader_jpeg (region: $have_jpeg_region)"
 echo "  PMAPS...................: $have_evas_image_loader_pmaps"
 echo "  PNG.....................: $have_evas_image_loader_png"
+echo "  PSD.....................: $have_evas_image_loader_psd"
 echo "  SVG.....................: $have_evas_image_loader_svg"
 echo "  TGA.....................: $have_evas_image_loader_tga"
 echo "  TIFF....................: $have_evas_image_loader_tiff"
@@ -1730,6 +1776,7 @@ echo
 echo "Font Rendering Helpers:"
 echo "  Fribidi.................: $have_fribidi"
 echo "  Harfbuzz................: $have_harfbuzz"
+echo "  liblinebreak............: $have_linebreak"
 # FIXME: add non freetype2 font engine support
 # FIXME: make freetype2 optional
 echo
diff --git a/doc/.cvsignore b/doc/.cvsignore
deleted file mode 100644 (file)
index cc370ed..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-html
-latex
-man
similarity index 78%
rename from doc/Doxyfile
rename to doc/Doxyfile.in
index d1c0539..91405ce 100644 (file)
@@ -1,20 +1,20 @@
 PROJECT_NAME           = Evas
-PROJECT_NUMBER         =
+PROJECT_NUMBER         = @PACKAGE_VERSION@
 OUTPUT_DIRECTORY       = .
-INPUT                  = evas.dox ../src/lib
+INPUT                  = @srcdir@/evas.dox @srcdir@/examples.dox @top_srcdir@/src/lib
 IMAGE_PATH             = img
 OUTPUT_LANGUAGE        = English
 GENERATE_HTML          = YES
 HTML_OUTPUT            = html
 HTML_FILE_EXTENSION    = .html
-HTML_HEADER            = head.html
-HTML_FOOTER            = foot.html
-HTML_STYLESHEET        = e.css
+HTML_HEADER            = @srcdir@/head.html
+HTML_FOOTER            = @srcdir@/foot.html
+HTML_STYLESHEET        = @srcdir@/e.css
 HTML_ALIGN_MEMBERS     = YES
 ENUM_VALUES_PER_LINE   = 1
 GENERATE_HTMLHELP      = NO
-CHM_FILE               = 
-HHC_LOCATION           = 
+CHM_FILE               =
+HHC_LOCATION           =
 GENERATE_CHI           = NO
 BINARY_TOC             = NO
 TOC_EXPAND             = NO
@@ -31,7 +31,7 @@ REPEAT_BRIEF           = YES
 ALWAYS_DETAILED_SEC    = NO
 INLINE_INHERITED_MEMB  = NO
 FULL_PATH_NAMES        = NO
-STRIP_FROM_PATH        = 
+STRIP_FROM_PATH        =
 INTERNAL_DOCS          = NO
 STRIP_CODE_COMMENTS    = NO
 CASE_SENSE_NAMES       = YES
@@ -51,8 +51,8 @@ GENERATE_TODOLIST      = YES
 GENERATE_TESTLIST      = YES
 GENERATE_BUGLIST       = YES
 GENERATE_DEPRECATEDLIST= YES
-ALIASES                = 
-ENABLED_SECTIONS       = 
+ALIASES                =
+ENABLED_SECTIONS       =
 MAX_INITIALIZER_LINES  = 30
 OPTIMIZE_OUTPUT_FOR_C  = YES
 OPTIMIZE_OUTPUT_JAVA   = NO
@@ -61,16 +61,16 @@ QUIET                  = NO
 WARNINGS               = YES
 WARN_IF_UNDOCUMENTED   = YES
 WARN_FORMAT            = "$file:$line: $text"
-WARN_LOGFILE           = 
+WARN_LOGFILE           =
 FILE_PATTERNS          =
 RECURSIVE              = YES
-EXCLUDE                = 
+EXCLUDE                =
 EXCLUDE_SYMLINKS       = NO
-EXCLUDE_PATTERNS       = 
-EXAMPLE_PATH           = ../src/examples
-EXAMPLE_PATTERNS       = 
+EXCLUDE_PATTERNS       =
+EXAMPLE_PATH           = @top_srcdir@/src/examples
+EXAMPLE_PATTERNS       = *.c,*.h
 EXAMPLE_RECURSIVE      = YES
-INPUT_FILTER           = 
+INPUT_FILTER           =
 FILTER_SOURCE_FILES    = NO
 SOURCE_BROWSER         = NO
 INLINE_SOURCES         = NO
@@ -87,8 +87,8 @@ LATEX_CMD_NAME         = latex
 MAKEINDEX_CMD_NAME     = makeindex
 COMPACT_LATEX          = NO
 PAPER_TYPE             = a4wide
-EXTRA_PACKAGES         = 
-LATEX_HEADER           = 
+EXTRA_PACKAGES         =
+LATEX_HEADER           =
 PDF_HYPERLINKS         = YES
 USE_PDFLATEX           = NO
 LATEX_BATCHMODE        = NO
@@ -96,27 +96,27 @@ GENERATE_RTF           = NO
 RTF_OUTPUT             = rtf
 COMPACT_RTF            = NO
 RTF_HYPERLINKS         = NO
-RTF_STYLESHEET_FILE    = 
-RTF_EXTENSIONS_FILE    = 
+RTF_STYLESHEET_FILE    =
+RTF_EXTENSIONS_FILE    =
 GENERATE_MAN           = YES
 MAN_OUTPUT             = man
 MAN_EXTENSION          = .3
 MAN_LINKS              = YES
 GENERATE_XML           = NO
-XML_SCHEMA             = 
-XML_DTD                = 
+XML_SCHEMA             =
+XML_DTD                =
 GENERATE_AUTOGEN_DEF   = NO
 ENABLE_PREPROCESSING   = YES
 MACRO_EXPANSION        = NO
 EXPAND_ONLY_PREDEF     = NO
 SEARCH_INCLUDES        = NO
 INCLUDE_PATH           =
-INCLUDE_FILE_PATTERNS  = 
-PREDEFINED             = 
-EXPAND_AS_DEFINED      = 
+INCLUDE_FILE_PATTERNS  =
+PREDEFINED             =
+EXPAND_AS_DEFINED      =
 SKIP_FUNCTION_MACROS   = YES
-TAGFILES               = 
-GENERATE_TAGFILE       = 
+TAGFILES               =
+GENERATE_TAGFILE       =
 ALLEXTERNALS           = NO
 EXTERNAL_GROUPS        = YES
 PERL_PATH              = /usr/bin/perl
@@ -130,8 +130,8 @@ INCLUDE_GRAPH          = NO
 INCLUDED_BY_GRAPH      = NO
 GRAPHICAL_HIERARCHY    = NO
 DOT_IMAGE_FORMAT       = png
-DOT_PATH               = 
-DOTFILE_DIRS           = 
+DOT_PATH               =
+DOTFILE_DIRS           =
 MAX_DOT_GRAPH_WIDTH    = 512
 MAX_DOT_GRAPH_HEIGHT   = 512
 GENERATE_LEGEND        = YES
index 1022871..1aeb0c0 100644 (file)
@@ -11,14 +11,14 @@ doc-clean:
 
 doc: all doc-clean
        $(efl_doxygen)
-       cp img/* html/
+       cp $(srcdir)/img/* html/
        rm -rf $(PACKAGE_DOCNAME).tar*
        mkdir -p $(PACKAGE_DOCNAME)/doc
        cp -R html/ latex/ man/ $(PACKAGE_DOCNAME)/doc
        tar cf $(PACKAGE_DOCNAME).tar $(PACKAGE_DOCNAME)/
        bzip2 -9 $(PACKAGE_DOCNAME).tar
        rm -rf $(PACKAGE_DOCNAME)/
-       mv $(PACKAGE_DOCNAME).tar.bz2 $(top_srcdir)
+       mv $(PACKAGE_DOCNAME).tar.bz2 $(top_builddir)
 
 clean-local: doc-clean
 
@@ -29,4 +29,9 @@ doc:
 
 endif
 
-EXTRA_DIST = Doxyfile $(wildcard img/*.*) e.css head.html foot.html evas.dox.in
+EXTRA_DIST = $(srcdir)/Doxyfile.in \
+       $(wildcard $(srcdir)/img/*.*) \
+       $(srcdir)/e.css \
+       $(srcdir)/head.html \
+       $(srcdir)/foot.html \
+       $(srcdir)/evas.dox.in
index 2721361..e69de29 100644 (file)
@@ -1,323 +0,0 @@
-/**
-
-@mainpage Evas
-
-@image html  e_big.png
-
-@version @PACKAGE_VERSION@
-@author Carsten Haitzler <raster@@rasterman.com>
-@author Till Adam <till@@adam-lilienthal.de>
-@author Steve Ireland <sireland@@pobox.com>
-@author Brett Nash <nash@@nash.id.au>
-@author Tilman Sauerbeck <tilman@@code-monkey.de>
-@author Corey Donohoe <atmos@@atmos.org>
-@author Yuri Hudobin <glassy_ape@@users.sourceforge.net>
-@author Nathan Ingersoll <ningerso@@d.umn.edu>
-@author Willem Monsuwe <willem@@stack.nl>
-@author Jose O Gonzalez <jose_ogp@@juno.com>
-@author Bernhard Nemec <Bernhard.Nemec@@viasyshc.com>
-@author Jorge Luis Zapata Muga <jorgeluis.zapata@@gmail.com>
-@author Cedric Bail <cedric.bail@@free.fr>
-@author Gustavo Sverzut Barbieri <barbieri@@profusion.mobi>
-@author Vincent Torri <vtorri@@univ-evry.fr>
-@author Tim Horton <hortont424@@gmail.com>
-@author Tom Hacohen <tom@@stosb.com>
-@author Mathieu Taillefumier <mathieu.taillefumier@@free.fr>
-@author Iván Briano <ivan@@profusion.mobi>
-@author Gustavo Lima Chaves <glima@@profusion.mobi>
-@author Samsung Electronics <tbd>
-@author Samsung SAIT <tbd>
-@author Sung W. Park <sungwoo@@gmail.com>
-@author Jiyoun Park <jy0703.park@@samsung.com>
-@date 2000-2011
-
-@section toc Table of Contents
-
-@li @ref intro
-@li @ref work
-@li @ref compiling
-@li @ref install
-@li @ref next_steps
-@li @ref intro_example
-
-
-@section intro What is Evas?
-
-Evas is a clean display canvas API for several target display systems that
-can draw anti-aliased text, smooth super and sub-sampled scaled images,
-alpha-blend objects much and more.
-
-It abstracts any need to know much about what the characteristics of your
-display system are or what graphics calls are used to draw them and how. It
-deals on an object level where all you do is create and manipulate objects
-in a canvas, set their properties, and the rest is done for you.
-
-Evas optimises the rendering pipeline to minimise effort in redrawing changes
-made to the canvas and so takes this work out of the programmers hand,
-saving a lot of time and energy.
-
-It's small and lean, designed to work on embedded systems all the way to
-large and powerful multi-cpu workstations. It can be compiled to only have
-the features you need for your target platform if you so wish, thus keeping
-it small and lean. It has several display back-ends, letting it display on
-several display systems, making it portable for cross-device and
-cross-platform development.
-
-@subsection intro_not_evas What Evas is not?
-
-Evas is not a widget set or widget toolkit, however it is their
-base. See Elementary (http://docs.enlightenment.org/auto/elementary/)
-for a toolkit based on Evas, Edje, Ecore and other Enlightenment
-technologies.
-
-It is not dependent or aware of main loops, input or output
-systems. Input should be polled from various sources and feed them to
-Evas. Similarly, it will not create windows or report windows updates
-to your system, rather just drawing the pixels and reporting to the
-user the areas that were changed. Of course these operations are quite
-common and thus they are ready to use in Ecore, particularly in
-Ecore_Evas (http://docs.enlightenment.org/auto/ecore/).
-
-
-@section work How does Evas work?
-
-Evas is a canvas display library. This is markedly different from most
-display and windowing systems as a Canvas is structural and is also a state
-engine, whereas most display and windowing systems are immediate mode display
-targets. Evas handles the logic between a structural display via its' state
-engine, and controls the target windowing system in order to produce
-rendered results of the current canvases state on the display.
-
-Immediate mode display systems retain very little, or no state. A program
-will execute a series of commands, as in the pseudo code:
-
-@verbatim
-draw line from position (0, 0) to position (100, 200);
-
-draw rectangle from position (10, 30) to position (50, 500);
-
-bitmap_handle = create_bitmap();
-scale bitmap_handle to size 100 x 100;
-draw image bitmap_handle at position (10, 30);
-@endverbatim
-
-The series of commands is executed by the windowing system and the results
-are displayed on the screen (normally). Once the commands are executed the
-display system has little or no idea of how to reproduce this image again,
-and so has to be instructed by the application how to redraw sections of the
-screen whenever needed. Each successive command will be executed as
-instructed by the application and either emulated by software or sent to the
-graphics hardware on the device to be performed.
-
-The advantage of such a system is that it is simple, and gives a program
-tight control over how something looks and is drawn. Given the increasing
-complexity of displays and demands by users to have better looking
-interfaces, more and more work is needing to be done at this level by the
-internals of widget sets, custom display widgets and other programs. This
-means more and more logic and display rendering code needs to be written
-time and time again, each time the application needs to figure out how to
-minimise redraws so that display is fast and interactive, and keep track of
-redraw logic. The power comes at a high-price, lots of extra code and work.
-Programmers not very familiar with graphics programming will often make
-mistakes at this level and produce code that is sub optimal. Those familiar
-with this kind of programming will simply get bored by writing the same code
-again and again.
-
-For example, if in the above scene, the windowing system requires the
-application to redraw the area from 0, 0 to 50, 50 (also referred as
-"expose event"), then the programmer must calculate manually the
-updates and repaint it again:
-
-@verbatim
-Redraw from position (0, 0) to position (50, 50):
-
-// what was in area (0, 0, 50, 50)?
-
-// 1. intersection part of line (0, 0) to (100, 200)?
-      draw line from position (0, 0) to position (25, 50);
-
-// 2. intersection part of rectangle (10, 30) to (50, 500)?
-      draw rectangle from position (10, 30) to position (50, 50)
-
-// 3. intersection part of image at (10, 30), size 100 x 100?
-      bitmap_subimage = subregion from position (0, 0) to position (40, 20)
-      draw image bitmap_subimage at position (10, 30);
-@endverbatim
-
-The clever reader might have noticed that, if all elements in the
-above scene are opaque, then the system is doing useless paints: part
-of the line is behind the rectangle, and part of the rectangle is
-behind the image. These useless paints tends to be very costly, as
-pixels tend to be 4 bytes in size, thus an overlapping region of 100 x
-100 pixels is around 40000 useless writes! The developer could write
-code to calculate the overlapping areas and avoid painting then, but
-then it should be mixed with the "expose event" handling mentioned
-above and quickly one realizes the initially simpler method became
-really complex.
-
-Evas is a structural system in which the programmer creates and manages
-display objects and their properties, and as a result of this higher level
-state management, the canvas is able to redraw the set of objects when
-needed to represent the current state of the canvas.
-
-For example, the pseudo code:
-
-@verbatim
-line_handle = create_line();
-set line_handle from position (0, 0) to position (100, 200);
-show line_handle;
-
-rectangle_handle = create_rectangle();
-move rectangle_handle to position (10, 30);
-resize rectangle_handle to size 40 x 470;
-show rectangle_handle;
-
-bitmap_handle = create_bitmap();
-scale bitmap_handle to size 100 x 100;
-move bitmap_handle to position (10, 30);
-show bitmap_handle;
-
-render scene;
-@endverbatim
-
-This may look longer, but when the display needs to be refreshed or updated,
-the programmer only moves, resizes, shows, hides etc. the objects that they
-need to change. The programmer simply thinks at the object logic level, and
-the canvas software does the rest of the work for them, figuring out what
-actually changed in the canvas since it was last drawn, how to most
-efficiently redraw he canvas and its contents to reflect the current state,
-and then it can go off and do the actual drawing of the canvas.
-
-This lets the programmer think in a more natural way when dealing with a
-display, and saves time and effort of working out how to load and display
-images, render given the current display system etc. Since Evas also is
-portable across different display systems, this also gives the programmer
-the ability to have their code ported and display on different display
-systems with very little work.
-
-Evas can be seen as a display system that stands somewhere between a widget
-set and an immediate mode display system. It retains basic display logic,
-but does very little high-level logic such as scrollbars, sliders, push
-buttons etc.
-
-
-@section compiling How to compile using Evas ?
-
-Evas is a library your application links to. The procedure for this is very
-simple. You simply have to compile your application with the appropriate
-compiler flags that the @p pkg-config script outputs. For example:
-
-Compiling C or C++ files into object files:
-
-@verbatim
-gcc -c -o main.o main.c `pkg-config --cflags evas`
-@endverbatim
-
-Linking object files into a binary executable:
-
-@verbatim
-gcc -o my_application main.o `pkg-config --libs evas`
-@endverbatim
-
-You simply have to make sure that pkg-config is in your shell's PATH (see
-the manual page for your appropriate shell) and evas.pc in /usr/lib/pkgconfig
-or its path is in the PKG_CONFIG_PATH environment variable. It's that simple
-to link and use Evas once you have written your code to use it.
-
-Since the program is linked to Evas, it is now able to use any advertised
-API calls to display graphics in a canvas managed by Evas, as well as use
-the API calls provided to manage data as well.
-
-You should make sure you add any extra compile and link flags to your
-compile commands that your application may need as well. The above example
-is only guaranteed to make Evas add it's own requirements.
-
-
-@section install How is it installed?
-
-Simple:
-
-@verbatim
-./configure
-make
-su -
-...
-make install
-@endverbatim
-
-@section next_steps Next Steps
-
-After you understood what Evas is and installed it in your system you
-should proceed understanding the programming interface for all
-objects, then see the specific for the most used elements. We'd
-recommend you to take a while to learn Ecore
-(http://docs.enlightenment.org/auto/ecore/) and Edje
-(http://docs.enlightenment.org/auto/edje/) as they will likely save
-you tons of work compared to using just Evas directly.
-
-Recommended reading:
-
-@li @ref Evas_Object_Group
-@li @ref Evas_Object_Rectangle
-@li @ref Evas_Object_Image
-@li @ref Evas_Object_Text
-@li @ref Evas_Smart_Object_Group and @ref Evas_Smart_Group to define
-    an object that provides custom functions to handle clipping,
-    hiding, moving, resizing, setting the color and more. These could
-    be as simple as a group of objects that move together (see @ref
-    Evas_Smart_Object_Clipped). These smart objects can implement what
-    ends to be a widget, providing some intelligence (thus the name),
-    like a button or check box.
-
-@section intro_example Introductory Example
-
-@include evas-buffer-simple.c
-
-
-
-@todo (1.0) Need a way ot scaling an image and just PRODUCING the output (scaling direct to target buffe r- no blend/copy etc.)
-@todo (1.0) Could improve evas's scaling down code to limit multiple samples per output pixel to maybe 2x2?
-@todo (1.0) Document API
-@todo (1.0) Evas needs to check delete_me member for all object functions
-@todo (1.0) Evas engine that renders to Evas_Objects
-@todo (1.0) OpenGL engine needs to use texture meshes
-@todo (1.0) OpenGL engine needs texture cache and size setting
-@todo (1.0) OpenGL Engine needs YUV import API to YUV texture
-@todo (1.0) All engines need pixel import API
-@todo (1.0) Add parital render through composite layer api to engines
-@todo (1.0) Move callback processing to a queue and do it asynchronously???
-@todo (1.0) Add button grabbing
-@todo (1.0) Add generic object method call system
-@todo (1.0) Add callbacks set for smart object parents to be set on all child smart objects too.
-@todo (1.0) Add font load query calls (so we know if a font load failed)
-@todo (1.0) Add font listing calls
-@todo (1.0) Add ability to check image comments & disk format
-@todo (1.0) Add fontset support
-@todo (1.0) Export engine rendering API cleanly to Evas API
-@todo (1.0) Add smart object ability to provide rendering callback
-@todo (1.1) Make freetype optional and put in optional graymap font engine
-@todo (1.1) Free images if object invisible (and put back in chache)
-@todo (1.1) Check robustness of malloc/calloc/realloc failures.
-@todo (1.1) Add memory use reduction code if any allocations fail
-@todo (1.1) If image loads fails due to memory allocatue failure, load reduced res version
-@todo (1.1) If image load fails due to memory allocation failure, try split it up into tiles and demand-load them
-@todo (1.2) Add external image loaders (application provided callbacks to load)
-@todo (1.2) Add loadable image loader module support (evas loads file.so)
-@todo (1.2) Add external image loader modules (application provides path to file.so)
-@todo (1.3) Add X11 primtive engine (ie pixmap)
-@todo (1.3) Add immediate mode drawing commands to image objects
-@todo (1.3) Fix FB engine to allocate vt and release properly
-@todo (1.4) Add ellipse objects (circle, arc, ellipse etc.)
-@todo (1.5) Make software engine draw lines & polys etc. with aa
-@todo (1.5) Add radial gradients to gradient objects
-@todo (1.5) Add Symbian Engine
-@todo (1.6) Add PalmOS Engine
-@todo (1.6) Add Apple OpenGL Engine
-@todo (1.7) Document engine API and other internals
-@todo (1.7) Allow any object to clip any other object, and not just rectangles
-@todo (1.8) Add more evas demos
-@todo (1.9) Write the error mechanism in evas_xcb_buffer.c
-@todo (1.9) Rewrite the render xcb engine
-@todo (1.10) Improve Win32 Direct3D Engine
-
-*/
diff --git a/doc/examples.dox b/doc/examples.dox
new file mode 100644 (file)
index 0000000..c537822
--- /dev/null
@@ -0,0 +1,42 @@
+/**
+ * @page Examples Examples
+ *
+ * Here is a page with examples.
+ *
+ * @ref Example_Evas_Buffer_Simple
+ *
+ * @ref Example_Evas_Init_Shutdown
+ *
+ * @ref Example_Evas_Load_Error_Str
+ *
+ */
+
+/**
+ * @page Example_Evas_Buffer_Simple Simple Evas canvas example
+ *
+ * The canvas will here use the buffer engine.
+ *
+ * @include evas-buffer-simple.c
+ * @example evas-buffer-simple.c
+ */
+
+/**
+ * @page Example_Evas_Init_Shutdown Evas' init/shutdown routines example
+ *
+ * @include evas-init-shutdown.c
+ * @example evas-init-shutdown.c
+ */
+
+/**
+ * @page Example_Evas_Load_Error_Str evas_load_error_str() example
+ *
+ * @include evas-load-error-str.c
+ * @example evas-load-error-str.c
+ */
+
+/**
+ * @page Example_Evas_Events Evas' canvas events example
+ *
+ * @include evas-events.c
+ * @example evas-events.c
+ */
diff --git a/evas-cairo-x11.pc.in b/evas-cairo-x11.pc.in
deleted file mode 100644 (file)
index 4f5c9cf..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Name: evas-cairo-x11
-Description: Evas Cairo X11 engine
-Version: @VERSION@
diff --git a/evas-opengl-glew.pc.in b/evas-opengl-glew.pc.in
deleted file mode 100644 (file)
index c5ee7ab..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Name: evas-opengl-glew
-Description: Evas OpenGL Glew engine
-Version: @VERSION@
diff --git a/evas-quartz.pc.in b/evas-quartz.pc.in
deleted file mode 100644 (file)
index dccd393..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Name: evas-quartz
-Description: Evas Quartz engine
-Version: @VERSION@
diff --git a/evas-software-qtopia.pc.in b/evas-software-qtopia.pc.in
deleted file mode 100644 (file)
index 4edb41c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Name: evas-software-qtopia
-Description: Evas software Qtopia engine
-Version: @VERSION@
diff --git a/evas-xrender-x11.pc.in b/evas-xrender-x11.pc.in
deleted file mode 100644 (file)
index 9d28d13..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Name: evas-xrender-x11
-Description: Evas XRender X11 engine
-Version: @VERSION@
diff --git a/evas-xrender-xcb.pc.in b/evas-xrender-xcb.pc.in
deleted file mode 100644 (file)
index ba30c43..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Name: evas-xrender-xcb
-Description: Evas XRender XCB engine
-Version: @VERSION@
index ff110f1..b470e98 100644 (file)
 %bcond_with    module_saver_edb
 %bcond_with    module_engine_directfb
 %bcond_with    module_engine_gl_x11
-%bcond_with    module_engine_quartz
-%bcond_with    module_engine_software_qtopia
 %bcond_with    module_engine_software_16_x11
 %bcond_with    module_engine_software_sdl
 %bcond_with    module_engine_software_xcb
-%bcond_with    module_engine_xrender_x11
-%bcond_with    module_engine_xrender_xcb
 %bcond_with    module_loader_gif
 %bcond_with    module_loader_svg
 
 %define ac_with_module_engine_software-x11 --%{?with_module_engine_software_x11:en}%{!?with_module_engine_software_x11:dis}able-software-x11
 %define ac_with_module_engine_buffer --%{?with_module_engine_buffer:en}%{!?with_module_engine_buffer:dis}able-buffer
 %define ac_with_module_engine_fb --%{?with_module_engine_fb:en}%{!?with_module_engine_fb:dis}able-fb
-%define ac_with_module_engine_xrender_x11 --%{?with_module_engine_xrender_x11:en}%{!?with_module_engine_xrender_x11:dis}able-xrender-x11
 %define ac_with_module_engine_gl_x11 --%{?with_module_engine_gl_x11:en}%{!?with_module_engine_gl_x11:dis}able-gl-x11
-%define ac_with_module_engine_quartz --%{?with_module_engine_quartz:en}%{!?with_module_engine_quartz:dis}able-quartz
 %define ac_with_module_engine_directfb --%{?with_module_engine_directfb:en}%{!?with_module_engine_directfb:dis}able-directfb
 %define ac_with_module_engine_software_16_x11 --%{?with_module_engine_software_16_x11:en}%{!?with_module_engine_software_16_x11:dis}able-software-16-x11
-%define ac_with_module_engine_software_qtopia --%{?with_module_engine_software_qtopia:en}%{!?with_module_engine_software_qtopia:dis}able-software-qtopia
 %define ac_with_module_engine_software_sdl --%{?with_module_engine_software_sdl:en}%{!?with_module_engine_software_sdl:dis}able-sdl
 %define ac_with_module_engine_software_xcb --%{?with_module_engine_software_xcb:en}%{!?with_module_engine_software_xcb:dis}able-software-xcb
-%define ac_with_module_engine_xrender_xcb --%{?with_module_engine_xrender_xcb:en}%{!?with_module_engine_xrender_xcb:dis}able-xrender-xcb
 
 %{!?_rel:%{expand:%%global _rel 0.r%(svnversion | sed 's/[^0-9].*$//' || echo 0000)}}
 
@@ -305,18 +297,6 @@ Requires: evas
 Framebuffer rendering engine module for Evas
 %endif
 
-%if %{with module_engine_xrender_x11}
-%package module_engine_xrender_x11
-Summary: XRender rendering engine module for Evas
-Group: System Environment/Libraries
-#BuildSuggests: xorg-x11-devel, XFree86-devel, xrender-devel
-BuildRequires: libXrender-devel
-Requires: evas-module_engine_software_generic
-Requires: evas
-%description module_engine_xrender_x11
-XRender rendering engine module for Evas
-%endif
-
 %if %{with module_engine_gl_x11}
 %package module_engine_gl_x11
 Summary: OpenGL under X11 rendering engine module for Evas
@@ -327,16 +307,6 @@ Requires: evas
 OpenGL under X11 rendering engine module for Evas
 %endif
 
-%if %{with module_engine_quartz}
-%package module_engine_quartz
-Summary: Quartz rendering engine module for Evas
-Group: System Environment/Libraries
-#BuildSuggests: 
-Requires: evas
-%description module_engine_quartz
-Quartz rendering engine module for Evas
-%endif
-
 %if %{with module_engine_directfb}
 %package module_engine_directfb
 Summary: Directfb rendering engine module for Evas
@@ -348,17 +318,6 @@ Requires: evas
 Directfb rendering engine module for Evas
 %endif
 
-%if %{with module_engine_software_qtopia}
-%package module_engine_software_qtopia
-Summary: Qtopia rendering engine module for Evas
-Group: System Environment/Libraries
-BuildRequires: qtopia-devel
-Requires: evas-module_engine_software_generic
-Requires: evas
-%description module_engine_software_qtopia
-Qtopia rendering engine module for Evas
-%endif
-
 %if %{with module_engine_software_16_x11}
 %package module_engine_software_16_x11
 Summary: Software 16-bit X11 rendering engine module for Evas
@@ -391,17 +350,6 @@ Requires: evas
 Software XCB X11 rendering engine module for Evas
 %endif
 
-%if %{with module_engine_xrender_xcb}
-%package module_engine_xrender_xcb
-Summary: Xrender XCB X11 rendering engine module for Evas
-Group: System Environment/Libraries
-BuildRequires: libxcb-devel
-Requires: evas-module_engine_xrender_x11
-Requires: evas
-%description module_engine_xrender_xcb
-Xrender XCB X11 rendering engine module for Evas
-%endif
-
 %prep
 %setup -q
 
@@ -424,15 +372,11 @@ Xrender XCB X11 rendering engine module for Evas
     %{?ac_with_module_engine_software_x11} \
     %{?ac_with_module_engine_buffer} \
     %{?ac_with_module_engine_fb} \
-    %{?ac_with_module_engine_xrender_x11} \
     %{?ac_with_module_engine_gl_x11} \
-    %{?ac_with_module_engine_quartz} \
     %{?ac_with_module_engine_directfb} \
-    %{?ac_with_module_engine_software_qtopia} \
     %{?ac_with_module_engine_software_16_x11} \
     %{?ac_with_module_engine_software_sdl} \
     %{?ac_with_module_engine_software_xcb} \
-    %{?ac_with_module_engine_xrender_xcb} \
     $RPM_CONFIGURE_OPTS
 %{__make} %{?_smp_mflags} %{?mflags}
 test -x `which doxygen` && /bin/sh gendoc || :
@@ -588,36 +532,18 @@ test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
 %{_libdir}/evas/modules/engines/fb/*/module.so
 %endif
 
-%if %{with module_engine_xrender_x11}
-%files module_engine_xrender_x11
-%defattr(-, root, root)
-%{_libdir}/evas/modules/engines/xrender_x11/*/module.so
-%endif
-
 %if %{with module_engine_gl_x11}
 %files module_engine_gl_x11
 %defattr(-, root, root)
 %{_libdir}/evas/modules/engines/gl_x11/*/module.so
 %endif
 
-%if %{with module_engine_quartz}
-%files module_engine_quartz
-%defattr(-, root, root)
-%{_libdir}/evas/modules/engines/quartz/*/module.so
-%endif
-
 %if %{with module_engine_directfb}
 %files module_engine_directfb
 %defattr(-, root, root)
 %{_libdir}/evas/modules/engines/directfb/*/module.so
 %endif
 
-%if %{with module_engine_software_qtopia}
-%files module_engine_software_qtopia
-%defattr(-, root, root)
-%{_libdir}/evas/modules/engines/software_qtopia/*/module.so
-%endif
-
 %if %{with module_engine_software_16_x11}
 %files module_engine_software_16_x11
 %defattr(-, root, root)
@@ -637,10 +563,4 @@ test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
 %{_libdir}/evas/modules/engines/software_xcb/*/module.so
 %endif
 
-%if %{with module_engine_xrender_xcb}
-%files module_engine_xrender_xcb
-%defattr(-, root, root)
-%{_libdir}/evas/modules/engines/xrender_xcb/*/module.so
-%endif
-
 %changelog
index d446075..b968602 100644 (file)
@@ -64,56 +64,6 @@ fi
 
 ])
 
-dnl use: EVAS_CHECK_ENGINE_DEP_XRENDER_X11(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-
-AC_DEFUN([EVAS_CHECK_ENGINE_DEP_XRENDER_X11],
-[
-
-evas_engine_[]$1[]_cflags=""
-evas_engine_[]$1[]_libs=""
-
-AC_PATH_X
-AC_PATH_XTRA
-
-AC_CHECK_HEADERS([X11/Xlib.h X11/extensions/Xrender.h],
-   [have_dep="yes"],
-   [have_dep="no"; break;])
-
-if test "x${have_dep}" = "xyes" ; then
-   AC_CHECK_LIB([X11], [XCreateImage], [have_dep="yes"], [have_dep="no"])
-fi
-
-if test "x${have_dep}" = "xyes" ; then
-   AC_CHECK_LIB([Xext], [XShmCreateImage], [have_dep="yes"], [have_dep="no"])
-fi
-
-if test "x${have_dep}" = "xyes" ; then
-   AC_CHECK_LIB([Xrender], [XRenderCreatePicture], [have_dep="yes"], [have_dep="no"])
-fi
-
-if test "x${have_dep}" = "xyes" ; then
-   if test "x$2" = "xyes" ; then
-      x_libs="${x_libs} -lX11 -lXext"
-   else
-      x_dir=${x_dir:-/usr/X11R6}
-      x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
-      x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext"
-   fi
-   evas_engine_[]$1[]_cflags="${x_cflags}"
-   evas_engine_[]$1[]_libs="${x_libs} -lXrender"
-fi
-
-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_GL_X11(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
 
 AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_X11],
@@ -226,53 +176,6 @@ fi
 
 ])
 
-dnl use: EVAS_CHECK_ENGINE_DEP_CAIRO_X11(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-
-AC_DEFUN([EVAS_CHECK_ENGINE_DEP_CAIRO_X11],
-[
-
-requirement=""
-have_dep="no"
-evas_engine_[]$1[]_cflags=""
-evas_engine_[]$1[]_libs=""
-
-AC_PATH_X
-AC_PATH_XTRA
-
-AC_CHECK_HEADER([X11/X.h],
-   [PKG_CHECK_MODULES([CAIRO],
-       [cairo >= 1.0.0],
-       [have_dep="yes" requirement="cairo"]
-    )]
-)
-
-if test "x${have_dep}" = "xyes" ; then
-   if test "x$2" = "xyes" ; then
-      x_libs="${x_libs} -lX11 -lXext"
-   else
-      x_dir=${x_dir:-/usr/X11R6}
-      x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
-      x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext"
-   fi
-   evas_engine_[]$1[]_cflags="${CAIRO_CFLAGS} ${x_cflags}"
-   evas_engine_[]$1[]_libs="${CAIRO_LIBS} ${x_libs}"
-fi
-
-AC_SUBST([evas_engine_$1_cflags])
-AC_SUBST([evas_engine_$1_libs])
-
-if test "x$3" = "xstatic" ; then
-   requirement_evas="${requirement} ${requirement_evas}"
-fi
-
-if test "x${have_dep}" = "xyes" ; then
-  m4_default([$4], [:])
-else
-  m4_default([$5], [:])
-fi
-
-])
-
 dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_XCB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
 
 AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_XCB],
@@ -310,43 +213,6 @@ fi
 
 ])
 
-dnl use: EVAS_CHECK_ENGINE_DEP_XRENDER_XCB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-
-AC_DEFUN([EVAS_CHECK_ENGINE_DEP_XRENDER_XCB],
-[
-
-requirement=""
-have_dep="no"
-evas_engine_[]$1[]_cflags=""
-evas_engine_[]$1[]_libs=""
-
-PKG_CHECK_MODULES([XCBRENDER],
-   [xcb xcb-shm xcb-render xcb-image >= 0.2.1 pixman-1],
-   [
-    have_dep="yes"
-    requirement="xcb xcb-shm xcb-render xcb-image pixman-1"
-    evas_engine_[]$1[]_cflags="${XCBRENDER_CFLAGS}"
-    evas_engine_[]$1[]_libs="${XCBRENDER_LIBS}"
-   ],[
-    have_dep="no"
-   ]
-)
-
-AC_SUBST([evas_engine_$1_cflags])
-AC_SUBST([evas_engine_$1_libs])
-
-if test "x$3" = "xstatic" ; then
-   requirement_evas="${requirement} ${requirement_evas}"
-fi
-
-if test "x${have_dep}" = "xyes" ; then
-  m4_default([$4], [:])
-else
-  m4_default([$5], [:])
-fi
-
-])
-
 dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_GDI(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
 
 AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_GDI],
@@ -428,73 +294,6 @@ fi
 
 ])
 
-dnl use: EVAS_CHECK_ENGINE_DEP_QUARTZ(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-
-AC_DEFUN([EVAS_CHECK_ENGINE_DEP_QUARTZ],
-[
-
-have_dep="no"
-evas_engine_[]$1[]_cflags=""
-evas_engine_[]$1[]_libs=""
-
-AC_REQUIRE([EVAS_MAYBE_GET_OBJCPP])
-
-AS_IF([test "x${rw_cv_prog_objc_works}" = "xyes"],
-[
-   m4_ifdef([AC_PROG_OBJC], [AC_LANG_PUSH([Objective C])])
-   AC_CHECK_HEADER([/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h], [
-      have_dep="yes"
-      evas_engine_[]$1[]_libs="-framework Cocoa"
-   ],[
-      have_dep="no"
-   ]) 
-   m4_ifdef([AC_PROG_OBJC], [AC_LANG_POP([Objective C])], [:])])
-
-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 Helper macro for EVAS_CHECK_ENGINE_DEP_QUARTZ
-
-AC_DEFUN([EVAS_MAYBE_GET_OBJCPP],
-[AS_IF([test "x${rw_cv_prog_objc_works}" = "xyes"],
-       [m4_ifdef([AC_PROG_OBJC], [AC_PROG_OBJCPP], [:])])
-])
-
-dnl use: EVAS_CHECK_ENGINE_DEP_GL_GLEW(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-
-AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_GLEW],
-[
-
-evas_engine_[]$1[]_cflags=""
-evas_engine_[]$1[]_libs=""
-
-AC_CHECK_HEADERS([GL/gl.h GL/glew.h],
-   [
-    have_dep="yes"
-    evas_engine_[]$1[]_libs="-lglew32 -lopengl32 -lgdi32"
-   ],
-   [have_dep="no"; break;]
-)
-
-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_SOFTWARE_SDL(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
 
 AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_SDL],
@@ -667,58 +466,6 @@ fi
 
 ])
 
-dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_QTOPIA(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-
-AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_QTOPIA],
-[
-
-have_dep="no"
-evas_engine_[]$1[]_cflags=""
-evas_engine_[]$1[]_libs=""
-evas_engine_[]$1[]_moc=""
-
-AC_ARG_WITH([qtdir],
-   [AC_HELP_STRING([--with-qtdir=QT_DIR], [use qt directory specified])],
-   [
-    qt_dir=$withval;
-    echo "using "$qt_dir" for qt directory.";
-   ],
-   [qt_dir="/opt/Qtopia"]
-)
-
-AC_LANG_PUSH(C++)
-
-AC_CHECK_HEADER([qdirectpainter_qws.h],
-   [have_dep="yes"],
-   [have_dep="no"],
-   [
-#include <qwidget.h>
-#include <qnamespace.h>
-#include <qbrush.h>
-#include <qpainter.h>
-   ]
-)
-
-AC_LANG_POP(C++)
-
-if test "x${have_dep}" = "xyes" ; then
-   evas_engine_[]$1[]_cflags="-fno-exceptions -fno-rtti -I${qt_dir}/include"
-   evas_engine_[]$1[]_libs="-L${qt_dir}/lib -lqte -lqpe"
-   evas_engine_[]$1[]_moc="${qt_dir}/bin/moc"
-fi
-
-AC_SUBST([evas_engine_$1_cflags])
-AC_SUBST([evas_engine_$1_libs])
-AC_SUBST([evas_engine_$1_moc])
-
-if test "x${have_dep}" = "xyes" ; then
-  m4_default([$4], [:])
-else
-  m4_default([$5], [:])
-fi
-
-])
-
 dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_8_X11(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
 
 AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_8_X11],
index d03ce09..0cb3d7b 100644 (file)
@@ -176,13 +176,40 @@ have_dep="no"
 evas_image_loader_[]$1[]_cflags=""
 evas_image_loader_[]$1[]_libs=""
 
-PKG_CHECK_EXISTS([libpng14], [PKG_CHECK_MODULES([PNG], [libpng14], [have_dep="yes" requirement="libpng14"], [have_dep="no"])],
-  [PKG_CHECK_EXISTS([libpng12], [PKG_CHECK_MODULES([PNG], [libpng12], [have_dep="yes" requirement="libpng12"], [have_dep="no"])],
-    [PKG_CHECK_EXISTS([libpng10], [PKG_CHECK_MODULES([PNG], [libpng10], [have_dep="yes" requirement="libpng10"], [have_dep="no"])],
-      [PKG_CHECK_MODULES([PNG], [libpng], [have_dep="yes" requirement="libpng"], [have_dep="no"])
-    ])
-  ])
-])
+dnl libpng.pc is the latest version of libpng that ahs been installed.
+dnl We check it first.
+PKG_CHECK_MODULES([PNG],
+   [libpng],
+   [have_dep="yes" requirement="libpng"],
+   [have_dep="no"])
+
+if test "x${have_dep}" = "xno" ; then
+   PKG_CHECK_MODULES([PNG],
+      [libpng15],
+      [have_dep="yes" requirement="libpng15"],
+      [have_dep="no"])
+fi
+
+if test "x${have_dep}" = "xno" ; then
+   PKG_CHECK_MODULES([PNG],
+      [libpng14],
+      [have_dep="yes" requirement="libpng14"],
+      [have_dep="no"])
+fi
+
+if test "x${have_dep}" = "xno" ; then
+   PKG_CHECK_MODULES([PNG],
+      [libpng12],
+      [have_dep="yes" requirement="libpng12"],
+      [have_dep="no"])
+fi
+
+if test "x${have_dep}" = "xno" ; then
+   PKG_CHECK_MODULES([PNG],
+      [libpng10],
+      [have_dep="yes" requirement="libpng10"],
+      [have_dep="no"])
+fi
 
 evas_image_loader_[]$1[]_cflags="${PNG_CFLAGS}"
 evas_image_loader_[]$1[]_libs="${PNG_LIBS}"
@@ -390,6 +417,46 @@ fi
 
 ])
 
+dnl use: EVAS_CHECK_LOADER_DEP_PSD(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+
+AC_DEFUN([EVAS_CHECK_LOADER_DEP_PSD],
+[
+
+have_dep="yes"
+evas_image_loader_[]$1[]_cflags=""
+evas_image_loader_[]$1[]_libs=""
+
+AC_SUBST([evas_image_loader_$1_cflags])
+AC_SUBST([evas_image_loader_$1_libs])
+
+if test "x${have_dep}" = "xyes" ; then
+  m4_default([$3], [:])
+else
+  m4_default([$4], [:])
+fi
+
+])
+
+dnl use: EVAS_CHECK_LOADER_DEP_GENERIC(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+
+AC_DEFUN([EVAS_CHECK_LOADER_DEP_GENERIC],
+[
+
+have_dep="yes"
+evas_image_loader_[]$1[]_cflags=""
+evas_image_loader_[]$1[]_libs=""
+
+AC_SUBST([evas_image_loader_$1_cflags])
+AC_SUBST([evas_image_loader_$1_libs])
+
+if test "x${have_dep}" = "xyes" ; then
+  m4_default([$3], [:])
+else
+  m4_default([$4], [:])
+fi
+
+])
+
 dnl use: EVAS_CHECK_IMAGE_LOADER(loader, want_loader, macro)
 
 
diff --git a/src/.cvsignore b/src/.cvsignore
deleted file mode 100644 (file)
index 3dda729..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile.in
-Makefile
index 8828c78..323da76 100644 (file)
@@ -1,3 +1,3 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-SUBDIRS = lib bin modules examples
+SUBDIRS = static_deps lib bin modules examples
index b8ad015..987e14b 100644 (file)
@@ -15,7 +15,8 @@ AM_CPPFLAGS = \
 @FRIBIDI_CFLAGS@ \
 @EET_CFLAGS@ \
 @FONTCONFIG_CFLAGS@ \
-@pthread_cflags@
+@pthread_cflags@ \
+@PIXMAN_CFLAGS@
 
 AM_CFLAGS = @WIN32_CFLAGS@
 
index e97f3a4..57ea38b 100644 (file)
@@ -990,7 +990,7 @@ message(void *fdata __UNUSED__, Server *s __UNUSED__, Client *c, int opcode, int
              Op_Load *rep;
              Op_Load_Reply msg;
              Img *img;
-             RGBA_Image_Loadopts lopt = {0, 0.0, 0, 0, {0, 0, 0, 0}};
+             RGBA_Image_Loadopts lopt = {0, 0.0, 0, 0, {0, 0, 0, 0}, 0};
              char *file = NULL, *key = NULL;
              
              DBG("OP_LOAD %i", c->pid);
index 8cdc079..acaa703 100644 (file)
@@ -10,7 +10,7 @@ int
 main(int argc, char **argv)
 {
    int i;
-   
+
    evas_init();
    if (!evas_cserve_init())
      {
@@ -86,8 +86,8 @@ main(int argc, char **argv)
           {
              Op_Getinfo_Reply *info;
              unsigned char *p;
-             int i, j;
-             
+             int h, j;
+
              info = evas_cserve_raw_info_get();
              if (!info)
                {
@@ -102,7 +102,7 @@ main(int argc, char **argv)
              printf("cache_memory: %i Kb\n", info->cached.mem_total);
              p = (unsigned char *)info;
              p += sizeof(Op_Getinfo_Reply);
-             for (i = 0; i < j; i++)
+             for (h = 0; h < j; h++)
                {
                   Op_Getinfo_Item it;
                   char *file, *key, buf[512];
@@ -111,7 +111,7 @@ main(int argc, char **argv)
                   memcpy(&it, p, sizeof(Op_Getinfo_Item));
                   file = (char*) (p + sizeof(Op_Getinfo_Item));
                   key = file + strlen(file) + 1;
-                  printf("-IMAGE- [#%i]\n", i);
+                  printf("-IMAGE- [#%i]\n", h);
                   printf("  file       : %s\n", file);
                   printf("  key        : %s\n", key);
                   printf("  size       : %i x %i\n", it.w, it.h);
index 746146d..5fb714b 100644 (file)
@@ -11,8 +11,10 @@ AM_CPPFLAGS = \
 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
+-DPACKAGE_EXAMPLES_DIR=\"$(datadir)/$(PACKAGE)/examples\" \
 @EINA_CFLAGS@ \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @FRIBIDI_CFLAGS@ \
 @EET_CFLAGS@ \
 @FONTCONFIG_CFLAGS@ \
@@ -30,14 +32,28 @@ evas_buffer_simple_SOURCES = evas-buffer-simple.c
 evas_buffer_simple_LDADD = $(top_builddir)/src/lib/libevas.la
 endif
 
-endif
+pkglib_PROGRAMS += evas_init_shutdown
+evas_init_shutdown_SOURCES = evas-init-shutdown.c
+evas_init_shutdown_LDADD = $(top_builddir)/src/lib/libevas.la
+
+AM_CPPFLAGS += @ECORE_EVAS_CFLAGS@
+
+pkglib_PROGRAMS += evas_load_error_str
+evas_load_error_str_SOURCES = evas-load-error-str.c
+evas_load_error_str_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@
 
+pkglib_PROGRAMS += evas_events
+evas_events_SOURCES = evas-events.c
+evas_events_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@
 
+endif # if BUILD_EXAMPLES
 
 filesdir = $(datadir)/$(PACKAGE)/examples
-files_DATA =
+files_DATA = $(srcdir)/enlightenment.png
 
 if INSTALL_EXAMPLES
 files_DATA += \
-       evas-buffer-simple.c
+       $(srcdir)/evas-buffer-simple.c \
+       $(srcdir)/evas-init-shutdown.c \
+       $(srcdir)/evas-load-error-str.c
 endif
diff --git a/src/examples/enlightenment.png b/src/examples/enlightenment.png
new file mode 100644 (file)
index 0000000..aeb836b
Binary files /dev/null and b/src/examples/enlightenment.png differ
diff --git a/src/examples/evas-events.c b/src/examples/evas-events.c
new file mode 100644 (file)
index 0000000..655ca27
--- /dev/null
@@ -0,0 +1,262 @@
+/**
+ * Simple Evas example illustrating how to interact with canvas
+ * events and other canvas operations.
+ *
+ * You'll need at least one engine built for it (excluding the buffer
+ * one) and the png image loader also built. See stdout/stderr for
+ * output.
+ *
+ * @verbatim
+ * gcc -o evas-events evas-events.c `pkg-config --libs --cflags ecore-evas`
+ * @endverbatim
+ */
+
+#ifdef HAVE_CONFIG_H
+
+#include "config.h"
+#endif
+
+#include <Ecore.h>
+#include <Ecore_Evas.h>
+#include <stdio.h>
+#include <errno.h>
+
+#define WIDTH  (320)
+#define HEIGHT (240)
+
+static const char *img_path = PACKAGE_EXAMPLES_DIR "/enlightenment.png";
+
+struct test_data
+{
+   Ecore_Evas  *ee;
+   Evas        *canvas;
+   Eina_Bool    obscured;
+   Evas_Object *img, *img2, *bg;
+   Ecore_Timer *resize_timer, *freeze_timer;
+};
+
+static struct test_data d = {0};
+
+/* here just to keep our example's window size and background image's
+ * size in synchrony */
+static void
+_canvas_resize_cb(Ecore_Evas *ee)
+{
+   int w, h;
+
+   ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
+   evas_object_resize(d.bg, w, h);
+}
+
+static void
+/* called when our rectangle gets focus */
+_object_focus_in_cb(void *data __UNUSED__,
+                    Evas *e,
+                    void *event_info)
+{
+   fprintf(stdout, "An object got focused: %s\n",
+           evas_object_name_get(event_info));
+
+   fprintf(stdout, "Let's recheck it: %s\n",
+           evas_object_name_get(evas_focus_get(e)));
+}
+
+static void
+_render_flush_cb(void *data __UNUSED__,
+                 Evas *e __UNUSED__,
+                 void *event_info __UNUSED__)
+{
+   fprintf(stdout, "Canvas is about to flush its rendering pipeline!\n");
+}
+
+static Eina_Bool
+/* put some action in the canvas */
+_resize_cb(void *data __UNUSED__)
+{
+   int w, h, cw, ch;
+
+   evas_object_geometry_get(d.img, NULL, NULL, &w, &h);
+   ecore_evas_geometry_get(d.ee, NULL, NULL, &cw, &ch);
+
+   if (w < cw)
+     evas_object_resize(d.img, cw, ch);
+   else
+     evas_object_resize(d.img, cw / 2, ch / 2);
+
+   return EINA_TRUE; /* re-issue the timer */
+}
+
+static Eina_Bool
+/* let's have our events back */
+_thaw_cb(void *data __UNUSED__)
+{
+   fprintf(stdout, "Canvas was frozen %d times, now thawing.\n",
+           evas_event_freeze_get(d.canvas));
+   evas_event_thaw(d.canvas);
+   return EINA_FALSE; /* do not re-issue the timer */
+}
+
+static void
+_on_keydown(void        *data __UNUSED__,
+            Evas        *evas,
+            Evas_Object *o __UNUSED__,
+            void        *einfo)
+{
+   const Evas_Modifier *mods;
+   Evas_Event_Key_Down *ev = einfo;
+
+   fprintf(stdout, "we've got key input: %s\n", ev->keyname);
+
+   if (strcmp(ev->keyname, "a") == 0) /* toggle animation timer */
+     {
+        if (d.resize_timer != NULL)
+          {
+             fprintf(stdout, "Stopping animation timer\n");
+             ecore_timer_del(d.resize_timer);
+             d.resize_timer = NULL;
+          }
+        else
+          {
+             fprintf(stdout, "Re-issuing animation timer\n");
+             d.resize_timer = ecore_timer_add(2, _resize_cb, NULL);
+          }
+        return;
+     }
+
+   if (strcmp(ev->keyname, "d") == 0) /* delete canvas' callbacks */
+     {
+        fprintf(stdout, "Deleting canvas event callbacks\n");
+        evas_event_callback_del_full(evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
+                                     _render_flush_cb, NULL);
+        evas_event_callback_del_full(
+          evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN,
+          _object_focus_in_cb, NULL);
+        return;
+     }
+
+   if (strcmp(ev->keyname, "f") == 0) /* freeze input for 3 seconds */
+     {
+        fprintf(stdout, "Freezing input for 3 seconds\n");
+        evas_event_freeze(evas);
+        d.freeze_timer = ecore_timer_add(3, _thaw_cb, NULL);
+        return;
+     }
+
+   mods = evas_key_modifier_get(evas);
+   if (evas_key_modifier_is_set(mods, "Control") &&
+       (strcmp(ev->keyname, "o") == 0)) /* add an obscured
+                                         * rectangle to the middle
+                                         * of the canvas */
+     {
+        fprintf(stdout, "Toggling obscured rectangle on canvas\n");
+        if (!d.obscured)
+          {
+             int w, h;
+             evas_output_viewport_get(evas, NULL, NULL, &w, &h);
+             evas_obscured_rectangle_add(evas, w / 4, h / 4, w / 2, h / 2);
+          }
+        else
+          {
+             int w, h;
+             Eina_Rectangle *rect;
+             Eina_List *updates, *l;
+
+             evas_output_viewport_get(evas, NULL, NULL, &w, &h);
+             evas_obscured_clear(evas);
+
+             /* we have to flag a damage region here because
+              * evas_obscured_clear() doesn't change the canvas'
+              * state. we'd have to wait for an animation step, for
+              * example, to get the result, without it */
+             evas_damage_rectangle_add(evas, 0, 0, w, h);
+
+             updates = evas_render_updates(evas);
+
+             EINA_LIST_FOREACH(updates, l, rect)
+               {
+                  fprintf(stdout, "Rectangle (%d, %d, %d, %d) on canvas got a"
+                          " rendering update.\n", rect->x, rect->y, rect->w,
+                          rect->h);
+               }
+             evas_render_updates_free(updates);
+          }
+        d.obscured = !d.obscured;
+     }
+}
+
+int
+main(void)
+{
+   int err;
+
+   if (!ecore_evas_init())
+     return EXIT_FAILURE;
+
+   /* this will give you a window with an Evas canvas under the first
+    * engine available */
+   d.ee = ecore_evas_new(NULL, 10, 10, WIDTH, HEIGHT, NULL);
+   if (!d.ee)
+     goto error;
+
+   ecore_evas_callback_resize_set(d.ee, _canvas_resize_cb);
+   ecore_evas_show(d.ee);
+
+   /* the canvas pointer, de facto */
+   d.canvas = ecore_evas_get(d.ee);
+
+   evas_event_callback_add(d.canvas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
+                           _render_flush_cb, NULL);
+   if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE)
+     {
+        fprintf(stderr, "ERROR: Callback registering failed! Abort!\n");
+        goto panic;
+     }
+
+   evas_event_callback_add(d.canvas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN,
+                           _object_focus_in_cb, NULL);
+   if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE)
+     {
+        fprintf(stderr, "ERROR: Callback registering failed! Abort!\n");
+        goto panic;
+     } /* two canvas event callbacks */
+
+   d.bg = evas_object_rectangle_add(d.canvas);
+   evas_object_name_set(d.bg, "our dear rectangle");
+   evas_object_color_set(d.bg, 255, 255, 255, 255); /* white bg */
+   evas_object_move(d.bg, 0, 0); /* at canvas' origin */
+   evas_object_resize(d.bg, WIDTH, HEIGHT); /* covers full canvas */
+   evas_object_show(d.bg);
+
+   evas_object_focus_set(d.bg, EINA_TRUE);
+   evas_object_event_callback_add(
+     d.bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, NULL);
+
+   d.img = evas_object_image_filled_add(d.canvas);
+   evas_object_image_file_set(d.img, img_path, NULL);
+   err = evas_object_image_load_error_get(d.img);
+   if (err != EVAS_LOAD_ERROR_NONE)
+     {
+        goto panic;
+     }
+   else
+     {
+        evas_object_move(d.img, 0, 0);
+        evas_object_resize(d.img, WIDTH, HEIGHT);
+        evas_object_show(d.img);
+     }
+
+   d.resize_timer = ecore_timer_add(2, _resize_cb, NULL);
+
+   ecore_main_loop_begin();
+
+   ecore_evas_free(d.ee);
+   ecore_evas_shutdown();
+   return 0;
+
+error:
+   fprintf(stderr, "you got to have at least one evas engine built and linked"
+                   " up to ecore-evas for this example to run properly.\n");
+panic:
+   ecore_evas_shutdown();
+   return -1;
+}
diff --git a/src/examples/evas-init-shutdown.c b/src/examples/evas-init-shutdown.c
new file mode 100644 (file)
index 0000000..a7508d8
--- /dev/null
@@ -0,0 +1,56 @@
+/**
+ * Simple example illustrating usage of evas_init() and
+ * evas_shutdown(). Usually one would instantiate a canvas to have
+ * something useful out of Evas. For an example of this kind, see the
+ * @ref Example_Evas_Buffer_Simple.
+ *
+ * Here, we are just listing the engine Evas was compiled with support
+ * to.
+ *
+ * @verbatim
+ * gcc -o evas-init-shutdown evas-init-shutdown.c `pkg-config --libs \
+ * --cflags evas`
+ * @endverbatim
+ *
+ */
+
+#include <Evas.h>
+#include <stdio.h>
+#include <errno.h>
+
+/*
+ * Simple example illustrating usage of evas_init() and
+ * evas_shutdown().  Usually one would instantiate a canvas to have
+ * something useful out of Evas. For an example of this kind, see the
+ * evas-buffer-simple.c, which requires the buffer engine module
+ * compiled in Evas.
+ *
+ * Here, we are just listing the engine Evas was compiled with support
+ * to.
+ */
+
+int
+main(void)
+{
+   Eina_List *engine_list, *l;
+   char *engine_name;
+
+   evas_init();
+
+   engine_list = evas_render_method_list();
+   if (!engine_list)
+     {
+        fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n");
+        exit(-1);
+     }
+
+   printf("Available Evas Engines:\n");
+   EINA_LIST_FOREACH(engine_list, l, engine_name)
+     printf("%s\n", engine_name);
+
+   evas_render_method_list_free(engine_list);
+
+   evas_shutdown();
+   return 0;
+ }
+
diff --git a/src/examples/evas-load-error-str.c b/src/examples/evas-load-error-str.c
new file mode 100644 (file)
index 0000000..fd460fb
--- /dev/null
@@ -0,0 +1,107 @@
+/**
+ * Simple Evas example illustrating evas_load_error_str()'s usage.
+ *
+ * You'll need at least one engine built for it (excluding the buffer
+ * one) and the png image loader also built. See stdout/stderr for
+ * output.
+ *
+ * @verbatim
+ * gcc -o evas-load-error-str evas-load-error-str.c `pkg-config --libs \
+ * --cflags ecore-evas`
+ * @endverbatim
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+
+#include "config.h"
+#endif
+
+#include <Ecore.h>
+#include <Ecore_Evas.h>
+#include <stdio.h>
+#include <errno.h>
+
+#define WIDTH  (320)
+#define HEIGHT (240)
+
+static const char *valid_path = PACKAGE_EXAMPLES_DIR "/enlightenment.png";
+static const char *bogus_path = "/tmp/non-existent-220986.png";
+
+int
+main(void)
+{
+   Evas *evas;
+   Ecore_Evas *ee;
+   Evas_Object *img1, *img2, *bg;
+   int err;
+
+   if (!ecore_evas_init())
+     return EXIT_FAILURE;
+
+   /* this will give you a window with an Evas canvas under the first
+    * engine available */
+   ee = ecore_evas_new(NULL, 10, 10, WIDTH, HEIGHT, NULL);
+   if (!ee)
+     goto error;
+
+   ecore_evas_show(ee);
+
+   /* the canvas pointer, de facto */
+   evas = ecore_evas_get(ee);
+
+   bg = evas_object_rectangle_add(evas);
+   evas_object_color_set(bg, 255, 255, 255, 255); /* white bg */
+   evas_object_move(bg, 0, 0); /* at canvas' origin */
+   evas_object_resize(bg, WIDTH, HEIGHT); /* covers full canvas */
+   evas_object_show(bg);
+
+   img1 = evas_object_image_filled_add(evas);
+   evas_object_image_file_set(img1, valid_path, NULL);
+   err = evas_object_image_load_error_get(img1);
+   if (err != EVAS_LOAD_ERROR_NONE)
+     {
+        fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n",
+                valid_path, evas_load_error_str(err));
+     }
+   else
+     {
+        fprintf(stdout,
+                "loaded image '%s' with succes! error string is \"%s\"\n",
+                valid_path, evas_load_error_str(err));
+
+        evas_object_move(img1, 0, 0);
+        evas_object_resize(img1, WIDTH / 2, HEIGHT / 2);
+        evas_object_show(img1);
+     }
+
+   /* image loading will fail for this one -- unless one cheats and
+    * puts a valid image on that path */
+   img2 = evas_object_image_filled_add(evas);
+   evas_object_image_file_set(img2, bogus_path, NULL);
+   err = evas_object_image_load_error_get(img2);
+   if (err != EVAS_LOAD_ERROR_NONE)
+     {
+        fprintf(stderr, "could not load image '%s': error string is \"%s\"\n",
+                bogus_path, evas_load_error_str(err));
+     }
+   else
+     {
+        evas_object_move(img2, WIDTH / 2, HEIGHT / 2);
+        evas_object_resize(img2, WIDTH / 2, HEIGHT / 2);
+        evas_object_show(img2);
+     }
+
+   ecore_main_loop_begin();
+
+   ecore_evas_free(ee);
+   ecore_evas_shutdown();
+   return 0;
+
+  error:
+   fprintf(stderr, "you got to have at least one evas engine built and linked"
+           " up to ecore-evas for this example to run properly.\n");
+   ecore_evas_shutdown();
+   return -1;
+}
+
diff --git a/src/lib/.cvsignore b/src/lib/.cvsignore
deleted file mode 100644 (file)
index 84c11b0..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile.in
-Makefile
-.deps
-.libs
-libevas.la
-main.lo
index 4f17136..dd608ec 100644 (file)
@@ -1,3 +1,280 @@
+/**
+@mainpage Evas
+
+@image html  e_big.png
+
+@version 1.0.0
+@author Carsten Haitzler <raster@@rasterman.com>
+@author Till Adam <till@@adam-lilienthal.de>
+@author Steve Ireland <sireland@@pobox.com>
+@author Brett Nash <nash@@nash.id.au>
+@author Tilman Sauerbeck <tilman@@code-monkey.de>
+@author Corey Donohoe <atmos@@atmos.org>
+@author Yuri Hudobin <glassy_ape@@users.sourceforge.net>
+@author Nathan Ingersoll <ningerso@@d.umn.edu>
+@author Willem Monsuwe <willem@@stack.nl>
+@author Jose O Gonzalez <jose_ogp@@juno.com>
+@author Bernhard Nemec <Bernhard.Nemec@@viasyshc.com>
+@author Jorge Luis Zapata Muga <jorgeluis.zapata@@gmail.com>
+@author Cedric Bail <cedric.bail@@free.fr>
+@author Gustavo Sverzut Barbieri <barbieri@@profusion.mobi>
+@author Vincent Torri <vtorri@@univ-evry.fr>
+@author Tim Horton <hortont424@@gmail.com>
+@author Tom Hacohen <tom@@stosb.com>
+@author Mathieu Taillefumier <mathieu.taillefumier@@free.fr>
+@author Iván Briano <ivan@@profusion.mobi>
+@author Gustavo Lima Chaves <glima@@profusion.mobi>
+@author Samsung Electronics <tbd>
+@author Samsung SAIT <tbd>
+@author Sung W. Park <sungwoo@@gmail.com>
+@author Jiyoun Park <jy0703.park@@samsung.com>
+@author Myoungwoon Roy Kim(roy_kim) <myoungwoon.kim@@samsung.com> <myoungwoon@@gmail.com>
+@author Thierry el Borgi <thierry@@substantiel.fr>
+@date 2000-2011
+
+@section toc Table of Contents
+
+@li @ref intro
+@li @ref work
+@li @ref compiling
+@li @ref install
+@li @ref next_steps
+@li @ref intro_example
+
+
+@section intro What is Evas?
+
+Evas is a clean display canvas API for several target display systems that
+can draw anti-aliased text, smooth super and sub-sampled scaled images,
+alpha-blend objects much and more.
+
+It abstracts any need to know much about what the characteristics of your
+display system are or what graphics calls are used to draw them and how. It
+deals on an object level where all you do is create and manipulate objects
+in a canvas, set their properties, and the rest is done for you.
+
+Evas optimises the rendering pipeline to minimise effort in redrawing changes
+made to the canvas and so takes this work out of the programmers hand,
+saving a lot of time and energy.
+
+It's small and lean, designed to work on embedded systems all the way to
+large and powerful multi-cpu workstations. It can be compiled to only have
+the features you need for your target platform if you so wish, thus keeping
+it small and lean. It has several display back-ends, letting it display on
+several display systems, making it portable for cross-device and
+cross-platform development.
+
+@subsection intro_not_evas What Evas is not?
+
+Evas is not a widget set or widget toolkit, however it is their
+base. See Elementary (http://docs.enlightenment.org/auto/elementary/)
+for a toolkit based on Evas, Edje, Ecore and other Enlightenment
+technologies.
+
+It is not dependent or aware of main loops, input or output
+systems. Input should be polled from various sources and feed them to
+Evas. Similarly, it will not create windows or report windows updates
+to your system, rather just drawing the pixels and reporting to the
+user the areas that were changed. Of course these operations are quite
+common and thus they are ready to use in Ecore, particularly in
+Ecore_Evas (http://docs.enlightenment.org/auto/ecore/).
+
+
+@section work How does Evas work?
+
+Evas is a canvas display library. This is markedly different from most
+display and windowing systems as a Canvas is structural and is also a state
+engine, whereas most display and windowing systems are immediate mode display
+targets. Evas handles the logic between a structural display via its' state
+engine, and controls the target windowing system in order to produce
+rendered results of the current canvases state on the display.
+
+Immediate mode display systems retain very little, or no state. A program
+will execute a series of commands, as in the pseudo code:
+
+@verbatim
+draw line from position (0, 0) to position (100, 200);
+
+draw rectangle from position (10, 30) to position (50, 500);
+
+bitmap_handle = create_bitmap();
+scale bitmap_handle to size 100 x 100;
+draw image bitmap_handle at position (10, 30);
+@endverbatim
+
+The series of commands is executed by the windowing system and the results
+are displayed on the screen (normally). Once the commands are executed the
+display system has little or no idea of how to reproduce this image again,
+and so has to be instructed by the application how to redraw sections of the
+screen whenever needed. Each successive command will be executed as
+instructed by the application and either emulated by software or sent to the
+graphics hardware on the device to be performed.
+
+The advantage of such a system is that it is simple, and gives a program
+tight control over how something looks and is drawn. Given the increasing
+complexity of displays and demands by users to have better looking
+interfaces, more and more work is needing to be done at this level by the
+internals of widget sets, custom display widgets and other programs. This
+means more and more logic and display rendering code needs to be written
+time and time again, each time the application needs to figure out how to
+minimise redraws so that display is fast and interactive, and keep track of
+redraw logic. The power comes at a high-price, lots of extra code and work.
+Programmers not very familiar with graphics programming will often make
+mistakes at this level and produce code that is sub optimal. Those familiar
+with this kind of programming will simply get bored by writing the same code
+again and again.
+
+For example, if in the above scene, the windowing system requires the
+application to redraw the area from 0, 0 to 50, 50 (also referred as
+"expose event"), then the programmer must calculate manually the
+updates and repaint it again:
+
+@verbatim
+Redraw from position (0, 0) to position (50, 50):
+
+// what was in area (0, 0, 50, 50)?
+
+// 1. intersection part of line (0, 0) to (100, 200)?
+      draw line from position (0, 0) to position (25, 50);
+
+// 2. intersection part of rectangle (10, 30) to (50, 500)?
+      draw rectangle from position (10, 30) to position (50, 50)
+
+// 3. intersection part of image at (10, 30), size 100 x 100?
+      bitmap_subimage = subregion from position (0, 0) to position (40, 20)
+      draw image bitmap_subimage at position (10, 30);
+@endverbatim
+
+The clever reader might have noticed that, if all elements in the
+above scene are opaque, then the system is doing useless paints: part
+of the line is behind the rectangle, and part of the rectangle is
+behind the image. These useless paints tends to be very costly, as
+pixels tend to be 4 bytes in size, thus an overlapping region of 100 x
+100 pixels is around 40000 useless writes! The developer could write
+code to calculate the overlapping areas and avoid painting then, but
+then it should be mixed with the "expose event" handling mentioned
+above and quickly one realizes the initially simpler method became
+really complex.
+
+Evas is a structural system in which the programmer creates and manages
+display objects and their properties, and as a result of this higher level
+state management, the canvas is able to redraw the set of objects when
+needed to represent the current state of the canvas.
+
+For example, the pseudo code:
+
+@verbatim
+line_handle = create_line();
+set line_handle from position (0, 0) to position (100, 200);
+show line_handle;
+
+rectangle_handle = create_rectangle();
+move rectangle_handle to position (10, 30);
+resize rectangle_handle to size 40 x 470;
+show rectangle_handle;
+
+bitmap_handle = create_bitmap();
+scale bitmap_handle to size 100 x 100;
+move bitmap_handle to position (10, 30);
+show bitmap_handle;
+
+render scene;
+@endverbatim
+
+This may look longer, but when the display needs to be refreshed or updated,
+the programmer only moves, resizes, shows, hides etc. the objects that they
+need to change. The programmer simply thinks at the object logic level, and
+the canvas software does the rest of the work for them, figuring out what
+actually changed in the canvas since it was last drawn, how to most
+efficiently redraw he canvas and its contents to reflect the current state,
+and then it can go off and do the actual drawing of the canvas.
+
+This lets the programmer think in a more natural way when dealing with a
+display, and saves time and effort of working out how to load and display
+images, render given the current display system etc. Since Evas also is
+portable across different display systems, this also gives the programmer
+the ability to have their code ported and display on different display
+systems with very little work.
+
+Evas can be seen as a display system that stands somewhere between a widget
+set and an immediate mode display system. It retains basic display logic,
+but does very little high-level logic such as scrollbars, sliders, push
+buttons etc.
+
+
+@section compiling How to compile using Evas ?
+
+Evas is a library your application links to. The procedure for this is very
+simple. You simply have to compile your application with the appropriate
+compiler flags that the @p pkg-config script outputs. For example:
+
+Compiling C or C++ files into object files:
+
+@verbatim
+gcc -c -o main.o main.c `pkg-config --cflags evas`
+@endverbatim
+
+Linking object files into a binary executable:
+
+@verbatim
+gcc -o my_application main.o `pkg-config --libs evas`
+@endverbatim
+
+You simply have to make sure that pkg-config is in your shell's PATH (see
+the manual page for your appropriate shell) and evas.pc in /usr/lib/pkgconfig
+or its path is in the PKG_CONFIG_PATH environment variable. It's that simple
+to link and use Evas once you have written your code to use it.
+
+Since the program is linked to Evas, it is now able to use any advertised
+API calls to display graphics in a canvas managed by Evas, as well as use
+the API calls provided to manage data as well.
+
+You should make sure you add any extra compile and link flags to your
+compile commands that your application may need as well. The above example
+is only guaranteed to make Evas add it's own requirements.
+
+
+@section install How is it installed?
+
+Simple:
+
+@verbatim
+./configure
+make
+su -
+...
+make install
+@endverbatim
+
+@section next_steps Next Steps
+
+After you understood what Evas is and installed it in your system you
+should proceed understanding the programming interface for all
+objects, then see the specific for the most used elements. We'd
+recommend you to take a while to learn Ecore
+(http://docs.enlightenment.org/auto/ecore/) and Edje
+(http://docs.enlightenment.org/auto/edje/) as they will likely save
+you tons of work compared to using just Evas directly.
+
+Recommended reading:
+
+@li @ref Evas_Object_Group
+@li @ref Evas_Object_Rectangle
+@li @ref Evas_Object_Image
+@li @ref Evas_Object_Text
+@li @ref Evas_Smart_Object_Group and @ref Evas_Smart_Group to define
+    an object that provides custom functions to handle clipping,
+    hiding, moving, resizing, setting the color and more. These could
+    be as simple as a group of objects that move together (see @ref
+    Evas_Smart_Object_Clipped). These smart objects can implement what
+    ends to be a widget, providing some intelligence (thus the name),
+    like a button or check box.
+
+@section intro_example Introductory Example
+
+@include evas-buffer-simple.c
+*/
+
 #ifndef _EVAS_H
 #define _EVAS_H
 
@@ -113,7 +390,7 @@ typedef enum _Evas_Callback_Type
    EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, /**< Canvas object got focus */
    EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, /**< Canvas object lost focus */
 
-   /* 
+   /*
     * More object event types - see evas_object_event_callback_add():
     */
    EVAS_CALLBACK_IMAGE_UNLOADED, /**< Image data has been unloaded (by some mechanims in evas that throws out original image data) */
@@ -164,7 +441,7 @@ typedef enum _Evas_Colorspace
    EVAS_COLORSPACE_YCBCR422P601_PL, /**< YCbCr 4:2:2 Planar, ITU.BT-601 specifications. The data poitned to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */
    EVAS_COLORSPACE_YCBCR422P709_PL,/**< YCbCr 4:2:2 Planar, ITU.BT-709 specifications. The data poitned to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */
    EVAS_COLORSPACE_RGB565_A5P, /**< 16bit rgb565 + Alpha plane at end - 5 bits of the 8 being used per alpha byte */
-   EVAS_COLORSPACE_GRY8, /**< 8bit grayscale */
+   EVAS_COLORSPACE_GRY8 /**< 8bit grayscale */
 } Evas_Colorspace; /**< Colorspaces for pixel data supported by Evas */
 
 /**
@@ -213,7 +490,7 @@ typedef struct _Evas_Map            Evas_Map;
 
 /**
  * @typedef Evas
- * An Evas canvas handle.
+ * An opaque handle to an Evas canvas.
  * @see evas_new()
  * @see evas_free()
  * @ingroup Evas_Canvas
@@ -228,8 +505,8 @@ typedef struct _Evas                Evas;
 typedef struct _Evas_Object         Evas_Object;
 
 typedef void                        Evas_Performance; /**< An Evas Performance handle */
-typedef struct _Evas_Modifier       Evas_Modifier; /**< An Evas Modifier */
-typedef struct _Evas_Lock           Evas_Lock; /**< An Evas Lock */
+typedef struct _Evas_Modifier       Evas_Modifier; /**< An opaque type containing information on which modifier keys are registered in an Evas canvas */
+typedef struct _Evas_Lock           Evas_Lock; /**< An opaque type containing information on which lock keys are registered in an Evas canvas */
 typedef struct _Evas_Smart          Evas_Smart; /**< An Evas Smart Object handle */
 typedef struct _Evas_Native_Surface Evas_Native_Surface; /**< A generic datatype for engine specific native surface information */
 typedef unsigned long long          Evas_Modifier_Mask; /**< An Evas modifier mask type */
@@ -308,7 +585,8 @@ typedef enum _Evas_Load_Error
    EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 4, /**< Allocation of resources failure prevented load */
    EVAS_LOAD_ERROR_CORRUPT_FILE = 5, /**< File corrupt (but was detected as a known format) */
    EVAS_LOAD_ERROR_UNKNOWN_FORMAT = 6 /**< File is not a known format */
-} Evas_Load_Error; /**< Load error you can get from loading of files - see evas_load_error_str() too */
+} Evas_Load_Error; /**< Evas image load error codes one can get - see evas_load_error_str() too. */
+
 
 typedef enum _Evas_Alloc_Error
 {
@@ -316,7 +594,7 @@ typedef enum _Evas_Alloc_Error
    EVAS_ALLOC_ERROR_FATAL = 1, /**< Allocation failed despite attempts to free up memory */
    EVAS_ALLOC_ERROR_RECOVERED = 2 /**< Allocation succeeded, but extra memory had to be found by freeing up speculative resources */
 } Evas_Alloc_Error; /**< Possible allocation errors returned by evas_alloc_error() */
-   
+
 typedef enum _Evas_Fill_Spread
 {
    EVAS_TEXTURE_REFLECT = 0, /**< image fill tiling mode - tiling reflects */
@@ -331,7 +609,7 @@ typedef enum _Evas_Pixel_Import_Pixel_Format
 {
    EVAS_PIXEL_FORMAT_NONE = 0, /**< No pixel format */
    EVAS_PIXEL_FORMAT_ARGB32 = 1, /**< ARGB 32bit pixel format with A in the high byte per 32bit pixel word */
-   EVAS_PIXEL_FORMAT_YUV420P_601 = 2, /**< YUV 420 Planar format with CCIR 601 color encoding wuth contiguous planes in the order Y, U and V */
+   EVAS_PIXEL_FORMAT_YUV420P_601 = 2 /**< YUV 420 Planar format with CCIR 601 color encoding wuth contiguous planes in the order Y, U and V */
 } Evas_Pixel_Import_Pixel_Format; /**< Pixel format for import call. See evas_object_image_pixels_import() */
 
 struct _Evas_Pixel_Import_Source
@@ -343,14 +621,14 @@ struct _Evas_Pixel_Import_Source
 
 /* magic version number to know what the native surf struct looks like */
 #define EVAS_NATIVE_SURFACE_VERSION 2
-  
+
 typedef enum _Evas_Native_Surface_Type
 {
    EVAS_NATIVE_SURFACE_NONE,
    EVAS_NATIVE_SURFACE_X11,
    EVAS_NATIVE_SURFACE_OPENGL
 } Evas_Native_Surface_Type;
-  
+
 struct _Evas_Native_Surface
 {
    int                         version;
@@ -644,7 +922,7 @@ typedef enum _Evas_Object_Pointer_Mode
 } Evas_Object_Pointer_Mode; /**< How mouse pointer should be handled by Evas. */
 
 typedef void      (*Evas_Smart_Cb) (void *data, Evas_Object *obj, void *event_info);
-typedef void      (*Evas_Event_Cb) (void *data, Evas *e, void *event_info);
+typedef void      (*Evas_Event_Cb) (void *data, Evas *e, void *event_info); /**< Evas event callback function signature */
 typedef Eina_Bool (*Evas_Object_Event_Post_Cb) (void *data, Evas *e);
 typedef void      (*Evas_Object_Event_Cb) (void *data, Evas *e, Evas_Object *obj, void *event_info);
 typedef void      (*Evas_Async_Events_Put_Cb)(void *target, Evas_Callback_Type type, void *event_info);
@@ -654,1466 +932,7392 @@ typedef void      (*Evas_Async_Events_Put_Cb)(void *target, Evas_Callback_Type t
  *
  * Functions that affect Evas as a whole.
  */
-   EAPI int               evas_init                         (void);
-   EAPI int               evas_shutdown                     (void);
-
-   EAPI Evas_Alloc_Error  evas_alloc_error                  (void);
 
-   EAPI int               evas_async_events_fd_get          (void) EINA_WARN_UNUSED_RESULT EINA_PURE;
-   EAPI int               evas_async_events_process         (void);
-   EAPI Eina_Bool         evas_async_events_put             (const void *target, Evas_Callback_Type type, void *event_info, Evas_Async_Events_Put_Cb func) EINA_ARG_NONNULL(1, 4);
+/**
+ * Initialize Evas
+ *
+ * @return The init counter value.
+ *
+ * This function initializes Evas and increments a counter of the
+ * number of calls to it. It returs the new counter's value.
+ *
+ * @see evas_shutdown().
+ *
+ * Most EFL users wouldn't be using this function directly, because
+ * they wouldn't access Evas directly by themselves. Instead, they
+ * would be using higher level helpers, like @c ecore_evas_init().
+ * See http://docs.enlightenment.org/auto/ecore/.
+ *
+ * You should be using this if your use is something like the
+ * following. The buffer engine is just one of the many ones Evas
+ * provides.
+ *
+ * @dontinclude evas-buffer-simple.c
+ * @skip int main
+ * @until return -1;
+ * And being the canvas creation something like:
+ * @skip static Evas *create_canvas
+ * @until    evas_output_viewport_set(canvas,
+ *
+ * Note that this is code creating an Evas canvas with no usage of
+ * Ecore helpers at all -- no linkage with Ecore on this scenario,
+ * thus. Again, this wouldn't be on Evas common usage for most
+ * developers. See the full @ref Example_Evas_Buffer_Simple "example".
+ *
+ * @ingroup Evas_Group
+ */
+EAPI int               evas_init                         (void);
 
 /**
- * @defgroup Evas_Canvas Canvas Functions
+ * Shutdown Evas
+ *
+ * @return Evas' init counter value.
+ *
+ * This function finalizes Evas, decrementing the counter of the
+ * number of calls to the function evas_init(). This new value for the
+ * counter is returned.
+ *
+ * @see evas_init().
  *
- * Functions that deal with the basic evas object.  They are the
- * functions you need to use at a minimum to get a working evas, and
- * to destroy it.
+ * If you were the sole user of Evas, by means of evas_init(), you can
+ * check if it's being properly shut down by expecting a return value
+ * of 0.
  *
+ * Example code follows.
+ * @dontinclude evas-buffer-simple.c
+ * @skip // NOTE: use ecore_evas_buffer_new
+ * @until evas_shutdown
+ * Where that function would contain:
+ * @skip   evas_free(canvas)
+ * @until   evas_free(canvas)
+ *
+ * Most users would be using ecore_evas_shutdown() instead, like told
+ * in evas_init(). See the full @ref Example_Evas_Buffer_Simple
+ * "example".
+ *
+ * @ingroup Evas_Group
  */
+EAPI int               evas_shutdown                     (void);
 
-   EAPI Evas             *evas_new                          (void) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
-   EAPI void              evas_free                         (Evas *e)  EINA_ARG_NONNULL(1);
 
-   EAPI void              evas_focus_in                     (Evas *e);
-   EAPI void              evas_focus_out                    (Evas *e);
-   EAPI Eina_Bool         evas_focus_state_get              (const Evas *e) EINA_PURE;
-   EAPI void              evas_nochange_push                (Evas *e);
-   EAPI void              evas_nochange_pop                 (Evas *e);
-         
-   EAPI void              evas_data_attach_set              (Evas *e, void *data) EINA_ARG_NONNULL(1);
-   EAPI void             *evas_data_attach_get              (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+/**
+ * Return if any allocation errors have occurred during the prior function
+ * @return The allocation error flag
+ *
+ * This function will return if any memory allocation errors occurred during,
+ * and what kind they were. The return value will be one of
+ * EVAS_ALLOC_ERROR_NONE, EVAS_ALLOC_ERROR_FATAL or EVAS_ALLOC_ERROR_RECOVERED
+ * with each meaning something different.
+ *
+ * EVAS_ALLOC_ERROR_NONE means that no errors occurred at all and the function
+ * worked as expected.
+ *
+ * EVAS_ALLOC_ERROR_FATAL means the function was completely unable to perform
+ * its job and will  have  exited as cleanly as possible. The programmer
+ * should consider this as a sign of very low memory and should try and safely
+ * recover from the prior functions failure (or try free up memory elsewhere
+ * and try again after more memory is freed).
+ *
+ * EVAS_ALLOC_ERROR_RECOVERED means that an allocation error occurred, but was
+ * recovered from by evas finding memory of its own it has allocated and
+ * freeing what it sees as not really usefully allocated memory. What is freed
+ * may vary. Evas may reduce the resolution of images, free cached images or
+ * fonts, trhow out pre-rendered data, reduce the complexity of change lists
+ * etc. Evas and the program will function as per normal after this, but this
+ * is a sign of low memory, and it is suggested that the program try and
+ * identify memory it doesn't need, and free it.
+ *
+ * Example:
+ * @code
+ * extern Evas_Object *object;
+ * void callback (void *data, Evas *e, Evas_Object *obj, void *event_info);
+ *
+ * evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_DOWN, callback, NULL);
+ * if (evas_alloc_error() == EVAS_ALLOC_ERROR_FATAL)
+ *   {
+ *     fprintf(stderr, "ERROR: Completely unable to attach callabck. Must\n");
+ *     fprintf(stderr, "       destroy object now as it cannot be used.\n");
+ *     evas_object_del(object);
+ *     object = NULL;
+ *     fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n");
+ *     my_memory_cleanup();
+ *   }
+ * if (evas_alloc_error() == EVAS_ALLOC_ERROR_RECOVERED)
+ *   {
+ *     fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n");
+ *     my_memory_cleanup();
+ *   }
+ * @endcode
+ *
+ * @ingroup Evas_Group
+ */
+EAPI Evas_Alloc_Error  evas_alloc_error                  (void);
 
-   EAPI void              evas_damage_rectangle_add         (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
-   EAPI void              evas_obscured_rectangle_add       (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
-   EAPI void              evas_obscured_clear               (Evas *e) EINA_ARG_NONNULL(1);
-   EAPI Eina_List        *evas_render_updates               (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
-   EAPI void              evas_render_updates_free          (Eina_List *updates);
-   EAPI void              evas_render                       (Evas *e) EINA_ARG_NONNULL(1);
-   EAPI void              evas_norender                     (Evas *e) EINA_ARG_NONNULL(1);
-   EAPI void              evas_render_idle_flush            (Evas *e) EINA_ARG_NONNULL(1);
-   EAPI void              evas_render_dump                  (Evas *e) EINA_ARG_NONNULL(1);
 
 /**
- * @defgroup Evas_Output_Method Render Engine Functions
+ * @brief Get evas' internal asynchronous events read file descriptor.
  *
- * Functions that are used to set the render engine for a given
- * function, and then get that engine working.
+ * @return The canvas' asynchronous events read file descriptor.
  *
- * The following code snippet shows how they can be used to
- * initialise an evas that uses the X11 software engine:
- * @code
- * Evas *evas;
- * Evas_Engine_Info_Software_X11 *einfo;
- * extern Display *display;
- * extern Window win;
+ * Evas' asynchronous events are meant to be dealt with internally,
+ * i. e., when building stuff to be glued together into the EFL
+ * infrastructure -- a module, for example. The context which demands
+ * its use is when calculations need to be done out of the main
+ * thread, asynchronously, and some action must be performed after
+ * that.
  *
- * evas_init();
+ * An example of actual use of this API is for image asynchronous
+ * preload inside evas. If the canvas was instantiated through
+ * ecore-evas usage, ecore itself will take care of calling those
+ * events' processing.
  *
- * evas = evas_new();
- * evas_output_method_set(evas, evas_render_method_lookup("software_x11"));
- * evas_output_size_set(evas, 640, 480);
- * evas_output_viewport_set(evas, 0, 0, 640, 480);
- * einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(evas);
- * einfo->info.display = display;
- * einfo->info.visual = DefaultVisual(display, DefaultScreen(display));
- * einfo->info.colormap = DefaultColormap(display, DefaultScreen(display));
- * einfo->info.drawable = win;
- * einfo->info.depth = DefaultDepth(display, DefaultScreen(display));
- * evas_engine_info_set(evas, (Evas_Engine_Info *)einfo);
- * @endcode
+ * This function returns the read file descriptor where to get the
+ * asynchronous events of the canvas. Naturally, other mainloops,
+ * apart from ecore, may make use of it.
  *
- * @ingroup Evas_Canvas
+ * @ingroup Evas_Group
  */
-   EAPI int               evas_render_method_lookup         (const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
-   EAPI Eina_List        *evas_render_method_list           (void) EINA_WARN_UNUSED_RESULT;
-   EAPI void              evas_render_method_list_free      (Eina_List *list);
-
-   EAPI void              evas_output_method_set            (Evas *e, int render_method) EINA_ARG_NONNULL(1);
-   EAPI int               evas_output_method_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) EINA_PURE;
-   EAPI Eina_Bool         evas_engine_info_set              (Evas *e, Evas_Engine_Info *info) EINA_ARG_NONNULL(1);
+EAPI int               evas_async_events_fd_get          (void) EINA_WARN_UNUSED_RESULT EINA_PURE;
 
 /**
- * @defgroup Evas_Output_Size Output and Viewport Resizing Functions
+ * @brief Trigger the processing of all events waiting on the file
+ * descriptor returned by evas_async_events_fd_get().
  *
- * Functions that set and retrieve the output and viewport size of an
- * evas.
+ * @return The number of events processed.
  *
- * @ingroup Evas_Canvas
+ * All asynchronous events queued up by evas_async_events_put() are
+ * processed here. More precisely, the callback functions, informed
+ * together with other event parameters, when queued, get called (with
+ * those parameters), in that order.
+ *
+ * @ingroup Evas_Group
  */
-   EAPI void              evas_output_size_set              (Evas *e, int w, int h) EINA_ARG_NONNULL(1);
-   EAPI void              evas_output_size_get              (const Evas *e, int *w, int *h) EINA_ARG_NONNULL(1);
-   EAPI void              evas_output_viewport_set          (Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
-   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);
+EAPI int               evas_async_events_process         (void);
 
 /**
- * @defgroup Evas_Coord_Mapping_Group Coordinate Mapping Functions
+* Insert asynchronous events on the canvas.
  *
- * Functions that are used to map coordinates from the canvas to the
- * screen or the screen to the canvas.
+ * @param target The target to be affected by the events.
+ * @param type The type of callback function.
+ * @param event_info Information about the event.
+ * @param func The callback function pointer.
  *
- * @ingroup Evas_Canvas
+ * This is the way, for a routine running outside evas' main thread,
+ * to report an asynchronous event. A callback function is informed,
+ * whose call is to happen after evas_async_events_process() is
+ * called.
+ *
+ * @ingroup Evas_Group
  */
-   EAPI Evas_Coord        evas_coord_screen_x_to_world      (const Evas *e, int x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
-   EAPI Evas_Coord        evas_coord_screen_y_to_world      (const Evas *e, int y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
-   EAPI int               evas_coord_world_x_to_screen      (const Evas *e, Evas_Coord x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
-   EAPI int               evas_coord_world_y_to_screen      (const Evas *e, Evas_Coord y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+EAPI Eina_Bool         evas_async_events_put             (const void *target, Evas_Callback_Type type, void *event_info, Evas_Async_Events_Put_Cb func) EINA_ARG_NONNULL(1, 4);
 
 /**
- * @defgroup Evas_Pointer_Group Pointer (Mouse) Functions
+ * @defgroup Evas_Canvas Canvas Functions
  *
- * Functions that deal with the status of the pointer (mouse cursor).
+ * Low level Evas canvas functions. Sub groups will present more high
+ * level ones, though.
  *
- * @ingroup Evas_Canvas
+ * Most of these functions deal with low level Evas actions, like:
+ * @li create/destroy raw canvases, not bound to any displaying engine
+ * @li tell a canvas i got focused (in a windowing context, for example)
+ * @li tell a canvas a region should not be calculated anymore in rendering
+ * @li tell a canvas to render its contents, immediately
+ *
+ * Most users will be using Evas by means of the @c Ecore_Evas
+ * wrapper, which deals with all the above mentioned issues
+ * automatically for them. Thus, you'll be looking at this section
+ * only if you're building low level stuff.
+ *
+ * The groups within present you functions that deal with the canvas
+ * directly, too, and not yet with its <b>objects</b>. They are the
+ * functions you need to use at a minimum to get a working canvas.
  */
-   EAPI void              evas_pointer_output_xy_get        (const Evas *e, int *x, int *y) EINA_ARG_NONNULL(1);
-   EAPI void              evas_pointer_canvas_xy_get        (const Evas *e, Evas_Coord *x, Evas_Coord *y) EINA_ARG_NONNULL(1);
-   EAPI int               evas_pointer_button_down_mask_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool         evas_pointer_inside_get           (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
-   EAPI void              evas_sync(Evas *e) EINA_ARG_NONNULL(1);
 
 /**
- * @defgroup Evas_Event_Freezing_Group Event Freezing Functions
+ * Creates a new empty evas.
  *
- * Functions that deal with the freezing of event processing of an
- * evas.
+ * Note that before you can use the evas, you will to at a minimum:
+ * @li Set its render method with @ref evas_output_method_set .
+ * @li Set its viewport size with @ref evas_output_viewport_set .
+ * @li Set its size of the canvas with @ref evas_output_size_set .
+ * @li Ensure that the render engine is given the correct settings
+ *     with @ref evas_engine_info_set .
  *
+ * This function should only fail if the memory allocation fails
+ *
+ * @note this function is very low level. Instead of using it
+ *       directly, consider using the high level functions in
+ *       Ecore_Evas such as @c ecore_evas_new(). See
+ *       http://docs.enlightenment.org/auto/ecore/.
+ *
+ * @attention it is recommended that one calls evas_init() before
+ *       creating new canvas.
+ *
+ * @return A new uninitialised Evas canvas on success.  Otherwise, @c
+ * NULL.
  * @ingroup Evas_Canvas
  */
-   EAPI void              evas_event_freeze                 (Evas *e) EINA_ARG_NONNULL(1);
-   EAPI void              evas_event_thaw                   (Evas *e) EINA_ARG_NONNULL(1);
-   EAPI int               evas_event_freeze_get             (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-   EAPI void              evas_event_thaw_eval              (Evas *e) EINA_ARG_NONNULL(1);
+EAPI Evas             *evas_new                          (void) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
 
 /**
- * @defgroup Evas_Event_Feeding_Group Event Feeding Functions
+ * Frees the given evas and any objects created on it.
  *
- * Functions to tell Evas that events happened and should be
- * processed.
+ * Any objects with 'free' callbacks will have those callbacks called
+ * in this function.
  *
- * As explained in @ref intro_not_evas, Evas does not know how to poll
- * for events, so the developer should do it and then feed such events
- * to the canvas to be processed. This is only required if operating
- * Evas directly as modules such as Ecore_Evas does that for you.
+ * @param   e The given evas.
  *
  * @ingroup Evas_Canvas
  */
-   EAPI void              evas_event_feed_mouse_down        (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
-   EAPI void              evas_event_feed_mouse_up          (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
-   EAPI void              evas_event_feed_mouse_move        (Evas *e, int x, int y, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
-   EAPI void              evas_event_feed_mouse_in          (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
-   EAPI void              evas_event_feed_mouse_out         (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
-   EAPI void              evas_event_feed_multi_down        (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data);
-   EAPI void              evas_event_feed_multi_up          (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data);
-   EAPI void              evas_event_feed_multi_move        (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, unsigned int timestamp, const void *data);
-   EAPI void              evas_event_feed_mouse_cancel      (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
-   EAPI void              evas_event_feed_mouse_wheel       (Evas *e, int direction, int z, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
-   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) EINA_ARG_NONNULL(1);
-   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) EINA_ARG_NONNULL(1);
-   EAPI void              evas_event_feed_hold              (Evas *e, int hold, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
+EAPI void              evas_free                         (Evas *e)  EINA_ARG_NONNULL(1);
+
 
 /**
- * @defgroup Evas_Canvas_Events Canvas Events
- *
- * Canvas generates some events
+ * Inform to the evas that it got the focus.
  *
+ * @param e The evas to change information.
  * @ingroup Evas_Canvas
  */
+EAPI void              evas_focus_in                     (Evas *e);
 
-   EAPI void              evas_event_callback_add              (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
-   EAPI void             *evas_event_callback_del              (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) EINA_ARG_NONNULL(1, 3);
-   EAPI void             *evas_event_callback_del_full         (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
-   EAPI void              evas_post_event_callback_push        (Evas *e, Evas_Object_Event_Post_Cb func, const void *data);
-   EAPI void              evas_post_event_callback_remove      (Evas *e, Evas_Object_Event_Post_Cb func);
-   EAPI void              evas_post_event_callback_remove_full (Evas *e, Evas_Object_Event_Post_Cb func, const void *data);
-       
 /**
- * @defgroup Evas_Image_Group Image Functions
+ * Inform to the evas that it lost the focus.
  *
- * Functions that deals with images at canvas level.
+ * @param e The evas to change information.
+ * @ingroup Evas_Canvas
+ */
+EAPI void              evas_focus_out                    (Evas *e);
+
+/**
+ * Get the focus state known by the given evas
  *
+ * @param e The evas to query information.
  * @ingroup Evas_Canvas
  */
-   EAPI void              evas_image_cache_flush            (Evas *e) EINA_ARG_NONNULL(1);
-   EAPI void              evas_image_cache_reload           (Evas *e) EINA_ARG_NONNULL(1);
-   EAPI void              evas_image_cache_set              (Evas *e, int size) EINA_ARG_NONNULL(1);
-   EAPI int               evas_image_cache_get              (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+EAPI Eina_Bool         evas_focus_state_get              (const Evas *e) EINA_PURE;
 
 /**
- * @defgroup Evas_Font_Group Font Functions
+ * Push the nochange flag up 1
  *
- * Functions that deals with fonts.
+ * This tells evas, that while the nochange flag is greater than 0, do not
+ * mark objects as "changed" when making changes.
  *
+ * @param e The evas to change information.
  * @ingroup Evas_Canvas
  */
-   EAPI void                     evas_font_hinting_set        (Evas *e, Evas_Font_Hinting_Flags hinting) EINA_ARG_NONNULL(1);
-   EAPI Evas_Font_Hinting_Flags  evas_font_hinting_get        (const Evas *e) 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) EINA_PURE;
-
-   EAPI void                     evas_font_cache_flush        (Evas *e) EINA_ARG_NONNULL(1);
-   EAPI void                     evas_font_cache_set          (Evas *e, int size) EINA_ARG_NONNULL(1);
-   EAPI int                      evas_font_cache_get          (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) EINA_PURE;
-   EAPI void                     evas_font_available_list_free(Evas *e, Eina_List *available) EINA_ARG_NONNULL(1);
+EAPI void              evas_nochange_push                (Evas *e);
 
 /**
- * @defgroup Evas_Font_Path_Group Font Path Functions
+ * Pop the nochange flag down 1
  *
- * Functions that edit the paths being used to load fonts.
+ * This tells evas, that while the nochange flag is greater than 0, do not
+ * mark objects as "changed" when making changes.
  *
- * @ingroup Evas_Font_Group
+ * @param e The evas to change information.
+ * @ingroup Evas_Canvas
  */
-   EAPI void              evas_font_path_clear              (Evas *e) EINA_ARG_NONNULL(1);
-   EAPI void              evas_font_path_append             (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2);
-   EAPI void              evas_font_path_prepend            (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2);
-   EAPI const Eina_List  *evas_font_path_list               (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+EAPI void              evas_nochange_pop                 (Evas *e);
+
 
 /**
- * @defgroup Evas_Object_Group Generic Object Functions
+ * Attaches a specific pointer to the evas for fetching later
  *
- * Functions that manipulate generic evas objects.
+ * @param e The canvas to attach the pointer to
+ * @param data The pointer to attach
+ * @ingroup Evas_Canvas
  */
+EAPI void              evas_data_attach_set              (Evas *e, void *data) EINA_ARG_NONNULL(1);
 
 /**
- * @defgroup Evas_Object_Group_Basic Basic Object Manipulation
- *
- * Methods that are often used, like those that change the color,
- * clippers and geometry of the object.
+ * Returns the pointer attached by evas_data_attach_set()
  *
- * @ingroup Evas_Object_Group
+ * @param e The canvas to attach the pointer to
+ * @return The pointer attached
+ * @ingroup Evas_Canvas
  */
-   EAPI void              evas_object_clip_set              (Evas_Object *obj, Evas_Object *clip) EINA_ARG_NONNULL(1, 2);
-   EAPI Evas_Object      *evas_object_clip_get              (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-   EAPI void              evas_object_clip_unset            (Evas_Object *obj);
-   EAPI const Eina_List  *evas_object_clipees_get           (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-
-   EAPI void              evas_object_focus_set             (Evas_Object *obj, Eina_Bool focus) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool         evas_object_focus_get             (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-
-   EAPI void              evas_object_layer_set             (Evas_Object *obj, short l) EINA_ARG_NONNULL(1);
-   EAPI short             evas_object_layer_get             (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-
-   EAPI void              evas_object_name_set              (Evas_Object *obj, const char *name) EINA_ARG_NONNULL(1);
-   EAPI const char       *evas_object_name_get              (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-
-   EAPI void              evas_object_ref                   (Evas_Object *obj);
-   EAPI void              evas_object_unref                 (Evas_Object *obj);
-   
-   EAPI void              evas_object_del                   (Evas_Object *obj) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_move                  (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_resize                (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_geometry_get          (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
+EAPI void             *evas_data_attach_get              (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
 
-   EAPI void              evas_object_show                  (Evas_Object *obj) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_hide                  (Evas_Object *obj) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool         evas_object_visible_get           (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-
-   EAPI void              evas_object_color_set             (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_color_get             (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
-
-   EAPI Evas             *evas_object_evas_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) EINA_PURE;
-
-   EAPI void              evas_object_raise                 (Evas_Object *obj) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_lower                 (Evas_Object *obj) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_stack_above           (Evas_Object *obj, Evas_Object *above) EINA_ARG_NONNULL(1, 2);
-   EAPI void              evas_object_stack_below           (Evas_Object *obj, Evas_Object *below) EINA_ARG_NONNULL(1, 2);
-   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_below_get             (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
 
 /**
- * @defgroup Evas_Object_Group_Events Object Events
+ * Add a damage rectangle.
  *
- * Objects generates events when they are moved, resized, when their
- * visibility change, when they are deleted and so on. These methods
- * will allow one to handle such events.
+ * @param e The given canvas pointer.
+ * @param x The rectangle's left position.
+ * @param y The rectangle's top position.
+ * @param w The rectangle's width.
+ * @param h The rectangle's height.
  *
- * The events can be those from keyboard and mouse, if the object
- * accepts these events.
+ * This is the function by which one tells evas that a part of the
+ * canvas has to be repainted.
  *
- * @ingroup Evas_Object_Group
+ * @ingroup Evas_Canvas
  */
-   EAPI void              evas_object_event_callback_add     (Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
-   EAPI void             *evas_object_event_callback_del     (Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func) EINA_ARG_NONNULL(1, 3);
-   EAPI void             *evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
+EAPI void              evas_damage_rectangle_add         (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
 
-   EAPI void              evas_object_pass_events_set        (Evas_Object *obj, Eina_Bool pass) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool         evas_object_pass_events_get        (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-   EAPI void              evas_object_repeat_events_set      (Evas_Object *obj, Eina_Bool repeat) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool         evas_object_repeat_events_get      (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-   EAPI void              evas_object_propagate_events_set   (Evas_Object *obj, Eina_Bool prop) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool         evas_object_propagate_events_get   (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+/**
+ * Add an "obscured region" to an Evas canvas.
+ *
+ * @param e The given canvas pointer.
+ * @param x The rectangle's top left corner's horizontal coordinate.
+ * @param y The rectangle's top left corner's vertical coordinate
+ * @param w The rectangle's width.
+ * @param h The rectangle's height.
+ *
+ * This is the function by which one tells an Evas canvas that a part
+ * of it <b>must not</b> be repainted. The region must be
+ * rectangular and its coordinates inside the canvas viewport are
+ * passed in the call. After this call, the region specified won't
+ * participate in any form in Evas' calculations and actions during
+ * its rendering updates, having its displaying content frozen as it
+ * was just after this function took place.
+ *
+ * We call it "obscured region" because the most common use case for
+ * this rendering (partial) freeze is something else (most problaby
+ * other canvas) being on top of the specified rectangular region,
+ * thus shading it completely from the user's final scene in a
+ * display. To avoid unecessary processing, one should indicate to the
+ * obscured canvas not to bother about the non-important area.
+ *
+ * The majority of users won't have to worry about this funcion, as
+ * they'll be using just one canvas in their applications, with
+ * nothing inset or on top of it in any form.
+ *
+ * To make this region one that <b>has</b> to be repainted
+ * again, call the function evas_obscured_clear().
+ *
+ * @note This is a <b>very low level function</b>, which most of
+ * Evas' users wouldn't care about.
+ *
+ * @note This function does <b>not</b> flag the canvas as having its
+ * state changed. If you want to re-render it afterwards expecting new
+ * contents, you have to add "damage" regions yourself (see
+ * evas_damage_rectangle_add()).
+ *
+ * @see evas_obscured_clear()
+ * @see evas_render_updates()
+ *
+ * Example code follows.
+ * @dontinclude evas-events.c
+ * @skip add an obscured
+ * @until evas_obscured_clear(evas);
+ *
+ * In that example, pressing the "Ctrl" and "o" keys will impose or
+ * remove an obscured region in the middle of the canvas. You'll get
+ * the same contents at the time the key was pressed, if toggling it
+ * on, until you toggle it off again (make sure the animation is
+ * running on to get the idea better). See the full @ref
+ * Example_Evas_Events "example".
+ *
+ * @ingroup Evas_Canvas
+ */
+EAPI void              evas_obscured_rectangle_add       (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
 
 /**
- * @defgroup Evas_Object_Group_Map UV Mapping (Rotation, Perspecitve, 3D...)
+ * Remove all "obscured regions" from an Evas canvas.
  *
- * Evas allows different transformations to be applied to all kinds of
- * objects. These are applied by means of UV mapping.
+ * @param e The given canvas pointer.
  *
- * With UV mapping, one maps points in the source object to a 3D space
- * positioning at target. This allows rotation, perspective, scale and
- * lots of other effects, depending on the map that is used.
+ * This function removes all the rectangles from the obscured regions
+ * list of the canvas @p e. It takes obscured areas added with
+ * evas_obscured_rectangle_add() and make them again a regions that
+ * <b>have</b> to be repainted on rendering updates.
  *
- * Each map point may carry a multiplier color. If properly
- * calculated, these can do shading effects on the object, producing
- * 3D effects.
+ * @note This is a <b>very low level function</b>, which most of
+ * Evas' users wouldn't care about.
  *
- * As usual, Evas provides both the raw and easy to use methods. The
- * raw methods allow developer to create its maps somewhere else,
- * maybe load them from some file format. The easy to use methods,
- * calculate the points given some high-level parameters, such as
- * rotation angle, ambient light and so on.
+ * @note This function does <b>not</b> flag the canvas as having its
+ * state changed. If you want to re-render it afterwards expecting new
+ * contents, you have to add "damage" regions yourself (see
+ * evas_damage_rectangle_add()).
  *
- * @note applying mapping will reduce performance, so use with
- *       care. The impact on performance depends on engine in
- *       use. Software is quite optimized, but not as fast as OpenGL.
+ * @see evas_obscured_rectangle_add() for an example
+ * @see evas_render_updates()
  *
- * @ingroup Evas_Object_Group
+ * @ingroup Evas_Canvas
  */
-   EAPI void              evas_object_map_enable_set        (Evas_Object *obj, Eina_Bool enabled);
-   EAPI Eina_Bool         evas_object_map_enable_get        (const Evas_Object *obj);
-   EAPI void              evas_object_map_source_set        (Evas_Object *obj, Evas_Object *src);
-   EAPI Evas_Object      *evas_object_map_source_get        (const Evas_Object *obj);
-   EAPI void              evas_object_map_set               (Evas_Object *obj, const Evas_Map *map);
-   EAPI const Evas_Map   *evas_object_map_get               (const Evas_Object *obj);
-
-   EAPI void              evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *obj, Evas_Coord z);
-   EAPI void              evas_map_util_points_populate_from_object     (Evas_Map *m, const Evas_Object *obj);
-   EAPI void              evas_map_util_points_populate_from_geometry   (Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Coord z);
-   EAPI void              evas_map_util_points_color_set                (Evas_Map *m, int r, int g, int b, int a);
-   EAPI void              evas_map_util_rotate                          (Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy);
-   EAPI void              evas_map_util_zoom                            (Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy);
-   EAPI void              evas_map_util_3d_rotate                       (Evas_Map *m, double dx, double dy, double dz, Evas_Coord cx, Evas_Coord cy, Evas_Coord cz);
-   EAPI void              evas_map_util_3d_lighting                     (Evas_Map *m, Evas_Coord lx, Evas_Coord ly, Evas_Coord lz, int lr, int lg, int lb, int ar, int ag, int ab);
-   EAPI void              evas_map_util_3d_perspective                  (Evas_Map *m, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc);
-   EAPI Eina_Bool         evas_map_util_clockwise_get                   (Evas_Map *m);
-
-   EAPI Evas_Map         *evas_map_new                      (int count);
-   EAPI void              evas_map_smooth_set               (Evas_Map *m, Eina_Bool enabled);
-   EAPI Eina_Bool         evas_map_smooth_get               (const Evas_Map *m);
-   EAPI void              evas_map_alpha_set                (Evas_Map *m, Eina_Bool enabled);
-   EAPI Eina_Bool         evas_map_alpha_get                (const Evas_Map *m);
-   EAPI Evas_Map         *evas_map_dup                      (const Evas_Map *m);
-   EAPI void              evas_map_free                     (Evas_Map *m);
-   EAPI int               evas_map_count_get               (const Evas_Map *m) EINA_CONST;
-   EAPI void              evas_map_point_coord_set          (Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z);
-   EAPI void              evas_map_point_coord_get          (const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z);
-   EAPI void              evas_map_point_image_uv_set       (Evas_Map *m, int idx, double u, double v);
-   EAPI void              evas_map_point_image_uv_get       (const Evas_Map *m, int idx, double *u, double *v);
-   EAPI void              evas_map_point_color_set          (Evas_Map *m, int idx, int r, int g, int b, int a);
-   EAPI void              evas_map_point_color_get          (const Evas_Map *m, int idx, int *r, int *g, int *b, int *a);
+EAPI void              evas_obscured_clear               (Evas *e) EINA_ARG_NONNULL(1);
 
 /**
- * @defgroup Evas_Object_Group_Size_Hints Size Hints
+ * Force immediate renderization of the given Evas canvas.
  *
- * Objects may carry hints so another object that acts as a manager
- * (see @ref Evas_Smart_Object_Group) may know how to properly position
- * and resize the object. The Size Hints provide a common interface
- * that is recommended as the protocol for such information.
+ * @param e The given canvas pointer.
+ * @return A newly allocated list of updated rectangles of the canvas
+ *        (@c Eina_Rectangle structs). Free this list with
+ *        evas_render_updates_free().
  *
- * @ingroup Evas_Object_Group
+ * This function forces an immediate renderization update of the given
+ * canvas @e.
+ *
+ * @note This is a <b>very low level function</b>, which most of
+ * Evas' users wouldn't care about. One would use it, for example, to
+ * grab an Evas' canvas update regions and paint them back, using the
+ * canvas' pixmap, on a displaying system working below Evas.
+ *
+ * @note Evas is a stateful canvas. If no operations changing its
+ * state took place since the last rendering action, you won't see no
+ * changes and this call will be a no-op.
+ *
+ * Example code follows.
+ * @dontinclude evas-events.c
+ * @skip add an obscured
+ * @until d.obscured = !d.obscured;
+ *
+ * See the full @ref Example_Evas_Events "example".
+ *
+ * @ingroup Evas_Canvas
  */
-   EAPI void              evas_object_size_hint_min_get     (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_size_hint_min_set     (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_size_hint_max_get     (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_size_hint_max_set     (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_size_hint_request_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_size_hint_request_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_size_hint_aspect_get  (const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_size_hint_aspect_set  (Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_size_hint_align_get   (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_size_hint_align_set   (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_size_hint_weight_get  (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_size_hint_weight_set  (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_size_hint_padding_get (const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_size_hint_padding_set (Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b) EINA_ARG_NONNULL(1);
+EAPI Eina_List        *evas_render_updates               (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
 
 /**
- * @defgroup Evas_Object_Group_Extras Extra Object Manipulation
+ * Free the rectangles returned by evas_render_updates().
  *
- * Miscellaneous functions that also apply to any object, but are less
- * used or not implemented by all objects.
+ * @param updates The list of updated rectangles of the canvas.
  *
- * @ingroup Evas_Object_Group
+ * This function removes the region from the render updates list. It
+ * makes the region doesn't be render updated anymore.
+ *
+ * @see evas_render_updates() for an example
+ *
+ * @ingroup Evas_Canvas
  */
-   EAPI void                      evas_object_data_set             (Evas_Object *obj, const char *key, const void *data) EINA_ARG_NONNULL(1, 2);
-   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_del             (Evas_Object *obj, const char *key) EINA_ARG_NONNULL(1, 2);
-
-   EAPI void                      evas_object_pointer_mode_set     (Evas_Object *obj, Evas_Object_Pointer_Mode setting) EINA_ARG_NONNULL(1);
-   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 void              evas_render_updates_free          (Eina_List *updates);
 
-   EAPI void                      evas_object_anti_alias_set       (Evas_Object *obj, Eina_Bool antialias) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                 evas_object_anti_alias_get       (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-
-   EAPI void                      evas_object_scale_set            (Evas_Object *obj, double scale) EINA_ARG_NONNULL(1);
-   EAPI double                    evas_object_scale_get            (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-
-   EAPI void                      evas_object_render_op_set        (Evas_Object *obj, Evas_Render_Op op) EINA_ARG_NONNULL(1);
-   EAPI Evas_Render_Op            evas_object_render_op_get        (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-
-   EAPI void                      evas_object_precise_is_inside_set(Evas_Object *obj, Eina_Bool precise) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                 evas_object_precise_is_inside_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-
-   EAPI void                      evas_object_static_clip_set      (Evas_Object *obj, Eina_Bool is_static_clip) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                 evas_object_static_clip_get      (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-         
 /**
- * @defgroup Evas_Object_Group_Find Finding Objects
+ * Force renderization of the given canvas.
  *
- * Functions that allows finding objects by their position, name or
- * other properties.
+ * @param e The given canvas pointer.
  *
- * @ingroup Evas_Object_Group
+ * @ingroup Evas_Canvas
  */
-   EAPI Evas_Object      *evas_focus_get                    (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-
-   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_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_pointer_get    (const Evas *e) 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) 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) 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 Evas_Object      *evas_object_bottom_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) EINA_PURE;
+EAPI void              evas_render                       (Evas *e) EINA_ARG_NONNULL(1);
 
 /**
- * @defgroup Evas_Object_Group_Interceptors Object Method Interceptors
+ * Update the canvas internal objects but not triggering immediate
+ * renderization.
  *
- * Evas provides a way to intercept method calls. The interceptor
- * callback may opt to completely deny the call, or may check and
- * change the parameters before continuing. The continuation of an
- * intercepted call is done by calling the intercepted call again,
- * from inside the interceptor callback.
+ * @param e The given canvas pointer.
  *
- * @ingroup Evas_Object_Group
+ * This function updates the canvas internal objects not triggering
+ * renderization. To force renderization function evas_render() should
+ * be used.
+ *
+ * @see evas_render.
+ *
+ * @ingroup Evas_Canvas
  */
-typedef void (*Evas_Object_Intercept_Show_Cb) (void *data, Evas_Object *obj);
-typedef void (*Evas_Object_Intercept_Hide_Cb) (void *data, Evas_Object *obj);
-typedef void (*Evas_Object_Intercept_Move_Cb) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y);
-typedef void (*Evas_Object_Intercept_Resize_Cb) (void *data, Evas_Object *obj, Evas_Coord w, Evas_Coord h);
-typedef void (*Evas_Object_Intercept_Raise_Cb) (void *data, Evas_Object *obj);
-typedef void (*Evas_Object_Intercept_Lower_Cb) (void *data, Evas_Object *obj);
-typedef void (*Evas_Object_Intercept_Stack_Above_Cb) (void *data, Evas_Object *obj, Evas_Object *above);
-typedef void (*Evas_Object_Intercept_Stack_Below_Cb) (void *data, Evas_Object *obj, Evas_Object *above);
-typedef void (*Evas_Object_Intercept_Layer_Set_Cb) (void *data, Evas_Object *obj, int l);
-typedef void (*Evas_Object_Intercept_Color_Set_Cb) (void *data, Evas_Object *obj, int r, int g, int b, int a);
-typedef void (*Evas_Object_Intercept_Clip_Set_Cb) (void *data, Evas_Object *obj, Evas_Object *clip);
-typedef void (*Evas_Object_Intercept_Clip_Unset_Cb) (void *data, Evas_Object *obj);
-   
-   EAPI void              evas_object_intercept_show_callback_add        (Evas_Object *obj, Evas_Object_Intercept_Show_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void             *evas_object_intercept_show_callback_del        (Evas_Object *obj, Evas_Object_Intercept_Show_Cb func) EINA_ARG_NONNULL(1, 2);
-   EAPI void              evas_object_intercept_hide_callback_add        (Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void             *evas_object_intercept_hide_callback_del        (Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func) EINA_ARG_NONNULL(1, 2);
-   EAPI void              evas_object_intercept_move_callback_add        (Evas_Object *obj, Evas_Object_Intercept_Move_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void             *evas_object_intercept_move_callback_del        (Evas_Object *obj, Evas_Object_Intercept_Move_Cb func) EINA_ARG_NONNULL(1, 2);
-   EAPI void              evas_object_intercept_resize_callback_add      (Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void             *evas_object_intercept_resize_callback_del      (Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func) EINA_ARG_NONNULL(1, 2);
-   EAPI void              evas_object_intercept_raise_callback_add       (Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void             *evas_object_intercept_raise_callback_del       (Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func) EINA_ARG_NONNULL(1, 2);
-   EAPI void              evas_object_intercept_lower_callback_add       (Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void             *evas_object_intercept_lower_callback_del       (Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func) EINA_ARG_NONNULL(1, 2);
-   EAPI void              evas_object_intercept_stack_above_callback_add (Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void             *evas_object_intercept_stack_above_callback_del (Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func) EINA_ARG_NONNULL(1, 2);
-   EAPI void              evas_object_intercept_stack_below_callback_add (Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void             *evas_object_intercept_stack_below_callback_del (Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func) EINA_ARG_NONNULL(1, 2);
-   EAPI void              evas_object_intercept_layer_set_callback_add   (Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void             *evas_object_intercept_layer_set_callback_del   (Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func) EINA_ARG_NONNULL(1, 2);
-   EAPI void              evas_object_intercept_color_set_callback_add   (Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void             *evas_object_intercept_color_set_callback_del   (Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func) EINA_ARG_NONNULL(1, 2);
-   EAPI void              evas_object_intercept_clip_set_callback_add    (Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void             *evas_object_intercept_clip_set_callback_del    (Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func) EINA_ARG_NONNULL(1, 2);
-   EAPI void              evas_object_intercept_clip_unset_callback_add  (Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void             *evas_object_intercept_clip_unset_callback_del  (Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func) EINA_ARG_NONNULL(1, 2);
-
-
+EAPI void              evas_norender                     (Evas *e) EINA_ARG_NONNULL(1);
 
 /**
- * @defgroup Evas_Object_Specific Specific Object Functions
+ * Make the canvas discard internally cached data used for rendering.
  *
- * Functions that work on specific objects.
+ * @param e The given canvas pointer.
  *
+ * This function flushes the arrays of delete, active and render objects.
+ * Other things it may also discard are: shared memory segments,
+ * temporary scratch buffers, cached data to avoid re-compute of that data etc.
+ *
+ * @ingroup Evas_Canvas
  */
+EAPI void              evas_render_idle_flush            (Evas *e) EINA_ARG_NONNULL(1);
 
 /**
- * @defgroup Evas_Object_Rectangle Rectangle Object Functions
+ * Make the canvas discard as much data as possible used by the engine at
+ * runtime.
  *
- * Functions that operate on evas rectangle objects.
+ * @param e The given canvas pointer.
  *
- * @ingroup Evas_Object_Specific
+ * This function will unload images, delete textures and much more, where
+ * possible. You may also want to call evas_render_idle_flush() immediately
+ * prior to this to perhaps discard a little more, though evas_render_dump()
+ * should implicitly delete most of what evas_render_idle_flush() might
+ * discard too.
+ *
+ * @ingroup Evas_Canvas
  */
-   EAPI Evas_Object      *evas_object_rectangle_add         (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+EAPI void              evas_render_dump                  (Evas *e) EINA_ARG_NONNULL(1);
 
 /**
- * @defgroup Evas_Object_Image Image Object Functions
- *
- * Functions used to create and manipulate image objects.
+ * @defgroup Evas_Output_Method Render Engine Functions
  *
- * Note - Image objects may return or accept "image data" in multiple
- * formats.  This is based on the colorspace of an object. Here is a
- * rundown on formats:
+ * Functions that are used to set the render engine for a given
+ * function, and then get that engine working.
  *
- * EVAS_COLORSPACE_ARGB8888:
+ * The following code snippet shows how they can be used to
+ * initialise an evas that uses the X11 software engine:
+ * @code
+ * Evas *evas;
+ * Evas_Engine_Info_Software_X11 *einfo;
+ * extern Display *display;
+ * extern Window win;
  *
- * This pixel format is a linear block of pixels, starting at the
- * top-left row by row until the bottom right of the image or pixel
- * region. All pixels are 32-bit unsigned int's with the high-byte
- * being alpha and the low byte being blue in the format ARGB. Alpha
- * may or may not be used by evas depending on the alpha flag of the
- * image, but if not used, should be set to 0xff anyway.
+ * evas_init();
  *
- * This colorspace uses premultiplied alpha. That means that R, G and
- * B cannot exceed A in value. The conversion from non-premultiplied
- * colorspace is:
+ * evas = evas_new();
+ * evas_output_method_set(evas, evas_render_method_lookup("software_x11"));
+ * evas_output_size_set(evas, 640, 480);
+ * evas_output_viewport_set(evas, 0, 0, 640, 480);
+ * einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(evas);
+ * einfo->info.display = display;
+ * einfo->info.visual = DefaultVisual(display, DefaultScreen(display));
+ * einfo->info.colormap = DefaultColormap(display, DefaultScreen(display));
+ * einfo->info.drawable = win;
+ * einfo->info.depth = DefaultDepth(display, DefaultScreen(display));
+ * evas_engine_info_set(evas, (Evas_Engine_Info *)einfo);
+ * @endcode
  *
- * R = (r * a) / 255; G = (g * a) / 255; B = (b * a) / 255;
+ * @ingroup Evas_Canvas
+ */
+
+/**
+ * Look up a numeric ID from a string name of a rendering engine.
  *
- * So 50% transparent blue will be: 0x80000080. This will not be
- * "dark" - just 50% transparent. Values are 0 == black, 255 == solid
- * or full red, green or blue.
+ * @param name The string name of an engine
+ * @return A numeric (opaque) ID for the rendering engine
+ * @ingroup Evas_Output_Method
  *
- * EVAS_COLORSPACE_YCBCR422P601_PL:
+ * This function looks up a numeric return value for the named engine
+ * in the string @p name. This is a normal C string, NUL byte
+ * terminated. The name is case sensitive. If the rendering engine is
+ * available, a numeric ID for that engine is returned that is not
+ * 0. If the engine is not available, 0 is returned, indicating an
+ * invalid engine.
  *
- * This is a pointer-list indirected set of YUV (YCbCr) pixel
- * data. This means that the data returned or set is not actual pixel
- * data, but pointers TO lines of pixel data. The list of pointers
- * will first be N rows of pointers to the Y plane - pointing to the
- * first pixel at the start of each row in the Y plane. N is the
- * height of the image data in pixels. Each pixel in the Y, U and V
- * planes is 1 byte exactly, packed. The next N / 2 pointers will
- * point to rows in the U plane, and the next N / 2 pointers will
- * point to the V plane rows. U and V planes are half the horizontal
- * and vertical resolution of the Y plane.
+ * The programmer should NEVER rely on the numeric ID of an engine
+ * unless it is returned by this function. Programs should NOT be
+ * written accessing render method ID's directly, without first
+ * obtaining it from this function.
  *
- * Row order is top to bottom and row pixels are stored left to right.
+ * @attention it is mandatory that one calls evas_init() before
+ *       looking up the render method.
  *
- * There is a limitation that these images MUST be a multiple of 2
- * pixels in size horizontally or vertically. This is due to the U and
- * V planes being half resolution. Also note that this assumes the
- * itu601 YUV colorspace specification. This is defined for standard
- * television and mpeg streams.  HDTV may use the itu709
- * specification.
+ * Example:
+ * @code
+ * int engine_id;
+ * Evas *evas;
  *
- * Values are 0 to 255, indicating full or no signal in that plane
- * respectively.
+ * evas_init();
  *
- * EVAS_COLORSPACE_YCBCR422P709_PL:
+ * evas = evas_new();
+ * if (!evas)
+ *   {
+ *     fprintf(stderr, "ERROR: Canvas creation failed. Fatal error.\n");
+ *     exit(-1);
+ *   }
+ * engine_id = evas_render_method_lookup("software_x11");
+ * if (!engine_id)
+ *   {
+ *     fprintf(stderr, "ERROR: Requested rendering engine is absent.\n");
+ *     exit(-1);
+ *   }
+ * evas_output_method_set(evas, engine_id);
+ * @endcode
+ */
+EAPI int               evas_render_method_lookup         (const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+
+/**
+ * List all the rendering engines compiled into the copy of the Evas library
  *
- * Not implemented yet.
+ * @return A linked list whose data members are C strings of engine names
+ * @ingroup Evas_Output_Method
  *
- * EVAS_COLORSPACE_RGB565_A5P:
+ * Calling this will return a handle (pointer) to an Evas linked
+ * list. Each node in the linked list will have the data pointer be a
+ * (char *) pointer to the string name of the rendering engine
+ * available. The strings should never be modified, neither should the
+ * list be modified. This list should be cleaned up as soon as the
+ * program no longer needs it using evas_render_method_list_free(). If
+ * no engines are available from Evas, NULL will be returned.
  *
- * In the process of being implemented in 1 engine only. This may change.
+ * Example:
+ * @code
+ * Eina_List *engine_list, *l;
+ * char *engine_name;
+ *
+ * engine_list = evas_render_method_list();
+ * if (!engine_list)
+ *   {
+ *     fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n");
+ *     exit(-1);
+ *   }
+ * printf("Available Evas Engines:\n");
+ * EINA_LIST_FOREACH(engine_list, l, engine_name)
+ *     printf("%s\n", engine_name);
+ * evas_render_method_list_free(engine_list);
+ * @endcode
+ */
+EAPI Eina_List        *evas_render_method_list           (void) EINA_WARN_UNUSED_RESULT;
+
+/**
+ * This function should be called to free a list of engine names
  *
- * This is a pointer to image data for 16-bit half-word pixel data in
- * 16bpp RGB 565 format (5 bits red, 6 bits green, 5 bits blue), with
- * the high-byte containing red and the low byte containing blue, per
- * pixel. This data is packed row by row from the top-left to the
- * bottom right.
+ * @param list The Eina_List base pointer for the engine list to be freed
+ * @ingroup Evas_Output_Method
  *
- * If the image has an alpha channel enabled there will be an extra
- * alpha plane after the color pixel plane. If not, then this data
- * will not exist and should not be accessed in any way. This plane is
- * a set of pixels with 1 byte per pixel defining the alpha values of
- * all pixels in the image from the top-left to the bottom right of
- * the image, row by row. Even though the values of the alpha pixels
- * can be 0 to 255, only values 0 through to 32 are used, 32 being
- * solid and 0 being transparent.
+ * When this function is called it will free the engine list passed in
+ * as @p list. The list should only be a list of engines generated by
+ * calling evas_render_method_list(). If @p list is NULL, nothing will
+ * happen.
  *
- * RGB values can be 0 to 31 for red and blue and 0 to 63 for green,
- * with 0 being black and 31 or 63 being full red, green or blue
- * respectively. This colorspace is also pre-multiplied like
- * EVAS_COLORSPACE_ARGB8888 so:
+ * Example:
+ * @code
+ * Eina_List *engine_list, *l;
+ * char *engine_name;
+ *
+ * engine_list = evas_render_method_list();
+ * if (!engine_list)
+ *   {
+ *     fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n");
+ *     exit(-1);
+ *   }
+ * printf("Available Evas Engines:\n");
+ * EINA_LIST_FOREACH(engine_list, l, engine_name)
+ *     printf("%s\n", engine_name);
+ * evas_render_method_list_free(engine_list);
+ * @endcode
+ */
+EAPI void              evas_render_method_list_free      (Eina_List *list);
+
+
+/**
+ * Sets the output engine for the given evas.
  *
- * R = (r * a) / 32; G = (g * a) / 32; B = (b * a) / 32;
+ * Once the output engine for an evas is set, any attempt to change it
+ * will be ignored.  The value for @p render_method can be found using
+ * @ref evas_render_method_lookup .
  *
- * EVAS_COLORSPACE_A8:
+ * @param   e             The given evas.
+ * @param   render_method The numeric engine value to use.
  *
- * The image is just a alpha mask (8 bit's per pixel).  This is used for alpha
- * masking.
+ * @attention it is mandatory that one calls evas_init() before
+ *       setting the output method.
  *
- * @ingroup Evas_Object_Specific
+ * @ingroup Evas_Output_Method
  */
-typedef void (*Evas_Object_Image_Pixels_Get_Cb) (void *data, Evas_Object *o);
-   
-   EAPI Evas_Object             *evas_object_image_add                    (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-   EAPI Evas_Object             *evas_object_image_filled_add             (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-
-   EAPI void                     evas_object_image_memfile_set            (Evas_Object *obj, void *data, int size, char *format, char *key) EINA_ARG_NONNULL(1, 2);
-   EAPI void                     evas_object_image_file_set               (Evas_Object *obj, const char *file, const char *key) EINA_ARG_NONNULL(1);
-   EAPI void                     evas_object_image_file_get               (const Evas_Object *obj, const char **file, const char **key) EINA_ARG_NONNULL(1, 2);
-   EAPI void                     evas_object_image_border_set             (Evas_Object *obj, int l, int r, int t, int b) EINA_ARG_NONNULL(1);
-   EAPI void                     evas_object_image_border_get             (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1);
-   EAPI void                     evas_object_image_border_center_fill_set (Evas_Object *obj, Evas_Border_Fill_Mode fill) EINA_ARG_NONNULL(1);
-   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 void                     evas_object_image_filled_set             (Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                evas_object_image_filled_get             (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-   EAPI void                     evas_object_image_border_scale_set       (Evas_Object *obj, double scale);
-   EAPI double                   evas_object_image_border_scale_get       (const Evas_Object *obj);
-   EAPI void                     evas_object_image_fill_set               (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
-   EAPI void                     evas_object_image_fill_get               (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
-   EAPI void                     evas_object_image_fill_spread_set        (Evas_Object *obj, Evas_Fill_Spread spread) EINA_ARG_NONNULL(1);
-   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 void                     evas_object_image_size_set               (Evas_Object *obj, int w, int h) EINA_ARG_NONNULL(1);
-   EAPI void                     evas_object_image_size_get               (const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1);
-   EAPI int                      evas_object_image_stride_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) EINA_PURE;
-   EAPI void                     evas_object_image_data_set               (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1);
-   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_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_copy_set          (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1);
-   EAPI void                     evas_object_image_data_update_add        (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
-   EAPI void                     evas_object_image_alpha_set              (Evas_Object *obj, Eina_Bool has_alpha) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                evas_object_image_alpha_get              (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-   EAPI void                     evas_object_image_smooth_scale_set       (Evas_Object *obj, Eina_Bool smooth_scale) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                evas_object_image_smooth_scale_get       (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-   EAPI void                     evas_object_image_preload                (Evas_Object *obj, Eina_Bool cancel) EINA_ARG_NONNULL(1);
-   EAPI void                     evas_object_image_reload                 (Evas_Object *obj) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                evas_object_image_save                   (const Evas_Object *obj, const char *file, const char *key, const char *flags)  EINA_ARG_NONNULL(1, 2);
-   EAPI Eina_Bool                evas_object_image_pixels_import          (Evas_Object *obj, Evas_Pixel_Import_Source *pixels) EINA_ARG_NONNULL(1, 2);
-   EAPI void                     evas_object_image_pixels_get_callback_set(Evas_Object *obj, Evas_Object_Image_Pixels_Get_Cb func, void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void                     evas_object_image_pixels_dirty_set       (Evas_Object *obj, Eina_Bool dirty) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                evas_object_image_pixels_dirty_get       (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-   EAPI void                     evas_object_image_load_dpi_set           (Evas_Object *obj, double dpi) EINA_ARG_NONNULL(1);
-   EAPI double                   evas_object_image_load_dpi_get           (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-   EAPI void                     evas_object_image_load_size_set          (Evas_Object *obj, int w, int h) EINA_ARG_NONNULL(1);
-   EAPI void                     evas_object_image_load_size_get          (const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1);
-   EAPI void                     evas_object_image_load_scale_down_set    (Evas_Object *obj, int scale_down) EINA_ARG_NONNULL(1);
-   EAPI int                      evas_object_image_load_scale_down_get    (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-   EAPI void                     evas_object_image_load_region_set        (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
-   EAPI void                     evas_object_image_load_region_get        (const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1);
-   EAPI void                     evas_object_image_colorspace_set         (Evas_Object *obj, Evas_Colorspace cspace) EINA_ARG_NONNULL(1);
-   EAPI Evas_Colorspace          evas_object_image_colorspace_get         (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-   EAPI void                     evas_object_image_native_surface_set     (Evas_Object *obj, Evas_Native_Surface *surf) EINA_ARG_NONNULL(1, 2);
-   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 void                     evas_object_image_scale_hint_set         (Evas_Object *obj, Evas_Image_Scale_Hint hint) EINA_ARG_NONNULL(1);
-   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 void                     evas_object_image_content_hint_set       (Evas_Object *obj, Evas_Image_Content_Hint hint) EINA_ARG_NONNULL(1);
-   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 void              evas_output_method_set            (Evas *e, int render_method) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the number of the output engine used for the given evas.
+ * @param   e The given evas.
+ * @return  The ID number of the output engine being used.  @c 0 is
+ *          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 void                     evas_object_image_alpha_mask_set         (Evas_Object *obj, Eina_Bool ismask) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                evas_object_image_source_set             (Evas_Object *obj, Evas_Object *src) EINA_ARG_NONNULL(1);
-   EAPI Evas_Object             *evas_object_image_source_get             (Evas_Object *obj) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                evas_object_image_source_unset           (Evas_Object *obj) EINA_ARG_NONNULL(1);
 
 /**
- * @defgroup Evas_Object_Text Text Object Functions
+ * Retrieves the current render engine info struct from the given evas.
  *
- * Functions that operate on single line, single style text objects.
+ * The returned structure is publicly modifiable.  The contents are
+ * valid until either @ref evas_engine_info_set or @ref evas_render
+ * are called.
  *
- * For multiline and multiple style text, see @ref Evas_Object_Textblock.
+ * This structure does not need to be freed by the caller.
  *
- * @ingroup Evas_Object_Specific
+ * @param   e The given evas.
+ * @return  A pointer to the Engine Info structure.  @c NULL is returned if
+ *          an engine has not yet been assigned.
+ * @ingroup Evas_Output_Method
  */
-   typedef enum _Evas_Text_Style_Type
-     {
-       EVAS_TEXT_STYLE_PLAIN,
-       EVAS_TEXT_STYLE_SHADOW,
-       EVAS_TEXT_STYLE_OUTLINE,
-       EVAS_TEXT_STYLE_SOFT_OUTLINE,
-       EVAS_TEXT_STYLE_GLOW,
-       EVAS_TEXT_STYLE_OUTLINE_SHADOW,
-       EVAS_TEXT_STYLE_FAR_SHADOW,
-       EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW,
-       EVAS_TEXT_STYLE_SOFT_SHADOW,
-       EVAS_TEXT_STYLE_FAR_SOFT_SHADOW
-     } Evas_Text_Style_Type;
-
-   EAPI Evas_Object      *evas_object_text_add              (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-   EAPI void              evas_object_text_font_source_set  (Evas_Object *obj, const char *font) EINA_ARG_NONNULL(1);
-   EAPI const char       *evas_object_text_font_source_get  (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-   EAPI void              evas_object_text_font_set         (Evas_Object *obj, const char *font, Evas_Font_Size size) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_text_font_get         (const Evas_Object *obj, const char **font, Evas_Font_Size *size) EINA_ARG_NONNULL(1, 2);
-   EAPI void              evas_object_text_text_set         (Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
-   EAPI const char       *evas_object_text_text_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) 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 Eina_Bool         evas_object_text_char_pos_get     (const Evas_Object *obj, int pos, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
-   EAPI int               evas_object_text_char_coords_get  (const Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
-   EAPI int               evas_object_text_last_up_to_pos   (const Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
-   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 void              evas_object_text_style_set        (Evas_Object *obj, Evas_Text_Style_Type type) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_text_shadow_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_text_shadow_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_text_glow_color_set   (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_text_glow_color_get   (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_text_glow2_color_set  (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_text_glow2_color_get  (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_text_outline_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_text_style_pad_get    (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1);
-   EAPI Evas_BiDi_Direction evas_object_text_direction_get  (const Evas_Object *obj) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
+EAPI Evas_Engine_Info *evas_engine_info_get              (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
 
 /**
- * @defgroup Evas_Object_Textblock Textblock Object Functions
+ * Applies the engine settings for the given evas from the given @c
+ * Evas_Engine_Info structure.
  *
- * Functions used to create and manipulate textblock objects. Unlike
- * @ref Evas_Object_Text, these handle complex text, doing multiple
- * styles and multiline text based on HTML-like tags. Of these extra
- * features will be heavier on memory and processing cost.
+ * To get the Evas_Engine_Info structure to use, call @ref
+ * evas_engine_info_get .  Do not try to obtain a pointer to an
+ * @c Evas_Engine_Info structure in any other way.
  *
- * @todo put here some usage examples
+ * You will need to call this function at least once before you can
+ * create objects on an evas or render that evas.  Some engines allow
+ * their settings to be changed more than once.
  *
- * @ingroup Evas_Object_Specific
+ * Once called, the @p info pointer should be considered invalid.
+ *
+ * @param   e    The pointer to the Evas Canvas
+ * @param   info The pointer to the Engine Info to use
+ * @return  1 if no error occurred, 0 otherwise
+ * @ingroup Evas_Output_Method
  */
-   typedef struct _Evas_Textblock_Style                 Evas_Textblock_Style;
-   typedef struct _Evas_Textblock_Cursor                Evas_Textblock_Cursor;
-   /**
-    * @typedef Evas_Object_Textblock_Node_Format
-    * A format node.
-    */
-   typedef struct _Evas_Object_Textblock_Node_Format    Evas_Object_Textblock_Node_Format;
-   typedef struct _Evas_Textblock_Rectangle             Evas_Textblock_Rectangle;
-
-   struct _Evas_Textblock_Rectangle
-     {
-       Evas_Coord x, y, w, h;
-     };
-
-   typedef enum _Evas_Textblock_Text_Type
-     {
-       EVAS_TEXTBLOCK_TEXT_RAW,
-       EVAS_TEXTBLOCK_TEXT_PLAIN,
-       EVAS_TEXTBLOCK_TEXT_MARKUP
-     } Evas_Textblock_Text_Type;
+EAPI Eina_Bool         evas_engine_info_set              (Evas *e, Evas_Engine_Info *info) EINA_ARG_NONNULL(1);
 
-   typedef enum _Evas_Textblock_Cursor_Type
-     {
-       EVAS_TEXTBLOCK_CURSOR_UNDER,
-       EVAS_TEXTBLOCK_CURSOR_BEFORE
-     } Evas_Textblock_Cursor_Type;
-
-   EAPI Evas_Object                 *evas_object_textblock_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-
-   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_string_escape_get(const char *string, int *len_ret) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) 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) EINA_PURE;
+/**
+ * @defgroup Evas_Output_Size Output and Viewport Resizing Functions
+ *
+ * Functions that set and retrieve the output and viewport size of an
+ * evas.
+ *
+ * @ingroup Evas_Canvas
+ */
 
-   EAPI Evas_Textblock_Style        *evas_textblock_style_new(void) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
-   EAPI void                         evas_textblock_style_free(Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1);
-   EAPI void                         evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) EINA_ARG_NONNULL(1);
-   EAPI const char                  *evas_textblock_style_get(const Evas_Textblock_Style *ts) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+/**
+ * Sets the output size of the render engine of the given evas.
+ *
+ * The evas will render to a rectangle of the given size once this
+ * function is called.  The output size is independent of the viewport
+ * size.  The viewport will be stretched to fill the given rectangle.
+ *
+ * The units used for @p w and @p h depend on the engine used by the
+ * evas.
+ *
+ * @param   e The given evas.
+ * @param   w The width in output units, usually pixels.
+ * @param   h The height in output units, usually pixels.
+ * @ingroup Evas_Output_Size
+ */
+EAPI void              evas_output_size_set              (Evas *e, int w, int h) EINA_ARG_NONNULL(1);
 
-   EAPI void                         evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1);
-   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 void                         evas_object_textblock_replace_char_set(Evas_Object *obj, const char *ch) EINA_ARG_NONNULL(1);
-   EAPI const char                  *evas_object_textblock_replace_char_get(Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-   EAPI void                         evas_object_textblock_valign_set(Evas_Object *obj, double align);
-   EAPI double                       evas_object_textblock_valign_get(const Evas_Object *obj);
-         
-   EAPI void                         evas_object_textblock_newline_mode_set(Evas_Object *obj, Eina_Bool mode) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                    evas_object_textblock_newline_mode_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-
-   EAPI void                         evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
-   EAPI void                         evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
-   EAPI const char                  *evas_object_textblock_text_markup_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
-   EAPI const 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_new(Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-
-   EAPI void                         evas_textblock_cursor_free(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
-
-   EAPI void                         evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
-   EAPI void                         evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                    evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                    evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
-   EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_first_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-   EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_last_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-   EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_next_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1);
-   EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_prev_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1);
-   EAPI void                         evas_textblock_node_format_remove_pair(Evas_Object *obj, Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2);
-   EAPI void                         evas_textblock_cursor_set_at_format(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2);
-   EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
-   EAPI const char                  *evas_textblock_node_format_text_get(const Evas_Object_Textblock_Node_Format *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
-   EAPI void                         evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *fmt) EINA_ARG_NONNULL(1, 2);
-   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_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                    evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                    evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                    evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                    evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
-   EAPI void                         evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
-   EAPI void                         evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
-   EAPI void                         evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
-   EAPI void                         evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
-   EAPI int                          evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-   EAPI void                         evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int pos) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                    evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line) EINA_ARG_NONNULL(1);
-   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 void                         evas_textblock_cursor_copy(const Evas_Textblock_Cursor *cur, Evas_Textblock_Cursor *cur_dest) EINA_ARG_NONNULL(1, 2);
-
-   EAPI int                          evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
-   EAPI int                          evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
-
-   EAPI Eina_Bool                    evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2);
-   EAPI Eina_Bool                    evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2);
-   EAPI void                         evas_textblock_cursor_node_delete(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
-   EAPI void                         evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
-   EAPI void                         evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_Cursor *cur2) EINA_ARG_NONNULL(1, 2);
-
-   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 int                          evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) 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) EINA_PURE;
-   EAPI char                        *evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-
-   EAPI int                          evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_BiDi_Direction *dir, Evas_Textblock_Cursor_Type ctype) EINA_ARG_NONNULL(1);
-   EAPI int                          evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
-   EAPI int                          evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cpen_x, Evas_Coord *cy, Evas_Coord *cadv, Evas_Coord *ch) EINA_ARG_NONNULL(1);
-   EAPI int                          evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                    evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
-   EAPI int                          evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y) EINA_ARG_NONNULL(1);
-   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_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);
+/**
+ * Retrieve the output size of the render engine of the given evas.
+ *
+ * The output size is given in whatever the output units are for the
+ * engine.
+ *
+ * If either @p w or @p h is @c NULL, then it is ignored.  If @p e is
+ * invalid, the returned results are undefined.
+ *
+ * @param   e The given evas.
+ * @param   w The pointer to an integer to store the width in.
+ * @param   h The pointer to an integer to store the height in.
+ * @ingroup Evas_Output_Size
+ */
+EAPI void              evas_output_size_get              (const Evas *e, int *w, int *h) EINA_ARG_NONNULL(1);
 
-   EAPI Eina_Bool                    evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+/**
+ * Sets the output viewport of the given evas in evas units.
+ *
+ * The output viewport is the area of the evas that will be visible to
+ * the viewer.  The viewport will be stretched to fit the output
+ * target of the evas when rendering is performed.
+ *
+ * @note The coordinate values do not have to map 1-to-1 with the output
+ *       target.  However, it is generally advised that it is done for ease
+ *       of use.
+ *
+ * @param   e The given evas.
+ * @param   x The top-left corner x value of the viewport.
+ * @param   y The top-left corner y value of the viewport.
+ * @param   w The width of the viewport.  Must be greater than 0.
+ * @param   h The height of the viewport.  Must be greater than 0.
+ * @ingroup Evas_Output_Size
+ */
+EAPI void              evas_output_viewport_set          (Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
 
-   EAPI Eina_Bool                    evas_object_textblock_line_number_geometry_get(const Evas_Object *obj, int line, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
-   EAPI void                         evas_object_textblock_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
-   EAPI void                         evas_object_textblock_size_formatted_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
-   EAPI void                         evas_object_textblock_size_native_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
-   EAPI void                         evas_object_textblock_style_insets_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) EINA_ARG_NONNULL(1);
+/**
+ * Get the render engine's output viewport 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
+ *
+ * Calling this function writes the current canvas output viewport
+ * size and location values into the variables pointed to by @p x, @p
+ * y, @p w and @p h.  On success the variables have the output
+ * location and size values written to them in canvas units. Any of @p
+ * x, @p y, @p w or @p h that are NULL will not be written to. If @p e
+ * is invalid, the results are undefined.
+ *
+ * Example:
+ * @code
+ * extern Evas *evas;
+ * Evas_Coord x, y, width, height;
+ *
+ * evas_output_viewport_get(evas, &x, &y, &w, &h);
+ * @endcode
+ */
+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);
 
 /**
- * @defgroup Evas_Line_Group Line Object Functions
+ * @defgroup Evas_Coord_Mapping_Group Coordinate Mapping Functions
  *
- * Functions used to deal with evas line objects.
+ * Functions that are used to map coordinates from the canvas to the
+ * screen or the screen to the canvas.
  *
- * @ingroup Evas_Object_Specific
+ * @ingroup Evas_Canvas
  */
-   EAPI Evas_Object      *evas_object_line_add              (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-   EAPI void              evas_object_line_xy_set           (Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2);
-   EAPI void              evas_object_line_xy_get           (const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2);
 
 /**
- * @defgroup Evas_Object_Polygon Polygon Object Functions
+ * Convert/scale an ouput screen co-ordinate into canvas co-ordinates
  *
- * Functions that operate on evas polygon objects.
+ * @param e The pointer to the Evas Canvas
+ * @param x The screen/output x co-ordinate
+ * @return The screen co-ordinate translated to canvas unit co-ordinates
+ * @ingroup Evas_Coord_Mapping_Group
  *
- * Hint: as evas does not provide ellipse, smooth paths or circle, one
- * can calculate points and convert these to a polygon.
+ * This function takes in a horizontal co-ordinate as the @p x
+ * parameter and converts it into canvas units, accounting for output
+ * size, viewport size and location, returning it as the function
+ * return value. If @p e is invalid, the results are undefined.
  *
- * @ingroup Evas_Object_Specific
+ * Example:
+ * @code
+ * extern Evas *evas;
+ * extern int screen_x;
+ * Evas_Coord canvas_x;
+ *
+ * canvas_x = evas_coord_screen_x_to_world(evas, screen_x);
+ * @endcode
  */
-   EAPI Evas_Object      *evas_object_polygon_add           (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-   EAPI void              evas_object_polygon_point_add     (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_polygon_points_clear  (Evas_Object *obj) EINA_ARG_NONNULL(1);
+EAPI Evas_Coord        evas_coord_screen_x_to_world      (const Evas *e, int x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
 
 /**
- * @defgroup Evas_Smart_Group Smart Functions
+ * Convert/scale an ouput screen co-ordinate into canvas co-ordinates
  *
- * Functions that deal with Evas_Smart's, creating definition
- * (classes) of objects that will have customized behavior for methods
- * like evas_object_move(), evas_object_resize(),
- * evas_object_clip_set() and others.
+ * @param e The pointer to the Evas Canvas
+ * @param y The screen/output y co-ordinate
+ * @return The screen co-ordinate translated to canvas unit co-ordinates
+ * @ingroup Evas_Coord_Mapping_Group
  *
- * These objects will accept the generic methods defined in @ref
- * Evas_Object_Group and the extensions defined in @ref
- * Evas_Smart_Object_Group. There are couple of existent smart objects
- * in Evas itself, see @ref Evas_Object_Box, @ref Evas_Object_Table
- * and @ref Evas_Smart_Object_Clipped.
+ * This function takes in a vertical co-ordinate as the @p y parameter
+ * and converts it into canvas units, accounting for output size,
+ * viewport size and location, returning it as the function return
+ * value. If @p e is invalid, the results are undefined.
+ *
+ * Example:
+ * @code
+ * extern Evas *evas;
+ * extern int screen_y;
+ * Evas_Coord canvas_y;
+ *
+ * canvas_y = evas_coord_screen_y_to_world(evas, screen_y);
+ * @endcode
  */
+EAPI Evas_Coord        evas_coord_screen_y_to_world      (const Evas *e, int y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
 
 /**
- * @def EVAS_SMART_CLASS_VERSION
- * The version you have to put into the version field in the smart
- * class struct
- * @ingroup Evas_Smart_Group
+ * Convert/scale a canvas co-ordinate into output screen co-ordinates
+ *
+ * @param e The pointer to the Evas Canvas
+ * @param x The canvas x co-ordinate
+ * @return The output/screen co-ordinate translated to output co-ordinates
+ * @ingroup Evas_Coord_Mapping_Group
+ *
+ * This function takes in a horizontal co-ordinate as the @p x
+ * parameter and converts it into output units, accounting for output
+ * size, viewport size and location, returning it as the function
+ * return value. If @p e is invalid, the results are undefined.
+ *
+ * Example:
+ * @code
+ * extern Evas *evas;
+ * int screen_x;
+ * extern Evas_Coord canvas_x;
+ *
+ * screen_x = evas_coord_world_x_to_screen(evas, canvas_x);
+ * @endcode
  */
-#define EVAS_SMART_CLASS_VERSION 4
+EAPI int               evas_coord_world_x_to_screen      (const Evas *e, Evas_Coord x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+
 /**
- * @struct _Evas_Smart_Class
- * a smart object class
- * @ingroup Evas_Smart_Group
+ * Convert/scale a canvas co-ordinate into output screen co-ordinates
+ *
+ * @param e The pointer to the Evas Canvas
+ * @param y The canvas y co-ordinate
+ * @return The output/screen co-ordinate translated to output co-ordinates
+ * @ingroup Evas_Coord_Mapping_Group
+ *
+ * This function takes in a vertical co-ordinate as the @p x parameter
+ * and converts it into output units, accounting for output size,
+ * viewport size and location, returning it as the function return
+ * value. If @p e is invalid, the results are undefined.
+ *
+ * Example:
+ * @code
+ * extern Evas *evas;
+ * int screen_y;
+ * extern Evas_Coord canvas_y;
+ *
+ * screen_y = evas_coord_world_y_to_screen(evas, canvas_y);
+ * @endcode
+ */
+EAPI int               evas_coord_world_y_to_screen      (const Evas *e, Evas_Coord y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+
+/**
+ * @defgroup Evas_Pointer_Group Pointer (Mouse) Functions
+ *
+ * Functions that deal with the status of the pointer (mouse cursor).
+ *
+ * @ingroup Evas_Canvas
+ */
+
+/**
+ * This function returns the current known pointer co-ordinates
+ *
+ * @param e The pointer to the Evas Canvas
+ * @param x The pointer to an integer to be filled in
+ * @param y The pointer to an integer to be filled in
+ * @ingroup Evas_Pointer_Group
+ *
+ * This function returns the current known screen/output co-ordinates
+ * of the mouse pointer and sets the contents of the integers pointed
+ * to by @p x and @p y to contain these co-ordinates. If @p e is not a
+ * valid canvas the results of this function are undefined.
+ *
+ * Example:
+ * @code
+ * extern Evas *evas;
+ * int mouse_x, mouse_y;
+ *
+ * evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y);
+ * printf("Mouse is at screen position %i, %i\n", mouse_x, mouse_y);
+ * @endcode
+ */
+EAPI void              evas_pointer_output_xy_get        (const Evas *e, int *x, int *y) EINA_ARG_NONNULL(1);
+
+/**
+ * This function returns the current known pointer co-ordinates
+ *
+ * @param e The pointer to the Evas Canvas
+ * @param x The pointer to a Evas_Coord to be filled in
+ * @param y The pointer to a Evas_Coord to be filled in
+ * @ingroup Evas_Pointer_Group
+ *
+ * This function returns the current known canvas unit co-ordinates of
+ * the mouse pointer and sets the contents of the Evas_Coords pointed
+ * to by @p x and @p y to contain these co-ordinates. If @p e is not a
+ * valid canvas the results of this function are undefined.
+ *
+ * Example:
+ * @code
+ * extern Evas *evas;
+ * Evas_Coord mouse_x, mouse_y;
+ *
+ * evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y);
+ * printf("Mouse is at canvas position %f, %f\n", mouse_x, mouse_y);
+ * @endcode
+ */
+EAPI void              evas_pointer_canvas_xy_get        (const Evas *e, Evas_Coord *x, Evas_Coord *y) EINA_ARG_NONNULL(1);
+
+/**
+ * Returns a bitmask with the mouse buttons currently pressed, set to 1
+ *
+ * @param e The pointer to the Evas Canvas
+ * @return A bitmask of the currently depressed buttons on the cavas
+ * @ingroup Evas_Pointer_Group
+ *
+ * Calling this function will return a 32-bit integer with the
+ * appropriate bits set to 1 that correspond to a mouse button being
+ * depressed. This limits Evas to a mouse devices with a maximum of 32
+ * buttons, but that is generally in excess of any host system's
+ * pointing device abilities.
+ *
+ * A canvas by default begins with no mouse buttons being pressed and
+ * only calls to evas_event_feed_mouse_down(),
+ * evas_event_feed_mouse_down_data(), evas_event_feed_mouse_up() and
+ * evas_event_feed_mouse_up_data() will alter that.
+ *
+ * The least significant bit corresponds to the first mouse button
+ * (button 1) and the most significant bit corresponds to the last
+ * mouse button (button 32).
+ *
+ * If @p e is not a valid canvas, the return value is undefined.
+ *
+ * Example:
+ * @code
+ * extern Evas *evas;
+ * int button_mask, i;
+ *
+ * button_mask = evas_pointer_button_down_mask_get(evas);
+ * printf("Buttons currently pressed:\n");
+ * for (i = 0; i < 32; i++)
+ *   {
+ *     if ((button_mask & (1 << i)) != 0) printf("Button %i\n", i + 1);
+ *   }
+ * @endcode
+ */
+EAPI int               evas_pointer_button_down_mask_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+
+/**
+ * Returns whether the mouse pointer is logically inside the canvas
+ *
+ * @param e The pointer to the Evas Canvas
+ * @return An integer that is 1 if the mouse is inside the canvas, 0 otherwise
+ * @ingroup Evas_Pointer_Group
+ *
+ * When this function is called it will return a value of either 0 or
+ * 1, depending on if evas_event_feed_mouse_in(),
+ * evas_event_feed_mouse_in_data(), or evas_event_feed_mouse_out(),
+ * evas_event_feed_mouse_out_data() have been called to feed in a
+ * mouse enter event into the canvas.
+ *
+ * A return value of 1 indicates the mouse is logically inside the
+ * canvas, and 0 implies it is logically outside the canvas.
+ *
+ * A canvas begins with the mouse being assumed outside (0).
+ *
+ * If @p e is not a valid canvas, the return value is undefined.
+ *
+ * Example:
+ * @code
+ * extern Evas *evas;
+ *
+ * if (evas_pointer_inside_get(evas)) printf("Mouse is in!\n");
+ * else printf("Mouse is out!\n");
+ * @endcode
+ */
+EAPI Eina_Bool         evas_pointer_inside_get           (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+   EAPI void              evas_sync(Evas *e) EINA_ARG_NONNULL(1);
+
+/**
+ * @defgroup Evas_Canvas_Events Canvas Events
+ *
+ * Functions relating to canvas events, be they input (mice,
+ * keyboards, etc) or output ones (internal states changing, etc).
+ *
+ * @ingroup Evas_Canvas
+ */
+
+/**
+ * @addtogroup Evas_Canvas_Events
+ * @{
+ */
+
+/**
+ * Add (register) a callback function to a given canvas event.
+ *
+ * @param e Canvas to attach a callback to
+ * @param type The type of event that will trigger the callback
+ * @param func The (callback) function to be called when the event is
+ *        triggered
+ * @param data The data pointer to be passed to @p func
+ *
+ * This function adds a function callback to the canvas @p e when the
+ * event of type @p type occurs on it. The function pointer is @p
+ * func.
+ *
+ * In the event of a memory allocation error during the addition of
+ * the callback to the canvas, evas_alloc_error() should be used to
+ * determine the nature of the error, if any, and the program should
+ * sensibly try and recover.
+ *
+ * A callback function must have the ::Evas_Event_Cb prototype
+ * definition. The first parameter (@p data) in this definition will
+ * have the same value passed to evas_event_callback_add() as the @p
+ * data parameter, at runtime. The second parameter @p e is the canvas
+ * pointer on which the event occurred. The third parameter @p
+ * event_info is a pointer to a data structure that may or may not be
+ * passed to the callback, depending on the event type that triggered
+ * the callback. This is so because some events don't carry extra
+ * context with them, but others do.
+ *
+ * The event type @p type to trigger the function may be one of
+ * #EVAS_CALLBACK_RENDER_FLUSH_PRE, #EVAS_CALLBACK_RENDER_FLUSH_POST,
+ * #EVAS_CALLBACK_CANVAS_FOCUS_IN, #EVAS_CALLBACK_CANVAS_FOCUS_OUT,
+ * #EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN and
+ * #EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT. This determines the kind of
+ * event that will trigger the callback to be called. Only the last
+ * two of the event types listed here provide useful event information
+ * data -- a pointer to the recently focused Evas object. For the
+ * others the @p event_info pointer is going to be @c NULL.
+ *
+ * Example:
+ * @dontinclude evas-events.c
+ * @skip evas_event_callback_add(d.canvas, EVAS_CALLBACK_RENDER_FLUSH_PRE
+ * @until two canvas event callbacks
+ *
+ * Looking to the callbacks registered above,
+ * @dontinclude evas-events.c
+ * @skip called when our rectangle gets focus
+ * @until let's have our events back
+ *
+ * we see that the canvas flushes its rendering pipeline
+ * (#EVAS_CALLBACK_RENDER_FLUSH_PRE) whenever the @c _resize_cb
+ * routine takes place: it has to redraw that image at a different
+ * size. Also, the callback on an object being focused comes just
+ * after we focus it explicitly, on code.
+ *
+ * See the full @ref Example_Evas_Events "example".
+ *
+ * @note Be careful not to add the same callback multiple times, if
+ * that's not what you want, because Evas won't check if a callback
+ * existed before exactly as the one being registered (and thus, call
+ * it more than once on the event, in this case). This would make
+ * sense if you passed different functions and/or callback data, only.
+ */
+EAPI void              evas_event_callback_add              (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
+
+/**
+ * Delete a callback function from the canvas.
+ *
+ * @param e Canvas to remove a callback from
+ * @param type The type of event that was triggering the callback
+ * @param func The function that was to be called when the event was triggered
+ * @return The data pointer that was to be passed to the callback
+ *
+ * This function removes the most recently added callback from the
+ * canvas @p e which was triggered by the event type @p type and was
+ * calling the function @p func when triggered. If the removal is
+ * successful it will also return the data pointer that was passed to
+ * evas_event_callback_add() when the callback was added to the
+ * canvas. If not successful NULL will be returned.
+ *
+ * Example:
+ * @code
+ * extern Evas *e;
+ * void *my_data;
+ * void focus_in_callback(void *data, Evas *e, void *event_info);
+ *
+ * my_data = evas_event_callback_del(ebject, EVAS_CALLBACK_CANVAS_FOCUS_IN, focus_in_callback);
+ * @endcode
+ */
+EAPI void             *evas_event_callback_del              (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) EINA_ARG_NONNULL(1, 3);
+
+/**
+ * Delete (unregister) a callback function registered to a given
+ * canvas event.
+ *
+ * @param e Canvas to remove an event callback from
+ * @param type The type of event that was triggering the callback
+ * @param func The function that was to be called when the event was
+ *        triggered
+ * @param data The data pointer that was to be passed to the callback
+ * @return The data pointer that was to be passed to the callback
+ *
+ * This function removes <b>the first</b> added callback from the
+ * canvas @p e matching the event type @p type, 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_event_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.
+ *
+ * Example:
+ * @dontinclude evas-events.c
+ * @skip evas_event_callback_del_full(evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
+ * @until _object_focus_in_cb, NULL);
+ *
+ * See the full @ref Example_Evas_Events "example".
+ *
+ * @note For deletion of canvas events callbacks filtering by just
+ * type and function pointer, user evas_event_callback_del().
+ */
+EAPI void             *evas_event_callback_del_full         (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
+
+/**
+ * Push a callback on the post-event callback stack
+ *
+ * @param e Canvas to push the callback on
+ * @param func The function that to be called when the stack is unwound
+ * @param data The data pointer to be passed to the callback
+ *
+ * Evas has a stack of callbacks that get called after all the callbacks for
+ * an event have triggered (all the objects it triggers on and al the callbacks
+ * in each object triggered). When all these have been called, the stack is
+ * unwond from most recently to least recently pushed item and removed from the
+ * stack calling the callback set for it.
+ *
+ * This is intended for doing reverse logic-like processing, example - when a
+ * child object that happens to get the event later is meant to be able to
+ * "steal" functions from a parent and thus on unwind of this stack hav its
+ * function called first, thus being able to set flags, or return 0 from the
+ * post-callback that stops all other post-callbacks in the current stack from
+ * being called (thus basically allowing a child to take control, if the event
+ * callback prepares information ready for taking action, but the post callback
+ * actually does the action).
+ *
+ */
+EAPI void              evas_post_event_callback_push        (Evas *e, Evas_Object_Event_Post_Cb func, const void *data);
+
+/**
+ * Remove a callback from the post-event callback stack
+ *
+ * @param e Canvas to push the callback on
+ * @param func The function that to be called when the stack is unwound
+ *
+ * This removes a callback from the stack added with
+ * evas_post_event_callback_push(). The first instance of the function in
+ * the callback stack is removed from being executed when the stack is
+ * unwound. Further instances may still be run on unwind.
+ */
+EAPI void              evas_post_event_callback_remove      (Evas *e, Evas_Object_Event_Post_Cb func);
+
+/**
+ * Remove a callback from the post-event callback stack
+ *
+ * @param e Canvas to push the callback on
+ * @param func The function that to be called when the stack is unwound
+ * @param data The data pointer to be passed to the callback
+ *
+ * This removes a callback from the stack added with
+ * evas_post_event_callback_push(). The first instance of the function and data
+ * in the callback stack is removed from being executed when the stack is
+ * unwound. Further instances may still be run on unwind.
+ */
+EAPI void              evas_post_event_callback_remove_full (Evas *e, Evas_Object_Event_Post_Cb func, const void *data);
+
+/**
+ * @defgroup Evas_Event_Freezing_Group Input Events Freezing Functions
+ *
+ * Functions that deal with the freezing of input event processing of
+ * an Evas canvas.
+ *
+ * There might be scenarios during a graphical user interface
+ * program's use when the developer whishes the users wouldn't be able
+ * to deliver input events to this application. It may, for example,
+ * be the time for it to populate a view or to change some
+ * layout. Assuming proper behavior with user interaction during this
+ * exact time would be hard, as things are in a changing state. The
+ * programmer can then tell the canvas to ignore input events,
+ * bringing it back to normal behavior when he/she wants.
+ *
+ * @ingroup Evas_Canvas_Events
+ */
+
+/**
+ * @addtogroup Evas_Event_Freezing_Group
+ * @{
+ */
+
+/**
+ * Freeze all input events processing.
+ *
+ * @param e The canvas to freeze input events processing on.
+ *
+ * This function will indicate to Evas that the canvas @p e is to have
+ * all input event processing frozen until a matching
+ * evas_event_thaw() function is called on the same canvas. All events
+ * of this kind during the freeze will get <b>discarded</b>. Every
+ * freeze call must be matched by a thaw call in order to completely
+ * thaw out a canvas (i.e. these calls may be nested). The most common
+ * use is when you don't want the user to interect with your user
+ * interface when you're populating a view or changing the layout.
+ *
+ * Example:
+ * @dontinclude evas-events.c
+ * @skip freeze input for 3 seconds
+ * @until }
+ * @dontinclude evas-events.c
+ * @skip let's have our events back
+ * @until }
+ *
+ * See the full @ref Example_Evas_Events "example".
+ *
+ * If you run that example, you'll see the canvas ignoring all input
+ * events for 3 seconds, when the "f" key is pressed. In a more
+ * realistic code we would be freezing while a toolkit or Edje was
+ * doing some UI changes, thawing it back afterwards.
+ */
+EAPI void              evas_event_freeze                 (Evas *e) EINA_ARG_NONNULL(1);
+
+/**
+ * Thaw a canvas out after freezing (for input events).
+ *
+ * @param e The canvas to thaw out.
+ *
+ * This will thaw out a canvas after a matching evas_event_freeze()
+ * call. If this call completely thaws out a canvas, i.e., there's no
+ * other unbalanced call to evas_event_freeze(), events will start to
+ * be processed again, but any "missed" events will <b>not</b> be
+ * evaluated.
+ *
+ * See evas_event_freeze() for an example.
+ */
+EAPI void              evas_event_thaw                   (Evas *e) EINA_ARG_NONNULL(1);
+
+/**
+ * Return the freeze count on input events of a given canvas.
+ *
+ * @param e The canvas to fetch the freeze count from.
+ *
+ * This returns the number of times the canvas has been told to freeze
+ * input events. It is possible to call evas_event_freeze() multiple
+ * times, and these must be matched by evas_event_thaw() calls. This
+ * call allows the program to discover just how many times things have
+ * been frozen in case it may want to break out of a deep freeze state
+ * where the count is high.
+ *
+ * Example:
+ * @code
+ * extern Evas *evas;
+ *
+ * while (evas_event_freeze_get(evas) > 0) evas_event_thaw(evas);
+ * @endcode
+ *
+ */
+EAPI int               evas_event_freeze_get             (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * After thaw of a canvas, re-evaluate the state of objects and call callbacks
+ *
+ * @param e The canvas to evaluate after a thaw
+ *
+ * This is normally called after evas_event_thaw() to re-evaluate mouse
+ * containment and other states and thus also call callbacks for mouse in and
+ * out on new objects if the state change demands it.
+ */
+EAPI void              evas_event_thaw_eval              (Evas *e) EINA_ARG_NONNULL(1);
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Evas_Event_Feeding_Group Input Events Feeding Functions
+ *
+ * Functions to tell Evas that input events happened and should be
+ * processed.
+ *
+ * As explained in @ref intro_not_evas, Evas does not know how to poll
+ * for input events, so the developer should do it and then feed such
+ * events to the canvas to be processed. This is only required if
+ * operating Evas directly. Modules such as Ecore_Evas do that for
+ * you.
+ *
+ * @ingroup Evas_Canvas_Events
+ */
+
+/**
+ * @addtogroup Evas_Event_Feeding_Group
+ * @{
+ */
+
+/**
+ * Mouse down event feed.
+ *
+ * @param e The given canvas pointer.
+ * @param b The button number.
+ * @param flags The evas button flags.
+ * @param timestamp The timestamp of the mouse down event.
+ * @param data The data for canvas.
+ *
+ * This function will set some evas properties that is necessary when
+ * the mouse button is pressed. It prepares information to be treated
+ * by the callback function.
+ *
+ */
+EAPI void              evas_event_feed_mouse_down        (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
+
+/**
+ * Mouse up event feed.
+ *
+ * @param e The given canvas pointer.
+ * @param b The button number.
+ * @param flags evas button flags.
+ * @param timestamp The timestamp of the mouse up event.
+ * @param data The data for canvas.
+ *
+ * This function will set some evas properties that is necessary when
+ * the mouse button is released. It prepares information to be treated
+ * by the callback function.
+ *
+ */
+EAPI void              evas_event_feed_mouse_up          (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
+
+/**
+ * Mouse move event feed.
+ *
+ * @param e The given canvas pointer.
+ * @param x The horizontal position of the mouse pointer.
+ * @param y The vertical position of the mouse pointer.
+ * @param timestamp The timestamp of the mouse up event.
+ * @param data The data for canvas.
+ *
+ * This function will set some evas properties that is necessary when
+ * the mouse is moved from its last position. It prepares information
+ * to be treated by the callback function.
+ *
+ */
+EAPI void              evas_event_feed_mouse_move        (Evas *e, int x, int y, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
+
+/**
+ * Mouse in event feed.
+ *
+ * @param e The given canvas pointer.
+ * @param timestamp The timestamp of the mouse up event.
+ * @param data The data for canvas.
+ *
+ * This function will set some evas properties that is necessary when
+ * the mouse in event happens. It prepares information to be treated
+ * by the callback function.
+ *
+ */
+EAPI void              evas_event_feed_mouse_in          (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
+
+/**
+ * Mouse out event feed.
+ *
+ * @param e The given canvas pointer.
+ * @param timestamp Timestamp of the mouse up event.
+ * @param data The data for canvas.
+ *
+ * This function will set some evas properties that is necessary when
+ * the mouse out event happens. It prepares information to be treated
+ * by the callback function.
+ *
+ */
+EAPI void              evas_event_feed_mouse_out         (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
+   EAPI void              evas_event_feed_multi_down        (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data);
+   EAPI void              evas_event_feed_multi_up          (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data);
+   EAPI void              evas_event_feed_multi_move        (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, unsigned int timestamp, const void *data);
+
+/**
+ * Mouse cancel event feed.
+ *
+ * @param e The given canvas pointer.
+ * @param timestamp The timestamp of the mouse up event.
+ * @param data The data for canvas.
+ *
+ * This function will call evas_event_feed_mouse_up() when a
+ * mouse cancel event happens.
+ *
+ */
+EAPI void              evas_event_feed_mouse_cancel      (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
+
+/**
+ * Mouse wheel event feed.
+ *
+ * @param e The given canvas pointer.
+ * @param direction The wheel mouse direction.
+ * @param z How much mouse wheel was scrolled up or down.
+ * @param timestamp The timestamp of the mouse up event.
+ * @param data The data for canvas.
+ *
+ * This function will set some evas properties that is necessary when
+ * the mouse wheel is scrolled up or down. It prepares information to
+ * be treated by the callback function.
+ *
+ */
+EAPI void              evas_event_feed_mouse_wheel       (Evas *e, int direction, int z, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
+
+/**
+ * Key down event feed
+ *
+ * @param e The canvas to thaw out
+ * @param keyname  Name of the key
+ * @param key The key pressed.
+ * @param string A String
+ * @param compose The compose string
+ * @param timestamp Timestamp of the mouse up event
+ * @param data Data for canvas.
+ *
+ * This function will set some evas properties that is necessary when
+ * a key is pressed. It prepares information to be treated by the
+ * callback function.
+ *
+ */
+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) EINA_ARG_NONNULL(1);
+
+/**
+ * Key up event feed
+ *
+ * @param e The canvas to thaw out
+ * @param keyname  Name of the key
+ * @param key The key released.
+ * @param string string
+ * @param compose compose
+ * @param timestamp Timestamp of the mouse up event
+ * @param data Data for canvas.
+ *
+ * This function will set some evas properties that is necessary when
+ * a key is released. It prepares information to be treated by the
+ * callback function.
+ *
+ */
+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) EINA_ARG_NONNULL(1);
+
+/**
+ * Hold event feed
+ *
+ * @param e The given canvas pointer.
+ * @param hold The hold.
+ * @param timestamp The timestamp of the mouse up event.
+ * @param data The data for canvas.
+ *
+ * This function makes the object to stop sending events.
+ *
+ */
+EAPI void              evas_event_feed_hold              (Evas *e, int hold, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Evas_Image_Group Image Functions
+ *
+ * Functions that deals with images at canvas level.
+ *
+ * @ingroup Evas_Canvas
+ */
+
+/**
+ * Flush the image cache of the canvas.
+ *
+ * @param e The given evas pointer.
+ *
+ * This function flushes image cache of canvas.
+ *
+ */
+EAPI void              evas_image_cache_flush            (Evas *e) EINA_ARG_NONNULL(1);
+
+/**
+ * Reload the image cache
+ *
+ * @param e The given evas pointer.
+ *
+ * This function reloads the image cache of canvas.
+ *
+ */
+EAPI void              evas_image_cache_reload           (Evas *e) EINA_ARG_NONNULL(1);
+
+/**
+ * Set the image cache.
+ *
+ * @param e The given evas pointer.
+ * @param size The cache size.
+ *
+ * This function sets the image cache of canvas.
+ *
+ */
+EAPI void              evas_image_cache_set              (Evas *e, int size) EINA_ARG_NONNULL(1);
+
+/**
+ * Set the image cache
+ *
+ * @param e The given evas pointer.
+ *
+ * This function returns the image cache of canvas.
+ *
+ */
+EAPI int               evas_image_cache_get              (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * @defgroup Evas_Font_Group Font Functions
+ *
+ * Functions that deals with fonts.
+ *
+ * @ingroup Evas_Canvas
+ */
+
+/**
+ * Changes the font hinting for the given evas.
+ *
+ * @param e The given evas.
+ * @param hinting The hinting to use, one of #EVAS_FONT_HINTING_NONE,
+ *        #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE.
+ * @ingroup Evas_Font_Group
+ */
+EAPI void                     evas_font_hinting_set        (Evas *e, Evas_Font_Hinting_Flags hinting) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the font hinting used by the given evas.
+ *
+ * @param e The given evas to query.
+ * @return The hinting in use, one of #EVAS_FONT_HINTING_NONE,
+ *         #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;
+
+/**
+ * Checks if the font hinting is supported by the given evas.
+ *
+ * @param e The given evas to query.
+ * @param hinting The hinting to use, one of #EVAS_FONT_HINTING_NONE,
+ *        #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE.
+ * @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;
+
+
+/**
+ * Force the given evas and associated engine to flush its font cache.
+ *
+ * @param e The given evas to flush font cache.
+ * @ingroup Evas_Font_Group
+ */
+EAPI void                     evas_font_cache_flush        (Evas *e) EINA_ARG_NONNULL(1);
+
+/**
+ * Changes the size of font cache of the given evas.
+ *
+ * @param e The given evas to flush font cache.
+ * @param size The size, in bytes.
+ *
+ * @ingroup Evas_Font_Group
+ */
+EAPI void                     evas_font_cache_set          (Evas *e, int size) EINA_ARG_NONNULL(1);
+
+/**
+ * Changes the size of font cache of the given evas.
+ *
+ * @param e The given evas to flush font cache.
+ * @return The size, in bytes.
+ *
+ * @ingroup Evas_Font_Group
+ */
+EAPI int                      evas_font_cache_get          (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+
+/**
+ * List of available font descriptions known or found by this evas.
+ *
+ * The list depends on Evas compile time configuration, such as
+ * fontconfig support, and the paths provided at runtime as explained
+ * in @ref Evas_Font_Path_Group.
+ *
+ * @param e The evas instance to query.
+ * @return a newly allocated list of strings. Do not change the
+ *         strings.  Be sure to call evas_font_available_list_free()
+ *         after you're done.
+ *
+ * @ingroup Evas_Font_Group
+ */
+EAPI Eina_List               *evas_font_available_list     (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * Free list of font descriptions returned by evas_font_dir_available_list().
+ *
+ * @param e The evas instance that returned such list.
+ * @param available the list returned by evas_font_dir_available_list().
+ *
+ * @ingroup Evas_Font_Group
+ */
+EAPI void                     evas_font_available_list_free(Evas *e, Eina_List *available) EINA_ARG_NONNULL(1);
+
+/**
+ * @defgroup Evas_Font_Path_Group Font Path Functions
+ *
+ * Functions that edit the paths being used to load fonts.
+ *
+ * @ingroup Evas_Font_Group
+ */
+
+/**
+ * Removes all font paths loaded into memory for the given evas.
+ * @param   e The given evas.
+ * @ingroup Evas_Font_Path_Group
+ */
+EAPI void              evas_font_path_clear              (Evas *e) EINA_ARG_NONNULL(1);
+
+/**
+ * Appends a font path to the list of font paths used by the given evas.
+ * @param   e    The given evas.
+ * @param   path The new font path.
+ * @ingroup Evas_Font_Path_Group
+ */
+EAPI void              evas_font_path_append             (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Prepends a font path to the list of font paths used by the given evas.
+ * @param   e The given evas.
+ * @param   path The new font path.
+ * @ingroup Evas_Font_Path_Group
+ */
+EAPI void              evas_font_path_prepend            (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Retrieves the list of font paths used by the given evas.
+ * @param   e The given evas.
+ * @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;
+
+/**
+ * @defgroup Evas_Object_Group Generic Object Functions
+ *
+ * Functions that manipulate generic evas objects.
+ */
+
+/**
+ * @defgroup Evas_Object_Group_Basic Basic Object Manipulation
+ *
+ * Methods that are often used, like those that change the color,
+ * clippers and geometry of the object.
+ *
+ * @ingroup Evas_Object_Group
+ */
+
+/**
+ * Clip one object to another.
+ * @param obj The object to be clipped
+ * @param clip The object to clip @p obj by
+ *
+ * This function will clip the object @p obj to the area occupied by the
+ * object @p clipper. This means the object @p obj will only be visible within
+ * the area occupied by the clipping object (@p clip). The color of the object
+ * being clipped will be multiplied by the color of the clipping object, so
+ * the resulting color for the clipped object is
+ * RESULT = (OBJ * CLIP) / (255 * 255) per color element (red, green, blue and
+ * alpha). Clipping is recursive, so clip objects may be clipped by other
+ * objects, and their color will in tern be multiplied. You may NOT set up
+ * circular clipping lists (i.e. object 1 clips object 2 which clips object 1).
+ * The behavior of Evas is undefined in this case. Objects which do not clip
+ * others are visible as normal, those that clip 1 or more objects become
+ * invisible themselves, only affecting what they clip. If an object ceases to
+ * have other objects being clipped by it, it will become visible again. The
+ * visibility of an object affects the objects that are clipped by it, so if
+ * the object clipping others is not shown, the objects clipped will not be
+ * shown either. If the object was being clipped by another object when this
+ * function is called, it is implicitly removed from the clipper it is being
+ * clipped to, and now is made to clip its new clipper.
+ *
+ * At the moment the only objects that can validly be used to clip other
+ * objects are rectangle objects. All other object types are invalid and the
+ * result of using them is undefined.
+ *
+ * The clip object @p clip must be a valid object, but may also be NULL in
+ * which case the effect of this function is the same as calling
+ * evas_object_clip_unset() on the @p obj object.
+ *
+ * Example:
+ * @code
+ * extern Evas *evas;
+ * extern Evas_Object *obj;
+ * Evas_Object *clipper;
+ *
+ * clipper = evas_object_rectangle_add(evas);
+ * evas_object_color_set(clipper, 255, 255, 255, 255);
+ * evas_object_move(clipper, 10, 10);
+ * evas_object_resize(clipper, 20, 50);
+ * evas_object_clip_set(obj, clipper);
+ * evas_object_show(clipper);
+ * @endcode
+ *
+ */
+EAPI void              evas_object_clip_set              (Evas_Object *obj, Evas_Object *clip) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Get the object clipping this one (if any).
+ * @param obj The object to get the clipper from
+ *
+ * This function returns the the object clipping @p obj. If @p obj not being
+ * clipped, NULL is returned. The object @p obj must be a valid object.
+ *
+ * See also evas_object_clip_set(), evas_object_clip_unset() and
+ * evas_object_clipees_get().
+ *
+ * Example:
+ * @code
+ * extern Evas_Object *obj;
+ * Evas_Object *clipper;
+ *
+ * clipper = evas_object_clip_get(obj);
+ * if (clipper) evas_object_show(clipper);
+ * @endcode
+ *
+ */
+EAPI Evas_Object      *evas_object_clip_get              (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * Disable clipping for an object.
+ *
+ * @param obj The object to cease clipping on
+ *
+ * This function disables clipping for the object @p obj, if it was already
+ * clipped. If it wasn't, this has no effect. The object @p obj must be a
+ * valid object.
+ *
+ * See also evas_object_clip_set(), evas_object_clipees_get() and
+ * evas_object_clip_get().
+ *
+ * Example:
+ * @code
+ * extern Evas_Object *obj;
+ * Evas_Object *clipper;
+ *
+ * clipper = evas_object_clip_get(obj);
+ * if (clipper)
+ *   {
+ *     evas_object_clip_unset(obj);
+ *     evas_object_hide(obj);
+ *   }
+ * @endcode
+ *
+ */
+EAPI void              evas_object_clip_unset            (Evas_Object *obj);
+
+/**
+ * Return a list of objects currently clipped by a specific object.
+ *
+ * @param obj The object to get a list of clippees from
+ *
+ * This returns the inernal list handle that contains all objects clipped by
+ * the object @p obj. If none are clipped, it returns NULL. This list is only
+ * valid until the clip list is changed and should be fetched again with another
+ * call to evas_object_clipees_get() if any objects being clipped by this object
+ * are unclipped, clipped by a new object, are deleted or the clipper is
+ * deleted.  These operations will invalidate the list returned so it should
+ * not be used anymore after that point. Any use of the list after this may have
+ * undefined results, not limited just to strange behavior but possible
+ * segfaults and other strange memory errors. The object @p obj must be a valid
+ * object.
+ *
+ * See also evas_object_clip_set(), evas_object_clip_unset() and
+ * evas_object_clip_get().
+ *
+ * Example:
+ * @code
+ * extern Evas_Object *obj;
+ * Evas_Object *clipper;
+ *
+ * clipper = evas_object_clip_get(obj);
+ * if (clipper)
+ *   {
+ *     Eina_List *clippees, *l;
+ *     Evas_Object *obj_tmp;
+ *
+ *     clippees = evas_object_clipees_get(clipper);
+ *     printf("Clipper clips %i objects\n", eina_list_count(clippees));
+ *     EINA_LIST_FOREACH(clippees, l, obj_tmp)
+ *         evas_object_show(obj_tmp);
+ *   }
+ * @endcode
+ */
+EAPI const Eina_List  *evas_object_clipees_get           (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+
+/**
+ * Sets focus to the given object.
+ *
+ * @param obj The object to be focused or unfocused.
+ * @param focus set or remove focus to the object.
+ *
+ * Changing focus only affects where key events go.  There can be only
+ * one object focused at any time.  <p> If the parameter (@p focus) is
+ * set, the passed object will be set as the currently focused object.
+ * It will receive all keyboard events that are not exclusive key
+ * grabs on other objects.
+ *
+ * @see evas_object_focus_get
+ * @see evas_focus_get
+ * @see evas_object_key_grab
+ * @see evas_object_key_ungrab
+ */
+EAPI void              evas_object_focus_set             (Evas_Object *obj, Eina_Bool focus) EINA_ARG_NONNULL(1);
+
+/**
+ * Test if the object has focus.
+ *
+ * @param obj The object to be tested.
+ *
+ * If the passed object is the currently focused object 1 is returned,
+ * 0 otherwise.
+ *
+ * @see evas_object_focus_set
+ * @see evas_focus_get
+ * @see evas_object_key_grab
+ * @see evas_object_key_ungrab
+ *
+ * @return 1 if the object has the focus, 0 otherwise.
+ */
+EAPI Eina_Bool         evas_object_focus_get             (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+
+/**
+ * Sets the layer of the evas that the given object will be part of.
+ *
+ * It is not possible to change the layer of a smart object's child.
+ *
+ * @param   obj The given evas object.
+ * @param   l   The number of the layer to place the object on.
+ *          Between #EVAS_LAYER_MIN and #EVAS_LAYER_MAX.
+ */
+EAPI void              evas_object_layer_set             (Evas_Object *obj, short l) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the layer of the evas that the given object is part of.
+ *
+ * Be careful, it doesn't make sense to change the layer of smart object's
+ * child. So the returned value could be wrong in some case. Don't rely on
+ * it's accuracy.
+ *
+ * @param   obj The given evas object.
+ * @return  Number of the layer.
+ */
+EAPI short             evas_object_layer_get             (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+
+/**
+ * Sets the name of the given evas object to the given name.
+ * @param   obj  The given object.
+ * @param   name The given name.
+ */
+EAPI void              evas_object_name_set              (Evas_Object *obj, const char *name) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the name of the given evas object.
+ * @param   obj The given object.
+ * @return  The name of the object.  @c NULL if no name has been given
+ *          to the object.
+ */
+EAPI const char       *evas_object_name_get              (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+
+/**
+ * Increments object reference count to defer deletion
+ *
+ * This increments the reference count of an object, which if greater than
+ * 0 will defer deletion by evas_object_del() until all references are
+ * released back to 0. References cannot go below 0 and unreferencing more
+ * times that referencing will result in the reference count being limited
+ * to 0. References are limited to 2^32 - 1 for an object. Referencing it more
+ * than this will result in it being limited to this value.
+ *
+ * @param obj The given evas object to reference
+ * @ingroup Evas_Object_Group_Basic
+ * @since 1.1.0
+ */
+EAPI void              evas_object_ref                   (Evas_Object *obj);
+
+/**
+ * Decrements object reference count to defer deletion
+ *
+ * This decrements the reference count of an object. If the object has had
+ * evas_object_del() called on it while references were more than 0, it will
+ * be deleted at the time this function is called as it normally would have
+ * been. See evas_object_ref() for more information.
+ *
+ * @param obj The given evas object to unreference
+ * @ingroup Evas_Object_Group_Basic
+ * @since 1.1.0
+ */
+EAPI void              evas_object_unref                 (Evas_Object *obj);
+
+
+/**
+ * Deletes the given evas object and frees its memory.
+ *
+ * The object's 'free' callback is called when this function is called.
+ * If the object currently has the focus, its 'focus out' callback is
+ * also called.
+ *
+ * @param   obj The given evas object.
+ * @ingroup Evas_Object_Group_Basic
+ */
+EAPI void              evas_object_del                   (Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+/**
+ * Moves the given evas object to the given location.
+ * @param   obj The given evas object.
+ * @param   x   X position to move the object to, in canvas units.
+ * @param   y   Y position to move the object to, in canvas units.
+ * @ingroup Evas_Object_Group_Basic
+ */
+EAPI void              evas_object_move                  (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
+
+/**
+ * Changes the size of the given evas object.
+ * @param   obj The given evas object.
+ * @param   w   The new width of the evas object.
+ * @param   h   The new height of the evas object.
+ *
+ * @note Be aware that resizing an object changes its drawing area,
+ *       but that does imply the object is rescaled! For instance,
+ *       images are filled inside their drawing area using the
+ *       specifications of evas_object_image_fill_set(), thus to scale
+ *       the image to match exactly your drawing area, you need to
+ *       change the evas_object_image_fill_set() as well. Consider the
+ *       following example:
+ *       @code
+ *       // rescale image to fill exactly its area without tiling:
+ *       evas_object_resize(img, w, h);
+ *       evas_object_image_fill_set(img, 0, 0, w, h);
+ *       @endcode
+ *       This is more evident in images, but text, textblock, lines
+ *       and polygons will behave similarly. Check their specific APIs
+ *       to know how to achieve your desired behavior.
+ *
+ * @ingroup Evas_Object_Group_Basic
+ */
+EAPI void              evas_object_resize                (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the position and rectangular size of the given evas object.
+ *
+ * Note that if any of @p x, @p y, @p w or @p h are @c NULL, the @c NULL
+ * parameters are ignored.
+ *
+ * @param obj The given evas object.
+ * @param   x   Pointer to an integer in which to store the X coordinate of
+ *              the object.
+ * @param   y   Pointer to an integer in which to store the Y coordinate of
+ *              the object.
+ * @param   w   Pointer to an integer in which to store the width of the
+ *              object.
+ * @param   h   Pointer to an integer in which to store the height of the
+ *              object.
+ * @ingroup Evas_Object_Group_Basic
+ */
+EAPI void              evas_object_geometry_get          (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
+
+
+/**
+ * Makes the given evas object visible.
+ * @param   obj The given evas object.
+ * @ingroup Evas_Object_Group_Basic
+ */
+EAPI void              evas_object_show                  (Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+/**
+ * Makes the given evas object invisible.
+ * @param   obj The given evas object.
+ *
+ * @note the hidden objects will not be checked for changes and will
+ *       not catch events. That is, they are much ligher than an
+ *       object that is invisible due indirect effects, such as
+ *       clipped or out-of-viewport.
+ *
+ * @ingroup Evas_Object_Group_Basic
+ */
+EAPI void              evas_object_hide                  (Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves whether or not the given evas object is visible.
+ * @param   obj The given evas object.
+ * @return  @c 1 if the object is visible.  @c 0 otherwise.
+ * @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;
+
+
+/**
+ * Sets the general colour of the given evas object to the given colour.
+ * @param obj The given evas object.
+ * @param r   The red component of the given colour.
+ * @param g   The green component of the given colour.
+ * @param b   The blue component of the given colour.
+ * @param a   The alpha component of the given colour.
+ * @ingroup Evas_Object_Group_Basic
+ */
+EAPI void              evas_object_color_set             (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the general colour of the given evas object.
+ *
+ * Note that if any of @p r, @p g, @p b or @p a are @c NULL, then the
+ * @c NULL parameters are ignored.
+ *
+ * @param   obj The given evas object.
+ * @param   r   Pointer to an integer in which to store the red component of
+ *              the colour.
+ * @param   g   Pointer to an integer in which to store the green component of
+ *              the colour.
+ * @param   b   Pointer to an integer in which to store the blue component of
+ *              the colour.
+ * @param   a   Pointer to an integer in which to store the alpha component of
+ *              the colour.
+ * @ingroup Evas_Object_Group_Basic
+ */
+EAPI void              evas_object_color_get             (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
+
+
+/**
+ * Retrieves the evas that the given evas object is on.
+ * @param   obj The given evas object.
+ * @return  The evas that the object is on.
+ * @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;
+
+/**
+ * Retrieves the object type of the given evas object.
+ * @param obj The given object.
+ * @return The type of the object.
+ */
+EAPI const char       *evas_object_type_get              (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+
+/**
+ * Raise @p obj to the top of its layer.
+ *
+ * @param obj the object to raise
+ */
+EAPI void              evas_object_raise                 (Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+/**
+ * Lower @p obj to the bottom of its layer.
+ *
+ * @param obj the object to lower
+ */
+EAPI void              evas_object_lower                 (Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+/**
+ * Stack @p obj immediately above @p above
+ *
+ * If @p obj is a member of a smart object, then @p above must also be
+ * a member of the same smart object.
+ *
+ * Similarly, if @p obj is not a member of smart object, @p above may
+ * not either.
+ *
+ * @param obj the object to stack
+ * @param above the object above which to stack
+ */
+EAPI void              evas_object_stack_above           (Evas_Object *obj, Evas_Object *above) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Stack @p obj immediately below @p below
+ *
+ * If @p obj is a member of a smart object, then @p below must also be
+ * a member of the same smart object.
+ *
+ * Similarly, if @p obj is not a member of smart object, @p below may
+ * not either.
+ *
+ * @param obj the object to stack
+ * @param below the object below which to stack
+ */
+EAPI void              evas_object_stack_below           (Evas_Object *obj, Evas_Object *below) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Get the evas object above @p obj
+ *
+ * @param obj an Evas_Object
+ * @return the Evas_Object directly above
+ */
+EAPI Evas_Object      *evas_object_above_get             (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * Get the evas object below @p obj
+ *
+ * @param obj an Evas_Object
+ * @return the Evas_Object directly below
+ */
+EAPI Evas_Object      *evas_object_below_get             (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * @defgroup Evas_Object_Group_Events Object Events
+ *
+ * Objects generates events when they are moved, resized, when their
+ * visibility change, when they are deleted and so on. These methods
+ * will allow one to handle such events.
+ *
+ * The events can be those from keyboard and mouse, if the object
+ * accepts these events.
+ *
+ * @ingroup Evas_Object_Group
+ */
+
+/**
+ * @addtogroup Evas_Object_Group_Events
+ * @{
+ */
+
+/**
+ * Add a callback function to an object
+ *
+ * @param obj Object to attach a callback to
+ * @param type The type of event that will trigger the callback
+ * @param func The function to be called when the event is triggered
+ * @param data The data pointer to be passed to @p func
+ *
+ * This function adds a function callback to an object when the event
+ * of type @p type occurs on object @p obj. The function is @p func.
+ *
+ * In the event of a memory allocation error during addition of the
+ * callback to the object, evas_alloc_error() should be used to
+ * determine the nature of the error, if any, and the program should
+ * sensibly try and recover.
+ *
+ * The function will be passed the pointer @p data when it is
+ * called. A callback function must look like this:
+ *
+ * @code
+ * void callback (void *data, Evas *e, Evas_Object *obj, void *event_info);
+ * @endcode
+ *
+ * The first parameter @p data in this function will be the same value
+ * passed to evas_object_event_callback_add() as the @p data
+ * parameter. The second parameter is a convenience for the programmer
+ * to know what evas canvas the event occurred on. The third parameter
+ * @p obj is the Object handle on which the event occurred. The foruth
+ * parameter @p event_info is a pointer to a data structure that may
+ * or may not be passed to the callback, depending on the event type
+ * that triggered the callback.
+ *
+ * The event type @p type to trigger the function may be one of
+ * #EVAS_CALLBACK_MOUSE_IN, #EVAS_CALLBACK_MOUSE_OUT,
+ * #EVAS_CALLBACK_MOUSE_DOWN, #EVAS_CALLBACK_MOUSE_UP,
+ * #EVAS_CALLBACK_MOUSE_MOVE, #EVAS_CALLBACK_MOUSE_WHEEL,
+ * #EVAS_CALLBACK_FREE, #EVAS_CALLBACK_KEY_DOWN, #EVAS_CALLBACK_KEY_UP,
+ * #EVAS_CALLBACK_FOCUS_IN, #EVAS_CALLBACK_FOCUS_OUT,
+ * #EVAS_CALLBACK_SHOW, #EVAS_CALLBACK_HIDE, #EVAS_CALLBACK_MOVE,
+ * #EVAS_CALLBACK_RESIZE or #EVAS_CALLBACK_RESTACK.
+ * This determines the kind of event that will trigger the callback to
+ * be called.  The @p event_info pointer passed to the callback will
+ * be one of the following, depending on the event triggering it:
+ *
+ * #EVAS_CALLBACK_MOUSE_IN: event_info = pointer to Evas_Event_Mouse_In
+ *
+ * This event is triggered when the mouse pointer enters the region of
+ * the object @p obj. This may occur by the mouse pointer being moved
+ * by evas_event_feed_mouse_move() or
+ * evas_event_feed_mouse_move_data() calls, or by the object being
+ * shown, raised, moved, resized, or other objects being moved out of
+ * the way, hidden, lowered or moved out of the way.
+ *
+ * #EVAS_CALLBACK_MOUSE_OUT: event_info = pointer to Evas_Event_Mouse_Out
+ *
+ * This event is triggered exactly like #EVAS_CALLBACK_MOUSE_IN is, but
+ * occurs when the mouse pointer exits an object. Note that no out
+ * events will be reported if the mouse pointer is implicitly grabbed
+ * to an object (the mouse buttons are down at all and any were
+ * pressed on that object). An out event will be reported as soon as
+ * the mouse is no longer grabbed (no mouse buttons are
+ * depressed). Out events will be reported once all buttons are
+ * released, if the mouse has left the object.
+ *
+ * #EVAS_CALLBACK_MOUSE_DOWN: event_info = pointer to
+ * Evas_Event_Mouse_Down
+ *
+ * This event is triggered by a mouse button being depressed while
+ * over an object. If pointermode is EVAS_OBJECT_POINTER_MODE_AUTOGRAB
+ * (default) this causes this object to passively grab the mouse until
+ * all mouse buttons have been released.  That means if this mouse
+ * button is the first to be pressed, all future mouse events will be
+ * reported to only this object until no buttons are down. That
+ * includes mouse move events, in and out events, and further button
+ * presses. When all buttons are released, event propagation occurs as
+ * normal.
+ *
+ * #EVAS_CALLBACK_MOUSE_UP: event_info = pointer to Evas_Event_Mouse_Up
+ *
+ * This event is triggered by a mouse button being released while over
+ * an object or when passively grabbed to an object. If this is the
+ * last mouse button to be raised on an object then the passive grab
+ * is released and event processing will continue as normal.
+ *
+ * #EVAS_CALLBACK_MOUSE_MOVE: event_info = pointer to Evas_Event_Mouse_Move
+ *
+ * This event is triggered by the mouse pointer moving while over an
+ * object or passively grabbed to an object.
+ *
+ * #EVAS_CALLBACK_MOUSE_WHEEL: event_info = pointer to
+ * Evas_Event_Mouse_Wheel
+ *
+ * This event is triggered by the mouse wheel being rolled while over
+ * an object or passively grabbed to an object.
+ *
+ * #EVAS_CALLBACK_FREE: event_info = NULL
+ *
+ * This event is triggered just before Evas is about to free all
+ * memory used by an object and remove all references to it. This is
+ * useful for programs to use if they attached data to an object and
+ * want to free it when the object is deleted. The object is still
+ * valid when this callback is called, but after this callback
+ * returns, there is no guarantee on the object's validity.
+ *
+ * #EVAS_CALLBACK_KEY_DOWN: event_info = pointer to Evas_Event_Key_Down
+ *
+ * This callback is called when a key is pressed and the focus is on
+ * the object, or a key has been grabbed to a particular object which
+ * wants to intercept the key press regardless of what object has the
+ * focus.
+ *
+ * #EVAS_CALLBACK_KEY_UP: event_info = pointer to Evas_Event_Key_Up
+ *
+ * This callback is called when a key is released and the focus is on
+ * the object, or a key has been grabbed to a particular object which
+ * wants to intercept the key release regardless of what object has
+ * the focus.
+ *
+ * #EVAS_CALLBACK_FOCUS_IN: event_info = NULL
+ *
+ * This event is called when an object gains the focus. When the
+ * callback is called the object has already gained the focus.
+ *
+ * #EVAS_CALLBACK_FOCUS_OUT: event_info = NULL
+ *
+ * This event is triggered by an object losing the focus. When the
+ * callback is called the object has already lost the focus.
+ *
+ * #EVAS_CALLBACK_SHOW: event_info = NULL
+ *
+ * This event is triggered by the object being shown by
+ * evas_object_show().
+ *
+ * #EVAS_CALLBACK_HIDE: event_info = NULL
+ *
+ * This event is triggered by an object being hidden by
+ * evas_object_hide().
+ *
+ * #EVAS_CALLBACK_MOVE: event_info = NULL
+ *
+ * This event is triggered by an object being
+ * moved. evas_object_move() can trigger this, as can any
+ * object-specific manipulations that would mean the object's origin
+ * could move.
+ *
+ * #EVAS_CALLBACK_RESIZE: event_info = NULL
+ *
+ * This event is triggered by an object being resized. Resizes can be
+ * triggered by evas_object_resize() or by any object-specific calls
+ * that may cause the object to resize.
+ *
+ * Example:
+ * @code
+ * extern Evas_Object *object;
+ * extern void *my_data;
+ * void down_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);
+ * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);
+ *
+ * evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_UP, up_callback, my_data);
+ * if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE)
+ *   {
+ *     fprintf(stderr, "ERROR: Callback registering failed! Abort!\n");
+ *     exit(-1);
+ *   }
+ * evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_DOWN, down_callback, my_data);
+ * if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE)
+ *   {
+ *     fprintf(stderr, "ERROR: Callback registering failed! Abort!\n");
+ *     exit(-1);
+ *   }
+ * @endcode
+ */
+   EAPI void              evas_object_event_callback_add     (Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
+
+/**
+ * Delete a callback function from an object
+ *
+ * @param obj Object to remove a callback from
+ * @param type The type of event that was triggering the callback
+ * @param func The function that was to be called when the event was triggered
+ * @return The data pointer that was to be passed to the callback
+ *
+ * This function removes the most recently added callback from the
+ * object @p obj which was triggered by the event type @p type and was
+ * calling the function @p func when triggered. If the removal is
+ * successful it will also return the data pointer that was passed to
+ * evas_object_event_callback_add() when the callback was added to the
+ * object. If not successful NULL will be returned.
+ *
+ * Example:
+ * @code
+ * extern Evas_Object *object;
+ * void *my_data;
+ * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);
+ *
+ * my_data = evas_object_event_callback_del(object, EVAS_CALLBACK_MOUSE_UP, up_callback);
+ * @endcode
+ */
+EAPI void             *evas_object_event_callback_del     (Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func) EINA_ARG_NONNULL(1, 3);
+
+/**
+ * Delete a callback function from an object
+ *
+ * @param obj Object to remove a callback from
+ * @param type The type of event that was triggering the callback
+ * @param func The function that was to be called when the event was triggered
+ * @param data The data pointer that was to be passed to the callback
+ * @return The data pointer that was to be passed to the callback
+ *
+ * This function removes the most recently added callback from the
+ * object @p obj which was triggered by the event type @p type and was
+ * calling the function @p func with data @p data when triggered. If
+ * the removal is successful it will also return the data pointer that
+ * was passed to evas_object_event_callback_add() (that will be the
+ * same as the parameter) when the callback was added to the
+ * object. If not successful NULL will be returned.
+ *
+ * Example:
+ * @code
+ * extern Evas_Object *object;
+ * void *my_data;
+ * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);
+ *
+ * my_data = evas_object_event_callback_del_full(object, EVAS_CALLBACK_MOUSE_UP, up_callback, data);
+ * @endcode
+ */
+EAPI void             *evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
+
+
+/**
+ * Set an object's pass events state.
+ * @param obj the evas object
+ * @param pass whether to pass events or not
+ *
+ * If @p pass is true, this will cause events on @p obj to be ignored.
+ * They will be triggered on the next lower object (that is not set to
+ * pass events) instead.
+ *
+ * If @p pass is false, events will be processed as normal.
+ */
+EAPI void              evas_object_pass_events_set        (Evas_Object *obj, Eina_Bool pass) EINA_ARG_NONNULL(1);
+
+/**
+ * Determine whether an object is set to pass events.
+ * @param obj
+ * @return pass events state
+ */
+EAPI Eina_Bool         evas_object_pass_events_get        (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * Set an object's repeat events state.
+ * @param obj the object
+ * @param repeat wheter to repeat events or not
+ *
+ * If @p repeat is true, this will cause events on @p obj to trigger
+ * callbacks, but also to be repeated on the next lower object in the
+ * stack.
+ *
+ * If @p repeat is false, events occurring on @p obj will be processed
+ * normally.
+ */
+EAPI void              evas_object_repeat_events_set      (Evas_Object *obj, Eina_Bool repeat) EINA_ARG_NONNULL(1);
+
+/**
+ * Determine whether an object is set to repeat events.
+ * @param obj
+ * @return repeat events state
+ */
+EAPI Eina_Bool         evas_object_repeat_events_get      (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * Set whether events on a smart member object should propagate to its
+ * parent.
+ *
+ * @param obj the smart member object
+ * @param prop wheter to propagate events or not
+ *
+ * This function has no effect if @p obj is not a member of a smart
+ * object.
+ *
+ * If @p prop is true, events occurring on this object will propagate on
+ * to the smart object of which @p obj is a member.
+ *
+ * If @p prop is false, events for which callbacks are set on the member
+ * object, @p obj, will not be passed on to the parent smart object.
+ *
+ * The default value is true.
+ */
+EAPI void              evas_object_propagate_events_set   (Evas_Object *obj, Eina_Bool prop) EINA_ARG_NONNULL(1);
+
+/**
+ * Determine whether an object is set to propagate events.
+ * @param obj
+ * @return propagate events state
+ */
+EAPI Eina_Bool         evas_object_propagate_events_get   (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Evas_Object_Group_Map UV Mapping (Rotation, Perspecitve, 3D...)
+ *
+ * Evas allows different transformations to be applied to all kinds of
+ * objects. These are applied by means of UV mapping.
+ *
+ * With UV mapping, one maps points in the source object to a 3D space
+ * positioning at target. This allows rotation, perspective, scale and
+ * lots of other effects, depending on the map that is used.
+ *
+ * Each map point may carry a multiplier color. If properly
+ * calculated, these can do shading effects on the object, producing
+ * 3D effects.
+ *
+ * As usual, Evas provides both the raw and easy to use methods. The
+ * raw methods allow developer to create its maps somewhere else,
+ * maybe load them from some file format. The easy to use methods,
+ * calculate the points given some high-level parameters, such as
+ * rotation angle, ambient light and so on.
+ *
+ * @note applying mapping will reduce performance, so use with
+ *       care. The impact on performance depends on engine in
+ *       use. Software is quite optimized, but not as fast as OpenGL.
+ *
+ * @ingroup Evas_Object_Group
+ */
+
+/**
+ * Enable or disable the map that is set.
+ *
+ * This enables the map that is set or disables it. On enable, the object
+ * geometry will be saved, and the new geometry will change (position and
+ * size) to reflect the map geometry set. If none is set yet, this may be
+ * an undefined geometry, unless you have already set the map with
+ * evas_object_map_set(). It is suggested you first set a map with
+ * evas_object_map_set() with valid useful coordinates then enable and
+ * disable the map with evas_object_map_enable_set() as needed.
+ *
+ * @param obj object to enable the map on
+ * @param enabled enabled state
+ */
+EAPI void              evas_object_map_enable_set        (Evas_Object *obj, Eina_Bool enabled);
+
+/**
+ * Get the map enabled state
+ *
+ * This returns the currently enabled state of the map on the object indicated.
+ * The default map enable state is off. You can enable and disable it with
+ * evas_object_map_enable_set().
+ *
+ * @param obj object to get the map enabled state from
+ * @return the map enabled state
+ */
+EAPI Eina_Bool         evas_object_map_enable_get        (const Evas_Object *obj);
+
+/**
+ * Set the map source object
+ *
+ * This sets the object from which the map is taken - can be any object that
+ * has map enabled on it.
+ *
+ * Currently not implemented. for future use.
+ *
+ * @param obj object to set the map source of
+ * @param src the source object from which the map is taken
+ */
+EAPI void              evas_object_map_source_set        (Evas_Object *obj, Evas_Object *src);
+
+/**
+ * Get the map source object
+ *
+ * See evas_object_map_source_set()
+ *
+ * @param obj object to set the map source of
+ * @return the object set as the source
+ */
+EAPI Evas_Object      *evas_object_map_source_get        (const Evas_Object *obj);
+
+/**
+ * Set current object transformation map.
+ *
+ * This sets the map on a given object. It is copied from the @p map pointer,
+ * so there is no need to keep the @p map object if you don't need it anymore.
+ *
+ * A map is a set of 4 points which have canvas x, y coordinates per point,
+ * with an optional z point value as a hint for perspective correction, if it
+ * is available. As well each point has u and v coordinates. These are like
+ * "texture coordinates" in OpenGL in that they define a point in the source
+ * image that is mapped to that map vertex/point. The u corresponds to the x
+ * coordinate of this mapped point and v, the y coordinate. Note that these
+ * coordinates describe a bounding region to sample. If you have a 200x100
+ * source image and want to display it at 200x100 with proper pixel
+ * precision, then do:
+ *
+ * @code
+ * Evas_Map *m = evas_map_new(4);
+ * evas_map_point_coord_set(m, 0,   0,   0, 0);
+ * evas_map_point_coord_set(m, 1, 200,   0, 0);
+ * evas_map_point_coord_set(m, 2, 200, 100, 0);
+ * evas_map_point_coord_set(m, 3,   0, 100, 0);
+ * evas_map_point_image_uv_set(m, 0,   0,   0);
+ * evas_map_point_image_uv_set(m, 1, 200,   0);
+ * evas_map_point_image_uv_set(m, 2, 200, 100);
+ * evas_map_point_image_uv_set(m, 3,   0, 100);
+ * evas_object_map_set(obj, m);
+ * evas_map_free(m);
+ * @endcode
+ *
+ * Note that the map points a uv coordinates match the image geometry. If
+ * the @p map parameter is NULL, the stored map will be freed and geometry
+ * prior to enabling/setting a map will be restored.
+ *
+ * @param obj object to change transformation map
+ * @param map new map to use
+ *
+ * @see evas_map_new()
+ */
+EAPI void              evas_object_map_set               (Evas_Object *obj, const Evas_Map *map);
+
+/**
+ * Get current object transformation map.
+ *
+ * This returns the current internal map set on the indicated object. It is
+ * intended for read-only acces and is only valid as long as the object is
+ * not deleted or the map on the object is not changed. If you wish to modify
+ * the map and set it back do the following:
+ *
+ * @code
+ * const Evas_Map *m = evas_object_map_get(obj);
+ * Evas_Map *m2 = evas_map_dup(m);
+ * evas_map_util_rotate(m2, 30.0, 0, 0);
+ * evas_object_map_set(obj);
+ * evas_map_free(m2);
+ * @endcode
+ *
+ * @param obj object to query transformation map.
+ * @return map reference to map in use. This is an internal data structure, so
+ * do not modify it.
+ *
+ * @see evas_object_map_set()
+ */
+EAPI const Evas_Map   *evas_object_map_get               (const Evas_Object *obj);
+
+
+/**
+ * Populate source and destination map points to match exactly object.
+ *
+ * Usually one initialize map of an object to match it's original
+ * position and size, then transform these with evas_map_util_*
+ * functions, such as evas_map_util_rotate() or
+ * evas_map_util_3d_rotate(). The original set is done by this
+ * function, avoiding code duplication all around.
+ *
+ * @param m map to change all 4 points (must be of size 4).
+ * @param obj object to use unmapped geometry to populate map coordinates.
+ * @param z Point Z Coordinate hint (pre-perspective transform). This value
+ *        will be used for all four points.
+ *
+ * @see evas_map_util_points_populate_from_object()
+ * @see evas_map_point_coord_set()
+ * @see evas_map_point_image_uv_set()
+ */
+EAPI void              evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *obj, Evas_Coord z);
+
+/**
+ * Populate source and destination map points to match exactly object.
+ *
+ * Usually one initialize map of an object to match it's original
+ * position and size, then transform these with evas_map_util_*
+ * functions, such as evas_map_util_rotate() or
+ * evas_map_util_3d_rotate(). The original set is done by this
+ * function, avoiding code duplication all around.
+ *
+ * Z Point coordinate is assumed as 0 (zero).
+ *
+ * @param m map to change all 4 points (must be of size 4).
+ * @param obj object to use unmapped geometry to populate map coordinates.
+ *
+ * @see evas_map_util_points_populate_from_object_full()
+ * @see evas_map_util_points_populate_from_geometry()
+ * @see evas_map_point_coord_set()
+ * @see evas_map_point_image_uv_set()
+ */
+EAPI void              evas_map_util_points_populate_from_object     (Evas_Map *m, const Evas_Object *obj);
+
+/**
+ * Populate source and destination map points to match given geometry.
+ *
+ * Similar to evas_map_util_points_populate_from_object_full(), this
+ * call takes raw values instead of querying object's unmapped
+ * geometry. The given width will be used to calculate destination
+ * points (evas_map_point_coord_set()) and set the image uv
+ * (evas_map_point_image_uv_set()).
+ *
+ * @param m map to change all 4 points (must be of size 4).
+ * @param x Point X Coordinate
+ * @param y Point Y Coordinate
+ * @param w width to use to calculate second and third points.
+ * @param h height to use to calculate third and fourth points.
+ * @param z Point Z Coordinate hint (pre-perspective transform). This value
+ *        will be used for all four points.
+ *
+ * @see evas_map_util_points_populate_from_object()
+ * @see evas_map_point_coord_set()
+ * @see evas_map_point_image_uv_set()
+ */
+EAPI void              evas_map_util_points_populate_from_geometry   (Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Coord z);
+
+/**
+ * Set color of all points to given color.
+ *
+ * This call is useful to reuse maps after they had 3d lightning or
+ * any other colorization applied before.
+ *
+ * @param m map to change the color of.
+ * @param r red (0 - 255)
+ * @param g green (0 - 255)
+ * @param b blue (0 - 255)
+ * @param a alpha (0 - 255)
+ *
+ * @see evas_map_point_color_set()
+ */
+EAPI void              evas_map_util_points_color_set                (Evas_Map *m, int r, int g, int b, int a);
+
+/**
+ * Change the map to apply the given rotation.
+ *
+ * This rotates the indicated map's coordinates around the center coordinate
+ * given by @p cx and @p cy as the rotation center. The points will have their
+ * X and Y coordinates rotated clockwise by @p degrees degress (360.0 is a
+ * full rotation). Negative values for degrees will rotate counter-clockwise
+ * by that amount. All coordinates are canvas global coordinates.
+ *
+ * @param m map to change.
+ * @param degrees amount of degrees from 0.0 to 360.0 to rotate.
+ * @param cx rotation's center horizontal position.
+ * @param cy rotation's center vertical position.
+ *
+ * @see evas_map_point_coord_set()
+ * @see evas_map_util_zoom()
+ */
+EAPI void              evas_map_util_rotate                          (Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy);
+
+/**
+ * Change the map to apply the given zooming.
+ *
+ * Like evas_map_util_rotate(), this zooms the points of the map from a center
+ * point. That center is defined by @p cx and @p cy. The @p zoomx and @p zoomy
+ * parameters specific how much to zoom in the X and Y direction respectively.
+ * A value of 1.0 means "don't zoom". 2.0 means "dobule the size". 0.5 is
+ * "half the size" etc. All coordinates are canvas global coordinates.
+ *
+ * @param m map to change.
+ * @param zoomx horizontal zoom to use.
+ * @param zoomy vertical zoom to use.
+ * @param cx zooming center horizontal position.
+ * @param cy zooming center vertical position.
+ *
+ * @see evas_map_point_coord_set()
+ * @see evas_map_util_rotate()
+ */
+EAPI void              evas_map_util_zoom                            (Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy);
+
+/**
+ * Rotate the map around 3 axes in 3D
+ *
+ * This will rotate not just around the "Z" axis as in evas_map_util_rotate()
+ * (which is a convenience call for those only wanting 2D). This will rotate
+ * around the X, Y and Z axes. The Z axis points "into" the screen with low
+ * values at the screen and higher values further away. The X axis runs from
+ * left to right on the screen and the Y axis from top to bottom. Like with
+ * evas_map_util_rotate(0 you provide a center point to rotate around (in 3D).
+ *
+ * @param m map to change.
+ * @param dx amount of degrees from 0.0 to 360.0 to rotate arount X axis.
+ * @param dy amount of degrees from 0.0 to 360.0 to rotate arount Y axis.
+ * @param dz amount of degrees from 0.0 to 360.0 to rotate arount Z axis.
+ * @param cx rotation's center horizontal position.
+ * @param cy rotation's center vertical position.
+ * @param cz rotation's center vertical position.
+ */
+EAPI void              evas_map_util_3d_rotate                       (Evas_Map *m, double dx, double dy, double dz, Evas_Coord cx, Evas_Coord cy, Evas_Coord cz);
+
+/**
+ * Perform lighting calculations on the given Map
+ *
+ * This is used to apply lighting calculations (from a single light source)
+ * to a given map. The R, G and B values of each vertex will be modified to
+ * reflect the lighting based on the lixth point coordinates, the light
+ * color and the ambient color, and at what angle the map is facing the
+ * light source. A surface should have its points be declared in a
+ * clockwise fashion if the face is "facing" towards you (as opposed to
+ * away from you) as faces have a "logical" side for lighting.
+ *
+ * @param m map to change.
+ * @param lx X coordinate in space of light point
+ * @param ly Y coordinate in space of light point
+ * @param lz Z coordinate in space of light point
+ * @param lr light red value (0 - 255)
+ * @param lg light green value (0 - 255)
+ * @param lb light blue value (0 - 255)
+ * @param ar ambient color red value (0 - 255)
+ * @param ag ambient color green value (0 - 255)
+ * @param ab ambient color blue value (0 - 255)
+ */
+EAPI void              evas_map_util_3d_lighting                     (Evas_Map *m, Evas_Coord lx, Evas_Coord ly, Evas_Coord lz, int lr, int lg, int lb, int ar, int ag, int ab);
+
+/**
+ * Apply a perspective transform to the map
+ *
+ * This applies a given perspective (3D) to the map coordinates. X, Y and Z
+ * values are used. The px and py points specify the "infinite distance" point
+ * in the 3D conversion (where all lines converge to like when artists draw
+ * 3D by hand). The @p z0 value specifis the z value at which there is a 1:1
+ * mapping between spatial coorinates and screen coordinates. Any points
+ * on this z value will not have their X and Y values modified in the transform.
+ * Those further away (Z value higher) will shrink into the distance, and
+ * those less than this value will expand and become bigger. The @p foc value
+ * determines the "focal length" of the camera. This is in reality the distance
+ * between the camera lens plane itself (at or closer than this rendering
+ * results are undefined) and the "z0" z value. This allows for some "depth"
+ * control and @p foc must be greater than 0.
+ *
+ * @param m map to change.
+ * @param px The pespective distance X coordinate
+ * @param py The pespective distance Y coordinate
+ * @param z0 The "0" z plane value
+ * @param foc The focal distance
+ */
+EAPI void              evas_map_util_3d_perspective                  (Evas_Map *m, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc);
+
+/**
+ * Get the clockwise state of a map
+ *
+ * This determines if the output points (X and Y. Z is not used) are
+ * clockwise or anti-clockwise. This can be used for "back-face culling". This
+ * is where you hide objects that "face away" from you. In this case objects
+ * that are not clockwise.
+ *
+ * @param m map to query.
+ * @return 1 if clockwise, 0 otherwise
+ */
+EAPI Eina_Bool         evas_map_util_clockwise_get                   (Evas_Map *m);
+
+
+/**
+ * Create map of transformation points to be later used with an evas object.
+ *
+ * This creates a set of points (currently only 4 is supported. no other
+ * number for @p count will work). That is empty and ready to be modified
+ * with evas_map calls.
+ *
+ * @param count number of points in the map. *
+ * @return a newly allocated map or @c NULL on errors.
+ *
+ * @see evas_map_free()
+ * @see evas_map_dup()
+ * @see evas_map_point_coord_set()
+ * @see evas_map_point_image_uv_set()
+ * @see evas_map_util_points_populate_from_object_full()
+ * @see evas_map_util_points_populate_from_object()
+ *
+ * @see evas_object_map_set()
+ */
+EAPI Evas_Map         *evas_map_new                      (int count);
+
+/**
+ * Set the smoothing for map rendering
+ *
+ * This sets smoothing for map rendering. If the object is a type that has
+ * its own smoothing settings, then both the smooth settings for this object
+ * and the map must be turned off. By default smooth maps are enabled.
+ *
+ * @param m map to modify. Must not be NULL.
+ * @param enabled enable or disable smooth map rendering
+ */
+EAPI void              evas_map_smooth_set               (Evas_Map *m, Eina_Bool enabled);
+
+/**
+ * get the smoothing for map rendering
+ *
+ * This gets smoothing for map rendering.
+ *
+ * @param m map to get the smooth from. Must not be NULL.
+ */
+EAPI Eina_Bool         evas_map_smooth_get               (const Evas_Map *m);
+
+/**
+ * Set the alpha flag for map rendering
+ *
+ * This sets alpha flag for map rendering. If the object is a type that has
+ * its own alpha settings, then this will take precedence. Only image objects
+ * have this currently. Fits stops alpha blending of the map area, and is
+ * useful if you know the object and/or all sub-objects is 100% solid.
+ *
+ * @param m map to modify. Must not be NULL.
+ * @param enabled enable or disable alpha map rendering
+ */
+EAPI void              evas_map_alpha_set                (Evas_Map *m, Eina_Bool enabled);
+
+/**
+ * get the alpha flag for map rendering
+ *
+ * This gets the alph flag for map rendering.
+ *
+ * @param m map to get the alpha from. Must not be NULL.
+ */
+EAPI Eina_Bool         evas_map_alpha_get                (const Evas_Map *m);
+
+/**
+ * Copy a previously allocated map.
+ *
+ * This makes a duplicate of the @p m object and returns it.
+ *
+ * @param m map to copy. Must not be NULL.
+ * @return newly allocated map with the same count and contents as @p m.
+ */
+EAPI Evas_Map         *evas_map_dup                      (const Evas_Map *m);
+
+/**
+ * Free a previously allocated map.
+ *
+ * This frees a givem map @p m and all memory associated with it. You must NOT
+ * free a map returned by evas_object_map_get() as this is internal.
+ *
+ * @param m map to free.
+ */
+EAPI void              evas_map_free                     (Evas_Map *m);
+
+/**
+ * Get a maps size.
+ *
+ * Returns the number of points in a map.  Should be at least 4.
+ *
+ * @param m map to get size.
+ * @return -1 on error, points otherwise.
+ */
+EAPI int               evas_map_count_get               (const Evas_Map *m) EINA_CONST;
+
+/**
+ * Change the map point's coordinate.
+ *
+ * This sets the fixen point's coordinate in the map. Note that points
+ * describe the outline of a quadrangle and are ordered either clockwise
+ * or anit-clock-wise. It is suggested to keep your quadrangles concave and
+ * non-complex, though these polygon modes may work, they may not render
+ * a desired set of output. The quadrangle will use points 0 and 1 , 1 and 2,
+ * 2 and 3, and 3 and 0 to describe the edges of the quandrangle.
+ *
+ * The X and Y and Z coordinates are in canvas units. Z is optional and may
+ * or may not be honored in drawing. Z is a hint and does not affect the
+ * X and Y rendered coordinates. It may be used for calculating fills with
+ * perspective correct rendering.
+ *
+ * Remember all coordinates are canvas global ones like with move and reize
+ * in evas.
+ *
+ * @param m map to change point. Must not be @c NULL.
+ * @param idx index of point to change. Must be smaller than map size.
+ * @param x Point X Coordinate
+ * @param y Point Y Coordinate
+ * @param z Point Z Coordinate hint (pre-perspective transform)
+ *
+ * @see evas_map_util_rotate()
+ * @see evas_map_util_zoom()
+ * @see evas_map_util_points_populate_from_object_full()
+ * @see evas_map_util_points_populate_from_object()
+ */
+EAPI void              evas_map_point_coord_set          (Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z);
+
+/**
+ * Get the map point's coordinate.
+ *
+ * This returns the coordinates of the given point in the map.
+ *
+ * @param m map to query point.
+ * @param idx index of point to query. Must be smaller than map size.
+ * @param x where to return the X coordinate.
+ * @param y where to return the Y coordinate.
+ * @param z where to return the Z coordinate.
+ */
+EAPI void              evas_map_point_coord_get          (const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z);
+
+/**
+ * Change the map point's U and V texture source point
+ *
+ * This sets the U and V coordinates for the point. This determines which
+ * coordinate in the source image is mapped to the given point, much like
+ * OpenGL and textures. Notes that these points do select the pixel, but
+ * are double floating point values to allow for accuracy and sub-pixel
+ * selection.
+ *
+ * @param m map to change the point of.
+ * @param idx index of point to change. Must be smaller than map size.
+ * @param u the X coordinate within the image/texture source
+ * @param v the Y coordinate within the image/texture source
+ *
+ * @see evas_map_point_coord_set()
+ * @see evas_object_map_set()
+ * @see evas_map_util_points_populate_from_object_full()
+ * @see evas_map_util_points_populate_from_object()
+ */
+EAPI void              evas_map_point_image_uv_set       (Evas_Map *m, int idx, double u, double v);
+
+/**
+ * Get the map point's U and V texture source points
+ *
+ * This returns the texture points set by evas_map_point_image_uv_set().
+ *
+ * @param m map to query point.
+ * @param idx index of point to query. Must be smaller than map size.
+ * @param u where to write the X coordinate within the image/texture source
+ * @param v where to write the Y coordinate within the image/texture source
+ */
+EAPI void              evas_map_point_image_uv_get       (const Evas_Map *m, int idx, double *u, double *v);
+
+/**
+ * Set the color of a vertex in the map
+ *
+ * This sets the color of the vertex in the map. Colors will be linearly
+ * interpolated between vertex points through the map. Color will multiply
+ * the "texture" pixels (like GL_MODULATE in OpenGL). The default color of
+ * a vertex in a map is white solid (255, 255, 255, 255) which means it will
+ * have no affect on modifying the texture pixels.
+ *
+ * @param m map to change the color of.
+ * @param idx index of point to change. Must be smaller than map size.
+ * @param r red (0 - 255)
+ * @param g green (0 - 255)
+ * @param b blue (0 - 255)
+ * @param a alpha (0 - 255)
+ *
+ * @see evas_map_util_points_color_set()
+ * @see evas_map_point_coord_set()
+ * @see evas_object_map_set()
+ */
+EAPI void              evas_map_point_color_set          (Evas_Map *m, int idx, int r, int g, int b, int a);
+
+/**
+ * Get the color set on a vertex in the map
+ *
+ * This gets the color set by evas_map_point_color_set() on the given vertex
+ * of the map.
+ *
+ * @param m map to get the color of the vertex from.
+ * @param idx index of point get. Must be smaller than map size.
+ * @param r pointer to red return
+ * @param g pointer to green return
+ * @param b pointer to blue return
+ * @param a pointer to alpha return (0 - 255)
+ *
+ * @see evas_map_point_coord_set()
+ * @see evas_object_map_set()
+ */
+EAPI void              evas_map_point_color_get          (const Evas_Map *m, int idx, int *r, int *g, int *b, int *a);
+
+/**
+ * @defgroup Evas_Object_Group_Size_Hints Size Hints
+ *
+ * Objects may carry hints so another object that acts as a manager
+ * (see @ref Evas_Smart_Object_Group) may know how to properly position
+ * and resize the object. The Size Hints provide a common interface
+ * that is recommended as the protocol for such information.
+ *
+ * @ingroup Evas_Object_Group
+ */
+
+/**
+ * Retrieves the size hint for the minimum size.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * Note that if any of @p w or @p h are @c NULL, the @c NULL
+ * parameters are ignored.
+ *
+ * @param obj The given evas object.
+ * @param   w Pointer to an integer in which to store the minimum width.
+ * @param   h Pointer to an integer in which to store the minimum height.
+ */
+EAPI void              evas_object_size_hint_min_get     (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
+
+/**
+ * Sets the size hint for the minimum size.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * Value 0 is considered unset.
+ *
+ * @param obj The given evas object.
+ * @param   w Integer to use as the minimum width hint.
+ * @param   h Integer to use as the minimum height hint.
+ */
+EAPI void              evas_object_size_hint_min_set     (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the size hint for the maximum size.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * Note that if any of @p w or @p h are @c NULL, the @c NULL
+ * parameters are ignored.
+ *
+ * @param obj The given evas object.
+ * @param   w Pointer to an integer in which to store the maximum width.
+ * @param   h Pointer to an integer in which to store the maximum height.
+ */
+EAPI void              evas_object_size_hint_max_get     (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
+
+/**
+ * Sets the size hint for the maximum size.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * Value -1 is considered unset.
+ *
+ * @param obj The given evas object.
+ * @param   w Integer to use as the maximum width hint.
+ * @param   h Integer to use as the maximum height hint.
+ */
+EAPI void              evas_object_size_hint_max_set     (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the size request hint.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * Note that if any of @p w or @p h are @c NULL, the @c NULL
+ * parameters are ignored.
+ *
+ * @param obj The given evas object.
+ * @param   w Pointer to an integer in which to store the requested width.
+ * @param   h Pointer to an integer in which to store the requested height.
+ */
+EAPI void              evas_object_size_hint_request_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
+
+/**
+ * Sets the requested size hint.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * Value 0 is considered unset.
+ *
+ * @param obj The given evas object.
+ * @param   w Integer to use as the preferred width hint.
+ * @param   h Integer to use as the preferred height hint.
+ */
+EAPI void              evas_object_size_hint_request_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the size aspect control hint.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * Note that if any of @p aspect, @p w or @p h are @c NULL, the @c NULL
+ * parameters are ignored.
+ *
+ * @param    obj The given evas object.
+ * @param aspect Returns the hint on how size should be calculated.
+ * @param      w Pointer to an integer in which to store the aspect width.
+ * @param      h Pointer to an integer in which to store the aspect height.
+ */
+EAPI void              evas_object_size_hint_aspect_get  (const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
+
+/**
+ * Sets the size aspect control hint.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * @param    obj The given evas object.
+ * @param aspect Hint on how to calculate size.
+ * @param      w Integer to use as aspect width hint.
+ * @param      h Integer to use as aspect height hint.
+ */
+EAPI void              evas_object_size_hint_aspect_set  (Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the size align control hint.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * Note that if any of @p x or @p y are @c NULL, the @c NULL
+ * parameters are ignored.
+ *
+ * @param    obj The given evas object.
+ * @param      x Pointer to a double in which to store the align x.
+ * @param      y Pointer to a double in which to store the align y.
+ */
+EAPI void              evas_object_size_hint_align_get   (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1);
+
+/**
+ * Sets the size align control hint.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * Accepted values are in the 0.0 to 1.0 range, with the special value
+ * -1.0 used to specify "justify" or "fill" by some users. See
+ * documentation of possible users.
+ *
+ * @param    obj The given evas object.
+ * @param      x Double (0.0..1.0 or -1.0) to use as align x hint.
+ * @param      y Double (0.0..1.0 or -1.0) to use as align y hint.
+ */
+EAPI void              evas_object_size_hint_align_set   (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the size weight control hint.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * Note that if any of @p x or @p y are @c NULL, the @c NULL
+ * parameters are ignored.
+ *
+ * Accepted values are zero or positive values. Some users might use
+ * this hint as a boolean, but some might consider it as a proportion,
+ * see documentation of possible users.
+ *
+ * @param    obj The given evas object.
+ * @param      x Pointer to a double in which to store the weight x.
+ * @param      y Pointer to a double in which to store the weight y.
+ */
+EAPI void              evas_object_size_hint_weight_get  (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1);
+
+/**
+ * Sets the size weight control hint.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * @param    obj The given evas object.
+ * @param      x Double (0.0-1.0) to use as weight x hint.
+ * @param      y Double (0.0-1.0) to use as weight y hint.
+ */
+EAPI void              evas_object_size_hint_weight_set  (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the size padding control hint.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * Note that if any of @p l, @p r, @p t or @p b are @c NULL, the @c
+ * NULL parameters are ignored.
+ *
+ * @param    obj The given evas object.
+ * @param      l Pointer to an integer in which to store left padding.
+ * @param      r Pointer to an integer in which to store right padding.
+ * @param      t Pointer to an integer in which to store top padding.
+ * @param      b Pointer to an integer in which to store bottom padding.
+ */
+EAPI void              evas_object_size_hint_padding_get (const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) EINA_ARG_NONNULL(1);
+
+/**
+ * Sets the size padding control hint.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * @param    obj The given evas object.
+ * @param      l Integer to specify left padding.
+ * @param      r Integer to specify right padding.
+ * @param      t Integer to specify top padding.
+ * @param      b Integer to specify bottom padding.
+ */
+EAPI void              evas_object_size_hint_padding_set (Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b) EINA_ARG_NONNULL(1);
+
+/**
+ * @defgroup Evas_Object_Group_Extras Extra Object Manipulation
+ *
+ * Miscellaneous functions that also apply to any object, but are less
+ * used or not implemented by all objects.
+ *
+ * @ingroup Evas_Object_Group
+ */
+
+/**
+ * @addtogroup Evas_Object_Group_Extras
+ * @{
+ */
+
+/**
+ * Set an attached data pointer to an object with a given string key.
+ * @param obj The object to attach the data pointer to
+ * @param key The string key for the data to access it
+ * @param data The ponter to the data to be attached
+ *
+ * This attaches the pointer @p data to the object @p obj given the string
+ * @p key. This pointer will stay "hooked" to the object until a new pointer
+ * with the same string key is attached with evas_object_data_set() or it is
+ * deleted with evas_object_data_del(). On deletion of the object @p obj, the
+ * pointers will not be accessible from the object anymore.
+ *
+ * You can find the pointer attached under a string key using
+ * evas_object_data_get(). It is the job of the calling application to free
+ * any data pointed to by @p data when it is no longer required.
+ *
+ * If @p data is NULL, the old value stored at @p key will be removed but no
+ * new value will be stored. This is synonymous with calling
+ * evas_object_data_del() with @p obj and @p key.
+ *
+ * Example:
+ *
+ * @code
+ * int *my_data;
+ * extern Evas_Object *obj;
+ *
+ * my_data = malloc(500);
+ * evas_object_data_set(obj, "name_of_data", my_data);
+ * printf("The data that was attached was %p\n", evas_object_data_get(obj, "name_of_data"));
+ * @endcode
+ */
+EAPI void                      evas_object_data_set             (Evas_Object *obj, const char *key, const void *data) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Return an attached data pointer by its given string key.
+ * @param obj The object to which the data was attached
+ * @param key The string key the data was stored under
+ * @return The data pointer stored, or @c NULL if none was stored
+ *
+ * This function will return the data pointer attached to the object @p obj
+ * stored using the string key @p key. If the object is valid and data was
+ * stored under the given key, the pointer that was stored will be reuturned.
+ * If this is not the case, NULL will be returned, signifying an invalid object
+ * or non-existent key. It is possible a NULL pointer was stored given that
+ * key, but this situation is non-sensical and thus can be considered an error
+ * as well. NULL pointers are never stored as this is the return value if an
+ * error occurs.
+ *
+ * Example:
+ *
+ * @code
+ * int *my_data;
+ * extern Evas_Object *obj;
+ *
+ * my_data = evas_object_data_get(obj, "name_of_my_data");
+ * if (my_data) printf("Data stored was %p\n", my_data);
+ * 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;
+
+/**
+ * Delete at attached data pointer from an object.
+ * @param obj The object to delete the data pointer from
+ * @param key The string key the data was stored under
+ * @return The original data pointer stored at @p key on @p obj
+ *
+ * This will remove the stored data pointer from @p obj stored under @p key,
+ * and return the original pointer stored under @p key, if any, nor @c NULL if
+ * nothing was stored under that key.
+ *
+ * Example:
+ *
+ * @code
+ * int *my_data;
+ * extern Evas_Object *obj;
+ *
+ * my_data = evas_object_data_del(obj, "name_of_my_data");
+ * @endcode
+ */
+EAPI void                     *evas_object_data_del             (Evas_Object *obj, const char *key) EINA_ARG_NONNULL(1, 2);
+
+
+/**
+ * Set pointer behavior.
+ *
+ * @param obj
+ * @param setting desired behavior.
+ *
+ * This function has direct effect on event callbacks related to
+ * mouse.
+ *
+ * If @p setting is EVAS_OBJECT_POINTER_MODE_AUTOGRAB, then when mouse
+ * is down at this object, events will be restricted to it as source,
+ * mouse moves, for example, will be emitted even if outside this
+ * object area.
+ *
+ * If @p setting is EVAS_OBJECT_POINTER_MODE_NOGRAB, then events will
+ * be emitted just when inside this object area.
+ *
+ * The default value is EVAS_OBJECT_POINTER_MODE_AUTOGRAB.
+ *
+ * @ingroup Evas_Object_Group_Extras
+ */
+EAPI void                      evas_object_pointer_mode_set     (Evas_Object *obj, Evas_Object_Pointer_Mode setting) EINA_ARG_NONNULL(1);
+
+/**
+ * Determine how pointer will behave.
+ * @param obj
+ * @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;
+
+
+/**
+ * Sets whether or not the given evas object is to be drawn anti-aliased.
+ *
+ * @param   obj The given evas object.
+ * @param   anti_alias 1 if the object is to be anti_aliased, 0 otherwise.
+ * @ingroup Evas_Object_Group_Extras
+ */
+EAPI void                      evas_object_anti_alias_set       (Evas_Object *obj, Eina_Bool antialias) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves whether or not the given evas object is to be drawn anti_aliased.
+ * @param   obj The given evas object.
+ * @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;
+
+
+/**
+ * Sets the scaling factor for an evas object. Does not affect all objects.
+ *
+ * @param   obj The given evas object.
+ * @param   scale The scaling factor. 1.0 == none.
+ * @ingroup Evas_Object_Group_Extras
+ */
+EAPI void                      evas_object_scale_set            (Evas_Object *obj, double scale) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the scaling factor for the given evas object.
+ * @param   obj The given evas object.
+ * @return  The scaling factor.
+ *
+ * @ingroup Evas_Object_Group_Extras
+ */
+EAPI double                    evas_object_scale_get            (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+
+/**
+ * Sets the render_op to be used for rendering the evas object.
+ * @param   obj The given evas object.
+ * @param   render_op one of the Evas_Render_Op values.
+ * @ingroup Evas_Object_Group_Extras
+ */
+EAPI void                      evas_object_render_op_set        (Evas_Object *obj, Evas_Render_Op op) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the current value of the operation used for rendering the evas object.
+ * @param   obj The given evas object.
+ * @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 void                      evas_object_precise_is_inside_set(Evas_Object *obj, Eina_Bool precise) EINA_ARG_NONNULL(1);
+   EAPI Eina_Bool                 evas_object_precise_is_inside_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+   EAPI void                      evas_object_static_clip_set      (Evas_Object *obj, Eina_Bool is_static_clip) EINA_ARG_NONNULL(1);
+   EAPI Eina_Bool                 evas_object_static_clip_get      (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Evas_Object_Group_Find Finding Objects
+ *
+ * Functions that allows finding objects by their position, name or
+ * other properties.
+ *
+ * @ingroup Evas_Object_Group
+ */
+
+/**
+ * Retrieve the object that currently has focus.
+ *
+ * @param e The Evas canvas to query for focused object on.
+ * @return The object that has focus or @c NULL if there is not one.
+ *
+ * Evas can have (at most) one of its objects focused at a time.
+ * Focused objects will be the ones having <b>key events</b> delivered
+ * to, which the programmer can act upon by means of
+ * evas_object_event_callback_add() usage.
+ *
+ * @note Most users wouldn't be dealing directly with Evas' focused
+ * objects. Instead, they would be using a higher level library for
+ * that (like a toolkit, as Elementary) to handle focus and who's
+ * receiving input for them.
+ *
+ * This call returns the object that currently has focus on the canvas
+ * @p e or @c NULL, if none.
+ *
+ * @see evas_object_focus_set
+ * @see evas_object_focus_get
+ * @see evas_object_key_grab
+ * @see evas_object_key_ungrab
+ *
+ * Example:
+ * @dontinclude evas-events.c
+ * @skip evas_event_callback_add(d.canvas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN,
+ * @until evas_object_focus_set(d.bg, EINA_TRUE);
+ * @dontinclude evas-events.c
+ * @skip called when our rectangle gets focus
+ * @until }
+ *
+ * In this example the @c event_info is exactly a pointer to that
+ * focused rectangle. See the full @ref Example_Evas_Events "example".
+ *
+ * @ingroup Evas_Object_Group_Find
+ */
+EAPI Evas_Object      *evas_focus_get                    (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+
+/**
+ * Retrieves the object on the given evas with the given name.
+ * @param   e    The given evas.
+ * @param   name The given name.
+ * @return  If successful, the evas object with the given name.  Otherwise,
+ *          @c NULL.
+ * @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;
+
+
+/**
+ * Retrieves the top object at the given position (x,y)
+ * @param   e The given evas object.
+ * @param   x The horizontal coordinate
+ * @param   y The vertical coordinate
+ * @param   include_pass_events_objects Boolean Flag to include or not
+ * pass events objects
+ * @param   include_hidden_objects Boolean Flag to include or not hidden objects
+ * @return  The evas object that is over all others objects at the given position.
+ */
+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;
+
+/**
+ * Retrieves the top object at mouse pointer position
+ * @param   e The given evas object.
+ * @return The evas object that is over all others objects at the
+ * pointer position.
+ */
+EAPI Evas_Object      *evas_object_top_at_pointer_get    (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * Retrieves the top object in the given rectangle region
+ * @param   e The given evas object.
+ * @param   x The horizontal coordinate.
+ * @param   y The vertical coordinate.
+ * @param   w The width size.
+ * @param   h The height size.
+ * @param   include_pass_events_objects Boolean Flag to include or not pass events objects
+ * @param   include_hidden_objects Boolean Flag to include or not hidden objects
+ * @return  The evas object that is over all others objects at the pointer position.
+ *
+ */
+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;
+
+
+/**
+ * Retrieves the objects at the given position
+ * @param   e The given evas object.
+ * @param   x The horizontal coordinate.
+ * @param   y The vertical coordinate.
+ * @param include_pass_events_objects Boolean Flag to include or not
+ * pass events objects
+ * @param   include_hidden_objects Boolean Flag to include or not hidden objects
+ * @return  The list of evas objects at the pointer position.
+ *
+ */
+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;
+
+
+/**
+ * Get the lowest evas object on the Evas @p e
+ *
+ * @param e an Evas
+ * @return the lowest object
+ */
+EAPI Evas_Object      *evas_object_bottom_get            (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * Get the highest evas object on the Evas @p e
+ *
+ * @param e an Evas
+ * @return the highest object
+ */
+EAPI Evas_Object      *evas_object_top_get               (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * @defgroup Evas_Object_Group_Interceptors Object Method Interceptors
+ *
+ * Evas provides a way to intercept method calls. The interceptor
+ * callback may opt to completely deny the call, or may check and
+ * change the parameters before continuing. The continuation of an
+ * intercepted call is done by calling the intercepted call again,
+ * from inside the interceptor callback.
+ *
+ * @ingroup Evas_Object_Group
+ */
+typedef void (*Evas_Object_Intercept_Show_Cb) (void *data, Evas_Object *obj);
+typedef void (*Evas_Object_Intercept_Hide_Cb) (void *data, Evas_Object *obj);
+typedef void (*Evas_Object_Intercept_Move_Cb) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y);
+typedef void (*Evas_Object_Intercept_Resize_Cb) (void *data, Evas_Object *obj, Evas_Coord w, Evas_Coord h);
+typedef void (*Evas_Object_Intercept_Raise_Cb) (void *data, Evas_Object *obj);
+typedef void (*Evas_Object_Intercept_Lower_Cb) (void *data, Evas_Object *obj);
+typedef void (*Evas_Object_Intercept_Stack_Above_Cb) (void *data, Evas_Object *obj, Evas_Object *above);
+typedef void (*Evas_Object_Intercept_Stack_Below_Cb) (void *data, Evas_Object *obj, Evas_Object *above);
+typedef void (*Evas_Object_Intercept_Layer_Set_Cb) (void *data, Evas_Object *obj, int l);
+typedef void (*Evas_Object_Intercept_Color_Set_Cb) (void *data, Evas_Object *obj, int r, int g, int b, int a);
+typedef void (*Evas_Object_Intercept_Clip_Set_Cb) (void *data, Evas_Object *obj, Evas_Object *clip);
+typedef void (*Evas_Object_Intercept_Clip_Unset_Cb) (void *data, Evas_Object *obj);
+
+
+/**
+ * Set the callback function that intercepts a show event of a object.
+ *
+ * @param obj The given canvas object pointer.
+ * @param func The given function to be the callback function.
+ * @param data The data passed to the callback function.
+ *
+ * This function sets a callback function to intercepts a show event
+ * of a canvas object.
+ *
+ * @see evas_object_intercept_show_callback_del().
+ *
+ */
+EAPI void              evas_object_intercept_show_callback_add        (Evas_Object *obj, Evas_Object_Intercept_Show_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Unset the callback function that intercepts a show event of a
+ * object.
+ *
+ * @param obj The given canvas object pointer.
+ * @param func The given callback function.
+ *
+ * This function sets a callback function to intercepts a show event
+ * of a canvas object.
+ *
+ * @see evas_object_intercept_show_callback_add().
+ *
+ */
+EAPI void             *evas_object_intercept_show_callback_del        (Evas_Object *obj, Evas_Object_Intercept_Show_Cb func) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Set the callback function that intercepts a hide event of a object.
+ *
+ * @param obj The given canvas object pointer.
+ * @param func The given function to be the callback function.
+ * @param data The data passed to the callback function.
+ *
+ * This function sets a callback function to intercepts a hide event
+ * of a canvas object.
+ *
+ * @see evas_object_intercept_hide_callback_del().
+ *
+ */
+EAPI void              evas_object_intercept_hide_callback_add        (Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Unset the callback function that intercepts a hide event of a
+ * object.
+ *
+ * @param obj The given canvas object pointer.
+ * @param func The given callback function.
+ *
+ * This function sets a callback function to intercepts a hide event
+ * of a canvas object.
+ *
+ * @see evas_object_intercept_hide_callback_add().
+ *
+ */
+EAPI void             *evas_object_intercept_hide_callback_del        (Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Set the callback function that intercepts a move event of a object.
+ *
+ * @param obj The given canvas object pointer.
+ * @param func The given function to be the callback function.
+ * @param data The data passed to the callback function.
+ *
+ * This function sets a callback function to intercepts a move event
+ * of a canvas object.
+ *
+ * @see evas_object_intercept_move_callback_del().
+ *
+ */
+EAPI void              evas_object_intercept_move_callback_add        (Evas_Object *obj, Evas_Object_Intercept_Move_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Unset the callback function that intercepts a move event of a
+ * object.
+ *
+ * @param obj The given canvas object pointer.
+ * @param func The given callback function.
+ *
+ * This function sets a callback function to intercepts a move event
+ * of a canvas object.
+ *
+ * @see evas_object_intercept_move_callback_add().
+ *
+ */
+EAPI void             *evas_object_intercept_move_callback_del        (Evas_Object *obj, Evas_Object_Intercept_Move_Cb func) EINA_ARG_NONNULL(1, 2);
+
+   EAPI void              evas_object_intercept_resize_callback_add      (Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+   EAPI void             *evas_object_intercept_resize_callback_del      (Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func) EINA_ARG_NONNULL(1, 2);
+   EAPI void              evas_object_intercept_raise_callback_add       (Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+   EAPI void             *evas_object_intercept_raise_callback_del       (Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func) EINA_ARG_NONNULL(1, 2);
+   EAPI void              evas_object_intercept_lower_callback_add       (Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+   EAPI void             *evas_object_intercept_lower_callback_del       (Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func) EINA_ARG_NONNULL(1, 2);
+   EAPI void              evas_object_intercept_stack_above_callback_add (Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+   EAPI void             *evas_object_intercept_stack_above_callback_del (Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func) EINA_ARG_NONNULL(1, 2);
+   EAPI void              evas_object_intercept_stack_below_callback_add (Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+   EAPI void             *evas_object_intercept_stack_below_callback_del (Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func) EINA_ARG_NONNULL(1, 2);
+   EAPI void              evas_object_intercept_layer_set_callback_add   (Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+   EAPI void             *evas_object_intercept_layer_set_callback_del   (Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func) EINA_ARG_NONNULL(1, 2);
+   EAPI void              evas_object_intercept_color_set_callback_add   (Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+   EAPI void             *evas_object_intercept_color_set_callback_del   (Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func) EINA_ARG_NONNULL(1, 2);
+   EAPI void              evas_object_intercept_clip_set_callback_add    (Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+   EAPI void             *evas_object_intercept_clip_set_callback_del    (Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func) EINA_ARG_NONNULL(1, 2);
+   EAPI void              evas_object_intercept_clip_unset_callback_add  (Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+   EAPI void             *evas_object_intercept_clip_unset_callback_del  (Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * @defgroup Evas_Object_Specific Specific Object Functions
+ *
+ * Functions that work on specific objects.
+ *
+ */
+
+/**
+ * @defgroup Evas_Object_Rectangle Rectangle Object Functions
+ *
+ * Functions that operate on evas rectangle objects.
+ *
+ * @ingroup Evas_Object_Specific
+ */
+
+/**
+ * Adds a rectangle to the given evas.
+ * @param   e The given evas.
+ * @return  The new rectangle object.
+ */
+EAPI Evas_Object      *evas_object_rectangle_add         (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+
+/**
+ * @defgroup Evas_Object_Image Image Object Functions
+ *
+ * Functions used to create and manipulate image objects.
+ *
+ * Note - Image objects may return or accept "image data" in multiple
+ * formats.  This is based on the colorspace of an object. Here is a
+ * rundown on formats:
+ *
+ * EVAS_COLORSPACE_ARGB8888:
+ *
+ * This pixel format is a linear block of pixels, starting at the
+ * top-left row by row until the bottom right of the image or pixel
+ * region. All pixels are 32-bit unsigned int's with the high-byte
+ * being alpha and the low byte being blue in the format ARGB. Alpha
+ * may or may not be used by evas depending on the alpha flag of the
+ * image, but if not used, should be set to 0xff anyway.
+ *
+ * This colorspace uses premultiplied alpha. That means that R, G and
+ * B cannot exceed A in value. The conversion from non-premultiplied
+ * colorspace is:
+ *
+ * R = (r * a) / 255; G = (g * a) / 255; B = (b * a) / 255;
+ *
+ * So 50% transparent blue will be: 0x80000080. This will not be
+ * "dark" - just 50% transparent. Values are 0 == black, 255 == solid
+ * or full red, green or blue.
+ *
+ * EVAS_COLORSPACE_YCBCR422P601_PL:
+ *
+ * This is a pointer-list indirected set of YUV (YCbCr) pixel
+ * data. This means that the data returned or set is not actual pixel
+ * data, but pointers TO lines of pixel data. The list of pointers
+ * will first be N rows of pointers to the Y plane - pointing to the
+ * first pixel at the start of each row in the Y plane. N is the
+ * height of the image data in pixels. Each pixel in the Y, U and V
+ * planes is 1 byte exactly, packed. The next N / 2 pointers will
+ * point to rows in the U plane, and the next N / 2 pointers will
+ * point to the V plane rows. U and V planes are half the horizontal
+ * and vertical resolution of the Y plane.
+ *
+ * Row order is top to bottom and row pixels are stored left to right.
+ *
+ * There is a limitation that these images MUST be a multiple of 2
+ * pixels in size horizontally or vertically. This is due to the U and
+ * V planes being half resolution. Also note that this assumes the
+ * itu601 YUV colorspace specification. This is defined for standard
+ * television and mpeg streams.  HDTV may use the itu709
+ * specification.
+ *
+ * Values are 0 to 255, indicating full or no signal in that plane
+ * respectively.
+ *
+ * EVAS_COLORSPACE_YCBCR422P709_PL:
+ *
+ * Not implemented yet.
+ *
+ * EVAS_COLORSPACE_RGB565_A5P:
+ *
+ * In the process of being implemented in 1 engine only. This may change.
+ *
+ * This is a pointer to image data for 16-bit half-word pixel data in
+ * 16bpp RGB 565 format (5 bits red, 6 bits green, 5 bits blue), with
+ * the high-byte containing red and the low byte containing blue, per
+ * pixel. This data is packed row by row from the top-left to the
+ * bottom right.
+ *
+ * If the image has an alpha channel enabled there will be an extra
+ * alpha plane after the color pixel plane. If not, then this data
+ * will not exist and should not be accessed in any way. This plane is
+ * a set of pixels with 1 byte per pixel defining the alpha values of
+ * all pixels in the image from the top-left to the bottom right of
+ * the image, row by row. Even though the values of the alpha pixels
+ * can be 0 to 255, only values 0 through to 32 are used, 32 being
+ * solid and 0 being transparent.
+ *
+ * RGB values can be 0 to 31 for red and blue and 0 to 63 for green,
+ * with 0 being black and 31 or 63 being full red, green or blue
+ * respectively. This colorspace is also pre-multiplied like
+ * EVAS_COLORSPACE_ARGB8888 so:
+ *
+ * R = (r * a) / 32; G = (g * a) / 32; B = (b * a) / 32;
+ *
+ * EVAS_COLORSPACE_A8:
+ *
+ * The image is just a alpha mask (8 bit's per pixel).  This is used for alpha
+ * masking.
+ *
+ * @ingroup Evas_Object_Specific
+ */
+typedef void (*Evas_Object_Image_Pixels_Get_Cb) (void *data, Evas_Object *o);
+
+
+/**
+ * Creates a new image object on the given evas.
+ *
+ * @param e The given evas.
+ * @return The created image object.
+ */
+EAPI Evas_Object             *evas_object_image_add                    (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+
+/**
+ * Creates a new image object that automatically scales on the given evas.
+ *
+ * This is a helper around evas_object_image_add() and
+ * evas_object_image_filled_set(), it will track object resizes and apply
+ * evas_object_image_fill_set() with the new geometry.
+ *
+ * @see evas_object_image_add()
+ * @see evas_object_image_filled_set()
+ * @see evas_object_image_fill_set()
+ */
+EAPI Evas_Object             *evas_object_image_filled_add             (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+
+
+/**
+ * Sets the data for an image from memory to be loaded
+ *
+ * This is the same as evas_object_image_file_set() but the file to be loaded
+ * may exist at an address in memory (the data for the file, not the filename
+ * itself). The @p data at the address is copied and stored for future use, so
+ * no @p data needs to be kept after this call is made. It will be managed and
+ * freed for you when no longer needed. The @p size is limited to 2 gigabytes
+ * in size, and must be greater than 0. A NULL @p data pointer is also invalid.
+ * Set the filename to NULL to reset to empty state and have the image file
+ * data freed from memory using evas_object_image_file_set().
+ *
+ * The @p format is optional (pass NULL if you don't need/use it). It is used
+ * to help Evas guess better which loader to use for the data. It may simply
+ * be the "extension" of the file as it would normally be on disk such as
+ * "jpg" or "png" or "gif" etc.
+ *
+ * @param obj The given image object.
+ * @param data The image file data address
+ * @param size The size of the image file data in bytes
+ * @param format The format of the file (optional), or @c NULL if not needed
+ * @param key The image key in file, or @c NULL.
+ */
+EAPI void                     evas_object_image_memfile_set            (Evas_Object *obj, void *data, int size, char *format, char *key) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Sets the filename and key of the given image object.
+ *
+ * If the file supports multiple data stored in it as eet, you can
+ * specify the key to be used as the index of the image in this file.
+ *
+ * @param obj The given image object.
+ * @param file The image filename.
+ * @param key The image key in file, or @c NULL.
+ */
+EAPI void                     evas_object_image_file_set               (Evas_Object *obj, const char *file, const char *key) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the filename and key of the given image object.
+ *
+ * @param obj The given image object.
+ * @param file Location to store the image filename, or @c NULL.
+ * @param key Location to store the image key, or @c NULL.
+ */
+EAPI void                     evas_object_image_file_get               (const Evas_Object *obj, const char **file, const char **key) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Sets how much of each border of the given image object is not
+ * to be scaled.
+ *
+ * When rendering, the image may be scaled to fit the size of the
+ * image object. This function sets what area around the border of the
+ * image is not to be scaled. This sort of function is useful for
+ * widget theming, where, for example, buttons may be of varying
+ * sizes, but the border size must remain constant.
+ *
+ * The units used for @p l, @p r, @p t and @p b are output units.
+ *
+ * @param obj The given image object.
+ * @param l Distance of the left border that is not to be stretched.
+ * @param r Distance of the right border that is not to be stretched.
+ * @param t Distance of the top border that is not to be stretched.
+ * @param b Distance of the bottom border that is not to be stretched.
+ */
+EAPI void                     evas_object_image_border_set             (Evas_Object *obj, int l, int r, int t, int b) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves how much of each border of the given image object is not
+ * to be scaled.
+ *
+ * See @ref evas_object_image_border_set for more details.
+ *
+ * @param obj The given image object.
+ * @param l Location to store the left border width in, or @c NULL.
+ * @param r Location to store the right border width in, or @c NULL.
+ * @param t Location to store the top border width in, or @c NULL.
+ * @param b Location to store the bottom border width in, or @c NULL.
+ */
+EAPI void                     evas_object_image_border_get             (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1);
+
+/**
+ * Sets if the center part of the given image object (not the border)
+ * should be drawn.
+ *
+ * When rendering, the image may be scaled to fit the size of the
+ * image object. This function sets if the center part of the scaled
+ * image is to be drawn or left completely blank, or forced to be
+ * solid. Very useful for frames and decorations.
+ *
+ * @param obj The given image object.
+ * @param fill Fill mode of the middle.
+ */
+EAPI void                     evas_object_image_border_center_fill_set (Evas_Object *obj, Evas_Border_Fill_Mode fill) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves if the center of the given image object is to be drawn or
+ * not.
+ *
+ * See @ref evas_object_image_fill_set for more details.
+ *
+ * @param obj The given image object.
+ * @return Fill mode of the  center.
+ */
+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;
+
+/**
+ * Sets if image fill property should track object size.
+ *
+ * If set to true, then every evas_object_resize() will automatically
+ * trigger call to evas_object_image_fill_set() with the new size so
+ * image will fill the whole object area.
+ *
+ * @param obj The given image object.
+ * @param setting whether to follow object size.
+ *
+ * @see evas_object_image_filled_add()
+ * @see evas_object_image_fill_set()
+ */
+EAPI void                     evas_object_image_filled_set             (Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves if image fill property is tracking object size.
+ *
+ * @param obj The given image object.
+ * @return 1 if it is tracking, 0 if not and evas_object_fill_set()
+ * must be called manually.
+ */
+EAPI Eina_Bool                evas_object_image_filled_get             (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * Sets a scale factor (multiplier) for the borders of an image
+ *
+ * @param obj The given image object.
+ * @param scale The scale factor (default is 1.0 - i.e. no scale)
+ */
+EAPI void                     evas_object_image_border_scale_set       (Evas_Object *obj, double scale);
+
+/**
+ * Retrieves the border scale factor
+ *
+ * See evas_object_image_border_scale_set()
+ *
+ * @param obj The given image object.
+ * @return The scale factor
+ */
+EAPI double                   evas_object_image_border_scale_get       (const Evas_Object *obj);
+
+/**
+ * Sets the rectangle of the given image object that the image will be
+ * drawn to.
+ *
+ * Note that the image will be tiled around this one rectangle. To
+ * have only one copy of the image drawn, @p x and @p y must be 0 and
+ * @p w and @p h need to be the width and height of the image object
+ * respectively.
+ *
+ * The default values for the fill parameters is @p x = 0, @p y = 0,
+ * @p w = 32 and @p h = 32.
+ *
+ * @param obj The given image object.
+ * @param x The X coordinate for the top left corner of the image.
+ * @param y The Y coordinate for the top left corner of the image.
+ * @param w The width of the image.
+ * @param h The height of the image.
+ */
+EAPI void                     evas_object_image_fill_set               (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the dimensions of the rectangle of the given image object
+ * that the image will be drawn to.
+ *
+ * See @ref evas_object_image_fill_set for more details.
+ *
+ * @param obj The given image object.
+ * @param x Location to store the X coordinate for the top left corner of the image in, or @c NULL.
+ * @param y Location to store the Y coordinate for the top left corner of the image in, or @c NULL.
+ * @param w Location to store the width of the image in, or @c NULL.
+ * @param h Location to store the height of the image in, or @c NULL.
+ */
+EAPI void                     evas_object_image_fill_get               (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
+
+/**
+ * Sets the tiling mode for the given evas image object's fill.
+ * @param   obj   The given evas image object.
+ * @param   spread One of EVAS_TEXTURE_REFLECT, EVAS_TEXTURE_REPEAT,
+ * EVAS_TEXTURE_RESTRICT, or EVAS_TEXTURE_PAD.
+ */
+EAPI void                     evas_object_image_fill_spread_set        (Evas_Object *obj, Evas_Fill_Spread spread) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the spread (tiling mode) for the given image object's
+ * fill.
+ *
+ * @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;
+
+/**
+ * Sets the size of the given image object.
+ *
+ * This function will scale down or crop the image so that it is
+ * treated as if it were at the given size. If the size given is
+ * smaller than the image, it will be cropped. If the size given is
+ * larger, then the image will be treated as if it were in the upper
+ * left hand corner of a larger image that is otherwise transparent.
+ *
+ * @param obj The given image object.
+ * @param w The new width of the image.
+ * @param h The new height of the image.
+ */
+EAPI void                     evas_object_image_size_set               (Evas_Object *obj, int w, int h) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the size of the given image object.
+ *
+ * See @ref evas_object_image_size_set for more details.
+ *
+ * @param obj The given image object.
+ * @param w Location to store the width of the image in, or @c NULL.
+ * @param h Location to store the height of the image in, or @c NULL.
+ */
+EAPI void                     evas_object_image_size_get               (const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the row stride of the given image object,
+ *
+ * The row stride is the number of units between the start of a
+ * row and the start of the next row.
+ *
+ * @param obj The given image object.
+ * @return The stride of the image.
+ */
+EAPI int                      evas_object_image_stride_get             (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * Retrieves a number representing any error that occurred during the last
+ * load of the given image object.
+ *
+ * @param obj The given image object.
+ * @return A value giving the last error that occurred. It should be one of
+ *         the @c EVAS_LOAD_ERROR_* values.  @c 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;
+
+/**
+ * Sets the raw image data of the given image object.
+ *
+ * Note that the raw data must be of the same size and colorspace of
+ * the image. If data is NULL the current image data will be freed.
+ *
+ * @param obj The given image object.
+ * @param data The raw data, or @c NULL.
+ */
+EAPI void                     evas_object_image_data_set               (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1);
+
+/**
+ * Converts the raw image data of the given image object to the
+ * specified colorspace.
+ *
+ * Note that this function does not modify the raw image data.  If the
+ * requested colorspace is the same as the image colorspace nothing is
+ * done and NULL is returned. You should use
+ * evas_object_image_colorspace_get() to check the current image
+ * colorspace.
+ *
+ * See @ref evas_object_image_colorspace_get.
+ *
+ * @param obj The given image object.
+ * @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;
+
+/**
+ * Get a pointer to the raw image data of the given image object.
+ *
+ * This function returns a pointer to an image object's internal pixel
+ * buffer, for reading only or read/write. If you request it for
+ * writing, the image will be marked dirty so that it gets redrawn at
+ * the next update.
+ *
+ * This is best suited when you want to modify an existing image,
+ * without changing its dimensions.
+ *
+ * @param obj The given image object.
+ * @param for_writing Whether the data being retrieved will be modified.
+ * @return The raw image data.
+ */
+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;
+
+/**
+ * Replaces the raw image data of the given image object.
+ *
+ * This function lets the application replace an image object's
+ * internal pixel buffer with a user-allocated one. For best results,
+ * you should generally first call evas_object_image_size_set() with
+ * the width and height for the new buffer.
+ *
+ * This call is best suited for when you will be using image data with
+ * different dimensions than the existing image data, if any. If you
+ * only need to modify the existing image in some fashion, then using
+ * evas_object_image_data_get() is probably what you are after.
+ *
+ * Note that the caller is responsible for freeing the buffer when
+ * finished with it, as user-set image data will not be automatically
+ * freed when the image object is deleted.
+ *
+ * See @ref evas_object_image_data_get for more details.
+ *
+ * @param obj The given image object.
+ * @param data The raw data.
+ */
+EAPI void                     evas_object_image_data_copy_set          (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1);
+
+/**
+ * Mark a sub-region of the given image object to be redrawn.
+ *
+ * This function schedules a particular rectangular region of an image
+ * object to be updated (redrawn) at the next render.
+ *
+ * @param obj The given image object.
+ * @param x X-offset of the region to be updated.
+ * @param y Y-offset of the region to be updated.
+ * @param w Width of the region to be updated.
+ * @param h Height of the region to be updated.
+ */
+EAPI void                     evas_object_image_data_update_add        (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
+
+/**
+ * Enable or disable alpha channel of the given image object.
+ *
+ * This function sets a flag on an image object indicating whether or
+ * not to use alpha channel data. A value of 1 indicates to use alpha
+ * channel data, and 0 indicates to ignore any alpha channel
+ * data. Note that this has nothing to do with an object's color as
+ * manipulated by evas_object_color_set().
+ *
+ * @param obj The given image object.
+ * @param has_alpha Whether to use alpha channel data or not.
+ */
+EAPI void                     evas_object_image_alpha_set              (Evas_Object *obj, Eina_Bool has_alpha) EINA_ARG_NONNULL(1);
+
+/**
+ * @brief Retrieves the alpha channel setting of the given image object.
+ *
+ * @param obj The given image object.
+ * @return Whether the alpha channel data is being used.
+ *
+ * This function returns 1 if the image object's alpha channel is
+ * being used, or 0 otherwise.
+ *
+ * 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;
+
+/**
+ * Sets whether to use of high-quality image scaling algorithm
+ * of the given image object.
+ *
+ * When enabled, a higher quality image scaling algorithm is used when
+ * scaling images to sizes other than the source image. This gives
+ * better results but is more computationally expensive.
+ *
+ * @param obj The given image object.
+ * @param smooth_scale Whether to use smooth scale or not.
+ */
+EAPI void                     evas_object_image_smooth_scale_set       (Evas_Object *obj, Eina_Bool smooth_scale) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves whether the given image object is using use a
+ * high-quality image scaling algorithm.
+ *
+ * See @ref evas_object_image_smooth_scale_set for more details.
+ *
+ * @param obj The given image object.
+ * @return Whether smooth scale is being used.
+ */
+EAPI Eina_Bool                evas_object_image_smooth_scale_get       (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * Preload image in the background
+ *
+ * This function request the preload of the data image in the
+ * background. The worked is queued before being processed.
+ *
+ * If image data is already loaded, it will callback
+ * EVAS_CALLBACK_IMAGE_PRELOADED immediately and do nothing else.
+ *
+ * If cancel is set, it will remove the image from the workqueue.
+ *
+ * @param obj The given image object.
+ * @param cancel 0 means add to the workqueue, 1 remove it.
+ */
+EAPI void                     evas_object_image_preload                (Evas_Object *obj, Eina_Bool cancel) EINA_ARG_NONNULL(1);
+
+/**
+ * Reload a image of the canvas.
+ *
+ * @param obj The given image object pointer.
+ *
+ * This function reloads a image of the given canvas.
+ *
+ */
+EAPI void                     evas_object_image_reload                 (Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+/**
+ * Save the given image object to a file.
+ *
+ * Note that you should pass the filename extension when saving.  If
+ * the file supports multiple data stored in it as eet, you can
+ * specify the key to be used as the index of the image in this file.
+ *
+ * You can specify some flags when saving the image.  Currently
+ * acceptable flags are quality and compress.  Eg.: "quality=100
+ * compress=9"
+ *
+ * @param obj The given image object.
+ * @param file The filename to be used to save the image.
+ * @param key The image key in file, or @c NULL.
+ * @param flags String containing the flags to be used.
+ */
+EAPI Eina_Bool                evas_object_image_save                   (const Evas_Object *obj, const char *file, const char *key, const char *flags)  EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Import pixels from given source to a given canvas image object.
+ *
+ * @param obj The given canvas object.
+ * @param pixels The pixel's source to be imported.
+ *
+ * This function imports pixels from a given source to a given canvas image.
+ *
+ */
+EAPI Eina_Bool                evas_object_image_pixels_import          (Evas_Object *obj, Evas_Pixel_Import_Source *pixels) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Set the callback function to get pixels from a canva's image.
+ *
+ * @param obj The given canvas pointer.
+ * @param func The callback function.
+ * @param data The data pointer to be passed to @a func.
+ *
+ * This functions sets a function to be the callback function that get
+ * pixes from a image of the canvas.
+ *
+ */
+EAPI void                     evas_object_image_pixels_get_callback_set(Evas_Object *obj, Evas_Object_Image_Pixels_Get_Cb func, void *data) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Mark whether the given image object is dirty (needs to be redrawn).
+ *
+ * @param obj The given image object.
+ * @param dirty Whether the image is dirty.
+ */
+EAPI void                     evas_object_image_pixels_dirty_set       (Evas_Object *obj, Eina_Bool dirty) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves whether the given image object is dirty (needs to be redrawn).
+ *
+ * @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;
+
+/**
+ * Set the dpi resolution of a loaded image of the  canvas.
+ *
+ * @param obj The given canvas pointer.
+ * @param dpi The new dpi resolution.
+ *
+ * This function set the dpi resolution of a given loaded canvas image.
+ *
+ */
+EAPI void                     evas_object_image_load_dpi_set           (Evas_Object *obj, double dpi) EINA_ARG_NONNULL(1);
+
+/**
+ * Get the dpi resolution of a loaded image of the canvas.
+ *
+ * @param obj The given canvas pointer.
+ * @return The dpi resolution of the given canvas image.
+ *
+ * This function returns the dpi resolution of given canvas image.
+ *
+ */
+EAPI double                   evas_object_image_load_dpi_get           (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * Set the size of a loaded image of the canvas.
+ *
+ * @param obj The given canvas object.
+ * @param w The new width of the canvas image given.
+ * @param h The new height of the canvas image given.
+ *
+ * This function sets a new size for the given canvas image.
+ *
+ */
+EAPI void                     evas_object_image_load_size_set          (Evas_Object *obj, int w, int h) EINA_ARG_NONNULL(1);
+
+/**
+ * Get the size of a loaded image of the canvas.
+ *
+ * @param obj The given image object.
+ * @param w The width of the canvas image given.
+ * @param h The height of the canvas image given.
+ *
+ * This function get the size of the given canvas image.
+ *
+ */
+EAPI void                     evas_object_image_load_size_get          (const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1);
+
+/**
+ * Set the scale down of a loaded image of the canvas.
+ *
+ * @param obj The given image object pointer.
+ * @param scale_down The scale to down value.
+ *
+ * This function sets the scale down of a given canvas image.
+ *
+ */
+EAPI void                     evas_object_image_load_scale_down_set    (Evas_Object *obj, int scale_down) EINA_ARG_NONNULL(1);
+
+/**
+ * Get the scale down value of given image of the canvas.
+ *
+ * @param obj The given image object pointer.
+ *
+ * This function returns the scale down value of a given canvas image.
+ *
+ */
+EAPI int                      evas_object_image_load_scale_down_get    (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+   EAPI void                     evas_object_image_load_region_set        (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
+   EAPI void                     evas_object_image_load_region_get        (const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1);
+
+/**
+ * Define if the orientation information in the image file should be honored.
+ *
+ * @param obj The given image object pointer.
+ * @param enable @p EINA_TRUE means that it should honor the orientation information
+ * @since 1.1
+ */
+EAPI void                     evas_object_image_load_orientation_set        (Evas_Object *obj, Eina_Bool enable) EINA_ARG_NONNULL(1);
+
+/**
+ * Get if the orientation information in the image file should be honored.
+ *
+ * @param obj The given image object pointer.
+ * @since 1.1
+ */
+EAPI Eina_Bool                evas_object_image_load_orientation_get        (const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+/**
+ * Set the colorspace of a given image of the canvas.
+ *
+ * @param obj The given image object pointer.
+ * @param cspace The new color space.
+ *
+ * This function sets the colorspace of given canvas image.
+ *
+ */
+EAPI void                     evas_object_image_colorspace_set         (Evas_Object *obj, Evas_Colorspace cspace) EINA_ARG_NONNULL(1);
+
+/**
+ * Get the colorspace of a given image of the canvas.
+ *
+ * @param obj The given image object pointer.
+ * @return The colorspace of the image.
+ *
+ * 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;
+
+/**
+ * Set the native surface of a given image of the canvas
+ *
+ * @param obj The given canvas pointer.
+ * @param surf The new native surface.
+ *
+ * This function sets a native surface of a given canvas image.
+ *
+ */
+EAPI void                     evas_object_image_native_surface_set     (Evas_Object *obj, Evas_Native_Surface *surf) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Get the native surface of a given image of the canvas
+ *
+ * @param obj The given canvas pointer.
+ * @return The native surface of the given canvas image.
+ *
+ * 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;
+
+/**
+ * Set the scale hint of a given image of the canvas.
+ *
+ * @param obj The given canvas pointer.
+ * @param hint The scale hint value.
+ *
+ * This function sets the scale hint value of the given image of the canvas.
+ *
+ */
+EAPI void                     evas_object_image_scale_hint_set         (Evas_Object *obj, Evas_Image_Scale_Hint hint) EINA_ARG_NONNULL(1);
+
+/**
+ * Get the scale hint of a given image of the canvas.
+ *
+ * @param obj The given canvas pointer.
+ *
+ * This function returns the scale hint value of the given image of the canvas.
+ *
+ */
+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;
+
+/**
+ * Set the content hint of a given image of the canvas.
+ *
+ * @param obj The given canvas pointer.
+ * @param hint The content hint value.
+ *
+ * This function sets the content hint value of the given image of the canvas.
+ *
+ */
+EAPI void                     evas_object_image_content_hint_set       (Evas_Object *obj, Evas_Image_Content_Hint hint) EINA_ARG_NONNULL(1);
+
+/**
+ * Get the content hint of a given image of the canvas.
+ *
+ * @param obj The given canvas pointer.
+ *
+ * This function returns the content hint value of the given image of the canvas.
+ *
+ */
+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;
+
+
+/**
+ * Enable an image to be used as an alpha mask.
+ *
+ * This will set any flags, and discard any excess image data not used as an
+ * alpha mask.
+ *
+ * Note there is little point in using a image as alpha mask unless it has an
+ * alpha channel.
+ *
+ * @param obj Object to use as an alpha mask.
+ * @param ismask Use image as alphamask, must be true.
+ */
+EAPI void                     evas_object_image_alpha_mask_set         (Evas_Object *obj, Eina_Bool ismask) EINA_ARG_NONNULL(1);
+
+/**
+ * Set the source object on a proxy object.
+ *
+ * The source must be another object.  The proxy will have the same base
+ * appearance of the source object.  Obviously other effects may be applied to
+ * the proxy, such as a map to create a reflection of the original object.
+ *
+ * Any existing source object will be removed.  Setting the src to NULL clears
+ * the proxy object.
+ *
+ * You cannot set a proxy on a proxy.
+ *
+ * @param obj Proxy object.
+ * @param src Source of the proxy.
+ * @return EINA_TRUE on success, EINA_FALSE on error.
+ */
+EAPI Eina_Bool                evas_object_image_source_set             (Evas_Object *obj, Evas_Object *src) EINA_ARG_NONNULL(1);
+
+/**
+ * Get the current source object of an image.
+ *
+ * @param obj Image object
+ * @return Source object, or @c NULL on error.
+ */
+EAPI Evas_Object             *evas_object_image_source_get             (Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+/**
+ * Clear the source on a proxy image.
+ *
+ * This is equivalent to calling evas_object_image_source_set with a NULL
+ * source.
+ *
+ * @param obj Image object to clear source of.
+ * @return EINA_TRUE on success, EINA_FALSE on error.
+ */
+EAPI Eina_Bool                evas_object_image_source_unset           (Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+/**
+ * Check if a file extention may be supported by @ref Evas_Object_Image.
+ *
+ * @param file The file to check
+ * @return EINA_TRUE if we may be able to opeen it, EINA_FALSE if it's unlikely.
+ * @since 1.1.0
+ *
+ * If file is a Eina_Stringshare, use directly @ref evas_object_image_extension_can_load_fast_get.
+ *
+ * This functions is threadsafe.
+ */
+EAPI Eina_Bool evas_object_image_extension_can_load_get(const char *file);
+
+/**
+ * Check if a file extention may be supported by @ref Evas_Object_Image.
+ *
+ * @param file The file to check, it should be an Eina_Stringshare.
+ * @return EINA_TRUE if we may be able to opeen it, EINA_FALSE if it's unlikely.
+ * @since 1.1.0
+ *
+ * This functions is threadsafe.
+ */
+EAPI Eina_Bool evas_object_image_extension_can_load_fast_get(const char *file);
+
+/**
+ * @defgroup Evas_Object_Text Text Object Functions
+ *
+ * Functions that operate on single line, single style text objects.
+ *
+ * For multiline and multiple style text, see @ref Evas_Object_Textblock.
+ *
+ * @ingroup Evas_Object_Specific
+ */
+   typedef enum _Evas_Text_Style_Type
+     {
+        /* basic styles (4 bits allocatedm use 0->10 now, 5 left) */
+#define EVAS_TEXT_STYLE_MASK_BASIC 0xf
+#define EVAS_TEXT_STYLE_BASIC_SET(x, s) \
+   do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_BASIC) | (s); } while (0)
+       EVAS_TEXT_STYLE_PLAIN,
+       EVAS_TEXT_STYLE_SHADOW,
+       EVAS_TEXT_STYLE_OUTLINE,
+       EVAS_TEXT_STYLE_SOFT_OUTLINE,
+       EVAS_TEXT_STYLE_GLOW,
+       EVAS_TEXT_STYLE_OUTLINE_SHADOW,
+       EVAS_TEXT_STYLE_FAR_SHADOW,
+       EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW,
+       EVAS_TEXT_STYLE_SOFT_SHADOW,
+       EVAS_TEXT_STYLE_FAR_SOFT_SHADOW,
+
+#define EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION (0x7 << 4)
+#define EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(x, s) \
+   do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION) | (s); } while (0)
+        /* OR these to modify shadow direction (3 bits needed) */
+       EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT = (0x0 << 4),
+       EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM       = (0x1 << 4),
+       EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT  = (0x2 << 4),
+       EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT         = (0x3 << 4),
+       EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT     = (0x4 << 4),
+       EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP          = (0x5 << 4),
+       EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT    = (0x6 << 4),
+       EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT        = (0x7 << 4)
+     } Evas_Text_Style_Type;
+
+/**
+ * Creates a new text @c Evas_Object on the provided @c Evas canvas.
+ *
+ * @param e The @c Evas canvas to create the text object upon.
+ *
+ * @see evas_object_text_font_source_set
+ * @see evas_object_text_font_set
+ * @see evas_object_text_text_set
+ *
+ * @returns NULL on error, A pointer to a new @c Evas_Object on success.
+ */
+EAPI Evas_Object      *evas_object_text_add              (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+
+   EAPI void              evas_object_text_font_source_set  (Evas_Object *obj, const char *font) EINA_ARG_NONNULL(1);
+   EAPI const char       *evas_object_text_font_source_get  (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+   EAPI void              evas_object_text_font_set         (Evas_Object *obj, const char *font, Evas_Font_Size size) EINA_ARG_NONNULL(1);
+
+/**
+ * Query evas for font information of a text @c Evas_Object.
+ *
+ * This function allows the font name and size of a text @c Evas_Object as
+ * created with evas_object_text_add() to be queried. Be aware that the font
+ * name string is still owned by Evas and should NOT have free() called on
+ * it by the caller of the function.
+ *
+ * @param obj  The evas text object to query for font information.
+ * @param font A pointer to the location to store the font name in (may be NULL).
+ * @param size A pointer to the location to store the font size in (may be NULL).
+ */
+EAPI void              evas_object_text_font_get         (const Evas_Object *obj, const char **font, Evas_Font_Size *size) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Sets the text to be displayed by the given evas text object.
+ * @param obj  Evas text object.
+ * @param text Text to display.
+ */
+EAPI void              evas_object_text_text_set         (Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
+
+/**
+ * @brief Sets the BiDi delimiters used in the textblock.
+ *
+ * BiDi delimiters are use for in-paragraph separation of bidi segments. This
+ * is useful for example in recipients fields of e-mail clients where bidi
+ * oddities can occur when mixing rtl and ltr.
+ *
+ * @param obj The given text object.
+ * @param delim A null terminated string of delimiters, e.g ",|".
+ * @since 1.1.0
+ */
+EAPI void              evas_object_text_bidi_delimiters_set(Evas_Object *obj, const char *delim);
+
+/**
+ * @brief Gets the BiDi delimiters used in the textblock.
+ *
+ * BiDi delimiters are use for in-paragraph separation of bidi segments. This
+ * is useful for example in recipients fields of e-mail clients where bidi
+ * oddities can occur when mixing rtl and ltr.
+ *
+ * @param obj The given text object.
+ * @return A null terminated string of delimiters, e.g ",|". If empty, returns NULL.
+ * @since 1.1.0
+ */
+EAPI const char       *evas_object_text_bidi_delimiters_get(const Evas_Object *obj);
+
+/**
+ * Retrieves the text currently being displayed by the given evas text object.
+ * @param  obj The given evas text object.
+ * @return The text currently being displayed.  Do not free it.
+ */
+EAPI const char       *evas_object_text_text_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) 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;
+
+/**
+ * Retrieve position and dimension information of a character within a text @c Evas_Object.
+ *
+ * This function is used to obtain the X, Y, width and height of a the character
+ * located at @p pos within the @c Evas_Object @p obj. @p obj must be a text object
+ * as created with evas_object_text_add(). Any of the @c Evas_Coord parameters (@p cx,
+ * @p cy, @p cw, @p ch) may be NULL in which case no value will be assigned to that
+ * parameter.
+ *
+ * @param obj  The text object to retrieve position information for.
+ * @param pos  The character position to request co-ordinates for.
+ * @param cx   A pointer to an @c Evas_Coord to store the X value in (can be NULL).
+ * @param cy   A pointer to an @c Evas_Coord to store the Y value in (can be NULL).
+ * @param cw   A pointer to an @c Evas_Coord to store the Width value in (can be NULL).
+ * @param ch   A pointer to an @c Evas_Coord to store the Height value in (can be NULL).
+ *
+ * @returns EINA_FALSE on error, EINA_TRUE on success.
+ */
+EAPI Eina_Bool         evas_object_text_char_pos_get     (const Evas_Object *obj, int pos, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
+   EAPI int               evas_object_text_char_coords_get  (const Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
+
+/**
+ * Returns the logical position of the last char in the text
+ * up to the pos given. this is NOT the position of the last char
+ * because of the possibility of RTL in the text.
+ */
+EAPI int               evas_object_text_last_up_to_pos   (const Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
+   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 void              evas_object_text_style_set        (Evas_Object *obj, Evas_Text_Style_Type type) EINA_ARG_NONNULL(1);
+   EAPI void              evas_object_text_shadow_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
+   EAPI void              evas_object_text_shadow_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
+   EAPI void              evas_object_text_glow_color_set   (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
+   EAPI void              evas_object_text_glow_color_get   (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
+   EAPI void              evas_object_text_glow2_color_set  (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
+   EAPI void              evas_object_text_glow2_color_get  (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
+   EAPI void              evas_object_text_outline_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
+   EAPI void              evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
+
+/**
+ * Gets the text style pad of a text object.
+ *
+ * @param obj The given text object.
+ * @param l The left pad (or @c NULL).
+ * @param r The right pad (or @c NULL).
+ * @param t The top pad (or @c NULL).
+ * @param b The bottom pad (or @c NULL).
+ *
+ */
+EAPI void              evas_object_text_style_pad_get    (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the direction of the text currently being displayed in the
+ * text object.
+ * @param  obj The given evas text object.
+ * @return the direction of the text
+ */
+EAPI Evas_BiDi_Direction evas_object_text_direction_get  (const Evas_Object *obj) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
+
+/**
+ * @defgroup Evas_Object_Textblock Textblock Object Functions
+ *
+ * Functions used to create and manipulate textblock objects. Unlike
+ * @ref Evas_Object_Text, these handle complex text, doing multiple
+ * styles and multiline text based on HTML-like tags. Of these extra
+ * features will be heavier on memory and processing cost.
+ *
+ * @todo put here some usage examples
+ *
+ * @ingroup Evas_Object_Specific
+ */
+
+/**
+ * @section Evas_Object_Textblock_Tutorial Textblock Object Tutorial
+ *
+ * This part explains about the textblock object's API and proper usage.
+ * If you want to develop textblock, you should also refer to @ref Evas_Object_Textblock_Internal.
+ * The main user of the textblock object is the edje entry object in Edje, so
+ * that's a good place to learn from, but I think this document is more than
+ * enough, if it's not, please request for me info and I'll update it.
+ *
+ * @subsection textblock_intro Introduction
+ * The textblock objects is, as implied, an object that can show big chunks of
+ * text. Textblock supports many features including: Text formatting, automatic
+ * and manual text alignment, embedding items (for example icons) and more.
+ * Textblock has three important parts, the text paragraphs, the format nodes
+ * and the cursors.
+ *
+ * @subsection textblock_cursors Textblock Object Cursors
+ * A textblock Cursor @ref Evas_Textblock_Cursor is data type that represents
+ * a position in a textblock. Each cursor contains information about the
+ * paragraph it points to, the position in that paragraph and the object itself.
+ * Cursors register to textblock objects upon creation, this means that once
+ * you created a cursor, it belongs to a specific obj and you can't for example
+ * copy a cursor "into" a cursor of a different object. Registered cursors
+ * also have the added benefit of updating automatically upon textblock changes,
+ * this means that if you have a cursor pointing to a specific character, it'll
+ * still point to it even after you change the whole object completely (as long
+ * as the char was not deleted), this is not possible without updating, because
+ * as mentioned, each cursor holds a character position. There are many
+ * functions that handle cursors, just check out the evas_textblock_cursor*
+ * functions. For creation and deletion of cursors check out:
+ * @see evas_object_textblock_cursor_new()
+ * @see evas_textblock_cursor_free()
+ * @note Cursors are generally the correct way to handle text in the textblock object, and there are enough functions to do everything you need with them (no need to get big chunks of text and processing them yourself).
+ *
+ * @subsection textblock_paragraphs Textblock Object Paragraphs
+ * The textblock object is made out of text splitted to paragraphs (delimited
+ * by the paragraph separation character). Each paragraph has many (or none)
+ * format nodes associated with it which are responsible for the formatting
+ * of that paragraph.
+ *
+ * @subsection textblock_format_nodes Textblock Object Format Nodes
+ * As explained in @ref textblock_paragraphs each one of the format nodes
+ * is associated with a paragraph.
+ * There are two types of format nodes, visible and invisible:
+ * Visible: formats that a cursor can point to, i.e formats that
+ * occupy space, for example: newlines, tabs, items and etc. Some visible items
+ * are made of two parts, in this case, only the opening tag is visible.
+ * A closing tag (i.e a </tag> tag) should NEVER be visible.
+ * Invisible: formats that don't occupy space, for example: bold and underline.
+ * Being able to access format nodes is very important for some uses. For
+ * example, edje uses the "<a>" format to create links in the text (and pop
+ * popups above them when clicked). For the textblock object a is just a
+ * formatting instruction (how to color the text), but edje utilizes the access
+ * to the format nodes to make it do more.
+ * For more information, take a look at all the evas_textblock_node_format_*
+ * functions.
+ * The translation of "<tag>" tags to actual format is done according to the
+ * tags defined in the style, see @ref evas_textblock_style_set
+ *
+ * @subsection textblock_special_formats Special Formats
+ * This section is not yet written. If you want some info about styles/formats
+ * and how to use them, expedite's textblock_basic test is a great start.
+ * @todo Write @textblock_special_formats
+ */
+   typedef struct _Evas_Textblock_Style                 Evas_Textblock_Style;
+   typedef struct _Evas_Textblock_Cursor                Evas_Textblock_Cursor;
+   /**
+    * @typedef Evas_Object_Textblock_Node_Format
+    * A format node.
+    */
+   typedef struct _Evas_Object_Textblock_Node_Format    Evas_Object_Textblock_Node_Format;
+   typedef struct _Evas_Textblock_Rectangle             Evas_Textblock_Rectangle;
+
+   struct _Evas_Textblock_Rectangle
+     {
+       Evas_Coord x, y, w, h;
+     };
+
+   typedef enum _Evas_Textblock_Text_Type
+     {
+       EVAS_TEXTBLOCK_TEXT_RAW,
+       EVAS_TEXTBLOCK_TEXT_PLAIN,
+       EVAS_TEXTBLOCK_TEXT_MARKUP
+     } Evas_Textblock_Text_Type;
+
+   typedef enum _Evas_Textblock_Cursor_Type
+     {
+       EVAS_TEXTBLOCK_CURSOR_UNDER,
+       EVAS_TEXTBLOCK_CURSOR_BEFORE
+     } Evas_Textblock_Cursor_Type;
+
+
+/**
+ * Adds a textblock to the given evas.
+ * @param   e The given evas.
+ * @return  The new textblock object.
+ */
+EAPI Evas_Object                 *evas_object_textblock_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+
+
+/**
+ * Returns the unescaped version of escape.
+ * @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;
+
+/**
+ * Returns the escaped version of the string.
+ * @param string to escape
+ * @param len_ret the len of the new escape
+ * @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;
+
+/**
+ * Return the unescaped version of the string between start and end.
+ *
+ * @param escape_start the start of the string.
+ * @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;
+
+
+/**
+ * Creates a new textblock style.
+ * @return  The new textblock style.
+ */
+EAPI Evas_Textblock_Style        *evas_textblock_style_new(void) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
+
+/**
+ * Destroys a textblock style.
+ * @param ts The textblock style to free.
+ */
+EAPI void                         evas_textblock_style_free(Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1);
+
+/**
+ * Sets the style ts to the style passed as text by text.
+ * Expected a string consisting of many (or none) tag='format' pairs.
+ *
+ * @param ts  the style to set.
+ * @param text the text to parse - NOT NULL.
+ * @return Returns no value.
+ */
+EAPI void                         evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) EINA_ARG_NONNULL(1);
+
+/**
+ * Return the text of the style ts.
+ * @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;
+
+
+/**
+ * Set the objects style to ts.
+ * @param obj the evas object to set the style to.
+ * @param ts  the style to set.
+ * @return Returns no value.
+ */
+EAPI void                         evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1);
+
+/**
+ * Return the style of an object.
+ * @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;
+
+/**
+ * @brief Set the "replacement character" to use for the given textblock object.
+ *
+ * @param obj The given textblock object.
+ * @param ch The charset name.
+ */
+EAPI void                         evas_object_textblock_replace_char_set(Evas_Object *obj, const char *ch) EINA_ARG_NONNULL(1);
+
+/**
+ * @brief Get the "replacement character" for given textblock object. Returns
+ * NULL if no replacement character is in use.
+ *
+ * @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;
+
+/**
+ * @brief Sets the vertical alignment of text within the textblock object
+ * as a whole.
+ *
+ * Normally alignment is 0.0 (top of object). Values given should be
+ * between 0.0 and 1.0 (1.0 bottom of object, 0.5 being vertically centered
+ * etc.).
+ *
+ * @param obj The given textblock object.
+ * @param align A value between 0.0 and 1.0
+ * @since 1.1.0
+ */
+EAPI void                         evas_object_textblock_valign_set(Evas_Object *obj, double align);
+
+/**
+ * @brief Gets the vertical alignment of a textblock
+ *
+ * @param obj The given textblock object.
+ * @return The elignment set for the object
+ * @since 1.1.0
+ */
+EAPI double                       evas_object_textblock_valign_get(const Evas_Object *obj);
+
+/**
+ * @brief Sets the BiDi delimiters used in the textblock.
+ *
+ * BiDi delimiters are use for in-paragraph separation of bidi segments. This
+ * is useful for example in recipients fields of e-mail clients where bidi
+ * oddities can occur when mixing rtl and ltr.
+ *
+ * @param obj The given textblock object.
+ * @param delim A null terminated string of delimiters, e.g ",|".
+ * @since 1.1.0
+ */
+EAPI void                         evas_object_textblock_bidi_delimiters_set(Evas_Object *obj, const char *delim);
+
+/**
+ * @brief Gets the BiDi delimiters used in the textblock.
+ *
+ * BiDi delimiters are use for in-paragraph separation of bidi segments. This
+ * is useful for example in recipients fields of e-mail clients where bidi
+ * oddities can occur when mixing rtl and ltr.
+ *
+ * @param obj The given textblock object.
+ * @return A null terminated string of delimiters, e.g ",|". If empty, returns NULL.
+ * @since 1.1.0
+ */
+EAPI const char                  *evas_object_textblock_bidi_delimiters_get(const Evas_Object *obj);
+
+/**
+ * @brief Sets newline mode. When true, newline character will behave
+ * as a paragraph separator.
+ *
+ * @param obj The given textblock object.
+ * @param mode EINA_TRUE for PS mode, EINA_FALSE otherwise.
+ * @since 1.1.0
+ */
+EAPI void                         evas_object_textblock_newline_mode_set(Evas_Object *obj, Eina_Bool mode) EINA_ARG_NONNULL(1);
+
+/**
+ * @brief Gets newline mode. When true, newline character behaves
+ * as a paragraph separator.
+ *
+ * @param obj The given textblock object.
+ * @return EINA_TRUE if in PS mode, EINA_FALSE otherwise.
+ * @since 1.1.0
+ */
+EAPI Eina_Bool                    evas_object_textblock_newline_mode_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+
+/**
+ * Sets the tetxblock's text to the markup text.
+ *
+ * @note assumes text does not include the unicode object replacement char (0xFFFC)
+ *
+ * @param obj  the textblock object.
+ * @param text the markup text to use.
+ * @return Return no value.
+ */
+EAPI void                         evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
+
+/**
+ * Prepends markup to the cursor cur.
+ *
+ * @note assumes text does not include the unicode object replacement char (0xFFFC)
+ *
+ * @param cur  the cursor to prepend to.
+ * @param text the markup text to prepend.
+ * @return Return no value.
+ */
+EAPI void                         evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Return the markup of the object.
+ *
+ * @param obj the evas object.
+ * @return the markup text of the object.
+ */
+EAPI const char                  *evas_object_textblock_text_markup_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+
+/**
+ * Return the object's main cursor.
+ *
+ * @param obj the object.
+ * @return the obj's main cursor.
+ */
+EAPI const Evas_Textblock_Cursor *evas_object_textblock_cursor_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * Create a new cursor, associate it to the obj and init it to point
+ * to the start of the textblock. Association to the object means the cursor
+ * will be updated when the object will change.
+ *
+ * @note if you need speed and you know what you are doing, it's slightly faster to just allocate the cursor yourself and not associate it. (only people developing the actual object, and not users of the object).
+ *
+ * @param obj the object to associate to.
+ * @return the new cursor.
+ */
+EAPI Evas_Textblock_Cursor       *evas_object_textblock_cursor_new(Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+
+
+/**
+ * Free the cursor and unassociate it from the object.
+ * @note do not use it to free unassociated cursors.
+ *
+ * @param cur the cursor to free.
+ * @return Returns no value.
+ */
+EAPI void                         evas_textblock_cursor_free(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+
+
+/**
+ * Sets the cursor to the start of the first text node.
+ *
+ * @param cur the cursor to update.
+ * @return Returns no value.
+ */
+EAPI void                         evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+
+/**
+ * sets the cursor to the end of the last text node.
+ *
+ * @param cur the cursor to set.
+ * @return Returns no value.
+ */
+EAPI void                         evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+
+/**
+ * Advances to the the start of the next text node
+ *
+ * @param cur the cursor to update
+ * @return #EINA_TRUE if it managed to advance a paragraph, #EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool                    evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+
+/**
+ * Advances to the the end of the previous text node
+ *
+ * @param cur the cursor to update
+ * @return #EINA_TRUE if it managed to advance a paragraph, #EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool                    evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+
+/**
+ * Returns the
+ *
+ * @param obj The evas, must not be NULL.
+ * @param anchor the anchor name to get
+ * @return Returns the list format node corresponding to the anchor, may be null if there are none.
+ */
+EAPI const Eina_List             *evas_textblock_node_format_list_get(const Evas_Object *obj, const char *anchor) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Returns the first format node.
+ *
+ * @param obj The evas, must not be NULL.
+ * @return Returns the first format node, may be null if there are none.
+ */
+EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_first_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+/**
+ * Returns the last format node.
+ *
+ * @param obj The evas textblock, must not be NULL.
+ * @return Returns the first format node, may be null if there are none.
+ */
+EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_last_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+/**
+ * Returns the next format node (after n)
+ *
+ * @param n the current format node - not null.
+ * @return Returns the next format node, may be null.
+ */
+EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_next_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1);
+
+/**
+ * Returns the prev format node (after n)
+ *
+ * @param n the current format node - not null.
+ * @return Returns the prev format node, may be null.
+ */
+EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_prev_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1);
+
+/**
+ * Remove a format node and it's match. i.e, removes a <tag> </tag> pair.
+ * Assumes the node is the first part of <tag> i.e, this won't work if
+ * n is a closing tag.
+ *
+ * @param obj the evas object of the textblock - not null.
+ * @param n the current format node - not null.
+ */
+EAPI void                         evas_textblock_node_format_remove_pair(Evas_Object *obj, Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Sets the cursor to point to the place where format points to.
+ *
+ * @param cur the cursor to update.
+ * @param n the format node to update according.
+ */
+EAPI void                         evas_textblock_cursor_set_at_format(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Return the format node at the position pointed by cur.
+ *
+ * @param cur the position to look at.
+ * @return the format node if found, NULL otherwise.
+ * @see evas_textblock_cursor_format_is_visible_get()
+ */
+EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+
+/**
+ * Get the text format representation of the format node.
+ *
+ * @param fmt the format node.
+ * @return the textual format of the format node.
+ */
+EAPI const char                  *evas_textblock_node_format_text_get(const Evas_Object_Textblock_Node_Format *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+
+/**
+ * Set the cursor to point to the position of fmt.
+ *
+ * @param cur the cursor to update
+ * @param fmt the format to update according to.
+ */
+EAPI void                         evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *fmt) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Check if the current cursor position is a visible format. This way is more
+ * efficient than evas_textblock_cursor_format_get() to check for the existence
+ * of a visible format.
+ *
+ * @param cur the cursor to look at.
+ * @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;
+
+/**
+ * Advances to the next format node
+ *
+ * @param cur the cursor to be updated.
+ * @return #EINA_TRUE on success #EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool                    evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+
+/**
+ * Advances to the previous format node.
+ *
+ * @param cur the cursor to update.
+ * @return #EINA_TRUE on success #EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool                    evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+
+/**
+ * Returns true if the cursor points to a format.
+ *
+ * @param cur the cursor to check.
+ * @return Returns #EINA_TRUE if a cursor points to a format #EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool                    evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+
+/**
+ * Advances 1 char forward.
+ *
+ * @param cur the cursor to advance.
+ * @return #EINA_TRUE on success #EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool                    evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+
+/**
+ * Advances 1 char backward.
+ *
+ * @param cur the cursor to advance.
+ * @return #EINA_TRUE on success #EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool                    evas_textblock_cursor_char_prev(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.
+ * @return Returns no value.
+ */
+EAPI void                         evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+
+/**
+ * Go to the last char in a text node.
+ *
+ * @param cur the cursor to update.
+ * @return Returns no value.
+ */
+EAPI void                         evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+
+/**
+ * Go to the start of the current line
+ *
+ * @param cur the cursor to update.
+ * @return Returns no value.
+ */
+EAPI void                         evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+
+/**
+ * Go to the end of the current line.
+ *
+ * @param cur the cursor to update.
+ * @return Returns no value.
+ */
+EAPI void                         evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+
+/**
+ * Return the current cursor pos.
+ *
+ * @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;
+
+/**
+ * Set the cursor pos.
+ *
+ * @param cur the cursor to be set.
+ * @param pos the pos to set.
+ */
+EAPI void                         evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int pos) EINA_ARG_NONNULL(1);
+
+/**
+ * Go to the start of the line passed
+ *
+ * @param cur cursor to update.
+ * @param line numer to set.
+ * @return #EINA_TRUE on success, #EINA_FALSE on error.
+ */
+EAPI Eina_Bool                    evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line) EINA_ARG_NONNULL(1);
+
+/**
+ * Compare two cursors.
+ *
+ * @param cur1 the first cursor.
+ * @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;
+
+/**
+ * Make cur_dest point to the same place as cur. Does not work if they don't
+ * point to the same object.
+ *
+ * @param cur the source cursor.
+ * @param cur_dest destination cursor.
+ * @return Returns no value.
+ */
+EAPI void                         evas_textblock_cursor_copy(const Evas_Textblock_Cursor *cur, Evas_Textblock_Cursor *cur_dest) EINA_ARG_NONNULL(1, 2);
+
+
+/**
+ * Adds text to the current cursor position and set the cursor to *before*
+ * the start of the text just added.
+ *
+ * @param cur the cursor to where to add text at.
+ * @param _text the text to add.
+ * @return Returns the len of the text added.
+ * @see evas_textblock_cursor_text_prepend()
+ */
+EAPI int                          evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Adds text to the current cursor position and set the cursor to *after*
+ * the start of the text just added.
+ *
+ * @param cur the cursor to where to add text at.
+ * @param _text the text to add.
+ * @return Returns the len of the text added.
+ * @see evas_textblock_cursor_text_append()
+ */
+EAPI int                          evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
+
+
+/**
+ * Adds format to the current cursor position. If the format being added is a
+ * visible format, add it *before* the cursor position, otherwise, add it after.
+ * This behavior is because visible formats are like characters and invisible
+ * should be stacked in a way that the last one is added last.
+ *
+ * This function works with native formats, that means that style defined
+ * tags like <br> won't work here. For those kind of things use markup prepend.
+ *
+ * @param cur the cursor to where to add format at.
+ * @param format the format to add.
+ * @return Returns true if a visible format was added, false otherwise.
+ * @see evas_textblock_cursor_format_prepend()
+ */
+
+/**
+ * Check if the current cursor position points to the terminating null of the
+ * last paragraph. (shouldn't be allowed to point to the terminating null of
+ * any previous paragraph anyway.
+ *
+ * @param cur the cursor to look at.
+ * @return #EINA_TRUE if the cursor points to the terminating null, #EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool                    evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Adds format to the current cursor position. If the format being added is a
+ * visible format, add it *before* the cursor position, otherwise, add it after.
+ * This behavior is because visible formats are like characters and invisible
+ * should be stacked in a way that the last one is added last.
+ * If the format is visible the cursor is advanced after it.
+ *
+ * This function works with native formats, that means that style defined
+ * tags like <br> won't work here. For those kind of things use markup prepend.
+ *
+ * @param cur the cursor to where to add format at.
+ * @param format the format to add.
+ * @return Returns true if a visible format was added, false otherwise.
+ * @see evas_textblock_cursor_format_prepend()
+ */
+EAPI Eina_Bool                    evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Delete the character at the location of the cursor. If there's a format
+ * pointing to this position, delete it as well.
+ *
+ * @param cur the cursor pointing to the current location.
+ * @return Returns no value.
+ */
+EAPI void                         evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+
+/**
+ * Delete the range between cur1 and cur2.
+ *
+ * @param cur1 one side of the range.
+ * @param cur2 the second side of the range
+ * @return Returns no value.
+ */
+EAPI void                         evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_Cursor *cur2) EINA_ARG_NONNULL(1, 2);
+
+
+/**
+ * Return the text of the paragraph cur points to - returns the text in markup..
+ *
+ * @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;
+
+/**
+ * Return the length of the paragraph, cheaper the eina_unicode_strlen()
+ *
+ * @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;
+
+/**
+ * Return the text in the range between cur1 and cur2
+ *
+ * FIXME: format is currently unused, you always get markup back.
+ *
+ * @param cur1 one side of the range.
+ * @param cur2 the other side of the range
+ * @param format to be documented
+ * @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;
+
+/**
+ * Return the content of the cursor.
+ *
+ * @param cur the cursor
+ * @return the text in the range
+ */
+EAPI char                        *evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+
+
+/**
+ * Returns the geometry of the cursor. Depends on the type of cursor requested.
+ * This should be used instead of char_geometry_get because there are weird
+ * special cases with BiDi text.
+ * in '_' cursor mode (i.e a line below the char) it's the same as char_geometry
+ * get, except for the case of the last char of a line which depends on the
+ * paragraph direction.
+ *
+ * in '|' cursor mode (i.e a line between two chars) it is very varyable.
+ * For example consider the following visual string:
+ * "abcCBA" (ABC are rtl chars), a cursor pointing on A should actually draw
+ * a '|' between the c and the C.
+ *
+ * @param cur the cursor.
+ * @param cx the x of the cursor
+ * @param cy the y of the cursor
+ * @param cw the width of the cursor
+ * @param ch the height of the cursor
+ * @param dir the direction of the cursor, can be NULL.
+ * @param ctype the type of the cursor.
+ * @return line number of the char on success, -1 on error.
+ */
+EAPI int                          evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_BiDi_Direction *dir, Evas_Textblock_Cursor_Type ctype) EINA_ARG_NONNULL(1);
+
+/**
+ * Returns the geometry of the char at cur.
+ *
+ * @param cur the position of the char.
+ * @param cx the x of the char.
+ * @param cy the y of the char.
+ * @param cw the w of the char.
+ * @param ch the h of the char.
+ * @return line number of the char on success, -1 on error.
+ */
+EAPI int                          evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
+
+/**
+ * Returns the geometry of the pen at cur.
+ *
+ * @param cur the position of the char.
+ * @param cpen_x the pen_x of the char.
+ * @param cy the y of the char.
+ * @param cadv the adv of the char.
+ * @param ch the h of the char.
+ * @return line number of the char on success, -1 on error.
+ */
+EAPI int                          evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cpen_x, Evas_Coord *cy, Evas_Coord *cadv, Evas_Coord *ch) EINA_ARG_NONNULL(1);
+
+/**
+ * Returns the geometry of the line at cur.
+ *
+ * @param cur the position of the line.
+ * @param cx the x of the line.
+ * @param cy the y of the line.
+ * @param cw the width of the line.
+ * @param ch the height of the line.
+ * @return line number of the line on success, -1 on error.
+ */
+EAPI int                          evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
+
+/**
+ * Set the position of the cursor according to the X and Y coordinates.
+ *
+ * @param cur the cursor to set.
+ * @param x coord to set by.
+ * @param y coord to set by.
+ * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool                    evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
+
+/**
+ * Set the cursor position according to the y coord.
+ *
+ * @param cur the cur to be set.
+ * @param y the coord to set by.
+ * @return the line number found, -1 on error.
+ */
+EAPI int                          evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y) EINA_ARG_NONNULL(1);
+
+/**
+ * Get the geometry of a range.
+ *
+ * @param cur1 one side of the range.
+ * @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_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);
+
+
+/**
+ * Checks if the cursor points to the end of the line.
+ *
+ * @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;
+
+
+/**
+ * Get the geometry of a line number.
+ *
+ * @param obj the object.
+ * @param line the line number.
+ * @param cx x coord of the line.
+ * @param cy y coord of the line.
+ * @param cw w coord of the line.
+ * @param ch h coord of the line.
+ * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool                    evas_object_textblock_line_number_geometry_get(const Evas_Object *obj, int line, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
+
+/**
+ * Clear the textblock object.
+ * @note Does *NOT* free the evas object itself.
+ *
+ * @param obj the object to clear.
+ * @return nothing.
+ */
+EAPI void                         evas_object_textblock_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+/**
+ * Get the formatted width and height. This calculates the actual size after restricting
+ * the textblock to the current size of the object.
+ * The main difference between this and @ref evas_object_textblock_size_native_get
+ * is that the "native" function does not wrapping into account
+ * it just calculates the real width of the object if it was placed on an
+ * infinite canvas, while this function gives the size after wrapping
+ * according to the size restrictions of the object.
+ *
+ * For example for a textblock containing the text: "You shall not pass!"
+ * with no margins or padding and assuming a monospace font and a size of
+ * 7x10 char widths (for simplicity) has a native size of 19x1
+ * and a formatted size of 5x4.
+ *
+ *
+ * @param obj the evas object.
+ * @param w[out] the width of the object.
+ * @param h[out] the height of the object
+ * @return Returns no value.
+ * @see evas_object_textblock_size_native_get
+ */
+EAPI void                         evas_object_textblock_size_formatted_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
+
+/**
+ * Get the native width and height. This calculates the actual size without taking account
+ * the current size of the object.
+ * The main difference between this and @ref evas_object_textblock_size_formatted_get
+ * is that the "native" function does not take wrapping into account
+ * it just calculates the real width of the object if it was placed on an
+ * infinite canvas, while the "formatted" function gives the size after
+ * wrapping text according to the size restrictions of the object.
+ *
+ * For example for a textblock containing the text: "You shall not pass!"
+ * with no margins or padding and assuming a monospace font and a size of
+ * 7x10 char widths (for simplicity) has a native size of 19x1
+ * and a formatted size of 5x4.
+ *
+ * @param obj the evas object of the textblock
+ * @param w[out] the width returned
+ * @param h[out] the height returned
+ * @return Returns no value.
+ */
+EAPI void                         evas_object_textblock_size_native_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
+   EAPI void                         evas_object_textblock_style_insets_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) EINA_ARG_NONNULL(1);
+
+/**
+ * @defgroup Evas_Line_Group Line Object Functions
+ *
+ * Functions used to deal with evas line objects.
+ *
+ * @ingroup Evas_Object_Specific
+ */
+
+/**
+ * Adds a new evas line object to the given evas.
+ * @param   e The given evas.
+ * @return  The new evas line object.
+ */
+EAPI Evas_Object      *evas_object_line_add              (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+
+/**
+ * Sets the coordinates of the end points of the given evas line object.
+ * @param   obj The given evas line object.
+ * @param   x1  The X coordinate of the first point.
+ * @param   y1  The Y coordinate of the first point.
+ * @param   x2  The X coordinate of the second point.
+ * @param   y2  The Y coordinate of the second point.
+ */
+EAPI void              evas_object_line_xy_set           (Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2);
+
+/**
+ * Retrieves the coordinates of the end points of the given evas line object.
+ * @param obj The given line object.
+ * @param x1  Pointer to an integer in which to store the X coordinate of the
+ *            first end point.
+ * @param y1  Pointer to an integer in which to store the Y coordinate of the
+ *            first end point.
+ * @param x2  Pointer to an integer in which to store the X coordinate of the
+ *            second end point.
+ * @param y2  Pointer to an integer in which to store the Y coordinate of the
+ *            second end point.
+ */
+EAPI void              evas_object_line_xy_get           (const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2);
+
+/**
+ * @defgroup Evas_Object_Polygon Polygon Object Functions
+ *
+ * Functions that operate on evas polygon objects.
+ *
+ * Hint: as evas does not provide ellipse, smooth paths or circle, one
+ * can calculate points and convert these to a polygon.
+ *
+ * @ingroup Evas_Object_Specific
+ */
+
+/**
+ * Adds a new evas polygon object to the given evas.
+ * @param   e The given evas.
+ * @return  A new evas polygon object.
+ */
+EAPI Evas_Object      *evas_object_polygon_add           (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+
+/**
+ * Adds the given point to the given evas polygon object.
+ * @param obj The given evas polygon object.
+ * @param x   The X coordinate of the given point.
+ * @param y   The Y coordinate of the given point.
+ * @ingroup Evas_Polygon_Group
+ */
+EAPI void              evas_object_polygon_point_add     (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
+
+/**
+ * Removes all of the points from the given evas polygon object.
+ * @param   obj The given polygon object.
+ */
+EAPI void              evas_object_polygon_points_clear  (Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+/**
+ * @defgroup Evas_Smart_Group Smart Functions
+ *
+ * Functions that deal with Evas_Smart's, creating definition
+ * (classes) of objects that will have customized behavior for methods
+ * like evas_object_move(), evas_object_resize(),
+ * evas_object_clip_set() and others.
+ *
+ * These objects will accept the generic methods defined in @ref
+ * Evas_Object_Group and the extensions defined in @ref
+ * Evas_Smart_Object_Group. There are couple of existent smart objects
+ * in Evas itself, see @ref Evas_Object_Box, @ref Evas_Object_Table
+ * and @ref Evas_Smart_Object_Clipped.
+ */
+
+/**
+ * @def EVAS_SMART_CLASS_VERSION
+ * The version you have to put into the version field in the smart
+ * class struct
+ * @ingroup Evas_Smart_Group
+ */
+#define EVAS_SMART_CLASS_VERSION 4
+/**
+ * @struct _Evas_Smart_Class
+ * a smart object class
+ * @ingroup Evas_Smart_Group
+ */
+struct _Evas_Smart_Class
+{
+   const char *name; /**< the string name of the class */
+   int         version;
+   void  (*add)         (Evas_Object *o);
+   void  (*del)         (Evas_Object *o);
+   void  (*move)        (Evas_Object *o, Evas_Coord x, Evas_Coord y);
+   void  (*resize)      (Evas_Object *o, Evas_Coord w, Evas_Coord h);
+   void  (*show)        (Evas_Object *o);
+   void  (*hide)        (Evas_Object *o);
+   void  (*color_set)   (Evas_Object *o, int r, int g, int b, int a);
+   void  (*clip_set)    (Evas_Object *o, Evas_Object *clip);
+   void  (*clip_unset)  (Evas_Object *o);
+   void  (*calculate)   (Evas_Object *o);
+   void  (*member_add)  (Evas_Object *o, Evas_Object *child);
+   void  (*member_del)  (Evas_Object *o, Evas_Object *child);
+
+   const Evas_Smart_Class          *parent; /**< this class inherits from this parent */
+   const Evas_Smart_Cb_Description *callbacks; /**< callbacks at this level, NULL terminated */
+   void                            *interfaces; /**< to be used in a future near you */
+   const void                      *data;
+};
+
+/**
+ * @struct _Evas_Smart_Cb_Description
+ *
+ * Describes a callback used by a smart class
+ * evas_object_smart_callback_call(), particularly useful to explain
+ * to user and its code (ie: introspection) what the parameter @c
+ * event_info will contain.
+ *
+ * @ingroup Evas_Smart_Group
+ */
+struct _Evas_Smart_Cb_Description
+{
+   const char *name; /**< callback name, ie: "changed" */
+
+   /**
+    * @brief Hint type of @c event_info parameter of Evas_Smart_Cb.
+    *
+    * The type string uses the pattern similar to
+    *
+    * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures
+    *
+    * but extended to optionally include variable names within
+    * brackets preceding types. Example:
+    *
+    * @li Structure with two integers:
+    *     @c "(ii)"
+    *
+    * @li Structure called 'x' with two integers named 'a' and 'b':
+    *     @c "[x]([a]i[b]i)"
+    *
+    * @li Array of integers:
+    *     @c "ai"
+    *
+    * @li Array called 'x' of struct with two integers:
+    *     @c "[x]a(ii)"
+    *
+    * @note This type string is used as a hint and is @b not validated
+    *       or enforced anyhow. Implementors should make the best use
+    *       of it to help bindings, documentation and other users of
+    *       introspection features.
+    */
+   const char *type;
+};
+
+/**
+ * @def EVAS_SMART_CLASS_INIT_NULL
+ * Initializer to zero a whole Evas_Smart_Class structure.
+ *
+ * @see EVAS_SMART_CLASS_INIT_VERSION
+ * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
+ * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
+ * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
+ * @ingroup Evas_Smart_Group
+ */
+#define EVAS_SMART_CLASS_INIT_NULL {NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
+
+/**
+ * @def EVAS_SMART_CLASS_INIT_VERSION
+ * Initializer to zero a whole Evas_Smart_Class structure and set version.
+ *
+ * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
+ * latest EVAS_SMART_CLASS_VERSION.
+ *
+ * @see EVAS_SMART_CLASS_INIT_NULL
+ * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
+ * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
+ * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
+ * @ingroup Evas_Smart_Group
+ */
+#define EVAS_SMART_CLASS_INIT_VERSION {NULL, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
+
+/**
+ * @def EVAS_SMART_CLASS_INIT_NAME_VERSION
+ * Initializer to zero a whole Evas_Smart_Class structure and set name
+ * and version.
+ *
+ * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
+ * latest EVAS_SMART_CLASS_VERSION and name to the specified value.
+ *
+ * It will keep a reference to name field as a "const char *", that is,
+ * name must be available while the structure is used (hint: static or global!)
+ * and will not be modified.
+ *
+ * @see EVAS_SMART_CLASS_INIT_NULL
+ * @see EVAS_SMART_CLASS_INIT_VERSION
+ * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
+ * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
+ * @ingroup Evas_Smart_Group
+ */
+#define EVAS_SMART_CLASS_INIT_NAME_VERSION(name) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
+
+/**
+ * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
+ * Initializer to zero a whole Evas_Smart_Class structure and set name,
+ * version and parent class.
+ *
+ * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
+ * latest EVAS_SMART_CLASS_VERSION, name to the specified value and
+ * parent class.
+ *
+ * It will keep a reference to name field as a "const char *", that is,
+ * name must be available while the structure is used (hint: static or global!)
+ * and will not be modified. Similarly, parent reference will be kept.
+ *
+ * @see EVAS_SMART_CLASS_INIT_NULL
+ * @see EVAS_SMART_CLASS_INIT_VERSION
+ * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
+ * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
+ * @ingroup Evas_Smart_Group
+ */
+#define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT(name, parent) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, NULL, NULL}
+
+/**
+ * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
+ * Initializer to zero a whole Evas_Smart_Class structure and set name,
+ * version, parent class and callbacks definition.
+ *
+ * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
+ * latest EVAS_SMART_CLASS_VERSION, name to the specified value, parent
+ * class and callbacks at this level.
+ *
+ * It will keep a reference to name field as a "const char *", that is,
+ * name must be available while the structure is used (hint: static or global!)
+ * and will not be modified. Similarly, parent and callbacks reference
+ * will be kept.
+ *
+ * @see EVAS_SMART_CLASS_INIT_NULL
+ * @see EVAS_SMART_CLASS_INIT_VERSION
+ * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
+ * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
+ * @ingroup Evas_Smart_Group
+ */
+#define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS(name, parent, callbacks) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, callbacks, NULL}
+
+/**
+ * @def EVAS_SMART_SUBCLASS_NEW
+ *
+ * Convenience macro to subclass a Smart Class.
+ *
+ * This macro saves some typing when writing a Smart Class derived from
+ * another one. In order to work, the user needs to provide some functions
+ * adhering to the following guidelines.
+ *  - @<prefix@>_smart_set_user(): the internal _smart_set function will call
+ *    this one provided by the user after inheriting everything from the
+ *    parent, which should take care of setting the right member functions
+ *    for the class.
+ *  - @<prefix@>_parent_sc: pointer to the smart class of the parent. When calling
+ *    parent functions from overloaded ones, use this global variable.
+ *  - @<prefix@>_smart_class_new(): this function returns the Evas_Smart needed
+ *    to create smart objects with this class, should be called by the public
+ *    _add() function.
+ *  - If this new class should be subclassable as well, a public _smart_set()
+ *    function is desirable to fill the class used as parent by the children.
+ *    It's up to the user to provide this interface, which will most likely
+ *    call @<prefix@>_smart_set() to get the job done.
+ *
+ * @param smart_name The name used for the Smart Class. e.g: "Evas_Object_Box".
+ * @param prefix Prefix used for all variables and functions defined.
+ * @param api_type Type of the structure used as API for the Smart Class. Either Evas_Smart_Class or something derived from it.
+ * @param parent_type Type of the parent class API.
+ * @param parent_func Function that gets the parent class. e.g: evas_object_box_smart_class_get().
+ * @param cb_desc Array of callback descriptions for this Smart Class.
+ *
+ * @ingroup Evas_Smart_Group
+ */
+#define EVAS_SMART_SUBCLASS_NEW(smart_name, prefix, api_type, parent_type, parent_func, cb_desc) \
+  static const parent_type * prefix##_parent_sc = NULL;                        \
+  static void prefix##_smart_set_user(api_type *api);                  \
+  static void prefix##_smart_set(api_type *api)                                \
+  {                                                                    \
+     Evas_Smart_Class *sc;                                             \
+     if (!(sc = (Evas_Smart_Class *)api))                              \
+       return;                                                         \
+     if (!prefix##_parent_sc)                                          \
+       prefix##_parent_sc = parent_func();                             \
+     evas_smart_class_inherit(sc, (const Evas_Smart_Class *)prefix##_parent_sc); \
+     prefix##_smart_set_user(api);                                     \
+  }                                                                    \
+  static Evas_Smart * prefix##_smart_class_new(void)                   \
+  {                                                                    \
+     static Evas_Smart *smart = NULL;                                  \
+     static api_type api;                                              \
+     if (!smart)                                                       \
+       {                                                               \
+         Evas_Smart_Class *sc = (Evas_Smart_Class *)&api;              \
+         memset(&api, 0, sizeof(api_type));                            \
+         sc->version = EVAS_SMART_CLASS_VERSION;                       \
+         sc->name = smart_name;                                        \
+         sc->callbacks = cb_desc;                                      \
+         prefix##_smart_set(&api);                                     \
+         smart = evas_smart_class_new(sc);                             \
+       }                                                               \
+     return smart;                                                     \
+  }
+
+/**
+ * @def EVAS_SMART_DATA_ALLOC
+ * Convenience macro to allocate smart data only if needed.
+ *
+ * When writing a subclassable smart object, the .add function will need
+ * to check if the smart private data was already allocated by some child
+ * object or not. This macro makes it easier to do it.
+ *
+ * @param o Evas object passed to the .add function
+ * @param priv_type The type of the data to allocate
+ * @ingroup Evas_Smart_Group
+ */
+#define EVAS_SMART_DATA_ALLOC(o, priv_type) \
+   priv_type *priv; \
+   priv = evas_object_smart_data_get(o); \
+   if (!priv) { \
+      priv = (priv_type *)calloc(1, sizeof(priv_type)); \
+      if (!priv) return; \
+      evas_object_smart_data_set(o, priv); \
+   }
+
+
+/**
+ * Free an Evas_Smart
+ *
+ * If this smart was created using evas_smart_class_new(), the associated
+ * Evas_Smart_Class will not be freed.
+ *
+ * @param s the Evas_Smart to free
+ *
+ */
+EAPI void                             evas_smart_free                     (Evas_Smart *s) EINA_ARG_NONNULL(1);
+
+/**
+ * Creates an Evas_Smart from an Evas_Smart_Class.
+ *
+ * @param sc the smart class definition
+ * @return an Evas_Smart
+ */
+EAPI Evas_Smart                      *evas_smart_class_new                (const Evas_Smart_Class *sc) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+
+/**
+ * Get the Evas_Smart_Class of an Evas_Smart
+ *
+ * @param s the Evas_Smart
+ * @return the Evas_Smart_Class
+ */
+EAPI const Evas_Smart_Class          *evas_smart_class_get                (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+
+/**
+ * @brief Get the data pointer set on an Evas_Smart.
+ *
+ * @param s Evas_Smart
+ *
+ * This data pointer is set either as the final parameter to
+ * evas_smart_new or 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;
+
+/**
+ * Get the callbacks known by this Evas_Smart.
+ *
+ * This is likely different from Evas_Smart_Class::callbacks as it
+ * will contain the callbacks of all class hierarchy sorted, while the
+ * direct smart class member refers only to that specific class and
+ * should not include parent's.
+ *
+ * If no callbacks are known, this function returns @c NULL.
+ *
+ * The array elements and thus their contents will be reference to
+ * original values given to evas_smart_new() as
+ * Evas_Smart_Class::callbacks.
+ *
+ * The array is sorted by name. The last array element is the @c NULL
+ * pointer and is not counted in @a count. Loop iterations can check
+ * any of these cases.
+ *
+ * @param s the Evas_Smart.
+ * @param count returns the number of elements in returned array.
+ * @return the array with callback descriptions known by this class,
+ *         its size is returned in @a count parameter. It should not
+ *         be modified anyhow. If no callbacks are known, @c NULL is
+ *         returned. The array is sorted by name and elements refer to
+ *         the original value given to evas_smart_new().
+ *
+ * @note objects may provide per-instance callbacks, use
+ *       evas_object_smart_callbacks_descriptions_get() to get those
+ *       as well.
+ * @see evas_object_smart_callbacks_descriptions_get()
+ */
+EAPI const Evas_Smart_Cb_Description **evas_smart_callbacks_descriptions_get(const Evas_Smart *s, unsigned int *count) EINA_ARG_NONNULL(1, 1);
+
+
+/**
+ * Find callback description for callback called @a name.
+ *
+ * @param s the Evas_Smart.
+ * @param name name of desired callback, must @b not be @c NULL.  The
+ *        search have a special case for @a name being the same
+ *        pointer as registered with Evas_Smart_Cb_Description, one
+ *        can use it to avoid excessive use of strcmp().
+ * @return reference to description if found, @c NULL if not found.
+ */
+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;
+
+
+/**
+ * Sets one class to inherit from the other.
+ *
+ * Copy all function pointers, set @c parent to @a parent_sc and copy
+ * everything after sizeof(Evas_Smart_Class) present in @a parent_sc,
+ * using @a parent_sc_size as reference.
+ *
+ * This is recommended instead of a single memcpy() since it will take
+ * care to not modify @a sc name, version, callbacks and possible
+ * other members.
+ *
+ * @param sc child class.
+ * @param parent_sc parent class, will provide attributes.
+ * @param parent_sc_size size of parent_sc structure, child should be at least
+ *        this size. Everything after @c Evas_Smart_Class size is copied
+ *        using regular memcpy().
+ */
+EAPI Eina_Bool                        evas_smart_class_inherit_full       (Evas_Smart_Class *sc, const Evas_Smart_Class *parent_sc, unsigned int parent_sc_size) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Get the number of users of the smart instance
+ * 
+ * @param s The Evas_Smart to get the usage count of
+ * @return The number of uses of the smart instance
+ * 
+ * This function tells you how many more uses of the smart instance are in
+ * existence. This should be used before freeing/clearing any of the
+ * Evas_Smart_Class that was used to create the smart instance. The smart
+ * instance will refer to data in the Evas_Smart_Class used to create it and
+ * thus you cannot remove the original data until all users of it are gone.
+ * When the usage count goes to 0, you can evas_smart_free() the smart
+ * instance @p s and remove from memory any of the Evas_Smart_Class that
+ * was used to create the smart instance, if you desire. Removing it from
+ * memory without doing this will cause problems (crashes, undefined
+ * behavior etc. etc.), so either never remove the original 
+ * Evas_Smart_Class data from memory (have it be a constant structure and
+ * data), or use this API call and be very careful.
+ */
+EAPI int                              evas_smart_usage_get(const Evas_Smart *s);
+         
+  /**
+   * @def evas_smart_class_inherit
+   * Easy to use version of evas_smart_class_inherit_full().
+   *
+   * This version will use sizeof(parent_sc), copying everything.
+   *
+   * @param sc child class, will have methods copied from @a parent_sc
+   * @param parent_sc parent class, will provide contents to be copied.
+   * @return 1 on success, 0 on failure.
+   * @ingroup Evas_Smart_Group
+   */
+#define evas_smart_class_inherit(sc, parent_sc) evas_smart_class_inherit_full(sc, parent_sc, sizeof(*parent_sc))
+
+/**
+ * @defgroup Evas_Smart_Object_Group Smart Object Functions
+ *
+ * Functions dealing with evas smart objects (instances).
+ *
+ * Smart objects are groupings of primitive evas objects that behave as a
+ * cohesive group. For instance, a file manager icon may be a smart object
+ * composed of an image object, a text label and two rectangles that appear
+ * behind the image and text when the icon is selected. As a smart object,
+ * the normal evas api could be used on the icon object.
+ *
+ * @see @ref Evas_Smart_Group for class definitions.
  */
-struct _Evas_Smart_Class
-{
-   const char *name; /**< the string name of the class */
-   int         version;
-   void  (*add)         (Evas_Object *o);
-   void  (*del)         (Evas_Object *o);
-   void  (*move)        (Evas_Object *o, Evas_Coord x, Evas_Coord y);
-   void  (*resize)      (Evas_Object *o, Evas_Coord w, Evas_Coord h);
-   void  (*show)        (Evas_Object *o);
-   void  (*hide)        (Evas_Object *o);
-   void  (*color_set)   (Evas_Object *o, int r, int g, int b, int a);
-   void  (*clip_set)    (Evas_Object *o, Evas_Object *clip);
-   void  (*clip_unset)  (Evas_Object *o);
-   void  (*calculate)   (Evas_Object *o);
-   void  (*member_add)  (Evas_Object *o, Evas_Object *child);
-   void  (*member_del)  (Evas_Object *o, Evas_Object *child);
 
-   const Evas_Smart_Class          *parent; /**< this class inherits from this parent */
-   const Evas_Smart_Cb_Description *callbacks; /**< callbacks at this level, NULL terminated */
-   void                            *interfaces; /**< to be used in a future near you */
-   const void                      *data;
-};
+/**
+ * Instantiates a new smart object described by @p s.
+ *
+ * @param e the evas on which to add the object
+ * @param s the Evas_Smart describing the smart object
+ * @return a new Evas_Object
+ * @ingroup Evas_Smart_Object_Group
+ */
+EAPI Evas_Object      *evas_object_smart_add             (Evas *e, Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_MALLOC;
+
+/**
+ * Set an evas object as a member of a smart object.
+ *
+ * @param obj The member object
+ * @param smart_obj The smart object
+ *
+ * Members will automatically be stacked and layered with the smart object.
+ * The various stacking function will operate on members relative to the
+ * other members instead of the entire canvas.
+ *
+ * Non-member objects can not interleave a smart object's members.
+ *
+ * @ingroup Evas_Smart_Object_Group
+ */
+EAPI void              evas_object_smart_member_add      (Evas_Object *obj, Evas_Object *smart_obj) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Removes a member object from a smart object.
+ *
+ * @param obj the member object
+ * @ingroup Evas_Smart_Object_Group
+ *
+ * This removes a member object from a smart object. The object will still
+ * be on the canvas, but no longer associated with whichever smart object
+ * it was associated with.
+ *
+ */
+EAPI void              evas_object_smart_member_del      (Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+/**
+ * Gets the smart parent of an Evas_Object
+ * @param obj the Evas_Object you want to get the parent
+ * @return Returns the smart parent of @a obj, or @c NULL if @a obj is not a smart member of another Evas_Object
+ * @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;
+
+/**
+ * Checks the Smart type of the object and its parents
+ * @param obj the Evas_Object to check the type of
+ * @param type the type to check for
+ * @return EINA_TRUE if @a obj or any of its parents if of type @a type, EINA_FALSE otherwise
+ * @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;
+
+/**
+ * Checks the Smart type of the object and its parents using pointer comparison
+ * @param obj the Evas_Object to check the type of
+ * @param type the type to check for. Must be the name pointer in the smart class used to create the object
+ * @return EINA_TRUE if @a obj or any of its parents if of type @a type, EINA_FALSE otherwise
+ * @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;
+
+/**
+ * Gets the list of the member objects of an Evas_Object
+ * @param obj the Evas_Object you want to get the list of member objects
+ * @return Returns the list of the member objects of @a obj.
+ * The returned list should be freed with eina_list_free() when you no longer need it
+ */
+EAPI Eina_List        *evas_object_smart_members_get     (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * Get the Evas_Smart from which @p obj was created.
+ *
+ * @param obj a smart object
+ * @return the Evas_Smart
+ * @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;
+
+/**
+ * Retrieve user data stored on a smart object.
+ *
+ * @param obj The smart object
+ * @return A pointer to data stored using evas_object_smart_data_set(), or
+ *         NULL if none has been set.
+ * @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;
+
+/**
+ * Store a pointer to user data for a smart object.
+ *
+ * @param obj The smart object
+ * @param data A pointer to user data
+ * @ingroup Evas_Smart_Object_Group
+ */
+EAPI void              evas_object_smart_data_set        (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1);
+
+/**
+ * Add a callback for the smart event specified by @p event.
+ *
+ * @param obj a smart object
+ * @param event the event name
+ * @param func the callback function
+ * @param data user data to be passed to the callback function
+ * @ingroup Evas_Smart_Object_Group
+ */
+EAPI void              evas_object_smart_callback_add    (Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1, 2, 3);
+
+/**
+ * Remove a smart callback
+ *
+ * Removes a callback that was added by evas_object_smart_callback_add()
+ *
+ * @param obj a smart object
+ * @param event the event name
+ * @param func the callback function
+ * @return the data pointer
+ * @ingroup Evas_Smart_Object_Group
+ */
+EAPI void             *evas_object_smart_callback_del    (Evas_Object *obj, const char *event, Evas_Smart_Cb func) EINA_ARG_NONNULL(1, 2, 3);
+
+/**
+ * Call any smart callbacks on @p obj for @p event.
+ *
+ * @param obj the smart object
+ * @param event the event name
+ * @param event_info an event specific struct of info to pass to the callback
+ *
+ * This should be called internally in the smart object when some specific
+ * event has occurred. The documentation for the smart object should include
+ * a list of possible events and what type of @p event_info to expect.
+ *
+ * @ingroup Evas_Smart_Object_Group
+ */
+EAPI void              evas_object_smart_callback_call   (Evas_Object *obj, const char *event, void *event_info) EINA_ARG_NONNULL(1, 2);
+
+
+/**
+ * Set smart object instance callbacks descriptions.
+ *
+ * These descriptions are hints to be used by introspection and are
+ * not enforced in any way.
+ *
+ * It will not be checked if instance callbacks descriptions have the
+ * same name as another in class. Both are kept in different arrays
+ * and users of evas_object_smart_callbacks_descriptions_get() should
+ * handle this case as they wish.
+ *
+ * @param obj The smart object
+ * @param descriptions NULL terminated (name != NULL) array with
+ *        descriptions.  Array elements will not be modified, but
+ *        reference to them and their contents will be made, so this
+ *        array should be kept alive during object lifetime.
+ * @return 1 on success, 0 on failure.
+ * @ingroup Evas_Smart_Object_Group
+ *
+ * @note while instance callbacks descriptions are possible, they are
+ *       not recommended. Use class callbacks descriptions instead as they
+ *       make user's life simpler and will use less memory as descriptions
+ *       and arrays will be shared among all instances.
+ */
+EAPI Eina_Bool         evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_Cb_Description *descriptions) EINA_ARG_NONNULL(1);
+
+/**
+ * Get the callbacks descriptions known by this smart object.
+ *
+ * This call retrieves processed callbacks descriptions for both
+ * instance and class. These arrays are sorted by description's name
+ * and are @c NULL terminated, so both @a class_count and
+ * @a instance_count can be ignored, the terminator @c NULL is not
+ * counted in these values.
+ *
+ * @param obj the smart object.
+ * @param class_descriptions where to store class callbacks
+ *        descriptions array, if any is known. If no descriptions are
+ *        known, @c NULL is returned. This parameter may be @c NULL if
+ *        it is not of interest.
+ * @param class_count returns how many class callbacks descriptions
+ *        are known.
+ * @param instance_descriptions where to store instance callbacks
+ *        descriptions array, if any is known. If no descriptions are
+ *        known, @c NULL is returned. This parameter may be @c NULL if
+ *        it is not of interest.
+ * @param instance_count returns how many instance callbacks
+ *        descriptions are known.
+ *
+ * @note if just class descriptions are of interest, try
+ *       evas_smart_callbacks_descriptions_get() instead.
+ *
+ * @see evas_smart_callbacks_descriptions_get()
+ * @ingroup Evas_Smart_Object_Group
+ */
+EAPI void              evas_object_smart_callbacks_descriptions_get(const Evas_Object *obj, const Evas_Smart_Cb_Description ***class_descriptions, unsigned int *class_count, const Evas_Smart_Cb_Description ***instance_descriptions, unsigned int *instance_count) EINA_ARG_NONNULL(1);
+
+/**
+ * Find callback description for callback called @a name.
+ *
+ * @param obj the smart object.
+ * @param name name of desired callback, must @b not be @c NULL.  The
+ *        search have a special case for @a name being the same
+ *        pointer as registered with Evas_Smart_Cb_Description, one
+ *        can use it to avoid excessive use of strcmp().
+ * @param class_description pointer to return class description or @c
+ *        NULL if not found. If parameter is @c NULL, no search will
+ *        be done on class descriptions.
+ * @param instance_description pointer to return instance description
+ *        or @c NULL if not found. If parameter is @c NULL, no search
+ *        will be done on instance descriptions.
+ * @return reference to description if found, @c NULL if not found.
+ */
+EAPI void              evas_object_smart_callback_description_find(const Evas_Object *obj, const char *name, const Evas_Smart_Cb_Description **class_description, const Evas_Smart_Cb_Description **instance_description) EINA_ARG_NONNULL(1, 2);
+
+
+/**
+ * Mark smart object as changed, dirty.
+ *
+ * This will inform the scene that it changed and needs to be redraw, also
+ * setting need_recalculate on the given object.
+ *
+ * @see evas_object_smart_need_recalculate_set().
+ *
+ * @ingroup Evas_Smart_Object_Group
+ */
+EAPI void              evas_object_smart_changed         (Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+/**
+ * Set the need_recalculate flag of given smart object.
+ *
+ * If this flag is set then calculate() callback (method) of the given
+ * smart object will be called, if one is provided, during render phase
+ * usually evas_render(). After this step, this flag will be automatically
+ * unset.
+ *
+ * If no calculate() is provided, this flag will be left unchanged.
+ *
+ * @note just setting this flag will not make scene dirty and evas_render()
+ *       will have no effect. To do that, use evas_object_smart_changed(),
+ *       that will automatically call this function with 1 as parameter.
+ *
+ * @param obj the smart object
+ * @param value if one want to set or unset the need_recalculate flag.
+ *
+ * @ingroup Evas_Smart_Object_Group
+ */
+EAPI void              evas_object_smart_need_recalculate_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
+
+/**
+ * Get the current value of need_recalculate flag.
+ *
+ * @note this flag will be unset during the render phase, after calculate()
+ *       is called if one is provided.  If no calculate() is provided, then
+ *       the flag will be left unchanged after render phase.
+ *
+ * @param obj the smart object
+ * @return if flag is set or not.
+ *
+ * @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;
+
+/**
+ * Call user provided calculate() and unset need_calculate.
+ *
+ * @param obj the smart object
+ *
+ * @ingroup Evas_Smart_Object_Group
+ */
+EAPI void              evas_object_smart_calculate       (Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+
+/**
+ * Call user provided calculate() and unset need_calculate on all objects.
+ *
+ * @param e The canvas to calculate all objects in
+ *
+ * @ingroup Evas_Smart_Object_Group
+ */
+EAPI void              evas_smart_objects_calculate      (Evas *e);
+
+/**
+ * @defgroup Evas_Smart_Object_Clipped Clipped Smart Object
+ *
+ * Clipped smart object is a base to construct other smart objects
+ * that based on the concept of having an internal clipper that is
+ * applied to all its other children. This clipper will control the
+ * visibility, clipping and color of sibling objects (remember that
+ * the clipping is recursive, and clipper color modulates the color of
+ * its clippees). By default, this base will also move children
+ * relatively to the parent, and delete them when parent is
+ * deleted. In other words, it is the base for simple object grouping.
+ *
+ * @see evas_object_smart_clipped_smart_set()
+ *
+ * @ingroup Evas_Smart_Object_Group
+ */
+
+/**
+ * Every subclass should provide this at the beginning of their own
+ * data set with evas_object_smart_data_set().
+ */
+  typedef struct _Evas_Object_Smart_Clipped_Data Evas_Object_Smart_Clipped_Data;
+  struct _Evas_Object_Smart_Clipped_Data
+  {
+     Evas_Object *clipper;
+     Evas        *evas;
+  };
+
+
+/**
+ * Get the clipper object for the given clipped smart object.
+ *
+ * @param obj the clipped smart object to retrieve the associated clipper.
+ * @return the clipper object.
+ *
+ * @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;
+
+/**
+ * Set smart class callbacks so it implements the "Clipped Smart Object".
+ *
+ * This call will assign all the required methods of Evas_Smart_Class,
+ * if one wants to "subclass" it, call this function and later
+ * override values, if one wants to call the original method, save it
+ * somewhere, example:
+ *
+ * @code
+ * static Evas_Smart_Class parent_sc = EVAS_SMART_CLASS_INIT_NULL;
+ *
+ * static void my_class_smart_add(Evas_Object *o)
+ * {
+ *    parent_sc.add(o);
+ *    evas_object_color_set(evas_object_smart_clipped_clipper_get(o),
+ *                          255, 0, 0, 255);
+ * }
+ *
+ * Evas_Smart_Class *my_class_new(void)
+ * {
+ *    static Evas_Smart_Class sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("MyClass");
+ *    if (!parent_sc.name)
+ *      {
+ *         evas_object_smart_clipped_smart_set(&sc);
+ *         parent_sc = sc;
+ *         sc.add = my_class_smart_add;
+ *      }
+ *    return &sc;
+ * }
+ * @endcode
+ *
+ * Default behavior is:
+ *  - add: creates a hidden clipper with "infinite" size;
+ *  - del: delete all children objects;
+ *  - move: move all objects relative relatively;
+ *  - resize: not defined;
+ *  - show: if there are children objects, show clipper;
+ *  - hide: hides clipper;
+ *  - color_set: set the color of clipper;
+ *  - clip_set: set clipper of clipper;
+ *  - clip_unset: unset the clipper of clipper;
+ */
+EAPI void                    evas_object_smart_clipped_smart_set     (Evas_Smart_Class *sc) EINA_ARG_NONNULL(1);
+
+/**
+ * Get a pointer to the Clipped Smart Class to use for proper inheritance
+ */
+EAPI const Evas_Smart_Class *evas_object_smart_clipped_class_get     (void) EINA_CONST;
+
+
+/**
+ * Moves all children objects relative to given offset.
+ *
+ * @param obj the smart evas object to use.
+ * @param dx horizontal offset.
+ * @param dy vertical offset.
+ */
+EAPI void                    evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy) EINA_ARG_NONNULL(1);
+
+/**
+ * @defgroup Evas_Object_Box Box (Sequence) Smart Object.
+ *
+ * Convenience smart object that packs children as a sequence using
+ * a layout function specified by user. There are a couple of helper
+ * layout functions, all of them using children size hints to define
+ * their size and alignment inside their cell space.
+ *
+ * @see @ref Evas_Object_Group_Size_Hints
+ *
+ * @ingroup Evas_Smart_Object_Group
+ */
+/**
+ * @typedef Evas_Object_Box_Api
+ * Smart Class extension providing extra box requirements.
+ * @ingroup Evas_Object_Box
+ */
+   typedef struct _Evas_Object_Box_Api        Evas_Object_Box_Api;
+/**
+ * @typedef Evas_Object_Box_Data
+ * Smart instance data providing box requirements.
+ * @ingroup Evas_Object_Box
+ */
+   typedef struct _Evas_Object_Box_Data       Evas_Object_Box_Data;
+/**
+ * @typedef Evas_Object_Box_Option
+ * The base structure for a box option.
+ * @ingroup Evas_Object_Box
+ */
+   typedef struct _Evas_Object_Box_Option     Evas_Object_Box_Option;
+   typedef void (*Evas_Object_Box_Layout) (Evas_Object *o, Evas_Object_Box_Data *priv, void *user_data);
+
+/**
+ * @def EVAS_OBJECT_BOX_API_VERSION
+ * @ingroup Evas_Object_Box
+ */
+#define EVAS_OBJECT_BOX_API_VERSION 1
+/**
+ * @struct _Evas_Object_Box_Api
+ *
+ * This structure should be used by any class that wants to inherit
+ * from box to provide custom behavior not allowed only by providing a
+ * layout function with evas_object_box_layout_set().
+ *
+ * @extends Evas_Smart_Class
+ * @ingroup Evas_Object_Box
+ */
+   struct _Evas_Object_Box_Api
+   {
+      Evas_Smart_Class          base;
+      int                       version;
+      Evas_Object_Box_Option *(*append)           (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child);
+      Evas_Object_Box_Option *(*prepend)          (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child);
+      Evas_Object_Box_Option *(*insert_before)    (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference);
+      Evas_Object_Box_Option *(*insert_after)     (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference);
+      Evas_Object_Box_Option *(*insert_at)        (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, unsigned int pos);
+      Evas_Object            *(*remove)           (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child);
+      Evas_Object            *(*remove_at)        (Evas_Object *o, Evas_Object_Box_Data *priv, unsigned int pos);
+      Eina_Bool               (*property_set)     (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args);
+      Eina_Bool               (*property_get)     (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args);
+      const char             *(*property_name_get)(Evas_Object *o, int property);
+      int                     (*property_id_get)  (Evas_Object *o, const char *name);
+      Evas_Object_Box_Option *(*option_new)       (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child);
+      void                    (*option_free)      (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Option *opt);
+   };
 
 /**
- * @struct _Evas_Smart_Cb_Description
+ * @def EVAS_OBJECT_BOX_API_INIT
+ * Initializer for whole Evas_Object_Box_Api structure.
  *
- * Describes a callback used by a smart class
- * evas_object_smart_callback_call(), particularly useful to explain
- * to user and its code (ie: introspection) what the parameter @c
- * event_info will contain.
+ * @param smart_class_init initializer to use for the "base" field
+ * (Evas_Smart_Class).
  *
- * @ingroup Evas_Smart_Group
+ * @see EVAS_SMART_CLASS_INIT_NULL
+ * @see EVAS_SMART_CLASS_INIT_VERSION
+ * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
+ * @see EVAS_OBJECT_BOX_API_INIT_NULL
+ * @see EVAS_OBJECT_BOX_API_INIT_VERSION
+ * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
+ * @ingroup Evas_Object_Box
  */
-struct _Evas_Smart_Cb_Description
-{
-   const char *name; /**< callback name, ie: "changed" */
-
-   /**
-    * @brief Hint type of @c event_info parameter of Evas_Smart_Cb.
-    *
-    * The type string uses the pattern similar to
-    *
-    * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures
-    *
-    * but extended to optionally include variable names within
-    * brackets preceding types. Example:
-    *
-    * @li Structure with two integers:
-    *     @c "(ii)"
-    *
-    * @li Structure called 'x' with two integers named 'a' and 'b':
-    *     @c "[x]([a]i[b]i)"
-    *
-    * @li Array of integers:
-    *     @c "ai"
-    *
-    * @li Array called 'x' of struct with two integers:
-    *     @c "[x]a(ii)"
-    *
-    * @note This type string is used as a hint and is @b not validated
-    *       or enforced anyhow. Implementors should make the best use
-    *       of it to help bindings, documentation and other users of
-    *       introspection features.
-    */
-   const char *type;
-};
+#define EVAS_OBJECT_BOX_API_INIT(smart_class_init) {smart_class_init, EVAS_OBJECT_BOX_API_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
 
 /**
- * @def EVAS_SMART_CLASS_INIT_NULL
- * Initializer to zero a whole Evas_Smart_Class structure.
+ * @def EVAS_OBJECT_BOX_API_INIT_NULL
+ * Initializer to zero a whole Evas_Object_Box_Api structure.
  *
- * @see EVAS_SMART_CLASS_INIT_VERSION
- * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
- * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
- * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
- * @ingroup Evas_Smart_Group
+ * @see EVAS_OBJECT_BOX_API_INIT_VERSION
+ * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
+ * @see EVAS_OBJECT_BOX_API_INIT
+ * @ingroup Evas_Object_Box
  */
-#define EVAS_SMART_CLASS_INIT_NULL {NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
+#define EVAS_OBJECT_BOX_API_INIT_NULL EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NULL)
 
 /**
- * @def EVAS_SMART_CLASS_INIT_VERSION
- * Initializer to zero a whole Evas_Smart_Class structure and set version.
+ * @def EVAS_OBJECT_BOX_API_INIT_VERSION
+ * Initializer to zero a whole Evas_Object_Box_Api structure and set version.
  *
- * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
- * latest EVAS_SMART_CLASS_VERSION.
+ * Similar to EVAS_OBJECT_BOX_API_INIT_NULL, but will set version field of
+ * Evas_Smart_Class (base field) to latest EVAS_SMART_CLASS_VERSION
  *
- * @see EVAS_SMART_CLASS_INIT_NULL
- * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
- * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
- * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
- * @ingroup Evas_Smart_Group
+ * @see EVAS_OBJECT_BOX_API_INIT_NULL
+ * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
+ * @see EVAS_OBJECT_BOX_API_INIT
+ * @ingroup Evas_Object_Box
  */
-#define EVAS_SMART_CLASS_INIT_VERSION {NULL, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
+#define EVAS_OBJECT_BOX_API_INIT_VERSION EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_VERSION)
 
 /**
- * @def EVAS_SMART_CLASS_INIT_NAME_VERSION
- * Initializer to zero a whole Evas_Smart_Class structure and set name
- * and version.
+ * @def EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
+ * Initializer to zero a whole Evas_Object_Box_Api structure and set
+ * name and version.
  *
- * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
- * latest EVAS_SMART_CLASS_VERSION and name to the specified value.
+ * Similar to EVAS_OBJECT_BOX_API_INIT_NULL, but will set version field of
+ * Evas_Smart_Class (base field) to latest EVAS_SMART_CLASS_VERSION and name
+ * to the specific value.
  *
  * It will keep a reference to name field as a "const char *", that is,
  * name must be available while the structure is used (hint: static or global!)
  * and will not be modified.
  *
- * @see EVAS_SMART_CLASS_INIT_NULL
- * @see EVAS_SMART_CLASS_INIT_VERSION
- * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
- * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
- * @ingroup Evas_Smart_Group
+ * @see EVAS_OBJECT_BOX_API_INIT_NULL
+ * @see EVAS_OBJECT_BOX_API_INIT_VERSION
+ * @see EVAS_OBJECT_BOX_API_INIT
+ * @ingroup Evas_Object_Box
  */
-#define EVAS_SMART_CLASS_INIT_NAME_VERSION(name) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
+#define EVAS_OBJECT_BOX_API_INIT_NAME_VERSION(name) EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name))
 
 /**
- * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
- * Initializer to zero a whole Evas_Smart_Class structure and set name,
- * version and parent class.
+ * @struct _Evas_Object_Box_Data
  *
- * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
- * latest EVAS_SMART_CLASS_VERSION, name to the specified value and
- * parent class.
+ * This structure augments clipped smart object's instance data,
+ * providing extra members required by generic box implementation. If
+ * a subclass inherits from #Evas_Object_Box_Api then it may augment
+ * #Evas_Object_Box_Data to fit its own needs.
  *
- * It will keep a reference to name field as a "const char *", that is,
- * name must be available while the structure is used (hint: static or global!)
- * and will not be modified. Similarly, parent reference will be kept.
+ * @extends Evas_Object_Smart_Clipped_Data
+ * @ingroup Evas_Object_Box
+ */
+   struct _Evas_Object_Box_Data
+   {
+      Evas_Object_Smart_Clipped_Data   base;
+      const Evas_Object_Box_Api       *api;
+      struct {
+        double                        h, v;
+      } align;
+      struct {
+        Evas_Coord                    h, v;
+      } pad;
+      Eina_List                       *children;
+      struct {
+        Evas_Object_Box_Layout        cb;
+        void                         *data;
+        void                        (*free_data)(void *data);
+      } layout;
+      Eina_Bool                        layouting : 1;
+      Eina_Bool                        children_changed : 1;
+   };
+
+   struct _Evas_Object_Box_Option
+   {
+      Evas_Object *obj;
+      Eina_Bool    max_reached:1;
+      Eina_Bool    min_reached:1;
+      Evas_Coord   alloc_size;
+   };
+
+
+/**
+ * Set the default box @a api struct (Evas_Object_Box_Api)
+ * with the default values. May be used to extend that API.
+ */
+EAPI void                       evas_object_box_smart_set                             (Evas_Object_Box_Api *api) EINA_ARG_NONNULL(1);
+
+/**
+ * Get Box Smart Class for inheritance purposes
+ */
+EAPI const Evas_Object_Box_Api *evas_object_box_smart_class_get                       (void) EINA_CONST;
+
+/**
+ * Set a 'calculate' callback (@a cb) to the @a o box's smart class,
+ * which here defines its genre (horizontal, vertical, homogeneous,
+ * etc.).
+ */
+EAPI void                       evas_object_box_layout_set                            (Evas_Object *o, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data)) EINA_ARG_NONNULL(1, 2);
+
+
+/**
+ * Create a new box.
  *
- * @see EVAS_SMART_CLASS_INIT_NULL
- * @see EVAS_SMART_CLASS_INIT_VERSION
- * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
- * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
- * @ingroup Evas_Smart_Group
+ * Its layout function must be set via evas_object_box_layout_set()
+ * (defaults to evas_object_box_layout_horizontal()).  The other
+ * properties of the box must be set/retrieved via
+ * evas_object_box_{h,v}_{align,padding}_{get,set)().
  */
-#define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT(name, parent) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, NULL, NULL}
+EAPI Evas_Object               *evas_object_box_add                                   (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
 
 /**
- * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
- * Initializer to zero a whole Evas_Smart_Class structure and set name,
- * version, parent class and callbacks definition.
+ * Create a box that is child of a given element @a parent.
  *
- * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
- * latest EVAS_SMART_CLASS_VERSION, name to the specified value, parent
- * class and callbacks at this level.
+ * @see evas_object_box_add()
+ */
+EAPI Evas_Object               *evas_object_box_add_to                                (Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+
+
+/**
+ * Layout function which sets the box @a o to a (basic) horizontal
+ * box.  @a priv must be the smart data of the box.
+ *
+ * The object's overall behavior is controlled by its properties,
+ * which are set by the evas_object_box_{h,v}_{align,padding}_set()
+ * family of functions.  The properties of the elements in the box --
+ * set by evas_object_size_hint_{align,padding,weight}_set() functions
+ * -- also control the way this function works.
+ *
+ * \par box's properties:
+ * @c align_h controls the horizontal alignment of the child objects
+ * relative to the containing box. When set to 0, children are aligned
+ * to the left. A value of 1 lets them aligned to the right border.
+ * Values in between align them proportionally.  Note that if the size
+ * required by the children, which is given by their widths and the @c
+ * padding_h property of the box, is bigger than the container width,
+ * the children will be displayed out of its bounds.  A negative value
+ * of @c align_h makes the box to *justify* its children. The padding
+ * between them, in this case, is corrected so that the leftmost one
+ * touches the left border and the rightmost one touches the right
+ * border (even if they must overlap).  The @c align_v and @c
+ * padding_v properties of the box don't contribute to its behaviour
+ * when this layout is chosen.
+ *
+ * \par Child element's properties:
+ * @c align_x does not influence the box's behavior.  @c padding_l and
+ * @c padding_r sum up to the container's horizontal padding between
+ * elements.  The child's @c padding_t, @c padding_b and @c align_y
+ * properties apply for padding/positioning relative to the overall
+ * height of the box. Finally, there is the @c weight_x property,
+ * which, if set to a non-zero value, tells the container that the
+ * child width is not pre-defined.  If the container can't accommodate
+ * all its children, it sets the widths of the children *with weights*
+ * to sizes as small as they can all fit into it.  If the size
+ * required by the children is less than the available, the box
+ * increases its children's (which have weights) widths as to fit the
+ * remaining space.  The @c weight_x property, besides telling the
+ * element is resizable, gives a *weight* for the resizing process.
+ * The parent box will try to distribute (or take off) widths
+ * accordingly to the *normalized* list of weigths: most weighted
+ * children remain/get larger in this process than the the least ones.
+ * @c weight_y does not influence the layout.
+ *
+ * If one desires that, besides having weights, child elements must be
+ * resized bounded to a minimum or maximum size, their size hint
+ * properties must be set (by the
+ * evas_object_size_hint_{min,max}_set() functions.
+ */
+EAPI void                       evas_object_box_layout_horizontal                     (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Layout function which sets the box @a o to a (basic) vertical box.
+ * @a priv must be the smart data of the box.
  *
- * It will keep a reference to name field as a "const char *", that is,
- * name must be available while the structure is used (hint: static or global!)
- * and will not be modified. Similarly, parent and callbacks reference
- * will be kept.
+ * This function behaves analogously to
+ * evas_object_box_layout_horizontal().  The description of its
+ * behaviour can be derived from that function's documentation.
+ */
+EAPI void                       evas_object_box_layout_vertical                       (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Layout function which sets the box @a o to a *homogeneous* vertical
+ * box.  @a priv must be the smart data of the box.
  *
- * @see EVAS_SMART_CLASS_INIT_NULL
- * @see EVAS_SMART_CLASS_INIT_VERSION
- * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
- * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
- * @ingroup Evas_Smart_Group
+ * This function behaves analogously to
+ * evas_object_box_layout_homogeneous_horizontal().  The description
+ * of its behaviour can be derived from that function's documentation.
+ */
+EAPI void                       evas_object_box_layout_homogeneous_vertical           (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Layout function which sets the box @a o to a *homogeneous*
+ * horizontal box.  @a priv must be the smart data of the box.
+ *
+ * In a homogeneous horizontal box, its width is divided equally
+ * between the contained objects.  The box's overall behavior is
+ * controlled by its properties, which are set by the
+ * evas_object_box_{h,v}_{align,padding}_set() family of functions.
+ * The properties of the elements in the box -- set by
+ * evas_object_size_hint_{align,padding,weight}_set() functions --
+ * also control the way this function works.
+ *
+ * \par box's properties:
+ * @c align_h has no influence on the box for this layout.  @c
+ * padding_h tells the box to draw empty spaces of that size, in
+ * pixels, between the (still equal) child objects's cells.  The @c
+ * align_v and @c padding_v properties of the box don't contribute to
+ * its behaviour when this layout is chosen.
+ *
+ * \par Child element's properties:
+ * @c padding_l and @c padding_r sum up to the required width of the
+ * child element.  The @c align_x property tells the relative position
+ * of this overall child width in its allocated cell (0 to extreme
+ * left, 1 to extreme right).  A value of -1.0 to @c align_x makes the
+ * box try to resize this child element to the exact width of its cell
+ * (respecting the min and max hints on the child's width *and*
+ * accounting its horizontal padding properties).  The child's @c
+ * padding_t, @c padding_b and @c align_y properties apply for
+ * padding/positioning relative to the overall height of the box. A
+ * value of -1.0 to @c align_y makes the box try to resize this child
+ * element to the exact height of its parent (respecting the max hint
+ * on the child's height).
+ */
+EAPI void                       evas_object_box_layout_homogeneous_horizontal         (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Layout function which sets the box @a o to a *max size-homogeneous*
+ * horizontal box.  @a priv must be the smart data of the box.
+ *
+ * In a max size-homogeneous horizontal box, the equal sized cells
+ * reserved for the child objects have the width of the space required
+ * by the largest child (in width). The box's overall behavior is
+ * controlled by its properties, which are set by the
+ * evas_object_box_{h,v}_{align,padding}_set() family of functions.
+ * The properties of the elements in the box -- set by
+ * evas_object_size_hint_{align,padding,weight}_set() functions --
+ * also control the way this function works.
+ *
+ * \par box's properties:
+ * @c padding_h tells the box to draw empty spaces of that size, in
+ * pixels, between the child objects's cells.  @c align_h controls the
+ * horizontal alignment of the child objects relative to the
+ * containing box. When set to 0, children are aligned to the left. A
+ * value of 1 lets them aligned to the right border.  Values in
+ * between align them proportionally. A negative value of @c align_h
+ * makes the box to *justify* its children cells. The padding between
+ * them, in this case, is corrected so that the leftmost one touches
+ * the left border and the rightmost one touches the right border
+ * (even if they must overlap).  The @c align_v and @c padding_v
+ * properties of the box don't contribute to its behaviour when this
+ * layout is chosen.
+ *
+ * \par Child element's properties:
+ * @c padding_l and @c padding_r sum up to the required width of the
+ * child element. The @c align_x property tells the relative position
+ * of this overall child width in its allocated cell (0 to extreme
+ * left, 1 to extreme right).  A value of -1.0 to @c align_x makes the
+ * box try to resize this child element to the exact width of its cell
+ * (respecting the min and max hints on the child's width *and*
+ * accounting its horizontal padding properties).  The child's @c
+ * padding_t, @c padding_b and @c align_y properties apply for
+ * padding/positioning relative to the overall height of the box. A
+ * value of -1.0 to @c align_y makes the box try to resize this child
+ * element to the exact height of its parent (respecting the max hint
+ * on the child's height).
+ */
+EAPI void                       evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Layout function which sets the box @a o to a *max size-homogeneous*
+ * vertical box.  @a priv must be the smart data of the box.
+ *
+ * This function behaves analogously to
+ * evas_object_box_layout_homogeneous_max_size_horizontal().  The
+ * description of its behaviour can be derived from that function's
+ * documentation.
+ */
+EAPI void                       evas_object_box_layout_homogeneous_max_size_vertical  (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Layout function which sets the box @a o to a *flow* horizontal box.
+ * @a priv must be the smart data of the box.
+ *
+ * In a flow horizontal box, the box's child elements are placed in
+ * rows (think of text as an analogy). A row has as much elements as
+ * can fit into the box's width.  The box's overall behavior is
+ * controlled by its properties, which are set by the
+ * evas_object_box_{h,v}_{align,padding}_set() family of functions.
+ * The properties of the elements in the box -- set by
+ * evas_object_size_hint_{align,padding,weight}_set() functions --
+ * also control the way this function works.
+ *
+ * \par box's properties:
+ * @c padding_h tells the box to draw empty spaces of that size, in
+ * pixels, between the child objects's cells.  @c align_h dictates the
+ * horizontal alignment of the rows (0 to left align them, 1 to right
+ * align).  A value of -1.0 to @c align_h lets the rows *justified*
+ * horizontally.  @c align_v controls the vertical alignment of the
+ * entire set of rows (0 to top, 1 to bottom).  A value of -1.0 to @c
+ * align_v makes the box to *justify* the rows vertically. The padding
+ * between them, in this case, is corrected so that the first row
+ * touches the top border and the last one touches the bottom border
+ * (even if they must overlap). @c padding_v has no influence on the
+ * layout.
+ *
+ * \par Child element's properties:
+ * @c padding_l and @c padding_r sum up to the required width of the
+ * child element.  The @c align_x property has no influence on the
+ * layout. The child's @c padding_t and @c padding_b sum up to the
+ * required height of the child element and is the only means (besides
+ * row justifying) of setting space between rows.  Note, however, that
+ * @c align_y dictates positioning relative to the *largest height*
+ * required by a child object in the actual row.
+ */
+EAPI void                       evas_object_box_layout_flow_horizontal                (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Layout function which sets the box @a o to a *flow* vertical box.
+ * @a priv must be the smart data of the box.
+ *
+ * This function behaves analogously to
+ * evas_object_box_layout_flow_horizontal().  The description of its
+ * behaviour can be derived from that function's documentation.
+ */
+EAPI void                       evas_object_box_layout_flow_vertical                  (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Layout function which sets the box @a o to set all children to the
+ * size of the object.  @a priv must be the smart data of the box.
+ *
+ * In a stack box, all children will be given the same size and they
+ * will be stacked on above the other, so the first object will be the
+ * bottom most.
+ *
+ * \par box's properties:
+ * No box option is used.
+ *
+ * \par Child  element's   properties:
+ * @c padding_l and @c padding_r sum up to the required width of the
+ * child element.  The @c align_x property tells the relative position
+ * of this overall child width in its allocated cell (0 to extreme
+ * left, 1 to extreme right).  A value of -1.0 to @c align_x makes the
+ * box try to resize this child element to the exact width of its cell
+ * (respecting the min and max hints on the child's width *and*
+ * accounting its horizontal padding properties).  Same applies to
+ * vertical axis.
+ */
+EAPI void                       evas_object_box_layout_stack                          (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
+
+
+/**
+ * Set the alignment of the whole bounding box of contents.
+ */
+EAPI void                       evas_object_box_align_set                             (Evas_Object *o, double horizontal, double vertical) EINA_ARG_NONNULL(1);
+
+/**
+ * Get alignment of the whole bounding box of contents.
+ */
+EAPI void                       evas_object_box_align_get                             (const Evas_Object *o, double *horizontal, double *vertical) EINA_ARG_NONNULL(1);
+
+/**
+ * Set the space (padding) between cells.
+ */
+EAPI void                       evas_object_box_padding_set                           (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1);
+
+/**
+ * Get the (space) padding between cells.
+ */
+EAPI void                       evas_object_box_padding_get                           (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1);
+
+
+/**
+ * Append a new object @a child to the box @a o. On error, @c NULL is
+ * returned.
+ */
+EAPI Evas_Object_Box_Option    *evas_object_box_append                                (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Prepend a new object @a child to the box @a o. On error, @c NULL is
+ * returned.
+ */
+EAPI Evas_Object_Box_Option    *evas_object_box_prepend                               (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Prepend a new object @a child to the box @c o relative to element @a
+ * reference. If @a reference is not contained in the box or any other
+ * error occurs, @c NULL is returned.
+ */
+EAPI Evas_Object_Box_Option    *evas_object_box_insert_before                         (Evas_Object *o, Evas_Object *child, const Evas_Object *reference) EINA_ARG_NONNULL(1, 2, 3);
+
+/**
+ * Append a new object @a child to the box @c o relative to element @a
+ * reference. If @a reference is not contained in the box or any other
+ * error occurs, @c NULL is returend.
+ */
+EAPI Evas_Object_Box_Option    *evas_object_box_insert_after                          (Evas_Object *o, Evas_Object *child, const Evas_Object *referente) EINA_ARG_NONNULL(1, 2, 3);
+
+/**
+ * Insert a new object @a child to the box @a o at position @a pos. On
+ * error, @c NULL is returned.
+ */
+EAPI Evas_Object_Box_Option    *evas_object_box_insert_at                             (Evas_Object *o, Evas_Object *child, unsigned int pos) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Remove an object @a child from the box @a o. On error, @c 0 is
+ * returned.
+ */
+EAPI Eina_Bool                  evas_object_box_remove                                (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Remove an object from the box @a o which occupies position @a
+ * pos. On error, @c 0 is returned.
+ */
+EAPI Eina_Bool                  evas_object_box_remove_at                             (Evas_Object *o, unsigned int pos) EINA_ARG_NONNULL(1);
+
+/**
+ * Remove all child objects.
+ * @return 0 on errors
  */
-#define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS(name, parent, callbacks) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, callbacks, NULL}
+EAPI Eina_Bool                  evas_object_box_remove_all                            (Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1);
 
 /**
- * @def EVAS_SMART_SUBCLASS_NEW
- *
- * Convenience macro to subclass a Smart Class.
- *
- * This macro saves some typing when writing a Smart Class derived from
- * another one. In order to work, the user needs to provide some functions
- * adhering to the following guidelines.
- *  - @<prefix@>_smart_set_user(): the internal _smart_set function will call
- *    this one provided by the user after inheriting everything from the
- *    parent, which should take care of setting the right member functions
- *    for the class.
- *  - @<prefix@>_parent_sc: pointer to the smart class of the parent. When calling
- *    parent functions from overloaded ones, use this global variable.
- *  - @<prefix@>_smart_class_new(): this function returns the Evas_Smart needed
- *    to create smart objects with this class, should be called by the public
- *    _add() function.
- *  - If this new class should be subclassable as well, a public _smart_set()
- *    function is desirable to fill the class used as parent by the children.
- *    It's up to the user to provide this interface, which will most likely
- *    call @<prefix@>_smart_set() to get the job done.
- *
- * @param smart_name The name used for the Smart Class. e.g: "Evas_Object_Box".
- * @param prefix Prefix used for all variables and functions defined.
- * @param api_type Type of the structure used as API for the Smart Class. Either Evas_Smart_Class or something derived from it.
- * @param parent_type Type of the parent class API.
- * @param parent_func Function that gets the parent class. e.g: evas_object_box_smart_class_get().
- * @param cb_desc Array of callback descriptions for this Smart Class.
+ * Get an iterator to walk the list of children for the box.
  *
- * @ingroup Evas_Smart_Group
+ * @note Do not remove or delete objects while walking the list.
  */
-#define EVAS_SMART_SUBCLASS_NEW(smart_name, prefix, api_type, parent_type, parent_func, cb_desc) \
-  static const parent_type * prefix##_parent_sc = NULL;                        \
-  static void prefix##_smart_set_user(api_type *api);                  \
-  static void prefix##_smart_set(api_type *api)                                \
-  {                                                                    \
-     Evas_Smart_Class *sc;                                             \
-     if (!(sc = (Evas_Smart_Class *)api))                              \
-       return;                                                         \
-     if (!prefix##_parent_sc)                                          \
-       prefix##_parent_sc = parent_func();                             \
-     evas_smart_class_inherit(sc, (const Evas_Smart_Class *)prefix##_parent_sc); \
-     prefix##_smart_set_user(api);                                     \
-  }                                                                    \
-  static Evas_Smart * prefix##_smart_class_new(void)                   \
-  {                                                                    \
-     static Evas_Smart *smart = NULL;                                  \
-     static api_type api;                                              \
-     if (!smart)                                                       \
-       {                                                               \
-         Evas_Smart_Class *sc = (Evas_Smart_Class *)&api;              \
-         memset(&api, 0, sizeof(api_type));                            \
-         sc->version = EVAS_SMART_CLASS_VERSION;                       \
-         sc->name = smart_name;                                        \
-         sc->callbacks = cb_desc;                                      \
-         prefix##_smart_set(&api);                                     \
-         smart = evas_smart_class_new(sc);                             \
-       }                                                               \
-     return smart;                                                     \
-  }
+EAPI Eina_Iterator             *evas_object_box_iterator_new                          (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
 
 /**
- * @def EVAS_SMART_DATA_ALLOC
- * Convenience macro to allocate smart data only if needed.
+ * Get an accessor to get random access to the list of children for the box.
  *
- * When writing a subclassable smart object, the .add function will need
- * to check if the smart private data was already allocated by some child
- * object or not. This macro makes it easier to do it.
+ * @note Do not remove or delete objects while walking the list.
+ */
+EAPI Eina_Accessor             *evas_object_box_accessor_new                          (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+
+/**
+ * Get the list of children for the box.
  *
- * @param o Evas object passed to the .add function
- * @param priv_type The type of the data to allocate
- * @ingroup Evas_Smart_Group
+ * @note This is a duplicate of the list kept by the box internally.
+ *       It's up to the user to destroy it when it no longer needs it.
+ *       It's possible to remove objects from the box when walking this
+ *       list, but these removals won't be reflected on it.
  */
-#define EVAS_SMART_DATA_ALLOC(o, priv_type) \
-   priv_type *priv; \
-   priv = evas_object_smart_data_get(o); \
-   if (!priv) { \
-      priv = (priv_type *)calloc(1, sizeof(priv_type)); \
-      if (!priv) return; \
-      evas_object_smart_data_set(o, priv); \
-   }
+EAPI Eina_List                 *evas_object_box_children_get                          (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
 
-   EAPI void                             evas_smart_free                     (Evas_Smart *s) EINA_ARG_NONNULL(1);
-   EAPI Evas_Smart                      *evas_smart_class_new                (const Evas_Smart_Class *sc) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-   EAPI const Evas_Smart_Class          *evas_smart_class_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) 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) EINA_PURE;
+/**
+ * Get the name of the property of the child elements of the box @a o
+ * whose id is @a property. On error, @c NULL is returned.
+ */
+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 Eina_Bool                        evas_smart_class_inherit_full       (Evas_Smart_Class *sc, const Evas_Smart_Class *parent_sc, unsigned int parent_sc_size) EINA_ARG_NONNULL(1, 2);
-  /**
-   * @def evas_smart_class_inherit
-   * Easy to use version of evas_smart_class_inherit_full().
-   *
-   * This version will use sizeof(parent_sc), copying everything.
-   *
-   * @param sc child class, will have methods copied from @a parent_sc
-   * @param parent_sc parent class, will provide contents to be copied.
-   * @return 1 on success, 0 on failure.
-   * @ingroup Evas_Smart_Group
-   */
-#define evas_smart_class_inherit(sc, parent_sc) evas_smart_class_inherit_full(sc, parent_sc, sizeof(*parent_sc))
+/**
+ * Get the id of the property of the child elements of the box @a o
+ * whose name is @a name. On error, @c -1 is returned.
+ */
+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;
 
 /**
- * @defgroup Evas_Smart_Object_Group Smart Object Functions
- *
- * Functions dealing with evas smart objects (instances).
- *
- * Smart objects are groupings of primitive evas objects that behave as a
- * cohesive group. For instance, a file manager icon may be a smart object
- * composed of an image object, a text label and two rectangles that appear
- * behind the image and text when the icon is selected. As a smart object,
- * the normal evas api could be used on the icon object.
- *
- * @see @ref Evas_Smart_Group for class definitions.
+ * Set the property (with id @a property) of the child element of the
+ * box @a o whose property struct is @a opt. The property's values
+ * must be the last arguments and their type *must* match that of the
+ * property itself. On error, @c 0 is returned.
  */
-   EAPI Evas_Object      *evas_object_smart_add             (Evas *e, Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_MALLOC;
-   EAPI void              evas_object_smart_member_add      (Evas_Object *obj, Evas_Object *smart_obj) EINA_ARG_NONNULL(1, 2);
-   EAPI void              evas_object_smart_member_del      (Evas_Object *obj) EINA_ARG_NONNULL(1);
-   EAPI Evas_Object      *evas_object_smart_parent_get      (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) 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) 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) EINA_PURE;
-   EAPI Eina_List        *evas_object_smart_members_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) EINA_PURE;
-   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_set        (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_smart_callback_add    (Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1, 2, 3);
-   EAPI void             *evas_object_smart_callback_del    (Evas_Object *obj, const char *event, Evas_Smart_Cb func) EINA_ARG_NONNULL(1, 2, 3);
-   EAPI void              evas_object_smart_callback_call   (Evas_Object *obj, const char *event, void *event_info) EINA_ARG_NONNULL(1, 2);
+EAPI Eina_Bool                  evas_object_box_option_property_set                   (Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2);
 
-   EAPI Eina_Bool         evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_Cb_Description *descriptions) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_smart_callbacks_descriptions_get(const Evas_Object *obj, const Evas_Smart_Cb_Description ***class_descriptions, unsigned int *class_count, const Evas_Smart_Cb_Description ***instance_descriptions, unsigned int *instance_count) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_smart_callback_description_find(const Evas_Object *obj, const char *name, const Evas_Smart_Cb_Description **class_description, const Evas_Smart_Cb_Description **instance_description) EINA_ARG_NONNULL(1, 2);
+/**
+ * Set the property (with id @a property) of the child element of the
+ * box @a o whose property struct is @a opt. The property's values
+ * must be the args which the va_list @a args is initialized with and
+ * their type *must* match that of the property itself. On error, @c 0
+ * is returned.
+ */
+EAPI Eina_Bool                  evas_object_box_option_property_vset                  (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) EINA_ARG_NONNULL(1, 2);
 
-   EAPI void              evas_object_smart_changed         (Evas_Object *obj) EINA_ARG_NONNULL(1);
-   EAPI void              evas_object_smart_need_recalculate_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool         evas_object_smart_need_recalculate_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-   EAPI void              evas_object_smart_calculate       (Evas_Object *obj) EINA_ARG_NONNULL(1);
+/**
+ * Get the property (with id @a property) of the child element of the
+ * box @a o whose property struct is @a opt. The last arguments must
+ * be addresses of variables with the same type of that property. On
+ * error, @c 0 is returned.
+ */
+EAPI Eina_Bool                  evas_object_box_option_property_get                   (Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2);
 
-   EAPI void              evas_smart_objects_calculate      (Evas *e);
+/**
+ * Get the property (with id @a property) of the child element of the
+ * box @a o whose property struct is @a opt. The args which the
+ * va_list @a args is initialized with must be addresses of variables
+ * with the same type of that property. On error, @c 0 is returned.
+ */
+EAPI Eina_Bool                  evas_object_box_option_property_vget                  (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) EINA_ARG_NONNULL(1, 2);
 
 /**
- * @defgroup Evas_Smart_Object_Clipped Clipped Smart Object
+ * @defgroup Evas_Object_Table Table Smart Object.
  *
- * Clipped smart object is a base to construct other smart objects
- * that based on the concept of having an internal clipper that is
- * applied to all its other children. This clipper will control the
- * visibility, clipping and color of sibling objects (remember that
- * the clipping is recursive, and clipper color modulates the color of
- * its clippees). By default, this base will also move children
- * relatively to the parent, and delete them when parent is
- * deleted. In other words, it is the base for simple object grouping.
+ * Convenience smart object that packs children using a tabular
+ * layout using children size hints to define their size and
+ * alignment inside their cell space.
  *
- * @see evas_object_smart_clipped_smart_set()
+ * @see @ref Evas_Object_Group_Size_Hints
  *
  * @ingroup Evas_Smart_Object_Group
  */
 
 /**
- * Every subclass should provide this at the beginning of their own
- * data set with evas_object_smart_data_set().
+ * Create a new table.
+ *
+ * It's set to non-homogeneous by default, add children with
+ * evas_object_table_pack().
  */
-  typedef struct _Evas_Object_Smart_Clipped_Data Evas_Object_Smart_Clipped_Data;
-  struct _Evas_Object_Smart_Clipped_Data
-  {
-     Evas_Object *clipper;
-     Evas        *evas;
-  };
+EAPI Evas_Object                        *evas_object_table_add             (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
 
-   EAPI Evas_Object            *evas_object_smart_clipped_clipper_get   (Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
-   EAPI void                    evas_object_smart_clipped_smart_set     (Evas_Smart_Class *sc) EINA_ARG_NONNULL(1);
-   EAPI const Evas_Smart_Class *evas_object_smart_clipped_class_get     (void) EINA_CONST;
+/**
+ * Create a table that is child of a given element @a parent.
+ *
+ * @see evas_object_table_add()
+ */
+EAPI Evas_Object                        *evas_object_table_add_to          (Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
 
-   EAPI void                    evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy) EINA_ARG_NONNULL(1);
+/**
+ * Set how this table should layout children.
+ *
+ * @todo consider aspect hint and respect it.
+ *
+ * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE
+ * If table does not use homogeneous mode then columns and rows will
+ * be calculated based on hints of individual cells. This operation
+ * mode is more flexible, but more complex and heavy to calculate as
+ * well. @b Weight properties are handled as a boolean
+ * expand. Negative alignment will be considered as 0.5.
+ *
+ * @todo @c EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE should balance weight.
+ *
+ * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE
+ * When homogeneous is relative to table the own table size is divided
+ * equally among children, filling the whole table area. That is, if
+ * table has @c WIDTH and @c COLUMNS, each cell will get <tt>WIDTH /
+ * COLUMNS</tt> pixels. If children have minimum size that is larger
+ * than this amount (including padding), then it will overflow and be
+ * aligned respecting the alignment hint, possible overlapping sibling
+ * cells. @b Weight hint is used as a boolean, if greater than zero it
+ * will make the child expand in that axis, taking as much space as
+ * possible (bounded to maximum size hint). Negative alignment will be
+ * considered as 0.5.
+ *
+ * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM
+ * When homogeneous is relative to item it means the greatest minimum
+ * cell size will be used. That is, if no element is set to expand,
+ * the table will have its contents to a minimum size, the bounding
+ * box of all these children will be aligned relatively to the table
+ * object using evas_object_table_align_get(). If the table area is
+ * too small to hold this minimum bounding box, then the objects will
+ * keep their size and the bounding box will overflow the box area,
+ * still respecting the alignment. @b Weight hint is used as a
+ * boolean, if greater than zero it will make that cell expand in that
+ * axis, toggling the <b>expand mode</b>, which makes the table behave
+ * much like @b EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE, except that the
+ * bounding box will overflow and items will not overlap siblings. If
+ * no minimum size is provided at all then the table will fallback to
+ * expand mode as well.
+ */
+EAPI void                                evas_object_table_homogeneous_set (Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous) EINA_ARG_NONNULL(1);
 
 /**
- * @defgroup Evas_Object_Box Box (Sequence) Smart Object.
- *
- * Convenience smart object that packs children as a sequence using
- * a layout function specified by user. There are a couple of helper
- * layout functions, all of them using children size hints to define
- * their size and alignment inside their cell space.
- *
- * @see @ref Evas_Object_Group_Size_Hints
+ * Get the current layout homogeneous mode.
  *
- * @ingroup Evas_Smart_Object_Group
+ * @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;
+
 /**
- * @typedef Evas_Object_Box_Api
- * Smart Class extension providing extra box requirements.
- * @ingroup Evas_Object_Box
+ * Set padding between cells.
  */
-   typedef struct _Evas_Object_Box_Api        Evas_Object_Box_Api;
+EAPI void                                evas_object_table_padding_set     (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1);
+
 /**
- * @typedef Evas_Object_Box_Data
- * Smart instance data providing box requirements.
- * @ingroup Evas_Object_Box
+ * Get padding between cells.
  */
-   typedef struct _Evas_Object_Box_Data       Evas_Object_Box_Data;
+EAPI void                                evas_object_table_padding_get     (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1);
+
 /**
- * @typedef Evas_Object_Box_Option
- * The base structure for a box option.
- * @ingroup Evas_Object_Box
+ * Set the alignment of the whole bounding box of contents.
  */
-   typedef struct _Evas_Object_Box_Option     Evas_Object_Box_Option;
-   typedef void (*Evas_Object_Box_Layout) (Evas_Object *o, Evas_Object_Box_Data *priv, void *user_data);
+EAPI void                                evas_object_table_align_set       (Evas_Object *o, double horizontal, double vertical) EINA_ARG_NONNULL(1);
 
 /**
- * @def EVAS_OBJECT_BOX_API_VERSION
- * @ingroup Evas_Object_Box
+ * Get alignment of the whole bounding box of contents.
  */
-#define EVAS_OBJECT_BOX_API_VERSION 1
+EAPI void                                evas_object_table_align_get       (const Evas_Object *o, double *horizontal, double *vertical) EINA_ARG_NONNULL(1);
+
 /**
- * @struct _Evas_Object_Box_Api
+ * Sets the mirrored mode of the table. In mirrored mode the table items go
+ * from right to left instead of left to right. That is, 1,1 is top right, not
+ * to left.
  *
- * This structure should be used by any class that wants to inherit
- * from box to provide custom behavior not allowed only by providing a
- * layout function with evas_object_box_layout_set().
+ * @param obj The table object.
+ * @param mirrored the mirrored mode to set
+ * @since 1.1.0
+ */
+EAPI void                                evas_object_table_mirrored_set    (Evas_Object *o, Eina_Bool mirrored) EINA_ARG_NONNULL(1);
+
+/**
+ * Gets the mirrored mode of the table. In mirrored mode the table items go
+ * from right to left instead of left to right. That is, 1,1 is top right, not
+ * to left.
  *
- * @extends Evas_Smart_Class
- * @ingroup Evas_Object_Box
+ * @param obj The table object.
+ * @return EINA_TRUE if it's a mirrored table, EINA_FALSE otherwise.
+ * @since 1.1.0
  */
-   struct _Evas_Object_Box_Api
-   {
-      Evas_Smart_Class          base;
-      int                       version;
-      Evas_Object_Box_Option *(*append)           (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child);
-      Evas_Object_Box_Option *(*prepend)          (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child);
-      Evas_Object_Box_Option *(*insert_before)    (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference);
-      Evas_Object_Box_Option *(*insert_after)     (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference);
-      Evas_Object_Box_Option *(*insert_at)        (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, unsigned int pos);
-      Evas_Object            *(*remove)           (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child);
-      Evas_Object            *(*remove_at)        (Evas_Object *o, Evas_Object_Box_Data *priv, unsigned int pos);
-      Eina_Bool               (*property_set)     (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args);
-      Eina_Bool               (*property_get)     (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args);
-      const char             *(*property_name_get)(Evas_Object *o, int property);
-      int                     (*property_id_get)  (Evas_Object *o, const char *name);
-      Evas_Object_Box_Option *(*option_new)       (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child);
-      void                    (*option_free)      (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Option *opt);
-   };
 
 /**
- * @def EVAS_OBJECT_BOX_API_INIT
- * Initializer for whole Evas_Object_Box_Api structure.
+ * Get a child from the table using its coordinates
  *
- * @param smart_class_init initializer to use for the "base" field
- * (Evas_Smart_Class).
+ * @note This does not take into account col/row spanning
+ */
+EAPI Eina_Bool                           evas_object_table_mirrored_get    (const Evas_Object *o) EINA_ARG_NONNULL(1);
+
+
+/**
+ * Add a new child to a table object.
  *
- * @see EVAS_SMART_CLASS_INIT_NULL
- * @see EVAS_SMART_CLASS_INIT_VERSION
- * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
- * @see EVAS_OBJECT_BOX_API_INIT_NULL
- * @see EVAS_OBJECT_BOX_API_INIT_VERSION
- * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
- * @ingroup Evas_Object_Box
+ * @param o The given table object.
+ * @param child The child object to add.
+ * @param col relative-horizontal position to place child.
+ * @param row relative-vertical position to place child.
+ * @param colspan how many relative-horizontal position to use for this child.
+ * @param rowspan how many relative-vertical position to use for this child.
+ *
+ * @return 1 on success, 0 on failure.
  */
-#define EVAS_OBJECT_BOX_API_INIT(smart_class_init) {smart_class_init, EVAS_OBJECT_BOX_API_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
+EAPI Eina_Bool                           evas_object_table_pack            (Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) EINA_ARG_NONNULL(1, 2);
 
 /**
- * @def EVAS_OBJECT_BOX_API_INIT_NULL
- * Initializer to zero a whole Evas_Object_Box_Api structure.
+ * Remove child from table.
  *
- * @see EVAS_OBJECT_BOX_API_INIT_VERSION
- * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
- * @see EVAS_OBJECT_BOX_API_INIT
- * @ingroup Evas_Object_Box
+ * @note removing a child will immediately call a walk over children in order
+ *       to recalculate numbers of columns and rows. If you plan to remove
+ *       all children, use evas_object_table_clear() instead.
+ *
+ * @return 1 on success, 0 on failure.
  */
-#define EVAS_OBJECT_BOX_API_INIT_NULL EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NULL)
+EAPI Eina_Bool                           evas_object_table_unpack          (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
 
 /**
- * @def EVAS_OBJECT_BOX_API_INIT_VERSION
- * Initializer to zero a whole Evas_Object_Box_Api structure and set version.
+ * Faster way to remove all child objects from a table object.
  *
- * Similar to EVAS_OBJECT_BOX_API_INIT_NULL, but will set version field of
- * Evas_Smart_Class (base field) to latest EVAS_SMART_CLASS_VERSION
+ * @param o The given table object.
+ * @param clear if true, it will delete just removed children.
+ */
+EAPI void                                evas_object_table_clear           (Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1);
+
+
+/**
+ * Get the number of columns and rows this table takes.
  *
- * @see EVAS_OBJECT_BOX_API_INIT_NULL
- * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
- * @see EVAS_OBJECT_BOX_API_INIT
- * @ingroup Evas_Object_Box
+ * @note columns and rows are virtual entities, one can specify a table
+ *       with a single object that takes 4 columns and 5 rows. The only
+ *       difference for a single cell table is that paddings will be
+ *       accounted proportionally.
+ */
+EAPI void                                evas_object_table_col_row_size_get(const Evas_Object *o, int *cols, int *rows) EINA_ARG_NONNULL(1);
+
+/**
+ * Get an iterator to walk the list of children for the table.
+ *
+ * @note Do not remove or delete objects while walking the list.
+ */
+EAPI Eina_Iterator                      *evas_object_table_iterator_new    (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+
+/**
+ * Get an accessor to get random access to the list of children for the table.
+ *
+ * @note Do not remove or delete objects while walking the list.
+ */
+EAPI Eina_Accessor                      *evas_object_table_accessor_new    (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+
+/**
+ * Get the list of children for the table.
+ *
+ * @note This is a duplicate of the list kept by the table internally.
+ *       It's up to the user to destroy it when it no longer needs it.
+ *       It's possible to remove objects from the table when walking this
+ *       list, but these removals won't be reflected on it.
+ */
+EAPI Eina_List                          *evas_object_table_children_get    (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+   EAPI Evas_Object                        *evas_object_table_child_get       (const Evas_Object *o, unsigned short col, unsigned short row) EINA_ARG_NONNULL(1);
+   
+/**
+ * @defgroup Evas_Object_Grid Grid Smart Object.
+ *
+ * Convenience smart object that packs children using a regular grid
+ * layout using Their virtual grid location and size to determine
+ * position inside the grid object
+ *
+ * @ingroup Evas_Smart_Object_Group
+ * @since 1.1.0
+ */
+
+/**
+ * Create a new grid.
+ *
+ * It's set to a virtual size of 1x1 by default and add children with
+ * evas_object_grid_pack().
+ * @since 1.1.0
  */
-#define EVAS_OBJECT_BOX_API_INIT_VERSION EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_VERSION)
+EAPI Evas_Object                        *evas_object_grid_add             (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
 
 /**
- * @def EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
- * Initializer to zero a whole Evas_Object_Box_Api structure and set
- * name and version.
- *
- * Similar to EVAS_OBJECT_BOX_API_INIT_NULL, but will set version field of
- * Evas_Smart_Class (base field) to latest EVAS_SMART_CLASS_VERSION and name
- * to the specific value.
+ * Create a grid that is child of a given element @a parent.
  *
- * It will keep a reference to name field as a "const char *", that is,
- * name must be available while the structure is used (hint: static or global!)
- * and will not be modified.
+ * @see evas_object_grid_add()
+ * @since 1.1.0
+ */
+EAPI Evas_Object                        *evas_object_grid_add_to          (Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+
+/**
+ * Set the virtual resolution for the grid
  *
- * @see EVAS_OBJECT_BOX_API_INIT_NULL
- * @see EVAS_OBJECT_BOX_API_INIT_VERSION
- * @see EVAS_OBJECT_BOX_API_INIT
- * @ingroup Evas_Object_Box
+ * @param o The grid object to modify
+ * @param w The virtual horizontal size (resolution) in integer units
+ * @param h The virtual vertical size (resolution) in integer units
+ * @since 1.1.0
  */
-#define EVAS_OBJECT_BOX_API_INIT_NAME_VERSION(name) EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name))
+EAPI void                                evas_object_grid_size_set        (Evas_Object *o, int w, int h) EINA_ARG_NONNULL(1);
 
 /**
- * @struct _Evas_Object_Box_Data
+ * Get the current virtual resolution
  *
- * This structure augments clipped smart object's instance data,
- * providing extra members required by generic box implementation. If
- * a subclass inherits from #Evas_Object_Box_Api then it may augment
- * #Evas_Object_Box_Data to fit its own needs.
+ * @param o The grid object to query
+ * @param w A pointer to an integer to store the virtual width
+ * @param h A pointer to an integer to store the virtual height
+ * @see evas_object_grid_size_set()
+ * @since 1.1.0
+ */
+EAPI void                                evas_object_grid_size_get        (const Evas_Object *o, int *w, int *h) EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
+ * Sets the mirrored mode of the grid. In mirrored mode the grid items go
+ * from right to left instead of left to right. That is, 0,0 is top right, not
+ * to left.
  *
- * @extends Evas_Object_Smart_Clipped_Data
- * @ingroup Evas_Object_Box
+ * @param obj The grid object.
+ * @param mirrored the mirrored mode to set
+ * @since 1.1.0
  */
-   struct _Evas_Object_Box_Data
-   {
-      Evas_Object_Smart_Clipped_Data   base;
-      const Evas_Object_Box_Api       *api;
-      struct {
-        double                        h, v;
-      } align;
-      struct {
-        Evas_Coord                    h, v;
-      } pad;
-      Eina_List                       *children;
-      struct {
-        Evas_Object_Box_Layout        cb;
-        void                         *data;
-        void                        (*free_data)(void *data);
-      } layout;
-      Eina_Bool                        layouting : 1;
-      Eina_Bool                        children_changed : 1;
-   };
+EAPI void                                evas_object_grid_mirrored_set    (Evas_Object *o, Eina_Bool mirrored) EINA_ARG_NONNULL(1);
 
-   struct _Evas_Object_Box_Option
-   {
-      Evas_Object *obj;
-      Eina_Bool    max_reached:1;
-      Eina_Bool    min_reached:1;
-      Evas_Coord   alloc_size;
-   };
+/**
+ * Gets the mirrored mode of the grid.
+ *
+ * @param obj The grid object.
+ * @return EINA_TRUE if it's a mirrored grid, EINA_FALSE otherwise.
+ * @see evas_object_grid_mirrored_set()
+ * @since 1.1.0
+ */
+EAPI Eina_Bool                           evas_object_grid_mirrored_get    (const Evas_Object *o) EINA_ARG_NONNULL(1);
 
-   EAPI void                       evas_object_box_smart_set                             (Evas_Object_Box_Api *api) EINA_ARG_NONNULL(1);
-   EAPI const Evas_Object_Box_Api *evas_object_box_smart_class_get                       (void) EINA_CONST;
-   EAPI void                       evas_object_box_layout_set                            (Evas_Object *o, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data)) EINA_ARG_NONNULL(1, 2);
-
-   EAPI Evas_Object               *evas_object_box_add                                   (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-   EAPI Evas_Object               *evas_object_box_add_to                                (Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-
-   EAPI void                       evas_object_box_layout_horizontal                     (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void                       evas_object_box_layout_vertical                       (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void                       evas_object_box_layout_homogeneous_vertical           (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void                       evas_object_box_layout_homogeneous_horizontal         (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void                       evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void                       evas_object_box_layout_homogeneous_max_size_vertical  (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void                       evas_object_box_layout_flow_horizontal                (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void                       evas_object_box_layout_flow_vertical                  (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
-   EAPI void                       evas_object_box_layout_stack                          (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
-
-   EAPI void                       evas_object_box_align_set                             (Evas_Object *o, double horizontal, double vertical) EINA_ARG_NONNULL(1);
-   EAPI void                       evas_object_box_align_get                             (const Evas_Object *o, double *horizontal, double *vertical) EINA_ARG_NONNULL(1);
-   EAPI void                       evas_object_box_padding_set                           (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1);
-   EAPI void                       evas_object_box_padding_get                           (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1);
-
-   EAPI Evas_Object_Box_Option    *evas_object_box_append                                (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
-   EAPI Evas_Object_Box_Option    *evas_object_box_prepend                               (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
-   EAPI Evas_Object_Box_Option    *evas_object_box_insert_before                         (Evas_Object *o, Evas_Object *child, const Evas_Object *reference) EINA_ARG_NONNULL(1, 2, 3);
-   EAPI Evas_Object_Box_Option    *evas_object_box_insert_after                          (Evas_Object *o, Evas_Object *child, const Evas_Object *referente) EINA_ARG_NONNULL(1, 2, 3);
-   EAPI Evas_Object_Box_Option    *evas_object_box_insert_at                             (Evas_Object *o, Evas_Object *child, unsigned int pos) EINA_ARG_NONNULL(1, 2);
-   EAPI Eina_Bool                  evas_object_box_remove                                (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
-   EAPI Eina_Bool                  evas_object_box_remove_at                             (Evas_Object *o, unsigned int pos) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                  evas_object_box_remove_all                            (Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1);
-   EAPI Eina_Iterator             *evas_object_box_iterator_new                          (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-   EAPI Eina_Accessor             *evas_object_box_accessor_new                          (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-   EAPI Eina_List                 *evas_object_box_children_get                          (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-
-   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 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 Eina_Bool                  evas_object_box_option_property_set                   (Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2);
-   EAPI Eina_Bool                  evas_object_box_option_property_vset                  (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) EINA_ARG_NONNULL(1, 2);
-   EAPI Eina_Bool                  evas_object_box_option_property_get                   (Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2);
-   EAPI Eina_Bool                  evas_object_box_option_property_vget                  (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) EINA_ARG_NONNULL(1, 2);
+/**
+ * Add a new child to a grid object.
+ *
+ * @param o The given grid object.
+ * @param child The child object to add.
+ * @param x The virtual x coordinate of the child
+ * @param y The virtual y coordinate of the child
+ * @param w The virtual width of the child
+ * @param h The virtual height of the child
+ * @return 1 on success, 0 on failure.
+ * @since 1.1.0
+ */
+EAPI Eina_Bool                           evas_object_grid_pack            (Evas_Object *o, Evas_Object *child, int x, int y, int w, int h) EINA_ARG_NONNULL(1, 2);
 
 /**
- * @defgroup Evas_Object_Table Table Smart Object.
+ * Remove child from grid.
  *
- * Convenience smart object that packs children using a tabular
- * layout using children size hints to define their size and
- * alignment inside their cell space.
+ * @note removing a child will immediately call a walk over children in order
+ *       to recalculate numbers of columns and rows. If you plan to remove
+ *       all children, use evas_object_grid_clear() instead.
  *
- * @see @ref Evas_Object_Group_Size_Hints
+ * @return 1 on success, 0 on failure.
+ * @since 1.1.0
+ */
+EAPI Eina_Bool                           evas_object_grid_unpack          (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Faster way to remove all child objects from a grid object.
  *
- * @ingroup Evas_Smart_Object_Group
+ * @param o The given grid object.
+ * @param clear if true, it will delete just removed children.
+ * @since 1.1.0
  */
-   EAPI Evas_Object                        *evas_object_table_add             (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-   EAPI Evas_Object                        *evas_object_table_add_to          (Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-   EAPI void                                evas_object_table_homogeneous_set (Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous) EINA_ARG_NONNULL(1);
-   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 void                                evas_object_table_padding_set     (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1);
-   EAPI void                                evas_object_table_padding_get     (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1);
-   EAPI void                                evas_object_table_align_set       (Evas_Object *o, double horizontal, double vertical) EINA_ARG_NONNULL(1);
-   EAPI void                                evas_object_table_align_get       (const Evas_Object *o, double *horizontal, double *vertical) EINA_ARG_NONNULL(1);
-   EAPI void                                evas_object_table_mirrored_set    (Evas_Object *o, Eina_Bool mirrored) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool                           evas_object_table_mirrored_get    (const Evas_Object *o) EINA_ARG_NONNULL(1);
-
-   EAPI Eina_Bool                           evas_object_table_pack            (Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) EINA_ARG_NONNULL(1, 2);
-   EAPI Eina_Bool                           evas_object_table_unpack          (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
-   EAPI void                                evas_object_table_clear           (Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1);
-
-   EAPI void                                evas_object_table_col_row_size_get(const Evas_Object *o, int *cols, int *rows) EINA_ARG_NONNULL(1);
-   EAPI Eina_Iterator                      *evas_object_table_iterator_new    (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-   EAPI Eina_Accessor                      *evas_object_table_accessor_new    (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-   EAPI Eina_List                          *evas_object_table_children_get    (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
-   EAPI Evas_Object                        *evas_object_table_child_get       (const Evas_Object *o, unsigned short col, unsigned short row) EINA_ARG_NONNULL(1);
+EAPI void                                evas_object_grid_clear           (Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1);
+
+/**
+ * Get the pack options for a grid child
+ * 
+ * Get the pack x, y, width and height in virtual coordinates set by
+ * evas_object_grid_pack()
+ * @param o The grid object
+ * @param child The grid child to query for coordinates
+ * @param x The pointer to where the x coordinate will be returned
+ * @param y The pointer to where the y coordinate will be returned
+ * @param w The pointer to where the width will be returned
+ * @param h The pointer to where the height will be returned
+ * @return 1 on success, 0 on failure.
+ * @since 1.1.0
+ */
+EAPI Eina_Bool                           evas_object_grid_pack_get        (Evas_Object *o, Evas_Object *child, int *x, int *y, int *w, int *h);
+         
+/**
+ * Get an iterator to walk the list of children for the grid.
+ *
+ * @note Do not remove or delete objects while walking the list.
+ * @since 1.1.0
+ */
+EAPI Eina_Iterator                      *evas_object_grid_iterator_new    (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
 
-   EAPI Eina_Bool                            evas_object_image_source_set     (Evas_Object *o, Evas_Object *source);
-   EAPI Evas_Object                         *evas_object_image_source_get     (Evas_Object *o);
-   EAPI Eina_Bool                            evas_object_image_source_unset   (Evas_Object *o);
+/**
+ * Get an accessor to get random access to the list of children for the grid.
+ *
+ * @note Do not remove or delete objects while walking the list.
+ * @since 1.1.0
+ */
+EAPI Eina_Accessor                      *evas_object_grid_accessor_new    (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
 
 /**
+ * Get the list of children for the grid.
+ *
+ * @note This is a duplicate of the list kept by the grid internally.
+ *       It's up to the user to destroy it when it no longer needs it.
+ *       It's possible to remove objects from the grid when walking this
+ *       list, but these removals won't be reflected on it.
+ * @since 1.1.0
+ */
+EAPI Eina_List                          *evas_object_grid_children_get    (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+         
+/**
  * @defgroup Evas_Cserve Shared Image Cache Server
  *
  * Provides client-server infrastructure to share bitmaps across
@@ -2185,13 +8389,55 @@ struct _Evas_Smart_Cb_Description
         int cache_item_timeout_check;
      };
 
-   EAPI Eina_Bool         evas_cserve_want_get                   (void) EINA_WARN_UNUSED_RESULT EINA_PURE;
-   EAPI Eina_Bool         evas_cserve_connected_get              (void) EINA_WARN_UNUSED_RESULT;
-   EAPI Eina_Bool         evas_cserve_stats_get                  (Evas_Cserve_Stats *stats) EINA_WARN_UNUSED_RESULT;
+
+/**
+ * Retrieves if the system wants to share bitmaps using the server.
+ * @return @c EINA_TRUE if wants, @c EINA_FALSE otherwise.
+ * @ingroup Evas_Cserve
+ */
+EAPI Eina_Bool         evas_cserve_want_get                   (void) EINA_WARN_UNUSED_RESULT EINA_PURE;
+
+/**
+ * Retrieves if the system is connected to the server used to shae bitmaps.
+ * @return @c EINA_TRUE if connected, @c EINA_FALSE otherwise.
+ * @ingroup Evas_Cserve
+ */
+EAPI Eina_Bool         evas_cserve_connected_get              (void) EINA_WARN_UNUSED_RESULT;
+
+/**
+ * Retrieves if the system wants to share bitmaps using the server.
+ * @param stats pointer to structure to fill with statistics about
+ *        cache server.
+ * @return @c EINA_TRUE if @p stats were filled with data,
+ *         @c EINA_FALSE otherwise and @p stats is untouched.
+ * @ingroup Evas_Cserve
+ */
+EAPI Eina_Bool         evas_cserve_stats_get                  (Evas_Cserve_Stats *stats) EINA_WARN_UNUSED_RESULT;
    EAPI void              evas_cserve_image_cache_contents_clean (Evas_Cserve_Image_Cache *cache) EINA_PURE;
-   EAPI Eina_Bool         evas_cserve_config_get                 (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 EINA_PURE;
-   EAPI void              evas_cserve_disconnect                 (void);
+
+/**
+ * Retrieves the current configuration of the server.
+ * @param config where to store current server configuration.
+ * @return @c EINA_TRUE if @p config were filled with data,
+ *         @c EINA_FALSE otherwise and @p config is untouched.
+ * @ingroup Evas_Cserve
+ */
+EAPI Eina_Bool         evas_cserve_config_get                 (Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE;
+
+/**
+ * Changes the configuration of the server.
+ * @param config where to store current server configuration.
+ * @return @c EINA_TRUE if @p config were successfully applied,
+ *         @c EINA_FALSE otherwise.
+ * @ingroup Evas_Cserve
+ */
+EAPI Eina_Bool         evas_cserve_config_set                 (const Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE;
+
+/**
+ * Force system to disconnect from cache server.
+ * @ingroup Evas_Cserve
+ */
+EAPI void              evas_cserve_disconnect                 (void);
 
 /**
  * @defgroup Evas_Utils General Utilities
@@ -2199,51 +8445,557 @@ struct _Evas_Smart_Cb_Description
  * Some functions that are handy but are not specific of canvas or
  * objects.
  */
-   EAPI const char       *evas_load_error_str               (Evas_Load_Error error);
+
+/**
+ * Converts the given Evas image load error code into a string
+ * describing it in english.
+ *
+ * @param error the error code, a value in ::Evas_Load_Error.
+ * @return Always returns a valid string. If the given @p error is not
+ *         supported, <code>"Unknown error"</code> is returned.
+ *
+ * Mostly evas_object_image_file_set() would be the function setting
+ * that error value afterwards, but also evas_object_image_load(),
+ * evas_object_image_save(), evas_object_image_data_get(),
+ * evas_object_image_data_convert(), evas_object_image_pixels_import()
+ * and evas_object_image_is_inside(). This function is meant to be
+ * used in conjunction with evas_object_image_load_error_get(), as in:
+ *
+ * Example code:
+ * @dontinclude evas-load-error-str.c
+ * @skip img1 =
+ * @until ecore_main_loop_begin(
+ *
+ * Here, being @c valid_path the path to a valid image and @c
+ * bogus_path a path to a file which does not exist, the two outputs
+ * of evas_load_error_str() would be (if no other errors occur):
+ * <code>"No error on load"</code> and <code>"File (or file path) does
+ * not exist"</code>, respectively. See the full @ref
+ * Example_Evas_Load_Error_Str "example".
+ *
+ * @ingroup Evas_Utils
+ */
+EAPI const char       *evas_load_error_str               (Evas_Load_Error error);
 
 /* Evas utility routines for color space conversions */
 /* hsv color space has h in the range 0.0 to 360.0, and s,v in the range 0.0 to 1.0 */
 /* rgb color space has r,g,b in the range 0 to 255 */
-   EAPI void              evas_color_hsv_to_rgb             (float h, float s, float v, int *r, int *g, int *b);
-   EAPI void              evas_color_rgb_to_hsv             (int r, int g, int b, float *h, float *s, float *v);
+
+/**
+ * Convert a given color from HSV to RGB format.
+ *
+ * @param h The Hue component of the color.
+ * @param s The Saturation component of the color.
+ * @param v The Value component of the color.
+ * @param r The Red component of the color.
+ * @param g The Green component of the color.
+ * @param b The Blue component of the color.
+ *
+ * This function converts a given color in HSV color format to RGB
+ * color format.
+ *
+ * @ingroup Evas_Utils
+ **/
+EAPI void              evas_color_hsv_to_rgb             (float h, float s, float v, int *r, int *g, int *b);
+
+/**
+ * Convert a given color from RGB to HSV format.
+ *
+ * @param r The Red component of the color.
+ * @param g The Green component of the color.
+ * @param b The Blue component of the color.
+ * @param h The Hue component of the color.
+ * @param s The Saturation component of the color.
+ * @param v The Value component of the color.
+ *
+ * This function converts a given color in RGB color format to HSV
+ * color format.
+ *
+ * @ingroup Evas_Utils
+ **/
+EAPI void              evas_color_rgb_to_hsv             (int r, int g, int b, float *h, float *s, float *v);
 
 /* argb color space has a,r,g,b in the range 0 to 255 */
-   EAPI void              evas_color_argb_premul            (int a, int *r, int *g, int *b);
-   EAPI void              evas_color_argb_unpremul          (int a, int *r, int *g, int *b);
 
-   EAPI void              evas_data_argb_premul             (unsigned int *data, unsigned int len);
-   EAPI void              evas_data_argb_unpremul           (unsigned int *data, unsigned int len);
+/**
+ * Pre-multiplies a rgb triplet by an alpha factor.
+ *
+ * @param a The alpha factor.
+ * @param r The Red component of the color.
+ * @param g The Green component of the color.
+ * @param b The Blue component of the color.
+ *
+ * This function pre-multiplies a given rbg triplet by an alpha
+ * factor. Alpha factor is used to define transparency.
+ *
+ * @ingroup Evas_Utils
+ **/
+EAPI void              evas_color_argb_premul            (int a, int *r, int *g, int *b);
+
+/**
+ * Undo pre-multiplication of a rgb triplet by an alpha factor.
+ *
+ * @param a The alpha factor.
+ * @param r The Red component of the color.
+ * @param g The Green component of the color.
+ * @param b The Blue component of the color.
+ *
+ * This function undoes pre-multiplication a given rbg triplet by an
+ * alpha factor. Alpha factor is used to define transparency.
+ *
+ * @see evas_color_argb_premul().
+ *
+ * @ingroup Evas_Utils
+ **/
+EAPI void              evas_color_argb_unpremul          (int a, int *r, int *g, int *b);
+
+
+/**
+ * Pre-multiplies data by an alpha factor.
+ *
+ * @param data The data value.
+ * @param len  The length value.
+ *
+ * This function pre-multiplies a given data by an alpha
+ * factor. Alpha factor is used to define transparency.
+ *
+ * @ingroup Evas_Utils
+ **/
+EAPI void              evas_data_argb_premul             (unsigned int *data, unsigned int len);
+
+/**
+ * Undo pre-multiplication data by an alpha factor.
+ *
+ * @param data The data value.
+ * @param len  The length value.
+ *
+ * This function undoes pre-multiplication of a given data by an alpha
+ * factor. Alpha factor is used to define transparency.
+ *
+ * @ingroup Evas_Utils
+ **/
+EAPI void              evas_data_argb_unpremul           (unsigned int *data, unsigned int len);
 
 /* string and font handling */
-   EAPI int               evas_string_char_next_get         (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1);
-   EAPI int               evas_string_char_prev_get         (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1);
-   EAPI int               evas_string_char_len_get          (const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
 
 /**
- * TO BE DOCUMENTED:
- * @todo document key modifiers.
+ * Gets the next character in the string
+ *
+ * Given the UTF-8 string in @p str, and starting byte position in @p pos,
+ * this function will place in @p decoded the decoded code point at @p pos
+ * and return the byte index for the next character in the string.
+ *
+ * The only boundary check done is that @p pos must be >= 0. Other than that,
+ * no checks are performed, so passing an index value that's not within the
+ * length of the string will result in undefined behavior.
+ *
+ * @param str The UTF-8 string
+ * @param pos The byte index where to start
+ * @param decoded Address where to store the decoded code point. Optional.
+ *
+ * @return The byte index of the next character
+ *
+ * @ingroup Evas_Utils
+ */
+EAPI int               evas_string_char_next_get         (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1);
+
+/**
+ * Gets the previous character in the string
+ *
+ * Given the UTF-8 string in @p str, and starting byte position in @p pos,
+ * this function will place in @p decoded the decoded code point at @p pos
+ * and return the byte index for the previous character in the string.
+ *
+ * The only boundary check done is that @p pos must be >= 1. Other than that,
+ * no checks are performed, so passing an index value that's not within the
+ * length of the string will result in undefined behavior.
+ *
+ * @param str The UTF-8 string
+ * @param pos The byte index where to start
+ * @param decoded Address where to store the decoded code point. Optional.
+ *
+ * @return The byte index of the previous character
+ *
+ * @ingroup Evas_Utils
+ */
+EAPI int               evas_string_char_prev_get         (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1);
+
+/**
+ * Get the length in characters of the string.
+ * @param  str The string to get the length of.
+ * @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;
+
+/**
+ * @defgroup Evas_Keys Key Input Functions
+ *
+ * Functions which feed key events to the canvas.
+ *
+ * As explained in @ref intro_not_evas, Evas is <b>not</b> aware of
+ * input systems at all. Then, the user, if using it crudely
+ * (evas_new()), will have to feed it with input events, so that it
+ * can react somehow. If, however, the user creates a canvas by means
+ * of the Ecore_Evas wrapper, it will automatically bind the chosen
+ * display engine's input events to the canvas, for you.
+ *
+ * This group presents the functions dealing with the feeding of key
+ * events to the canvas. On most of them, one has to reference a given
+ * key by a name (<code>keyname</code> argument). Those are
+ * <b>platform dependent</b> symbolic names for the keys. Sometimes
+ * you'll get the right <code>keyname</code> by simply using an ASCII
+ * value of the key name, but it won't be like that always.
+ *
+ * Typical platforms are Linux frame buffer (Ecore_FB) and X server
+ * (Ecore_X) when using Evas with Ecore and Ecore_Evas. Please refer
+ * to your display engine's documentation when using evas through an
+ * Ecore helper wrapper when you need the <code>keyname</code>s.
+ *
+ * Example:
+ * @dontinclude evas-events.c
+ * @skip mods = evas_key_modifier_get(evas);
+ * @until {
+ *
+ * All the other @c evas_key functions behave on the same manner. See
+ * the full @ref Example_Evas_Events "example".
+ *
+ * @ingroup Evas_Canvas
+ */
+
+/**
+ * @addtogroup Evas_Keys
+ * @{
+ */
+
+/**
+ * Returns a handle to the list of modifier keys registered in the
+ * canvas @p e. This is required to check for which modifiers are set
+ * at a given time with the evas_key_modifier_is_set() function.
+ *
+ * @param e The pointer to the Evas canvas
+ *
+ * @see evas_key_modifier_add
+ * @see evas_key_modifier_del
+ * @see evas_key_modifier_on
+ * @see evas_key_modifier_off
+ * @see evas_key_modifier_is_set
+ *
+ * @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;
+
+/**
+ * Returns a handle to the list of lock keys registered in the canvas
+ * @p e. This is required to check for which locks are set at a given
+ * time with the evas_key_lock_is_set() function.
+ *
+ * @param e The pointer to the Evas canvas
+ *
+ * @see evas_key_lock_add
+ * @see evas_key_lock_del
+ * @see evas_key_lock_on
+ * @see evas_key_lock_off
+ * @see evas_key_lock_is_set
+ *
+ * @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;
+
+
+/**
+ * Checks the state of a given modifier key, at the time of the
+ * call. If the modifier is set, such as shift being pressed, this
+ * function returns @c Eina_True.
+ *
+ * @param m The current modifiers set, as returned by
+ *        evas_key_modifier_get().
+ * @param keyname The name of the modifier key to check status for.
+ *
+ * @return @c Eina_True if the modifier key named @p keyname is on, @c
+ *         Eina_False otherwise.
+ *
+ * @see evas_key_modifier_add
+ * @see evas_key_modifier_del
+ * @see evas_key_modifier_get
+ * @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;
+
+
+/**
+ * Checks the state of a given lock key, at the time of the call. If
+ * the lock is set, such as caps lock, this function returns @c
+ * Eina_True.
+ *
+ * @param l The current locks set, as returned by evas_key_lock_get().
+ * @param keyname The name of the lock key to check status for.
+ *
+ * @return @c Eina_True if the @p keyname lock key is set, @c
+ *        Eina_False otherwise.
+ *
+ * @see evas_key_lock_get
+ * @see evas_key_lock_add
+ * @see evas_key_lock_del
+ * @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;
+
+
+/**
+ * Adds the @p keyname key to the current list of modifier keys.
+ *
+ * @param e The pointer to the Evas canvas
+ * @param keyname The name of the modifier key to add to the list of
+ *        Evas modifiers.
+ *
+ * Modifiers are keys like shift, alt and ctrl, i.e., keys which are
+ * meant to be pressed together with others, altering the behavior of
+ * the secondly pressed keys somehow. Evas is so that these keys can
+ * be user defined.
+ *
+ * This call allows custom modifiers to be added to the Evas system at
+ * run time. It is then possible to set and unset modifier keys
+ * programmatically for other parts of the program to check and act
+ * on. Programmers using Evas would check for modifier keys on key
+ * event callbacks using evas_key_modifier_is_set().
+ *
+ * @see evas_key_modifier_del
+ * @see evas_key_modifier_get
+ * @see evas_key_modifier_on
+ * @see evas_key_modifier_off
+ * @see evas_key_modifier_is_set
+ *
+ * @note If the programmer instantiates the canvas by means of the
+ *       ecore_evas_new() family of helper functions, Ecore will take
+ *       care of registering on it all standard modifiers: "Shift",
+ *       "Control", "Alt", "Meta", "Hyper", "Super".
+ */
+EAPI void                 evas_key_modifier_add          (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Removes the @p keyname key from the current list of modifier keys
+ * on canvas @e.
+ *
+ * @param e The pointer to the Evas canvas
+ * @param keyname The name of the key to remove from the modifiers list.
+ *
+ * @see evas_key_modifier_add
+ * @see evas_key_modifier_get
+ * @see evas_key_modifier_on
+ * @see evas_key_modifier_off
+ * @see evas_key_modifier_is_set
+ */
+EAPI void                 evas_key_modifier_del          (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Adds the @p keyname key to the current list of lock keys.
+ *
+ * @param e The pointer to the Evas canvas
+ * @param keyname The name of the key to add to the locks list.
+ *
+ * Locks are keys like caps lock, num lock or scroll lock, i.e., keys
+ * which are meant to be pressed once -- toggling a binary state which
+ * is bound to it -- and thus altering the behavior of all
+ * subsequently pressed keys somehow, depending on its state. Evas is
+ * so that these keys can be defined by the user.
+ *
+ * This allows custom locks to be added to the evas system at run
+ * time. It is then possible to set and unset lock keys
+ * programmatically for other parts of the program to check and act
+ * on. Programmers using Evas would check for lock keys on key event
+ * callbacks using evas_key_lock_is_set().
+ *
+ * @see evas_key_lock_get
+ * @see evas_key_lock_del
+ * @see evas_key_lock_on
+ * @see evas_key_lock_off
+ * @see evas_key_lock_is_set
+ *
+ * @note If the programmer instantiates the canvas by means of the
+ *       ecore_evas_new() family of helper functions, Ecore will take
+ *       care of registering on it all standard lock keys: "Caps_Lock",
+ *       "Num_Lock", "Scroll_Lock".
+ */
+EAPI void                 evas_key_lock_add              (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Removes the @p keyname key from the current list of lock keys on
+ * canvas @e.
+ *
+ * @param e The pointer to the Evas canvas
+ * @param keyname The name of the key to remove from the locks list.
+ *
+ * @see evas_key_lock_get
+ * @see evas_key_lock_add
+ * @see evas_key_lock_on
+ * @see evas_key_lock_off
+ */
+EAPI void                 evas_key_lock_del              (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
+
+
+/**
+ * Enables or turns on programmatically the modifier key with name @p
+ * keyname.
+ *
+ * @param e The pointer to the Evas canvas
+ * @param keyname The name of the modifier to enable.
+ *
+ * The effect will be as if the key was pressed for the whole time
+ * between this call and a matching evas_key_modifier_off().
+ *
+ * @see evas_key_modifier_add
+ * @see evas_key_modifier_get
+ * @see evas_key_modifier_off
+ * @see evas_key_modifier_is_set
+ */
+EAPI void                 evas_key_modifier_on           (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Disables or turns off programmatically the modifier key with name
+ * @p keyname.
+ *
+ * @param e The pointer to the Evas canvas
+ * @param keyname The name of the modifier to disable.
+ *
+ * @see evas_key_modifier_add
+ * @see evas_key_modifier_get
+ * @see evas_key_modifier_on
+ * @see evas_key_modifier_is_set
+ */
+EAPI void                 evas_key_modifier_off          (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Enables or turns on programmatically the lock key with name @p
+ * keyname.
+ *
+ * @param e The pointer to the Evas canvas
+ * @param keyname The name of the lock to enable.
+ *
+ * The effect will be as if the key was put on its active state after
+ * this call.
+ *
+ * @see evas_key_lock_get
+ * @see evas_key_lock_add
+ * @see evas_key_lock_del
+ * @see evas_key_lock_off
+ */
+EAPI void                 evas_key_lock_on               (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Disables or turns off programmatically the lock key with name @p
+ * keyname.
+ *
+ * @param e The pointer to the Evas canvas
+ * @param keyname The name of the lock to disable.
+ *
+ * The effect will be as if the key was put on its inactive state
+ * after this call.
+ *
+ * @see evas_key_lock_get
+ * @see evas_key_lock_add
+ * @see evas_key_lock_del
+ * @see evas_key_lock_on
+ */
+EAPI void                 evas_key_lock_off              (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
+
+
+/**
+ * Creates a bit mask from the @p keyname <b>modifier</b> key.
+ * Values returned from different calls to it may be ORed together,
+ * naturally.
+ *
+ * @param e The canvas whom to query the bit mask from.
+ * @param keyname The name of the modifier key to create the mask for.
+ *
+ * @returns the bit mask or 0 if the @p keyname key wasn't registered as a
+ *          modifier for canvas @p e.
+ *
+ * This function is meant to be using in conjunction with
+ * evas_object_key_grab()/evas_object_key_ungrab(). Go check their
+ * documentation for more information.
+ *
+ * @see evas_key_modifier_add
+ * @see evas_key_modifier_get
+ * @see evas_key_modifier_on
+ * @see evas_key_modifier_off
+ * @see evas_key_modifier_is_set
+ * @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;
+
+
+/**
+ * Requests @p keyname key events be directed to @p obj.
+ *
+ * Key grabs allow an object to receive key events for specific key
+ * strokes even if another object has focus.  If the grab is
+ * non-exclusive then all objects that have grabs on the key will get
+ * the event, however if the grab is exclusive, no other object can
+ * get a grab on the key and only that object will get the event.
+ *
+ * @p keyname is a platform dependent symbolic name for the key
+ * pressed.  It is sometimes possible to convert the string to an
+ * ASCII value of the key, but not always for example the enter key
+ * may be returned as the string 'Enter'.
+ *
+ * Typical platforms are Linux frame buffer (Ecore_FB) and X server
+ * (Ecore_X) when using Evas with Ecore and Ecore_Evas.
+ *
+ * For a list of keynames for the Linux frame buffer, please refer to
+ * the Ecore_FB documentation.
+ *
+ * @p modifiers and @p not_modifiers are bit masks of all the
+ * modifiers that are required and not required respectively for the
+ * new grab.  Modifiers can be things such as shift and ctrl as well
+ * as user defigned types via evas_key_modifier_add.
+ *
+ * @see evas_object_key_ungrab
+ * @see evas_object_focus_set
+ * @see evas_object_focus_get
+ * @see evas_focus_get
+ * @see evas_key_modifier_add
+ *
+ * @param obj the object to direct @p keyname events to.
+ * @param keyname the key to request events for.
+ * @param modifiers a mask of modifiers that should be present to
+ * trigger the event.
+ * @param not_modifiers a mask of modifiers that should not be present
+ * to trigger the event.
+ * @param exclusive request that the @p obj is the only object
+ * receiving the @p keyname events.
+ * @return Boolean indicating whether the grab succeeded
+ */
+EAPI Eina_Bool            evas_object_key_grab           (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
+
+/**
+ * Request that the grab on @p obj be removed.
+ *
+ * Removes the grab on @p obj if @p keyname, @p modifiers, and @p not_modifiers
+ * match.
+ *
+ * @see evas_object_key_grab
+ * @see evas_object_focus_set
+ * @see evas_object_focus_get
+ * @see evas_focus_get
+ *
+ * @param obj the object that has an existing grab.
+ * @param keyname the key the grab is for.
+ * @param modifiers a mask of modifiers that should be present to
+ * trigger the event.
+ * @param not_modifiers a mask of modifiers that should not be present
+ * to trigger the event.
+ */
+EAPI void                 evas_object_key_ungrab         (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * @}
  */
-   EAPI const Evas_Modifier *evas_key_modifier_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) 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) 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) EINA_PURE;
-   
-   EAPI void                 evas_key_modifier_add          (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
-   EAPI void                 evas_key_modifier_del          (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
-   EAPI void                 evas_key_lock_add              (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
-   EAPI void                 evas_key_lock_del              (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
-   
-   EAPI void                 evas_key_modifier_on           (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
-   EAPI void                 evas_key_modifier_off          (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
-   EAPI void                 evas_key_lock_on               (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
-   EAPI void                 evas_key_lock_off              (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
-   
-   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 Eina_Bool            evas_object_key_grab           (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
-   EAPI void                 evas_object_key_ungrab         (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers) EINA_ARG_NONNULL(1, 2);
 
 #ifdef __cplusplus
 }
diff --git a/src/lib/Evas_GL.h b/src/lib/Evas_GL.h
new file mode 100644 (file)
index 0000000..2fdf4af
--- /dev/null
@@ -0,0 +1,1095 @@
+#ifndef _EVAS_GL_H
+#define _EVAS_GL_H
+
+#include <Evas.h>
+//#include <GL/gl.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup Evas_GL
+ * @{
+ */
+typedef struct _Evas_GL               Evas_GL;
+typedef struct _Evas_GL_Surface       Evas_GL_Surface;
+typedef struct _Evas_GL_Context       Evas_GL_Context;
+typedef struct _Evas_GL_Config        Evas_GL_Config;
+typedef void*                         Evas_GL_Func;
+typedef struct _Evas_GL_API           Evas_GL_API;
+
+typedef enum _Evas_GL_Color_Format
+{
+    EVAS_GL_RGB_8,      // 8 bits per channel
+    EVAS_GL_RGBA_8,
+    EVAS_GL_RGB_32,     // 32-bits per channel
+    EVAS_GL_RGBA_32,
+} Evas_GL_Color_Format;
+
+typedef enum _Evas_GL_Depth_Bits
+{
+    EVAS_GL_DEPTH_BIT_8,
+    EVAS_GL_DEPTH_BIT_16,
+    EVAS_GL_DEPTH_BIT_24,
+    EVAS_GL_DEPTH_BIT_32,
+    EVAS_GL_DEPTH_NONE
+} Evas_GL_Depth_Bits;
+
+typedef enum _Evas_GL_Stencil_Bits
+{
+    EVAS_GL_STENCIL_BIT_1,
+    EVAS_GL_STENCIL_BIT_2,
+    EVAS_GL_STENCIL_BIT_4,
+    EVAS_GL_STENCIL_BIT_8,
+    EVAS_GL_STENCIL_BIT_16,
+    EVAS_GL_STENCIL_NONE
+} Evas_GL_Stencil_Bits;
+
+struct _Evas_GL_Config
+{
+    Evas_GL_Color_Format     color_format;
+    Evas_GL_Depth_Bits       depth_bits;
+    Evas_GL_Stencil_Bits     stencil_bits;
+};
+
+/**
+ * @defgroup Evas_GL Rendering GL on Evas
+ *
+ * Functions that are used to do OpenGL rendering on Evas. Evas allows you
+ * to use OpenGL to render to specially set up image objects (which act as
+ * render target surfaces).
+ * 
+ * Below is an illlustrative example of how to use OpenGL to render to an
+ * object in Evas.
+ * 
+ * @code
+// Simple Evas_GL example
+#include <Ecore_Evas.h>
+#include <Ecore.h>
+#include <Evas_GL.h>
+#include <stdio.h>
+
+// GL related data here..
+typedef struct _GLData
+{
+   Evas_GL_Context *ctx;
+   Evas_GL_Surface *sfc;
+   Evas_GL         *evasgl;
+   Evas_GL_API     *glapi;
+   GLuint           program;
+   GLuint           vtx_shader;
+   GLuint           fgmt_shader;
+   Eina_Bool        initialized : 1;
+} GLData;
+
+// callbacks we want to handle deletion on the object and updates/draws
+static void      on_del       (void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void      on_pixels    (void *data, Evas_Object *obj);
+// demo - animator just to keep ticking over saying to draw the image
+static Eina_Bool on_animate   (void *data);
+// gl stuff
+static int       init_shaders (GLData *gld);
+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_8, 
+        EVAS_GL_DEPTH_NONE, 
+        EVAS_GL_STENCIL_NONE
+     };
+   // a size by default
+   int w = 256, h = 256;
+   // some variables we will use
+   Ecore_Evas  *ee;
+   Evas *canvas;
+   Evas_Object *r1;
+   Evas_Native_Surface ns;
+   GLData *gld = NULL;
+
+   // regular low-leve EFL (ecore+ecore-evas) init. elm is simpler
+   ecore_init();
+   ecore_evas_init();
+   ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 512, 512);
+   ecore_evas_title_set(ee, "Ecore_Evas Template");
+   canvas = ecore_evas_get(ee);
+
+   // alloc a data struct to hold our relevant gl info in
+   if (!(gld = calloc(1, sizeof(GLData)))) return 0;
+   
+   //-//-//-// THIS IS WHERE GL INIT STUFF HAPPENS (ALA EGL)
+   //-//
+   // get the evas gl handle for doing gl things
+   gld->evasgl = evas_gl_new(canvas);
+   gld->glapi = evas_gl_api_get(gld->evasgl);
+   // create a surface and context 
+   gld->sfc = evas_gl_surface_create(gld->evasgl, &config, w, h);
+   gld->ctx = evas_gl_context_create(gld->evasgl, NULL);
+   //-//
+   //-//-//-// END GL INIT BLOB
+
+   // set up the image object. a filled one by default
+   r1 = evas_object_image_filled_add(canvas);
+   // attach important data we need to the object using key names. this just
+   // avoids some global variables and means we can do nice cleanup. you can
+   // avoid this if you are lazy
+   evas_object_data_set(r1, "..gld", gld);
+   // when the object is deleted - call the on_del callback. like the above,
+   // this is just being clean
+   evas_object_event_callback_add(r1, EVAS_CALLBACK_DEL, on_del, NULL);
+   // set up an actual pixel size fot the buffer data. it may be different
+   // to the output size. any windowing system has something like this, just
+   // evas has 2 sizes, a pixel size and the output object size
+   evas_object_image_size_set(r1, w, h);
+   // set up the native surface info to use the context and surface created
+   // above
+
+   //-//-//-// THIS IS WHERE GL INIT STUFF HAPPENS (ALA EGL)
+   //-//
+   evas_gl_native_surface_get(gld->evasgl, gld->sfc, &ns);
+   evas_object_image_native_surface_set(r1, &ns);
+   evas_object_image_pixels_get_callback_set(r1, on_pixels, r1);
+   //-//
+   //-//-//-// END GL INIT BLOB
+
+   // move the image object somewhere, resize it and show it. any windowing
+   // system would need this kind of thing - place a child "window"
+   evas_object_move(r1, 128, 128);
+   evas_object_resize(r1, w, h);
+   evas_object_show(r1);
+
+   // animating - just a demo. as long as you trigger an update on the image
+   // object via evas_object_image_pixels_dirty_set(). any display system,
+   // mainloop siztem etc. will have something of this kind unless it's making
+   // you spin infinitely yourself and invent your own animation mechanism
+   // 
+   // NOTE: if you delete r1, this animator will keep running trying to access
+   // r1 so you'd better delete this animator with ecore_animator_del() or
+   // structure how you do animation differently. you can also attach it like
+   // evasgl, sfc, etc. etc. if this animator is specific to this object
+   // only and delete it in the del handler for the obj.
+   ecore_animator_add(on_animate, r1);
+
+   // finally show the window for the world to see. windowing system generic
+   ecore_evas_show(ee);
+   
+   // begin the mainloop and tick over the animator, handle events etc.
+   // also windowing system generic
+   ecore_main_loop_begin();
+
+   // standard EFL shutdown stuff - generic for most systems, EFL or not
+   ecore_evas_shutdown();
+   ecore_shutdown();
+   return 0;
+}
+
+static void
+on_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+   // on delete of our object clean up some things that don't get auto
+   // celeted for us as they are not intrinsically bound to the image
+   // object as such (you could use the same context and surface across
+   // multiple image objects and re-use the evasgl handle too multiple times.
+   // here we bind them to 1 object only though by doing this.
+   GLData *gld = evas_object_data_get(obj, "..gld");
+   if (!gld) return;
+   Evas_GL_API *gl = gld->glapi;
+   
+   evas_object_data_del(obj, "..gld");
+
+   // Do a make_current before deleting all the GL stuff.
+   evas_gl_make_current(gld->evasgl, gld->sfc, gld->ctx);
+   gl->glDeleteShader(gld->vtx_shader);
+   gl->glDeleteShader(gld->fgmt_shader);
+   gl->glDeleteProgram(gld->program);
+
+   evas_gl_surface_destroy(gld->evasgl, gld->sfc);
+   evas_gl_context_destroy(gld->evasgl, gld->ctx);
+   evas_gl_free(gld->evasgl);
+   free(gld);
+}
+
+static void
+on_pixels(void *data, Evas_Object *obj)
+{
+   // get some variable we need from the object data keys
+   GLData *gld = evas_object_data_get(obj, "..gld");
+   if (!gld) return;
+   Evas_GL_API *gl = gld->glapi;
+   GLfloat vVertices[] = 
+     {
+         0.0f,  0.5f, 0.0f, 
+        -0.5f, -0.5f, 0.0f,
+         0.5f, -0.5f, 0.0f
+     };
+   int w, h;
+
+   // get the image size in case it changed with evas_object_image_size_set()
+   evas_object_image_size_get(obj, &w, &h);
+   // set up the context and surface as the current one
+   evas_gl_make_current(gld->evasgl, gld->sfc, gld->ctx);
+
+   if (!gld->initialized)
+     {
+        if (!init_shaders(gld)) printf("Error Initializing Shaders\n");
+        gld->initialized = EINA_TRUE;
+     }
+
+   // GL Viewport stuff. you can avoid doing this if viewport is all the
+   // same as last frame if you want
+   gl->glViewport(0, 0, w, h);
+
+   // Clear the buffer
+   gl->glClearColor(1.0, 0.0, 0.0, 1);
+   gl->glClear(GL_COLOR_BUFFER_BIT);
+   
+   // Draw a Triangle
+   gl->glEnable(GL_BLEND);
+
+   gl->glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, vVertices);
+   gl->glEnableVertexAttribArray(0);
+
+   gl->glDrawArrays(GL_TRIANGLES, 0, 3);
+   
+   // Optional - Flush the GL pipeline
+   gl->glFlush();
+}
+
+static Eina_Bool
+on_animate(void *data)
+{
+   // just a demo - animate here whenever an animation tick happens and then
+   // mark the image as "dirty" meaning it needs an update next time evas
+   // renders. it will call the pixel get callback then.
+   evas_object_image_pixels_dirty_set(data, EINA_TRUE);
+   return EINA_TRUE; // keep looping
+}
+
+static GLuint
+load_shader(GLData *gld, GLenum type, const char *shader_src)
+{
+   Evas_GL_API *gl = gld->glapi;
+   GLuint shader;
+   GLint compiled = 0;
+
+   // Create the shader object
+   if (!(shader = gl->glCreateShader(type))) return 0;
+   gl->glShaderSource(shader, 1, &shader_src, NULL);
+   // Compile the shader
+   gl->glCompileShader(shader);
+   gl->glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
+
+   if (!compiled) 
+     {
+        GLint len = 0;
+        
+        gl->glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &len);
+        if (len > 1)
+          {
+             char *info = malloc(sizeof(char) * len);
+             
+             if (info)
+               {
+                  gl->glGetShaderInfoLog(shader, len, NULL, info);
+                  printf("Error compiling shader:\n"
+                         "%s\n", info);
+                  free(info);
+               }
+          }
+        gl->glDeleteShader(shader);
+        return 0;
+     }
+   return shader;
+}
+
+// Initialize the shader and program object
+static int 
+init_shaders(GLData *gld)
+{
+   Evas_GL_API *gl = gld->glapi;
+   const char vShaderStr[] =  
+      "attribute vec4 vPosition;    \n"
+      "void main()                  \n"
+      "{                            \n"
+      "   gl_Position = vPosition;  \n"
+      "}                            \n";
+   const char fShaderStr[] =
+      "precision mediump float;                    \n"
+      "void main()                                 \n"
+      "{                                           \n"
+      "  gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n"
+      "}                                           \n";
+   GLint linked = 0;
+
+   // Load the vertex/fragment shaders
+   gld->vtx_shader  = load_shader(gld, GL_VERTEX_SHADER, vShaderStr);
+   gld->fgmt_shader = load_shader(gld, GL_FRAGMENT_SHADER, fShaderStr);
+
+   // Create the program object
+   if (!(gld->program = gl->glCreateProgram())) return 0;
+
+   gl->glAttachShader(gld->program, gld->vtx_shader);
+   gl->glAttachShader(gld->program, gld->fgmt_shader);
+
+   // Bind vPosition to attribute 0   
+   gl->glBindAttribLocation(gld->program, 0, "vPosition");
+   // Link the program
+   gl->glLinkProgram(gld->program);
+   gl->glGetProgramiv(gld->program, GL_LINK_STATUS, &linked);
+
+   if (!linked) 
+     {
+        GLint len = 0;
+        
+        gl->glGetProgramiv(gld->program, GL_INFO_LOG_LENGTH, &len);
+        if (len > 1)
+          {
+             char *info = malloc(sizeof(char) * len);
+             
+             if (info)
+               {
+                  gl->glGetProgramInfoLog(gld->program, len, NULL, info);
+                  printf("Error linking program:\n"
+                         "%s\n", info);
+                  free(info);
+               }
+          }
+        gl->glDeleteProgram(gld->program);
+        return 0;
+     }
+   return 1;
+}
+ * @endcode
+ *
+ * @ingroup Evas_Canvas
+ */
+   
+/**
+ * Creates a new Evas_GL object and returns a handle for gl rendering on efl.
+ *
+ * @param e The given evas canvas OpenGL is to be used on.
+ * @return The created evas_gl object, or NULl on fasilure.
+ */
+EAPI Evas_GL                 *evas_gl_new                (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+   
+/**
+ * Frees the created Evas_GL object.
+ *
+ * @param evas_gl The given Evas_GL object.
+ */
+EAPI void                     evas_gl_free               (Evas_GL *evas_gl) EINA_ARG_NONNULL(1, 2);;
+   
+/**
+ * Creates and returns new Evas_GL_Surface object for GL Rendering.
+ *
+ * @param evas_gl The given Evas_GL object.
+ * @param config The pixel format and configuration of the rendering surface.
+ * @param width The width of the surface.
+ * @param height The height of the surface.
+ * @return The created GL surface object, or NULL on failure.
+ */
+EAPI Evas_GL_Surface         *evas_gl_surface_create     (Evas_GL *evas_gl, Evas_GL_Config *cfg, int w, int h) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1,2);
+   
+/**
+ * Destroys the created Evas GL Surface.
+ *
+ * @param evas_gl The given Evas_GL object.
+ * @param surf The given GL surface object.
+ */
+EAPI void                     evas_gl_surface_destroy    (Evas_GL *evas_gl, Evas_GL_Surface *surf) EINA_ARG_NONNULL(1,2); 
+   
+/**
+ * Creates and returns a new Evas GL context object
+ *
+ * @param evas_gl The given Evas_GL object.
+ * @return The created context, or NULL on failure.
+ */
+EAPI Evas_GL_Context         *evas_gl_context_create     (Evas_GL *evas_gl, Evas_GL_Context *share_ctx) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); 
+   
+/**
+ * Destroys the given Evas GL context object
+ *
+ * @param evas_gl The given Evas_GL object.
+ * @param ctx The given Evas GL context.
+ */
+EAPI void                     evas_gl_context_destroy    (Evas_GL *evas_gl, Evas_GL_Context *ctx) EINA_ARG_NONNULL(1,2); 
+   
+/**
+ * Sets the given context as a current context for the given surface
+ *
+ * @param evas_gl The given Evas_GL object.
+ * @param surf The given Evas GL surface.
+ * @param ctx The given Evas GL context.
+ * @return EINA_TRUE if successful, EINA_FALSE if not.
+ */
+EAPI Eina_Bool                evas_gl_make_current       (Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_GL_Context *ctx) EINA_ARG_NONNULL(1,2);
+   
+/**
+ * Returns a GL or the Glue Layer's extension function.
+ *
+ * @param evas_gl The given Evas_GL object.
+ * @param name The name of the function to return.
+ */
+EAPI Evas_GL_Func             evas_gl_proc_address_get   (Evas_GL *evas_gl, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1,2) EINA_PURE;
+
+   
+/**
+ * Fills in the Native Surface information from the given Evas GL surface.
+ *
+ * @param evas_gl The given Evas_GL object.
+ * @param surf The given Evas GL surface to retrieve the Native Surface info from.
+ * @param ns The native surface structure that the function fills in.
+ * @return EINA_TRUE if successful, EINA_FALSE if not.
+ */
+EAPI Eina_Bool                evas_gl_native_surface_get (Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_Native_Surface *ns) EINA_ARG_NONNULL(1,2,3);
+
+/**
+ * Get the API for rendering using OpenGL
+ * 
+ * @param evas_gl The given Eva_GL object.
+ * @return The API to use.
+ * 
+ * This returns a structure that contains all the OpenGL functions you can
+ * use to render in Evas. These functions consist of all the standard
+ * OpenGL-ES2.0 functions and any extra ones Evas has decided to provide in
+ * addition. This means that if you have your code ported to OpenGL-ES2.0,
+ * it will be easy to render to Evas.
+ * 
+ */
+EAPI Evas_GL_API             *evas_gl_api_get            (Evas_GL *evas_gl) EINA_ARG_NONNULL(1);
+
+#if !defined(__gl_h_) && !defined(__gl2_h_)
+# define __gl_h_
+# define __gl2_h_
+   
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+/*-------------------------------------------------------------------------
+ * Data type definitions
+ *-----------------------------------------------------------------------*/
+
+typedef void             GLvoid;
+typedef unsigned int     GLenum;
+typedef unsigned char    GLboolean;
+typedef unsigned int     GLbitfield;
+typedef signed char      GLbyte;       // Changed khronos_int8_t
+typedef short            GLshort;
+typedef int              GLint;
+typedef int              GLsizei;
+typedef unsigned char    GLubyte;      // Changed khronos_uint8_t
+typedef unsigned short   GLushort;
+typedef unsigned int     GLuint;
+typedef float            GLfloat;      // Changed khronos_float_t
+typedef float            GLclampf;     // Changed khronos_float_t
+typedef signed int       GLfixed;      // Changed khronos_int32_t
+
+/* GL types for handling large vertex buffer objects */
+typedef signed long int  GLintptr;     // Changed khronos_intptr_t
+typedef signed long int  GLsizeiptr;   // Changed khronos_ssize_t
+
+//#if (!defined(__gl2_h_) && !defined(__gl_h_))
+
+/* OpenGL ES core versions */
+//#define GL_ES_VERSION_2_0                 1
+
+/* ClearBufferMask */
+#define GL_DEPTH_BUFFER_BIT               0x00000100
+#define GL_STENCIL_BUFFER_BIT             0x00000400
+#define GL_COLOR_BUFFER_BIT               0x00004000
+
+/* Boolean */
+#define GL_FALSE                          0
+#define GL_TRUE                           1
+
+/* BeginMode */
+#define GL_POINTS                         0x0000
+#define GL_LINES                          0x0001
+#define GL_LINE_LOOP                      0x0002
+#define GL_LINE_STRIP                     0x0003
+#define GL_TRIANGLES                      0x0004
+#define GL_TRIANGLE_STRIP                 0x0005
+#define GL_TRIANGLE_FAN                   0x0006
+
+/* AlphaFunction (not supported in ES20) */
+/*      GL_NEVER */
+/*      GL_LESS */
+/*      GL_EQUAL */
+/*      GL_LEQUAL */
+/*      GL_GREATER */
+/*      GL_NOTEQUAL */
+/*      GL_GEQUAL */
+/*      GL_ALWAYS */
+
+/* BlendingFactorDest */
+#define GL_ZERO                           0
+#define GL_ONE                            1
+#define GL_SRC_COLOR                      0x0300
+#define GL_ONE_MINUS_SRC_COLOR            0x0301
+#define GL_SRC_ALPHA                      0x0302
+#define GL_ONE_MINUS_SRC_ALPHA            0x0303
+#define GL_DST_ALPHA                      0x0304
+#define GL_ONE_MINUS_DST_ALPHA            0x0305
+
+/* BlendingFactorSrc */
+/*      GL_ZERO */
+/*      GL_ONE */
+#define GL_DST_COLOR                      0x0306
+#define GL_ONE_MINUS_DST_COLOR            0x0307
+#define GL_SRC_ALPHA_SATURATE             0x0308
+/*      GL_SRC_ALPHA */
+/*      GL_ONE_MINUS_SRC_ALPHA */
+/*      GL_DST_ALPHA */
+/*      GL_ONE_MINUS_DST_ALPHA */
+
+/* BlendEquationSeparate */
+#define GL_FUNC_ADD                       0x8006
+#define GL_BLEND_EQUATION                 0x8009
+#define GL_BLEND_EQUATION_RGB             0x8009    /* same as BLEND_EQUATION */
+#define GL_BLEND_EQUATION_ALPHA           0x883D
+
+/* BlendSubtract */
+#define GL_FUNC_SUBTRACT                  0x800A
+#define GL_FUNC_REVERSE_SUBTRACT          0x800B
+
+/* Separate Blend Functions */
+#define GL_BLEND_DST_RGB                  0x80C8
+#define GL_BLEND_SRC_RGB                  0x80C9
+#define GL_BLEND_DST_ALPHA                0x80CA
+#define GL_BLEND_SRC_ALPHA                0x80CB
+#define GL_CONSTANT_COLOR                 0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR       0x8002
+#define GL_CONSTANT_ALPHA                 0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004
+#define GL_BLEND_COLOR                    0x8005
+
+/* Buffer Objects */
+#define GL_ARRAY_BUFFER                   0x8892
+#define GL_ELEMENT_ARRAY_BUFFER           0x8893
+#define GL_ARRAY_BUFFER_BINDING           0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895
+
+#define GL_STREAM_DRAW                    0x88E0
+#define GL_STATIC_DRAW                    0x88E4
+#define GL_DYNAMIC_DRAW                   0x88E8
+
+#define GL_BUFFER_SIZE                    0x8764
+#define GL_BUFFER_USAGE                   0x8765
+
+#define GL_CURRENT_VERTEX_ATTRIB          0x8626
+
+/* CullFaceMode */
+#define GL_FRONT                          0x0404
+#define GL_BACK                           0x0405
+#define GL_FRONT_AND_BACK                 0x0408
+
+/* DepthFunction */
+/*      GL_NEVER */
+/*      GL_LESS */
+/*      GL_EQUAL */
+/*      GL_LEQUAL */
+/*      GL_GREATER */
+/*      GL_NOTEQUAL */
+/*      GL_GEQUAL */
+/*      GL_ALWAYS */
+
+/* EnableCap */
+#define GL_TEXTURE_2D                     0x0DE1
+#define GL_CULL_FACE                      0x0B44
+#define GL_BLEND                          0x0BE2
+#define GL_DITHER                         0x0BD0
+#define GL_STENCIL_TEST                   0x0B90
+#define GL_DEPTH_TEST                     0x0B71
+#define GL_SCISSOR_TEST                   0x0C11
+#define GL_POLYGON_OFFSET_FILL            0x8037
+#define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E
+#define GL_SAMPLE_COVERAGE                0x80A0
+
+/* ErrorCode */
+#define GL_NO_ERROR                       0
+#define GL_INVALID_ENUM                   0x0500
+#define GL_INVALID_VALUE                  0x0501
+#define GL_INVALID_OPERATION              0x0502
+#define GL_OUT_OF_MEMORY                  0x0505
+
+/* FrontFaceDirection */
+#define GL_CW                             0x0900
+#define GL_CCW                            0x0901
+
+/* GetPName */
+#define GL_LINE_WIDTH                     0x0B21
+#define GL_ALIASED_POINT_SIZE_RANGE       0x846D
+#define GL_ALIASED_LINE_WIDTH_RANGE       0x846E
+#define GL_CULL_FACE_MODE                 0x0B45
+#define GL_FRONT_FACE                     0x0B46
+#define GL_DEPTH_RANGE                    0x0B70
+#define GL_DEPTH_WRITEMASK                0x0B72
+#define GL_DEPTH_CLEAR_VALUE              0x0B73
+#define GL_DEPTH_FUNC                     0x0B74
+#define GL_STENCIL_CLEAR_VALUE            0x0B91
+#define GL_STENCIL_FUNC                   0x0B92
+#define GL_STENCIL_FAIL                   0x0B94
+#define GL_STENCIL_PASS_DEPTH_FAIL        0x0B95
+#define GL_STENCIL_PASS_DEPTH_PASS        0x0B96
+#define GL_STENCIL_REF                    0x0B97
+#define GL_STENCIL_VALUE_MASK             0x0B93
+#define GL_STENCIL_WRITEMASK              0x0B98
+#define GL_STENCIL_BACK_FUNC              0x8800
+#define GL_STENCIL_BACK_FAIL              0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803
+#define GL_STENCIL_BACK_REF               0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK         0x8CA5
+#define GL_VIEWPORT                       0x0BA2
+#define GL_SCISSOR_BOX                    0x0C10
+/*      GL_SCISSOR_TEST */
+#define GL_COLOR_CLEAR_VALUE              0x0C22
+#define GL_COLOR_WRITEMASK                0x0C23
+#define GL_UNPACK_ALIGNMENT               0x0CF5
+#define GL_PACK_ALIGNMENT                 0x0D05
+#define GL_MAX_TEXTURE_SIZE               0x0D33
+#define GL_MAX_VIEWPORT_DIMS              0x0D3A
+#define GL_SUBPIXEL_BITS                  0x0D50
+#define GL_RED_BITS                       0x0D52
+#define GL_GREEN_BITS                     0x0D53
+#define GL_BLUE_BITS                      0x0D54
+#define GL_ALPHA_BITS                     0x0D55
+#define GL_DEPTH_BITS                     0x0D56
+#define GL_STENCIL_BITS                   0x0D57
+#define GL_POLYGON_OFFSET_UNITS           0x2A00
+/*      GL_POLYGON_OFFSET_FILL */
+#define GL_POLYGON_OFFSET_FACTOR          0x8038
+#define GL_TEXTURE_BINDING_2D             0x8069
+#define GL_SAMPLE_BUFFERS                 0x80A8
+#define GL_SAMPLES                        0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE          0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT         0x80AB
+
+/* GetTextureParameter */
+/*      GL_TEXTURE_MAG_FILTER */
+/*      GL_TEXTURE_MIN_FILTER */
+/*      GL_TEXTURE_WRAP_S */
+/*      GL_TEXTURE_WRAP_T */
+
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3
+
+/* HintMode */
+#define GL_DONT_CARE                      0x1100
+#define GL_FASTEST                        0x1101
+#define GL_NICEST                         0x1102
+
+/* HintTarget */
+#define GL_GENERATE_MIPMAP_HINT            0x8192
+
+/* DataType */
+#define GL_BYTE                           0x1400
+#define GL_UNSIGNED_BYTE                  0x1401
+#define GL_SHORT                          0x1402
+#define GL_UNSIGNED_SHORT                 0x1403
+#define GL_INT                            0x1404
+#define GL_UNSIGNED_INT                   0x1405
+#define GL_FLOAT                          0x1406
+#define GL_FIXED                          0x140C
+
+/* PixelFormat */
+#define GL_DEPTH_COMPONENT                0x1902
+#define GL_ALPHA                          0x1906
+#define GL_RGB                            0x1907
+#define GL_RGBA                           0x1908
+#define GL_LUMINANCE                      0x1909
+#define GL_LUMINANCE_ALPHA                0x190A
+
+/* PixelType */
+/*      GL_UNSIGNED_BYTE */
+#define GL_UNSIGNED_SHORT_4_4_4_4         0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1         0x8034
+#define GL_UNSIGNED_SHORT_5_6_5           0x8363
+
+/* Shaders */
+#define GL_FRAGMENT_SHADER                  0x8B30
+#define GL_VERTEX_SHADER                    0x8B31
+#define GL_MAX_VERTEX_ATTRIBS               0x8869
+#define GL_MAX_VERTEX_UNIFORM_VECTORS       0x8DFB
+#define GL_MAX_VARYING_VECTORS              0x8DFC
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS   0x8B4C
+#define GL_MAX_TEXTURE_IMAGE_UNITS          0x8872
+#define GL_MAX_FRAGMENT_UNIFORM_VECTORS     0x8DFD
+#define GL_SHADER_TYPE                      0x8B4F
+#define GL_DELETE_STATUS                    0x8B80
+#define GL_LINK_STATUS                      0x8B82
+#define GL_VALIDATE_STATUS                  0x8B83
+#define GL_ATTACHED_SHADERS                 0x8B85
+#define GL_ACTIVE_UNIFORMS                  0x8B86
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH        0x8B87
+#define GL_ACTIVE_ATTRIBUTES                0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH      0x8B8A
+#define GL_SHADING_LANGUAGE_VERSION         0x8B8C
+#define GL_CURRENT_PROGRAM                  0x8B8D
+
+/* StencilFunction */
+#define GL_NEVER                          0x0200
+#define GL_LESS                           0x0201
+#define GL_EQUAL                          0x0202
+#define GL_LEQUAL                         0x0203
+#define GL_GREATER                        0x0204
+#define GL_NOTEQUAL                       0x0205
+#define GL_GEQUAL                         0x0206
+#define GL_ALWAYS                         0x0207
+
+/* StencilOp */
+/*      GL_ZERO */
+#define GL_KEEP                           0x1E00
+#define GL_REPLACE                        0x1E01
+#define GL_INCR                           0x1E02
+#define GL_DECR                           0x1E03
+#define GL_INVERT                         0x150A
+#define GL_INCR_WRAP                      0x8507
+#define GL_DECR_WRAP                      0x8508
+
+/* StringName */
+#define GL_VENDOR                         0x1F00
+#define GL_RENDERER                       0x1F01
+#define GL_VERSION                        0x1F02
+#define GL_EXTENSIONS                     0x1F03
+
+/* TextureMagFilter */
+#define GL_NEAREST                        0x2600
+#define GL_LINEAR                         0x2601
+
+/* TextureMinFilter */
+/*      GL_NEAREST */
+/*      GL_LINEAR */
+#define GL_NEAREST_MIPMAP_NEAREST         0x2700
+#define GL_LINEAR_MIPMAP_NEAREST          0x2701
+#define GL_NEAREST_MIPMAP_LINEAR          0x2702
+#define GL_LINEAR_MIPMAP_LINEAR           0x2703
+
+/* TextureParameterName */
+#define GL_TEXTURE_MAG_FILTER             0x2800
+#define GL_TEXTURE_MIN_FILTER             0x2801
+#define GL_TEXTURE_WRAP_S                 0x2802
+#define GL_TEXTURE_WRAP_T                 0x2803
+
+/* TextureTarget */
+/*      GL_TEXTURE_2D */
+#define GL_TEXTURE                        0x1702
+
+#define GL_TEXTURE_CUBE_MAP               0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP       0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C
+
+/* TextureUnit */
+#define GL_TEXTURE0                       0x84C0
+#define GL_TEXTURE1                       0x84C1
+#define GL_TEXTURE2                       0x84C2
+#define GL_TEXTURE3                       0x84C3
+#define GL_TEXTURE4                       0x84C4
+#define GL_TEXTURE5                       0x84C5
+#define GL_TEXTURE6                       0x84C6
+#define GL_TEXTURE7                       0x84C7
+#define GL_TEXTURE8                       0x84C8
+#define GL_TEXTURE9                       0x84C9
+#define GL_TEXTURE10                      0x84CA
+#define GL_TEXTURE11                      0x84CB
+#define GL_TEXTURE12                      0x84CC
+#define GL_TEXTURE13                      0x84CD
+#define GL_TEXTURE14                      0x84CE
+#define GL_TEXTURE15                      0x84CF
+#define GL_TEXTURE16                      0x84D0
+#define GL_TEXTURE17                      0x84D1
+#define GL_TEXTURE18                      0x84D2
+#define GL_TEXTURE19                      0x84D3
+#define GL_TEXTURE20                      0x84D4
+#define GL_TEXTURE21                      0x84D5
+#define GL_TEXTURE22                      0x84D6
+#define GL_TEXTURE23                      0x84D7
+#define GL_TEXTURE24                      0x84D8
+#define GL_TEXTURE25                      0x84D9
+#define GL_TEXTURE26                      0x84DA
+#define GL_TEXTURE27                      0x84DB
+#define GL_TEXTURE28                      0x84DC
+#define GL_TEXTURE29                      0x84DD
+#define GL_TEXTURE30                      0x84DE
+#define GL_TEXTURE31                      0x84DF
+#define GL_ACTIVE_TEXTURE                 0x84E0
+
+/* TextureWrapMode */
+#define GL_REPEAT                         0x2901
+#define GL_CLAMP_TO_EDGE                  0x812F
+#define GL_MIRRORED_REPEAT                0x8370
+
+/* Uniform Types */
+#define GL_FLOAT_VEC2                     0x8B50
+#define GL_FLOAT_VEC3                     0x8B51
+#define GL_FLOAT_VEC4                     0x8B52
+#define GL_INT_VEC2                       0x8B53
+#define GL_INT_VEC3                       0x8B54
+#define GL_INT_VEC4                       0x8B55
+#define GL_BOOL                           0x8B56
+#define GL_BOOL_VEC2                      0x8B57
+#define GL_BOOL_VEC3                      0x8B58
+#define GL_BOOL_VEC4                      0x8B59
+#define GL_FLOAT_MAT2                     0x8B5A
+#define GL_FLOAT_MAT3                     0x8B5B
+#define GL_FLOAT_MAT4                     0x8B5C
+#define GL_SAMPLER_2D                     0x8B5E
+#define GL_SAMPLER_CUBE                   0x8B60
+
+/* Vertex Arrays */
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED        0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE           0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE         0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE           0x8625
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED     0x886A
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER        0x8645
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
+
+/* Read Format */
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE   0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
+
+/* Shader Source */
+#define GL_COMPILE_STATUS                 0x8B81
+#define GL_INFO_LOG_LENGTH                0x8B84
+#define GL_SHADER_SOURCE_LENGTH           0x8B88
+#define GL_SHADER_COMPILER                0x8DFA
+
+/* Shader Binary */
+#define GL_SHADER_BINARY_FORMATS          0x8DF8
+#define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9
+
+/* Shader Precision-Specified Types */
+#define GL_LOW_FLOAT                      0x8DF0
+#define GL_MEDIUM_FLOAT                   0x8DF1
+#define GL_HIGH_FLOAT                     0x8DF2
+#define GL_LOW_INT                        0x8DF3
+#define GL_MEDIUM_INT                     0x8DF4
+#define GL_HIGH_INT                       0x8DF5
+
+/* Framebuffer Object. */
+#define GL_FRAMEBUFFER                    0x8D40
+#define GL_RENDERBUFFER                   0x8D41
+
+#define GL_RGBA4                          0x8056
+#define GL_RGB5_A1                        0x8057
+#define GL_RGB565                         0x8D62
+#define GL_DEPTH_COMPONENT16              0x81A5
+#define GL_STENCIL_INDEX                  0x1901
+#define GL_STENCIL_INDEX8                 0x8D48
+
+#define GL_RENDERBUFFER_WIDTH             0x8D42
+#define GL_RENDERBUFFER_HEIGHT            0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44
+#define GL_RENDERBUFFER_RED_SIZE          0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE        0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE         0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55
+
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
+
+#define GL_COLOR_ATTACHMENT0              0x8CE0
+#define GL_DEPTH_ATTACHMENT               0x8D00
+#define GL_STENCIL_ATTACHMENT             0x8D20
+
+#define GL_NONE                           0
+
+#define GL_FRAMEBUFFER_COMPLETE                      0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT         0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS         0x8CD9
+#define GL_FRAMEBUFFER_UNSUPPORTED                   0x8CDD
+
+#define GL_FRAMEBUFFER_BINDING            0x8CA6
+#define GL_RENDERBUFFER_BINDING           0x8CA7
+#define GL_MAX_RENDERBUFFER_SIZE          0x84E8
+
+#define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506
+
+#else
+# ifndef EVAS_GL_NO_GL_H_CHECK   
+#  error "You may only include either Evas_GL.h OR use your native OpenGL's headers. If you use Evas to do GL, then you cannot use the native gl headers."
+# endif
+#endif
+
+#define EVAS_GL_API_VERSION 1   
+struct _Evas_GL_API
+{
+   int            version;
+   
+   /* version 1: */
+   void         (*glActiveTexture) (GLenum texture);
+   void         (*glAttachShader) (GLuint program, GLuint shader);
+   void         (*glBindAttribLocation) (GLuint program, GLuint index, const char* name);
+   void         (*glBindBuffer) (GLenum target, GLuint buffer);
+   void         (*glBindFramebuffer) (GLenum target, GLuint framebuffer);
+   void         (*glBindRenderbuffer) (GLenum target, GLuint renderbuffer);
+   void         (*glBindTexture) (GLenum target, GLuint texture);
+   void         (*glBlendColor) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+   void         (*glBlendEquation) ( GLenum mode );
+   void         (*glBlendEquationSeparate) (GLenum modeRGB, GLenum modeAlpha);
+   void         (*glBlendFunc) (GLenum sfactor, GLenum dfactor);
+   void         (*glBlendFuncSeparate) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+   void         (*glBufferData) (GLenum target, GLsizeiptr size, const void* data, GLenum usage);
+   void         (*glBufferSubData) (GLenum target, GLintptr offset, GLsizeiptr size, const void* data);
+   GLenum       (*glCheckFramebufferStatus) (GLenum target);
+   void         (*glClear) (GLbitfield mask);
+   void         (*glClearColor) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+   void         (*glClearDepthf) (GLclampf depth);
+   void         (*glClearStencil) (GLint s);
+   void         (*glColorMask) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+   void         (*glCompileShader) (GLuint shader);
+   void         (*glCompressedTexImage2D) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
+   void         (*glCompressedTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
+   void         (*glCopyTexImage2D) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+   void         (*glCopyTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+   GLuint       (*glCreateProgram) (void);
+   GLuint       (*glCreateShader) (GLenum type);
+   void         (*glCullFace) (GLenum mode);
+   void         (*glDeleteBuffers) (GLsizei n, const GLuint* buffers);
+   void         (*glDeleteFramebuffers) (GLsizei n, const GLuint* framebuffers);
+   void         (*glDeleteProgram) (GLuint program);
+   void         (*glDeleteRenderbuffers) (GLsizei n, const GLuint* renderbuffers);
+   void         (*glDeleteShader) (GLuint shader);
+   void         (*glDeleteTextures) (GLsizei n, const GLuint* textures);
+   void         (*glDepthFunc) (GLenum func);
+   void         (*glDepthMask) (GLboolean flag);
+   void         (*glDepthRangef) (GLclampf zNear, GLclampf zFar);
+   void         (*glDetachShader) (GLuint program, GLuint shader);
+   void         (*glDisable) (GLenum cap);
+   void         (*glDisableVertexAttribArray) (GLuint index);
+   void         (*glDrawArrays) (GLenum mode, GLint first, GLsizei count);
+   void         (*glDrawElements) (GLenum mode, GLsizei count, GLenum type, const void* indices);
+   void         (*glEnable) (GLenum cap);
+   void         (*glEnableVertexAttribArray) (GLuint index);
+   void         (*glFinish) (void);
+   void         (*glFlush) (void);
+   void         (*glFramebufferRenderbuffer) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+   void         (*glFramebufferTexture2D) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+   void         (*glFrontFace) (GLenum mode);
+   void         (*glGenBuffers) (GLsizei n, GLuint* buffers);
+   void         (*glGenerateMipmap) (GLenum target);
+   void         (*glGenFramebuffers) (GLsizei n, GLuint* framebuffers);
+   void         (*glGenRenderbuffers) (GLsizei n, GLuint* renderbuffers);
+   void         (*glGenTextures) (GLsizei n, GLuint* textures);
+   void         (*glGetActiveAttrib) (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
+   void         (*glGetActiveUniform) (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
+   void         (*glGetAttachedShaders) (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
+   int          (*glGetAttribLocation) (GLuint program, const char* name);
+   void         (*glGetBooleanv) (GLenum pname, GLboolean* params);
+   void         (*glGetBufferParameteriv) (GLenum target, GLenum pname, GLint* params);
+   GLenum       (*glGetError) (void);
+   void         (*glGetFloatv) (GLenum pname, GLfloat* params);
+   void         (*glGetFramebufferAttachmentParameteriv) (GLenum target, GLenum attachment, GLenum pname, GLint* params);
+   void         (*glGetIntegerv) (GLenum pname, GLint* params);
+   void         (*glGetProgramiv) (GLuint program, GLenum pname, GLint* params);
+   void         (*glGetProgramInfoLog) (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
+   void         (*glGetRenderbufferParameteriv) (GLenum target, GLenum pname, GLint* params);
+   void         (*glGetShaderiv) (GLuint shader, GLenum pname, GLint* params);
+   void         (*glGetShaderInfoLog) (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
+   void         (*glGetShaderPrecisionFormat) (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
+   void         (*glGetShaderSource) (GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
+   const GLubyte* (*glGetString) (GLenum name);
+   void         (*glGetTexParameterfv) (GLenum target, GLenum pname, GLfloat* params);
+   void         (*glGetTexParameteriv) (GLenum target, GLenum pname, GLint* params);
+   void         (*glGetUniformfv) (GLuint program, GLint location, GLfloat* params);
+   void         (*glGetUniformiv) (GLuint program, GLint location, GLint* params);
+   int          (*glGetUniformLocation) (GLuint program, const char* name);
+   void         (*glGetVertexAttribfv) (GLuint index, GLenum pname, GLfloat* params);
+   void         (*glGetVertexAttribiv) (GLuint index, GLenum pname, GLint* params);
+   void         (*glGetVertexAttribPointerv) (GLuint index, GLenum pname, void** pointer);
+   void         (*glHint) (GLenum target, GLenum mode);
+   GLboolean    (*glIsBuffer) (GLuint buffer);
+   GLboolean    (*glIsEnabled) (GLenum cap);
+   GLboolean    (*glIsFramebuffer) (GLuint framebuffer);
+   GLboolean    (*glIsProgram) (GLuint program);
+   GLboolean    (*glIsRenderbuffer) (GLuint renderbuffer);
+   GLboolean    (*glIsShader) (GLuint shader);
+   GLboolean    (*glIsTexture) (GLuint texture);
+   void         (*glLineWidth) (GLfloat width);
+   void         (*glLinkProgram) (GLuint program);
+   void         (*glPixelStorei) (GLenum pname, GLint param);
+   void         (*glPolygonOffset) (GLfloat factor, GLfloat units);
+   void         (*glReadPixels) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels);
+   void         (*glReleaseShaderCompiler) (void);
+   void         (*glRenderbufferStorage) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+   void         (*glSampleCoverage) (GLclampf value, GLboolean invert);
+   void         (*glScissor) (GLint x, GLint y, GLsizei width, GLsizei height);
+   void         (*glShaderBinary) (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length);
+   void         (*glShaderSource) (GLuint shader, GLsizei count, const char** string, const GLint* length);
+   void         (*glStencilFunc) (GLenum func, GLint ref, GLuint mask);
+   void         (*glStencilFuncSeparate) (GLenum face, GLenum func, GLint ref, GLuint mask);
+   void         (*glStencilMask) (GLuint mask);
+   void         (*glStencilMaskSeparate) (GLenum face, GLuint mask);
+   void         (*glStencilOp) (GLenum fail, GLenum zfail, GLenum zpass);
+   void         (*glStencilOpSeparate) (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
+   void         (*glTexImage2D) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels);
+   void         (*glTexParameterf) (GLenum target, GLenum pname, GLfloat param);
+   void         (*glTexParameterfv) (GLenum target, GLenum pname, const GLfloat* params);
+   void         (*glTexParameteri) (GLenum target, GLenum pname, GLint param);
+   void         (*glTexParameteriv) (GLenum target, GLenum pname, const GLint* params);
+   void         (*glTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels);
+   void         (*glUniform1f) (GLint location, GLfloat x);
+   void         (*glUniform1fv) (GLint location, GLsizei count, const GLfloat* v);
+   void         (*glUniform1i) (GLint location, GLint x);
+   void         (*glUniform1iv) (GLint location, GLsizei count, const GLint* v);
+   void         (*glUniform2f) (GLint location, GLfloat x, GLfloat y);
+   void         (*glUniform2fv) (GLint location, GLsizei count, const GLfloat* v);
+   void         (*glUniform2i) (GLint location, GLint x, GLint y);
+   void         (*glUniform2iv) (GLint location, GLsizei count, const GLint* v);
+   void         (*glUniform3f) (GLint location, GLfloat x, GLfloat y, GLfloat z);
+   void         (*glUniform3fv) (GLint location, GLsizei count, const GLfloat* v);
+   void         (*glUniform3i) (GLint location, GLint x, GLint y, GLint z);
+   void         (*glUniform3iv) (GLint location, GLsizei count, const GLint* v);
+   void         (*glUniform4f) (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+   void         (*glUniform4fv) (GLint location, GLsizei count, const GLfloat* v);
+   void         (*glUniform4i) (GLint location, GLint x, GLint y, GLint z, GLint w);
+   void         (*glUniform4iv) (GLint location, GLsizei count, const GLint* v);
+   void         (*glUniformMatrix2fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+   void         (*glUniformMatrix3fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+   void         (*glUniformMatrix4fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+   void         (*glUseProgram) (GLuint program);
+   void         (*glValidateProgram) (GLuint program);
+   void         (*glVertexAttrib1f) (GLuint indx, GLfloat x);
+   void         (*glVertexAttrib1fv) (GLuint indx, const GLfloat* values);
+   void         (*glVertexAttrib2f) (GLuint indx, GLfloat x, GLfloat y);
+   void         (*glVertexAttrib2fv) (GLuint indx, const GLfloat* values);
+   void         (*glVertexAttrib3f) (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
+   void         (*glVertexAttrib3fv) (GLuint indx, const GLfloat* values);
+   void         (*glVertexAttrib4f) (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+   void         (*glVertexAttrib4fv) (GLuint indx, const GLfloat* values);
+   void         (*glVertexAttribPointer) (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
+   void         (*glViewport) (GLint x, GLint y, GLsizei width, GLsizei height);
+
+   /* future calls will be added down here for expansion */
+   /* version 2: */
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/**
+ * @}
+ */
index be84a2b..441d288 100644 (file)
@@ -27,14 +27,6 @@ SUBDIRS += ../modules/engines/fb/
 EVAS_STATIC_MODULE += ../modules/engines/fb/libevas_engine_fb.la
 EVAS_STATIC_LIBADD += @evas_engine_fb_libs@
 endif
-if EVAS_STATIC_BUILD_GL_GLEW
-SUBDIRS += \
-       ../modules/engines/gl_common \
-       ../modules/engines/gl_glew
-EVAS_STATIC_MODULE += \
-       ../modules/engines/gl_glew/libevas_engine_gl_glew.la
-EVAS_STATIC_LIBADD += @evas_engine_gl_common_libs@ @evas_engine_gl_glew_libs@
-endif
 if EVAS_STATIC_BUILD_GL_X11
 SUBDIRS += \
        ../modules/engines/gl_common \
@@ -51,11 +43,6 @@ EVAS_STATIC_MODULE += \
        ../modules/engines/gl_sdl/libevas_engine_gl_sdl.la
 EVAS_STATIC_LIBADD += @evas_engine_gl_common_libs@ @evas_engine_gl_sdl_libs@
 endif
-if EVAS_STATIC_BUILD_QUARTZ
-SUBDIRS += ../modules/engines/quartz/
-EVAS_STATIC_MODULE += ../modules/engines/quartz/libevas_engine_quartz.la
-EVAS_STATIC_LIBADD += @evas_engine_quartz_libs@
-endif
 if EVAS_STATIC_BUILD_SOFTWARE_16
 SUBDIRS += ../modules/engines/software_16/
 EVAS_STATIC_MODULE += ../modules/engines/software_16/libevas_engine_software_16.la
@@ -108,11 +95,6 @@ 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_XRENDER_X11
-SUBDIRS += ../modules/engines/xrender_x11/
-EVAS_STATIC_MODULE += ../modules/engines/xrender_x11/libevas_engine_xrender_x11.la
-EVAS_STATIC_LIBADD += @evas_engine_xrender_x11_libs@ @evas_engine_xrender_xcb_libs@
-endif
 if EVAS_STATIC_BUILD_BMP
 SUBDIRS += ../modules/loaders/bmp
 EVAS_STATIC_MODULE += ../modules/loaders/bmp/libevas_loader_bmp.la
@@ -128,6 +110,11 @@ SUBDIRS += ../modules/savers/eet ../modules/loaders/eet
 EVAS_STATIC_MODULE += ../modules/savers/eet/libevas_saver_eet.la ../modules/loaders/eet/libevas_loader_eet.la
 EVAS_STATIC_LIBADD += @evas_image_loader_eet_libs@
 endif
+if EVAS_STATIC_BUILD_GENERIC
+SUBDIRS += ../modules/loaders/generic
+EVAS_STATIC_MODULE += ../modules/loaders/generic/libevas_loader_generic.la
+EVAS_STATIC_LIBADD += @evas_image_loader_generic_libs@
+endif
 if EVAS_STATIC_BUILD_GIF
 SUBDIRS += ../modules/loaders/gif
 EVAS_STATIC_MODULE += ../modules/loaders/gif/libevas_loader_gif.la
@@ -157,6 +144,11 @@ SUBDIRS += ../modules/savers/png ../modules/loaders/png
 EVAS_STATIC_MODULE += ../modules/savers/png/libevas_saver_png.la ../modules/loaders/png/libevas_loader_png.la
 EVAS_STATIC_LIBADD += @evas_image_loader_png_libs@
 endif
+if EVAS_STATIC_BUILD_PSD
+SUBDIRS += ../modules/loaders/psd
+EVAS_STATIC_MODULE += ../modules/loaders/psd/libevas_loader_psd.la
+EVAS_STATIC_LIBADD += @evas_image_loader_psd_libs@
+endif
 if EVAS_STATIC_BUILD_SVG
 SUBDIRS += ../modules/loaders/svg
 EVAS_STATIC_MODULE += ../modules/loaders/svg/libevas_loader_svg.la
@@ -183,22 +175,6 @@ EVAS_STATIC_MODULE += ../modules/loaders/xpm/libevas_loader_xpm.la
 EVAS_STATIC_LIBADD += @evas_image_loader_xpm_libs@
 endif
 
-
-#if EVAS_STATIC_BUILD_CAIRO_X11
-#SUBDIRS += \
-#      ../modules/engines/cairo_common \
-#      ../modules/engines/cairo_x11
-#EVAS_STATIC_MODULE += \
-#      ../modules/engines/cairo_common/libevas_engine_cairo_common.la \
-#      ../modules/engines/cairo_x11/libevas_engine_cairo_x11.la
-#EVAS_STATIC_LIBADD += @CAIRO_CFLAGS@
-#endif
-#if EVAS_STATIC_BUILD_SOFTWARE_QTOPIA
-#SUBDIRS += ../modules/engines/software_qtopia/
-#EVAS_STATIC_MODULE += ../modules/engines/software_qtopia/libevas_engine_software_qtopia.la
-#EVAS_STATIC_LIBADD += @evas_engine_software_qtopia_libs@
-#endif
-
 AM_CPPFLAGS = \
 -I. \
 -I$(top_srcdir)/src/lib \
@@ -212,13 +188,14 @@ AM_CPPFLAGS = \
 @HARFBUZZ_CFLAGS@ \
 @EET_CFLAGS@ \
 @FONTCONFIG_CFLAGS@ \
-@pthread_cflags@
+@pthread_cflags@ \
+@PIXMAN_CFLAGS@
 
 AM_CFLAGS = @WIN32_CFLAGS@
 
 lib_LTLIBRARIES = libevas.la
 
-includes_HEADERS = Evas.h
+includes_HEADERS = Evas.h Evas_GL.h
 includesdir = $(includedir)/evas-@VMAJ@
 
 libevas_la_SOURCES = main.c
@@ -244,6 +221,7 @@ engines/common/libevas_engine_common.la \
 @EINA_LIBS@ \
 $(EVAS_STATIC_MODULE) \
 $(EVAS_STATIC_LIBADD) \
+@PIXMAN_LIBS@ \
 -lm
 
 libevas_la_DEPENDENCIES = \
diff --git a/src/lib/cache/.cvsignore b/src/lib/cache/.cvsignore
deleted file mode 100644 (file)
index b477e9c..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile.in
-Makefile
-.deps
-.libs
-*.la
-*.lo
index b172b4a..d417262 100644 (file)
@@ -10,7 +10,9 @@ AM_CPPFLAGS        = -I. \
                        @WIN32_CPPFLAGS@ \
                        @EVIL_CFLAGS@ \
                       @FREETYPE_CFLAGS@ \
-                      @EINA_CFLAGS@
+                       @PIXMAN_CFLAGS@ \
+                      @EINA_CFLAGS@ \
+                       @PIXMAN_CFLAGS@
 
 noinst_LTLIBRARIES      = libevas_cache.la
 libevas_cache_la_SOURCES  = \
index 1d92700..0947a6d 100644 (file)
@@ -130,7 +130,7 @@ EAPI void                     evas_cache_image_set(Evas_Cache_Image *cache, unsi
 
 EAPI Image_Entry*             evas_cache_image_alone(Image_Entry *im);
 EAPI Image_Entry*             evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
-EAPI void                     evas_cache_image_load_data(Image_Entry *im);
+EAPI int                      evas_cache_image_load_data(Image_Entry *im);
 EAPI void                     evas_cache_image_unload_data(Image_Entry *im);
 EAPI Eina_Bool                evas_cache_image_is_loaded(Image_Entry *im);
 EAPI void                     evas_cache_image_unload_all(Evas_Cache_Image *cache);
index 23a3233..2c1dd85 100755 (executable)
@@ -31,20 +31,21 @@ struct _Evas_Cache_Preload
    Image_Entry *ie;
 };
 
-static LK(engine_lock) = PTHREAD_MUTEX_INITIALIZER;
-static LK(wakeup) = PTHREAD_MUTEX_INITIALIZER;
+static LK(engine_lock);
+static LK(wakeup);
+static int _evas_cache_mutex_init = 0;
 
-static pthread_cond_t cond_wakeup = PTHREAD_COND_INITIALIZER;
+static Eina_Condition cond_wakeup;
 
 static void _evas_cache_image_entry_preload_remove(Image_Entry *ie, const void *target);
 #endif
 
-#define FREESTRC(Var)              \
-  if (Var)                         \
-    {                              \
-       eina_stringshare_del(Var);  \
-       Var = NULL;                 \
-    }
+#define FREESTRC(Var)             \
+   if (Var)                       \
+   {                              \
+      eina_stringshare_del(Var);  \
+      Var = NULL;                 \
+   }
 
 static void _evas_cache_image_dirty_add(Image_Entry *im);
 static void _evas_cache_image_dirty_del(Image_Entry *im);
@@ -82,7 +83,7 @@ static void
 _evas_cache_image_dirty_del(Image_Entry *im)
 {
    if (!im->flags.dirty) return;
-        im->flags.dirty = 0;
+   im->flags.dirty = 0;
    im->flags.cached = 0;
 #ifdef EVAS_FRAME_QUEUING
    LKL(im->cache->lock);
@@ -134,7 +135,7 @@ _evas_cache_image_lru_add(Image_Entry *im)
    if (im->flags.lru) return;
    _evas_cache_image_dirty_del(im);
    _evas_cache_image_activ_del(im);
-   _evas_cache_image_lru_nodata_del(im);
+   _evas_cache_image_lru_nodata_del(im); 
    if (!im->cache_key) return;
    im->flags.lru = 1;
    im->flags.cached = 1;
@@ -209,9 +210,9 @@ _evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry *ie)
    if (ie->flags.delete_me == 1) return;
    if (ie->preload)
      {
-        ie->flags.delete_me = 1;
-        _evas_cache_image_entry_preload_remove(ie, NULL);
-        return ;
+       ie->flags.delete_me = 1;
+       _evas_cache_image_entry_preload_remove(ie, NULL);
+       return;
      }
 #endif
 
@@ -219,7 +220,7 @@ _evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry *ie)
    _evas_cache_image_activ_del(ie);
    _evas_cache_image_lru_del(ie);
    _evas_cache_image_lru_nodata_del(ie);
-
+   
    cache->func.destructor(ie);
    FREESTRC(ie->cache_key);
    FREESTRC(ie->file);
@@ -304,9 +305,9 @@ _evas_cache_image_entry_new(Evas_Cache_Image *cache,
 #endif
 #ifdef BUILD_ASYNC_PRELOAD
    LKI(ie->lock);
-   LKI(ie->lock_cancel);
+   LKI(ie->lock_cancel); 
 #endif
-
+   
    if (lo) ie->load_opts = *lo;
    if (ie->file)
      {
@@ -372,18 +373,22 @@ _evas_cache_image_async_heavy(void *data)
    current->channel++;
    cache = current->cache;
 
-   if ((!current->flags.loaded) &&
+   if ((!current->flags.loaded) && 
        ((Evas_Image_Load_Func*) current->info.module)->threadable)
      {
-        error = cache->func.load(current);
-        if (cache->func.debug) cache->func.debug("load", current);
-        if (error != EVAS_LOAD_ERROR_NONE)
+       error = cache->func.load(current);
+       if (cache->func.debug) cache->func.debug("load", current);
+        current->load_error = error;
+       if (error != EVAS_LOAD_ERROR_NONE)
+         {
+            current->flags.loaded = 0;
+            _evas_cache_image_entry_surface_alloc(cache, current,
+                                                  current->w, current->h);
+         }
+       else
           {
-             current->flags.loaded = 0;
-             _evas_cache_image_entry_surface_alloc(cache, current,
-                                                   current->w, current->h);
+             current->flags.loaded = 1;
           }
-        else current->flags.loaded = 1;
      }
    current->channel = pchannel;
    // check the unload cancel flag
@@ -402,7 +407,7 @@ _evas_cache_image_async_heavy(void *data)
 static void
 _evas_cache_image_async_end(void *data)
 {
-   Image_Entry *ie = (Image_Entry *) data;
+   Image_Entry *ie = (Image_Entry *)data;
    Evas_Cache_Target *tmp;
 
    ie->cache->preload = eina_list_remove(ie->cache->preload, ie);
@@ -411,11 +416,11 @@ _evas_cache_image_async_end(void *data)
    ie->flags.preload_done = ie->flags.loaded;
    while ((tmp = ie->targets))
      {
-        evas_object_inform_call_image_preloaded((Evas_Object*) tmp->target);
-        ie->targets = (Evas_Cache_Target *)
-           eina_inlist_remove(EINA_INLIST_GET(ie->targets),
+       evas_object_inform_call_image_preloaded((Evas_Object*) tmp->target);
+       ie->targets = (Evas_Cache_Target *)
+           eina_inlist_remove(EINA_INLIST_GET(ie->targets), 
                               EINA_INLIST_GET(ie->targets));
-        free(tmp);
+       free(tmp);
      }
 }
 
@@ -423,15 +428,15 @@ static void
 _evas_cache_image_async_cancel(void *data)
 {
    Evas_Cache_Image *cache = NULL;
-   Image_Entry *ie = (Image_Entry *) data;
-
+   Image_Entry *ie = (Image_Entry *)data;
+   
    ie->preload = NULL;
    ie->cache->pending = eina_list_remove(ie->cache->pending, ie);
    if ((ie->flags.delete_me) || (ie->flags.dirty))
      {
-        ie->flags.delete_me = 0;
-        _evas_cache_image_entry_delete(ie->cache, ie);
-        return ;
+       ie->flags.delete_me = 0;
+       _evas_cache_image_entry_delete(ie->cache, ie);
+       return;
      }
    if (ie->flags.loaded) _evas_cache_image_async_end(ie);
 #ifdef EVAS_FRAME_QUEUING
@@ -479,41 +484,41 @@ _evas_cache_image_entry_preload_remove(Image_Entry *ie, const void *target)
 {
    if (target)
      {
-        Evas_Cache_Target *tg;
-
-        EINA_INLIST_FOREACH(ie->targets, tg)
-          {
-             if (tg->target == target)
-               {
-                  // FIXME: No callback when we cancel only for one target ?
-                  ie->targets = (Evas_Cache_Target *)
+       Evas_Cache_Target *tg;
+
+       EINA_INLIST_FOREACH(ie->targets, tg)
+         {
+            if (tg->target == target)
+              {
+                 // FIXME: No callback when we cancel only for one target ?
+                 ie->targets = (Evas_Cache_Target *)
                      eina_inlist_remove(EINA_INLIST_GET(ie->targets),
                                         EINA_INLIST_GET(tg));
-                  free(tg);
-                  break;
-               }
-          }
+                 free(tg);
+                 break;
+              }
+         }
      }
    else
      {
-        Evas_Cache_Target *tg;
+       Evas_Cache_Target *tg;
 
-        while (ie->targets)
-          {
-             tg = ie->targets;
-             ie->targets = (Evas_Cache_Target *)
+       while (ie->targets)
+         {
+            tg = ie->targets;
+            ie->targets = (Evas_Cache_Target *)
                 eina_inlist_remove(EINA_INLIST_GET(ie->targets),
                                    EINA_INLIST_GET(tg));
-             free(tg);
-          }
+            free(tg);
+         }
      }
 
    if ((!ie->targets) && (ie->preload) && (!ie->flags.pending))
      {
-        ie->cache->preload = eina_list_remove(ie->cache->preload, ie);
-        ie->cache->pending = eina_list_append(ie->cache->pending, ie);
-        ie->flags.pending = 1;
-        evas_preload_thread_cancel(ie->preload);
+       ie->cache->preload = eina_list_remove(ie->cache->preload, ie);
+       ie->cache->pending = eina_list_append(ie->cache->pending, ie);
+       ie->flags.pending = 1;
+       evas_preload_thread_cancel(ie->preload);
      }
 }
 #endif
@@ -544,10 +549,10 @@ evas_cache_image_set(Evas_Cache_Image *cache, unsigned int limit)
         return;
      }
    cache->limit = limit;
-   evas_cache_image_flush(cache);
 #ifdef EVAS_FRAME_QUEUING
    LKU(cache->lock);
 #endif
+   evas_cache_image_flush(cache);
 }
 
 EAPI Evas_Cache_Image *
@@ -555,6 +560,15 @@ evas_cache_image_init(const Evas_Cache_Image_Func *cb)
 {
    Evas_Cache_Image *cache;
 
+#ifdef BUILD_ASYNC_PRELOAD
+   if (_evas_cache_mutex_init++ == 0)
+     {
+        LKI(engine_lock);
+        LKI(wakeup);
+       eina_condition_new(&cond_wakeup, &wakeup);
+     }
+#endif
+
    cache = calloc(1, sizeof(Evas_Cache_Image));
    if (!cache) return NULL;
    cache->func = *cb;
@@ -585,36 +599,42 @@ evas_cache_image_shutdown(Evas_Cache_Image *cache)
    LKL(cache->lock);
 #endif
    cache->references--;
-   if (cache->references > 0)
+   if (cache->references != 0)
      {
 #ifdef EVAS_FRAME_QUEUING
         LKU(cache->lock);
 #endif
-        return ;
+        return;
      }
+#ifdef EVAS_FRAME_QUEUING
+   /* Release and destroy lock early ! */
+   LKU(cache->lock);
+   LKD(cache->lock);
+#endif
+
 #ifdef BUILD_ASYNC_PRELOAD
    EINA_LIST_FREE(cache->preload, im)
      {
-        /* By doing that we are protecting us from destroying image when the cache is no longuer available. */
-        im->flags.delete_me = 1;
-        _evas_cache_image_entry_preload_remove(im, NULL);
+       /* By doing that we are protecting us from destroying image when the cache is no longer available. */
+       im->flags.delete_me = 1;
+       _evas_cache_image_entry_preload_remove(im, NULL);
      }
    evas_async_events_process();
 #endif
    while (cache->lru)
      {
-        im = (Image_Entry *) cache->lru;
+        im = (Image_Entry *)cache->lru;
         _evas_cache_image_entry_delete(cache, im);
      }
    while (cache->lru_nodata)
      {
-        im = (Image_Entry *) cache->lru_nodata;
+        im = (Image_Entry *)cache->lru_nodata;
         _evas_cache_image_entry_delete(cache, im);
      }
    /* This is mad, I am about to destroy image still alive, but we need to prevent leak. */
    while (cache->dirty)
      {
-        im = (Image_Entry *) cache->dirty;
+        im = (Image_Entry *)cache->dirty;
         _evas_cache_image_entry_delete(cache, im);
      }
    delete_list = NULL;
@@ -629,29 +649,37 @@ evas_cache_image_shutdown(Evas_Cache_Image *cache)
    /* Now wait for all pending image to die */
    while (cache->pending)
      {
-        evas_async_events_process();
-        LKL(wakeup);
-        if (cache->pending) pthread_cond_wait(&cond_wakeup, &wakeup);
-        LKU(wakeup);
+       evas_async_events_process();
+       LKL(wakeup);
+        // the lazy bum who did eain threads and converted this code
+        // didn't bother to worry about Eina_Lock being a different type
+        // to a pthread mutex.
+       if (cache->pending) eina_condition_wait(&cond_wakeup);
+       LKU(wakeup);
      }
 #endif
    eina_hash_free(cache->activ);
    eina_hash_free(cache->inactiv);
-#ifdef EVAS_FRAME_QUEUING
-   LKU(cache->lock);
-   LKD(cache->lock);
-#endif
    free(cache);
+
+#ifdef BUILD_ASYNC_PRELOAD
+   if (--_evas_cache_mutex_init == 0)
+     {
+       eina_condition_free(&cond_wakeup);
+        LKD(engine_lock);
+        LKD(wakeup);
+     }
+#endif
 }
 
 EAPI Image_Entry *
-evas_cache_image_request(Evas_Cache_Image *cache, const char *file,
+evas_cache_image_request(Evas_Cache_Image *cache, const char *file, 
                          const char *key, RGBA_Image_Loadopts *lo, int *error)
 {
    const char           *ckey = "(null)";
    char                 *hkey;
    Image_Entry          *im;
-   Evas_Image_Load_Opts  prevent = { 0, 0, 0, 0, { 0, 0, 0, 0 } };
+   Evas_Image_Load_Opts  prevent = { 0, 0, 0, 0, { 0, 0, 0, 0 }, 0 };
    size_t                size;
    int                   stat_done = 0, stat_failed = 0;
    size_t                file_length;
@@ -668,7 +696,7 @@ evas_cache_image_request(Evas_Cache_Image *cache, const char *file,
    /* generate hkey from file+key+load opts */
    file_length = strlen(file);
    key_length = key ? strlen(key) : 6;
-   size = file_length + key_length + 128;
+   size = file_length + key_length + 132;
    hkey = alloca(sizeof (char) * size);
    memcpy(hkey, file, file_length);
    size = file_length;
@@ -682,37 +710,45 @@ evas_cache_image_request(Evas_Cache_Image *cache, const char *file,
         (lo->scale_down_by == 0) &&
         (lo->dpi == 0.0) &&
         ((lo->w == 0) || (lo->h == 0)) &&
-        ((lo->region.w == 0) || (lo->region.h == 0))
+        ((lo->region.w == 0) || (lo->region.h == 0)) &&
+       (lo->orientation == 0)
         ))
      {
         lo = &prevent;
      }
    else
      {
-        memcpy(hkey + size, "//@/", 4);
-        size += 4;
-        size += eina_convert_xtoa(lo->scale_down_by, hkey + size);
-        hkey[size] = '/';
-        size += 1;
-        size += eina_convert_dtoa(lo->dpi, hkey + size);
-        hkey[size] = '/';
-        size += 1;
-        size += eina_convert_xtoa(lo->w, hkey + size);
-        hkey[size] = 'x';
-        size += 1;
-        size += eina_convert_xtoa(lo->h, hkey + size);
-        hkey[size] = '/';
-        size += 1;
-        size += eina_convert_xtoa(lo->region.x, hkey + size);
-        hkey[size] = '+';
-        size += 1;
-        size += eina_convert_xtoa(lo->region.y, hkey + size);
-        hkey[size] = '.';
-        size += 1;
-        size += eina_convert_xtoa(lo->region.w, hkey + size);
-        hkey[size] = 'x';
-        size += 1;
-        size += eina_convert_xtoa(lo->region.h, hkey + size);
+       memcpy(hkey + size, "//@/", 4);
+       size += 4;
+       size += eina_convert_xtoa(lo->scale_down_by, hkey + size);
+       hkey[size] = '/';
+       size += 1;
+       size += eina_convert_dtoa(lo->dpi, hkey + size);
+       hkey[size] = '/';
+       size += 1;
+       size += eina_convert_xtoa(lo->w, hkey + size);
+       hkey[size] = 'x';
+       size += 1;
+       size += eina_convert_xtoa(lo->h, hkey + size);
+       hkey[size] = '/';
+       size += 1;
+       size += eina_convert_xtoa(lo->region.x, hkey + size);
+       hkey[size] = '+';
+       size += 1;
+       size += eina_convert_xtoa(lo->region.y, hkey + size);
+       hkey[size] = '.';
+       size += 1;
+       size += eina_convert_xtoa(lo->region.w, hkey + size);
+       hkey[size] = 'x';
+       size += 1;
+       size += eina_convert_xtoa(lo->region.h, hkey + size);
+
+       if (lo->orientation)
+         {
+             hkey[size] = '/';
+             hkey[size] = 'o';
+             size += 2;
+         }
      }
    hkey[size] = '\0';
 
@@ -730,10 +766,10 @@ evas_cache_image_request(Evas_Cache_Image *cache, const char *file,
 
         stat_done = 1;
         if (stat(file, &st) < 0)
-          {
+           {
               stat_failed = 1;
               ok = 0;
-          }
+           }
         else if (!_timestamp_compare(&(im->tstamp), &st)) ok = 0;
         if (ok) goto on_ok;
         /* image we found doesn't match what's on disk (stat info wise)
@@ -781,17 +817,17 @@ evas_cache_image_request(Evas_Cache_Image *cache, const char *file,
         im = NULL;
      }
    if (stat_failed) goto on_stat_error;
-
+   
    if (!stat_done)
      {
         if (stat(file, &st) < 0) goto on_stat_error;
      }
    _timestamp_build(&tstamp, &st);
-   im = _evas_cache_image_entry_new(cache, hkey, &tstamp, file, key,
+   im = _evas_cache_image_entry_new(cache, hkey, &tstamp, file, key, 
                                     lo, error);
    if (!im) return NULL;
    if (cache->func.debug) cache->func.debug("request", im);
-
+   
  on_ok:
    *error = EVAS_LOAD_ERROR_NONE;
 #ifdef EVAS_FRAME_QUEUING
@@ -860,20 +896,20 @@ evas_cache_image_drop(Image_Entry *im)
 #endif
 
 #ifdef BUILD_ASYNC_PRELOAD
-        if (im->preload)
-          {
-             _evas_cache_image_entry_preload_remove(im, NULL);
-             return ;
-          }
-#endif
-
-        if (im->flags.dirty)
-          {
-             _evas_cache_image_entry_delete(cache, im);
-             return;
-          }
+       if (im->preload)
+         {
+            _evas_cache_image_entry_preload_remove(im, NULL);
+            return;
+         }
+#endif
+
+       if (im->flags.dirty)
+         {
+            _evas_cache_image_entry_delete(cache, im);
+            return;
+         }
         _evas_cache_image_lru_add(im);
-        evas_cache_image_flush(cache);
+       evas_cache_image_flush(cache);
      }
 }
 
@@ -893,7 +929,7 @@ evas_cache_image_data_not_needed(Image_Entry *im)
 #ifdef EVAS_FRAME_QUEUING
    LKU(im->lock_references);
 #endif
-   if (references > 1) return ;
+   if (references > 1) return;
    if ((im->flags.dirty) || (!im->flags.need_data)) return;
    _evas_cache_image_lru_nodata_add(im);
 }
@@ -909,24 +945,24 @@ evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned
    if (!(im->flags.dirty))
      {
 #ifdef EVAS_FRAME_QUEUING
-   LKL(im->lock_references);
+        LKL(im->lock_references);
 #endif
-   references = im->references;
+        references = im->references;
 #ifdef EVAS_FRAME_QUEUING
-   LKU(im->lock_references);
+        LKU(im->lock_references);
 #endif
 #ifndef EVAS_CSERVE
-// if ref 1 also copy if using shared cache as its read-only
+        // 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);
+             
+             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);
@@ -942,13 +978,13 @@ evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned
           }
         _evas_cache_image_dirty_add(im_dirty);
      }
-
+   
    if (cache->func.debug) cache->func.debug("dirty-region", im_dirty);
    if (cache->func.dirty_region)
-     cache->func.dirty_region(im_dirty, x, y, w, h);
+      cache->func.dirty_region(im_dirty, x, y, w, h);
    return im_dirty;
 
- on_error:
+on_error:
    if (im_dirty) _evas_cache_image_entry_delete(cache, im_dirty);
    evas_cache_image_drop(im);
    return NULL;
@@ -978,42 +1014,42 @@ evas_cache_image_alone(Image_Entry *im)
      {
         int error;
 
-        im_dirty = evas_cache_image_copied_data(cache, im->w, im->h,
-           evas_cache_image_pixels(im),
-           im->flags.alpha,
-           im->space);
+        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);
         if (cache->func.debug) cache->func.debug("dirty-out", im_dirty);
 #ifdef EVAS_FRAME_QUEUING
-   LKL(im_dirty->lock_references);
+        LKL(im_dirty->lock_references);
 #endif
         im_dirty->references = 1;
 #ifdef EVAS_FRAME_QUEUING
-   LKU(im_dirty->lock_references);
+        LKU(im_dirty->lock_references);
 #endif
         evas_cache_image_drop(im);
      }
    return im_dirty;
-
-   on_error:
+   
+on_error:
    if (im_dirty) _evas_cache_image_entry_delete(cache, im_dirty);
    evas_cache_image_drop(im);
    return NULL;
 }
 
 EAPI Image_Entry *
-evas_cache_image_copied_data(Evas_Cache_Image *cache,
-                             unsigned int w, unsigned int h,
+evas_cache_image_copied_data(Evas_Cache_Image *cache, 
+                             unsigned int w, unsigned int h, 
                              DATA32 *image_data, int alpha, int cspace)
 {
    Image_Entry *im;
-
+   
    if ((cspace == EVAS_COLORSPACE_YCBCR422P601_PL) ||
        (cspace == EVAS_COLORSPACE_YCBCR422P709_PL))
-     w &= ~0x1;
-
+      w &= ~0x1;
+   
    im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL);
    if (!im) return NULL;
    im->space = cspace;
@@ -1042,8 +1078,8 @@ evas_cache_image_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, D
 
    if ((cspace == EVAS_COLORSPACE_YCBCR422P601_PL) ||
        (cspace == EVAS_COLORSPACE_YCBCR422P709_PL))
-     w &= ~0x1;
-
+      w &= ~0x1;
+   
    im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL);
    if (!im) return NULL;
    im->w = w;
@@ -1069,7 +1105,7 @@ EAPI void
 evas_cache_image_surface_alloc(Image_Entry *im, unsigned int w, unsigned int h)
 {
    Evas_Cache_Image *cache = im->cache;
-
+   
    if ((im->space == EVAS_COLORSPACE_YCBCR422P601_PL) ||
        (im->space == EVAS_COLORSPACE_YCBCR422P709_PL))
      w &= ~0x1;
@@ -1085,12 +1121,6 @@ evas_cache_image_size_set(Image_Entry *im, unsigned int w, unsigned int h)
    Image_Entry *im2 = NULL;
    int error;
 
-#ifdef EVAS_FRAME_QUEUING
-   LKL(im->lock_references);
-#endif
-#ifdef EVAS_FRAME_QUEUING
-   LKU(im->lock_references);
-#endif
    if ((im->space == EVAS_COLORSPACE_YCBCR422P601_PL) ||
        (im->space == EVAS_COLORSPACE_YCBCR422P709_PL))
      w &= ~0x1;
@@ -1123,39 +1153,39 @@ evas_cache_image_size_set(Image_Entry *im, unsigned int w, unsigned int h)
    return NULL;
 }
 
-EAPI void
+EAPI int
 evas_cache_image_load_data(Image_Entry *im)
 {
 #ifdef BUILD_ASYNC_PRELOAD
    Eina_Bool preload = EINA_FALSE;
 #endif
-   int error;
+   int error = EVAS_LOAD_ERROR_NONE;
 
-   if (im->flags.loaded) return;
+   if (im->flags.loaded) return error;
 #ifdef BUILD_ASYNC_PRELOAD
    if (im->preload)
      {
-        preload = EINA_TRUE;
-        if (!im->flags.pending)
-          {
-             im->cache->preload = eina_list_remove(im->cache->preload, im);
-             im->cache->pending = eina_list_append(im->cache->pending, im);
-             im->flags.pending = 1;
-             evas_preload_thread_cancel(im->preload);
-          }
-        evas_async_events_process();
-        LKL(wakeup);
-        while (im->preload)
-          {
-             pthread_cond_wait(&cond_wakeup, &wakeup);
-             LKU(wakeup);
-             evas_async_events_process();
-             LKL(wakeup);
-          }
-        LKU(wakeup);
+       preload = EINA_TRUE;
+       if (!im->flags.pending)
+         {
+            im->cache->preload = eina_list_remove(im->cache->preload, im);
+            im->cache->pending = eina_list_append(im->cache->pending, im);
+            im->flags.pending = 1;
+            evas_preload_thread_cancel(im->preload);
+         }
+       evas_async_events_process();
+       LKL(wakeup);
+       while (im->preload)
+         {
+             eina_condition_wait(&cond_wakeup);
+            LKU(wakeup);
+            evas_async_events_process();
+            LKL(wakeup);
+         }
+       LKU(wakeup);
      }
-
-   if (im->flags.loaded) return ;
+   
+   if (im->flags.loaded) return error;
    LKL(im->lock);
 #endif
    im->flags.in_progress = EINA_TRUE;
@@ -1174,6 +1204,7 @@ evas_cache_image_load_data(Image_Entry *im)
 #ifdef BUILD_ASYNC_PRELOAD
    if (preload) _evas_cache_image_async_end(im);
 #endif
+   return error;
 }
 
 EAPI void
@@ -1183,7 +1214,7 @@ evas_cache_image_unload_data(Image_Entry *im)
    evas_cache_image_preload_cancel(im, NULL);
 #ifdef BUILD_ASYNC_PRELOAD
    LKL(im->lock_cancel);
-   if (LKT(im->lock) != 0) /* can't get image lock - busy async load */
+   if (LKT(im->lock) == EINA_FALSE) /* can't get image lock - busy async load */
      {
         im->unload_cancel = EINA_TRUE;
         LKU(im->lock_cancel);
@@ -1236,7 +1267,7 @@ evas_cache_image_preload_data(Image_Entry *im, const void *target)
 {
 #ifdef BUILD_ASYNC_PRELOAD
    RGBA_Image *img = (RGBA_Image *)im;
-
+   
    if ((im->flags.loaded) && (img->image.data))
      {
         evas_object_inform_call_image_preloaded((Evas_Object *)target);
@@ -1244,7 +1275,7 @@ evas_cache_image_preload_data(Image_Entry *im, const void *target)
      }
    im->flags.loaded = 0;
    if (!_evas_cache_image_entry_preload_add(im, target))
-        evas_object_inform_call_image_preloaded((Evas_Object *)target);
+      evas_object_inform_call_image_preloaded((Evas_Object *)target);
 #else
    evas_cache_image_load_data(im);
    evas_object_inform_call_image_preloaded((Evas_Object *)target);
@@ -1289,7 +1320,7 @@ static void
 _dump_cache(Evas_Cache_Image *cache)
 {
    Image_Entry *im;
-
+   
    printf("--CACHE DUMP----------------------------------------------------\n");
    printf("cache: %ikb / %ikb\n",
           cache->usage / 1024,
@@ -1319,15 +1350,15 @@ evas_cache_image_flush(Evas_Cache_Image *cache)
    while ((cache->lru) && (cache->limit < (unsigned int)cache->usage))
      {
         Image_Entry *im;
-
+        
         im = (Image_Entry *)cache->lru->last;
         _evas_cache_image_entry_delete(cache, im);
      }
-
+   
    while ((cache->lru_nodata) && (cache->limit < (unsigned int)cache->usage))
      {
         Image_Entry *im;
-
+        
         im = (Image_Entry *) cache->lru_nodata->last;
         _evas_cache_image_lru_nodata_del(im);
         cache->func.surface_delete(im);
@@ -1390,6 +1421,7 @@ EAPI void
 evas_cache_image_wakeup(void)
 {
 #ifdef BUILD_ASYNC_PRELOAD
-   pthread_cond_broadcast(&cond_wakeup);
+   if (_evas_cache_mutex_init > 0)
+     eina_condition_broadcast(&cond_wakeup);
 #endif
 }
index 1a32c80..b6b434b 100644 (file)
 #include "evas_private.h"
 #include "Evas.h"
 
-static int _threads_max = 0;
-
 #ifdef BUILD_ASYNC_PRELOAD
 
+static int _threads_max = 0;
+
 typedef struct _Evas_Preload_Pthread_Worker Evas_Preload_Pthread_Worker;
 typedef struct _Evas_Preload_Pthread_Data Evas_Preload_Pthread_Data;
 
@@ -45,7 +45,7 @@ struct _Evas_Preload_Pthread_Data
 static int _threads_count = 0;
 static Evas_Preload_Pthread_Worker *_workers = NULL;
 
-static LK(_mutex) = PTHREAD_MUTEX_INITIALIZER;
+static LK(_mutex);
 
 static void
 _evas_preload_thread_end(void *data)
@@ -54,6 +54,8 @@ _evas_preload_thread_end(void *data)
    Evas_Preload_Pthread_Data *p = NULL;
 
    if (pthread_join(pth->thread, (void **)&p) != 0) free(p);
+
+   eina_threads_shutdown();
 }
 
 static void
@@ -66,6 +68,7 @@ _evas_preload_thread_done(void *target __UNUSED__, Evas_Callback_Type type __UNU
      }
    else
       work->func_end(work->data);
+
    free(work);
 }
 
@@ -74,7 +77,7 @@ _evas_preload_thread_worker(void *data)
 {
    Evas_Preload_Pthread_Data *pth = data;
    Evas_Preload_Pthread_Worker *work;
-   
+
    eina_sched_prio_drop();
    pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
    pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
@@ -125,8 +128,12 @@ on_error:
 void
 _evas_preload_thread_init(void)
 {
+#ifdef BUILD_ASYNC_PRELOAD
    _threads_max = eina_cpu_count();
    if (_threads_max < 1) _threads_max = 1;
+
+   LKI(_mutex);
+#endif
 }
 
 void
@@ -149,6 +156,8 @@ _evas_preload_thread_shutdown(void)
        free(work);
      }
    LKU(_mutex);
+
+   LKD(_mutex);
 #endif
 }
 
@@ -187,7 +196,9 @@ evas_preload_thread_run(void (*func_heavy) (void *data),
    /* One more thread could be created. */
    pth = malloc(sizeof(Evas_Preload_Pthread_Data));
    if (!pth) goto on_error;
-   
+
+   eina_threads_init();
+
    if (pthread_create(&pth->thread, NULL, _evas_preload_thread_worker, pth) == 0)
      {
        LKL(_mutex);
@@ -196,6 +207,8 @@ evas_preload_thread_run(void (*func_heavy) (void *data),
        return (Evas_Preload_Pthread*)work;
      }
 
+   eina_threads_shutdown();
+
  on_error:
    LKL(_mutex);
    if (_threads_count == 0)
diff --git a/src/lib/canvas/.cvsignore b/src/lib/canvas/.cvsignore
deleted file mode 100644 (file)
index 3923fb5..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile.in
-Makefile
-.deps
-.libs
-libevas_canvas.la
-*.lo
index d5959fa..cf2d61b 100644 (file)
@@ -13,7 +13,8 @@ AM_CPPFLAGS = \
 @EET_CFLAGS@ \
 @FONTCONFIG_CFLAGS@ \
 @EINA_CFLAGS@ \
-@EVIL_CFLAGS@
+@EVIL_CFLAGS@ \
+@PIXMAN_CFLAGS@
 
 noinst_LTLIBRARIES   = libevas_canvas.la
 libevas_canvas_la_SOURCES  = \
@@ -21,6 +22,7 @@ evas_callbacks.c \
 evas_clip.c \
 evas_data.c \
 evas_events.c \
+evas_filter.c \
 evas_focus.c \
 evas_key.c \
 evas_key_grab.c \
@@ -40,15 +42,20 @@ evas_object_box.c \
 evas_object_table.c \
 evas_object_text.c \
 evas_object_textblock.c \
+evas_object_grid.c \
 evas_font_dir.c \
 evas_rectangle.c \
 evas_render.c \
 evas_smart.c \
 evas_stack.c \
 evas_async_events.c \
-evas_transform.c \
 evas_stats.c \
-evas_map.c
+evas_map.c \
+evas_gl.c
 
 libevas_canvas_la_LIBADD = @EVIL_LIBS@
 
+if EVAS_USE_LINEBREAK
+AM_CPPFLAGS += @LINEBREAK_CFLAGS@
+libevas_canvas_la_LIBADD += @LINEBREAK_LIBS@
+endif
index a88620d..6074732 100644 (file)
@@ -62,29 +62,6 @@ evas_async_events_shutdown(void)
 
 #endif
 
-/**
- * @brief Get evas' internal asynchronous events read file descriptor.
- *
- * @return The canvas' asynchronous events read file descriptor.
- *
- * Evas' asynchronous events are meant to be dealt with internally,
- * i. e., when building stuff to be glued together into the EFL
- * infrastructure -- a module, for example. The context which demands
- * its use is when calculations need to be done out of the main
- * thread, asynchronously, and some action must be performed after
- * that.
- *
- * An example of actual use of this API is for image asynchronous
- * preload inside evas. If the canvas was instantiated through
- * ecore-evas usage, ecore itself will take care of calling those
- * events' processing.
- *
- * This function returns the read file descriptor where to get the
- * asynchronous events of the canvas. Naturally, other mainloops,
- * apart from ecore, may make use of it.
- *
- * @ingroup Evas_Group
- */
 EAPI int
 evas_async_events_fd_get(void)
 {
@@ -95,19 +72,6 @@ evas_async_events_fd_get(void)
 #endif
 }
 
-/**
- * @brief Trigger the processing of all events waiting on the file
- * descriptor returned by evas_async_events_fd_get().
- *
- * @return The number of events processed.
- *
- * All asynchronous events queued up by evas_async_events_put() are
- * processed here. More precisely, the callback functions, informed
- * together with other event parameters, when queued, get called (with
- * those parameters), in that order.
- *
- * @ingroup Evas_Group
- */
 EAPI int
 evas_async_events_process(void)
 {
@@ -147,21 +111,6 @@ evas_async_events_process(void)
 #endif
 }
 
-/**
-* Insert asynchronous events on the canvas.
- *
- * @param target The target to be affected by the events.
- * @param type The type of callback function.
- * @param event_info Information about the event.
- * @param func The callback function pointer.
- *
- * This is the way, for a routine running outside evas' main thread,
- * to report an asynchronous event. A callback function is informed,
- * whose call is to happen after evas_async_events_process() is
- * called.
- *
- * @ingroup Evas_Group
- */
 EAPI Eina_Bool
 evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_info, Evas_Async_Events_Put_Cb func)
 {
index b45f051..1c083bc 100644 (file)
@@ -255,183 +255,7 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void
 }
 
 
-/**
- * @addtogroup Evas_Object_Group_Events
- * @{
- */
-
-/**
- * Add a callback function to an object
- *
- * @param obj Object to attach a callback to
- * @param type The type of event that will trigger the callback
- * @param func The function to be called when the event is triggered
- * @param data The data pointer to be passed to @p func
- *
- * This function adds a function callback to an object when the event
- * of type @p type occurs on object @p obj. The function is @p func.
- *
- * In the event of a memory allocation error during addition of the
- * callback to the object, evas_alloc_error() should be used to
- * determine the nature of the error, if any, and the program should
- * sensibly try and recover.
- *
- * The function will be passed the pointer @p data when it is
- * called. A callback function must look like this:
- *
- * @code
- * void callback (void *data, Evas *e, Evas_Object *obj, void *event_info);
- * @endcode
- *
- * The first parameter @p data in this function will be the same value
- * passed to evas_object_event_callback_add() as the @p data
- * parameter. The second parameter is a convenience for the programmer
- * to know what evas canvas the event occurred on. The third parameter
- * @p obj is the Object handle on which the event occurred. The foruth
- * parameter @p event_info is a pointer to a data structure that may
- * or may not be passed to the callback, depending on the event type
- * that triggered the callback.
- *
- * The event type @p type to trigger the function may be one of
- * #EVAS_CALLBACK_MOUSE_IN, #EVAS_CALLBACK_MOUSE_OUT,
- * #EVAS_CALLBACK_MOUSE_DOWN, #EVAS_CALLBACK_MOUSE_UP,
- * #EVAS_CALLBACK_MOUSE_MOVE, #EVAS_CALLBACK_MOUSE_WHEEL,
- * #EVAS_CALLBACK_FREE, #EVAS_CALLBACK_KEY_DOWN, #EVAS_CALLBACK_KEY_UP,
- * #EVAS_CALLBACK_FOCUS_IN, #EVAS_CALLBACK_FOCUS_OUT,
- * #EVAS_CALLBACK_SHOW, #EVAS_CALLBACK_HIDE, #EVAS_CALLBACK_MOVE,
- * #EVAS_CALLBACK_RESIZE or #EVAS_CALLBACK_RESTACK.
- * This determines the kind of event that will trigger the callback to
- * be called.  The @p event_info pointer passed to the callback will
- * be one of the following, depending on the event triggering it:
- *
- * #EVAS_CALLBACK_MOUSE_IN: event_info = pointer to Evas_Event_Mouse_In
- *
- * This event is triggered when the mouse pointer enters the region of
- * the object @p obj. This may occur by the mouse pointer being moved
- * by evas_event_feed_mouse_move() or
- * evas_event_feed_mouse_move_data() calls, or by the object being
- * shown, raised, moved, resized, or other objects being moved out of
- * the way, hidden, lowered or moved out of the way.
- *
- * #EVAS_CALLBACK_MOUSE_OUT: event_info = pointer to Evas_Event_Mouse_Out
- *
- * This event is triggered exactly like #EVAS_CALLBACK_MOUSE_IN is, but
- * occurs when the mouse pointer exits an object. Note that no out
- * events will be reported if the mouse pointer is implicitly grabbed
- * to an object (the mouse buttons are down at all and any were
- * pressed on that object). An out event will be reported as soon as
- * the mouse is no longer grabbed (no mouse buttons are
- * depressed). Out events will be reported once all buttons are
- * released, if the mouse has left the object.
- *
- * #EVAS_CALLBACK_MOUSE_DOWN: event_info = pointer to
- * Evas_Event_Mouse_Down
- *
- * This event is triggered by a mouse button being depressed while
- * over an object. If pointermode is EVAS_OBJECT_POINTER_MODE_AUTOGRAB
- * (default) this causes this object to passively grab the mouse until
- * all mouse buttons have been released.  That means if this mouse
- * button is the first to be pressed, all future mouse events will be
- * reported to only this object until no buttons are down. That
- * includes mouse move events, in and out events, and further button
- * presses. When all buttons are released, event propagation occurs as
- * normal.
- *
- * #EVAS_CALLBACK_MOUSE_UP: event_info = pointer to Evas_Event_Mouse_Up
- *
- * This event is triggered by a mouse button being released while over
- * an object or when passively grabbed to an object. If this is the
- * last mouse button to be raised on an object then the passive grab
- * is released and event processing will continue as normal.
- *
- * #EVAS_CALLBACK_MOUSE_MOVE: event_info = pointer to Evas_Event_Mouse_Move
- *
- * This event is triggered by the mouse pointer moving while over an
- * object or passively grabbed to an object.
- *
- * #EVAS_CALLBACK_MOUSE_WHEEL: event_info = pointer to
- * Evas_Event_Mouse_Wheel
- *
- * This event is triggered by the mouse wheel being rolled while over
- * an object or passively grabbed to an object.
- *
- * #EVAS_CALLBACK_FREE: event_info = NULL
- *
- * This event is triggered just before Evas is about to free all
- * memory used by an object and remove all references to it. This is
- * useful for programs to use if they attached data to an object and
- * want to free it when the object is deleted. The object is still
- * valid when this callback is called, but after this callback
- * returns, there is no guarantee on the object's validity.
- *
- * #EVAS_CALLBACK_KEY_DOWN: event_info = pointer to Evas_Event_Key_Down
- *
- * This callback is called when a key is pressed and the focus is on
- * the object, or a key has been grabbed to a particular object which
- * wants to intercept the key press regardless of what object has the
- * focus.
- *
- * #EVAS_CALLBACK_KEY_UP: event_info = pointer to Evas_Event_Key_Up
- *
- * This callback is called when a key is released and the focus is on
- * the object, or a key has been grabbed to a particular object which
- * wants to intercept the key release regardless of what object has
- * the focus.
- *
- * #EVAS_CALLBACK_FOCUS_IN: event_info = NULL
- *
- * This event is called when an object gains the focus. When the
- * callback is called the object has already gained the focus.
- *
- * #EVAS_CALLBACK_FOCUS_OUT: event_info = NULL
- *
- * This event is triggered by an object losing the focus. When the
- * callback is called the object has already lost the focus.
- *
- * #EVAS_CALLBACK_SHOW: event_info = NULL
- *
- * This event is triggered by the object being shown by
- * evas_object_show().
- *
- * #EVAS_CALLBACK_HIDE: event_info = NULL
- *
- * This event is triggered by an object being hidden by
- * evas_object_hide().
- *
- * #EVAS_CALLBACK_MOVE: event_info = NULL
- *
- * This event is triggered by an object being
- * moved. evas_object_move() can trigger this, as can any
- * object-specific manipulations that would mean the object's origin
- * could move.
- *
- * #EVAS_CALLBACK_RESIZE: event_info = NULL
- *
- * This event is triggered by an object being resized. Resizes can be
- * triggered by evas_object_resize() or by any object-specific calls
- * that may cause the object to resize.
- *
- * Example:
- * @code
- * extern Evas_Object *object;
- * extern void *my_data;
- * void down_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);
- * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);
- *
- * evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_UP, up_callback, my_data);
- * if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE)
- *   {
- *     fprintf(stderr, "ERROR: Callback registering failed! Abort!\n");
- *     exit(-1);
- *   }
- * evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_DOWN, down_callback, my_data);
- * if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE)
- *   {
- *     fprintf(stderr, "ERROR: Callback registering failed! Abort!\n");
- *     exit(-1);
- *   }
- * @endcode
- */
+
 EAPI void
 evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
 {
@@ -464,30 +288,6 @@ evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, Evas_O
      eina_inlist_prepend(obj->callbacks->callbacks, EINA_INLIST_GET(fn));
 }
 
-/**
- * Delete a callback function from an object
- *
- * @param obj Object to remove a callback from
- * @param type The type of event that was triggering the callback
- * @param func The function that was to be called when the event was triggered
- * @return The data pointer that was to be passed to the callback
- *
- * This function removes the most recently added callback from the
- * object @p obj which was triggered by the event type @p type and was
- * calling the function @p func when triggered. If the removal is
- * successful it will also return the data pointer that was passed to
- * evas_object_event_callback_add() when the callback was added to the
- * object. If not successful NULL will be returned.
- *
- * Example:
- * @code
- * extern Evas_Object *object;
- * void *my_data;
- * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);
- *
- * my_data = evas_object_event_callback_del(object, EVAS_CALLBACK_MOUSE_UP, up_callback);
- * @endcode
- */
 EAPI void *
 evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func)
 {
@@ -506,45 +306,19 @@ evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, Evas_O
      {
        if ((fn->func == func) && (fn->type == type) && (!fn->delete_me))
          {
-            void *data;
+            void *tmp;
 
-            data = fn->data;
+            tmp = fn->data;
             fn->delete_me = 1;
             obj->callbacks->deletions_waiting = 1;
             if (!obj->callbacks->walking_list)
               evas_object_event_callback_clear(obj);
-            return data;
+            return tmp;
          }
      }
    return NULL;
 }
 
-/**
- * Delete a callback function from an object
- *
- * @param obj Object to remove a callback from
- * @param type The type of event that was triggering the callback
- * @param func The function that was to be called when the event was triggered
- * @param data The data pointer that was to be passed to the callback
- * @return The data pointer that was to be passed to the callback
- *
- * This function removes the most recently added callback from the
- * object @p obj which was triggered by the event type @p type and was
- * calling the function @p func with data @p data when triggered. If
- * the removal is successful it will also return the data pointer that
- * was passed to evas_object_event_callback_add() (that will be the
- * same as the parameter) when the callback was added to the
- * object. If not successful NULL will be returned.
- *
- * Example:
- * @code
- * extern Evas_Object *object;
- * void *my_data;
- * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);
- *
- * my_data = evas_object_event_callback_del_full(object, EVAS_CALLBACK_MOUSE_UP, up_callback, data);
- * @endcode
- */
 EAPI void *
 evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
 {
@@ -563,86 +337,21 @@ evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, E
      {
        if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me))
          {
-            void *data;
+            void *tmp;
 
-            data = fn->data;
+            tmp = fn->data;
             fn->delete_me = 1;
             obj->callbacks->deletions_waiting = 1;
             if (!obj->callbacks->walking_list)
               evas_object_event_callback_clear(obj);
-            return data;
+            return tmp;
          }
      }
    return NULL;
 }
 
-/**
- * @}
- */
-
-/**
- * @addtogroup Evas_Canvas_Events
- * @{
- */
-
-/**
- * Add a callback function to the canvas.
- *
- * @param e Canvas to attach a callback to
- * @param type The type of event that will trigger the callback
- * @param func The function to be called when the event is triggered
- * @param data The data pointer to be passed to @p func
- *
- * This function adds a function callback to the canvas when the event
- * of type @p type occurs on canvas @p e. The function is @p func.
- *
- * In the event of a memory allocation error during addition of the
- * callback to the canvas, evas_alloc_error() should be used to
- * determine the nature of the error, if any, and the program should
- * sensibly try and recover.
- *
- * The function will be passed the pointer @p data when it is
- * called. A callback function must look like this:
- *
- * @code
- * void callback (void *data, Evas *e, void *event_info);
- * @endcode
- *
- * The first parameter @p data in this function will be the same value
- * passed to evas_event_callback_add() as the @p data parameter. The
- * second parameter @p e is the canvas handle on which the event
- * occurred. The third parameter @p event_info is a pointer to a data
- * structure that may or may not be passed to the callback, depending
- * on the event type that triggered the callback.
- *
- * The event type @p type to trigger the function may be one of
- * #EVAS_CALLBACK_RENDER_FLUSH_PRE, #EVAS_CALLBACK_RENDER_FLUSH_POST,
- * #EVAS_CALLBACK_CANVAS_FOCUS_IN, #EVAS_CALLBACK_CANVAS_FOCUS_OUT.
- * This determines the kind of event that will trigger the callback to
- * be called.  So far none of the event types provide useful data, so
- * in all of them @p event_info pointer is @c NULL.
- *
- * Example:
- * @code
- * extern Evas *e;
- * extern void *my_data;
- * void focus_in_callback(void *data, Evas *e, void *event_info);
- * void focus_out_callback(void *data, Evas *e, void *event_info);
- *
- * evas_event_callback_add(e, EVAS_CALLBACK_CANVAS_FOCUS_IN, focus_in_callback, my_data);
- * if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE)
- *   {
- *     fprintf(stderr, "ERROR: Callback registering failed! Abort!\n");
- *     exit(-1);
- *   }
- * evas_event_callback_add(e, EVAS_CALLBACK_CANVAS_FOCUS_OUT, focus_out_callback, my_data);
- * if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE)
- *   {
- *     fprintf(stderr, "ERROR: Callback registering failed! Abort!\n");
- *     exit(-1);
- *   }
- * @endcode
- */
+
+
 EAPI void
 evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
 {
@@ -675,30 +384,6 @@ evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, co
      eina_inlist_prepend(e->callbacks->callbacks, EINA_INLIST_GET(fn));
 }
 
-/**
- * Delete a callback function from the canvas.
- *
- * @param e Canvas to remove a callback from
- * @param type The type of event that was triggering the callback
- * @param func The function that was to be called when the event was triggered
- * @return The data pointer that was to be passed to the callback
- *
- * This function removes the most recently added callback from the
- * canvas @p e which was triggered by the event type @p type and was
- * calling the function @p func when triggered. If the removal is
- * successful it will also return the data pointer that was passed to
- * evas_event_callback_add() when the callback was added to the
- * canvas. If not successful NULL will be returned.
- *
- * Example:
- * @code
- * extern Evas *e;
- * void *my_data;
- * void focus_in_callback(void *data, Evas *e, void *event_info);
- *
- * my_data = evas_event_callback_del(ebject, EVAS_CALLBACK_CANVAS_FOCUS_IN, focus_in_callback);
- * @endcode
- */
 EAPI void *
 evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func)
 {
@@ -730,32 +415,6 @@ evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func)
    return NULL;
 }
 
-/**
- * Delete a callback function from the canvas.
- *
- * @param e Canvas to remove a callback from
- * @param type The type of event that was triggering the callback
- * @param func The function that was to be called when the event was triggered
- * @param data The data pointer that was to be passed to the callback
- * @return The data pointer that was to be passed to the callback
- *
- * This function removes the most recently added callback from the
- * canvas @p e which was triggered by the event type @p type and was
- * calling the function @p func with data @p data when triggered. If
- * the removal is successful it will also return the data pointer that
- * was passed to evas_event_callback_add() (that will be the same as
- * the parameter) when the callback was added to the canvas. If not
- * successful NULL will be returned.
- *
- * Example:
- * @code
- * extern Evas *e;
- * void *my_data;
- * void focus_in_callback(void *data, Evas *e, void *event_info);
- *
- * my_data = evas_event_callback_del_full(ebject, EVAS_CALLBACK_CANVAS_FOCUS_IN, focus_in_callback, my_data);
- * @endcode
- */
 EAPI void *
 evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
 {
@@ -774,42 +433,19 @@ evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb fun
      {
        if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me))
          {
-            void *data;
+            void *tmp;
 
-            data = fn->data;
+            tmp = fn->data;
             fn->delete_me = 1;
             e->callbacks->deletions_waiting = 1;
             if (!e->callbacks->walking_list)
               evas_event_callback_clear(e);
-            return data;
+            return tmp;
          }
      }
    return NULL;
 }
 
-/**
- * Push a callback on the post-event callback stack
- *
- * @param e Canvas to push the callback on
- * @param func The function that to be called when the stack is unwound
- * @param data The data pointer to be passed to the callback
- *
- * Evas has a stack of callbacks that get called after all the callbacks for
- * an event have triggered (all the objects it triggers on and al the callbacks
- * in each object triggered). When all these have been called, the stack is
- * unwond from most recently to least recently pushed item and removed from the
- * stack calling the callback set for it.
- * 
- * This is intended for doing reverse logic-like processing, example - when a
- * child object that happens to get the event later is meant to be able to
- * "steal" functions from a parent and thus on unwind of this stack hav its
- * function called first, thus being able to set flags, or return 0 from the
- * post-callback that stops all other post-callbacks in the current stack from
- * being called (thus basically allowing a child to take control, if the event
- * callback prepares information ready for taking action, but the post callback
- * actually does the action).
- *
- */
 EAPI void
 evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const void *data)
 {
@@ -830,17 +466,6 @@ evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const voi
    e->post_events = eina_list_prepend(e->post_events, pc);
 }
 
-/**
- * Remove a callback from the post-event callback stack
- * 
- * @param e Canvas to push the callback on
- * @param func The function that to be called when the stack is unwound
- * 
- * This removes a callback from the stack added with
- * evas_post_event_callback_push(). The first instance of the function in
- * the callback stack is removed from being executed when the stack is
- * unwound. Further instances may still be run on unwind.
- */
 EAPI void
 evas_post_event_callback_remove(Evas *e, Evas_Object_Event_Post_Cb func)
 {
@@ -861,18 +486,6 @@ evas_post_event_callback_remove(Evas *e, Evas_Object_Event_Post_Cb func)
      }
 }
 
-/**
- * Remove a callback from the post-event callback stack
- * 
- * @param e Canvas to push the callback on
- * @param func The function that to be called when the stack is unwound
- * @param data The data pointer to be passed to the callback
- * 
- * This removes a callback from the stack added with
- * evas_post_event_callback_push(). The first instance of the function and data
- * in the callback stack is removed from being executed when the stack is
- * unwound. Further instances may still be run on unwind.
- */
 EAPI void
 evas_post_event_callback_remove_full(Evas *e, Evas_Object_Event_Post_Cb func, const void *data)
 {
@@ -892,6 +505,3 @@ evas_post_event_callback_remove_full(Evas *e, Evas_Object_Event_Post_Cb func, co
           }
      }
 }
-/**
- * @}
- */
index fc663fa..7337f4f 100644 (file)
@@ -159,59 +159,8 @@ evas_object_mapped_clip_across_mark(Evas_Object *obj)
 }
 
 /* public functions */
+extern const char *o_rect_type;
 
-/**
- * @addtogroup Evas_Object_Group_Basic
- * @{
- */
-
-/**
- * Clip one object to another.
- * @param obj The object to be clipped
- * @param clip The object to clip @p obj by
- *
- * This function will clip the object @p obj to the area occupied by the
- * object @p clipper. This means the object @p obj will only be visible within
- * the area occupied by the clipping object (@p clip). The color of the object
- * being clipped will be multiplied by the color of the clipping object, so
- * the resulting color for the clipped object is
- * RESULT = (OBJ * CLIP) / (255 * 255) per color element (red, green, blue and
- * alpha). Clipping is recursive, so clip objects may be clipped by other
- * objects, and their color will in tern be multiplied. You may NOT set up
- * circular clipping lists (i.e. object 1 clips object 2 which clips object 1).
- * The behavior of Evas is undefined in this case. Objects which do not clip
- * others are visible as normal, those that clip 1 or more objects become
- * invisible themselves, only affecting what they clip. If an object ceases to
- * have other objects being clipped by it, it will become visible again. The
- * visibility of an object affects the objects that are clipped by it, so if
- * the object clipping others is not shown, the objects clipped will not be
- * shown either. If the object was being clipped by another object when this
- * function is called, it is implicitly removed from the clipper it is being
- * clipped to, and now is made to clip its new clipper.
- *
- * At the moment the only objects that can validly be used to clip other
- * objects are rectangle objects. All other object types are invalid and the
- * result of using them is undefined.
- *
- * The clip object @p clip must be a valid object, but may also be NULL in
- * which case the effect of this function is the same as calling
- * evas_object_clip_unset() on the @p obj object.
- *
- * Example:
- * @code
- * extern Evas *evas;
- * extern Evas_Object *obj;
- * Evas_Object *clipper;
- *
- * clipper = evas_object_rectangle_add(evas);
- * evas_object_color_set(clipper, 255, 255, 255, 255);
- * evas_object_move(clipper, 10, 10);
- * evas_object_resize(clipper, 20, 50);
- * evas_object_clip_set(obj, clipper);
- * evas_object_show(clipper);
- * @endcode
- *
- */
 EAPI void
 evas_object_clip_set(Evas_Object *obj, Evas_Object *clip)
 {
@@ -229,6 +178,8 @@ evas_object_clip_set(Evas_Object *obj, Evas_Object *clip)
    if (obj->cur.clipper == clip) return;
    if (obj == clip) return;
    if (evas_object_intercept_call_clip_set(obj, clip)) return;
+   // illegal to set anything but a rect as a clip
+   if (clip->type != o_rect_type) return;
    if (obj->smart.smart)
      {
        if (obj->smart.smart->smart_class->clip_set)
@@ -284,7 +235,7 @@ evas_object_clip_set(Evas_Object *obj, Evas_Object *clip)
    evas_object_change(obj);
    evas_object_clip_dirty(obj);
    evas_object_recalc_clippees(obj);
-   if ((!obj->smart.smart) &&
+   if ((!obj->smart.smart) && 
        (!((obj->cur.map) && (obj->cur.usemap))))
      {
        if (evas_object_is_in_output_rect(obj,
@@ -299,26 +250,6 @@ evas_object_clip_set(Evas_Object *obj, Evas_Object *clip)
    evas_object_clip_across_check(obj);
 }
 
-/**
- * Get the object clipping this one (if any).
- * @param obj The object to get the clipper from
- *
- * This function returns the the object clipping @p obj. If @p obj not being
- * clipped, NULL is returned. The object @p obj must be a valid object.
- *
- * See also evas_object_clip_set(), evas_object_clip_unset() and
- * evas_object_clipees_get().
- *
- * Example:
- * @code
- * extern Evas_Object *obj;
- * Evas_Object *clipper;
- *
- * clipper = evas_object_clip_get(obj);
- * if (clipper) evas_object_show(clipper);
- * @endcode
- *
- */
 EAPI Evas_Object *
 evas_object_clip_get(const Evas_Object *obj)
 {
@@ -328,32 +259,6 @@ evas_object_clip_get(const Evas_Object *obj)
    return obj->cur.clipper;
 }
 
-/**
- * Disable clipping for an object.
- *
- * @param obj The object to cease clipping on
- *
- * This function disables clipping for the object @p obj, if it was already
- * clipped. If it wasn't, this has no effect. The object @p obj must be a
- * valid object.
- *
- * See also evas_object_clip_set(), evas_object_clipees_get() and
- * evas_object_clip_get().
- *
- * Example:
- * @code
- * extern Evas_Object *obj;
- * Evas_Object *clipper;
- *
- * clipper = evas_object_clip_get(obj);
- * if (clipper)
- *   {
- *     evas_object_clip_unset(obj);
- *     evas_object_hide(obj);
- *   }
- * @endcode
- *
- */
 EAPI void
 evas_object_clip_unset(Evas_Object *obj)
 {
@@ -402,43 +307,6 @@ evas_object_clip_unset(Evas_Object *obj)
    evas_object_clip_across_check(obj);
 }
 
-/**
- * Return a list of objects currently clipped by a specific object.
- *
- * @param obj The object to get a list of clippees from
- *
- * This returns the inernal list handle that contains all objects clipped by
- * the object @p obj. If none are clipped, it returns NULL. This list is only
- * valid until the clip list is changed and should be fetched again with another
- * call to evas_object_clipees_get() if any objects being clipped by this object
- * are unclipped, clipped by a new object, are deleted or the clipper is
- * deleted.  These operations will invalidate the list returned so it should
- * not be used anymore after that point. Any use of the list after this may have
- * undefined results, not limited just to strange behavior but possible
- * segfaults and other strange memory errors. The object @p obj must be a valid
- * object.
- *
- * See also evas_object_clip_set(), evas_object_clip_unset() and
- * evas_object_clip_get().
- *
- * Example:
- * @code
- * extern Evas_Object *obj;
- * Evas_Object *clipper;
- *
- * clipper = evas_object_clip_get(obj);
- * if (clipper)
- *   {
- *     Eina_List *clippees, *l;
- *     Evas_Object *obj_tmp;
- *
- *     clippees = evas_object_clipees_get(clipper);
- *     printf("Clipper clips %i objects\n", eina_list_count(clippees));
- *     EINA_LIST_FOREACH(clippees, l, obj_tmp)
- *         evas_object_show(obj_tmp);
- *   }
- * @endcode
- */
 EAPI const Eina_List *
 evas_object_clipees_get(const Evas_Object *obj)
 {
@@ -447,32 +315,3 @@ evas_object_clipees_get(const Evas_Object *obj)
    MAGIC_CHECK_END();
    return obj->clip.clipees;
 }
-
-
-EAPI void
-evas_object_mask_set(Evas_Object *obj, Evas_Object *mask)
-{
-   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
-   return;
-   MAGIC_CHECK_END();
-   if (!mask)
-     {
-       //evas_object_clip_unset(obj);
-       return;
-     }
-   MAGIC_CHECK(mask, Evas_Object, MAGIC_OBJ);
-   return;
-   MAGIC_CHECK_END();
-   if (obj->cur.mask == mask) return;
-   if (obj == mask) return;
-
-   obj->cur.mask = mask;
-
-   evas_object_clip_set(obj, mask);
-}
-
-
-
-/**
- * @}
- */
index 4aaf475..3ac9d63 100644 (file)
@@ -1,42 +1,7 @@
 #include "evas_common.h"
 #include "evas_private.h"
 
-/**
- * @addtogroup Evas_Object_Group_Extras
- * @{
- */
 
-/**
- * Set an attached data pointer to an object with a given string key.
- * @param obj The object to attach the data pointer to
- * @param key The string key for the data to access it
- * @param data The ponter to the data to be attached
- *
- * This attaches the pointer @p data to the object @p obj given the string
- * @p key. This pointer will stay "hooked" to the object until a new pointer
- * with the same string key is attached with evas_object_data_set() or it is
- * deleted with evas_object_data_del(). On deletion of the object @p obj, the
- * pointers will not be accessible from the object anymore.
- *
- * You can find the pointer attached under a string key using
- * evas_object_data_get(). It is the job of the calling application to free
- * any data pointed to by @p data when it is no longer required.
- *
- * If @p data is NULL, the old value stored at @p key will be removed but no
- * new value will be stored. This is synonymous with calling
- * evas_object_data_del() with @p obj and @p key.
- *
- * Example:
- *
- * @code
- * int *my_data;
- * extern Evas_Object *obj;
- *
- * my_data = malloc(500);
- * evas_object_data_set(obj, "name_of_data", my_data);
- * printf("The data that was attached was %p\n", evas_object_data_get(obj, "name_of_data"));
- * @endcode
- */
 EAPI void
 evas_object_data_set(Evas_Object *obj, const char *key, const void *data)
 {
@@ -56,32 +21,6 @@ evas_object_data_set(Evas_Object *obj, const char *key, const void *data)
    obj->data.elements = eina_list_prepend(obj->data.elements, node);
 }
 
-/**
- * Return an attached data pointer by its given string key.
- * @param obj The object to which the data was attached
- * @param key The string key the data was stored under
- * @return The data pointer stored, or NULL if none was stored
- *
- * This function will return the data pointer attached to the object @p obj
- * stored using the string key @p key. If the object is valid and data was
- * stored under the given key, the pointer that was stored will be reuturned.
- * If this is not the case, NULL will be returned, signifying an invalid object
- * or non-existent key. It is possible a NULL pointer was stored given that
- * key, but this situation is non-sensical and thus can be considered an error
- * as well. NULL pointers are never stored as this is the return value if an
- * error occurs.
- *
- * Example:
- *
- * @code
- * int *my_data;
- * extern Evas_Object *obj;
- *
- * my_data = evas_object_data_get(obj, "name_of_my_data");
- * if (my_data) printf("Data stored was %p\n", my_data);
- * else printf("No data was stored on the object\n");
- * @endcode
- */
 EAPI void *
 evas_object_data_get(const Evas_Object *obj, const char *key)
 {
@@ -107,25 +46,6 @@ evas_object_data_get(const Evas_Object *obj, const char *key)
    return NULL;
 }
 
-/**
- * Delete at attached data pointer from an object.
- * @param obj The object to delete the data pointer from
- * @param key The string key the data was stored under
- * @return The original data pointer stored at @p key on @p obj
- *
- * This will remove thee stored data pointer from @p obj stored under @p key,
- * and return the original pointer stored under @p key, if any, nor NULL if
- * nothing was stored under that key.
- *
- * Example:
- *
- * @code
- * int *my_data;
- * extern Evas_Object *obj;
- *
- * my_data = evas_object_data_del(obj, "name_of_my_data");
- * @endcode
- */
 EAPI void *
 evas_object_data_del(Evas_Object *obj, const char *key)
 {
@@ -150,7 +70,3 @@ evas_object_data_del(Evas_Object *obj, const char *key)
      }
    return NULL;
 }
-
-/**
- * @}
- */
index a593457..a1aae40 100644 (file)
@@ -133,7 +133,6 @@ evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y)
    return in;
 }
 
-static Eina_List *evas_event_list_copy(Eina_List *list);
 static Eina_List *
 evas_event_list_copy(Eina_List *list)
 {
@@ -146,31 +145,6 @@ evas_event_list_copy(Eina_List *list)
 }
 /* public functions */
 
-/**
- * @addtogroup Evas_Event_Freezing_Group
- * @{
- */
-
-/**
- * Freeze all event processing.
- * @param e The canvas to freeze event processing on.
- *
- * This function will indicate to evas that the canvas @p e is to have
- * all event processing frozen until a matching evas_event_thaw()
- * function is called on the same canvas. Every freeze call must be
- * matched by a thaw call in order to completely thaw out a canvas.
- *
- * Example:
- * @code
- * extern Evas *evas;
- * extern Evas_Object *object;
- *
- * evas_event_freeze(evas);
- * evas_object_move(object, 50, 100);
- * evas_object_resize(object, 200, 200);
- * evas_event_thaw(evas);
- * @endcode
- */
 EAPI void
 evas_event_freeze(Evas *e)
 {
@@ -180,18 +154,6 @@ evas_event_freeze(Evas *e)
    e->events_frozen++;
 }
 
-/**
- * Thaw a canvas out after freezing.
- *
- * @param e The canvas to thaw out.
- *
- * This will thaw out a canvas after a matching evas_event_freeze()
- * call. If this call completely thaws out a canvas, events will start
- * being processed again after this call, but this call will not
- * invole any "missed" events to be evaluated.
- *
- * See evas_event_freeze() for an example.
- */
 EAPI void
 evas_event_thaw(Evas *e)
 {
@@ -218,34 +180,6 @@ evas_event_thaw(Evas *e)
      evas_debug_generic("  Thaw of events when already thawed!!!\n");
 }
 
-/**
- * @}
- */
-
-/**
- * @addtogroup Evas_Event_Feeding_Group
- * @{
- */
-
-/**
- * Return the freeze count of a given canvas.
- * @param e The canvas to fetch the freeze count from.
- *
- * This returns the number of times the canvas has been told to freeze
- * events.  It is possible to call evas_event_freeze() multiple times,
- * and these must be matched by evas_event_thaw() calls. This call
- * allows the program to discover just how many times things have been
- * frozen in case it may want to break out of a deep freeze state
- * where the count is high.
- *
- * Example:
- * @code
- * extern Evas *evas;
- *
- * while (evas_event_freeze_get(evas) > 0) evas_event_thaw(evas);
- * @endcode
- *
- */
 EAPI int
 evas_event_freeze_get(const Evas *e)
 {
@@ -262,24 +196,10 @@ evas_event_thaw_eval(Evas *e)
    return;
    MAGIC_CHECK_END();
    if (e->events_frozen != 0) return;
-   evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y,
+   evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, 
                               e->last_timestamp, NULL);
 }
 
-/**
- * Mouse down event feed.
- *
- * @param e The given canvas pointer.
- * @param b The button number.
- * @param flags The evas button flags.
- * @param timestamp The timestamp of the mouse down event.
- * @param data The data for canvas.
- *
- * This function will set some evas properties that is necessary when
- * the mouse button is pressed. It prepares information to be treated
- * by the callback function.
- *
- */
 EAPI void
 evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
 {
@@ -343,20 +263,101 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int
    _evas_unwalk(e);
 }
 
-/**
- * Mouse up event feed.
- *
- * @param e The given canvas pointer.
- * @param b The button number.
- * @param flags evas button flags.
- * @param timestamp The timestamp of the mouse up event.
- * @param data The data for canvas.
- *
- * This function will set some evas properties that is necessary when
- * the mouse button is released. It prepares information to be treated
- * by the callback function.
- *
- */
+static int
+_post_up_handle(Evas *e, unsigned int timestamp, const void *data)
+{
+   Eina_List *l, *copy, *ins, *ll;
+   Evas_Event_Mouse_Out ev;
+   Evas_Object *obj;
+   int post_called = 0;
+   
+   _evas_object_event_new();
+   
+   ev.buttons = e->pointer.button;
+   ev.output.x = e->pointer.x;
+   ev.output.y = e->pointer.y;
+   ev.canvas.x = e->pointer.x;
+   ev.canvas.y = e->pointer.y;
+   ev.data = (void *)data;
+   ev.modifiers = &(e->modifiers);
+   ev.locks = &(e->locks);
+   ev.timestamp = timestamp;
+   ev.event_flags = EVAS_EVENT_FLAG_NONE;
+   
+   /* get new list of ins */
+   ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y);
+   /* go thru old list of in objects */
+   copy = evas_event_list_copy(e->pointer.object.in);
+   EINA_LIST_FOREACH(copy, ll, obj)
+     {
+        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 ((!eina_list_data_find(ins, obj)) ||
+            (!e->pointer.inside))
+          {
+             if (obj->mouse_in)
+               {
+                  obj->mouse_in = 0;
+                  if (e->events_frozen <= 0)
+                     evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev);
+               }
+          }
+        if (e->delete_me) break;
+     }
+   _evas_post_event_callback_call(e);
+   
+   if (copy) copy = eina_list_free(copy);
+   if (e->pointer.inside)
+     {
+        Evas_Event_Mouse_In ev;
+        Evas_Object *obj;
+        
+        _evas_object_event_new();
+        
+        ev.buttons = e->pointer.button;
+        ev.output.x = e->pointer.x;
+        ev.output.y = e->pointer.y;
+        ev.canvas.x = e->pointer.x;
+        ev.canvas.y = e->pointer.y;
+        ev.data = (void *)data;
+        ev.modifiers = &(e->modifiers);
+        ev.locks = &(e->locks);
+        ev.timestamp = timestamp;
+        ev.event_flags = EVAS_EVENT_FLAG_NONE;
+        
+        EINA_LIST_FOREACH(ins, l, obj)
+          {
+             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 (!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, &ev);
+                    }
+               }
+             if (e->delete_me) break;
+          }
+        post_called = 1;
+        _evas_post_event_callback_call(e);
+     }
+   else
+     {
+        ins = eina_list_free(ins);
+     }
+   /* free our old list of ins */
+   e->pointer.object.in = eina_list_free(e->pointer.object.in);
+   /* and set up the new one */
+   e->pointer.object.in = ins;
+   if (e->pointer.inside)
+      evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, timestamp, data);
+   return post_called;
+}
+
 EAPI void
 evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
 {
@@ -418,95 +419,7 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t
 
    if (!e->pointer.button)
      {
-       Eina_List *ins;
-       Eina_List *l;
-         {
-            Evas_Event_Mouse_Out ev;
-            Evas_Object *obj;
-
-            _evas_object_event_new();
-
-            ev.buttons = e->pointer.button;
-            ev.output.x = e->pointer.x;
-            ev.output.y = e->pointer.y;
-            ev.canvas.x = e->pointer.x;
-            ev.canvas.y = e->pointer.y;
-            ev.data = (void *)data;
-            ev.modifiers = &(e->modifiers);
-            ev.locks = &(e->locks);
-            ev.timestamp = timestamp;
-            ev.event_flags = EVAS_EVENT_FLAG_NONE;
-
-            /* get new list of ins */
-            ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y);
-            /* go thru old list of in objects */
-            copy = evas_event_list_copy(e->pointer.object.in);
-            EINA_LIST_FOREACH(copy, l, obj)
-              {
-                  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 ((!eina_list_data_find(ins, obj)) ||
-                     (!e->pointer.inside))
-                   {
-                       if (obj->mouse_in)
-                         {
-                            obj->mouse_in = 0;
-                            if (e->events_frozen <= 0)
-                               evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev);
-                         }
-                   }
-                 if (e->delete_me) break;
-              }
-             _evas_post_event_callback_call(e);
-         }
-       if (copy) copy = eina_list_free(copy);
-       if (e->pointer.inside)
-         {
-            Evas_Event_Mouse_In ev;
-            Evas_Object *obj;
-
-            _evas_object_event_new();
-
-            ev.buttons = e->pointer.button;
-            ev.output.x = e->pointer.x;
-            ev.output.y = e->pointer.y;
-            ev.canvas.x = e->pointer.x;
-            ev.canvas.y = e->pointer.y;
-            ev.data = (void *)data;
-            ev.modifiers = &(e->modifiers);
-            ev.locks = &(e->locks);
-            ev.timestamp = timestamp;
-            ev.event_flags = EVAS_EVENT_FLAG_NONE;
-
-            EINA_LIST_FOREACH(ins, l, obj)
-              {
-                  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 (!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, &ev);
-                         }
-                   }
-                 if (e->delete_me) break;
-              }
-             _evas_post_event_callback_call(e);
-         }
-       else
-         {
-            ins = eina_list_free(ins);
-         }
-       /* free our old list of ins */
-       e->pointer.object.in = eina_list_free(e->pointer.object.in);
-       /* and set up the new one */
-       e->pointer.object.in = ins;
-       if (e->pointer.inside)
-         evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, timestamp, data);
+        _post_up_handle(e, timestamp, data);
      }
 
    if (e->pointer.mouse_grabbed < 0)
@@ -523,18 +436,6 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t
    _evas_unwalk(e);
 }
 
-
-/**
- * Mouse cancel event feed.
- *
- * @param e The given canvas pointer.
- * @param timestamp The timestamp of the mouse up event.
- * @param data The data for canvas.
- *
- * This function will call evas_event_feed_mouse_up() when a
- * mouse cancel event happens.
- *
- */
 EAPI void
 evas_event_feed_mouse_cancel(Evas *e, unsigned int timestamp, const void *data)
 {
@@ -555,20 +456,6 @@ evas_event_feed_mouse_cancel(Evas *e, unsigned int timestamp, const void *data)
    _evas_unwalk(e);
 }
 
-/**
- * Mouse wheel event feed.
- *
- * @param e The given canvas pointer.
- * @param direction The wheel mouse direction.
- * @param z How much mouse wheel was scrolled up or down.
- * @param timestamp The timestamp of the mouse up event.
- * @param data The data for canvas.
- *
- * This function will set some evas properties that is necessary when
- * the mouse wheel is scrolled up or down. It prepares information to
- * be treated by the callback function.
- *
- */
 EAPI void
 evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestamp, const void *data)
 {
@@ -615,20 +502,6 @@ evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestam
    _evas_unwalk(e);
 }
 
-/**
- * Mouse move event feed.
- *
- * @param e The given canvas pointer.
- * @param x The horizontal position of the mouse pointer.
- * @param y The vertical position of the mouse pointer.
- * @param timestamp The timestamp of the mouse up event.
- * @param data The data for canvas.
- *
- * This function will set some evas properties that is necessary when
- * the mouse is moved from its last position. It prepares information
- * to be treated by the callback function.
- *
- */
 EAPI void
 evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const void *data)
 {
@@ -871,18 +744,6 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
    _evas_unwalk(e);
 }
 
-/**
- * Mouse in event feed.
- *
- * @param e The given canvas pointer.
- * @param timestamp The timestamp of the mouse up event.
- * @param data The data for canvas.
- *
- * This function will set some evas properties that is necessary when
- * the mouse in event happens. It prepares information to be treated
- * by the callback function.
- *
- */
 EAPI void
 evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data)
 {
@@ -942,18 +803,6 @@ evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data)
    _evas_unwalk(e);
 }
 
-/**
- * Mouse out event feed.
- *
- * @param e The given canvas pointer.
- * @param timestamp Timestamp of the mouse up event.
- * @param data The data for canvas.
- *
- * This function will set some evas properties that is necessary when
- * the mouse out event happens. It prepares information to be treated
- * by the callback function.
- *
- */
 EAPI void
 evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data)
 {
@@ -1067,6 +916,11 @@ evas_event_feed_multi_down(Evas *e,
           ev.canvas.xsub = ev.canvas.x; // fixme - lost precision
         if (y != ev.canvas.y)
           ev.canvas.ysub = ev.canvas.y; // fixme - lost precision
+       if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB)
+         {
+            obj->mouse_grabbed++;
+            e->pointer.mouse_grabbed++;
+         }
        if (e->events_frozen <= 0)
          evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_DOWN, &ev);
        if (e->delete_me) break;
@@ -1130,12 +984,19 @@ evas_event_feed_multi_up(Evas *e,
           ev.canvas.xsub = ev.canvas.x; // fixme - lost precision
         if (y != ev.canvas.y)
           ev.canvas.ysub = ev.canvas.y; // fixme - lost precision
+        if ((obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) &&
+            (obj->mouse_in) && (obj->mouse_grabbed > 0))
+          {
+             obj->mouse_grabbed--;
+             e->pointer.mouse_grabbed--;
+          }
         if (e->events_frozen <= 0)
           evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_UP, &ev);
         if (e->delete_me) break;
      }
    if (copy) copy = eina_list_free(copy);
-   _evas_post_event_callback_call(e);
+   if (!_post_up_handle(e, timestamp, data))
+      _evas_post_event_callback_call(e);
    _evas_unwalk(e);
 }
 
@@ -1279,22 +1140,6 @@ evas_event_feed_multi_move(Evas *e,
    _evas_unwalk(e);
 }
 
-/**
- * Key down event feed
- *
- * @param e The canvas to thaw out
- * @param keyname  Name of the key
- * @param key The key pressed.
- * @param string A String
- * @param compose The compose string
- * @param timestamp Timestamp of the mouse up event
- * @param data Data for canvas.
- *
- * This function will set some evas properties that is necessary when
- * a key is pressed. It prepares information to be treated by the
- * callback function.
- *
- */
 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)
 {
@@ -1374,22 +1219,6 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch
    _evas_unwalk(e);
 }
 
-/**
- * Key up event feed
- *
- * @param e The canvas to thaw out
- * @param keyname  Name of the key
- * @param key The key released.
- * @param string string
- * @param compose compose
- * @param timestamp Timestamp of the mouse up event
- * @param data Data for canvas.
- *
- * This function will set some evas properties that is necessary when
- * a key is released. It prepares information to be treated by the
- * callback function.
- *
- */
 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)
 {
@@ -1447,14 +1276,14 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char
               {
                  while (e->delete_grabs > 0)
                    {
-                      Eina_List *l, *l_next;
-                      Evas_Key_Grab *g;
+                      Eina_List *ll, *l_next;
+                      Evas_Key_Grab *gr;
 
                       e->delete_grabs--;
-                      EINA_LIST_FOREACH_SAFE(e->grabs, l, l_next, g)
+                      EINA_LIST_FOREACH_SAFE(e->grabs, ll, l_next, gr)
                         {
-                           if (g->delete_me)
-                             evas_key_grab_free(g->object, g->keyname, g->modifiers, g->not_modifiers);
+                           if (gr->delete_me)
+                             evas_key_grab_free(gr->object, gr->keyname, gr->modifiers, gr->not_modifiers);
                         }
                    }
               }
@@ -1469,17 +1298,6 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char
    _evas_unwalk(e);
 }
 
-/**
- * Hold event feed
- *
- * @param e The given canvas pointer.
- * @param hold The hold.
- * @param timestamp The timestamp of the mouse up event.
- * @param data The data for canvas.
- *
- * This function makes the object to stop sending events.
- *
- */
 EAPI void
 evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data)
 {
@@ -1515,26 +1333,6 @@ evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data
    _evas_object_event_new();
 }
 
-/**
- * @}
- */
-
-/**
- * @addtogroup Evas_Object_Group_Events
- * @{
- */
-
-/**
- * Set an object's pass events state.
- * @param obj the evas object
- * @param pass whether to pass events or not
- *
- * If @p pass is true, this will cause events on @p obj to be ignored.
- * They will be triggered on the next lower object (that is not set to
- * pass events) instead.
- *
- * If @p pass is false, events will be processed as normal.
- */
 EAPI void
 evas_object_pass_events_set(Evas_Object *obj, Eina_Bool pass)
 {
@@ -1559,11 +1357,6 @@ evas_object_pass_events_set(Evas_Object *obj, Eina_Bool pass)
                                NULL);
 }
 
-/**
- * Determine whether an object is set to pass events.
- * @param obj
- * @return pass events state
- */
 EAPI Eina_Bool
 evas_object_pass_events_get(const Evas_Object *obj)
 {
@@ -1573,18 +1366,6 @@ evas_object_pass_events_get(const Evas_Object *obj)
    return obj->pass_events;
 }
 
-/**
- * Set an object's repeat events state.
- * @param obj the object
- * @param repeat wheter to repeat events or not
- *
- * If @p repeat is true, this will cause events on @p obj to trigger
- * callbacks, but also to be repeated on the next lower object in the
- * stack.
- *
- * If @p repeat is false, events occurring on @p obj will be processed
- * normally.
- */
 EAPI void
 evas_object_repeat_events_set(Evas_Object *obj, Eina_Bool repeat)
 {
@@ -1608,11 +1389,6 @@ evas_object_repeat_events_set(Evas_Object *obj, Eina_Bool repeat)
                                NULL);
 }
 
-/**
- * Determine whether an object is set to repeat events.
- * @param obj
- * @return repeat events state
- */
 EAPI Eina_Bool
 evas_object_repeat_events_get(const Evas_Object *obj)
 {
@@ -1622,24 +1398,6 @@ evas_object_repeat_events_get(const Evas_Object *obj)
    return obj->repeat_events;
 }
 
-/**
- * Set whether events on a smart member object should propagate to its
- * parent.
- *
- * @param obj the smart member object
- * @param prop wheter to propagate events or not
- *
- * This function has no effect if @p obj is not a member of a smart
- * object.
- *
- * If @p prop is true, events occurring on this object will propagate on
- * to the smart object of which @p obj is a member.
- *
- * If @p prop is false, events for which callbacks are set on the member
- * object, @p obj, will not be passed on to the parent smart object.
- *
- * The default value is true.
- */
 EAPI void
 evas_object_propagate_events_set(Evas_Object *obj, Eina_Bool prop)
 {
@@ -1649,11 +1407,6 @@ evas_object_propagate_events_set(Evas_Object *obj, Eina_Bool prop)
    obj->no_propagate = !prop;
 }
 
-/**
- * Determine whether an object is set to propagate events.
- * @param obj
- * @return propagate events state
- */
 EAPI Eina_Bool
 evas_object_propagate_events_get(const Evas_Object *obj)
 {
@@ -1663,31 +1416,6 @@ evas_object_propagate_events_get(const Evas_Object *obj)
    return !(obj->no_propagate);
 }
 
-/**
- * @}
- */
-
-/**
- * Set pointer behavior.
- *
- * @param obj
- * @param setting desired behavior.
- *
- * This function has direct effect on event callbacks related to
- * mouse.
- *
- * If @p setting is EVAS_OBJECT_POINTER_MODE_AUTOGRAB, then when mouse
- * is down at this object, events will be restricted to it as source,
- * mouse moves, for example, will be emitted even if outside this
- * object area.
- *
- * If @p setting is EVAS_OBJECT_POINTER_MODE_NOGRAB, then events will
- * be emitted just when inside this object area.
- *
- * The default value is EVAS_OBJECT_POINTER_MODE_AUTOGRAB.
- *
- * @ingroup Evas_Object_Group_Extras
- */
 EAPI void
 evas_object_pointer_mode_set(Evas_Object *obj, Evas_Object_Pointer_Mode setting)
 {
@@ -1697,12 +1425,6 @@ evas_object_pointer_mode_set(Evas_Object *obj, Evas_Object_Pointer_Mode setting)
    obj->pointer_mode = setting;
 }
 
-/**
- * Determine how pointer will behave.
- * @param obj
- * @return pointer behavior.
- * @ingroup Evas_Object_Group_Extras
- */
 EAPI Evas_Object_Pointer_Mode
 evas_object_pointer_mode_get(const Evas_Object *obj)
 {
diff --git a/src/lib/canvas/evas_filter.c b/src/lib/canvas/evas_filter.c
new file mode 100644 (file)
index 0000000..6194ec2
--- /dev/null
@@ -0,0 +1,1427 @@
+/*
+ * Filter implementation for evas
+ */
+
+#if 0 // filtering disabled
+typedef enum
+{
+   /** Apply any filter effects to this object (Default) */
+   EVAS_FILTER_MODE_OBJECT,
+   /** Filter all objects beneath this object on the canvas */
+   EVAS_FILTER_MODE_BELOW,
+} Evas_Filter_Mode;
+typedef enum
+{
+   /** No filter: Default */
+   EVAS_FILTER_NONE,
+   /** A blur filter.  Params are quality (float), and radius (int). */
+   EVAS_FILTER_BLUR,
+   /** Negates the colors of an image.  Also called solarize */
+   EVAS_FILTER_INVERT,
+   EVAS_FILTER_SOLARIZE = EVAS_FILTER_INVERT,
+   /** Makes a sepia version of the image. */
+   EVAS_FILTER_SEPIA,
+   /** Makes a greyscale version of the image.  Params are 'red',
+    * 'green', 'blue' (all floats) which must add to 1.  The defaults are
+    * 0.3, 0.59 and 0.11 which approximates human vision. Setting 'all'
+    * sets rgb to the same value. */
+   EVAS_FILTER_GREYSCALE,
+   EVAS_FILTER_GRAYSCALE = EVAS_FILTER_GREYSCALE,
+   /** Brighten (or darken) image.  Param 'adjust' float (-1.0 to 1.0)
+    * amount to adjust. */
+   EVAS_FILTER_BRIGHTNESS,
+   /** Enhance contrast on image.  Param 'adjust' float (-1.0 to 1.0)
+    * amount to adjust. */
+   EVAS_FILTER_CONTRAST,
+   
+   EVAS_FILTER_LAST = EVAS_FILTER_CONTRAST
+} Evas_Filter;
+
+/**
+ * Set the filter mode for an object.
+ *
+ * There are two valid filtering modes currently:
+ *  - EVAS_FILTER_MODE_OBJECT: which applies the filter to the object itself
+ *  - EVAS_FILTER_MODE_BELOW: which makes the object invisible and filters
+ *  what is below the object.
+ *
+ * The default filter mode is EVAS_FILTER_MODE_OBJECT.
+ *
+ * @param o Object to set filter mode on.
+ * @param mode Mode to set.
+ * @return EINA_TRUE on success, EINA_FALSE otherwise.
+ */
+   EAPI Eina_Bool                            evas_object_filter_mode_set      (Evas_Object *o, Evas_Filter_Mode mode);
+
+/**
+ * Get the current filtering mode for an object.
+ *
+ * By default all objects are in object filtering mode, even if no filter is
+ * set.
+ *
+ * @param o Object to get filter mode of.
+ * @return Filter mode (default EVAS_FILTER_MODE_OBJECT)
+ */
+   EAPI Evas_Filter_Mode                     evas_object_filter_mode_get      (Evas_Object *o);
+
+/**
+ * Set the current filter type.
+ *
+ * This sets the filter type, whether a blur, color filter or some other type
+ * of filter.  This is normally the only filter call necessary, although some
+ * filters require additional parameters.
+ *
+ * If the object has a filter already, and existing parameters will be
+ * cleared.
+ *
+ * Setting the blur to EVAS_FILTER_NONE removes any filter.
+ *
+ * @param o Object to set the filter on.
+ * @param filter Filter to set.
+ * @return EINA_TRUE On success
+ */
+   EAPI Eina_Bool                            evas_object_filter_set           (Evas_Object *o, Evas_Filter filter);
+
+/**
+ * Get the current filter.
+ *
+ * @param o Object to get filter of.
+ * @return The filter if set, or EVAS_FILTER_NONE.
+ */
+   EAPI Evas_Filter                          evas_object_filter_get           (Evas_Object *o);
+
+/**
+ * Set an integer parameter of a filter.
+ *
+ * This sets an integer parameter of a filter, if such parameter is known to
+ * the filter.  Note that some parameters may actually set multiple fields.
+ * The individual filters define the specific parameters available.
+ *
+ * It should be noted that filter parameters are lost after the filter type
+ * changes, so set the filter type, then the parameters.
+ *
+ * @param o Object to set parameter on.
+ * @param param Name of parameter to set.
+ * @param val Value to set.
+ * @return EINA_TRUE if at least one parameter was set, EINA_FALSE
+ * otherwise.
+ */
+   EAPI Eina_Bool                            evas_object_filter_param_int_set (Evas_Object *o, const char *param, int val);
+
+/**
+ * Get an integer value parameter from a filter.
+ *
+ * Gets the first matching parameter for a filter.  Note there is no way to
+ * later fields if they do not have their own accessor name.
+ *
+ * Also note that there is no way to tell the difference between a -1 as a
+ * value, and the error code.  Ask your filter writer to use a different
+ * range.
+ *
+ * @param o The object.
+ * @Param param Name of the parameter to get.
+ * @return The value, or -1 on error.
+ */
+   EAPI int                                  evas_object_filter_param_int_get (Evas_Object *o, const char *param);
+
+/**
+ * Set a string parameter on a filter
+ * 
+ * Currently unimplemented as no filters use this yet
+ */
+   EAPI Eina_Bool                            evas_object_filter_param_str_set (Evas_Object *o, const char *param, const char *val);
+
+/**
+ * Get a string parameter from a filter
+ *
+ * Currently unimplemented as no filters use this yet
+ */
+   EAPI const char                          *evas_object_filter_param_str_get (Evas_Object *o, const char *param);
+
+/**
+ * Set an object parameter on a filter
+ * 
+ * Currently unimplemented as no filters use this yet
+ */
+   EAPI Eina_Bool                            evas_object_filter_param_obj_set (Evas_Object *o, const char *param, Evas_Object *val);
+
+/**
+ * get an object parameter from a filter
+ * 
+ * Currently unimplemented as no filters use this yet
+ */
+   EAPI Evas_Object                         *evas_object_filter_param_obj_get (Evas_Object *o, const char *param);
+
+/**
+ * Set a float parameter of a filter.
+ *
+ * This is the same as evas_object_filter_param_int_set(), but for floating
+ * point values.
+ *
+ * @param o Object to set value on.
+ * @param param Name of the parameter to set.
+ * @param EINA_TRUE if at least one parameter was set, EINA_FALSE otherwise.
+ */
+   EAPI Eina_Bool                            evas_object_filter_param_float_set(Evas_Object *o, const char *param, double val);
+
+/**
+ * Get a float parameter of a filter.
+ *
+ * This is the same as evas_object_filter_param_int_get(), but for floating
+ * point values.
+ *
+ * @param o Object to set value on.
+ * @param param Name of the parameter to set.
+ * @return The value, or -1 on error.
+ */
+   EAPI double                               evas_object_filter_param_float_get(Evas_Object *o, const char *param);
+
+#include <stddef.h>     // offsetof
+
+#include "evas_common.h"
+#include "evas_private.h"
+
+#include <assert.h>
+/* disable neon - even after fixes:
+ * Error: ARM register expected -- vdup.u32 q14,$0xff000000'
+ * not going to fix now
+#ifdef BUILD_NEON
+# define BUILD_NEON0 1
+#else
+# define BUILD_NEON0 0
+#endif
+*/
+
+#define BUILD_NEON0 0
+
+typedef struct Evas_Filter_Info_Blur
+{
+   double quality;
+   int radius;
+} Evas_Filter_Info_Blur;
+
+typedef struct Evas_Filter_Info_GreyScale
+{
+   double r,g,b;
+} Evas_Filter_Info_GreyScale;
+
+typedef struct Evas_Filter_Info_Brightness
+{
+   double adjust;
+} Evas_Filter_Info_Brightness;
+
+typedef struct Evas_Filter_Info_Contrast
+{
+   double adjust;
+} Evas_Filter_Info_Contrast;
+
+typedef int (*Filter_Size_FN)(Evas_Filter_Info *,int,int,int*,int*,Eina_Bool);
+typedef uint8_t *(*Key_FN)(const Evas_Filter_Info  *, uint32_t *);
+
+struct fieldinfo
+{
+   const char *field;
+   int type;
+   size_t offset;
+};
+
+struct filterinfo
+{
+   Evas_Software_Filter_Fn filter;
+   const size_t datasize;
+   Filter_Size_FN sizefn;
+   Key_FN keyfn;
+   Eina_Bool alwaysalpha;
+};
+
+enum
+{
+   TYPE_INT,
+   TYPE_FLOAT
+};
+
+static int blur_size_get(Evas_Filter_Info*, int, int, int *, int *, Eina_Bool);
+static uint8_t *gaussian_key_get(const Evas_Filter_Info *, uint32_t *);
+
+static Eina_Bool gaussian_filter(Evas_Filter_Info *, RGBA_Image*, RGBA_Image*);
+static Eina_Bool negation_filter(Evas_Filter_Info *, RGBA_Image*, RGBA_Image*);
+static Eina_Bool sepia_filter(Evas_Filter_Info *, RGBA_Image*, RGBA_Image*);
+static Eina_Bool greyscale_filter(Evas_Filter_Info*, RGBA_Image*, RGBA_Image*);
+static Eina_Bool brightness_filter(Evas_Filter_Info*, RGBA_Image*, RGBA_Image*);
+static Eina_Bool contrast_filter(Evas_Filter_Info *, RGBA_Image*, RGBA_Image*);
+
+struct filterinfo filterinfo[] =
+{
+   /* None */
+   { NULL, 0, NULL, NULL, EINA_FALSE},
+   /* Blur */
+   { gaussian_filter, sizeof(Evas_Filter_Info_Blur), blur_size_get, gaussian_key_get, EINA_TRUE },
+   /* Negation */
+   { negation_filter, 0, NULL, NULL, EINA_FALSE },
+   /* Sepia */
+   { sepia_filter, 0, NULL, NULL, EINA_FALSE },
+   /* Greyscale */
+   { greyscale_filter, sizeof(Evas_Filter_Info_GreyScale), NULL, NULL, EINA_FALSE },
+   /* Brightness */
+   { brightness_filter, sizeof(Evas_Filter_Info_Brightness), NULL, NULL, EINA_FALSE },
+   /* Contrast */
+   { contrast_filter, sizeof(Evas_Filter_Info_Contrast), NULL, NULL, EINA_FALSE},
+};
+
+
+static struct fieldinfo blurfields[] =
+{
+   { "quality",  TYPE_FLOAT, offsetof(Evas_Filter_Info_Blur, quality) },
+   { "radius",  TYPE_INT, offsetof(Evas_Filter_Info_Blur, radius) },
+   { NULL, 0, 0 },
+};
+
+static struct fieldinfo greyfields[] =
+{
+   { "red",  TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, r) },
+   { "green",  TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, g) },
+   { "blue",  TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, b) },
+
+   { "all",  TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, r) },
+   { "all",  TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, g) },
+   { "all",  TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, b) },
+   { NULL, 0, 0 },
+};
+
+static struct fieldinfo brightnessfields[] =
+{
+   { "adjust",  TYPE_FLOAT, offsetof(Evas_Filter_Info_Brightness, adjust) },
+   { NULL, 0, 0 },
+};
+
+static struct fieldinfo contrastfields[] =
+{
+   { "adjust",  TYPE_FLOAT, offsetof(Evas_Filter_Info_Contrast, adjust) },
+   { NULL, 0, 0 },
+};
+
+static struct fieldinfo *filterfields[] =
+{
+   NULL,
+   blurfields,
+   NULL,
+   NULL,
+   greyfields,
+   brightnessfields,
+   contrastfields,
+};
+
+static Evas_Filter_Info *filter_alloc(Evas_Object *o);
+
+EAPI Eina_Bool
+evas_object_filter_mode_set(Evas_Object *o, Evas_Filter_Mode mode)
+{
+   Evas_Filter_Info *info;
+
+   MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ);
+   return EINA_FALSE;
+   MAGIC_CHECK_END();
+
+   if ((mode != EVAS_FILTER_MODE_OBJECT) && (mode != EVAS_FILTER_MODE_BELOW))
+      return EINA_FALSE;
+
+   if (!o->filter)
+     {
+        filter_alloc(o);
+     }
+   if (!o->filter) return EINA_FALSE;
+   info = o->filter;
+
+   if (info->mode == mode) return EINA_TRUE; /* easy case */
+   info->mode = mode;
+   info->dirty = 1;
+   return EINA_TRUE;
+}
+
+EAPI Evas_Filter_Mode
+evas_object_filter_mode_get(Evas_Object *o)
+{
+   MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ);
+   return EVAS_FILTER_MODE_OBJECT;
+   MAGIC_CHECK_END();
+
+   if (!o->filter) return EVAS_FILTER_MODE_OBJECT;
+   return o->filter->mode;
+}
+
+EAPI Eina_Bool
+evas_object_filter_set(Evas_Object *o, Evas_Filter filter)
+{
+   Evas_Filter_Info *info;
+   struct filterinfo *finfo;
+
+   MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ);
+   return EINA_FALSE;
+   MAGIC_CHECK_END();
+
+   /* force filter to be signed: else gcc complains, but enums may always be
+    * signed */
+   if (((int)filter < (int)EVAS_FILTER_NONE) || (filter > EVAS_FILTER_LAST))
+      return EINA_FALSE;
+
+   /* Don't alloc on no-op */
+   if (!o-filter && filter == EVAS_FILTER_NONE) return EINA_TRUE;
+
+   if (!o->filter) filter_alloc(o);
+   if (!o->filter) return EINA_FALSE;
+
+   info = o->filter;
+
+   if (info->filter == filter) return EINA_TRUE;
+
+   finfo = filterinfo + filter;
+   info->filter = filter;
+   info->dirty = 1;
+   if (info->data)
+     {
+        if (info->data_free)
+           info->data_free(info->data);
+        else
+           free(info->data);
+     }
+   info->datalen = finfo->datasize;
+   if (finfo->datasize)
+     {
+        info->data = calloc(1, finfo->datasize);
+        if (!info->data)
+          {
+             o->filter = EVAS_FILTER_NONE;
+             return EINA_FALSE;
+          }
+     }
+   else
+      info->data = NULL;
+   info->data_free = NULL;
+
+   return EINA_TRUE;
+}
+
+EAPI Evas_Filter
+evas_object_filter_get(Evas_Object *o)
+{
+   MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ);
+   return EVAS_FILTER_NONE;
+   MAGIC_CHECK_END();
+
+   if (!o->filter) return EVAS_FILTER_NONE;
+   return o->filter->filter;
+}
+
+EAPI Eina_Bool
+evas_object_filter_param_int_set(Evas_Object *o, const char *param, int val)
+{
+   char *data;
+   const struct fieldinfo *fields;
+   Eina_Bool found;
+   int i;
+
+   MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ);
+   return EINA_FALSE;
+   MAGIC_CHECK_END();
+
+   if ((!o->filter) || (!o->filter->data)) return EINA_FALSE;
+
+   fields = filterfields[o->filter->filter];
+   data = o->filter->data;
+   found = EINA_FALSE;
+   for (i = 0; fields[i].field; i++)
+     {
+        if (!strcmp(fields[i].field, param))
+          {
+             if (fields[i].type != TYPE_INT) continue;
+             *(int *)(data + fields[i].offset) = val;
+             o->filter->dirty = 1;
+             evas_object_change(o);
+             found = EINA_TRUE;
+          }
+     }
+   return found;
+}
+
+EAPI int
+evas_object_filter_param_int_get(Evas_Object *o, const char *param)
+{
+   char *data;
+   const struct fieldinfo *fields;
+   int val;
+   int i;
+
+   MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ);
+   return -1;
+   MAGIC_CHECK_END();
+
+   if ((!o->filter) || (!o->filter->data)) return -1;
+
+   fields = filterfields[o->filter->filter];
+   if (!fields) return -1;
+   data = o->filter->data;
+
+   for (i = 0; fields[i].field; i++)
+     {
+        if (!strcmp(fields[i].field, param))
+          {
+             if (fields[i].type != TYPE_INT) continue;
+             val = *(int *)(data + fields[i].offset);
+             return val;
+          }
+     }
+   return -1;
+}
+
+EAPI Eina_Bool
+evas_object_filter_param_str_set(Evas_Object *o __UNUSED__,
+                                 const char *param __UNUSED__,
+                                 const char *val __UNUSED__)
+{
+   return EINA_FALSE;
+}
+
+EAPI const char *
+evas_object_filter_param_str_get(Evas_Object *o __UNUSED__,
+                                 const char *param __UNUSED__)
+{
+   return NULL;
+}
+
+EAPI Eina_Bool
+evas_object_filter_param_obj_set(Evas_Object *o __UNUSED__,
+                                 const char *param __UNUSED__,
+                                 Evas_Object *val __UNUSED__)
+{
+   return EINA_FALSE;
+}
+
+EAPI Evas_Object *
+evas_object_filter_param_obj_get(Evas_Object *o __UNUSED__,
+                                 const char *param __UNUSED__)
+{
+   return NULL;
+}
+
+EAPI Eina_Bool
+evas_object_filter_param_float_set(Evas_Object *o, const char *param,
+                                   double val)
+{
+   char *data;
+   const struct fieldinfo *fields;
+   int i;
+   Eina_Bool rv;
+
+   MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ);
+   return EINA_FALSE;
+   MAGIC_CHECK_END();
+
+   if ((!o->filter) || (!o->filter->data)) return EINA_FALSE;
+
+   rv = EINA_FALSE;
+   fields = filterfields[o->filter->filter];
+   if (!fields) return EINA_FALSE;
+
+   data = o->filter->data;
+
+   for (i = 0; fields[i].field; i++)
+     {
+        if (!strcmp(fields[i].field, param))
+          {
+             if (fields[i].type != TYPE_FLOAT) continue;
+             *(double *)(data + fields[i].offset) = val;
+             o->filter->dirty = 1;
+             o->changed = 1;
+             evas_object_change(o);
+             rv = EINA_TRUE;
+          }
+     }
+   return rv;
+}
+
+EAPI double
+evas_object_filter_param_float_get(Evas_Object *o, const char *param)
+{
+   char *data;
+   const struct fieldinfo *fields;
+   double val;
+   int i;
+
+   MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ);
+   return -1;
+   MAGIC_CHECK_END();
+
+   if ((!o->filter) || (!o->filter->data)) return -1;
+
+   fields = filterfields[o->filter->filter];
+   if (!fields) return -1;
+   data = o->filter->data;
+
+   for (i = 0; fields[i].field; i++)
+     {
+        if (!strcmp(fields[i].field, param))
+          {
+             if (fields[i].type != TYPE_FLOAT) continue;
+             val = *(double *)(data + fields[i].offset);
+             return val;
+          }
+     }
+   return -1;
+}
+
+
+
+
+
+/*
+ * Internal call
+ */
+int
+evas_filter_get_size(Evas_Filter_Info *info, int inw, int inh,
+                     int *outw, int *outh, Eina_Bool inv)
+{
+   if (!info) return -1;
+   if ((!outw) && (!outh)) return 0;
+
+   if (filterinfo[info->filter].sizefn)
+      return filterinfo[info->filter].sizefn(info, inw, inh, outw, outh, inv);
+
+   if (outw) *outw = inw;
+   if (outh) *outh = inh;
+   return 0;
+}
+
+Eina_Bool
+evas_filter_always_alpha(Evas_Filter_Info *info)
+{
+   if (!info) return EINA_FALSE;
+   return filterinfo[info->filter].alwaysalpha;
+}
+
+/*
+ * Another internal call:
+ *    Given a filterinfo, generate a unique key for it
+ *
+ * For simple filters, it's just the filter type.
+ * for more complex filters, it's the type, with it's params.
+ *
+ * Note management of the key data is up to the caller, that is it should
+ * probably be freed after use.
+ *
+ * Note the automatic fallback generation places the single byte at the end so
+ * the memcpy will be aligned.  Micro-optimisations FTW!
+ *
+ * @param info Filter info to generate from
+ * @param len Length of the buffer returned.
+ * @return key Key buffer
+ */
+uint8_t *
+evas_filter_key_get(const Evas_Filter_Info *info, uint32_t *lenp)
+{
+   struct filterinfo *finfo;
+   uint8_t *key;
+   int len;
+
+   if (!info) return NULL;
+
+   finfo = filterinfo + info->filter;
+   if (finfo->keyfn) return finfo->keyfn(info, lenp);
+
+   len = 1 + finfo->datasize;
+   key = malloc(len);
+   if (!key) return NULL;
+   if (finfo->datasize) memcpy(key, info->data, finfo->datasize);
+   key[finfo->datasize] = info->filter;
+   if (lenp) *lenp = len;
+   return key;
+}
+
+Evas_Software_Filter_Fn
+evas_filter_software_get(Evas_Filter_Info *info)
+{
+   return filterinfo[info->filter].filter;
+}
+
+void
+evas_filter_free(Evas_Object *o)
+{
+   if (!o->filter) return;
+   if (o->filter->key) free(o->filter->key);
+   free(o->filter);
+   o->filter = NULL;
+}
+
+
+
+
+/*
+ * Private calls
+ */
+static Evas_Filter_Info *
+filter_alloc(Evas_Object *o)
+{
+   Evas_Filter_Info *info;
+
+   if (!o) return NULL;
+   info = calloc(1,sizeof(struct Evas_Filter_Info));
+   if (!info) return NULL;
+   info->dirty = 1;
+   info->filter = EVAS_FILTER_NONE;
+   info->mode = EVAS_FILTER_MODE_OBJECT;
+   info->datalen = 0;
+
+   o->filter = info;
+
+   return info;
+}
+
+static int
+blur_size_get(Evas_Filter_Info *info, int inw, int inh, int *outw, int *outh,
+              Eina_Bool inv)
+{
+   Evas_Filter_Info_Blur *blur = info->data;
+
+   if (inv)
+     {
+        if (outw) *outw = MAX(inw - (blur->radius * 2), 0);
+        if (outh) *outh = MAX(inh - (blur->radius * 2), 0);
+     }
+   else
+     {
+        if (outw) *outw = inw + (blur->radius * 2);
+        if (outh) *outh = inh + (blur->radius * 2);
+     }
+   return 0;
+}
+
+/*
+ * Generate a key for the Gaussian generator.
+ *
+ * The size is:
+ *    - 1 byte for the type (blur)
+ *    - 1 byte for the quality (0-1 -> 0-255)
+ *    - 2 bytes for radius (max is 508 anyway)
+ *
+ * @param info Filter info
+ * @param len Length of the returned buffer
+ * @return new buffer
+ */
+static uint8_t *
+gaussian_key_get(const Evas_Filter_Info *info, uint32_t *lenp)
+{
+   struct Evas_Filter_Info_Blur *blur;
+   uint8_t *key;
+
+   if ((!info) || (!info->data)) return NULL;
+   blur = info->data;
+
+   if (lenp) *lenp = 4;
+   key = malloc(4);
+   if (!key) return NULL;
+   key[0] = EVAS_FILTER_BLUR;
+   key[1] = blur->quality * 255;
+   key[2] = blur->radius >> 8;
+   key[3] = blur->radius;
+
+   return key;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/**
+ * Software implementations
+ */
+#define all(OP, A, R, G, B, W, I) \
+   do { \
+      A OP A_VAL(I) * W; \
+      R OP R_VAL(I) * W; \
+      G OP G_VAL(I) * W; \
+      B OP B_VAL(I) * W; \
+   } while (0)
+#define wavg(x,n)        (((x) / (n)) & 0xff)
+#define wavgd(x,n)       ((uint32_t)((x) / (n)) & 0xff)
+
+typedef int (*FilterH)(int, uint32_t *, int, uint32_t *);
+typedef int (*FilterV)(int, uint32_t *, int, int, uint32_t *);
+
+static int gaussian_filter_h(int rad, uint32_t *in, int w, uint32_t *out);
+static int gaussian_filter_h64(int rad, uint32_t *in, int w, uint32_t *out);
+static int gaussian_filter_hd(int rad, uint32_t *in, int w, uint32_t *out);
+static int gaussian_filter_v(int rad, uint32_t *in, int h, int skip, uint32_t *out);
+static int gaussian_filter_v64(int rad, uint32_t *in, int h, int skip, uint32_t *out);
+static int gaussian_filter_vd(int rad, uint32_t *in, int h, int skip, uint32_t *out);
+static const uint32_t *gaussian_row_get(int row, int *npoints, uint32_t *weight);
+static const uint64_t *gaussian_row_get64(int row, int *npoints, uint64_t *weight);
+static const double *gaussian_row_getd(int row, int *npoints, double *weight);
+
+static Eina_Bool
+gaussian_filter(Evas_Filter_Info *filter, RGBA_Image *src, RGBA_Image *dst)
+{
+   int i;
+   uint32_t nw, nh;
+   uint32_t *in, *tmp, *out;
+   FilterV filter_v = gaussian_filter_v;
+   FilterH filter_h = gaussian_filter_h;
+   Evas_Filter_Info_Blur *blur;
+   int w, h;
+
+   blur = filter->data;
+
+   /* Use 64 bit version if we are going to overflow */
+   if (blur->radius > 508) /** too big for doubles: Bail out */
+      return EINA_FALSE;
+   else if (blur->radius > 28)
+     {
+        filter_v = gaussian_filter_vd;
+        filter_h = gaussian_filter_hd;
+     } 
+   else if (blur->radius > 12)
+     {
+        filter_v = gaussian_filter_v64;
+        filter_h = gaussian_filter_h64;
+     }
+   
+   w = src->cache_entry.w;
+   h = src->cache_entry.h;
+   in = src->image.data;
+   
+   if (!in) return EINA_FALSE;
+   
+   nw = w + (2 * blur->radius);
+   nh = h + (2 * blur->radius);
+   
+   out = dst->image.data;
+   if (!out) return EINA_FALSE;
+   tmp = malloc(nw * h * sizeof(uint32_t));
+   
+   for (i = 0; i < h; i++)
+      filter_h(blur->radius,in + (i * w), w, tmp + (i * nw));
+   
+   for (i = 0; i < (int)nw; i++)
+      filter_v(blur->radius,tmp + i, h, nw, out + i);
+
+   free(tmp);
+   return EINA_TRUE;
+}
+
+/* Blur only horizontally */
+static int
+gaussian_filter_h(int rad, uint32_t *in, int w, uint32_t *out)
+{
+   const uint32_t *points;
+   int npoints = 0;
+   uint32_t weight = 0;
+   int i = 0, k = 0;
+   uint32_t r, g, b, a;
+   
+   /* Get twice the radius: even rows have 1 element */
+   points = gaussian_row_get(rad * 2, &npoints, &weight);
+   for (i = -rad; i < (w + rad); i++)
+     {
+        r = g = b = a = 0;
+        for (k = -rad; k <= rad; k++)
+          {
+             if ((k + i) < 0) continue;
+             if ((k + i) >= w) continue;
+             all(+=, a, r, g, b, points[k + rad], in + k + i);
+          }
+        *(out) = ARGB_JOIN(wavg(a, weight),
+                           wavg(r, weight),
+                           wavg(g, weight),
+                           wavg(b, weight));
+        out++;
+     }
+   return 0;
+}
+
+/* Blur only horizontally */
+static int
+gaussian_filter_hd(int rad, uint32_t *in, int w, uint32_t *out)
+{
+   const double *points;
+   int npoints = 0;
+   double weight = 0.0;
+   int i = 0, k = 0;
+   double r, g, b, a;
+
+   /* Get twice the radius: even rows have 1 element */
+   points = gaussian_row_getd(rad * 2, &npoints, &weight);
+   for (i = -rad; i < (w + rad); i++)
+     {
+        r = g = b = a = 0;
+        for (k = -rad; k <= rad; k++)
+          {
+             if ((k + i) < 0) continue;
+             if ((k + i) >= w) continue;
+             all(+=, a, r, g, b, points[k + rad], in + k + i);
+          }
+        *(out) = ARGB_JOIN(wavgd(a, weight),
+                           wavgd(r, weight),
+                           wavgd(g, weight),
+                           wavgd(b, weight));
+        out++;
+   }
+   return 0;
+}
+
+
+/* Blur only horizontally */
+static int
+gaussian_filter_h64(int rad, uint32_t *in, int w, uint32_t *out)
+{
+   const uint64_t *points;
+   int npoints = 0;
+   uint64_t weight = 0;
+   int i = 0, k = 0;
+   uint64_t r, g, b, a;
+
+   /* Get twice the radius: even rows have 1 element */
+   points = gaussian_row_get64(rad * 2, &npoints, &weight);
+   for (i = -rad ; i < w + rad; i ++){
+      r = g = b = a = 0;
+      for (k = -rad ; k <= rad ; k ++){
+         if ((k + i) < 0) continue;
+         if ((k + i) >= w) continue;
+         all(+=, a, r, g, b, points[k + rad], in + k + i);
+      }
+      *(out) = ARGB_JOIN(wavg(a, weight),
+                         wavg(r, weight),
+                         wavg(g, weight),
+                         wavg(b, weight));
+      out++;
+   }
+   return 0;
+}
+
+static int
+gaussian_filter_v(int rad, uint32_t *in, int h, int skip, uint32_t *out)
+{
+   const uint32_t *points;
+   int npoints = 0;
+   uint32_t weight = 0;
+   int i = 0, k = 0;
+   uint32_t r, g, b, a;
+
+   /* Get twice the radius: even rows have 1 element */
+   points = gaussian_row_get(rad * 2, &npoints, &weight);
+   weight = 0;
+   for (i = 0; i < npoints; i++) weight += points[i];
+
+   for (i = -rad; i < (h + rad); i++)
+     {
+        r = g = b = a = 0;
+        for (k = -rad; k <= rad; k++)
+          {
+             if ((k + i) < 0) continue;
+             if ((k + i) >= h) continue;
+             all(+=, a, r, g, b, points[k + rad], in + (skip * (k + i)));
+          }
+        *(out) = ARGB_JOIN(wavg(a, weight),
+                           wavg(r, weight),
+                           wavg(g, weight),
+                           wavg(b, weight));
+        out += skip;
+     }
+   return 0;
+}
+
+static int
+gaussian_filter_v64(int rad, uint32_t *in, int h, int skip, uint32_t *out)
+{
+   const uint64_t *points;
+   int npoints = 0;
+   uint64_t weight;
+   int i = 0, k = 0;
+   uint64_t r, g, b, a;
+
+   /* Get twice the radius: even rows have 1 element */
+   points = gaussian_row_get64(rad * 2, &npoints, &weight);
+   weight = 0;
+   for (i = 0; i < npoints; i++) weight += points[i];
+
+   for (i = -rad; i < (h + rad); i++)
+     {
+        r = g = b = a = 0;
+        for (k = -rad ; k <= rad ; k++)
+          {
+             if ((k + i) < 0) continue;
+             if ((k + i) >= h) continue;
+             all(+=, a, r, g, b, points[k + rad], in + (skip * (k + i)));
+          }
+        *(out) = ARGB_JOIN(wavg(a, weight),
+                           wavg(r, weight),
+                           wavg(g, weight),
+                           wavg(b, weight));
+        out += skip;
+     }
+   return 0;
+}
+
+static int
+gaussian_filter_vd(int rad, uint32_t *in, int h, int skip, uint32_t *out)
+{
+   const double *points;
+   int npoints = 0;
+   double weight = 0.0;
+   int i = 0, k = 0;
+   double r, g, b, a;
+
+   /* Get twice the radius: even rows have 1 element */
+   points = gaussian_row_getd(rad * 2, &npoints, &weight);
+   weight = 0;
+   for (i = 0 ; i < npoints ; i ++) weight += points[i];
+
+   for (i = -rad ; i < h + rad; i ++)
+     {
+        r = g = b = a = 0;
+        for (k = -rad ; k <= rad ; k ++)
+          {
+             if ((k + i) < 0) continue;
+             if ((k + i) >= h) continue;
+             all(+=, a, r, g, b, points[k + rad], in + (skip * (k + i)));
+          }
+        *(out) = ARGB_JOIN(wavgd(a, weight),
+                           wavgd(r, weight),
+                           wavgd(g, weight),
+                           wavgd(b, weight));
+        out += skip;
+     }
+   return 0;
+}
+
+static const uint32_t *
+gaussian_row_get(int row, int *npoints, uint32_t *weight)
+{
+   static uint32_t *points = NULL;
+   static int last = -1;
+   static uint32_t lastweight = -1;
+   int c, k;
+
+   if (row < 0) return NULL;
+
+   if (npoints) *npoints = row + 1;
+
+   if (last == row)
+     {
+        if (weight) *weight = lastweight;
+        return points;
+     }
+   if (points) free(points);
+
+   points = malloc((row + 1) * sizeof(uint32_t));
+   if (!points)
+     {
+        last = -1;
+        return NULL;
+     }
+   last = row;
+
+   c = 1;
+   for (k = 0; k <= row; k++)
+     {
+        points[k] = c;
+        c = c * (row - k) / (k + 1);
+     }
+
+   for (k = 0, lastweight = 0; k <= row; k++) lastweight += points[k];
+   if (weight) *weight = lastweight;
+   return points;
+}
+
+static const uint64_t *
+gaussian_row_get64(int row, int *npoints, uint64_t *weight)
+{
+   static uint64_t *points = NULL;
+   static int last = -1;
+   static uint64_t lastweight = -1;
+   uint64_t c;
+   int k;
+
+   if (row < 0) return NULL;
+
+   if (npoints) *npoints = row + 1;
+   if (last == row)
+     {
+        if (weight) *weight = lastweight;
+        return points;
+     }
+   if (points) free(points);
+   
+   points = malloc((row + 1) * sizeof(uint64_t));
+   if (!points)
+     {
+        last = -1;
+        return NULL;
+     }
+   last = row;
+   
+   c = 1;
+   for (k = 0; k <= row; k++)
+     {
+        points[k] = c;
+        c = c * (row - k) / (k + 1);
+     }
+   
+   for (k = 0, lastweight = 0; k <= row; k ++) lastweight += points[k];
+   if (weight) *weight = lastweight;
+   
+   return points;
+}
+
+static const double *
+gaussian_row_getd(int row, int *npoints, double *weight)
+{
+   static double *points = NULL;
+   static int last = -1;
+   static double lastweight = -1;
+   double c;
+   int k;
+   
+   if (row < 0) return NULL;
+   
+   if (last == row)
+     {
+        if (weight) *weight = lastweight;
+        return points;
+     }
+   
+   if (points) free(points);
+   points = malloc((row + 1) * sizeof(double));
+   if (!points)
+     {
+        last = -1;
+        return NULL;
+     }
+   last = row;
+   
+   if (npoints) *npoints = row + 1;
+   
+   c = 1;
+   for (k = 0; k <= row; k++)
+     {
+        points[k] = c;
+        c = c * (row - k) / (k + 1);
+     }
+   
+   for (k = 0, lastweight = 0; k <= row; k++) lastweight += points[k];
+   if (weight) *weight = lastweight;
+   
+   return points;
+}
+
+#if BUILD_NEON0
+static Eina_Bool
+negation_filter_neon(Evas_Filter_Info *info, RGBA_Image *src, RGBA_Image *dst)
+{
+   uint32_t tmp;
+
+   if (src->cache_entry.flags.alpha)
+     {
+        // FIXME: not implemented
+     }
+   else
+     {
+        /* No alpha */
+#define AP  "NEG_FILTER_NA"
+        asm volatile (
+
+           ".fpu neon                                       \n\t"
+           "vdup.u32    q14,   $0xff000000                   \n\t"
+           "vmvn.u32    q15,   q1                            \n\t"
+
+           // fixme: do check for small loops
+           AP"loopinit:                                     \n\t"
+               "sub     %[tmp], %[e], #31                   \n\t"
+
+           AP"loop:                                         \n\t"
+               "vldm    %[s]!,    {d0,d1,d2,d3}             \n\t"
+               "vand    q2,   q0, q15                       \n\t"
+               "vand    q3,   q1, q15                       \n\t"
+               "vand    q4,   q0, q14                       \n\t"
+               "vand    q5,   q1, q14                       \n\t"
+                        // fixme: can i do this with xor
+               "cmp     %[tmp], %[s]                        \n\t"
+
+               "vmvn    q6,   q2                            \n\t"
+               "vmvn    q7,   q3                            \n\t"
+
+               "vorr     q0,   q6,q4                         \n\t"
+               "vorr     q1,   q7,q5                         \n\t"
+
+               "vstm    %[d]!,  {d0,d1,d2,d3}               \n\t"
+
+               "bhi     "AP"loop                            \n\t"
+
+            : // no out
+            : // input
+               [e] "r" (src->image.data+ src->cache_entry.w*src->cache_entry.h),
+               [s] "r" (src->image.data),
+               [tmp] "r" (tmp),
+               [d] "r" (dst->image.data)
+            : "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q14", "q15",
+                  "memory"
+         );
+#undef AP
+     }
+   return EINA_TRUE;
+}
+#endif
+
+static Eina_Bool
+negation_filter(Evas_Filter_Info *info, RGBA_Image *src, RGBA_Image *dst)
+{
+   uint32_t *in, *out;
+   int i,j;
+   int w,h;
+   uint32_t a;
+   uint8_t r,g,b;
+
+#if BUILD_NEON0
+   if (evas_common_cpu_has_feature(CPU_FEATURE_NEON) &&
+      (!src->cache_entry.flags.alpha))
+      return negation_filter_neon(info, src, dst);
+#endif
+   
+   in = src->image.data;
+   out = dst->image.data;
+   w = src->cache_entry.w;
+   h = src->cache_entry.h;
+
+   if (src->cache_entry.flags.alpha)
+     {
+        for (i = 0; i < h; i++)
+          {
+             for (j = 0; j < w; j++)
+               {
+                  a = A_VAL(in);
+                  r = R_VAL(in);
+                  g = G_VAL(in);
+                  b = B_VAL(in);
+                  *out = ARGB_JOIN(a, a - r, a - g, a - b);
+                  out++;
+                  in++;
+               }
+          }
+     }
+   else
+     {
+        for (i = 0; i < h; i++)
+          {
+             for (j = 0; j < w; j++)
+               {
+                  a = A_VAL(in);
+                  r = R_VAL(in);
+                  g = G_VAL(in);
+                  b = B_VAL(in);
+                  *out = ARGB_JOIN(a, ~r, ~g, ~b);
+                  out++;
+                  in++;
+               }
+          }
+     }
+   return EINA_TRUE;
+   info = NULL;
+}
+
+static Eina_Bool
+sepia_filter(Evas_Filter_Info *info __UNUSED__, RGBA_Image *src, RGBA_Image *dst)
+{
+   uint32_t *in, *out;
+   int i, j;
+   int w, h;
+   uint32_t a, r, g, b, nr, ng, nb;
+
+   in = src->image.data;
+   out = dst->image.data;
+   w = src->cache_entry.w;
+   h = src->cache_entry.h;
+
+   for (i = 0; i < h; i++)
+     {
+        for (j = 0; j < w; j++)
+          {
+             a = A_VAL(in);
+             r = R_VAL(in);
+             g = G_VAL(in);
+             b = B_VAL(in);
+             nr = ((uint32_t)((r * 0.393) + (g * 0.769) + (b * 0.189)));
+             ng = ((uint32_t)((r * 0.349) + (g * 0.686) + (b * 0.168)));
+             nb = ((uint32_t)((r * 0.272) + (g * 0.534) + (b * 0.131)));
+             if (nr > 255) nr = 255;
+             if (ng > 255) ng = 255;
+             if (nb > 255) nb = 255;
+             *out = ARGB_JOIN(a, nr, ng, nb);
+             out++;
+             in++;
+          }
+     }
+
+   return EINA_TRUE;
+
+}
+
+static Eina_Bool
+greyscale_filter(Evas_Filter_Info *info __UNUSED__, RGBA_Image *src, RGBA_Image *dst)
+{
+   uint32_t *in, *out;
+   int i, j;
+   int w, h;
+   uint32_t cur;
+   uint32_t a, r, g, b;
+
+   in = src->image.data;
+   out = dst->image.data;
+   w = src->cache_entry.w;
+   h = src->cache_entry.h;
+
+   if (src->cache_entry.flags.alpha)
+     {
+        for (i = 0; i < h; i++)
+          {
+             for (j = 0; j < w; j++)
+               {
+                  a = A_VAL(in);
+                  r = R_VAL(in);
+                  g = G_VAL(in);
+                  b = B_VAL(in);
+                  cur = (r * 0.3) + (g * 0.59) + (b * 0.11);
+                  *out = ARGB_JOIN(a, r, g, b);
+                  out++;
+                  in++;
+               }
+          }
+     }
+   else
+     {
+        for (i = 0 ; i < h ; i ++)
+          {
+             for (j = 0; j < w ; j ++)
+               {
+                  r = R_VAL(in);
+                  g = G_VAL(in);
+                  b = B_VAL(in);
+                  cur = r * 0.3 + g * 0.59 + b * 0.11;
+                  *out = ARGB_JOIN(255, r, g, b);
+                  out++;
+                  in++;
+               }
+          }
+     }
+   return EINA_TRUE;
+}
+
+static Eina_Bool
+brightness_filter(Evas_Filter_Info *info, RGBA_Image *src, RGBA_Image *dst)
+{
+   uint32_t *in, *out;
+   int i, j;
+   int w, h;
+   int a,r,g,b;
+   int delta;
+   int adjdelta;
+   Evas_Filter_Info_Brightness *bness;
+
+   in = src->image.data;
+   out = dst->image.data;
+   w = src->cache_entry.w;
+   h = src->cache_entry.h;
+   bness = info->data;
+
+   delta = bness->adjust * 255;
+   if (delta > 255)
+      delta = 255;
+   else if (delta < -255)
+      delta = -255;
+
+   /* Note we could optimise the -255, 0 and 255 cases, but why would people
+    * be doing that */
+   if (delta >= 0)
+     {
+       for (i = 0; i < h; i++)
+         {
+            for (j = 0; j < w; j++)
+              {
+                 a = A_VAL(in);
+                 r = R_VAL(in);
+                 g = G_VAL(in);
+                 b = B_VAL(in);
+                 adjdelta = (a * delta) >> 8;
+                 r = MIN(r + adjdelta, a);
+                 g = MIN(g + adjdelta, a);
+                 b = MIN(b + adjdelta, a);
+                 *out = ARGB_JOIN(a, r ,g, b);
+                 out++;
+                 in++;
+              }
+         }
+     }
+   else
+     {
+        /* Delta negative */
+        for (i = 0; i < h; i++)
+          {
+             for (j = 0; j < w; j++)
+               {
+                  a = A_VAL(in);
+                  r = R_VAL(in);
+                  g = G_VAL(in);
+                  b = B_VAL(in);
+                  adjdelta = (a * delta) >> 8;
+                  r = MAX(r + adjdelta, 0);
+                  g = MAX(g + adjdelta, 0);
+                  b = MAX(b + adjdelta, 0);
+                  *out = ARGB_JOIN(a, r ,g, b);
+                  out++;
+                  in++;
+               }
+          }
+     }
+
+   return EINA_TRUE;
+
+}
+
+static Eina_Bool
+contrast_filter(Evas_Filter_Info *info __UNUSED__, RGBA_Image *src, RGBA_Image *dst)
+{
+   uint32_t *in, *out;
+   int i, j;
+   int w, h;
+
+   in = src->image.data;
+   out = dst->image.data;
+   w = src->cache_entry.w;
+   h = src->cache_entry.h;
+
+   for (i = 0; i < h; i++)
+     {
+        for (j = 0; j < w; j++)
+          {
+             // FIXME: not even implemented
+             out++;
+             in++;
+          }
+     }
+
+   return EINA_TRUE;
+
+}
+#endif
+
+/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
index 5ace30d..a1a3bca 100644 (file)
@@ -7,27 +7,6 @@
 
 /* public calls */
 
-/**
- * @addtogroup Evas_Object_Group_Basic
- * @{
- */
-/**
- * Sets focus to the given object.
- *
- * @param obj The object to be focused or unfocused.
- * @param focus set or remove focus to the object.
- *
- * Changing focus only affects where key events go.  There can be only
- * one object focused at any time.  <p> If the parameter (@p focus) is
- * set, the passed object will be set as the currently focused object.
- * It will receive all keyboard events that are not exclusive key
- * grabs on other objects.
- *
- * @see evas_object_focus_get
- * @see evas_focus_get
- * @see evas_object_key_grab
- * @see evas_object_key_ungrab
- */
 EAPI void
 evas_object_focus_set(Evas_Object *obj, Eina_Bool focus)
 {
@@ -61,21 +40,6 @@ evas_object_focus_set(Evas_Object *obj, Eina_Bool focus)
    _evas_post_event_callback_call(obj->layer->evas);
 }
 
-/**
- * Test if the object has focus.
- *
- * @param obj The object to be tested.
- *
- * If the passed object is the currently focused object 1 is returned,
- * 0 otherwise.
- *
- * @see evas_object_focus_set
- * @see evas_focus_get
- * @see evas_object_key_grab
- * @see evas_object_key_ungrab
- *
- * @return 1 if the object has the focus, 0 otherwise.
- */
 EAPI Eina_Bool
 evas_object_focus_get(const Evas_Object *obj)
 {
@@ -85,26 +49,6 @@ evas_object_focus_get(const Evas_Object *obj)
    return obj->focused;
 }
 
-/**
- * @}
- */
-
-/**
- * Retrieve the object that currently has focus.
- *
- * @param e The @c Evas canvas to query focus on.
- *
- * Returns the object that currently has focus, NULL otherwise.
- *
- * @see evas_object_focus_set
- * @see evas_object_focus_get
- * @see evas_object_key_grab
- * @see evas_object_key_ungrab
- *
- * @return The object that has focus or NULL is there is not one.
- *
- * @ingroup Evas_Object_Group_Find
- */
 EAPI Evas_Object *
 evas_focus_get(const Evas *e)
 {
index 91eed78..526c522 100644 (file)
@@ -26,11 +26,12 @@ typedef struct _Fndat Fndat;
 
 struct _Fndat
 {
-   const char *name;
-   const char *source;
-   int         size;
-   void       *font;
-   int         ref;
+   const char      *name;
+   const char      *source;
+   int              size;
+   Evas_Font_Set   *font;
+   int              ref;
+   Font_Rend_Flags  wanted_rend;
 
 #ifdef HAVE_FONTCONFIG
    FcFontSet *set;
@@ -229,10 +230,11 @@ evas_font_init(void)
 }
 
 #ifdef HAVE_FONTCONFIG
-static void *
-evas_load_fontconfig(Evas *evas, FcFontSet *set, int size)
+static Evas_Font_Set *
+evas_load_fontconfig(Evas *evas, FcFontSet *set, int size,
+      Font_Rend_Flags wanted_rend)
 {
-   void *font = NULL;
+   Evas_Font_Set *font = NULL;
    int i;
 
    /* Do loading for all in family */
@@ -243,15 +245,52 @@ evas_load_fontconfig(Evas *evas, FcFontSet *set, int size)
        FcPatternGet(set->fonts[i], FC_FILE, 0, &filename);
 
        if (font)
-         evas->engine.func->font_add(evas->engine.data.output, font, (char *)filename.u.s, size);
+         evas->engine.func->font_add(evas->engine.data.output, font, (char *)filename.u.s, size, wanted_rend);
        else
-         font = evas->engine.func->font_load(evas->engine.data.output, (char *)filename.u.s, size);
+         font = evas->engine.func->font_load(evas->engine.data.output, (char *)filename.u.s, size, wanted_rend);
      }
 
    return font;
 }
 #endif
 
+static Eina_Bool
+_font_style_name_match(const char *font_name, const char *style_name)
+{
+   char *style_key = NULL;
+
+   style_key = strchr(font_name, ':');
+   if (!style_key) return EINA_FALSE;
+   if (strlen(style_key) > 2) style_key++;
+   if (strstr(style_key, "style="))
+     {
+        if (!strcmp(style_name, "Italic"))
+          {
+             if (strstr(style_key, "Italic")
+                 || strstr(style_key, "italic")
+                 || strstr(style_key, "Cursiva")
+                 || strstr(style_key, "cursiva"))
+                return EINA_TRUE;
+             else
+                return EINA_FALSE;
+          }
+        else if (!strcmp(style_name, "Bold"))
+          {
+             if (strstr(style_key, "Bold")
+                 || strstr(style_key, "bold")
+                 || strstr(style_key, "Negreta")
+                 || strstr(style_key, "negreta"))
+                return EINA_TRUE;
+             else
+                return EINA_FALSE;
+          }
+        else
+           return EINA_FALSE;
+     }
+   else
+      return EINA_FALSE;
+}
+
 struct _FcPattern {   
    int             num;
    int             size;
@@ -267,14 +306,20 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
    FcFontSet *set = NULL;
 #endif
 
-   void *font = NULL;
+   Evas_Font_Set *font = NULL;
    Eina_List *fonts, *l;
    Fndat *fd;
    char *nm;
+   Font_Rend_Flags wanted_rend = 0;
 
    if (!name) return NULL;
    if (name[0] == 0) return NULL;
 
+   if (_font_style_name_match(name, "Italic"))
+      wanted_rend |= FONT_REND_ITALIC;
+   if (_font_style_name_match(name, "Bold"))
+      wanted_rend |= FONT_REND_BOLD;
+
    evas_font_init();
 
    EINA_LIST_FOREACH(fonts_cache, l, fd)
@@ -284,7 +329,7 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
             if (((!source) && (!fd->source)) ||
                 ((source) && (fd->source) && (!strcmp(source, fd->source))))
               {
-                 if (size == fd->size)
+                 if ((size == fd->size) && (wanted_rend == fd->wanted_rend))
                    {
                       fonts_cache = eina_list_promote_list(fonts_cache, l);
                       fd->ref++;
@@ -293,7 +338,8 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
 #ifdef HAVE_FONTCONFIG
                  else if (fd->set && fd->p_nm)
                    {
-                      font = evas_load_fontconfig(evas, fd->set, size);
+                      font = evas_load_fontconfig(evas, fd->set, size,
+                             wanted_rend);
                       goto on_find;
                    }
 #endif
@@ -308,7 +354,7 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
             if (((!source) && (!fd->source)) ||
                 ((source) && (fd->source) && (!strcmp(source, fd->source))))
               {
-                 if (size == fd->size)
+                 if ((size == fd->size) && (wanted_rend == fd->wanted_rend))
                    {
                       fonts_zero = eina_list_remove_list(fonts_zero, l);
                       fonts_cache = eina_list_prepend(fonts_cache, fd);
@@ -318,13 +364,15 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
 #ifdef HAVE_FONTCONFIG
                  else if (fd->set && fd->p_nm)
                    {
-                      font = evas_load_fontconfig(evas, fd->set, size);
+                      font = evas_load_fontconfig(evas, fd->set, size,
+                             wanted_rend);
                       goto on_find;
                    }
 #endif
               }
          }
      }
+
    fonts = evas_font_set_get(name);
    EINA_LIST_FOREACH(fonts, l, nm) /* Load each font in append */
      {
@@ -339,7 +387,7 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
                  fake_name = evas_file_path_join(source, nm);
                  if (fake_name)
                    {
-                      font = evas->engine.func->font_load(evas->engine.data.output, fake_name, size);
+                      font = evas->engine.func->font_load(evas->engine.data.output, fake_name, size, wanted_rend);
                       if (!font) /* Load from fake name failed, probably not cached */
                         {
                            /* read original!!! */
@@ -352,7 +400,7 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
                                 fdata = eet_read(ef, nm, &fsize);
                                 if ((fdata) && (fsize > 0))
                                   {
-                                     font = evas->engine.func->font_memory_load(evas->engine.data.output, fake_name, size, fdata, fsize);
+                                     font = evas->engine.func->font_memory_load(evas->engine.data.output, fake_name, size, fdata, fsize, wanted_rend);
                                      free(fdata);
                                   }
                                 eet_close(ef);
@@ -365,20 +413,20 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
               {
 #endif
                  if (evas_file_path_is_full_path((char *)nm)) /* Try filename */
-                   font = evas->engine.func->font_load(evas->engine.data.output, (char *)nm, size);
+                   font = evas->engine.func->font_load(evas->engine.data.output, (char *)nm, size, wanted_rend);
                  else /* search font path */
                    {
-                      Eina_List *l;
+                      Eina_List *ll;
                       char *dir;
 
-                      EINA_LIST_FOREACH(evas->font_path, l, dir)
+                      EINA_LIST_FOREACH(evas->font_path, ll, dir)
                         {
                            const char *f_file;
 
                            f_file = evas_font_dir_cache_find(dir, (char *)nm);
                            if (f_file)
                              {
-                                font = evas->engine.func->font_load(evas->engine.data.output, f_file, size);
+                                font = evas->engine.func->font_load(evas->engine.data.output, f_file, size, wanted_rend);
                                 if (font) break;
                              }
                         }
@@ -401,7 +449,7 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
                  if (fake_name)
                    {
                       /* FIXME: make an engine func */
-                      if (!evas->engine.func->font_add(evas->engine.data.output, font, fake_name, size))
+                      if (!evas->engine.func->font_add(evas->engine.data.output, font, fake_name, size, wanted_rend))
                         {
                            /* read original!!! */
                            ef = eet_open(source, EET_FILE_MODE_READ);
@@ -413,7 +461,7 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
                                 fdata = eet_read(ef, nm, &fsize);
                                 if ((fdata) && (fsize > 0))
                                   {
-                                     ok = evas->engine.func->font_memory_add(evas->engine.data.output, font, fake_name, size, fdata, fsize);
+                                     ok = evas->engine.func->font_memory_add(evas->engine.data.output, font, fake_name, size, fdata, fsize, wanted_rend);
                                      free(fdata);
                                   }
                                 eet_close(ef);
@@ -428,20 +476,20 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
               {
 #endif
                  if (evas_file_path_is_full_path((char *)nm))
-                   evas->engine.func->font_add(evas->engine.data.output, font, (char *)nm, size);
+                   evas->engine.func->font_add(evas->engine.data.output, font, (char *)nm, size, wanted_rend);
                  else
                    {
-                      Eina_List *l;
+                      Eina_List *ll;
                       char *dir;
 
-                      EINA_LIST_FOREACH(evas->font_path, l, dir)
+                      EINA_LIST_FOREACH(evas->font_path, ll, dir)
                         {
                            const char *f_file;
 
                            f_file = evas_font_dir_cache_find(dir, (char *)nm);
                            if (f_file)
                              {
-                                if (evas->engine.func->font_add(evas->engine.data.output, font, f_file, size))
+                                if (evas->engine.func->font_add(evas->engine.data.output, font, f_file, size, wanted_rend))
                                   break;
                              }
                         }
@@ -477,9 +525,9 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
              // FIXME: this i think is a bugfix for a rare bug... but i'm
              // not sure 100%. it seems that way from fc. if trim is set
              // to FcTrue...
-             //  ok - not a bugfix... but there is something going on somewhere that's wierd?
+             //  ok - not a bugfix... but there is something going on somewhere that's weird?
 //             FcPatternReference(p_nm); /* we have to reference count the pat */
-             font = evas_load_fontconfig(evas, set, size);
+             font = evas_load_fontconfig(evas, set, size, wanted_rend);
           }
      }
 #endif
@@ -492,6 +540,7 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
        if (source) fd->source = eina_stringshare_add(source);
        fd->size = size;
        fd->font = font;
+        fd->wanted_rend = wanted_rend;
        fd->ref = 1;
        fonts_cache = eina_list_prepend(fonts_cache, fd);
 #ifdef HAVE_FONTCONFIG
diff --git a/src/lib/canvas/evas_gl.c b/src/lib/canvas/evas_gl.c
new file mode 100644 (file)
index 0000000..39efd3e
--- /dev/null
@@ -0,0 +1,229 @@
+/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
+#include "evas_common.h"
+#include "evas_private.h"
+#include "Evas_GL.h"
+
+struct _Evas_GL
+{
+   int         magic;
+   Evas       *evas;
+
+   Eina_List  *contexts;
+   Eina_List  *surfaces;
+};
+
+struct _Evas_GL_Context
+{
+   void    *data;
+};
+
+struct _Evas_GL_Surface
+{
+   void    *data;
+};
+
+EAPI Evas_GL *
+evas_gl_new(Evas *e)
+{
+   Evas_GL *evas_gl;
+
+   MAGIC_CHECK(e, Evas, MAGIC_EVAS);
+   return NULL;
+   MAGIC_CHECK_END();
+
+   evas_gl = calloc(1, sizeof(Evas_GL));
+   if (!evas_gl) return NULL;
+
+   evas_gl->magic = MAGIC_EVAS_GL;
+   evas_gl->evas = e;
+
+   return evas_gl;
+}
+
+EAPI void
+evas_gl_free(Evas_GL *evas_gl)
+{
+   MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
+   return;
+   MAGIC_CHECK_END();
+
+
+   // Delete undeleted surfaces
+   while (evas_gl->surfaces)
+     evas_gl_surface_destroy(evas_gl, evas_gl->surfaces->data);
+
+   // Delete undeleted contexts
+   while (evas_gl->contexts)
+     evas_gl_context_destroy(evas_gl, evas_gl->contexts->data);
+
+   free(evas_gl);
+   evas_gl = NULL;
+}
+
+EAPI Evas_GL_Surface *
+evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *config, int width, int height)
+{
+   Evas_GL_Surface *surf;
+
+   MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
+   return NULL;
+   MAGIC_CHECK_END();
+
+   surf = calloc(1, sizeof(Evas_GL_Surface));
+
+   surf->data = evas_gl->evas->engine.func->gl_surface_create(evas_gl->evas->engine.data.output, config, width, height);
+
+   if (!surf->data)
+     {
+        ERR("Failed creating a surface from the engine\n");
+        free(surf);
+        return NULL;
+     }
+
+   // Keep track of the surface creations
+   evas_gl->surfaces = eina_list_prepend(evas_gl->surfaces, surf);
+
+   return surf;
+}
+
+EAPI void
+evas_gl_surface_destroy(Evas_GL *evas_gl, Evas_GL_Surface *surf)
+{
+   // Magic
+   MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
+   return;
+   MAGIC_CHECK_END();
+
+   if (!surf)
+     {
+        ERR("Trying to destroy a NULL surface pointer!\n");
+        return;
+     }
+
+   // Call Engine's Surface Destroy
+   evas_gl->evas->engine.func->gl_surface_destroy(evas_gl->evas->engine.data.output, surf->data);
+
+   // Remove it from the list
+   evas_gl->surfaces = eina_list_remove(evas_gl->surfaces, surf);
+
+   // Delete the object
+   free(surf);
+   surf = NULL;
+}
+
+EAPI Evas_GL_Context *
+evas_gl_context_create(Evas_GL *evas_gl, Evas_GL_Context *share_ctx)
+{
+   Evas_GL_Context *ctx;
+
+   // Magic
+   MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
+   return NULL;
+   MAGIC_CHECK_END();
+
+   // Allocate a context object
+   ctx = calloc(1, sizeof(Evas_GL_Context));
+   if (!ctx)
+     {
+        ERR("Unable to create a Evas_GL_Context object\n");
+        return NULL;
+     }
+
+   // Call engine->gl_create_context
+   if (share_ctx)
+     {
+        ctx->data = evas_gl->evas->engine.func->gl_context_create(evas_gl->evas->engine.data.output, share_ctx->data);
+     }
+   else
+     {
+        ctx->data = evas_gl->evas->engine.func->gl_context_create(evas_gl->evas->engine.data.output, NULL);
+     }
+
+   // Set a few variables
+   if (!ctx->data)
+     {
+        ERR("Failed creating a context from the engine\n");
+        free(ctx);
+        return NULL;
+     }
+
+   // Keep track of the context creations
+   evas_gl->contexts = eina_list_prepend(evas_gl->contexts, ctx);
+
+   return ctx;
+
+}
+
+EAPI void
+evas_gl_context_destroy(Evas_GL *evas_gl, Evas_GL_Context *ctx)
+{
+
+   MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
+   return;
+   MAGIC_CHECK_END();
+
+   if (!ctx)
+     {
+        ERR("Trying to destroy a NULL context pointer!\n");
+        return;
+     }
+
+   // Call Engine's destroy
+   evas_gl->evas->engine.func->gl_context_destroy(evas_gl->evas->engine.data.output, ctx->data);
+
+   // Remove it from the list
+   evas_gl->contexts = eina_list_remove(evas_gl->contexts, ctx);
+
+   // Delete the object
+   free(ctx);
+   ctx = NULL;
+}
+
+EAPI Eina_Bool
+evas_gl_make_current(Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_GL_Context *ctx)
+{
+   Eina_Bool ret;
+
+   MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
+   return EINA_FALSE;
+   MAGIC_CHECK_END();
+
+   if ((!surf) || (!ctx))
+     ret = (Eina_Bool)evas_gl->evas->engine.func->gl_make_current(evas_gl->evas->engine.data.output, NULL, NULL);
+   else
+     ret = (Eina_Bool)evas_gl->evas->engine.func->gl_make_current(evas_gl->evas->engine.data.output, surf->data, ctx->data);
+
+   return ret;
+}
+
+EAPI Evas_GL_Func
+evas_gl_proc_address_get(Evas_GL *evas_gl, const char *name)
+{
+   MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
+   return EINA_FALSE;
+   MAGIC_CHECK_END();
+
+   return (Evas_GL_Func)evas_gl->evas->engine.func->gl_proc_address_get(evas_gl->evas->engine.data.output, name);
+}
+
+EAPI Eina_Bool
+evas_gl_native_surface_get(Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_Native_Surface *ns)
+{
+   MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
+   return EINA_FALSE;
+   MAGIC_CHECK_END();
+
+   return (Eina_Bool)evas_gl->evas->engine.func->gl_native_surface_get(evas_gl->evas->engine.data.output, surf->data, ns);
+}
+
+
+EAPI Evas_GL_API *
+evas_gl_api_get(Evas_GL *evas_gl)
+{
+   MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
+   return NULL;
+   MAGIC_CHECK_END();
+
+   return (Evas_GL_API*)evas_gl->evas->engine.func->gl_api_get(evas_gl->evas->engine.data.output);
+
+}
index 7723960..f74ef34 100644 (file)
@@ -31,22 +31,6 @@ evas_key_lock_number(const Evas_Lock *l, const char *keyname)
 
 /* public calls */
 
-/**
- * Returns a handle to the modifiers available in the system.  This is required to check
- * for modifiers with the evas_key_modifier_is_set function.
- *
- *
- * @see evas_key_modifier_add
- * @see evas_key_modifier_del
- * @see evas_key_modifier_on
- * @see evas_key_modifier_off
- * @see evas_key_modifier_is_set
- *
- * @param e The pointer to the Evas Canvas
- *
- * @return An Evas_Modifier handle to query the modifier subsystem with
- *     evas_key_modifier_is_set, or NULL on error.
- */
 EAPI const Evas_Modifier *
 evas_key_modifier_get(const Evas *e)
 {
@@ -56,21 +40,6 @@ evas_key_modifier_get(const Evas *e)
    return &(e->modifiers);
 }
 
-/**
- * Returns a handle to the locks available in the system.  This is required to check for
- * locks with the evas_key_lock_is_set function.
- *
- * @see evas_key_lock_add
- * @see evas_key_lock_del
- * @see evas_key_lock_on
- * @see evas_key_lock_off
- *
- * @see evas_key_lock_is_set
- * @param e The pointer to the Evas Canvas
- *
- * @return An Evas_Lock handle to query the lock subsystem with
- *     evas_key_lock_is_set, or NULL on error.
- */
 EAPI const Evas_Lock *
 evas_key_lock_get(const Evas *e)
 {
@@ -80,21 +49,6 @@ evas_key_lock_get(const Evas *e)
    return &(e->locks);
 }
 
-/**
- * Checks the state of a given modifier.  If the modifier is set, such as shift being pressed
- * this function returns true.
- *
- * @see evas_key_modifier_add
- * @see evas_key_modifier_del
- * @see evas_key_modifier_get
- * @see evas_key_modifier_on
- * @see evas_key_modifier_off
- *
- * @param m The current modifier set as returned by evas_key_modifier_get.
- * @param keyname The name of the key to check its status.
- *
- * @return 1 if the @p keyname is on, 0 otherwise.
- */
 EAPI Eina_Bool
 evas_key_modifier_is_set(const Evas_Modifier *m, const char *keyname)
 {
@@ -111,21 +65,6 @@ evas_key_modifier_is_set(const Evas_Modifier *m, const char *keyname)
    return 0;
 }
 
-/**
- * Checks the state of a given lock.  If the lock is set, such as caps lock, this function
- * returns true.
- *
- * @see evas_key_lock_get
- * @see evas_key_lock_add
- * @see evas_key_lock_del
- * @see evas_key_lock_on
- * @see evas_key_lock_off
- *
- * @param l The current lock set as returned by evas_key_lock_get.
- * @param keyname The name of the lock to add the the list.
- *
- * @param 1 if the @p keyname kock is set, 0 otherwise.
- */
 EAPI Eina_Bool
 evas_key_lock_is_set(const Evas_Lock *l, const char *keyname)
 {
@@ -142,22 +81,6 @@ evas_key_lock_is_set(const Evas_Lock *l, const char *keyname)
    return 0;
 }
 
-/**
- * Adds the @p keyname to the current list of modifiers.
- *
- * Modifiers can be keys like shift, alt and ctrl, as well as user defined.  This allows
- * custom modifiers to be added to the evas system as run time.  It is then possible to set
- * and unset the modifier for other parts of the program to check and act on.
- *
- * @see evas_key_modifier_del
- * @see evas_key_modifier_get
- * @see evas_key_modifier_on
- * @see evas_key_modifier_off
- * @see evas_key_modifier_is_set
- *
- * @param e The pointer to the Evas Canvas
- * @param keyname The name of the modifier to add to the list.
- */
 EAPI void
 evas_key_modifier_add(Evas *e, const char *keyname)
 {
@@ -173,18 +96,6 @@ evas_key_modifier_add(Evas *e, const char *keyname)
    e->modifiers.mask = 0;
 }
 
-/**
- * Removes the @p keyname from the current list of modifiers.
- *
- * @see evas_key_modifier_add
- * @see evas_key_modifier_get
- * @see evas_key_modifier_on
- * @see evas_key_modifier_off
- * @see evas_key_modifier_is_set
- *
- * @param e The pointer to the Evas Canvas
- * @param keyname The name of the key to remove from the modifiers list.
- */
 EAPI void
 evas_key_modifier_del(Evas *e, const char *keyname)
 {
@@ -210,21 +121,6 @@ evas_key_modifier_del(Evas *e, const char *keyname)
      }
 }
 
-/**
- * Adds the @p keyname to the current list of locks.
- *
- * Locks can be keys like caps lock, num lock or scroll lock, as well as user defined.  This
- * allows custom locks to be added to the evas system at run time.  It is then possible to
- * set and unset the lock for other parts of the program to check and act on.
- *
- * @see evas_key_lock_get
- * @see evas_key_lock_del
- * @see evas_key_lock_on
- * @see evas_key_lock_off
- *
- * @param e The pointer to the Evas Canvas
- * @param keyname The name of the key to remove from the modifier list.
- */
 EAPI void
 evas_key_lock_add(Evas *e, const char *keyname)
 {
@@ -240,17 +136,6 @@ evas_key_lock_add(Evas *e, const char *keyname)
    e->locks.mask = 0;
 }
 
-/**
- * Removes The @p keyname from the current list of locks.
- *
- * @see evas_key_lock_get
- * @see evas_key_lock_add
- * @see evas_key_lock_on
- * @see evas_key_lock_off
- *
- * @param e The pointer to the Evas Canvas
- * @param keyname The name of the key to remove from the lock list.
- */
 EAPI void
 evas_key_lock_del(Evas *e, const char *keyname)
 {
@@ -277,17 +162,6 @@ evas_key_lock_del(Evas *e, const char *keyname)
      }
 }
 
-/**
- * Enables or turns on the modifier with name @p keyname.
- *
- * @see evas_key_modifier_add
- * @see evas_key_modifier_get
- * @see evas_key_modifier_off
- * @see evas_key_modifier_is_set
- *
- * @param e The pointer to the Evas Canvas
- * @param keyname The name of the modifier to set.
- */
 EAPI void
 evas_key_modifier_on(Evas *e, const char *keyname)
 {
@@ -304,17 +178,6 @@ evas_key_modifier_on(Evas *e, const char *keyname)
    e->modifiers.mask |= num;
 }
 
-/**
- * Disables or turns off the modifier with name @p keyname.
- *
- * @see evas_key_modifier_add
- * @see evas_key_modifier_get
- * @see evas_key_modifier_on
- * @see evas_key_modifier_is_set
- *
- * @param e The pointer to the Evas Canvas
- * @param keyname The name of the modifier to un-set.
- */
 EAPI void
 evas_key_modifier_off(Evas *e, const char *keyname)
 {
@@ -331,17 +194,6 @@ evas_key_modifier_off(Evas *e, const char *keyname)
    e->modifiers.mask &= ~num;
 }
 
-/**
- * Enables or turns on the lock with name @p keyname.
- *
- * @see evas_key_lock_get
- * @see evas_key_lock_add
- * @see evas_key_lock_del
- * @see evas_key_lock_off
- *
- * @param e The pointer to the Evas Canvas
- * @param keyname The name of the lock to set.
- */
 EAPI void
 evas_key_lock_on(Evas *e, const char *keyname)
 {
@@ -358,17 +210,6 @@ evas_key_lock_on(Evas *e, const char *keyname)
    e->locks.mask |= num;
 }
 
-/**
- * Disables or turns off the lock with name @p keyname.
- *
- * @see evas_key_lock_get
- * @see evas_key_lock_add
- * @see evas_key_lock_del
- * @see evas_key_lock_on
- *
- * @param e The pointer to the Evas Canvas
- * @param keyname The name of the lock to un-set.
- */
 EAPI void
 evas_key_lock_off(Evas *e, const char *keyname)
 {
@@ -387,20 +228,6 @@ evas_key_lock_off(Evas *e, const char *keyname)
 
 /* errr need to add key grabbing/ungrabbing calls - missing modifier stuff. */
 
-/**
- * Creates a bit mask from the @p keyname for use with events to check for the presence
- * of the @p keyname modifier.
- *
- * @see evas_key_modifier_add
- * @see evas_key_modifier_get
- * @see evas_key_modifier_on
- * @see evas_key_modifier_off
- * @see evas_key_modifier_is_set
- *
- * @param keyname The name of the modifier to create the mask for.
- *
- * @returns the bit mask or 0 if the @p keyname wasn't registered as a modifier.
- */
 EAPI Evas_Modifier_Mask
 evas_key_modifier_mask_get(const Evas *e, const char *keyname)
 {
index 5152842..3408d9d 100644 (file)
@@ -134,47 +134,6 @@ evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask mod
 
 /* public calls */
 
-/**
- * Requests @p keyname key events be directed to @p obj.
- *
- * Key grabs allow an object to receive key events for specific key
- * strokes even if another object has focus.  If the grab is
- * non-exclusive then all objects that have grabs on the key will get
- * the event, however if the grab is exclusive, no other object can
- * get a grab on the key and only that object will get the event.
- *
- * @p keyname is a platform dependent symbolic name for the key
- * pressed.  It is sometimes possible to convert the string to an
- * ASCII value of the key, but not always for example the enter key
- * may be returned as the string 'Enter'.
- *
- * Typical platforms are Linux frame buffer (Ecore_FB) and X server
- * (Ecore_X) when using Evas with Ecore and Ecore_Evas.
- *
- * For a list of keynames for the Linux frame buffer, please refer to
- * the Ecore_FB documentation.
- *
- * @p modifiers and @p not_modifiers are bit masks of all the
- * modifiers that are required and not required respectively for the
- * new grab.  Modifiers can be things such as shift and ctrl as well
- * as user defigned types via evas_key_modifier_add.
- *
- * @see evas_object_key_ungrab
- * @see evas_object_focus_set
- * @see evas_object_focus_get
- * @see evas_focus_get
- * @see evas_key_modifier_add
- *
- * @param obj the object to direct @p keyname events to.
- * @param keyname the key to request events for.
- * @param modifiers a mask of modifiers that should be present to
- * trigger the event.
- * @param not_modifiers a mask of modifiers that should not be present
- * to trigger the event.
- * @param exclusive request that the @p obj is the only object
- * receiving the @p keyname events.
- * @return Boolean indicating whether the grab succeeded
- */
 EAPI Eina_Bool
 evas_object_key_grab(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive)
 {
@@ -195,24 +154,6 @@ evas_object_key_grab(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask m
    return 1;
 }
 
-/**
- * Request that the grab on @p obj be removed.
- *
- * Removes the grab on @p obj if @p keyname, @p modifiers, and @p not_modifiers
- * match.
- *
- * @see evas_object_key_grab
- * @see evas_object_focus_set
- * @see evas_object_focus_get
- * @see evas_focus_get
- *
- * @param obj the object that has an existing grab.
- * @param keyname the key the grab is for.
- * @param modifiers a mask of modifiers that should be present to
- * trigger the event.
- * @param not_modifiers a mask of modifiers that should not be present
- * to trigger the event.
- */
 EAPI void
 evas_object_key_ungrab(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers)
 {
index 0175da1..076814c 100644 (file)
@@ -135,20 +135,6 @@ evas_layer_del(Evas_Layer *lay)
 
 /* public functions */
 
-/**
- * @addtogroup Evas_Object_Group_Basic
- * @{
- */
-
-/**
- * Sets the layer of the evas that the given object will be part of.
- *
- * It is not possible to change the layer of a smart object's child.
- *
- * @param   obj The given evas object.
- * @param   l   The number of the layer to place the object on.
- *          Between #EVAS_LAYER_MIN and #EVAS_LAYER_MAX.
- */
 EAPI void
 evas_object_layer_set(Evas_Object *obj, short l)
 {
@@ -192,16 +178,6 @@ evas_object_layer_set(Evas_Object *obj, short l)
    evas_object_inform_call_restack(obj);
 }
 
-/**
- * Retrieves the layer of the evas that the given object is part of.
- *
- * Be careful, it doesn't make sense to change the layer of smart object's
- * child. So the returned value could be wrong in some case. Don't rely on
- * it's accuracy.
- *
- * @param   obj The given evas object.
- * @return  Number of the layer.
- */
 EAPI short
 evas_object_layer_get(const Evas_Object *obj)
 {
@@ -214,7 +190,3 @@ evas_object_layer_get(const Evas_Object *obj)
      }
    return obj->cur.layer;
 }
-
-/**
- * @}
- */
index 32fd34f..54e0679 100644 (file)
@@ -9,18 +9,6 @@ EAPI int lockmax = 0;
 
 static int _evas_init_count = 0;
 int _evas_log_dom_global = -1;
-/**
- * Initialize Evas
- *
- * @return The init counter value.
- *
- * This function initialize evas, increments a counter of the number
- * of calls to this function and returns this value.
- *
- * @see evas_shutdown().
- *
- * @ingroup Evas_Group
- */
 EAPI int
 evas_init(void)
 {
@@ -83,18 +71,6 @@ evas_init(void)
    return --_evas_init_count;
 }
 
-/**
- * Shutdown Evas
- *
- * @return The init counter value.
- *
- * This function finalize evas, decrements the counter of the number
- * of calls to the function evas_init() and returns this value.
- *
- * @see evas_init().
- *
- * @ingroup Evas_Group
- */
 EAPI int
 evas_shutdown(void)
 {
@@ -130,30 +106,6 @@ evas_shutdown(void)
 }
 
 
-/**
- * Creates a new empty evas.
- *
- * Note that before you can use the evas, you will to at a minimum:
- * @li Set its render method with @ref evas_output_method_set .
- * @li Set its viewport size with @ref evas_output_viewport_set .
- * @li Set its size of the canvas with @ref evas_output_size_set .
- * @li Ensure that the render engine is given the correct settings
- *     with @ref evas_engine_info_set .
- *
- * This function should only fail if the memory allocation fails
- *
- * @note this function is very low level. Instead of using it
- *       directly, consider using the high level functions in
- *       Ecore_Evas such as @c ecore_evas_new(). See
- *       http://docs.enlightenment.org/auto/ecore/.
- *
- * @attention it is recommended that one calls evas_init() before
- *       creating new canvas.
- *
- * @return A new uninitialised Evas canvas on success.  Otherwise, @c
- * NULL.
- * @ingroup Evas_Canvas
- */
 EAPI Evas *
 evas_new(void)
 {
@@ -187,16 +139,6 @@ evas_new(void)
    return e;
 }
 
-/**
- * Frees the given evas and any objects created on it.
- *
- * Any objects with 'free' callbacks will have those callbacks called
- * in this function.
- *
- * @param   e The given evas.
- *
- * @ingroup Evas_Canvas
- */
 EAPI void
 evas_free(Evas *e)
 {
@@ -311,20 +253,6 @@ evas_free(Evas *e)
    free(e);
 }
 
-/**
- * Sets the output engine for the given evas.
- *
- * Once the output engine for an evas is set, any attempt to change it
- * will be ignored.  The value for @p render_method can be found using
- * @ref evas_render_method_lookup .
- *
- * @attention it is mandatory that one calls evas_init() before
- *       setting the output method.
- *
- * @param   e             The given evas.
- * @param   render_method The numeric engine value to use.
- * @ingroup Evas_Output_Method
- */
 EAPI void
 evas_output_method_set(Evas *e, int render_method)
 {
@@ -356,13 +284,6 @@ evas_output_method_set(Evas *e, int render_method)
    return;
 }
 
-/**
- * Retrieves the number of the output engine used for the given evas.
- * @param   e The given evas.
- * @return  The ID number of the output engine being used.  @c 0 is
- *          returned if there is an error.
- * @ingroup Evas_Output_Method
- */
 EAPI int
 evas_output_method_get(const Evas *e)
 {
@@ -373,20 +294,6 @@ evas_output_method_get(const Evas *e)
    return e->output.render_method;
 }
 
-/**
- * Retrieves the current render engine info struct from the given evas.
- *
- * The returned structure is publicly modifiable.  The contents are
- * valid until either @ref evas_engine_info_set or @ref evas_render
- * are called.
- *
- * This structure does not need to be freed by the caller.
- *
- * @param   e The given evas.
- * @return  A pointer to the Engine Info structure.  @c NULL is returned if
- *          an engine has not yet been assigned.
- * @ingroup Evas_Output_Method
- */
 EAPI Evas_Engine_Info *
 evas_engine_info_get(const Evas *e)
 {
@@ -404,25 +311,6 @@ evas_engine_info_get(const Evas *e)
    return info;
 }
 
-/**
- * Applies the engine settings for the given evas from the given @c
- * Evas_Engine_Info structure.
- *
- * To get the Evas_Engine_Info structure to use, call @ref
- * evas_engine_info_get .  Do not try to obtain a pointer to an
- * @c Evas_Engine_Info structure in any other way.
- *
- * You will need to call this function at least once before you can
- * create objects on an evas or render that evas.  Some engines allow
- * their settings to be changed more than once.
- *
- * Once called, the @p info pointer should be considered invalid.
- *
- * @param   e    The pointer to the Evas Canvas
- * @param   info The pointer to the Engine Info to use
- * @return  1 if no error occurred, 0 otherwise
- * @ingroup Evas_Output_Method
- */
 EAPI Eina_Bool
 evas_engine_info_set(Evas *e, Evas_Engine_Info *info)
 {
@@ -435,21 +323,6 @@ evas_engine_info_set(Evas *e, Evas_Engine_Info *info)
    return (Eina_Bool)e->engine.func->setup(e, info);
 }
 
-/**
- * Sets the output size of the render engine of the given evas.
- *
- * The evas will render to a rectangle of the given size once this
- * function is called.  The output size is independent of the viewport
- * size.  The viewport will be stretched to fill the given rectangle.
- *
- * The units used for @p w and @p h depend on the engine used by the
- * evas.
- *
- * @param   e The given evas.
- * @param   w The width in output units, usually pixels.
- * @param   h The height in output units, usually pixels.
- * @ingroup Evas_Output_Size
- */
 EAPI void
 evas_output_size_set(Evas *e, int w, int h)
 {
@@ -473,20 +346,6 @@ evas_output_size_set(Evas *e, int w, int h)
    evas_render_invalidate(e);
 }
 
-/**
- * Retrieve the output size of the render engine of the given evas.
- *
- * The output size is given in whatever the output units are for the
- * engine.
- *
- * If either @p w or @p h is @c NULL, then it is ignored.  If @p e is
- * invalid, the returned results are undefined.
- *
- * @param   e The given evas.
- * @param   w The pointer to an integer to store the width in.
- * @param   h The pointer to an integer to store the height in.
- * @ingroup Evas_Output_Size
- */
 EAPI void
 evas_output_size_get(const Evas *e, int *w, int *h)
 {
@@ -500,24 +359,6 @@ evas_output_size_get(const Evas *e, int *w, int *h)
    if (h) *h = e->output.h;
 }
 
-/**
- * Sets the output viewport of the given evas in evas units.
- *
- * The output viewport is the area of the evas that will be visible to
- * the viewer.  The viewport will be stretched to fit the output
- * target of the evas when rendering is performed.
- *
- * @note The coordinate values do not have to map 1-to-1 with the output
- *       target.  However, it is generally advised that it is done for ease
- *       of use.
- *
- * @param   e The given evas.
- * @param   x The top-left corner x value of the viewport.
- * @param   y The top-left corner y value of the viewport.
- * @param   w The width of the viewport.  Must be greater than 0.
- * @param   h The height of the viewport.  Must be greater than 0.
- * @ingroup Evas_Output_Size
- */
 EAPI void
 evas_output_viewport_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
 {
@@ -544,30 +385,6 @@ evas_output_viewport_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas
    e->changed = 1;
 }
 
-/**
- * Get the render engine's output viewport 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
- *
- * Calling this function writes the current canvas output viewport
- * size and location values into the variables pointed to by @p x, @p
- * y, @p w and @p h.  On success the variables have the output
- * location and size values written to them in canvas units. Any of @p
- * x, @p y, @p w or @p h that are NULL will not be written to. If @p e
- * is invalid, the results are undefined.
- *
- * Example:
- * @code
- * extern Evas *evas;
- * Evas_Coord x, y, width, height;
- *
- * evas_output_viewport_get(evas, &x, &y, &w, &h);
- * @endcode
- */
 EAPI void
 evas_output_viewport_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
 {
@@ -585,28 +402,6 @@ evas_output_viewport_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord
    if (h) *h = e->viewport.h;
 }
 
-/**
- * Convert/scale an ouput screen co-ordinate into canvas co-ordinates
- *
- * @param e The pointer to the Evas Canvas
- * @param x The screen/output x co-ordinate
- * @return The screen co-ordinate translated to canvas unit co-ordinates
- * @ingroup Evas_Coord_Mapping_Group
- *
- * This function takes in a horizontal co-ordinate as the @p x
- * parameter and converts it into canvas units, accounting for output
- * size, viewport size and location, returning it as the function
- * return value. If @p e is invalid, the results are undefined.
- *
- * Example:
- * @code
- * extern Evas *evas;
- * extern int screen_x;
- * Evas_Coord canvas_x;
- *
- * canvas_x = evas_coord_screen_x_to_world(evas, screen_x);
- * @endcode
- */
 EAPI Evas_Coord
 evas_coord_screen_x_to_world(const Evas *e, int x)
 {
@@ -617,28 +412,6 @@ evas_coord_screen_x_to_world(const Evas *e, int x)
    return (long long)e->viewport.x + (((long long)x * (long long)e->viewport.w) / (long long)e->output.w);
 }
 
-/**
- * Convert/scale an ouput screen co-ordinate into canvas co-ordinates
- *
- * @param e The pointer to the Evas Canvas
- * @param y The screen/output y co-ordinate
- * @return The screen co-ordinate translated to canvas unit co-ordinates
- * @ingroup Evas_Coord_Mapping_Group
- *
- * This function takes in a vertical co-ordinate as the @p y parameter
- * and converts it into canvas units, accounting for output size,
- * viewport size and location, returning it as the function return
- * value. If @p e is invalid, the results are undefined.
- *
- * Example:
- * @code
- * extern Evas *evas;
- * extern int screen_y;
- * Evas_Coord canvas_y;
- *
- * canvas_y = evas_coord_screen_y_to_world(evas, screen_y);
- * @endcode
- */
 EAPI Evas_Coord
 evas_coord_screen_y_to_world(const Evas *e, int y)
 {
@@ -649,28 +422,6 @@ evas_coord_screen_y_to_world(const Evas *e, int y)
    return (long long)e->viewport.y + (((long long)y * (long long)e->viewport.h) / (long long)e->output.h);
 }
 
-/**
- * Convert/scale a canvas co-ordinate into output screen co-ordinates
- *
- * @param e The pointer to the Evas Canvas
- * @param x The canvas x co-ordinate
- * @return The output/screen co-ordinate translated to output co-ordinates
- * @ingroup Evas_Coord_Mapping_Group
- *
- * This function takes in a horizontal co-ordinate as the @p x
- * parameter and converts it into output units, accounting for output
- * size, viewport size and location, returning it as the function
- * return value. If @p e is invalid, the results are undefined.
- *
- * Example:
- * @code
- * extern Evas *evas;
- * int screen_x;
- * extern Evas_Coord canvas_x;
- *
- * screen_x = evas_coord_world_x_to_screen(evas, canvas_x);
- * @endcode
- */
 EAPI int
 evas_coord_world_x_to_screen(const Evas *e, Evas_Coord x)
 {
@@ -681,28 +432,6 @@ evas_coord_world_x_to_screen(const Evas *e, Evas_Coord x)
    return (int)((((long long)x - (long long)e->viewport.x) * (long long)e->output.w) /  (long long)e->viewport.w);
 }
 
-/**
- * Convert/scale a canvas co-ordinate into output screen co-ordinates
- *
- * @param e The pointer to the Evas Canvas
- * @param y The canvas y co-ordinate
- * @return The output/screen co-ordinate translated to output co-ordinates
- * @ingroup Evas_Coord_Mapping_Group
- *
- * This function takes in a vertical co-ordinate as the @p x parameter
- * and converts it into output units, accounting for output size,
- * viewport size and location, returning it as the function return
- * value. If @p e is invalid, the results are undefined.
- *
- * Example:
- * @code
- * extern Evas *evas;
- * int screen_y;
- * extern Evas_Coord canvas_y;
- *
- * screen_y = evas_coord_world_y_to_screen(evas, canvas_y);
- * @endcode
- */
 EAPI int
 evas_coord_world_y_to_screen(const Evas *e, Evas_Coord y)
 {
@@ -713,50 +442,6 @@ evas_coord_world_y_to_screen(const Evas *e, Evas_Coord y)
    return (int)((((long long)y - (long long)e->viewport.y) * (long long)e->output.h) /  (long long)e->viewport.h);
 }
 
-/**
- * Look up a numeric ID from a string name of a rendering engine.
- *
- * @param name The string name of an engine
- * @return A numeric (opaque) ID for the rendering engine
- * @ingroup Evas_Output_Method
- *
- * This function looks up a numeric return value for the named engine
- * in the string @p name. This is a normal C string, NUL byte
- * terminated. The name is case sensitive. If the rendering engine is
- * available, a numeric ID for that engine is returned that is not
- * 0. If the engine is not available, 0 is returned, indicating an
- * invalid engine.
- *
- * The programmer should NEVER rely on the numeric ID of an engine
- * unless it is returned by this function. Programs should NOT be
- * written accessing render method ID's directly, without first
- * obtaining it from this function.
- *
- * @attention it is mandatory that one calls evas_init() before
- *       looking up the render method.
- *
- * Example:
- * @code
- * int engine_id;
- * Evas *evas;
- *
- * evas_init();
- *
- * evas = evas_new();
- * if (!evas)
- *   {
- *     fprintf(stderr, "ERROR: Canvas creation failed. Fatal error.\n");
- *     exit(-1);
- *   }
- * engine_id = evas_render_method_lookup("software_x11");
- * if (!engine_id)
- *   {
- *     fprintf(stderr, "ERROR: Requested rendering engine is absent.\n");
- *     exit(-1);
- *   }
- * evas_output_method_set(evas, engine_id);
- * @endcode
- */
 EAPI int
 evas_render_method_lookup(const char *name)
 {
@@ -770,37 +455,6 @@ evas_render_method_lookup(const char *name)
    return em->id_engine;
 }
 
-/**
- * List all the rendering engines compiled into the copy of the Evas library
- *
- * @return A linked list whose data members are C strings of engine names
- * @ingroup Evas_Output_Method
- *
- * Calling this will return a handle (pointer) to an Evas linked
- * list. Each node in the linked list will have the data pointer be a
- * (char *) pointer to the string name of the rendering engine
- * available. The strings should never be modified, neither should the
- * list be modified. This list should be cleaned up as soon as the
- * program no longer needs it using evas_render_method_list_free(). If
- * no engines are available from Evas, NULL will be returned.
- *
- * Example:
- * @code
- * Eina_List *engine_list, *l;
- * char *engine_name;
- *
- * engine_list = evas_render_method_list();
- * if (!engine_list)
- *   {
- *     fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n");
- *     exit(-1);
- *   }
- * printf("Availible Evas Engines:\n");
- * EINA_LIST_FOREACH(engine_list, l, engine_name)
- *     printf("%s\n", engine_name);
- * evas_render_method_list_free(engine_list);
- * @endcode
- */
 EAPI Eina_List *
 evas_render_method_list(void)
 {
@@ -825,24 +479,12 @@ evas_render_method_list(void)
 #ifdef BUILD_ENGINE_SOFTWARE_X11
    methods = eina_list_append(methods, "software_x11");
 #endif
-#ifdef BUILD_ENGINE_XRENDER_X11
-   methods = eina_list_append(methods, "xrender_x11");
-#endif
-#ifdef BUILD_ENGINE_XRENDER_XCB
-   methods = eina_list_append(methods, "xrender_xcb");
-#endif
 #ifdef BUILD_ENGINE_SOFTWARE_16_X11
    methods = eina_list_append(methods, "software_16_x11");
 #endif
 #ifdef BUILD_ENGINE_GL_X11
    methods = eina_list_append(methods, "gl_x11");
 #endif
-#ifdef BUILD_ENGINE_GL_GLEW
-   methods = eina_list_append(methods, "gl_glew");
-#endif
-#ifdef BUILD_ENGINE_CAIRO_X11
-   methods = eina_list_append(methods, "cairo_x11");
-#endif
 #ifdef BUILD_ENGINE_DIRECTFB
    methods = eina_list_append(methods, "directfb");
 #endif
@@ -855,9 +497,6 @@ evas_render_method_list(void)
 #ifdef BUILD_ENGINE_SOFTWARE_WIN32_GDI
    methods = eina_list_append(methods, "software_win32_gdi");
 #endif
-#ifdef BUILD_ENGINE_SOFTWARE_QTOPIA
-   methods = eina_list_append(methods, "software_qtopia");
-#endif
 #ifdef BUILD_ENGINE_SOFTWARE_SDL
    methods = eina_list_append(methods, "software_sdl");
 #endif
@@ -865,62 +504,31 @@ evas_render_method_list(void)
    return methods;
 }
 
-/**
- * This function should be called to free a list of engine names
- *
- * @param list The Eina_List base pointer for the engine list to be freed
- * @ingroup Evas_Output_Method
- *
- * When this function is called it will free the engine list passed in
- * as @p list. The list should only be a list of engines generated by
- * calling evas_render_method_list(). If @p list is NULL, nothing will
- * happen.
- *
- * Example:
- * @code
- * Eina_List *engine_list, *l;
- * char *engine_name;
- *
- * engine_list = evas_render_method_list();
- * if (!engine_list)
- *   {
- *     fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n");
- *     exit(-1);
- *   }
- * printf("Availible Evas Engines:\n");
- * EINA_LIST_FOREACH(engine_list, l, engine_name)
- *     printf("%s\n", engine_name);
- * evas_render_method_list_free(engine_list);
- * @endcode
- */
 EAPI void
 evas_render_method_list_free(Eina_List *list)
 {
    eina_list_free(list);
 }
 
-/**
- * This function returns the current known pointer co-ordinates
- *
- * @param e The pointer to the Evas Canvas
- * @param x The pointer to an integer to be filled in
- * @param y The pointer to an integer to be filled in
- * @ingroup Evas_Pointer_Group
- *
- * This function returns the current known screen/output co-ordinates
- * of the mouse pointer and sets the contents of the integers pointed
- * to by @p x and @p y to contain these co-ordinates. If @p e is not a
- * valid canvas the results of this function are undefined.
- *
- * Example:
- * @code
- * extern Evas *evas;
- * int mouse_x, mouse_y;
- *
- * evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y);
- * printf("Mouse is at screen position %i, %i\n", mouse_x, mouse_y);
- * @endcode
- */
+EAPI Eina_Bool
+evas_object_image_extension_can_load_get(const char *file)
+{
+   const char *tmp;
+   Eina_Bool result;
+
+   tmp = eina_stringshare_add(file);
+   result = evas_common_extension_can_load_get(tmp);
+   eina_stringshare_del(tmp);
+
+   return result;
+}
+
+EAPI Eina_Bool
+evas_object_image_extension_can_load_fast_get(const char *file)
+{
+   return evas_common_extension_can_load_get(file);
+}
+
 EAPI void
 evas_pointer_output_xy_get(const Evas *e, int *x, int *y)
 {
@@ -933,28 +541,6 @@ evas_pointer_output_xy_get(const Evas *e, int *x, int *y)
    if (y) *y = e->pointer.y;
 }
 
-/**
- * This function returns the current known pointer co-ordinates
- *
- * @param e The pointer to the Evas Canvas
- * @param x The pointer to a Evas_Coord to be filled in
- * @param y The pointer to a Evas_Coord to be filled in
- * @ingroup Evas_Pointer_Group
- *
- * This function returns the current known canvas unit co-ordinates of
- * the mouse pointer and sets the contents of the Evas_Coords pointed
- * to by @p x and @p y to contain these co-ordinates. If @p e is not a
- * valid canvas the results of this function are undefined.
- *
- * Example:
- * @code
- * extern Evas *evas;
- * Evas_Coord mouse_x, mouse_y;
- *
- * evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y);
- * printf("Mouse is at canvas position %f, %f\n", mouse_x, mouse_y);
- * @endcode
- */
 EAPI void
 evas_pointer_canvas_xy_get(const Evas *e, Evas_Coord *x, Evas_Coord *y)
 {
@@ -967,43 +553,6 @@ evas_pointer_canvas_xy_get(const Evas *e, Evas_Coord *x, Evas_Coord *y)
    if (y) *y = e->pointer.y;
 }
 
-/**
- * Returns a bitmask with the mouse buttons currently pressed, set to 1
- *
- * @param e The pointer to the Evas Canvas
- * @return A bitmask of the currently depressed buttons on the cavas
- * @ingroup Evas_Pointer_Group
- *
- * Calling this function will return a 32-bit integer with the
- * appropriate bits set to 1 that correspond to a mouse button being
- * depressed. This limits Evas to a mouse devices with a maximum of 32
- * buttons, but that is generally in excess of any host system's
- * pointing device abilities.
- *
- * A canvas by default begins with no mouse buttons being pressed and
- * only calls to evas_event_feed_mouse_down(),
- * evas_event_feed_mouse_down_data(), evas_event_feed_mouse_up() and
- * evas_event_feed_mouse_up_data() will alter that.
- *
- * The least significant bit corresponds to the first mouse button
- * (button 1) and the most significant bit corresponds to the last
- * mouse button (button 32).
- *
- * If @p e is not a valid canvas, the return value is undefined.
- *
- * Example:
- * @code
- * extern Evas *evas;
- * int button_mask, i;
- *
- * button_mask = evas_pointer_button_down_mask_get(evas);
- * printf("Buttons currently pressed:\n");
- * for (i = 0; i < 32; i++)
- *   {
- *     if ((button_mask & (1 << i)) != 0) printf("Button %i\n", i + 1);
- *   }
- * @endcode
- */
 EAPI int
 evas_pointer_button_down_mask_get(const Evas *e)
 {
@@ -1013,34 +562,6 @@ evas_pointer_button_down_mask_get(const Evas *e)
    return (int)e->pointer.button;
 }
 
-/**
- * Returns whether the mouse pointer is logically inside the canvas
- *
- * @param e The pointer to the Evas Canvas
- * @return An integer that is 1 if the mouse is inside the canvas, 0 otherwise
- * @ingroup Evas_Pointer_Group
- *
- * When this function is called it will return a value of either 0 or
- * 1, depending on if evas_event_feed_mouse_in(),
- * evas_event_feed_mouse_in_data(), or evas_event_feed_mouse_out(),
- * evas_event_feed_mouse_out_data() have been called to feed in a
- * mouse enter event into the canvas.
- *
- * A return value of 1 indicates the mouse is logically inside the
- * canvas, and 0 implies it is logically outside the canvas.
- *
- * A canvas begins with the mouse being assumed outside (0).
- *
- * If @p e is not a valid canvas, the return value is undefined.
- *
- * Example:
- * @code
- * extern Evas *evas;
- *
- * if (evas_pointer_inside_get(evas)) printf("Mouse is in!\n");
- * else printf("Mouse is out!\n");
- * @endcode
- */
 EAPI Eina_Bool
 evas_pointer_inside_get(const Evas *e)
 {
@@ -1050,13 +571,6 @@ evas_pointer_inside_get(const Evas *e)
    return (int)e->pointer.inside;
 }
 
-/**
- * Attaches a specific pointer to the evas for fetching later
- *
- * @param e The canvas to attach the pointer to
- * @param data The pointer to attach
- * @ingroup Evas_Canvas
- */
 EAPI void
 evas_data_attach_set(Evas *e, void *data)
 {
@@ -1066,13 +580,6 @@ evas_data_attach_set(Evas *e, void *data)
    e->attach_data = data;
 }
 
-/**
- * Returns the pointer attached by evas_data_attach_set()
- *
- * @param e The canvas to attach the pointer to
- * @return The pointer attached
- * @ingroup Evas_Canvas
- */
 EAPI void *
 evas_data_attach_get(const Evas *e)
 {
@@ -1082,12 +589,6 @@ evas_data_attach_get(const Evas *e)
    return e->attach_data;
 }
 
-/**
- * Inform to the evas that it got the focus.
- *
- * @param e The evas to change information.
- * @ingroup Evas_Canvas
- */
 EAPI void
 evas_focus_in(Evas *e)
 {
@@ -1099,12 +600,6 @@ evas_focus_in(Evas *e)
    evas_event_callback_call(e, EVAS_CALLBACK_CANVAS_FOCUS_IN, NULL);
 }
 
-/**
- * Inform to the evas that it lost the focus.
- *
- * @param e The evas to change information.
- * @ingroup Evas_Canvas
- */
 EAPI void
 evas_focus_out(Evas *e)
 {
@@ -1116,12 +611,6 @@ evas_focus_out(Evas *e)
    evas_event_callback_call(e, EVAS_CALLBACK_CANVAS_FOCUS_OUT, NULL);
 }
 
-/**
- * Get the focus state known by the given evas
- *
- * @param e The evas to query information.
- * @ingroup Evas_Canvas
- */
 EAPI Eina_Bool
 evas_focus_state_get(const Evas *e)
 {
@@ -1131,30 +620,12 @@ evas_focus_state_get(const Evas *e)
    return e->focus;
 }
 
-/**
- * Push the nochange flag up 1
- *
- * This tells evas, that while the nochange flag is greater than 0, do not
- * mark objects as "changed" when making changes.
- * 
- * @param e The evas to change information.
- * @ingroup Evas_Canvas
- */
 EAPI void
 evas_nochange_push(Evas *e)
 {
    e->nochange++;
 }
 
-/**
- * Pop the nochange flag down 1
- *
- * This tells evas, that while the nochange flag is greater than 0, do not
- * mark objects as "changed" when making changes.
- * 
- * @param e The evas to change information.
- * @ingroup Evas_Canvas
- */
 EAPI void
 evas_nochange_pop(Evas *e)
 {
@@ -1174,13 +645,6 @@ _evas_unwalk(Evas *e)
    if ((e->walking_list == 0) && (e->delete_me)) evas_free(e);
 }
 
-/**
- * Converts the given error code into a string describing it in english.
- * @param error the error code.
- * @return Always return a valid string. If given @p error is not
- *         supported "Unknown error" is returned.
- * @ingroup Evas_Utils
- */
 EAPI const char *
 evas_load_error_str(Evas_Load_Error error)
 {
@@ -1205,99 +669,30 @@ evas_load_error_str(Evas_Load_Error error)
      }
 }
 
-/**
- * Convert a given color from HSV to RGB format.
- *
- * @param h The Hue component of the color.
- * @param s The Saturation component of the color.
- * @param v The Value component of the color.
- * @param r The Red component of the color.
- * @param g The Green component of the color.
- * @param b The Blue component of the color.
- *
- * This function converts a given color in HSV color format to RGB
- * color format.
- *
- * @ingroup Evas_Utils
- **/
 EAPI void
 evas_color_hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b)
 {
    evas_common_convert_color_hsv_to_rgb(h, s, v, r, g, b);
 }
 
-/**
- * Convert a given color from RGB to HSV format.
- *
- * @param r The Red component of the color.
- * @param g The Green component of the color.
- * @param b The Blue component of the color.
- * @param h The Hue component of the color.
- * @param s The Saturation component of the color.
- * @param v The Value component of the color.
- *
- * This function converts a given color in RGB color format to HSV
- * color format.
- *
- * @ingroup Evas_Utils
- **/
 EAPI void
 evas_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v)
 {
    evas_common_convert_color_rgb_to_hsv(r, g, b, h, s, v);
 }
 
-/**
- * Pre-multiplies a rgb triplet by an alpha factor.
- *
- * @param a The alpha factor.
- * @param r The Red component of the color.
- * @param g The Green component of the color.
- * @param b The Blue component of the color.
- *
- * This function pre-multiplies a given rbg triplet by an alpha
- * factor. Alpha factor is used to define transparency.
- *
- * @ingroup Evas_Utils
- **/
 EAPI void
 evas_color_argb_premul(int a, int *r, int *g, int *b)
 {
    evas_common_convert_color_argb_premul(a, r, g, b);
 }
 
-/**
- * Undo pre-multiplication of a rgb triplet by an alpha factor.
- *
- * @param a The alpha factor.
- * @param r The Red component of the color.
- * @param g The Green component of the color.
- * @param b The Blue component of the color.
- *
- * This function undoes pre-multiplication a given rbg triplet by an
- * alpha factor. Alpha factor is used to define transparency.
- *
- * @see evas_color_argb_premul().
- *
- * @ingroup Evas_Utils
- **/
 EAPI void
 evas_color_argb_unpremul(int a, int *r, int *g, int *b)
 {
    evas_common_convert_color_argb_unpremul(a, r, g, b);
 }
 
-/**
- * Pre-multiplies data by an alpha factor.
- *
- * @param data The data value.
- * @param len  The length value.
- *
- * This function pre-multiplies a given data by an alpha
- * factor. Alpha factor is used to define transparency.
- *
- * @ingroup Evas_Utils
- **/
 EAPI void
 evas_data_argb_premul(unsigned int *data, unsigned int len)
 {
@@ -1305,17 +700,6 @@ evas_data_argb_premul(unsigned int *data, unsigned int len)
    evas_common_convert_argb_premul(data, len);
 }
 
-/**
- * Undo pre-multiplication data by an alpha factor.
- *
- * @param data The data value.
- * @param len  The length value.
- *
- * This function undoes pre-multiplication of a given data by an alpha
- * factor. Alpha factor is used to define transparency.
- *
- * @ingroup Evas_Utils
- **/
 EAPI void
 evas_data_argb_unpremul(unsigned int *data, unsigned int len)
 {
index f383e8f..735e5d1 100644 (file)
@@ -11,22 +11,22 @@ _evas_map_calc_geom_change(Evas_Object *obj)
    evas_object_clip_dirty(obj);
    if (obj->layer->evas->events_frozen <= 0)
      {
-       evas_object_recalc_clippees(obj);
-       if (!pass)
-         {
-            if (!obj->smart.smart)
-              {
-                 is = evas_object_is_in_output_rect(obj,
-                                                    obj->layer->evas->pointer.x,
-                                                    obj->layer->evas->pointer.y, 1, 1);
-                 if ((is ^ was) && obj->cur.visible)
-                   evas_event_feed_mouse_move(obj->layer->evas,
-                                              obj->layer->evas->pointer.x,
-                                              obj->layer->evas->pointer.y,
-                                              obj->layer->evas->last_timestamp,
-                                              NULL);
-              }
-         }
+        evas_object_recalc_clippees(obj);
+        if (!pass)
+          {
+             if (!obj->smart.smart)
+               {
+                  is = evas_object_is_in_output_rect(obj,
+                                                     obj->layer->evas->pointer.x,
+                                                     obj->layer->evas->pointer.y, 1, 1);
+                  if ((is ^ was) && obj->cur.visible)
+                    evas_event_feed_mouse_move(obj->layer->evas,
+                                               obj->layer->evas->pointer.x,
+                                               obj->layer->evas->pointer.y,
+                                               obj->layer->evas->last_timestamp,
+                                               NULL);
+               }
+          }
      }
    evas_object_inform_call_move(obj);
    evas_object_inform_call_resize(obj);
@@ -37,7 +37,7 @@ _evas_map_calc_map_geometry(Evas_Object *obj)
 {
    Evas_Coord x1, x2, y1, y2;
    const Evas_Map_Point *p, *p_end;
-   Eina_Bool ch = EINA_FALSE; 
+   Eina_Bool ch = EINA_FALSE;
 
    if (!obj->cur.map) return;
    /*
@@ -47,11 +47,11 @@ _evas_map_calc_map_geometry(Evas_Object *obj)
         if (obj->prev.map->count == obj->cur.map->count)
           {
              const Evas_Map_Point *p2;
-             
+
              p = obj->cur.map->points;
              p_end = p + obj->cur.map->count;
              p2 = obj->prev.map->points;
-             
+
              for (; p < p_end; p++, p2++)
                {
                   if ((p->a != p2->a) ||
@@ -62,11 +62,20 @@ _evas_map_calc_map_geometry(Evas_Object *obj)
                        ch = 1;
                        break;
                     }
+                  if ((p->x != p2->x) ||
+                      (p->y != p2->y) ||
+                      (p->z != p2->z))
+                    {
+                       ch = 1;
+                       break;
+                    }
                }
           }
         else
            ch = 1;
      }
+   else
+      ch = 1;
    */
 
    p = obj->cur.map->points;
@@ -83,7 +92,6 @@ _evas_map_calc_map_geometry(Evas_Object *obj)
         if (p->y < y1) y1 = p->y;
         if (p->y > y2) y2 = p->y;
      }
-   ch = 0;
    if (obj->cur.map->normal_geometry.x != x1) ch = 1;
    if (obj->cur.map->normal_geometry.y != y1) ch = 1;
    if (obj->cur.map->normal_geometry.w != (x2 - x1)) ch = 1;
@@ -128,8 +136,8 @@ _evas_map_copy(Evas_Map *dst, const Evas_Map *src)
 {
    if (dst->count != src->count)
      {
-       ERR("cannot copy map of different sizes: dst=%i, src=%i", dst->count, src->count);
-       return EINA_FALSE;
+        ERR("cannot copy map of different sizes: dst=%i, src=%i", dst->count, src->count);
+        return EINA_FALSE;
      }
    memcpy(dst->points, src->points, src->count * sizeof(Evas_Map_Point));
    dst->smooth = src->smooth;
@@ -308,20 +316,6 @@ evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y)
 }
 
 
-/**
- * Enable or disable the map that is set.
- * 
- * This enables the map that is set or disables it. On enable, the object
- * geometry will be saved, and the new geometry will change (position and
- * size) to reflect the map geometry set. If none is set yet, this may be
- * an undefined geometry, unless you have already set the map with
- * evas_object_map_set(). It is suggested you first set a map with
- * evas_object_map_set() with valid useful coordinates then enable and
- * disable the map with evas_object_map_enable_set() as needed.
- * 
- * @param obj object to enable the map on
- * @param enabled enabled state
- */
 EAPI void
 evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled)
 {
@@ -352,16 +346,6 @@ evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled)
    evas_object_change(obj);
 }
 
-/**
- * Get the map enabled state
- * 
- * This returns the currently enabled state of the map on the object indicated.
- * The default map enable state is off. You can enable and disable it with
- * evas_object_map_enable_set().
- * 
- * @param obj object to get the map enabled state from
- * @return the map enabled state
- */
 EAPI Eina_Bool
 evas_object_map_enable_get(const Evas_Object *obj)
 {
@@ -372,17 +356,6 @@ evas_object_map_enable_get(const Evas_Object *obj)
 }
 
 
-/**
- * Set the map source object
- * 
- * This sets the object from which the map is taken - can be any object that
- * has map enabled on it.
- * 
- * Currently not implemented. for future use.
- * 
- * @param obj object to set the map source of
- * @param src the source object from which the map is taken
- */
 EAPI void
 evas_object_map_source_set(Evas_Object *obj, Evas_Object *src)
 {
@@ -392,14 +365,6 @@ evas_object_map_source_set(Evas_Object *obj, Evas_Object *src)
    (void)src; /* method still needs to be implemented. */
 }
 
-/**
- * Get the map source object
- * 
- * See evas_object_map_source_set()
- * 
- * @param obj object to set the map source of
- * @return the object set as the source
- */
 EAPI Evas_Object *
 evas_object_map_source_get(const Evas_Object *obj)
 {
@@ -409,45 +374,6 @@ evas_object_map_source_get(const Evas_Object *obj)
    return NULL;
 }
 
-/**
- * Set current object transformation map.
- * 
- * This sets the map on a given object. It is copied from the @p map pointer,
- * so there is no need to keep the @p map object if you don't need it anymore.
- * 
- * A map is a set of 4 points which have canvas x, y coordinates per point,
- * with an optional z point value as a hint for perspective correction, if it
- * is available. As well each point has u and v coordinates. These are like
- * "texture coordinates" in OpenGL in that they define a point in the source
- * image that is mapped to that map vertex/point. The u corresponds to the x
- * coordinate of this mapped point and v, the y coordinate. Note that these
- * coordinates describe a bounding region to sample. If you have a 200x100
- * source image and want to display it at 200x100 with proper pixel
- * precision, then do:
- * 
- * @code
- * Evas_Map *m = evas_map_new(4);
- * evas_map_point_coord_set(m, 0,   0,   0, 0);
- * evas_map_point_coord_set(m, 1, 200,   0, 0);
- * evas_map_point_coord_set(m, 2, 200, 100, 0);
- * evas_map_point_coord_set(m, 3,   0, 100, 0);
- * evas_map_point_image_uv_set(m, 0,   0,   0);
- * evas_map_point_image_uv_set(m, 1, 200,   0);
- * evas_map_point_image_uv_set(m, 2, 200, 100);
- * evas_map_point_image_uv_set(m, 3,   0, 100);
- * evas_object_map_set(obj, m);
- * evas_map_free(m);
- * @endcode
- * 
- * Note that the map points a uv coordinates match the image geometry. If
- * the @p map parameter is NULL, the stored map will be freed and geometry
- * prior to enabling/setting a map will be restored.
- *
- * @param obj object to change transformation map
- * @param map new map to use
- *
- * @see evas_map_new()
- */
 EAPI void
 evas_object_map_set(Evas_Object *obj, const Evas_Map *map)
 {
@@ -468,7 +394,7 @@ evas_object_map_set(Evas_Object *obj, const Evas_Map *map)
              obj->prev.geometry = obj->cur.map->normal_geometry;
              if (!obj->prev.map)
                {
-                 _evas_map_free(obj, obj->cur.map);
+                  _evas_map_free(obj, obj->cur.map);
                   obj->cur.map = NULL;
                   evas_object_mapped_clip_across_mark(obj);
                   return;
@@ -494,7 +420,7 @@ evas_object_map_set(Evas_Object *obj, const Evas_Map *map)
      }
    else
      {
-       if (obj->cur.map) evas_map_free(obj->cur.map);
+        if (obj->cur.map) evas_map_free(obj->cur.map);
         obj->cur.map = _evas_map_dup(map);
         if (obj->cur.usemap)
            evas_object_mapped_clip_across_mark(obj);
@@ -502,28 +428,6 @@ evas_object_map_set(Evas_Object *obj, const Evas_Map *map)
    _evas_map_calc_map_geometry(obj);
 }
 
-/**
- * Get current object transformation map.
- * 
- * This returns the current internal map set on the indicated object. It is
- * intended for read-only acces and is only valid as long as the object is
- * not deleted or the map on the object is not changed. If you wish to modify
- * the map and set it back do the following:
- * 
- * @code
- * const Evas_Map *m = evas_object_map_get(obj);
- * Evas_Map *m2 = evas_map_dup(m);
- * evas_map_util_rotate(m2, 30.0, 0, 0);
- * evas_object_map_set(obj);
- * evas_map_free(m2);
- * @endcode
- *
- * @param obj object to query transformation map.
- * @return map reference to map in use. This is an internal data structure, so
- * do not modify it.
- *
- * @see evas_object_map_set()
- */
 EAPI const Evas_Map *
 evas_object_map_get(const Evas_Object *obj)
 {
@@ -534,46 +438,17 @@ evas_object_map_get(const Evas_Object *obj)
    return NULL;
 }
 
-/**
- * Create map of transformation points to be later used with an evas object.
- *
- * This creates a set of points (currently only 4 is supported. no other
- * number for @p count will work). That is empty and ready to be modified
- * with evas_map calls.
- * 
- * @param count number of points in the map. *
- * @return a newly allocated map or NULL on errors.
- *
- * @see evas_map_free()
- * @see evas_map_dup()
- * @see evas_map_point_coord_set()
- * @see evas_map_point_image_uv_set()
- * @see evas_map_util_points_populate_from_object_full()
- * @see evas_map_util_points_populate_from_object()
- *
- * @see evas_object_map_set()
- */
 EAPI Evas_Map *
 evas_map_new(int count)
 {
-   if (count < 4)
+   if (count != 4)
      {
-       ERR("num (%i) < 4 is unsupported!", count);
-       return NULL;
+        ERR("map point count (%i) != 4 is unsupported!", count);
+        return NULL;
      }
    return _evas_map_new(count);
 }
 
-/**
- * Set the smoothing for map rendering
- * 
- * This sets smoothing for map rendering. If the object is a type that has
- * its own smoothing settings, then both the smooth settings for this object
- * and the map must be turned off. By default smooth maps are enabled.
- * 
- * @param m map to modify. Must not be NULL.
- * @param enabled enable or disable smooth map rendering
- */
 EAPI void
 evas_map_smooth_set(Evas_Map *m, Eina_Bool enabled)
 {
@@ -581,13 +456,6 @@ evas_map_smooth_set(Evas_Map *m, Eina_Bool enabled)
    m->smooth = enabled;
 }
 
-/**
- * get the smoothing for map rendering
- * 
- * This gets smoothing for map rendering.
- * 
- * @param m map to get the smooth from. Must not be NULL.
- */
 EAPI Eina_Bool
 evas_map_smooth_get(const Evas_Map *m)
 {
@@ -595,17 +463,6 @@ evas_map_smooth_get(const Evas_Map *m)
    return m->smooth;
 }
 
-/**
- * Set the alpha flag for map rendering
- * 
- * This sets alpha flag for map rendering. If the object is a type that has
- * its own alpha settings, then this will take precedence. Only image objects
- * have this currently. Fits stops alpha blending of the map area, and is
- * useful if you know the object and/or all sub-objects is 100% solid.
- * 
- * @param m map to modify. Must not be NULL.
- * @param enabled enable or disable alpha map rendering
- */
 EAPI void
 evas_map_alpha_set(Evas_Map *m, Eina_Bool enabled)
 {
@@ -613,13 +470,6 @@ evas_map_alpha_set(Evas_Map *m, Eina_Bool enabled)
    m->alpha = enabled;
 }
 
-/**
- * get the alpha flag for map rendering
- * 
- * This gets the alph flag for map rendering.
- * 
- * @param m map to get the alpha from. Must not be NULL.
- */
 EAPI Eina_Bool
 evas_map_alpha_get(const Evas_Map *m)
 {
@@ -627,14 +477,6 @@ evas_map_alpha_get(const Evas_Map *m)
    return m->alpha;
 }
 
-/**
- * Copy a previously allocated map.
- * 
- * This makes a duplicate of the @p m object and returns it.
- *
- * @param m map to copy. Must not be NULL.
- * @return newly allocated map with the same count and contents as @p m.
- */
 EAPI Evas_Map *
 evas_map_dup(const Evas_Map *m)
 {
@@ -642,14 +484,6 @@ evas_map_dup(const Evas_Map *m)
    return _evas_map_dup(m);
 }
 
-/**
- * Free a previously allocated map.
- *
- * This frees a givem map @p m and all memory associated with it. You must NOT
- * free a map returned by evas_object_map_get() as this is internal.
- * 
- * @param m map to free.
- */
 EAPI void
 evas_map_free(Evas_Map *m)
 {
@@ -657,14 +491,6 @@ evas_map_free(Evas_Map *m)
    _evas_map_free(NULL, m);
 }
 
-/**
- * Get a maps size.
- *
- * Returns the number of points in a map.  Should be at least 4.
- *
- * @param m map to get size.
- * @return -1 on error, points otherwise.
- */
 EAPI int
 evas_map_count_get(const Evas_Map *m)
 {
@@ -672,35 +498,6 @@ evas_map_count_get(const Evas_Map *m)
    return m->count;
 }
 
-/**
- * Change the map point's coordinate.
- * 
- * This sets the fixen point's coordinate in the map. Note that points
- * describe the outline of a quadrangle and are ordered either clockwise
- * or anit-clock-wise. It is suggested to keep your quadrangles concave and
- * non-complex, though these polygon modes may work, they may not render
- * a desired set of output. The quadrangle will use points 0 and 1 , 1 and 2,
- * 2 and 3, and 3 and 0 to describe the edges of the quandrangle.
- * 
- * The X and Y and Z coordinates are in canvas units. Z is optional and may
- * or may not be honored in drawing. Z is a hint and does not affect the
- * X and Y rendered coordinates. It may be used for calculating fills with
- * perspective correct rendering.
- * 
- * Remember all coordinates are canvas global ones like with move and reize
- * in evas.
- *
- * @param m map to change point. Must not be @c NULL.
- * @param idx index of point to change. Must be smaller than map size.
- * @param x Point X Coordinate
- * @param y Point Y Coordinate
- * @param z Point Z Coordinate hint (pre-perspective transform)
- *
- * @see evas_map_util_rotate()
- * @see evas_map_util_zoom()
- * @see evas_map_util_points_populate_from_object_full()
- * @see evas_map_util_points_populate_from_object()
- */
 EAPI void
 evas_map_point_coord_set(Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z)
 {
@@ -713,22 +510,11 @@ evas_map_point_coord_set(Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_
    p->z = z;
 }
 
-/**
- * Get the map point's coordinate.
- * 
- * This returns the coordinates of the given point in the map.
- *
- * @param m map to query point.
- * @param idx index of point to query. Must be smaller than map size.
- * @param x where to return the X coordinate.
- * @param y where to return the Y coordinate.
- * @param z where to return the Z coordinate.
- */
 EAPI void
 evas_map_point_coord_get(const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z)
 {
    const Evas_Map_Point *p;
-   
+
    if (!m) goto error;
    if (idx >= m->count) goto error;
    p = m->points + idx;
@@ -743,25 +529,6 @@ evas_map_point_coord_get(const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *
    if (z) *z = 0;
 }
 
-/**
- * Change the map point's U and V texture source point
- *
- * This sets the U and V coordinates for the point. This determines which
- * coordinate in the source image is mapped to the given point, much like
- * OpenGL and textures. Notes that these points do select the pixel, but
- * are double floating point values to allow for accuracy and sub-pixel
- * selection.
- * 
- * @param m map to change the point of.
- * @param idx index of point to change. Must be smaller than map size.
- * @param u the X coordinate within the image/texture source
- * @param v the Y coordinate within the image/texture source
- * 
- * @see evas_map_point_coord_set()
- * @see evas_object_map_set()
- * @see evas_map_util_points_populate_from_object_full()
- * @see evas_map_util_points_populate_from_object()
- */
 EAPI void
 evas_map_point_image_uv_set(Evas_Map *m, int idx, double u, double v)
 {
@@ -773,16 +540,6 @@ evas_map_point_image_uv_set(Evas_Map *m, int idx, double u, double v)
    p->v = v;
 }
 
-/**
- * Get the map point's U and V texture source points
- *
- * This returns the texture points set by evas_map_point_image_uv_set().
- * 
- * @param m map to query point.
- * @param idx index of point to query. Must be smaller than map size.
- * @param u where to write the X coordinate within the image/texture source
- * @param v where to write the Y coordinate within the image/texture source
- */
 EAPI void
 evas_map_point_image_uv_get(const Evas_Map *m, int idx, double *u, double *v)
 {
@@ -799,26 +556,6 @@ evas_map_point_image_uv_get(const Evas_Map *m, int idx, double *u, double *v)
    if (v) *v = 0.0;
 }
 
-/**
- * Set the color of a vertex in the map
- *
- * This sets the color of the vertex in the map. Colors will be linearly
- * interpolated between vertex points through the map. Color will multiply
- * the "texture" pixels (like GL_MODULATE in OpenGL). The default color of
- * a vertex in a map is white solid (255, 255, 255, 255) which means it will
- * have no affect on modifying the texture pixels.
- * 
- * @param m map to change the color of.
- * @param idx index of point to change. Must be smaller than map size.
- * @param r red (0 - 255)
- * @param g green (0 - 255)
- * @param b blue (0 - 255)
- * @param a alpha (0 - 255)
- *
- * @see evas_map_util_points_color_set()
- * @see evas_map_point_coord_set()
- * @see evas_object_map_set()
- */
 EAPI void
 evas_map_point_color_set(Evas_Map *m, int idx, int r, int g, int b, int a)
 {
@@ -832,22 +569,6 @@ evas_map_point_color_set(Evas_Map *m, int idx, int r, int g, int b, int a)
    p->a = a;
 }
 
-/**
- * Get the color set on a vertex in the map
- *
- * This gets the color set by evas_map_point_color_set() on the given vertex
- * of the map.
- * 
- * @param m map to get the color of the vertex from.
- * @param idx index of point get. Must be smaller than map size.
- * @param r pointer to red return
- * @param g pointer to green return
- * @param b pointer to blue return
- * @param a pointer to alpha return (0 - 255)
- * 
- * @see evas_map_point_coord_set()
- * @see evas_object_map_set()
- */
 EAPI void
 evas_map_point_color_get(const Evas_Map *m, int idx, int *r, int *g, int *b, int *a)
 {
@@ -869,7 +590,7 @@ _evas_map_util_points_populate(Evas_Map *m, const Evas_Coord x, const Evas_Coord
 {
    Evas_Map_Point *p = m->points;
    int i;
-   
+
    p[0].x = x;
    p[0].y = y;
    p[0].z = z;
@@ -893,7 +614,7 @@ _evas_map_util_points_populate(Evas_Map *m, const Evas_Coord x, const Evas_Coord
    p[3].z = z;
    p[3].u = 0.0;
    p[3].v = h;
-   
+
    for (i = 0; i < 4; i++)
      {
         p[i].px = p[i].x;
@@ -901,24 +622,6 @@ _evas_map_util_points_populate(Evas_Map *m, const Evas_Coord x, const Evas_Coord
      }
 }
 
-/**
- * Populate source and destination map points to match exactly object.
- *
- * Usually one initialize map of an object to match it's original
- * position and size, then transform these with evas_map_util_*
- * functions, such as evas_map_util_rotate() or
- * evas_map_util_3d_rotate(). The original set is done by this
- * function, avoiding code duplication all around.
- *
- * @param m map to change all 4 points (must be of size 4).
- * @param obj object to use unmapped geometry to populate map coordinates.
- * @param z Point Z Coordinate hint (pre-perspective transform). This value
- *        will be used for all four points.
- *
- * @see evas_map_util_points_populate_from_object()
- * @see evas_map_point_coord_set()
- * @see evas_map_point_image_uv_set()
- */
 EAPI void
 evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *obj, Evas_Coord z)
 {
@@ -927,37 +630,18 @@ evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *o
    MAGIC_CHECK_END();
    if (!m)
      {
-       ERR("map == NULL");
-       return;
+        ERR("map == NULL");
+        return;
      }
    if (m->count != 4)
      {
-       ERR("map has count=%d where 4 was expected.", m->count);
-       return;
+        ERR("map has count=%d where 4 was expected.", m->count);
+        return;
      }
    _evas_map_util_points_populate(m, obj->cur.geometry.x, obj->cur.geometry.y,
-                                 obj->cur.geometry.w, obj->cur.geometry.h, z);
+                                  obj->cur.geometry.w, obj->cur.geometry.h, z);
 }
 
-/**
- * Populate source and destination map points to match exactly object.
- *
- * Usually one initialize map of an object to match it's original
- * position and size, then transform these with evas_map_util_*
- * functions, such as evas_map_util_rotate() or
- * evas_map_util_3d_rotate(). The original set is done by this
- * function, avoiding code duplication all around.
- *
- * Z Point coordinate is assumed as 0 (zero).
- *
- * @param m map to change all 4 points (must be of size 4).
- * @param obj object to use unmapped geometry to populate map coordinates.
- *
- * @see evas_map_util_points_populate_from_object_full()
- * @see evas_map_util_points_populate_from_geometry()
- * @see evas_map_point_coord_set()
- * @see evas_map_point_image_uv_set()
- */
 EAPI void
 evas_map_util_points_populate_from_object(Evas_Map *m, const Evas_Object *obj)
 {
@@ -966,106 +650,54 @@ evas_map_util_points_populate_from_object(Evas_Map *m, const Evas_Object *obj)
    MAGIC_CHECK_END();
    if (!m)
      {
-       ERR("map == NULL");
-       return;
+        ERR("map == NULL");
+        return;
      }
    if (m->count != 4)
      {
-       ERR("map has count=%d where 4 was expected.", m->count);
-       return;
+        ERR("map has count=%d where 4 was expected.", m->count);
+        return;
      }
    _evas_map_util_points_populate(m, obj->cur.geometry.x, obj->cur.geometry.y,
-                                 obj->cur.geometry.w, obj->cur.geometry.h, 0);
+                                  obj->cur.geometry.w, obj->cur.geometry.h, 0);
 }
 
-/**
- * Populate source and destination map points to match given geometry.
- *
- * Similar to evas_map_util_points_populate_from_object_full(), this
- * call takes raw values instead of querying object's unmapped
- * geometry. The given width will be used to calculate destination
- * points (evas_map_point_coord_set()) and set the image uv
- * (evas_map_point_image_uv_set()).
- *
- * @param m map to change all 4 points (must be of size 4).
- * @param x Point X Coordinate
- * @param y Point Y Coordinate
- * @param w width to use to calculate second and third points.
- * @param h height to use to calculate third and fourth points.
- * @param z Point Z Coordinate hint (pre-perspective transform). This value
- *        will be used for all four points.
- *
- * @see evas_map_util_points_populate_from_object()
- * @see evas_map_point_coord_set()
- * @see evas_map_point_image_uv_set()
- */
 EAPI void
 evas_map_util_points_populate_from_geometry(Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Coord z)
 {
    if (!m)
      {
-       ERR("map == NULL");
-       return;
+        ERR("map == NULL");
+        return;
      }
    if (m->count != 4)
      {
-       ERR("map has count=%d where 4 was expected.", m->count);
-       return;
+        ERR("map has count=%d where 4 was expected.", m->count);
+        return;
      }
    _evas_map_util_points_populate(m, x, y, w, h, z);
 }
 
-/**
- * Set color of all points to given color.
- *
- * This call is useful to reuse maps after they had 3d lightning or
- * any other colorization applied before.
- *
- * @param m map to change the color of.
- * @param r red (0 - 255)
- * @param g green (0 - 255)
- * @param b blue (0 - 255)
- * @param a alpha (0 - 255)
- *
- * @see evas_map_point_color_set()
- */
 EAPI void
 evas_map_util_points_color_set(Evas_Map *m, int r, int g, int b, int a)
 {
    Evas_Map_Point *p, *p_end;
    if (!m)
      {
-       ERR("map == NULL");
-       return;
+        ERR("map == NULL");
+        return;
      }
    p = m->points;
    p_end = p + m->count;
    for (; p < p_end; p++)
      {
-       p->r = r;
-       p->g = g;
-       p->b = b;
-       p->a = a;
+        p->r = r;
+        p->g = g;
+        p->b = b;
+        p->a = a;
      }
 }
 
-/**
- * Change the map to apply the given rotation.
- * 
- * This rotates the indicated map's coordinates around the center coordinate
- * given by @p cx and @p cy as the rotation center. The points will have their
- * X and Y coordinates rotated clockwise by @p degrees degress (360.0 is a
- * full rotation). Negative values for degrees will rotate counter-clockwise
- * by that amount. All coordinates are canvas global coordinates.
- *
- * @param m map to change.
- * @param degrees amount of degrees from 0.0 to 360.0 to rotate.
- * @param cx rotation's center horizontal position.
- * @param cy rotation's center vertical position.
- *
- * @see evas_map_point_coord_set()
- * @see evas_map_util_zoom()
- */
 EAPI void
 evas_map_util_rotate(Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy)
 {
@@ -1093,24 +725,6 @@ evas_map_util_rotate(Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy)
      }
 }
 
-/**
- * Change the map to apply the given zooming.
- *
- * Like evas_map_util_rotate(), this zooms the points of the map from a center
- * point. That center is defined by @p cx and @p cy. The @p zoomx and @p zoomy
- * parameters specific how much to zoom in the X and Y direction respectively.
- * A value of 1.0 means "don't zoom". 2.0 means "dobule the size". 0.5 is
- * "half the size" etc. All coordinates are canvas global coordinates.
- * 
- * @param m map to change.
- * @param zoomx horizontal zoom to use.
- * @param zoomy vertical zoom to use.
- * @param cx zooming center horizontal position.
- * @param cy zooming center vertical position.
- *
- * @see evas_map_point_coord_set()
- * @see evas_map_util_rotate()
- */
 EAPI void
 evas_map_util_zoom(Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy)
 {
@@ -1135,26 +749,8 @@ evas_map_util_zoom(Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_
      }
 }
 
-/**
- * Rotate the map around 3 axes in 3D
- * 
- * This will rotate not just around the "Z" axis as in evas_map_util_rotate()
- * (which is a convenience call for those only wanting 2D). This will rotate
- * around the X, Y and Z axes. The Z axis points "into" the screen with low
- * values at the screen and higher values further away. The X axis runs from
- * left to right on the screen and the Y axis from top to bottom. Like with
- * evas_map_util_rotate(0 you provide a center point to rotate around (in 3D).
- *
- * @param m map to change.
- * @param dx amount of degrees from 0.0 to 360.0 to rotate arount X axis.
- * @param dy amount of degrees from 0.0 to 360.0 to rotate arount Y axis.
- * @param dz amount of degrees from 0.0 to 360.0 to rotate arount Z axis.
- * @param cx rotation's center horizontal position.
- * @param cy rotation's center vertical position.
- * @param cz rotation's center vertical position.
- */
 EAPI void
-evas_map_util_3d_rotate(Evas_Map *m, double dx, double dy, double dz, 
+evas_map_util_3d_rotate(Evas_Map *m, double dx, double dy, double dz,
                         Evas_Coord cx, Evas_Coord cy, Evas_Coord cz)
 {
    double rz = (dz * M_PI) / 180.0;
@@ -1173,7 +769,7 @@ evas_map_util_3d_rotate(Evas_Map *m, double dx, double dy, double dz,
         x = p->x - cx;
         y = p->y - cy;
         z = p->z - cz;
-        
+
         if (rz != 0.0)
           {
              xx = x * cos(rz);
@@ -1189,7 +785,7 @@ evas_map_util_3d_rotate(Evas_Map *m, double dx, double dy, double dz,
              x = xx + (z * cos(ry + M_PI_2));
              z = zz + (z * sin(ry + M_PI_2));
           }
-        
+
         if (rx != 0.0)
           {
              zz = z * cos(rx);
@@ -1197,54 +793,31 @@ evas_map_util_3d_rotate(Evas_Map *m, double dx, double dy, double dz,
              z = zz + (y * cos(rx + M_PI_2));
              y = yy + (y * sin(rx + M_PI_2));
           }
-        
+
         p->px = p->x = x + cx;
         p->py = p->y = y + cy;
         p->z = z + cz;
      }
 }
 
-/**
- * Perform lighting calculations on the given Map
- * 
- * This is used to apply lighting calculations (from a single light source)
- * to a given map. The R, G and B values of each vertex will be modified to
- * reflect the lighting based on the lixth point coordinates, the light
- * color and the ambient color, and at what angle the map is facing the
- * light source. A surface should have its points be declared in a
- * clockwise fashion if the face is "facing" towards you (as opposed to
- * away from you) as faces have a "logical" side for lighting.
- *
- * @param m map to change.
- * @param lx X coordinate in space of light point
- * @param ly Y coordinate in space of light point
- * @param lz Z coordinate in space of light point
- * @param lr light red value (0 - 255)
- * @param lg light green value (0 - 255)
- * @param lb light blue value (0 - 255)
- * @param ar ambient color red value (0 - 255)
- * @param ag ambient color green value (0 - 255)
- * @param ab ambient color blue value (0 - 255)
- */
 EAPI void
-evas_map_util_3d_lighting(Evas_Map *m, 
+evas_map_util_3d_lighting(Evas_Map *m,
                           Evas_Coord lx, Evas_Coord ly, Evas_Coord lz,
                           int lr, int lg, int lb, int ar, int ag, int ab)
 {
    int i;
-   
+
    if (!m) return;
-   
+
    for (i = 0; i < m->count; i++)
      {
         double x, y, z;
         double nx, ny, nz, x1, y1, z1, x2, y2, z2, ln, br;
         int h, j, mr, mg, mb;
-        
+
         x = m->points[i].x;
         y = m->points[i].y;
         z = m->points[i].z;
-
         // calc normal
         h = (i - 1 + 4) % 4 + (i & ~0x3); // prev point
         j = (i + 1)     % 4 + (i & ~0x3); // next point
@@ -1252,17 +825,17 @@ evas_map_util_3d_lighting(Evas_Map *m,
         x1 = m->points[h].x - x;
         y1 = m->points[h].y - y;
         z1 = m->points[h].z - z;
-        
+
         x2 = m->points[j].x - x;
         y2 = m->points[j].y - y;
         z2 = m->points[j].z - z;
         nx = (y1 * z2) - (z1 * y2);
         ny = (z1 * x2) - (x1 * z2);
         nz = (x1 * y2) - (y1 * x2);
-        
+
         ln = (nx * nx) + (ny * ny) + (nz * nz);
         ln = sqrt(ln);
-        
+
         if (ln != 0.0)
           {
              nx /= ln;
@@ -1274,57 +847,36 @@ evas_map_util_3d_lighting(Evas_Map *m,
         x = lx - x;
         y = ly - y;
         z = lz - z;
-        
+
         ln = (x * x) + (y * y) + (z * z);
         ln = sqrt(ln);
-        
+
         if (ln != 0.0)
           {
              x /= ln;
              y /= ln;
              z /= ln;
           }
-        
+
         // brightness - tan (0.0 -> 1.0 brightness really)
         br = (nx * x) + (ny * y) + (nz * z);
         if (br < 0.0) br = 0.0;
-        
+
         mr = ar + ((lr - ar) * br);
         mg = ag + ((lg - ag) * br);
         mb = ab + ((lb - ab) * br);
-       if (m->points[i].a != 255){
-               mr = (mr * m->points[i].a) / 255;
-               mg = (mg * m->points[i].a) / 255;
-               mb = (mb * m->points[i].a) / 255;
-       }
+        if (m->points[i].a != 255)
+          {
+             mr = (mr * m->points[i].a) / 255;
+             mg = (mg * m->points[i].a) / 255;
+             mb = (mb * m->points[i].a) / 255;
+          }
         m->points[i].r = (m->points[i].r * mr) / 255;
         m->points[i].g = (m->points[i].g * mg) / 255;
         m->points[i].b = (m->points[i].b * mb) / 255;
      }
 }
 
-/**
- * Apply a perspective transform to the map
-* 
- * This applies a given perspective (3D) to the map coordinates. X, Y and Z
- * values are used. The px and py points specify the "infinite distance" point
- * in the 3D conversion (where all lines converge to like when artists draw
- * 3D by hand). The @p z0 value specifis the z value at which there is a 1:1
- * mapping between spatial coorinates and screen coordinates. Any points
- * on this z value will not have their X and Y values modified in the transform.
- * Those further away (Z value higher) will shrink into the distance, and
- * those less than this value will expand and become bigger. The @p foc value
- * determines the "focal length" of the camera. This is in reality the distance
- * between the camera lens plane itself (at or closer than this rendering
- * results are undefined) and the "z0" z value. This allows for some "depth"
- * control and @p foc must be greater than 0.
- *
- * @param m map to change.
- * @param px The pespective distance X coordinate
- * @param py The pespective distance Y coordinate
- * @param z0 The "0" z plane value
- * @param foc The focal distance
- */
 EAPI void
 evas_map_util_3d_perspective(Evas_Map *m,
                              Evas_Coord px, Evas_Coord py,
@@ -1348,47 +900,36 @@ evas_map_util_3d_perspective(Evas_Map *m,
           {
              x = p->x - px;
              y = p->y - py;
-             
+
              zz = ((p->z - z0) + foc);
-             
+
              if (zz > 0)
                {
                   x = (x * foc) / zz;
                   y = (y * foc) / zz;
                }
-             
+
              p->x = px + x;
              p->y = py + y;
           }
      }
 }
 
-/**
- * Get the clockwise state of a map
- * 
- * This determines if the output points (X and Y. Z is not used) are
- * clockwise or anti-clockwise. This can be used for "back-face culling". This
- * is where you hide objects that "face away" from you. In this case objects
- * that are not clockwise.
- *
- * @param m map to query.
- * @return 1 if clockwise, 0 otherwise
- */
 EAPI Eina_Bool
 evas_map_util_clockwise_get(Evas_Map *m)
 {
    int i, j, k, count;
    long long c;
-   
+
    if (!m) return 0;
    if (m->count < 3) return 0;
-   
+
    count = 0;
    for (i = 0; i < m->count; i++)
      {
-        j = (i + 1) % m->count; 
+        j = (i + 1) % m->count;
         k = (i + 2) % m->count;
-        c = 
+        c =
           ((m->points[j].x - m->points[i].x) *
            (m->points[k].y - m->points[j].y))
           -
@@ -1400,7 +941,3 @@ evas_map_util_clockwise_get(Evas_Map *m)
    if (count > 0) return 1;
    return 0;
 }
-
-/**
- * @}
- */
index f5e204b..ad3b71f 100644 (file)
@@ -1,16 +1,6 @@
 #include "evas_common.h"
 #include "evas_private.h"
 
-/**
- * @addtogroup Evas_Object_Group_Basic
- * @{
- */
-
-/**
- * Sets the name of the given evas object to the given name.
- * @param   obj  The given object.
- * @param   name The given name.
- */
 EAPI void
 evas_object_name_set(Evas_Object *obj, const char *name)
 {
@@ -30,12 +20,6 @@ evas_object_name_set(Evas_Object *obj, const char *name)
      }
 }
 
-/**
- * Retrieves the name of the given evas object.
- * @param   obj The given object.
- * @return  The name of the object.  @c NULL if no name has been given
- *          to the object.
- */
 EAPI const char *
 evas_object_name_get(const Evas_Object *obj)
 {
@@ -45,18 +29,6 @@ evas_object_name_get(const Evas_Object *obj)
    return obj->name;
 }
 
-/**
- * @}
- */
-
-/**
- * Retrieves the object on the given evas with the given name.
- * @param   e    The given evas.
- * @param   name The given name.
- * @return  If successful, the evas object with the given name.  Otherwise,
- *          @c NULL.
- * @ingroup Evas_Object_Group_Find
- */
 EAPI Evas_Object *
 evas_object_name_find(const Evas *e, const char *name)
 {
index 8503cf4..ab2f222 100644 (file)
@@ -23,11 +23,6 @@ struct _Evas_Object_Box_Accessor
    const Evas_Object *box;
 };
 
-/**
- * @addtogroup Evas_Object_Box
- * @{
- */
-
 #define _evas_object_box_type "Evas_Object_Box"
 #define SIG_CHILD_ADDED "child,added"
 #define SIG_CHILD_REMOVED "child,removed"
@@ -96,11 +91,11 @@ _evas_object_box_iterator_free(Evas_Object_Box_Iterator *it)
 }
 
 static Eina_Bool
-_evas_object_box_accessor_get_at(Evas_Object_Box_Accessor *it, unsigned int index, void **data)
+_evas_object_box_accessor_get_at(Evas_Object_Box_Accessor *it, unsigned int idx, void **data)
 {
    Evas_Object_Box_Option *opt = NULL;
 
-   if (!eina_accessor_data_get(it->real_accessor, index, (void *)&opt))
+   if (!eina_accessor_data_get(it->real_accessor, idx, (void *)&opt))
      return EINA_FALSE;
    if (data) *data = opt->obj;
    return EINA_TRUE;
@@ -548,25 +543,12 @@ _evas_object_box_smart_set_user(Evas_Object_Box_Api *api)
    api->option_free = _evas_object_box_option_free_default;
 }
 
-/**
- * Create a new box.
- *
- * Its layout function must be set via evas_object_box_layout_set()
- * (defaults to evas_object_box_layout_horizontal()).  The other
- * properties of the box must be set/retrieved via
- * evas_object_box_{h,v}_{align,padding}_{get,set)().
- */
 EAPI Evas_Object *
 evas_object_box_add(Evas *evas)
 {
    return evas_object_smart_add(evas, _evas_object_box_smart_class_new());
 }
 
-/**
- * Create a box that is child of a given element @a parent.
- *
- * @see evas_object_box_add()
- */
 EAPI Evas_Object *
 evas_object_box_add_to(Evas_Object *parent)
 {
@@ -579,10 +561,6 @@ evas_object_box_add_to(Evas_Object *parent)
    return o;
 }
 
-/**
- * Set the default box @a api struct (Evas_Object_Box_Api)
- * with the default values. May be used to extend that API.
- */
 EAPI void
 evas_object_box_smart_set(Evas_Object_Box_Api *api)
 {
@@ -591,9 +569,6 @@ evas_object_box_smart_set(Evas_Object_Box_Api *api)
    _evas_object_box_smart_set(api);
 }
 
-/**
- * Get Box Smart Class for inheritance purposes
- */
 EAPI const Evas_Object_Box_Api *
 evas_object_box_smart_class_get(void)
 {
@@ -610,11 +585,6 @@ evas_object_box_smart_class_get(void)
    return class;
 }
 
-/**
- * Set a 'calculate' callback (@a cb) to the @a o box's smart class,
- * which here defines its genre (horizontal, vertical, homogeneous,
- * etc.).
- */
 EAPI void
 evas_object_box_layout_set(Evas_Object *o, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data))
 {
@@ -774,55 +744,6 @@ _evas_object_box_layout_horizontal_weight_apply(Evas_Object_Box_Data *priv, Evas
    return remaining - rem_diff;
 }
 
-/**
- * Layout function which sets the box @a o to a (basic) horizontal
- * box.  @a priv must be the smart data of the box.
- *
- * The object's overall behavior is controlled by its properties,
- * which are set by the evas_object_box_{h,v}_{align,padding}_set()
- * family of functions.  The properties of the elements in the box --
- * set by evas_object_size_hint_{align,padding,weight}_set() functions
- * -- also control the way this function works.
- *
- * \par box's properties:
- * @c align_h controls the horizontal alignment of the child objects
- * relative to the containing box. When set to 0, children are aligned
- * to the left. A value of 1 lets them aligned to the right border.
- * Values in between align them proportionally.  Note that if the size
- * required by the children, which is given by their widths and the @c
- * padding_h property of the box, is bigger than the container width,
- * the children will be displayed out of its bounds.  A negative value
- * of @c align_h makes the box to *justify* its children. The padding
- * between them, in this case, is corrected so that the leftmost one
- * touches the left border and the rightmost one touches the right
- * border (even if they must overlap).  The @c align_v and @c
- * padding_v properties of the box don't contribute to its behaviour
- * when this layout is chosen.
- *
- * \par Child element's properties:
- * @c align_x does not influence the box's behavior.  @c padding_l and
- * @c padding_r sum up to the container's horizontal padding between
- * elements.  The child's @c padding_t, @c padding_b and @c align_y
- * properties apply for padding/positioning relative to the overall
- * height of the box. Finally, there is the @c weight_x property,
- * which, if set to a non-zero value, tells the container that the
- * child width is not pre-defined.  If the container can't accommodate
- * all its children, it sets the widths of the children *with weights*
- * to sizes as small as they can all fit into it.  If the size
- * required by the children is less than the available, the box
- * increases its children's (which have weights) widths as to fit the
- * remaining space.  The @c weight_x property, besides telling the
- * element is resizable, gives a *weight* for the resizing process.
- * The parent box will try to distribute (or take off) widths
- * accordingly to the *normalized* list of weigths: most weighted
- * children remain/get larger in this process than the the least ones.
- * @c weight_y does not influence the layout.
- *
- * If one desires that, besides having weights, child elements must be
- * resized bounded to a minimum or maximum size, their size hint
- * properties must be set (by the
- * evas_object_size_hint_{min,max}_set() functions.
- */
 EAPI void
 evas_object_box_layout_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
 {
@@ -981,14 +902,6 @@ _evas_object_box_layout_vertical_weight_apply(Evas_Object_Box_Data *priv, Evas_O
    return remaining - rem_diff;
 }
 
-/**
- * Layout function which sets the box @a o to a (basic) vertical box.
- * @a priv must be the smart data of the box.
- *
- * This function behaves analogously to
- * evas_object_box_layout_horizontal().  The description of its
- * behaviour can be derived from that function's documentation.
- */
 EAPI void
 evas_object_box_layout_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
 {
@@ -1094,39 +1007,6 @@ evas_object_box_layout_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void
    evas_object_size_hint_min_set(o, top_w, req_h);
 }
 
-/**
- * Layout function which sets the box @a o to a *homogeneous*
- * horizontal box.  @a priv must be the smart data of the box.
- *
- * In a homogeneous horizontal box, its width is divided equally
- * between the contained objects.  The box's overall behavior is
- * controlled by its properties, which are set by the
- * evas_object_box_{h,v}_{align,padding}_set() family of functions.
- * The properties of the elements in the box -- set by
- * evas_object_size_hint_{align,padding,weight}_set() functions --
- * also control the way this function works.
- *
- * \par box's properties:
- * @c align_h has no influence on the box for this layout.  @c
- * padding_h tells the box to draw empty spaces of that size, in
- * pixels, between the (still equal) child objects's cells.  The @c
- * align_v and @c padding_v properties of the box don't contribute to
- * its behaviour when this layout is chosen.
- *
- * \par Child element's properties:
- * @c padding_l and @c padding_r sum up to the required width of the
- * child element.  The @c align_x property tells the relative position
- * of this overall child width in its allocated cell (0 to extreme
- * left, 1 to extreme right).  A value of -1.0 to @c align_x makes the
- * box try to resize this child element to the exact width of its cell
- * (respecting the min and max hints on the child's width *and*
- * accounting its horizontal padding properties).  The child's @c
- * padding_t, @c padding_b and @c align_y properties apply for
- * padding/positioning relative to the overall height of the box. A
- * value of -1.0 to @c align_y makes the box try to resize this child
- * element to the exact height of its parent (respecting the max hint
- * on the child's height).
- */
 EAPI void
 evas_object_box_layout_homogeneous_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
 {
@@ -1188,14 +1068,6 @@ evas_object_box_layout_homogeneous_horizontal(Evas_Object *o, Evas_Object_Box_Da
    evas_object_size_hint_min_set(o, w, h);
 }
 
-/**
- * Layout function which sets the box @a o to a *homogeneous* vertical
- * box.  @a priv must be the smart data of the box.
- *
- * This function behaves analogously to
- * evas_object_box_layout_homogeneous_horizontal().  The description
- * of its behaviour can be derived from that function's documentation.
- */
 EAPI void
 evas_object_box_layout_homogeneous_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
 {
@@ -1256,47 +1128,6 @@ evas_object_box_layout_homogeneous_vertical(Evas_Object *o, Evas_Object_Box_Data
    evas_object_size_hint_min_set(o, w, h);
 }
 
-/**
- * Layout function which sets the box @a o to a *max size-homogeneous*
- * horizontal box.  @a priv must be the smart data of the box.
- *
- * In a max size-homogeneous horizontal box, the equal sized cells
- * reserved for the child objects have the width of the space required
- * by the largest child (in width). The box's overall behavior is
- * controlled by its properties, which are set by the
- * evas_object_box_{h,v}_{align,padding}_set() family of functions.
- * The properties of the elements in the box -- set by
- * evas_object_size_hint_{align,padding,weight}_set() functions --
- * also control the way this function works.
- *
- * \par box's properties:
- * @c padding_h tells the box to draw empty spaces of that size, in
- * pixels, between the child objects's cells.  @c align_h controls the
- * horizontal alignment of the child objects relative to the
- * containing box. When set to 0, children are aligned to the left. A
- * value of 1 lets them aligned to the right border.  Values in
- * between align them proportionally. A negative value of @c align_h
- * makes the box to *justify* its children cells. The padding between
- * them, in this case, is corrected so that the leftmost one touches
- * the left border and the rightmost one touches the right border
- * (even if they must overlap).  The @c align_v and @c padding_v
- * properties of the box don't contribute to its behaviour when this
- * layout is chosen.
- *
- * \par Child element's properties:
- * @c padding_l and @c padding_r sum up to the required width of the
- * child element. The @c align_x property tells the relative position
- * of this overall child width in its allocated cell (0 to extreme
- * left, 1 to extreme right).  A value of -1.0 to @c align_x makes the
- * box try to resize this child element to the exact width of its cell
- * (respecting the min and max hints on the child's width *and*
- * accounting its horizontal padding properties).  The child's @c
- * padding_t, @c padding_b and @c align_y properties apply for
- * padding/positioning relative to the overall height of the box. A
- * value of -1.0 to @c align_y makes the box try to resize this child
- * element to the exact height of its parent (respecting the max hint
- * on the child's height).
- */
 EAPI void
 evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
 {
@@ -1381,15 +1212,6 @@ evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Object *o, Evas_Obje
    evas_object_size_hint_min_set(o, x, top_h);
 }
 
-/**
- * Layout function which sets the box @a o to a *max size-homogeneous*
- * vertical box.  @a priv must be the smart data of the box.
- *
- * This function behaves analogously to
- * evas_object_box_layout_homogeneous_max_size_horizontal().  The
- * description of its behaviour can be derived from that function's
- * documentation.
- */
 EAPI void
 evas_object_box_layout_homogeneous_max_size_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
 {
@@ -1538,41 +1360,6 @@ _evas_object_box_layout_flow_horizontal_row_info_collect(Evas_Object_Box_Data *p
    *max_h_ret = max_h;
 }
 
-/**
- * Layout function which sets the box @a o to a *flow* horizontal box.
- * @a priv must be the smart data of the box.
- *
- * In a flow horizontal box, the box's child elements are placed in
- * rows (think of text as an analogy). A row has as much elements as
- * can fit into the box's width.  The box's overall behavior is
- * controlled by its properties, which are set by the
- * evas_object_box_{h,v}_{align,padding}_set() family of functions.
- * The properties of the elements in the box -- set by
- * evas_object_size_hint_{align,padding,weight}_set() functions --
- * also control the way this function works.
- *
- * \par box's properties:
- * @c padding_h tells the box to draw empty spaces of that size, in
- * pixels, between the child objects's cells.  @c align_h dictates the
- * horizontal alignment of the rows (0 to left align them, 1 to right
- * align).  A value of -1.0 to @c align_h lets the rows *justified*
- * horizontally.  @c align_v controls the vertical alignment of the
- * entire set of rows (0 to top, 1 to bottom).  A value of -1.0 to @c
- * align_v makes the box to *justify* the rows vertically. The padding
- * between them, in this case, is corrected so that the first row
- * touches the top border and the last one touches the bottom border
- * (even if they must overlap). @c padding_v has no influence on the
- * layout.
- *
- * \par Child element's properties:
- * @c padding_l and @c padding_r sum up to the required width of the
- * child element.  The @c align_x property has no influence on the
- * layout. The child's @c padding_t and @c padding_b sum up to the
- * required height of the child element and is the only means (besides
- * row justifying) of setting space between rows.  Note, however, that
- * @c align_y dictates positioning relative to the *largest height*
- * required by a child object in the actual row.
- */
 EAPI void
 evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
 {
@@ -1586,7 +1373,7 @@ evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *pri
    int *row_max_h;
    int *row_break;
    int *row_width;
-   int off_y;
+   int offset_y;
 
    n_children = eina_list_count(priv->children);
    if (!n_children)
@@ -1608,11 +1395,11 @@ evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *pri
    evas_object_geometry_get(o, &x, &y, &w, &h);
 
    _evas_object_box_layout_flow_horizontal_row_info_collect
-     (priv, w, &row_count, row_max_h, row_break, row_width, &off_y, &max_h);
+     (priv, w, &row_count, row_max_h, row_break, row_width, &offset_y, &max_h);
 
    inc_y = 0;
    v_justify = 0;
-   remain_y = h - (off_y + max_h);
+   remain_y = h - (offset_y + max_h);
 
    if (remain_y > 0)
      {
@@ -1754,14 +1541,6 @@ _evas_object_box_layout_flow_vertical_col_info_collect(Evas_Object_Box_Data *pri
    *max_w_ret = max_w;
 }
 
-/**
- * Layout function which sets the box @a o to a *flow* vertical box.
- * @a priv must be the smart data of the box.
- *
- * This function behaves analogously to
- * evas_object_box_layout_flow_horizontal().  The description of its
- * behaviour can be derived from that function's documentation.
- */
 EAPI void
 evas_object_box_layout_flow_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
 {
@@ -1775,7 +1554,7 @@ evas_object_box_layout_flow_vertical(Evas_Object *o, Evas_Object_Box_Data *priv,
    int *col_max_w;
    int *col_break;
    int *col_height;
-   int off_x;
+   int offset_x;
 
    n_children = eina_list_count(priv->children);
    if (!n_children)
@@ -1797,10 +1576,10 @@ evas_object_box_layout_flow_vertical(Evas_Object *o, Evas_Object_Box_Data *priv,
    evas_object_geometry_get(o, &x, &y, &w, &h);
 
    _evas_object_box_layout_flow_vertical_col_info_collect
-     (priv, h, &col_count, col_max_w, col_break, col_height, &off_x, &max_w);
+     (priv, h, &col_count, col_max_w, col_break, col_height, &offset_x, &max_w);
 
    inc_x = 0;
-   remain_x = w - (off_x + max_w);
+   remain_x = w - (offset_x + max_w);
 
    if (remain_x > 0)
      {
@@ -1877,27 +1656,6 @@ evas_object_box_layout_flow_vertical(Evas_Object *o, Evas_Object_Box_Data *priv,
    evas_object_size_hint_min_set(o, min_w, min_h);
 }
 
-/**
- * Layout function which sets the box @a o to set all children to the
- * size of the object.  @a priv must be the smart data of the box.
- *
- * In a stack box, all children will be given the same size and they
- * will be stacked on above the other, so the first object will be the
- * bottom most.
- *
- * \par box's properties:
- * No box option is used.
- *
- * \par Child  element's   properties:
- * @c padding_l and @c padding_r sum up to the required width of the
- * child element.  The @c align_x property tells the relative position
- * of this overall child width in its allocated cell (0 to extreme
- * left, 1 to extreme right).  A value of -1.0 to @c align_x makes the
- * box try to resize this child element to the exact width of its cell
- * (respecting the min and max hints on the child's width *and*
- * accounting its horizontal padding properties).  Same applies to
- * vertical axis.
- */
 EAPI void
 evas_object_box_layout_stack(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
 {
@@ -1946,9 +1704,6 @@ evas_object_box_layout_stack(Evas_Object *o, Evas_Object_Box_Data *priv, void *d
    evas_object_size_hint_min_set(o, top_w, top_h);
 }
 
-/**
- * Set the alignment of the whole bounding box of contents.
- */
 EAPI void
 evas_object_box_align_set(Evas_Object *o, double horizontal, double vertical)
 {
@@ -1960,9 +1715,6 @@ evas_object_box_align_set(Evas_Object *o, double horizontal, double vertical)
    evas_object_smart_changed(o);
 }
 
-/**
- * Get alignment of the whole bounding box of contents.
- */
 EAPI void
 evas_object_box_align_get(const Evas_Object *o, double *horizontal, double *vertical)
 {
@@ -1979,9 +1731,6 @@ evas_object_box_align_get(const Evas_Object *o, double *horizontal, double *vert
      }
 }
 
-/**
- * Set the space (padding) between cells.
- */
 EAPI void
 evas_object_box_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical)
 {
@@ -1993,9 +1742,6 @@ evas_object_box_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord ve
    evas_object_smart_changed(o);
 }
 
-/**
- * Get the (space) padding between cells.
- */
 EAPI void
 evas_object_box_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical)
 {
@@ -2012,10 +1758,6 @@ evas_object_box_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas_C
      }
 }
 
-/**
- * Append a new object @a child to the box @a o. On error, @c NULL is
- * returned.
- */
 EAPI Evas_Object_Box_Option *
 evas_object_box_append(Evas_Object *o, Evas_Object *child)
 {
@@ -2042,10 +1784,6 @@ evas_object_box_append(Evas_Object *o, Evas_Object *child)
    return NULL;
 }
 
-/**
- * Prepend a new object @a child to the box @a o. On error, @c NULL is
- * returned.
- */
 EAPI Evas_Object_Box_Option *
 evas_object_box_prepend(Evas_Object *o, Evas_Object *child)
 {
@@ -2072,11 +1810,6 @@ evas_object_box_prepend(Evas_Object *o, Evas_Object *child)
    return NULL;
 }
 
-/**
- * Prepend a new object @a child to the box @c o relative to element @a
- * reference. If @a reference is not contained in the box or any other
- * error occurs, @c NULL is returned.
- */
 EAPI Evas_Object_Box_Option *
 evas_object_box_insert_before(Evas_Object *o, Evas_Object *child, const Evas_Object *reference)
 {
@@ -2103,11 +1836,6 @@ evas_object_box_insert_before(Evas_Object *o, Evas_Object *child, const Evas_Obj
    return NULL;
 }
 
-/**
- * Append a new object @a child to the box @c o relative to element @a
- * reference. If @a reference is not contained in the box or any other
- * error occurs, @c NULL is returend.
- */
 EAPI Evas_Object_Box_Option *
 evas_object_box_insert_after(Evas_Object *o, Evas_Object *child, const Evas_Object *reference)
 {
@@ -2134,10 +1862,6 @@ evas_object_box_insert_after(Evas_Object *o, Evas_Object *child, const Evas_Obje
    return NULL;
 }
 
-/**
- * Insert a new object @a child to the box @a o at position @a pos. On
- * error, @c NULL is returned.
- */
 EAPI Evas_Object_Box_Option *
 evas_object_box_insert_at(Evas_Object *o, Evas_Object *child, unsigned int pos)
 {
@@ -2164,10 +1888,6 @@ evas_object_box_insert_at(Evas_Object *o, Evas_Object *child, unsigned int pos)
    return NULL;
 }
 
-/**
- * Remove an object @a child from the box @a o. On error, @c 0 is
- * returned.
- */
 EAPI Eina_Bool
 evas_object_box_remove(Evas_Object *o, Evas_Object *child)
 {
@@ -2194,10 +1914,6 @@ evas_object_box_remove(Evas_Object *o, Evas_Object *child)
    return EINA_FALSE;
 }
 
-/**
- * Remove an object from the box @a o which occupies position @a
- * pos. On error, @c 0 is returned.
- */
 EAPI Eina_Bool
 evas_object_box_remove_at(Evas_Object *o, unsigned int pos)
 {
@@ -2221,10 +1937,6 @@ evas_object_box_remove_at(Evas_Object *o, unsigned int pos)
    return EINA_FALSE;
 }
 
-/**
- * Remove all child objects.
- * @return 0 on errors
- */
 EAPI Eina_Bool
 evas_object_box_remove_all(Evas_Object *o, Eina_Bool clear)
 {
@@ -2256,11 +1968,6 @@ evas_object_box_remove_all(Evas_Object *o, Eina_Bool clear)
    return EINA_TRUE;
 }
 
-/**
- * Get an iterator to walk the list of children for the box.
- *
- * @note Do not remove or delete objects while walking the list.
- */
 EAPI Eina_Iterator *
 evas_object_box_iterator_new(const Evas_Object *o)
 {
@@ -2285,11 +1992,6 @@ evas_object_box_iterator_new(const Evas_Object *o)
    return &it->iterator;
 }
 
-/**
- * Get an accessor to get random access to the list of children for the box.
- *
- * @note Do not remove or delete objects while walking the list.
- */
 EAPI Eina_Accessor *
 evas_object_box_accessor_new(const Evas_Object *o)
 {
@@ -2314,14 +2016,6 @@ evas_object_box_accessor_new(const Evas_Object *o)
    return &it->accessor;
 }
 
-/**
- * Get the list of children for the box.
- *
- * @note This is a duplicate of the list kept by the box internally.
- *       It's up to the user to destroy it when it no longer needs it.
- *       It's possible to remove objects from the box when walking this
- *       list, but these removals won't be reflected on it.
- */
 EAPI Eina_List *
 evas_object_box_children_get(const Evas_Object *o)
 {
@@ -2336,10 +2030,6 @@ evas_object_box_children_get(const Evas_Object *o)
    return new_list;
 }
 
-/**
- * Get the name of the property of the child elements of the box @a o
- * whose id is @a property. On error, @c NULL is returned.
- */
 EAPI const char *
 evas_object_box_option_property_name_get(Evas_Object *o, int property)
 {
@@ -2357,10 +2047,6 @@ evas_object_box_option_property_name_get(Evas_Object *o, int property)
    return api->property_name_get(o, property);
 }
 
-/**
- * Get the id of the property of the child elements of the box @a o
- * whose name is @a name. On error, @c -1 is returned.
- */
 EAPI int
 evas_object_box_option_property_id_get(Evas_Object *o, const char *name)
 {
@@ -2378,12 +2064,6 @@ evas_object_box_option_property_id_get(Evas_Object *o, const char *name)
    return api->property_id_get(o, name);
 }
 
-/**
- * Set the property (with id @a property) of the child element of the
- * box @a o whose property struct is @a opt. The property's values
- * must be the last arguments and their type *must* match that of the
- * property itself. On error, @c 0 is returned.
- */
 EAPI Eina_Bool
 evas_object_box_option_property_set(Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...)
 {
@@ -2397,13 +2077,6 @@ evas_object_box_option_property_set(Evas_Object *o, Evas_Object_Box_Option *opt,
    return ret;
 }
 
-/**
- * Set the property (with id @a property) of the child element of the
- * box @a o whose property struct is @a opt. The property's values
- * must be the args which the va_list @a args is initialized with and
- * their type *must* match that of the property itself. On error, @c 0
- * is returned.
- */
 
 EAPI Eina_Bool
 evas_object_box_option_property_vset(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args)
@@ -2425,12 +2098,6 @@ evas_object_box_option_property_vset(Evas_Object *o, Evas_Object_Box_Option *opt
    return EINA_TRUE;
 }
 
-/**
- * Get the property (with id @a property) of the child element of the
- * box @a o whose property struct is @a opt. The last arguments must
- * be addresses of variables with the same type of that property. On
- * error, @c 0 is returned.
- */
 EAPI Eina_Bool
 evas_object_box_option_property_get(Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...)
 {
@@ -2444,12 +2111,6 @@ evas_object_box_option_property_get(Evas_Object *o, Evas_Object_Box_Option *opt,
    return ret;
 }
 
-/**
- * Get the property (with id @a property) of the child element of the
- * box @a o whose property struct is @a opt. The args which the
- * va_list @a args is initialized with must be addresses of variables
- * with the same type of that property. On error, @c 0 is returned.
- */
 EAPI Eina_Bool
 evas_object_box_option_property_vget(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args)
 {
@@ -2465,7 +2126,3 @@ evas_object_box_option_property_vget(Evas_Object *o, Evas_Object_Box_Option *opt
 
    return api->property_get(o, opt, property, args);
 }
-
-/**
- * @}
- */
diff --git a/src/lib/canvas/evas_object_grid.c b/src/lib/canvas/evas_object_grid.c
new file mode 100644 (file)
index 0000000..71fa73c
--- /dev/null
@@ -0,0 +1,467 @@
+#include <errno.h>
+#include "evas_common.h"
+
+typedef struct _Evas_Object_Grid_Data       Evas_Object_Grid_Data;
+typedef struct _Evas_Object_Grid_Option     Evas_Object_Grid_Option;
+typedef struct _Evas_Object_Grid_Iterator   Evas_Object_Grid_Iterator;
+typedef struct _Evas_Object_Grid_Accessor   Evas_Object_Grid_Accessor;
+
+struct _Evas_Object_Grid_Option
+{
+   Evas_Object *obj;
+   Eina_List *l;
+   int x, y, w, h;
+};
+
+struct _Evas_Object_Grid_Data
+{
+   Evas_Object_Smart_Clipped_Data base;
+   Eina_List *children;
+   struct {
+      int w, h;
+   } size;
+   Eina_Bool is_mirrored : 1;
+};
+
+struct _Evas_Object_Grid_Iterator
+{
+   Eina_Iterator iterator;
+
+   Eina_Iterator *real_iterator;
+   const Evas_Object *grid;
+};
+
+struct _Evas_Object_Grid_Accessor
+{
+   Eina_Accessor accessor;
+
+   Eina_Accessor *real_accessor;
+   const Evas_Object *grid;
+};
+
+#define EVAS_OBJECT_GRID_DATA_GET(o, ptr)                      \
+  Evas_Object_Grid_Data *ptr = evas_object_smart_data_get(o)
+
+#define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, ptr)                    \
+  EVAS_OBJECT_GRID_DATA_GET(o, ptr);                                   \
+  if (!ptr)                                                            \
+    {                                                                  \
+      CRIT("no widget data for object %p (%s)",                                \
+          o, evas_object_type_get(o));                                 \
+       abort();                                                                \
+       return;                                                         \
+    }
+
+#define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, ptr, val)           \
+  EVAS_OBJECT_GRID_DATA_GET(o, ptr);                                   \
+  if (!ptr)                                                            \
+    {                                                                  \
+       CRIT("No widget data for object %p (%s)",                       \
+              o, evas_object_type_get(o));                             \
+       abort();                                                                \
+       return val;                                                     \
+    }
+
+static const char EVAS_OBJECT_GRID_OPTION_KEY[] = "Evas_Object_Grid_Option";
+
+static Eina_Bool
+_evas_object_grid_iterator_next(Evas_Object_Grid_Iterator *it, void **data)
+{
+   Evas_Object_Grid_Option *opt;
+
+   if (!eina_iterator_next(it->real_iterator, (void **)&opt))
+     return EINA_FALSE;
+   if (data) *data = opt->obj;
+   return EINA_TRUE;
+}
+
+static Evas_Object *
+_evas_object_grid_iterator_get_container(Evas_Object_Grid_Iterator *it)
+{
+   return (Evas_Object *)it->grid;
+}
+
+static void
+_evas_object_grid_iterator_free(Evas_Object_Grid_Iterator *it)
+{
+   eina_iterator_free(it->real_iterator);
+   free(it);
+}
+
+static Eina_Bool
+_evas_object_grid_accessor_get_at(Evas_Object_Grid_Accessor *it, unsigned int idx, void **data)
+{
+   Evas_Object_Grid_Option *opt = NULL;
+
+   if (!eina_accessor_data_get(it->real_accessor, idx, (void **)&opt))
+     return EINA_FALSE;
+   if (data) *data = opt->obj;
+   return EINA_TRUE;
+}
+
+static Evas_Object *
+_evas_object_grid_accessor_get_container(Evas_Object_Grid_Accessor *it)
+{
+   return (Evas_Object *)it->grid;
+}
+
+static void
+_evas_object_grid_accessor_free(Evas_Object_Grid_Accessor *it)
+{
+   eina_accessor_free(it->real_accessor);
+   free(it);
+}
+
+static Evas_Object_Grid_Option *
+_evas_object_grid_option_get(Evas_Object *o)
+{
+   return evas_object_data_get(o, EVAS_OBJECT_GRID_OPTION_KEY);
+}
+
+static void
+_evas_object_grid_option_set(Evas_Object *o, const Evas_Object_Grid_Option *opt)
+{
+   evas_object_data_set(o, EVAS_OBJECT_GRID_OPTION_KEY, opt);
+}
+
+static Evas_Object_Grid_Option *
+_evas_object_grid_option_del(Evas_Object *o)
+{
+   return evas_object_data_del(o, EVAS_OBJECT_GRID_OPTION_KEY);
+}
+
+static void
+_on_child_del(void *data, Evas *evas __UNUSED__, Evas_Object *child, void *einfo __UNUSED__)
+{
+   Evas_Object *grid = data;
+   evas_object_grid_unpack(grid, child);
+}
+
+static void
+_evas_object_grid_child_connect(Evas_Object *o, Evas_Object *child)
+{
+   evas_object_event_callback_add
+     (child, EVAS_CALLBACK_DEL, _on_child_del, o);
+}
+
+static void
+_evas_object_grid_child_disconnect(Evas_Object *o, Evas_Object *child)
+{
+   evas_object_event_callback_del_full
+     (child, EVAS_CALLBACK_DEL, _on_child_del, o);
+}
+
+EVAS_SMART_SUBCLASS_NEW("Evas_Object_Grid", _evas_object_grid,
+                       Evas_Smart_Class, Evas_Smart_Class,
+                       evas_object_smart_clipped_class_get, NULL)
+
+static void
+_evas_object_grid_smart_add(Evas_Object *o)
+{
+   EVAS_SMART_DATA_ALLOC(o, Evas_Object_Grid_Data)
+
+   priv->size.w = 100;
+   priv->size.h = 100;
+   
+   _evas_object_grid_parent_sc->add(o);
+}
+
+static void
+_evas_object_grid_smart_del(Evas_Object *o)
+{
+   EVAS_OBJECT_GRID_DATA_GET(o, priv);
+   Eina_List *l;
+
+   l = priv->children;
+   while (l)
+     {
+       Evas_Object_Grid_Option *opt = l->data;
+       _evas_object_grid_child_disconnect(o, opt->obj);
+       _evas_object_grid_option_del(opt->obj);
+       free(opt);
+       l = eina_list_remove_list(l, l);
+     }
+   _evas_object_grid_parent_sc->del(o);
+}
+
+static void
+_evas_object_grid_smart_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h)
+{
+   Evas_Coord ow, oh;
+   evas_object_geometry_get(o, NULL, NULL, &ow, &oh);
+   if ((ow == w) && (oh == h)) return;
+   evas_object_smart_changed(o);
+}
+
+static void
+_evas_object_grid_smart_calculate(Evas_Object *o)
+{
+   Eina_List *l;
+   Evas_Object_Grid_Option *opt;
+   Evas_Coord x, y, w, h, vw, vh, t;
+   Eina_Bool mirror;
+   
+   EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv);
+   if (!priv) return;
+   if (!priv->children) return;
+   evas_object_geometry_get(o, &x, &y, &w, &h);
+   mirror = priv->is_mirrored;
+   vw = priv->size.w;
+   vh = priv->size.h;
+   EINA_LIST_FOREACH(priv->children, l, opt)
+     {
+        Evas_Coord x1, y1, x2, y2;
+        
+        x1 = x + ((w * opt->x) / vw);
+        y1 = y + ((h * opt->y) / vh);
+        x2 = x + ((w * (opt->x + opt->w)) / vw);
+        y2 = y + ((h * (opt->y + opt->h)) / vh);
+        if (mirror)
+          {
+             t = x1; x1 = x2; x2 = t;
+             t = y1; y1 = y2; y2 = t;
+          }
+        evas_object_move(opt->obj, x1, y1);
+        evas_object_resize(opt->obj, x2 - x1, y2 - y1);
+     }
+}
+
+static void
+_evas_object_grid_smart_set_user(Evas_Smart_Class *sc)
+{
+   sc->add = _evas_object_grid_smart_add;
+   sc->del = _evas_object_grid_smart_del;
+   sc->resize = _evas_object_grid_smart_resize;
+   sc->calculate = _evas_object_grid_smart_calculate;
+}
+
+EAPI Evas_Object *
+evas_object_grid_add(Evas *evas)
+{
+   return evas_object_smart_add(evas, _evas_object_grid_smart_class_new());
+}
+
+EAPI Evas_Object *
+evas_object_grid_add_to(Evas_Object *parent)
+{
+   Evas *evas;
+   Evas_Object *o;
+
+   evas = evas_object_evas_get(parent);
+   o = evas_object_grid_add(evas);
+   evas_object_smart_member_add(o, parent);
+   return o;
+}
+
+EAPI void
+evas_object_grid_size_set(Evas_Object *o, int w, int h)
+{
+   EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv);
+   if ((priv->size.w == w) && (priv->size.h == h)) return;
+   priv->size.w = w;
+   priv->size.h = h;
+   evas_object_smart_changed(o);
+}
+
+EAPI void
+evas_object_grid_size_get(const Evas_Object *o, int *w, int *h)
+{
+   EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv);
+   if (priv)
+     {
+        if (w) *w = priv->size.w;
+        if (h) *h = priv->size.h;
+     }
+   else
+     {
+        if (w) *w = 0;
+        if (h) *h = 0;
+     }
+}
+
+EAPI Eina_Bool
+evas_object_grid_pack(Evas_Object *o, Evas_Object *child, int x, int y, int w, int h)
+{
+   Evas_Object_Grid_Option *opt;
+   Eina_Bool newobj = EINA_FALSE;
+
+   EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, 0);
+
+   opt = _evas_object_grid_option_get(child);
+   if (!opt)
+     {
+        opt = malloc(sizeof(*opt));
+        if (!opt)
+          {
+             ERR("could not allocate grid option data.");
+             return EINA_FALSE;
+          }
+        newobj = EINA_TRUE;
+     }
+
+   opt->x = x;
+   opt->y = y;
+   opt->w = w;
+   opt->h = h;
+
+   if (newobj)
+     {
+        opt->obj = child;
+        priv->children = eina_list_append(priv->children, opt);
+        opt->l = eina_list_last(priv->children);
+        _evas_object_grid_option_set(child, opt);
+        evas_object_smart_member_add(child, o);
+        _evas_object_grid_child_connect(o, child);
+     }
+   // FIXME: we could keep a changed list
+   evas_object_smart_changed(o);
+   return EINA_TRUE;
+}
+
+static void
+_evas_object_grid_remove_opt(Evas_Object_Grid_Data *priv, Evas_Object_Grid_Option *opt)
+{
+   priv->children = eina_list_remove_list(priv->children, opt->l);
+   opt->l = NULL;
+}
+
+EAPI Eina_Bool
+evas_object_grid_unpack(Evas_Object *o, Evas_Object *child)
+{
+   Evas_Object_Grid_Option *opt;
+
+   EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, 0);
+
+   if (o != evas_object_smart_parent_get(child))
+     {
+       ERR("cannot unpack child from incorrect grid!");
+       return EINA_FALSE;
+     }
+
+   opt = _evas_object_grid_option_del(child);
+   if (!opt)
+     {
+       ERR("cannot unpack child with no packing option!");
+       return EINA_FALSE;
+     }
+
+   _evas_object_grid_child_disconnect(o, child);
+   _evas_object_grid_remove_opt(priv, opt);
+   evas_object_smart_member_del(child);
+   free(opt);
+   return EINA_TRUE;
+}
+
+EAPI void
+evas_object_grid_clear(Evas_Object *o, Eina_Bool clear)
+{
+   Evas_Object_Grid_Option *opt;
+
+   EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv);
+
+   EINA_LIST_FREE(priv->children, opt)
+     {
+       _evas_object_grid_child_disconnect(o, opt->obj);
+       _evas_object_grid_option_del(opt->obj);
+       evas_object_smart_member_del(opt->obj);
+       if (clear)
+         evas_object_del(opt->obj);
+       free(opt);
+     }
+}
+
+EAPI Eina_Bool
+evas_object_grid_pack_get(Evas_Object *o, Evas_Object *child, int *x, int *y, int *w, int *h)
+{
+   Evas_Object_Grid_Option *opt;
+
+   EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, 0);
+   opt = _evas_object_grid_option_get(child);
+   if (!opt) return 0;
+   if (x) *x = opt->x;
+   if (y) *y = opt->y;
+   if (w) *w = opt->w;
+   if (h) *h = opt->h;
+   return 1;
+}
+
+EAPI Eina_Iterator *
+evas_object_grid_iterator_new(const Evas_Object *o)
+{
+   Evas_Object_Grid_Iterator *it;
+
+   EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
+
+   if (!priv->children) return NULL;
+
+   it = calloc(1, sizeof(Evas_Object_Grid_Iterator));
+   if (!it) return NULL;
+
+   EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
+
+   it->real_iterator = eina_list_iterator_new(priv->children);
+   it->grid = o;
+
+   it->iterator.next = FUNC_ITERATOR_NEXT(_evas_object_grid_iterator_next);
+   it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_grid_iterator_get_container);
+   it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_grid_iterator_free);
+
+   return &it->iterator;
+}
+
+EAPI Eina_Accessor *
+evas_object_grid_accessor_new(const Evas_Object *o)
+{
+   Evas_Object_Grid_Accessor *it;
+
+   EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
+
+   if (!priv->children) return NULL;
+
+   it = calloc(1, sizeof(Evas_Object_Grid_Accessor));
+   if (!it) return NULL;
+
+   EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR);
+
+   it->real_accessor = eina_list_accessor_new(priv->children);
+   it->grid = o;
+
+   it->accessor.get_at = FUNC_ACCESSOR_GET_AT(_evas_object_grid_accessor_get_at);
+   it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_grid_accessor_get_container);
+   it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_grid_accessor_free);
+
+   return &it->accessor;
+}
+
+EAPI Eina_List *
+evas_object_grid_children_get(const Evas_Object *o)
+{
+   Eina_List *new_list = NULL, *l;
+   Evas_Object_Grid_Option *opt;
+
+   EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
+
+   EINA_LIST_FOREACH(priv->children, l, opt)
+      new_list = eina_list_append(new_list, opt->obj);
+
+   return new_list;
+}
+
+EAPI Eina_Bool
+evas_object_grid_mirrored_get(const Evas_Object *obj)
+{
+   EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(obj, priv, EINA_FALSE);
+   return priv->is_mirrored;
+}
+
+EAPI void
+evas_object_grid_mirrored_set(Evas_Object *obj, Eina_Bool mirrored)
+{
+   EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(obj, priv);
+   mirrored = !!mirrored;
+   if (priv->is_mirrored != mirrored)
+     {
+        priv->is_mirrored = mirrored;
+        _evas_object_grid_smart_calculate(obj);
+     }
+}
index f3c1dc5..0bcb926 100644 (file)
@@ -56,6 +56,7 @@ struct _Evas_Object_Image
       struct {
          short       x, y, w, h;
       } region;
+      Eina_Bool  orientation : 1;
    } load_opts;
 
    struct {
@@ -137,20 +138,8 @@ static const Evas_Object_Func object_func =
      evas_object_image_can_map
 };
 
-
-/**
- * @addtogroup Evas_Object_Image
- * @{
- */
-
 EVAS_MEMPOOL(_mp_obj);
 
-/**
- * Creates a new image object on the given evas.
- *
- * @param e The given evas.
- * @return The created image object.
- */
 EAPI Evas_Object *
 evas_object_image_add(Evas *e)
 {
@@ -169,17 +158,6 @@ evas_object_image_add(Evas *e)
    return obj;
 }
 
-/**
- * Creates a new image object that automatically scales on the given evas.
- *
- * This is a helper around evas_object_image_add() and
- * evas_object_image_filled_set(), it will track object resizes and apply
- * evas_object_image_fill_set() with the new geometry.
- *
- * @see evas_object_image_add()
- * @see evas_object_image_filled_set()
- * @see evas_object_image_fill_set()
- */
 EAPI Evas_Object *
 evas_object_image_filled_add(Evas *e)
 {
@@ -252,29 +230,6 @@ _create_tmpf(Evas_Object *obj, void *data, int size, char *format __UNUSED__)
    munmap(dst, size);
 }
 
-/**
- * Sets the data for an image from memory to be loaded
- *
- * This is the same as evas_object_image_file_set() but the file to be loaded
- * may exist at an address in memory (the data for the file, not the filename
- * itself). The @p data at the address is copied and stored for future use, so
- * no @p data needs to be kept after this call is made. It will be managed and
- * freed for you when no longer needed. The @p size is limited to 2 gigabytes
- * in size, and must be greater than 0. A NULL @p data pointer is also invalid.
- * Set the filename to NULL to reset to empty state and have the image file
- * data freed from memory using evas_object_image_file_set().
- * 
- * The @p format is optional (pass NULL if you don't need/use it). It is used
- * to help Evas guess better which loader to use for the data. It may simply
- * be the "extension" of the file as it would normally be on disk such as
- * "jpg" or "png" or "gif" etc.
- *
- * @param obj The given image object.
- * @param data The image file data address
- * @param size The size of the image file data in bytes
- * @param format The format of the file (optional), or NULL if not needed
- * @param key The image key in file, or NULL.
- */
 EAPI void
 evas_object_image_memfile_set(Evas_Object *obj, void *data, int size, char *format, char *key)
 {
@@ -303,16 +258,6 @@ evas_object_image_memfile_set(Evas_Object *obj, void *data, int size, char *form
    evas_object_image_alpha_set(obj, !o->cur.has_alpha);
 }
 
-/**
- * Sets the filename and key of the given image object.
- *
- * If the file supports multiple data stored in it as eet, you can
- * specify the key to be used as the index of the image in this file.
- *
- * @param obj The given image object.
- * @param file The image filename.
- * @param key The image key in file, or NULL.
- */
 EAPI void
 evas_object_image_file_set(Evas_Object *obj, const char *file, const char *key)
 {
@@ -371,6 +316,7 @@ evas_object_image_file_set(Evas_Object *obj, const char *file, const char *key)
    lo.region.y = o->load_opts.region.y;
    lo.region.w = o->load_opts.region.w;
    lo.region.h = o->load_opts.region.h;
+   lo.orientation = o->load_opts.orientation;
    o->engine_data = obj->layer->evas->engine.func->image_load(obj->layer->evas->engine.data.output,
                                                              o->cur.file,
                                                              o->cur.key,
@@ -410,13 +356,6 @@ evas_object_image_file_set(Evas_Object *obj, const char *file, const char *key)
    evas_object_change(obj);
 }
 
-/**
- * Retrieves the filename and key of the given image object.
- *
- * @param obj The given image object.
- * @param file Location to store the image filename, or NULL.
- * @param key Location to store the image key, or NULL.
- */
 EAPI void
 evas_object_image_file_get(const Evas_Object *obj, const char **file, const char **key)
 {
@@ -437,22 +376,6 @@ evas_object_image_file_get(const Evas_Object *obj, const char **file, const char
    if (key) *key = o->cur.key;
 }
 
-/**
- * Set the source object on a proxy object.
- *
- * The source must be another object.  The proxy will have the same base
- * appearance of the source object.  Obviously other effects may be applied to
- * the proxy, such as a map to create a reflection of the original object.
- *
- * Any existing source object will be removed.  Setting the src to NULL clears
- * the proxy object.
- *
- * You cannot set a proxy on a proxy.
- *
- * @param obj Proxy object.
- * @param src Source of the proxy.
- * @return EINA_TRUE on success, EINA_FALSE on error.
- */
 EAPI Eina_Bool
 evas_object_image_source_set(Evas_Object *obj, Evas_Object *src)
 {
@@ -487,12 +410,6 @@ evas_object_image_source_set(Evas_Object *obj, Evas_Object *src)
 }
 
 
-/**
- * Get the current source object of an image.
- *
- * @param obj Image object
- * @return Source object, or NULL on error.
- */
 EAPI Evas_Object *
 evas_object_image_source_get(Evas_Object *obj)
 {
@@ -509,39 +426,12 @@ evas_object_image_source_get(Evas_Object *obj)
    return o->cur.source;
 }
 
-/**
- * Clear the source on a proxy image.
- *
- * This is equivalent to calling evas_object_image_source_set with a NULL
- * source.
- *
- * @param obj Image object to clear source of.
- * @return EINA_TRUE on success, EINA_FALSE on error.
- */
 EAPI Eina_Bool
 evas_object_image_source_unset(Evas_Object *obj)
 {
    return evas_object_image_source_set(obj, NULL);
 }
 
-/**
- * Sets how much of each border of the given image object is not
- * to be scaled.
- *
- * When rendering, the image may be scaled to fit the size of the
- * image object. This function sets what area around the border of the
- * image is not to be scaled. This sort of function is useful for
- * widget theming, where, for example, buttons may be of varying
- * sizes, but the border size must remain constant.
- *
- * The units used for @p l, @p r, @p t and @p b are output units.
- *
- * @param obj The given image object.
- * @param l Distance of the left border that is not to be stretched.
- * @param r Distance of the right border that is not to be stretched.
- * @param t Distance of the top border that is not to be stretched.
- * @param b Distance of the bottom border that is not to be stretched.
- */
 EAPI void
 evas_object_image_border_set(Evas_Object *obj, int l, int r, int t, int b)
 {
@@ -571,18 +461,6 @@ evas_object_image_border_set(Evas_Object *obj, int l, int r, int t, int b)
    evas_object_change(obj);
 }
 
-/**
- * Retrieves how much of each border of the given image object is not
- * to be scaled.
- *
- * See @ref evas_object_image_border_set for more details.
- *
- * @param obj The given image object.
- * @param l Location to store the left border width in, or NULL.
- * @param r Location to store the right border width in, or NULL.
- * @param t Location to store the top border width in, or NULL.
- * @param b Location to store the bottom border width in, or NULL.
- */
 EAPI void
 evas_object_image_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b)
 {
@@ -609,18 +487,6 @@ evas_object_image_border_get(const Evas_Object *obj, int *l, int *r, int *t, int
    if (b) *b = o->cur.border.b;
 }
 
-/**
- * Sets if the center part of the given image object (not the border)
- * should be drawn.
- *
- * When rendering, the image may be scaled to fit the size of the
- * image object. This function sets if the center part of the scaled
- * image is to be drawn or left completely blank, or forced to be
- * solid. Very useful for frames and decorations.
- *
- * @param obj The given image object.
- * @param fill Fill mode of the middle.
- */
 EAPI void
 evas_object_image_border_center_fill_set(Evas_Object *obj, Evas_Border_Fill_Mode fill)
 {
@@ -639,15 +505,6 @@ evas_object_image_border_center_fill_set(Evas_Object *obj, Evas_Border_Fill_Mode
    evas_object_change(obj);
 }
 
-/**
- * Retrieves if the center of the given image object is to be drawn or
- * not.
- *
- * See @ref evas_object_image_fill_set for more details.
- *
- * @param obj The given image object.
- * @return Fill mode of the  center.
- */
 EAPI Evas_Border_Fill_Mode
 evas_object_image_border_center_fill_get(const Evas_Object *obj)
 {
@@ -663,19 +520,6 @@ evas_object_image_border_center_fill_get(const Evas_Object *obj)
    return o->cur.border.fill;
 }
 
-/**
- * Sets if image fill property should track object size.
- *
- * If set to true, then every evas_object_resize() will automatically
- * trigger call to evas_object_image_fill_set() with the new size so
- * image will fill the whole object area.
- *
- * @param obj The given image object.
- * @param setting whether to follow object size.
- *
- * @see evas_object_image_filled_add()
- * @see evas_object_image_fill_set()
- */
 EAPI void
 evas_object_image_filled_set(Evas_Object *obj, Eina_Bool setting)
 {
@@ -706,13 +550,6 @@ evas_object_image_filled_set(Evas_Object *obj, Eina_Bool setting)
      }
 }
 
-/**
- * Retrieves if image fill property is tracking object size.
- *
- * @param obj The given image object.
- * @return 1 if it is tracking, 0 if not and evas_object_fill_set()
- * must be called manually.
- */
 EAPI Eina_Bool
 evas_object_image_filled_get(const Evas_Object *obj)
 {
@@ -729,12 +566,6 @@ evas_object_image_filled_get(const Evas_Object *obj)
    return o->filled;
 }
 
-/**
- * Sets a scale factor (multiplier) for the borders of an image
- *
- * @param obj The given image object.
- * @param scale The scale factor (default is 1.0 - i.e. no scale)
- */
 EAPI void
 evas_object_image_border_scale_set(Evas_Object *obj, double scale)
 {
@@ -753,14 +584,6 @@ evas_object_image_border_scale_set(Evas_Object *obj, double scale)
    evas_object_change(obj);
 }
 
-/**
- * Retrieves the border scale factor
- *
- * See evas_object_image_border_scale_set()
- * 
- * @param obj The given image object.
- * @return The scale factor
- */
 EAPI double
 evas_object_image_border_scale_get(const Evas_Object *obj)
 {
@@ -776,24 +599,6 @@ evas_object_image_border_scale_get(const Evas_Object *obj)
    return o->cur.border.scale;
 }
 
-/**
- * Sets the rectangle of the given image object that the image will be
- * drawn to.
- *
- * Note that the image will be tiled around this one rectangle. To
- * have only one copy of the image drawn, @p x and @p y must be 0 and
- * @p w and @p h need to be the width and height of the image object
- * respectively.
- *
- * The default values for the fill parameters is @p x = 0, @p y = 0,
- * @p w = 32 and @p h = 32.
- *
- * @param obj The given image object.
- * @param x The X coordinate for the top left corner of the image.
- * @param y The Y coordinate for the top left corner of the image.
- * @param w The width of the image.
- * @param h The height of the image.
- */
 EAPI void
 evas_object_image_fill_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
 {
@@ -823,18 +628,6 @@ evas_object_image_fill_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Co
    evas_object_change(obj);
 }
 
-/**
- * Retrieves the dimensions of the rectangle of the given image object
- * that the image will be drawn to.
- *
- * See @ref evas_object_image_fill_set for more details.
- *
- * @param obj The given image object.
- * @param x Location to store the X coordinate for the top left corner of the image in, or NULL.
- * @param y Location to store the Y coordinate for the top left corner of the image in, or NULL.
- * @param w Location to store the width of the image in, or NULL.
- * @param h Location to store the height of the image in, or NULL.
- */
 EAPI void
 evas_object_image_fill_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
 {
@@ -862,12 +655,6 @@ evas_object_image_fill_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y,
 }
 
 
-/**
- * Sets the tiling mode for the given evas image object's fill.
- * @param   obj   The given evas image object.
- * @param   spread One of EVAS_TEXTURE_REFLECT, EVAS_TEXTURE_REPEAT,
- * EVAS_TEXTURE_RESTRICT, or EVAS_TEXTURE_PAD.
- */
 EAPI void
 evas_object_image_fill_spread_set(Evas_Object *obj, Evas_Fill_Spread spread)
 {
@@ -886,13 +673,6 @@ evas_object_image_fill_spread_set(Evas_Object *obj, Evas_Fill_Spread spread)
    evas_object_change(obj);
 }
 
-/**
- * Retrieves the spread (tiling mode) for the given image object's
- * fill.
- *
- * @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)
 {
@@ -908,19 +688,6 @@ evas_object_image_fill_spread_get(const Evas_Object *obj)
    return (Evas_Fill_Spread)o->cur.spread;
 }
 
-/**
- * Sets the size of the given image object.
- *
- * This function will scale down or crop the image so that it is
- * treated as if it were at the given size. If the size given is
- * smaller than the image, it will be cropped. If the size given is
- * larger, then the image will be treated as if it were in the upper
- * left hand corner of a larger image that is otherwise transparent.
- *
- * @param obj The given image object.
- * @param w The new width of the image.
- * @param h The new height of the image.
- */
 EAPI void
 evas_object_image_size_set(Evas_Object *obj, int w, int h)
 {
@@ -990,15 +757,6 @@ evas_object_image_size_set(Evas_Object *obj, int w, int h)
    evas_object_change(obj);
 }
 
-/**
- * Retrieves the size of the given image object.
- *
- * See @ref evas_object_image_size_set for more details.
- *
- * @param obj The given image object.
- * @param w Location to store the width of the image in, or NULL.
- * @param h Location to store the height of the image in, or NULL.
- */
 EAPI void
 evas_object_image_size_get(const Evas_Object *obj, int *w, int *h)
 {
@@ -1019,15 +777,6 @@ evas_object_image_size_get(const Evas_Object *obj, int *w, int *h)
    if (h) *h = o->cur.image.h;
 }
 
-/**
- * Retrieves the row stride of the given image object,
- *
- * The row stride is the number of units between the start of a
- * row and the start of the next row.
- *
- * @param obj The given image object.
- * @return The stride of the image.
- */
 EAPI int
 evas_object_image_stride_get(const Evas_Object *obj)
 {
@@ -1043,15 +792,6 @@ evas_object_image_stride_get(const Evas_Object *obj)
    return o->cur.image.stride;
 }
 
-/**
- * Retrieves a number representing any error that occurred during the last
- * load of the given image object.
- *
- * @param obj The given image object.
- * @return A value giving the last error that occurred. It should be one of
- *         the @c EVAS_LOAD_ERROR_* values.  @c 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)
 {
@@ -1067,22 +807,6 @@ evas_object_image_load_error_get(const Evas_Object *obj)
    return o->load_error;
 }
 
-/**
- * Converts the raw image data of the given image object to the
- * specified colorspace.
- *
- * Note that this function does not modify the raw image data.  If the
- * requested colorspace is the same as the image colorspace nothing is
- * done and NULL is returned. You should use
- * evas_object_image_colorspace_get() to check the current image
- * colorspace.
- *
- * See @ref evas_object_image_colorspace_get.
- *
- * @param obj The given image object.
- * @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)
 {
@@ -1109,19 +833,11 @@ evas_object_image_data_convert(Evas_Object *obj, Evas_Colorspace to_cspace)
    o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output,
                                                                  o->engine_data,
                                                                  0,
-                                                                 &data);
+                                                                 &data,
+                                                                  &o->load_error);
    return evas_object_image_data_convert_internal(o, data, to_cspace);
 }
 
-/**
- * Sets the raw image data of the given image object.
- *
- * Note that the raw data must be of the same size and colorspace of
- * the image. If data is NULL the current image data will be freed.
- *
- * @param obj The given image object.
- * @param data The raw data, or NULL.
- */
 EAPI void
 evas_object_image_data_set(Evas_Object *obj, void *data)
 {
@@ -1208,21 +924,6 @@ evas_object_image_data_set(Evas_Object *obj, void *data)
    evas_object_change(obj);
 }
 
-/**
- * Get a pointer to the raw image data of the given image object.
- *
- * This function returns a pointer to an image object's internal pixel
- * buffer, for reading only or read/write. If you request it for
- * writing, the image will be marked dirty so that it gets redrawn at
- * the next update.
- *
- * This is best suited when you want to modify an existing image,
- * without changing its dimensions.
- *
- * @param obj The given image object.
- * @param for_writing Whether the data being retrieved will be modified.
- * @return The raw image data.
- */
 EAPI void *
 evas_object_image_data_get(const Evas_Object *obj, Eina_Bool for_writing)
 {
@@ -1253,7 +954,8 @@ evas_object_image_data_get(const Evas_Object *obj, Eina_Bool for_writing)
    o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output,
                                                                  o->engine_data,
                                                                  for_writing,
-                                                                 &data);
+                                                                 &data,
+                                                                  &o->load_error);
    if (o->engine_data)
      {
         int stride = 0;
@@ -1275,20 +977,6 @@ evas_object_image_data_get(const Evas_Object *obj, Eina_Bool for_writing)
    return data;
 }
 
-/**
- * Preload image in the background
- *
- * This function request the preload of the data image in the
- * background. The worked is queued before being processed.
- *
- * If image data is already loaded, it will callback
- * EVAS_CALLBACK_IMAGE_PRELOADED immediatelly and do nothing else.
- *
- * If cancel is set, it will remove the image from the workqueue.
- *
- * @param obj The given image object.
- * @param cancel 0 means add to the workqueue, 1 remove it.
- */
 EAPI void
 evas_object_image_preload(Evas_Object *obj, Eina_Bool cancel)
 {
@@ -1331,28 +1019,6 @@ evas_object_image_preload(Evas_Object *obj, Eina_Bool cancel)
      }
 }
 
-/**
- * Replaces the raw image data of the given image object.
- *
- * This function lets the application replace an image object's
- * internal pixel buffer with a user-allocated one. For best results,
- * you should generally first call evas_object_image_size_set() with
- * the width and height for the new buffer.
- *
- * This call is best suited for when you will be using image data with
- * different dimensions than the existing image data, if any. If you
- * only need to modify the existing image in some fashion, then using
- * evas_object_image_data_get() is probably what you are after.
- *
- * Note that the caller is responsible for freeing the buffer when
- * finished with it, as user-set image data will not be automatically
- * freed when the image object is deleted.
- *
- * See @ref evas_object_image_data_get for more details.
- *
- * @param obj The given image object.
- * @param data The raw data.
- */
 EAPI void
 evas_object_image_data_copy_set(Evas_Object *obj, void *data)
 {
@@ -1411,18 +1077,6 @@ evas_object_image_data_copy_set(Evas_Object *obj, void *data)
    EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o);
 }
 
-/**
- * Mark a sub-region of the given image object to be redrawn.
- *
- * This function schedules a particular rectangular region of an image
- * object to be updated (redrawn) at the next render.
- *
- * @param obj The given image object.
- * @param x X-offset of the region to be updated.
- * @param y Y-offset of the region to be updated.
- * @param w Width of the region to be updated.
- * @param h Height of the region to be updated.
- */
 EAPI void
 evas_object_image_data_update_add(Evas_Object *obj, int x, int y, int w, int h)
 {
@@ -1444,18 +1098,6 @@ evas_object_image_data_update_add(Evas_Object *obj, int x, int y, int w, int h)
    evas_object_change(obj);
 }
 
-/**
- * Enable or disable alpha channel of the given image object.
- *
- * This function sets a flag on an image object indicating whether or
- * not to use alpha channel data. A value of 1 indicates to use alpha
- * channel data, and 0 indicates to ignore any alpha channel
- * data. Note that this has nothing to do with an object's color as
- * manipulated by evas_object_color_set().
- *
- * @param obj The given image object.
- * @param has_alpha Whether to use alpha channel data or not.
- */
 EAPI void
 evas_object_image_alpha_set(Evas_Object *obj, Eina_Bool has_alpha)
 {
@@ -1510,17 +1152,6 @@ evas_object_image_alpha_set(Evas_Object *obj, Eina_Bool has_alpha)
 }
 
 
-/**
- * @brief Retrieves the alpha channel setting of the given image object.
- *
- * @param obj The given image object.
- * @return Whether the alpha channel data is being used.
- *
- * This function returns 1 if the image object's alpha channel is
- * being used, or 0 otherwise.
- *
- * See @ref evas_object_image_alpha_set for more details.
- */
 EAPI Eina_Bool
 evas_object_image_alpha_get(const Evas_Object *obj)
 {
@@ -1536,17 +1167,6 @@ evas_object_image_alpha_get(const Evas_Object *obj)
    return o->cur.has_alpha;
 }
 
-/**
- * Sets whether to use of high-quality image scaling algorithm
- * of the given image object.
- *
- * When enabled, a higher quality image scaling algorithm is used when
- * scaling images to sizes other than the source image. This gives
- * better results but is more computationally expensive.
- *
- * @param obj The given image object.
- * @param smooth_scale Whether to use smooth scale or not.
- */
 EAPI void
 evas_object_image_smooth_scale_set(Evas_Object *obj, Eina_Bool smooth_scale)
 {
@@ -1567,15 +1187,6 @@ evas_object_image_smooth_scale_set(Evas_Object *obj, Eina_Bool smooth_scale)
    evas_object_change(obj);
 }
 
-/**
- * Retrieves whether the given image object is using use a
- * high-quality image scaling algorithm.
- *
- * See @ref evas_object_image_smooth_scale_set for more details.
- *
- * @param obj The given image object.
- * @return Whether smooth scale is being used.
- */
 EAPI Eina_Bool
 evas_object_image_smooth_scale_get(const Evas_Object *obj)
 {
@@ -1591,14 +1202,6 @@ evas_object_image_smooth_scale_get(const Evas_Object *obj)
    return o->cur.smooth_scale;
 }
 
-/**
- * Reload a image of the canvas.
- *
- * @param obj The given image object pointer.
- *
- * This function reloads a image of the given canvas.
- *
- */
 EAPI void
 evas_object_image_reload(Evas_Object *obj)
 {
@@ -1631,22 +1234,6 @@ evas_object_image_reload(Evas_Object *obj)
    evas_object_change(obj);
 }
 
-/**
- * Save the given image object to a file.
- *
- * Note that you should pass the filename extension when saving.  If
- * the file supports multiple data stored in it as eet, you can
- * specify the key to be used as the index of the image in this file.
- *
- * You can specify some flags when saving the image.  Currently
- * acceptable flags are quality and compress.  Eg.: "quality=100
- * compress=9"
- *
- * @param obj The given image object.
- * @param file The filename to be used to save the image.
- * @param key The image key in file, or NULL.
- * @param flags String containing the flags to be used.
- */
 EAPI Eina_Bool
 evas_object_image_save(const Evas_Object *obj, const char *file, const char *key, const char *flags)
 {
@@ -1667,7 +1254,8 @@ evas_object_image_save(const Evas_Object *obj, const char *file, const char *key
    o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output,
                                                                  o->engine_data,
                                                                  0,
-                                                                 &data);
+                                                                 &data,
+                                                                  &o->load_error);
    if (flags)
      {
        char *p, *pp;
@@ -1713,15 +1301,6 @@ evas_object_image_save(const Evas_Object *obj, const char *file, const char *key
    return ok;
 }
 
-/**
- * Import pixels from given source to a given canvas image object.
- *
- * @param obj The given canvas object.
- * @param pixels The pixel's source to be imported.
- *
- * This function imports pixels from a given source to a given canvas image.
- *
- */
 EAPI Eina_Bool
 evas_object_image_pixels_import(Evas_Object *obj, Evas_Pixel_Import_Source *pixels)
 {
@@ -1756,7 +1335,8 @@ evas_object_image_pixels_import(Evas_Object *obj, Evas_Pixel_Import_Source *pixe
                    obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output,
                                                                  o->engine_data,
                                                                  1,
-                                                                 &image_pixels);
+                                                                 &image_pixels,
+                                                                  &o->load_error);
 /* FIXME: need to actualyl support this */
 /*               memcpy(image_pixels, pixels->rows, o->cur.image.w * o->cur.image.h * 4);*/
                  if (o->engine_data)
@@ -1786,7 +1366,8 @@ evas_object_image_pixels_import(Evas_Object *obj, Evas_Pixel_Import_Source *pixe
                    obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output,
                                                                  o->engine_data,
                                                                  1,
-                                                                 &image_pixels);
+                                                                 &image_pixels,
+                                                                  &o->load_error);
                  if (image_pixels)
                    evas_common_convert_yuv_420p_601_rgba((DATA8 **) pixels->rows,
                                                          (DATA8 *) image_pixels,
@@ -1815,17 +1396,6 @@ evas_object_image_pixels_import(Evas_Object *obj, Evas_Pixel_Import_Source *pixe
    return 1;
 }
 
-/**
- * Set the callback function to get pixels from a canva's image.
- *
- * @param obj The given canvas pointer.
- * @param func The callback function.
- * @param data The data pointer to be passed to @a func.
- *
- * This functions sets a function to be the callback function that get
- * pixes from a image of the canvas.
- *
- */
 EAPI void
 evas_object_image_pixels_get_callback_set(Evas_Object *obj, Evas_Object_Image_Pixels_Get_Cb func, void *data)
 {
@@ -1842,12 +1412,6 @@ evas_object_image_pixels_get_callback_set(Evas_Object *obj, Evas_Object_Image_Pi
    o->func.get_pixels_data = data;
 }
 
-/**
- * Mark whether the given image object is dirty (needs to be redrawn).
- *
- * @param obj The given image object.
- * @param dirty Whether the image is dirty.
- */
 EAPI void
 evas_object_image_pixels_dirty_set(Evas_Object *obj, Eina_Bool dirty)
 {
@@ -1866,12 +1430,6 @@ evas_object_image_pixels_dirty_set(Evas_Object *obj, Eina_Bool dirty)
    evas_object_change(obj);
 }
 
-/**
- * Retrieves whether the given image object is dirty (needs to be redrawn).
- *
- * @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)
 {
@@ -1888,15 +1446,6 @@ evas_object_image_pixels_dirty_get(const Evas_Object *obj)
    return 0;
 }
 
-/**
- * Set the dpi resolution of a loaded image of the  canvas.
- *
- * @param obj The given canvas pointer.
- * @param dpi The new dpi resolution.
- *
- * This function set the dpi resolution of a given loaded canvas image.
- *
- */
 EAPI void
 evas_object_image_load_dpi_set(Evas_Object *obj, double dpi)
 {
@@ -1921,15 +1470,6 @@ evas_object_image_load_dpi_set(Evas_Object *obj, double dpi)
      }
 }
 
-/**
- * Get the dpi resolution of a loaded image of the canvas.
- *
- * @param obj The given canvas pointer.
- * @return The dpi resolution of the given canvas image.
- *
- * This function returns the dpi resolution of given canvas image.
- *
- */
 EAPI double
 evas_object_image_load_dpi_get(const Evas_Object *obj)
 {
@@ -1945,16 +1485,6 @@ evas_object_image_load_dpi_get(const Evas_Object *obj)
    return o->load_opts.dpi;
 }
 
-/**
- * Set the size of a loaded image of the canvas.
- *
- * @param obj The given canvas object.
- * @param w The new width of the canvas image given.
- * @param h The new height of the canvas image given.
- *
- * This function sets a new size for the given canvas image.
- *
- */
 EAPI void
 evas_object_image_load_size_set(Evas_Object *obj, int w, int h)
 {
@@ -1980,16 +1510,6 @@ evas_object_image_load_size_set(Evas_Object *obj, int w, int h)
      }
 }
 
-/**
- * Get the size of a loaded image of the canvas.
- *
- * @param obj The given canvas object.
- * @param w The width of the canvas image given.
- * @param h The height of the canvas image given.
- *
- * This function get the size of the given canvas image.
- *
- */
 EAPI void
 evas_object_image_load_size_get(const Evas_Object *obj, int *w, int *h)
 {
@@ -2006,15 +1526,6 @@ evas_object_image_load_size_get(const Evas_Object *obj, int *w, int *h)
    if (h) *h = o->load_opts.h;
 }
 
-/**
- * Set the scale down of a loaded image of the canvas.
- *
- * @param obj The given canvas pointer.
- * @param scale_down The scale to down value.
- *
- * This function sets the scale down of a given canvas image.
- *
- */
 EAPI void
 evas_object_image_load_scale_down_set(Evas_Object *obj, int scale_down)
 {
@@ -2039,14 +1550,6 @@ evas_object_image_load_scale_down_set(Evas_Object *obj, int scale_down)
      }
 }
 
-/**
- * Get the scale down value of given image of the canvas.
- *
- * @param obj The given image object pointer.
- *
- * This function returns the scale down value of a given canvas image.
- *
- */
 EAPI int
 evas_object_image_load_scale_down_get(const Evas_Object *obj)
 {
@@ -2108,15 +1611,36 @@ evas_object_image_load_region_get(const Evas_Object *obj, int *x, int *y, int *w
    if (h) *h = o->load_opts.region.h;
 }
 
-/**
- * Set the colorspace of a given image of the canvas.
- *
- * @param obj The given image object pointer.
- * @param cspace The new color space.
- *
- * This function sets the colorspace of given canvas image.
- *
- */
+EAPI void
+evas_object_image_load_orientation_set(Evas_Object *obj, Eina_Bool enable)
+{
+   Evas_Object_Image *o;
+
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return;
+   MAGIC_CHECK_END();
+   o = (Evas_Object_Image *)(obj->object_data);
+   MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
+   return;
+   MAGIC_CHECK_END();
+   o->load_opts.orientation = !!enable;
+}
+
+EAPI Eina_Bool
+evas_object_image_load_orientation_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 o->load_opts.orientation;
+}
+
 EAPI void
 evas_object_image_colorspace_set(Evas_Object *obj, Evas_Colorspace cspace)
 {
@@ -2152,15 +1676,6 @@ evas_object_image_colorspace_set(Evas_Object *obj, Evas_Colorspace cspace)
                                                         cspace);
 }
 
-/**
- * Get the colorspace of a given image of the canvas.
- *
- * @param obj The given image object pointer.
- * @return The colorspace of the image.
- *
- * This function returns the colorspace of given canvas image.
- *
- */
 EAPI Evas_Colorspace
 evas_object_image_colorspace_get(const Evas_Object *obj)
 {
@@ -2176,15 +1691,6 @@ evas_object_image_colorspace_get(const Evas_Object *obj)
    return o->cur.cspace;
 }
 
-/**
- * Set the native surface of a given image of the canvas
- *
- * @param obj The given canvas pointer.
- * @param surf The new native surface.
- *
- * This function sets a native surface of a given canvas image.
- *
- */
 EAPI void
 evas_object_image_native_surface_set(Evas_Object *obj, Evas_Native_Surface *surf)
 {
@@ -2215,15 +1721,6 @@ evas_object_image_native_surface_set(Evas_Object *obj, Evas_Native_Surface *surf
                                                       surf);
 }
 
-/**
- * Get the native surface of a given image of the canvas
- *
- * @param obj The given canvas pointer.
- * @return The native surface of the given canvas image.
- *
- * 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)
 {
@@ -2241,15 +1738,6 @@ evas_object_image_native_surface_get(const Evas_Object *obj)
                                                          o->engine_data);
 }
 
-/**
- * Set the scale hint of a given image of the canvas.
- *
- * @param obj The given canvas pointer.
- * @param hint The scale hint value.
- *
- * This function sets the scale hint value of the given image of the canvas.
- *
- */
 EAPI void
 evas_object_image_scale_hint_set(Evas_Object *obj, Evas_Image_Scale_Hint hint)
 {
@@ -2286,14 +1774,6 @@ evas_object_image_scale_hint_set(Evas_Object *obj, Evas_Image_Scale_Hint hint)
      }
 }
 
-/**
- * Get the scale hint of a given image of the canvas.
- *
- * @param obj The given canvas pointer.
- *
- * This function returns the scale hint value of the given image of the canvas.
- *
- */
 EAPI Evas_Image_Scale_Hint
 evas_object_image_scale_hint_get(const Evas_Object *obj)
 {
@@ -2309,15 +1789,6 @@ evas_object_image_scale_hint_get(const Evas_Object *obj)
    return o->scale_hint;
 }
 
-/**
- * Set the content hint of a given image of the canvas.
- *
- * @param obj The given canvas pointer.
- * @param hint The content hint value.
- *
- * This function sets the content hint value of the given image of the canvas.
- *
- */
 EAPI void
 evas_object_image_content_hint_set(Evas_Object *obj, Evas_Image_Content_Hint hint)
 {
@@ -2354,18 +1825,6 @@ evas_object_image_content_hint_set(Evas_Object *obj, Evas_Image_Content_Hint hin
      }
 }
 
-/**
- * Enable an image to be used as an alpha mask.
- *
- * This will set any flags, and discard any excess image data not used as an
- * alpha mask.
- *
- * Note there is little point in using a image as alpha mask unless it has an
- * alpha channel.
- *
- * @param obj Object to use as an alpha mask.
- * @param ismask Use image as alphamask, must be true.
- */
 EAPI void
 evas_object_image_alpha_mask_set(Evas_Object *obj, Eina_Bool ismask)
 {
@@ -2387,14 +1846,6 @@ evas_object_image_alpha_mask_set(Evas_Object *obj, Eina_Bool ismask)
 
 }
 
-/**
- * Get the content hint of a given image of the canvas.
- *
- * @param obj The given canvas pointer.
- *
- * This function returns the content hint value of the given image of the canvas.
- *
- */
 EAPI Evas_Image_Content_Hint
 evas_object_image_content_hint_get(const Evas_Object *obj)
 {
@@ -2410,23 +1861,6 @@ evas_object_image_content_hint_get(const Evas_Object *obj)
    return o->content_hint;
 }
 
-/**
- * @}
- */
-
-/**
- * @addtogroup Evas_Image_Group
- * @{
- */
-
-/**
- * Flush the image cache of the canvas.
- *
- * @param e The given evas pointer.
- *
- * This function flushes image cache of canvas.
- *
- */
 EAPI void
 evas_image_cache_flush(Evas *e)
 {
@@ -2437,14 +1871,6 @@ evas_image_cache_flush(Evas *e)
    e->engine.func->image_cache_flush(e->engine.data.output);
 }
 
-/**
- * Reload the image cache
- *
- * @param e The given evas pointer.
- *
- * This function reloads the image cache of canvas.
- *
- */
 EAPI void
 evas_image_cache_reload(Evas *e)
 {
@@ -2492,15 +1918,6 @@ evas_image_cache_reload(Evas *e)
    evas_image_cache_flush(e);
 }
 
-/**
- * Set the image cache.
- *
- * @param e The given evas pointer.
- * @param size The cache size.
- *
- * This function sets the image cache of canvas.
- *
- */
 EAPI void
 evas_image_cache_set(Evas *e, int size)
 {
@@ -2512,14 +1929,6 @@ evas_image_cache_set(Evas *e, int size)
    e->engine.func->image_cache_set(e->engine.data.output, size);
 }
 
-/**
- * Set the image cache
- *
- * @param e The given evas pointer.
- *
- * This function returns the image cache of canvas.
- *
- */
 EAPI int
 evas_image_cache_get(const Evas *e)
 {
@@ -2530,10 +1939,6 @@ evas_image_cache_get(const Evas *e)
    return e->engine.func->image_cache_get(e->engine.data.output);
 }
 
-/**
- * @}
- */
-
 /* all nice and private */
 static void
 _proxy_unset(Evas_Object *proxy)
@@ -2580,57 +1985,57 @@ _proxy_error(Evas_Object *proxy, void *context, void *output, void *surface,
    int r = rand() % 255;
    int g = rand() % 255;
    int b = rand() % 255;
-
+   
    /* XXX: Eina log error or something I'm sure
     * If it bugs you, just fix it.  Don't tell me */
    if (VERBOSE_PROXY_ERROR) printf("Err: Argh! Recursive proxies.\n");
-
+   
    func = proxy->layer->evas->engine.func;
-   func->context_color_set(output, context, r,g,b,255);
+   func->context_color_set(output, context, r, g, b, 255);
    func->context_multiplier_unset(output, context);
    func->context_render_op_set(output, context, proxy->cur.render_op);
    func->rectangle_draw(output, context, surface, proxy->cur.geometry.x + x,
-                                                      proxy->cur.geometry.y + y,
-                                                      proxy->cur.geometry.w,
-                                                      proxy->cur.geometry.h);
+                        proxy->cur.geometry.y + y,
+                        proxy->cur.geometry.w,
+                        proxy->cur.geometry.h);
    return;
 }
 
 
 static void
-_proxy_subrender_recurse(Evas_Object *obj, Evas_Object *clip, void *output, void *surface, void *ctx, int x, int y){
-     Evas_Object *obj2;
-     Evas *e;
-     e = obj->layer->evas;
-     if (obj->clip.clipees) return;
-     /* evas_object_is_visible, inline and tweaked to handle it's clip hidden*/
-     if (!obj->cur.visible) return;
-     if (!clip || clip != obj->cur.clipper)
-       {
-          if (!obj->cur.cache.clip.visible) return;
-          if (obj->cur.cache.clip.a == 0 &&
-              obj->cur.render_op == EVAS_RENDER_BLEND) return;
-       }
-     if (obj->func->is_visible && !obj->func->is_visible(obj)) return;
-
-     if (!obj->pre_render_done)
-        obj->func->render_pre(obj);
-     ctx = e->engine.func->context_new(output);
-     if (obj->smart.smart)
-       {
-          EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2){
-               _proxy_subrender_recurse(obj2, clip, output, surface, ctx, x,y);
+_proxy_subrender_recurse(Evas_Object *obj, Evas_Object *clip, void *output, void *surface, void *ctx, int x, int y)
+{
+   Evas_Object *obj2;
+   Evas *e = obj->layer->evas;
+   
+   if (obj->clip.clipees) return;
+   /* evas_object_is_visible, inline and tweaked to handle it's clip hidden*/
+   if (!obj->cur.visible) return;
+   if ((!clip) || (clip != obj->cur.clipper))
+     {
+        if (!obj->cur.cache.clip.visible) return;
+        if ((obj->cur.cache.clip.a == 0) &&
+            (obj->cur.render_op == EVAS_RENDER_BLEND)) return;
+     }
+   if ((obj->func->is_visible) && (!obj->func->is_visible(obj))) return;
+   
+   if (!obj->pre_render_done)
+      obj->func->render_pre(obj);
+   ctx = e->engine.func->context_new(output);
+   if (obj->smart.smart)
+     {
+        EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
+          {
+             _proxy_subrender_recurse(obj2, clip, output, surface, ctx, x, y);
           }
-       }
-     else
-       {
-          obj->func->render(obj, output, ctx, surface,x,y);
-       }
-     e->engine.func->context_free(output, ctx);
+     }
+   else
+     {
+        obj->func->render(obj, output, ctx, surface, x, y);
+     }
+   e->engine.func->context_free(output, ctx);
 }
 
-
-
 /**
  * Render the source object when a proxy is set.
  *
@@ -2641,7 +2046,7 @@ _proxy_subrender(Evas *e, Evas_Object *source)
 {
    void *ctx;
    Evas_Object *obj2, *clip;
-   int w,h;
+   int w, h;
 
    if (!source) return;
 
@@ -2651,71 +2056,224 @@ _proxy_subrender(Evas *e, Evas_Object *source)
    source->proxy.redraw = EINA_FALSE;
 
    /* We need to redraw surface then */
-   if (source->proxy.surface && (source->proxy.w != w || source->proxy.h != h))
+   if ((source->proxy.surface) && 
+       ((source->proxy.w != w) || (source->proxy.h != h)))
      {
         e->engine.func->image_map_surface_free(e->engine.data.output,
                                                source->proxy.surface);
         source->proxy.surface = NULL;
      }
-
+   
    /* FIXME: Hardcoded alpha 'on' */
    /* FIXME (cont): Should see if the object has alpha */
    if (!source->proxy.surface)
      {
-        source->proxy.surface = e->engine.func->image_map_surface_new(
-           e->engine.data.output, w, h, 1);
+        source->proxy.surface = e->engine.func->image_map_surface_new
+           (e->engine.data.output, w, h, 1);
         source->proxy.w = w;
         source->proxy.h = h;
      }
-
+   
    ctx = e->engine.func->context_new(e->engine.data.output);
    e->engine.func->context_color_set(e->engine.data.output, ctx, 0, 0, 0, 0);
    e->engine.func->context_render_op_set(e->engine.data.output, ctx, EVAS_RENDER_COPY);
    e->engine.func->rectangle_draw(e->engine.data.output, ctx,
                                   source->proxy.surface, 0, 0, w, h);
    e->engine.func->context_free(e->engine.data.output, ctx);
-
+   
    ctx = e->engine.func->context_new(e->engine.data.output);
    if (source->smart.smart)
      {
         clip = evas_object_smart_clipped_clipper_get(source);
-        EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(source), obj2){
+        EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(source), obj2)
+          {
              _proxy_subrender_recurse(obj2, clip, e->engine.data.output,
                                       source->proxy.surface,
                                       ctx,
                                       -source->cur.geometry.x,
                                       -source->cur.geometry.y);
-        }
+          }
      }
    else
      {
         if (!source->pre_render_done)
            source->func->render_pre(source);
         source->func->render(source, e->engine.data.output, ctx,
-                                    source->proxy.surface,
-                                    -source->cur.geometry.x,
-                                    -source->cur.geometry.y);
+                             source->proxy.surface,
+                             -source->cur.geometry.x,
+                             -source->cur.geometry.y);
      }
-
+   
    e->engine.func->context_free(e->engine.data.output, ctx);
-   source->proxy.surface = e->engine.func->image_dirty_region(
-               e->engine.data.output, source->proxy.surface, 0,0,w,h);
+   source->proxy.surface = e->engine.func->image_dirty_region
+      (e->engine.data.output, source->proxy.surface, 0, 0, w, h);
+}
 
+#if 0 // filtering disabled
+/*
+ *
+ * Note that this is similar to proxy_subrender_recurse.  It should be
+ * possible to merge I guess
+ */
+static void
+image_filter_draw_under_recurse(Evas *e, Evas_Object *obj, Evas_Object *stop,
+                                void *output, void *ctx, void *surface,
+                                int x, int y)
+{
+   Evas_Object *obj2;
+   
+   if (obj->clip.clipees) return;
+   /* FIXME: Doing bounding box test */
+   if (!evas_object_is_in_output_rect(obj, stop->cur.geometry.x,
+                                      stop->cur.geometry.y,
+                                      stop->cur.geometry.w,
+                                      stop->cur.geometry.h))
+      return;
+   
+   if (!evas_object_is_visible(obj)) return;
+   obj->pre_render_done = 1;
+   ctx = e->engine.func->context_new(output);
+   
+   if (obj->smart.smart)
+     {
+        EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
+          {
+             if (obj2 == stop) return;
+             image_filter_draw_under_recurse(e, obj2, stop, output, surface, 
+                                             ctx, x, y);
+          }
+     }
+   else
+      obj->func->render(obj, output, ctx, surface, x ,y);
+   e->engine.func->context_free(output, ctx);
 }
 
+/*
+ * Draw all visible objects intersecting an object which are _beneath_ it.
+ */
+static void
+image_filter_draw_under(Evas *e, Evas_Object *stop, void *output, void *ctx, void *surface, int dx, int dy)
+{
+   Evas_Layer *lay;
+   int x, y;
+   
+   x = stop->cur.geometry.x - dx;
+   y = stop->cur.geometry.y - dy;
+   
+   EINA_INLIST_FOREACH(e->layers, lay)
+     {
+        Evas_Object *obj;
+        EINA_INLIST_FOREACH(lay->objects, obj)
+          {
+             if (obj->delete_me) continue;
+             if (obj == stop) return;
+             /* FIXME: Do bounding box check */
+             image_filter_draw_under_recurse(e, obj, stop, output, ctx, 
+                                             surface, -x, -y);
+          }
+     }
+   e->engine.func->image_dirty_region(output, surface, 0, 0, 300, 300);
+   e->engine.func->output_flush(output);
+}
+
+/*
+ * Update the filtered object.
+ *
+ * Creates a new context, and renders stuff (filtered) onto that.
+ */
+Filtered_Image *
+image_filter_update(Evas *e, Evas_Object *obj, void *src, int imagew, int imageh, int *outw, int *outh)
+{
+   int w, h;
+   void *ctx;
+   Evas_Filter_Info *info;
+   void *surface;
+   Eina_Bool alpha;
+   
+   info = obj->filter;
+   
+   if (info->mode == EVAS_FILTER_MODE_BELOW)
+     {
+        w = obj->cur.geometry.w;
+        h = obj->cur.geometry.h;
+        evas_filter_get_size(info, w, h, &imagew, &imageh, EINA_TRUE);
+        alpha = EINA_FALSE;
+     }
+   else
+     {
+        evas_filter_get_size(info, imagew, imageh, &w, &h, EINA_FALSE);
+        alpha = e->engine.func->image_alpha_get(e->engine.data.output, src);
+     }
+   
+   /* Certain filters may make alpha images anyway */
+   if (alpha == EINA_FALSE) alpha = evas_filter_always_alpha(info);
+   
+   surface = e->engine.func->image_map_surface_new(e->engine.data.output, w, h,
+                                                   alpha);
+   
+   if (info->mode == EVAS_FILTER_MODE_BELOW)
+     {
+        void *subsurface;
+        int disw, dish;
+        int dx, dy;
+        disw = obj->cur.geometry.w;
+        dish = obj->cur.geometry.h;
+        dx = (imagew - w) >> 1;
+        dy = (imageh - h) >> 1;
+        subsurface = e->engine.func->image_map_surface_new
+           (e->engine.data.output, imagew, imageh, 1);
+        ctx = e->engine.func->context_new(e->engine.data.output);
+        e->engine.func->context_color_set(e->engine.data.output, ctx, 0, 255, 0, 255);
+        e->engine.func->context_render_op_set(e->engine.data.output, ctx, EVAS_RENDER_COPY);
+        e->engine.func->rectangle_draw(e->engine.data.output, ctx,
+                                       subsurface, 0, 0, imagew, imageh);
+        
+        image_filter_draw_under(e, obj, e->engine.data.output, ctx,
+                                subsurface, dx, dy);
+        
+        e->engine.func->context_free(e->engine.data.output, ctx);
+        
+        ctx = e->engine.func->context_new(e->engine.data.output);
+        
+        e->engine.func->image_draw_filtered(e->engine.data.output,
+                                            ctx, surface, subsurface, info);
+        
+        e->engine.func->context_free(e->engine.data.output, ctx);
+        
+        e->engine.func->image_map_surface_free(e->engine.data.output,
+                                               subsurface);
+     }
+   else
+     {
+        ctx = e->engine.func->context_new(e->engine.data.output);
+        e->engine.func->image_draw_filtered(e->engine.data.output,
+                                            ctx, surface, src, info);
+        e->engine.func->context_free(e->engine.data.output, ctx);
+     }
+   
+   e->engine.func->image_dirty_region(e->engine.data.output, surface, 
+                                      0, 0, w, h);
+   if (outw) *outw = w;
+   if (outh) *outh = h;
+   return e->engine.func->image_filtered_save(src, surface,
+                                              obj->filter->key,
+                                              obj->filter->len);
+}
+#endif
+
 static void
 evas_object_image_unload(Evas_Object *obj, Eina_Bool dirty)
 {
    Evas_Object_Image *o;
-
+   
    o = (Evas_Object_Image *)(obj->object_data);
-
+   
    if ((!o->cur.file) ||
        (o->pixels_checked_out > 0)) return;
    if (dirty)
      {
         if (o->engine_data)
-          o->engine_data = obj->layer->evas->engine.func->image_dirty_region
+           o->engine_data = obj->layer->evas->engine.func->image_dirty_region
            (obj->layer->evas->engine.data.output,
                o->engine_data,
                0, 0,
@@ -2759,6 +2317,7 @@ evas_object_image_load(Evas_Object *obj)
    lo.region.y = o->load_opts.region.y;
    lo.region.w = o->load_opts.region.w;
    lo.region.h = o->load_opts.region.h;
+   lo.orientation = o->load_opts.orientation;
    o->engine_data = obj->layer->evas->engine.func->image_load
       (obj->layer->evas->engine.data.output,
           o->cur.file,
@@ -2927,7 +2486,7 @@ static void
 evas_object_image_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y)
 {
    Evas_Object_Image *o;
-   int imagew,imageh;
+   int imagew, imageh, uvw, uvh;
    void *pixels;
 
    /* render object to surface with context, and offset by x,y */
@@ -2972,12 +2531,16 @@ evas_object_image_render(Evas_Object *obj, void *output, void *context, void *su
         pixels = o->engine_data;
         imagew = o->cur.image.w;
         imageh = o->cur.image.h;
+        uvw = imagew;
+        uvh = imageh;
      }
    else if (o->cur.source->proxy.surface && !o->cur.source->proxy.redraw)
      {
         pixels = o->cur.source->proxy.surface;
         imagew = o->cur.source->proxy.w;
         imageh = o->cur.source->proxy.h;
+        uvw = imagew;
+        uvh = imageh;
      }
    else if (o->cur.source->type == o_type &&
             ((Evas_Object_Image *)o->cur.source->object_data)->engine_data)
@@ -2987,6 +2550,8 @@ evas_object_image_render(Evas_Object *obj, void *output, void *context, void *su
         pixels = oi->engine_data;
         imagew = oi->cur.image.w;
         imageh = oi->cur.image.h;
+        uvw = o->cur.source->cur.geometry.w;
+        uvh = o->cur.source->cur.geometry.h;
      }
    else
      {
@@ -2995,10 +2560,62 @@ evas_object_image_render(Evas_Object *obj, void *output, void *context, void *su
         pixels = o->cur.source->proxy.surface;
         imagew = o->cur.source->proxy.w;
         imageh = o->cur.source->proxy.h;
+        uvw = imagew;
+        uvh = imageh;
         o->proxyrendering = 0;
      }
 
-
+#if 0 // filtering disabled
+   /* Now check/update filter */
+   if (obj->filter && obj->filter->filter)
+     {
+        Filtered_Image *fi = NULL;
+        //printf("%p has filter: %s\n", obj,obj->filter->dirty?"dirty":"clean");
+        if (obj->filter->dirty)
+          {
+             if (obj->filter->mode != EVAS_FILTER_MODE_BELOW)
+               {
+                  uint32_t len;
+                  uint8_t *key;
+                  
+                  if (obj->filter->key) free(obj->filter->key);
+                  obj->filter->key = NULL;
+                  obj->filter->len = 0;
+                  key = evas_filter_key_get(obj->filter, &len);
+                  if (key)
+                    {
+                       obj->filter->key = key;
+                       obj->filter->len = len;
+                       fi = obj->layer->evas->engine.func->image_filtered_get
+                          (o->engine_data, key, len);
+                       if (obj->filter->cached && fi != obj->filter->cached)
+                         {
+                            obj->layer->evas->engine.func->image_filtered_free
+                               (o->engine_data, obj->filter->cached);
+                            obj->filter->cached = NULL;
+                         }
+                    }
+               }
+             else if (obj->filter->cached)
+               {
+                  obj->layer->evas->engine.func->image_filtered_free
+                     (o->engine_data, obj->filter->cached);
+               }
+             if (!fi)
+                fi = image_filter_update(obj->layer->evas, obj, pixels, 
+                                         imagew, imageh, &imagew, &imageh);
+             pixels = fi->image;
+             obj->filter->dirty = 0;
+             obj->filter->cached = fi;
+          }
+        else
+          {
+             fi = obj->filter->cached;
+             pixels = fi->image;
+          }
+     }
+#endif
+   
    if (pixels)
      {
        Evas_Coord idw, idh, idx, idy;
@@ -3009,7 +2626,9 @@ evas_object_image_render(Evas_Object *obj, void *output, void *context, void *su
             if (o->func.get_pixels)
               {
                  o->func.get_pixels(o->func.get_pixels_data, obj);
-                 o->engine_data = obj->layer->evas->engine.func->image_dirty_region(obj->layer->evas->engine.data.output, o->engine_data, 0, 0, o->cur.image.w, o->cur.image.h);
+                 o->engine_data = obj->layer->evas->engine.func->image_dirty_region
+                     (obj->layer->evas->engine.data.output, o->engine_data,
+                         0, 0, o->cur.image.w, o->cur.image.h);
               }
             o->dirty_pixels = 0;
          }
@@ -3021,7 +2640,7 @@ evas_object_image_render(Evas_Object *obj, void *output, void *context, void *su
             p = obj->cur.map->points;
             p_end = p + obj->cur.map->count;
             pt = pts;
-
+             
              pts[0].px = obj->cur.map->persp.px << FP;
              pts[0].py = obj->cur.map->persp.py << FP;
              pts[0].foc = obj->cur.map->persp.foc << FP;
@@ -3035,12 +2654,12 @@ evas_object_image_render(Evas_Object *obj, void *output, void *context, void *su
                   pt->fx = p->px;
                   pt->fy = p->py;
                   pt->fz = p->z;
-                  pt->u = p->u * FP1;
-                  pt->v = p->v * FP1;
+                  pt->u = ((p->u * imagew) / uvw) * FP1;
+                  pt->v = ((p->v * imageh) / uvh) * FP1;
                   if      (pt->u < 0) pt->u = 0;
-                  else if (pt->u > (o->cur.image.w * FP1)) pt->u = (imagew * FP1);
+                  else if (pt->u > (imagew * FP1)) pt->u = (imagew * FP1);
                   if      (pt->v < 0) pt->v = 0;
-                  else if (pt->v > (o->cur.image.h * FP1)) pt->v = (imageh * FP1);
+                  else if (pt->v > (imageh * FP1)) pt->v = (imageh * FP1);
                   pt->col = ARGB_JOIN(p->a, p->r, p->g, p->b);
               }
             if (obj->cur.map->count & 0x1)
@@ -3061,8 +2680,8 @@ evas_object_image_render(Evas_Object *obj, void *output, void *context, void *su
               * (which is returned)it may be a new object, however exactly 0
               * of all the evas engines do this. */
              obj->layer->evas->engine.func->image_border_set(output, pixels,
-                                                                         o->cur.border.l, o->cur.border.r,
-                                                                         o->cur.border.t, o->cur.border.b);
+                                                             o->cur.border.l, o->cur.border.r,
+                                                             o->cur.border.t, o->cur.border.b);
              idx = evas_object_image_figure_x_fill(obj, o->cur.fill.x, o->cur.fill.w, &idw);
              idy = evas_object_image_figure_y_fill(obj, o->cur.fill.y, o->cur.fill.h, &idh);
              if (idw < 1) idw = 1;
@@ -3251,7 +2870,7 @@ static void
 evas_object_image_render_pre(Evas_Object *obj)
 {
    Evas_Object_Image *o;
-   int is_v, was_v;
+   int is_v = 0, was_v = 0;
    Evas *e;
 
    /* dont pre-render the obj twice! */
@@ -3267,8 +2886,8 @@ evas_object_image_render_pre(Evas_Object *obj)
 
    if ((o->cur.fill.w < 1) || (o->cur.fill.h < 1))
      {
-       ERR("%p has invalid fill size: %dx%d. Ignored",
-            obj, o->cur.fill.w, o->cur.fill.h);
+        ERR("%p has invalid fill size: %dx%d. Ignored",
+            obj, o->cur.fill.w, o->cur.fill.h);
        return;
      }
 
@@ -3280,13 +2899,12 @@ evas_object_image_render_pre(Evas_Object *obj)
        obj->cur.clipper->func->render_pre(obj->cur.clipper);
      }
    /* Proxy: Do it early */
-   if (o->cur.source && o->cur.source->proxy.redraw)
+   if (o->cur.source && 
+       (o->cur.source->proxy.redraw || o->cur.source->changed))
      {
         /* XXX: Do I need to sort out the map here? */
-        obj->changed = 1;
-        evas_add_rect(&e->clip_changes,
-                      obj->cur.geometry.x, obj->cur.geometry.y,
-                      obj->cur.geometry.w, obj->cur.geometry.h);
+        evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
+        goto done;
      }
 
    /* now figure what changed and add draw rects */
@@ -3417,73 +3035,80 @@ evas_object_image_render_pre(Evas_Object *obj)
             evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
             if (!o->pixel_updates) goto done;
          }
-       if ((o->cur.border.l == 0) &&
-           (o->cur.border.r == 0) &&
-           (o->cur.border.t == 0) &&
-           (o->cur.border.b == 0) &&
-            (o->cur.image.w > 0) &&
-            (o->cur.image.h > 0))
-         {
-            Eina_Rectangle *rr;
-
-            EINA_LIST_FREE(o->pixel_updates, rr)
-              {
-                 Evas_Coord idw, idh, idx, idy;
-                 int x, y, w, h;
-
-                 e->engine.func->image_dirty_region(e->engine.data.output, o->engine_data, rr->x, rr->y, rr->w, rr->h);
-
-                 idx = evas_object_image_figure_x_fill(obj, o->cur.fill.x, o->cur.fill.w, &idw);
-                 idy = evas_object_image_figure_y_fill(obj, o->cur.fill.y, o->cur.fill.h, &idh);
-
-                 if (idw < 1) idw = 1;
-                 if (idh < 1) idh = 1;
-                 if (idx > 0) idx -= idw;
-                 if (idy > 0) idy -= idh;
-                 while (idx < obj->cur.geometry.w)
-                   {
-                      Evas_Coord ydy;
-
-                      ydy = idy;
-                      x = idx;
-                      w = ((int)(idx + idw)) - x;
-                      while (idy < obj->cur.geometry.h)
-                        {
-                           Eina_Rectangle r;
-
-                           y = idy;
-                           h = ((int)(idy + idh)) - y;
-
-                           r.x = ((rr->x - 1) * w) / o->cur.image.w;
-                           r.y = ((rr->y - 1) * h) / o->cur.image.h;
-                           r.w = ((rr->w + 2) * w) / o->cur.image.w;
-                           r.h = ((rr->h + 2) * h) / o->cur.image.h;
-                           r.x += obj->cur.geometry.x + x;
-                           r.y += obj->cur.geometry.y + y;
-                           evas_add_rect(&e->clip_changes, r.x, r.y, r.w, r.h);
-                           idy += h;
-                        }
-                      idx += idw;
-                      idy = ydy;
-                   }
-                 eina_rectangle_free(rr);
-              }
-            goto done;
-         }
-       else
-         {
-            if (o->pixel_updates)
-              {
+        if (o->pixel_updates)
+          {
+             if ((o->cur.border.l == 0) &&
+                 (o->cur.border.r == 0) &&
+                 (o->cur.border.t == 0) &&
+                 (o->cur.border.b == 0) &&
+                 (o->cur.image.w > 0) &&
+                 (o->cur.image.h > 0) &&
+                (!((obj->cur.map) && (obj->cur.usemap))))
+               {
+                  Eina_Rectangle *rr;
+                  
+                  EINA_LIST_FREE(o->pixel_updates, rr)
+                    {
+                       Evas_Coord idw, idh, idx, idy;
+                       int x, y, w, h;
+                       
+                       e->engine.func->image_dirty_region(e->engine.data.output, o->engine_data, rr->x, rr->y, rr->w, rr->h);
+                       
+                       idx = evas_object_image_figure_x_fill(obj, o->cur.fill.x, o->cur.fill.w, &idw);
+                       idy = evas_object_image_figure_y_fill(obj, o->cur.fill.y, o->cur.fill.h, &idh);
+                       
+                       if (idw < 1) idw = 1;
+                       if (idh < 1) idh = 1;
+                       if (idx > 0) idx -= idw;
+                       if (idy > 0) idy -= idh;
+                       while (idx < obj->cur.geometry.w)
+                         {
+                            Evas_Coord ydy;
+                            
+                            ydy = idy;
+                            x = idx;
+                            w = ((int)(idx + idw)) - x;
+                            while (idy < obj->cur.geometry.h)
+                              {
+                                 Eina_Rectangle r;
+                                 
+                                 y = idy;
+                                 h = ((int)(idy + idh)) - y;
+                                 
+                                 r.x = ((rr->x - 1) * w) / o->cur.image.w;
+                                 r.y = ((rr->y - 1) * h) / o->cur.image.h;
+                                 r.w = ((rr->w + 2) * w) / o->cur.image.w;
+                                 r.h = ((rr->h + 2) * h) / o->cur.image.h;
+                                 r.x += obj->cur.geometry.x + x;
+                                 r.y += obj->cur.geometry.y + y;
+                                 evas_add_rect(&e->clip_changes, r.x, r.y, r.w, r.h);
+                                 idy += h;
+                              }
+                            idx += idw;
+                            idy = ydy;
+                         }
+                       eina_rectangle_free(rr);
+                    }
+                  goto done;
+               }
+             else
+               {
                  Eina_Rectangle *r;
-
+                  
                  EINA_LIST_FREE(o->pixel_updates, r)
-                   eina_rectangle_free(r);
+                     eina_rectangle_free(r);
                  e->engine.func->image_dirty_region(e->engine.data.output, o->engine_data, 0, 0, o->cur.image.w, o->cur.image.h);
                  evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
                  goto done;
               }
          }
      }
+#if 0 // filtering disabled
+   if (obj->filter && obj->filter->dirty)
+     {
+        evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
+     }
+#endif   
    /* it obviously didn't change - add a NO obscure - this "unupdates"  this */
    /* area so if there were updates for it they get wiped. don't do it if we */
    /* aren't fully opaque and we are visible */
@@ -3574,6 +3199,7 @@ evas_object_image_is_opaque(Evas_Object *obj)
         if (!o->engine_data) return 0;
         o->cur.opaque = 1;
      }
+   // FIXME: use proxy
    if (o->cur.source) return 0; /* FIXME: Should go poke at the object */
    if ((obj->cur.map) && (obj->cur.usemap)) return 0;
    if (obj->cur.render_op == EVAS_RENDER_COPY) return 1;
@@ -3607,6 +3233,7 @@ evas_object_image_was_opaque(Evas_Object *obj)
         if (!o->engine_data) return 0;
         o->prev.opaque = 1;
      }
+   // FIXME: use proxy
    if (o->prev.source) return 0; /* FIXME: Should go poke at the object */
    if (obj->prev.usemap) return 0;
    if (obj->prev.render_op == EVAS_RENDER_COPY) return 1;
@@ -3635,6 +3262,7 @@ evas_object_image_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
    if ((x < 0) || (y < 0) || (x >= w) || (y >= h)) return 0;
    if (!o->cur.has_alpha) return 1;
 
+   // FIXME: proxy needs to be honored
    if (obj->cur.map)
      {
         x = obj->cur.map->mx;
@@ -3722,7 +3350,8 @@ evas_object_image_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
       (obj->layer->evas->engine.data.output,
           o->engine_data,
           0,
-          &data);
+          &data,
+          &o->load_error);
    if (!data)
      return 0;
 
@@ -3860,4 +3489,13 @@ _evas_object_image_preloading_set(Evas_Object *obj, Eina_Bool preloading)
    o->preloading = preloading;
 }
 
+void
+_evas_object_image_preloading_check(Evas_Object *obj)
+{
+   Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data);
+   if (obj->layer->evas->engine.func->image_load_error_get)
+      o->load_error = obj->layer->evas->engine.func->image_load_error_get
+      (obj->layer->evas->engine.data.output, o->engine_data);
+}
+
 /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
index f22b6f0..bc09eb9 100644 (file)
@@ -61,6 +61,7 @@ void
 evas_object_inform_call_image_preloaded(Evas_Object *obj)
 {
    if (!_evas_object_image_preloading_get(obj)) return;
+   _evas_object_image_preloading_check(obj);
    _evas_object_image_preloading_set(obj, 0);
    _evas_object_event_new();
 
index bf13a40..c3e5e24 100644 (file)
@@ -239,24 +239,6 @@ evas_object_intercept_call_clip_unset(Evas_Object *obj)
 
 /* public calls */
 
-/**
- * @addtogroup Evas_Object_Group_Interceptors
- * @{
- */
-
-/**
- * Set the callback function that intercepts a show event of a object.
- *
- * @param obj The given canvas object pointer.
- * @param func The given function to be the callback function.
- * @param data The data passed to the callback function.
- *
- * This function sets a callback function to intercepts a show event
- * of a canvas object.
- *
- * @see evas_object_intercept_show_callback_del().
- *
- */
 EAPI void
 evas_object_intercept_show_callback_add(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func, const void *data)
 {
@@ -272,19 +254,6 @@ evas_object_intercept_show_callback_add(Evas_Object *obj, Evas_Object_Intercept_
    obj->interceptors->show.data = (void *)data;
 }
 
-/**
- * Unset the callback function that intercepts a show event of a
- * object.
- *
- * @param obj The given canvas object pointer.
- * @param func The given callback function.
- *
- * This function sets a callback function to intercepts a show event
- * of a canvas object.
- *
- * @see evas_object_intercept_show_callback_add().
- *
- */
 EAPI void *
 evas_object_intercept_show_callback_del(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func)
 {
@@ -303,19 +272,6 @@ evas_object_intercept_show_callback_del(Evas_Object *obj, Evas_Object_Intercept_
    return data;
 }
 
-/**
- * Set the callback function that intercepts a hide event of a object.
- *
- * @param obj The given canvas object pointer.
- * @param func The given function to be the callback function.
- * @param data The data passed to the callback function.
- *
- * This function sets a callback function to intercepts a hide event
- * of a canvas object.
- *
- * @see evas_object_intercept_hide_callback_del().
- *
- */
 EAPI void
 evas_object_intercept_hide_callback_add(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func, const void *data)
 {
@@ -330,19 +286,6 @@ evas_object_intercept_hide_callback_add(Evas_Object *obj, Evas_Object_Intercept_
    obj->interceptors->hide.data = (void *)data;
 }
 
-/**
- * Unset the callback function that intercepts a hide event of a
- * object.
- *
- * @param obj The given canvas object pointer.
- * @param func The given callback function.
- *
- * This function sets a callback function to intercepts a hide event
- * of a canvas object.
- *
- * @see evas_object_intercept_hide_callback_add().
- *
- */
 EAPI void *
 evas_object_intercept_hide_callback_del(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func)
 {
@@ -361,19 +304,6 @@ evas_object_intercept_hide_callback_del(Evas_Object *obj, Evas_Object_Intercept_
    return data;
 }
 
-/**
- * Set the callback function that intercepts a move event of a object.
- *
- * @param obj The given canvas object pointer.
- * @param func The given function to be the callback function.
- * @param data The data passed to the callback function.
- *
- * This function sets a callback function to intercepts a move event
- * of a canvas object.
- *
- * @see evas_object_intercept_move_callback_del().
- *
- */
 EAPI void
 evas_object_intercept_move_callback_add(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func, const void *data)
 {
@@ -388,19 +318,6 @@ evas_object_intercept_move_callback_add(Evas_Object *obj, Evas_Object_Intercept_
    obj->interceptors->move.data = (void *)data;
 }
 
-/**
- * Unset the callback function that intercepts a move event of a
- * object.
- *
- * @param obj The given canvas object pointer.
- * @param func The given callback function.
- *
- * This function sets a callback function to intercepts a move event
- * of a canvas object.
- *
- * @see evas_object_intercept_move_callback_add().
- *
- */
 EAPI void *
 evas_object_intercept_move_callback_del(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func)
 {
@@ -419,12 +336,6 @@ evas_object_intercept_move_callback_del(Evas_Object *obj, Evas_Object_Intercept_
    return data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_intercept_resize_callback_add(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func, const void *data)
 {
@@ -439,12 +350,6 @@ evas_object_intercept_resize_callback_add(Evas_Object *obj, Evas_Object_Intercep
    obj->interceptors->resize.data = (void *)data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void *
 evas_object_intercept_resize_callback_del(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func)
 {
@@ -463,12 +368,6 @@ evas_object_intercept_resize_callback_del(Evas_Object *obj, Evas_Object_Intercep
    return data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_intercept_raise_callback_add(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func, const void *data)
 {
@@ -483,12 +382,6 @@ evas_object_intercept_raise_callback_add(Evas_Object *obj, Evas_Object_Intercept
    obj->interceptors->raise.data = (void *)data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void *
 evas_object_intercept_raise_callback_del(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func)
 {
@@ -507,12 +400,6 @@ evas_object_intercept_raise_callback_del(Evas_Object *obj, Evas_Object_Intercept
    return data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_intercept_lower_callback_add(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func, const void *data)
 {
@@ -527,12 +414,6 @@ evas_object_intercept_lower_callback_add(Evas_Object *obj, Evas_Object_Intercept
    obj->interceptors->lower.data = (void *)data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void *
 evas_object_intercept_lower_callback_del(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func)
 {
@@ -551,12 +432,6 @@ evas_object_intercept_lower_callback_del(Evas_Object *obj, Evas_Object_Intercept
    return data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_intercept_stack_above_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func, const void *data)
 {
@@ -571,12 +446,6 @@ evas_object_intercept_stack_above_callback_add(Evas_Object *obj, Evas_Object_Int
    obj->interceptors->stack_above.data = (void *)data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void *
 evas_object_intercept_stack_above_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func)
 {
@@ -595,12 +464,6 @@ evas_object_intercept_stack_above_callback_del(Evas_Object *obj, Evas_Object_Int
    return data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_intercept_stack_below_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func, const void *data)
 {
@@ -615,12 +478,6 @@ evas_object_intercept_stack_below_callback_add(Evas_Object *obj, Evas_Object_Int
    obj->interceptors->stack_below.data = (void *)data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void *
 evas_object_intercept_stack_below_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func)
 {
@@ -639,12 +496,6 @@ evas_object_intercept_stack_below_callback_del(Evas_Object *obj, Evas_Object_Int
    return data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_intercept_layer_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func, const void *data)
 {
@@ -659,12 +510,6 @@ evas_object_intercept_layer_set_callback_add(Evas_Object *obj, Evas_Object_Inter
    obj->interceptors->layer_set.data = (void *)data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void *
 evas_object_intercept_layer_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func)
 {
@@ -683,12 +528,6 @@ evas_object_intercept_layer_set_callback_del(Evas_Object *obj, Evas_Object_Inter
    return data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_intercept_color_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func, const void *data)
 {
@@ -703,12 +542,6 @@ evas_object_intercept_color_set_callback_add(Evas_Object *obj, Evas_Object_Inter
    obj->interceptors->color_set.data = (void *)data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void *
 evas_object_intercept_color_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func)
 {
@@ -727,12 +560,6 @@ evas_object_intercept_color_set_callback_del(Evas_Object *obj, Evas_Object_Inter
    return data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_intercept_clip_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func, const void *data)
 {
@@ -747,12 +574,6 @@ evas_object_intercept_clip_set_callback_add(Evas_Object *obj, Evas_Object_Interc
    obj->interceptors->clip_set.data = (void *)data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void *
 evas_object_intercept_clip_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func)
 {
@@ -771,12 +592,6 @@ evas_object_intercept_clip_set_callback_del(Evas_Object *obj, Evas_Object_Interc
    return data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_intercept_clip_unset_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func, const void *data)
 {
@@ -791,12 +606,6 @@ evas_object_intercept_clip_unset_callback_add(Evas_Object *obj, Evas_Object_Inte
    obj->interceptors->clip_unset.data = (void *)data;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void *
 evas_object_intercept_clip_unset_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func)
 {
@@ -814,7 +623,3 @@ evas_object_intercept_clip_unset_callback_del(Evas_Object *obj, Evas_Object_Inte
    evas_object_intercept_deinit(obj);
    return data;
 }
-
-/**
- * @}
- */
index f835aee..c7f9dce 100644 (file)
@@ -72,19 +72,8 @@ static const Evas_Object_Func object_func =
 /* the actual api call to add a rect */
 /* it has no other api calls as all properties are standard */
 
-
-/**
- * @addtogroup Evas_Line_Group
- * @{
- */
-
 EVAS_MEMPOOL(_mp_obj);
 
-/**
- * Adds a new evas line object to the given evas.
- * @param   e The given evas.
- * @return  The new evas line object.
- */
 EAPI Evas_Object *
 evas_object_line_add(Evas *e)
 {
@@ -99,14 +88,6 @@ evas_object_line_add(Evas *e)
    return obj;
 }
 
-/**
- * Sets the coordinates of the end points of the given evas line object.
- * @param   obj The given evas line object.
- * @param   x1  The X coordinate of the first point.
- * @param   y1  The Y coordinate of the first point.
- * @param   x2  The X coordinate of the second point.
- * @param   y2  The Y coordinate of the second point.
- */
 EAPI void
 evas_object_line_xy_set(Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2)
 {
@@ -182,18 +163,6 @@ evas_object_line_xy_set(Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coo
    evas_object_inform_call_resize(obj);
 }
 
-/**
- * Retrieves the coordinates of the end points of the given evas line object.
- * @param obj The given line object.
- * @param x1  Pointer to an integer in which to store the X coordinate of the
- *            first end point.
- * @param y1  Pointer to an integer in which to store the Y coordinate of the
- *            first end point.
- * @param x2  Pointer to an integer in which to store the X coordinate of the
- *            second end point.
- * @param y2  Pointer to an integer in which to store the Y coordinate of the
- *            second end point.
- */
 EAPI void
 evas_object_line_xy_get(const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2)
 {
@@ -220,10 +189,6 @@ evas_object_line_xy_get(const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1,
    if (y2) *y2 = obj->cur.geometry.y + o->cur.y2;
 }
 
-/**
- * @}
- */
-
 /* all nice and private */
 static void
 evas_object_line_init(Evas_Object *obj)
index 531790e..d4888af 100644 (file)
@@ -21,9 +21,11 @@ evas_object_new(Evas *e __UNUSED__)
    obj = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object);
    if (!obj) return NULL;
    EVAS_MEMPOOL_PREP(_mp_obj, obj, Evas_Object);
+
    obj->magic = MAGIC_OBJ;
    obj->cur.scale = 1.0;
    obj->prev.scale = 1.0;
+
    return obj;
 }
 
@@ -32,6 +34,9 @@ evas_object_free(Evas_Object *obj, int clean_layer)
 {
    int was_smart_child = 0;
 
+#if 0 // filtering disabled
+   evas_filter_free(obj);
+#endif
    evas_object_map_set(obj, NULL);
    evas_object_grabs_cleanup(obj);
    evas_object_intercept_cleanup(obj);
@@ -46,11 +51,11 @@ evas_object_free(Evas_Object *obj, int clean_layer)
    evas_object_event_callback_cleanup(obj);
    while (obj->data.elements)
      {
-       Evas_Data_Node *node;
+        Evas_Data_Node *node;
 
-       node = obj->data.elements->data;
-       obj->data.elements = eina_list_remove(obj->data.elements, node);
-       free(node);
+        node = obj->data.elements->data;
+        obj->data.elements = eina_list_remove(obj->data.elements, node);
+        free(node);
      }
    obj->magic = 0;
    if (obj->size_hints)
@@ -66,7 +71,7 @@ evas_object_change(Evas_Object *obj)
    Eina_List *l;
    Evas_Object *obj2;
    Eina_Bool movch = 0;
-   
+
    if (obj->layer->evas->nochange)
      {
 //        printf("nochange %p\n", obj);
@@ -95,6 +100,10 @@ evas_object_change(Evas_Object *obj)
      {
         EINA_LIST_FOREACH(obj->clip.clipees, l, obj2) evas_object_change(obj2);
      }
+   EINA_LIST_FOREACH(obj->proxy.proxies, l, obj2)
+     {
+        evas_object_change(obj2);
+     }
    if (obj->smart.parent) evas_object_change(obj->smart.parent);
 }
 
@@ -105,19 +114,19 @@ evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int i
    if (is_v == was_v) return ;
    if (is_v)
      {
-       evas_add_rect(rects,
-                     obj->cur.cache.clip.x,
-                     obj->cur.cache.clip.y,
-                     obj->cur.cache.clip.w,
-                     obj->cur.cache.clip.h);
+        evas_add_rect(rects,
+                      obj->cur.cache.clip.x,
+                      obj->cur.cache.clip.y,
+                      obj->cur.cache.clip.w,
+                      obj->cur.cache.clip.h);
      }
    else
      {
-       evas_add_rect(rects,
-                     obj->prev.cache.clip.x,
-                     obj->prev.cache.clip.y,
-                     obj->prev.cache.clip.w,
-                     obj->prev.cache.clip.h);
+        evas_add_rect(rects,
+                      obj->prev.cache.clip.x,
+                      obj->prev.cache.clip.y,
+                      obj->prev.cache.clip.w,
+                      obj->prev.cache.clip.h);
      }
 }
 
@@ -128,48 +137,48 @@ evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj)
    if (obj->cur.clipper == obj->prev.clipper) return ;
    if ((obj->cur.clipper) && (obj->prev.clipper))
      {
-       /* get difference rects between clippers */
-       evas_rects_return_difference_rects(rects,
-                                          obj->cur.clipper->cur.cache.clip.x,
-                                          obj->cur.clipper->cur.cache.clip.y,
-                                          obj->cur.clipper->cur.cache.clip.w,
-                                          obj->cur.clipper->cur.cache.clip.h,
-                                          obj->prev.clipper->prev.cache.clip.x,
-                                          obj->prev.clipper->prev.cache.clip.y,
-                                          obj->prev.clipper->prev.cache.clip.w,
-                                          obj->prev.clipper->prev.cache.clip.h);
+        /* get difference rects between clippers */
+        evas_rects_return_difference_rects(rects,
+                                           obj->cur.clipper->cur.cache.clip.x,
+                                           obj->cur.clipper->cur.cache.clip.y,
+                                           obj->cur.clipper->cur.cache.clip.w,
+                                           obj->cur.clipper->cur.cache.clip.h,
+                                           obj->prev.clipper->prev.cache.clip.x,
+                                           obj->prev.clipper->prev.cache.clip.y,
+                                           obj->prev.clipper->prev.cache.clip.w,
+                                           obj->prev.clipper->prev.cache.clip.h);
      }
    else if (obj->cur.clipper)
      {
-       evas_rects_return_difference_rects(rects,
-                                          obj->cur.geometry.x,
-                                          obj->cur.geometry.y,
-                                          obj->cur.geometry.w,
-                                          obj->cur.geometry.h,
+        evas_rects_return_difference_rects(rects,
+                                           obj->cur.geometry.x,
+                                           obj->cur.geometry.y,
+                                           obj->cur.geometry.w,
+                                           obj->cur.geometry.h,
 ////   rl = evas_rects_return_difference_rects(obj->cur.cache.geometry.x,
 ////                                           obj->cur.cache.geometry.y,
 ////                                           obj->cur.cache.geometry.w,
 ////                                           obj->cur.cache.geometry.h,
-                                          obj->cur.clipper->cur.cache.clip.x,
-                                          obj->cur.clipper->cur.cache.clip.y,
-                                          obj->cur.clipper->cur.cache.clip.w,
-                                          obj->cur.clipper->cur.cache.clip.h);
+                                           obj->cur.clipper->cur.cache.clip.x,
+                                           obj->cur.clipper->cur.cache.clip.y,
+                                           obj->cur.clipper->cur.cache.clip.w,
+                                           obj->cur.clipper->cur.cache.clip.h);
      }
    else if (obj->prev.clipper)
      {
-       evas_rects_return_difference_rects(rects,
-                                          obj->prev.geometry.x,
-                                          obj->prev.geometry.y,
-                                          obj->prev.geometry.w,
-                                          obj->prev.geometry.h,
+     evas_rects_return_difference_rects(rects,
+                                        obj->prev.geometry.x,
+                                        obj->prev.geometry.y,
+                                        obj->prev.geometry.w,
+                                        obj->prev.geometry.h,
 ////   rl = evas_rects_return_difference_rects(obj->prev.cache.geometry.x,
 ////                                           obj->prev.cache.geometry.y,
 ////                                           obj->prev.cache.geometry.w,
 ////                                           obj->prev.cache.geometry.h,
-                                          obj->prev.clipper->prev.cache.clip.x,
-                                          obj->prev.clipper->prev.cache.clip.y,
-                                          obj->prev.clipper->prev.cache.clip.w,
-                                          obj->prev.clipper->prev.cache.clip.h);
+                                        obj->prev.clipper->prev.cache.clip.x,
+                                        obj->prev.clipper->prev.cache.clip.y,
+                                        obj->prev.clipper->prev.cache.clip.w,
+                                        obj->prev.clipper->prev.cache.clip.h);
      }
 }
 
@@ -231,74 +240,74 @@ evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int i
    was_v = 0;
    if (!obj->clip.clipees)
      {
-       EINA_ARRAY_ITER_NEXT(rects, i, r, it)
-         {
-            /* get updates and clip to current clip */
-            x = r->x;
-            y = r->y;
-            w = r->w;
-            h = r->h;
-            RECTS_CLIP_TO_RECT(x, y, w, h,
-                               obj->cur.cache.clip.x,
-                               obj->cur.cache.clip.y,
-                               obj->cur.cache.clip.w,
-                               obj->cur.cache.clip.h);
-            if ((w > 0) && (h > 0))
-              obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output,
-                                                                     x, y, w, h);
-            /* get updates and clip to previous clip */
-            x = r->x;
-            y = r->y;
-            w = r->w;
-            h = r->h;
-            RECTS_CLIP_TO_RECT(x, y, w, h,
-                               obj->prev.cache.clip.x,
-                               obj->prev.cache.clip.y,
-                               obj->prev.cache.clip.w,
-                               obj->prev.cache.clip.h);
-            if ((w > 0) && (h > 0))
-              obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output,
-                                                                     x, y, w, h);
-         }
-       /* if the object is actually visible, take any parent clip changes */
-       if (is_v)
-         {
-            clipper = obj->cur.clipper;
-            while (clipper)
-              {
-                 EINA_LIST_FOREACH(clipper->clip.changes, l, r)
-                   {
-                      /* get updates and clip to current clip */
-                      x = r->x; y = r->y; w = r->w; h = r->h;
-                      RECTS_CLIP_TO_RECT(x, y, w, h,
-                                         obj->cur.cache.clip.x,
-                                         obj->cur.cache.clip.y,
-                                         obj->cur.cache.clip.w,
-                                         obj->cur.cache.clip.h);
-                      if ((w > 0) && (h > 0))
-                        obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output,
-                                                                               x, y, w, h);
-                      /* get updates and clip to previous clip */
-                      x = r->x; y = r->y; w = r->w; h = r->h;
-                      RECTS_CLIP_TO_RECT(x, y, w, h,
-                                         obj->prev.cache.clip.x,
-                                         obj->prev.cache.clip.y,
-                                         obj->prev.cache.clip.w,
-                                         obj->prev.cache.clip.h);
-                      if ((w > 0) && (h > 0))
-                        obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output,
-                                                                               x, y, w, h);
-                   }
-                 clipper = clipper->cur.clipper;
-              }
-         }
+        EINA_ARRAY_ITER_NEXT(rects, i, r, it)
+          {
+             /* get updates and clip to current clip */
+             x = r->x;
+             y = r->y;
+             w = r->w;
+             h = r->h;
+             RECTS_CLIP_TO_RECT(x, y, w, h,
+                                obj->cur.cache.clip.x,
+                                obj->cur.cache.clip.y,
+                                obj->cur.cache.clip.w,
+                                obj->cur.cache.clip.h);
+             if ((w > 0) && (h > 0))
+               obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output,
+                                                                      x, y, w, h);
+             /* get updates and clip to previous clip */
+             x = r->x;
+             y = r->y;
+             w = r->w;
+             h = r->h;
+             RECTS_CLIP_TO_RECT(x, y, w, h,
+                                obj->prev.cache.clip.x,
+                                obj->prev.cache.clip.y,
+                                obj->prev.cache.clip.w,
+                                obj->prev.cache.clip.h);
+             if ((w > 0) && (h > 0))
+               obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output,
+                                                                      x, y, w, h);
+          }
+        /* if the object is actually visible, take any parent clip changes */
+        if (is_v)
+          {
+             clipper = obj->cur.clipper;
+             while (clipper)
+               {
+                  EINA_LIST_FOREACH(clipper->clip.changes, l, r)
+                    {
+                       /* get updates and clip to current clip */
+                       x = r->x; y = r->y; w = r->w; h = r->h;
+                       RECTS_CLIP_TO_RECT(x, y, w, h,
+                                          obj->cur.cache.clip.x,
+                                          obj->cur.cache.clip.y,
+                                          obj->cur.cache.clip.w,
+                                          obj->cur.cache.clip.h);
+                       if ((w > 0) && (h > 0))
+                         obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output,
+                                                                                x, y, w, h);
+                       /* get updates and clip to previous clip */
+                       x = r->x; y = r->y; w = r->w; h = r->h;
+                       RECTS_CLIP_TO_RECT(x, y, w, h,
+                                          obj->prev.cache.clip.x,
+                                          obj->prev.cache.clip.y,
+                                          obj->prev.cache.clip.w,
+                                          obj->prev.cache.clip.h);
+                       if ((w > 0) && (h > 0))
+                         obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output,
+                                                                                x, y, w, h);
+                    }
+                  clipper = clipper->cur.clipper;
+               }
+          }
      }
    else
      {
-       evas_object_clip_changes_clean(obj);
-       EINA_ARRAY_ITER_NEXT(rects, i, r, it)
-         obj->clip.changes = eina_list_append(obj->clip.changes, r);
-       eina_array_clean(rects);
+        evas_object_clip_changes_clean(obj);
+        EINA_ARRAY_ITER_NEXT(rects, i, r, it)
+           obj->clip.changes = eina_list_append(obj->clip.changes, r);
+        eina_array_clean(rects);
      }
 
  end:
@@ -313,10 +322,10 @@ evas_object_was_in_output_rect(Evas_Object *obj, int x, int y, int w, int h)
    if (obj->smart.smart) return 0;
    /* assumes coords have been recalced */
    if ((RECTS_INTERSECT(x, y, w, h,
-                       obj->prev.cache.clip.x,
-                       obj->prev.cache.clip.y,
-                       obj->prev.cache.clip.w,
-                       obj->prev.cache.clip.h)))
+                        obj->prev.cache.clip.x,
+                        obj->prev.cache.clip.y,
+                        obj->prev.cache.clip.w,
+                        obj->prev.cache.clip.h)))
      return 1;
    return 0;
 }
@@ -327,9 +336,9 @@ evas_object_was_opaque(Evas_Object *obj)
    if (obj->smart.smart) return 0;
    if (obj->prev.cache.clip.a == 255)
      {
-       if (obj->func->was_opaque)
-         return obj->func->was_opaque(obj);
-       return 1;
+        if (obj->func->was_opaque)
+          return obj->func->was_opaque(obj);
+        return 1;
      }
    return 0;
 }
@@ -353,20 +362,6 @@ evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
 }
 /* routines apps will call */
 
-/**
- * Increments object reference count to defer deletion
- * 
- * This increments the reference count of an object, which if greater than
- * 0 will defer deletion by evas_object_del() until all references are
- * released back to 0. References cannot go below 0 and unreferencing more
- * times that referencing will result in the reference count being limited
- * to 0. References are limited to 2^32 - 1 for an object. Referencing it more
- * than this will result in it being limited to this value.
- * 
- * @param obj The given evas object to reference
- * @ingroup Evas_Object_Group_Basic
- * @since 1.1.0
- */
 EAPI void
 evas_object_ref(Evas_Object *obj)
 {
@@ -377,18 +372,6 @@ evas_object_ref(Evas_Object *obj)
    if (obj->ref == 0) obj->ref--;
 }
 
-/**
- * Decrements object reference count to defer deletion
- * 
- * This decrements the reference count of an object. If the object has had
- * evas_object_del() called on it while references were more than 0, it will
- * be deleted at the time this function is called as it normally would have
- * been. See evas_object_ref() for more information.
- * 
- * @param obj The given evas object to unreference
- * @ingroup Evas_Object_Group_Basic
- * @since 1.1.0
- */
 EAPI void
 evas_object_unref(Evas_Object *obj)
 {
@@ -400,16 +383,6 @@ evas_object_unref(Evas_Object *obj)
    if ((obj->del_ref) && (obj->ref == 0)) evas_object_del(obj);
 }
 
-/**
- * Deletes the given evas object and frees its memory.
- *
- * The object's 'free' callback is called when this function is called.
- * If the object currently has the focus, its 'focus out' callback is
- * also called.
- *
- * @param   obj The given evas object.
- * @ingroup Evas_Object_Group_Basic
- */
 EAPI void
 evas_object_del(Evas_Object *obj)
 {
@@ -431,10 +404,10 @@ evas_object_del(Evas_Object *obj)
    evas_object_hide(obj);
    if (obj->focused)
      {
-       obj->focused = 0;
-       obj->layer->evas->focused = NULL;
-       _evas_object_event_new();
-       evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL);
+        obj->focused = 0;
+        obj->layer->evas->focused = NULL;
+        _evas_object_event_new();
+        evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL);
         _evas_post_event_callback_call(obj->layer->evas);
      }
    _evas_object_event_new();
@@ -443,14 +416,14 @@ evas_object_del(Evas_Object *obj)
    if (obj->name) evas_object_name_set(obj, NULL);
    if (!obj->layer)
      {
-       evas_object_free(obj, 1);
-       return;
+        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) 
+   while (obj->clip.clipees)
      evas_object_clip_unset(obj->clip.clipees->data);
    while (obj->proxy.proxies)
      evas_object_image_source_unset(obj->proxy.proxies->data);
@@ -465,13 +438,6 @@ evas_object_del(Evas_Object *obj)
    evas_object_change(obj);
 }
 
-/**
- * Moves the given evas object to the given location.
- * @param   obj The given evas object.
- * @param   x   X position to move the object to, in canvas units.
- * @param   y   Y position to move the object to, in canvas units.
- * @ingroup Evas_Object_Group_Basic
- */
 EAPI void
 evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
 {
@@ -490,17 +456,17 @@ evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
    if ((obj->cur.geometry.x == x) && (obj->cur.geometry.y == y)) return;
    if (obj->layer->evas->events_frozen <= 0)
      {
-       pass = evas_event_passes_through(obj);
-       if (!pass)
-         was = evas_object_is_in_output_rect(obj,
-                                             obj->layer->evas->pointer.x,
-                                             obj->layer->evas->pointer.y, 1, 1);
+        pass = evas_event_passes_through(obj);
+        if (!pass)
+          was = evas_object_is_in_output_rect(obj,
+                                              obj->layer->evas->pointer.x,
+                                              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);
+        if (obj->smart.smart->smart_class->move)
+          obj->smart.smart->smart_class->move(obj, x, y);
      }
    obj->cur.geometry.x = x;
    obj->cur.geometry.y = y;
@@ -511,50 +477,26 @@ evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
    obj->doing.in_move--;
    if (obj->layer->evas->events_frozen <= 0)
      {
-       evas_object_recalc_clippees(obj);
-       if (!pass)
-         {
-            if (!obj->smart.smart)
-              {
-                 is = evas_object_is_in_output_rect(obj,
-                                                    obj->layer->evas->pointer.x,
-                                                    obj->layer->evas->pointer.y, 1, 1);
-                 if ((is ^ was) && obj->cur.visible)
-                   evas_event_feed_mouse_move(obj->layer->evas,
-                                              obj->layer->evas->pointer.x,
-                                              obj->layer->evas->pointer.y,
-                                              obj->layer->evas->last_timestamp,
-                                              NULL);
-              }
-         }
+        evas_object_recalc_clippees(obj);
+        if (!pass)
+          {
+             if (!obj->smart.smart)
+               {
+                  is = evas_object_is_in_output_rect(obj,
+                                                     obj->layer->evas->pointer.x,
+                                                     obj->layer->evas->pointer.y, 1, 1);
+                  if ((is ^ was) && obj->cur.visible)
+                    evas_event_feed_mouse_move(obj->layer->evas,
+                                               obj->layer->evas->pointer.x,
+                                               obj->layer->evas->pointer.y,
+                                               obj->layer->evas->last_timestamp,
+                                               NULL);
+               }
+          }
      }
    evas_object_inform_call_move(obj);
 }
 
-/**
- * Changes the size of the given evas object.
- * @param   obj The given evas object.
- * @param   w   The new width of the evas object.
- * @param   h   The new height of the evas object.
- *
- * @note Be aware that resizing an object changes its drawing area,
- *       but that does imply the object is rescaled! For instance,
- *       images are filled inside their drawing area using the
- *       specifications of evas_object_image_fill_set(), thus to scale
- *       the image to match exactly your drawing area, you need to
- *       change the evas_object_image_fill_set() as well. Consider the
- *       following example:
- *       @code
- *       // rescale image to fill exactly its area without tiling:
- *       evas_object_resize(img, w, h);
- *       evas_object_image_fill_set(img, 0, 0, w, h);
- *       @endcode
- *       This is more evident in images, but text, textblock, lines
- *       and polygons will behave similarly. Check their specific APIs
- *       to know how to achieve your desired behavior.
- *
- * @ingroup Evas_Object_Group_Basic
- */
 EAPI void
 evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
 {
@@ -574,17 +516,17 @@ evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
    if ((obj->cur.geometry.w == w) && (obj->cur.geometry.h == h)) return;
    if (obj->layer->evas->events_frozen <= 0)
      {
-       pass = evas_event_passes_through(obj);
-       if (!pass)
-         was = evas_object_is_in_output_rect(obj,
-                                             obj->layer->evas->pointer.x,
-                                             obj->layer->evas->pointer.y, 1, 1);
+        pass = evas_event_passes_through(obj);
+        if (!pass)
+          was = evas_object_is_in_output_rect(obj,
+                                              obj->layer->evas->pointer.x,
+                                              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, w, h);
      }
    obj->cur.geometry.w = w;
    obj->cur.geometry.h = h;
@@ -598,43 +540,26 @@ evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
         /* NB: If this creates glitches on screen then move to above position */
         evas_object_recalc_clippees(obj);
 
-       //   if (obj->func->coords_recalc) obj->func->coords_recalc(obj);
-       if (!pass)
-         {
-            if (!obj->smart.smart)
-              {
-                 is = evas_object_is_in_output_rect(obj,
-                                                    obj->layer->evas->pointer.x,
-                                                    obj->layer->evas->pointer.y, 1, 1);
-                 if ((is ^ was) && (obj->cur.visible))
-                   evas_event_feed_mouse_move(obj->layer->evas,
-                                              obj->layer->evas->pointer.x,
-                                              obj->layer->evas->pointer.y,
-                                              obj->layer->evas->last_timestamp,
-                                              NULL);
-              }
-         }
+        //   if (obj->func->coords_recalc) obj->func->coords_recalc(obj);
+        if (!pass)
+          {
+             if (!obj->smart.smart)
+               {
+                  is = evas_object_is_in_output_rect(obj,
+                                                     obj->layer->evas->pointer.x,
+                                                     obj->layer->evas->pointer.y, 1, 1);
+                  if ((is ^ was) && (obj->cur.visible))
+                    evas_event_feed_mouse_move(obj->layer->evas,
+                                               obj->layer->evas->pointer.x,
+                                               obj->layer->evas->pointer.y,
+                                               obj->layer->evas->last_timestamp,
+                                               NULL);
+               }
+          }
      }
    evas_object_inform_call_resize(obj);
 }
 
-/**
- * Retrieves the position and rectangular size of the given evas object.
- *
- * Note that if any of @p x, @p y, @p w or @p h are @c NULL, the @c NULL
- * parameters are ignored.
- *
- * @param obj The given evas object.
- * @param   x   Pointer to an integer in which to store the X coordinate of
- *              the object.
- * @param   y   Pointer to an integer in which to store the Y coordinate of
- *              the object.
- * @param   w   Pointer to an integer in which to store the width of the
- *              object.
- * @param   h   Pointer to an integer in which to store the height of the
- *              object.
- * @ingroup Evas_Object_Group_Basic
- */
 EAPI void
 evas_object_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
 {
@@ -644,8 +569,8 @@ evas_object_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, E
    MAGIC_CHECK_END();
    if (obj->delete_me)
      {
-       if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0;
-       return;
+        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;
@@ -653,11 +578,6 @@ evas_object_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, E
    if (h) *h = obj->cur.geometry.h;
 }
 
-/**
- * @addtogroup Evas_Object_Group_Size_Hints
- * @{
- */
-
 static void
 _evas_object_size_hint_alloc(Evas_Object *obj)
 {
@@ -673,19 +593,6 @@ _evas_object_size_hint_alloc(Evas_Object *obj)
    obj->size_hints->align.y = 0.5;
 }
 
-/**
- * Retrieves the size hint for the minimum size.
- *
- * This is not a size enforcement in any way, it's just a hint that should
- * be used whenever appropriate.
- *
- * Note that if any of @p w or @p h are @c NULL, the @c NULL
- * parameters are ignored.
- *
- * @param obj The given evas object.
- * @param   w Pointer to an integer in which to store the minimum width.
- * @param   h Pointer to an integer in which to store the minimum height.
- */
 EAPI void
 evas_object_size_hint_min_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
 {
@@ -695,25 +602,13 @@ evas_object_size_hint_min_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord
    MAGIC_CHECK_END();
    if ((!obj->size_hints) || obj->delete_me)
      {
-       if (w) *w = 0; if (h) *h = 0;
-       return;
+        if (w) *w = 0; if (h) *h = 0;
+        return;
      }
    if (w) *w = obj->size_hints->min.w;
    if (h) *h = obj->size_hints->min.h;
 }
 
-/**
- * Sets the size hint for the minimum size.
- *
- * This is not a size enforcement in any way, it's just a hint that should
- * be used whenever appropriate.
- *
- * Value 0 is considered unset.
- *
- * @param obj The given evas object.
- * @param   w Integer to use as the minimum width hint.
- * @param   h Integer to use as the minimum height hint.
- */
 EAPI void
 evas_object_size_hint_min_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
 {
@@ -730,19 +625,6 @@ evas_object_size_hint_min_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
    evas_object_inform_call_changed_size_hints(obj);
 }
 
-/**
- * Retrieves the size hint for the maximum size.
- *
- * This is not a size enforcement in any way, it's just a hint that should
- * be used whenever appropriate.
- *
- * Note that if any of @p w or @p h are @c NULL, the @c NULL
- * parameters are ignored.
- *
- * @param obj The given evas object.
- * @param   w Pointer to an integer in which to store the maximum width.
- * @param   h Pointer to an integer in which to store the maximum height.
- */
 EAPI void
 evas_object_size_hint_max_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
 {
@@ -752,25 +634,13 @@ evas_object_size_hint_max_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord
    MAGIC_CHECK_END();
    if ((!obj->size_hints) || obj->delete_me)
      {
-       if (w) *w = -1; if (h) *h = -1;
-       return;
+        if (w) *w = -1; if (h) *h = -1;
+        return;
      }
    if (w) *w = obj->size_hints->max.w;
    if (h) *h = obj->size_hints->max.h;
 }
 
-/**
- * Sets the size hint for the maximum size.
- *
- * This is not a size enforcement in any way, it's just a hint that should
- * be used whenever appropriate.
- *
- * Value -1 is considered unset.
- *
- * @param obj The given evas object.
- * @param   w Integer to use as the maximum width hint.
- * @param   h Integer to use as the maximum height hint.
- */
 EAPI void
 evas_object_size_hint_max_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
 {
@@ -787,19 +657,6 @@ evas_object_size_hint_max_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
    evas_object_inform_call_changed_size_hints(obj);
 }
 
-/**
- * Retrieves the size request hint.
- *
- * This is not a size enforcement in any way, it's just a hint that should
- * be used whenever appropriate.
- *
- * Note that if any of @p w or @p h are @c NULL, the @c NULL
- * parameters are ignored.
- *
- * @param obj The given evas object.
- * @param   w Pointer to an integer in which to store the requested width.
- * @param   h Pointer to an integer in which to store the requested height.
- */
 EAPI void
 evas_object_size_hint_request_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
 {
@@ -809,25 +666,13 @@ evas_object_size_hint_request_get(const Evas_Object *obj, Evas_Coord *w, Evas_Co
    MAGIC_CHECK_END();
    if ((!obj->size_hints) || obj->delete_me)
      {
-       if (w) *w = 0; if (h) *h = 0;
-       return;
+        if (w) *w = 0; if (h) *h = 0;
+        return;
      }
    if (w) *w = obj->size_hints->request.w;
    if (h) *h = obj->size_hints->request.h;
 }
 
-/**
- * Sets the requested size hint.
- *
- * This is not a size enforcement in any way, it's just a hint that should
- * be used whenever appropriate.
- *
- * Value 0 is considered unset.
- *
- * @param obj The given evas object.
- * @param   w Integer to use as the preferred width hint.
- * @param   h Integer to use as the preferred height hint.
- */
 EAPI void
 evas_object_size_hint_request_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
 {
@@ -844,20 +689,6 @@ evas_object_size_hint_request_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
    evas_object_inform_call_changed_size_hints(obj);
 }
 
-/**
- * Retrieves the size aspect control hint.
- *
- * This is not a size enforcement in any way, it's just a hint that should
- * be used whenever appropriate.
- *
- * Note that if any of @p aspect, @p w or @p h are @c NULL, the @c NULL
- * parameters are ignored.
- *
- * @param    obj The given evas object.
- * @param aspect Returns the hint on how size should be calculated.
- * @param      w Pointer to an integer in which to store the aspect width.
- * @param      h Pointer to an integer in which to store the aspect height.
- */
 EAPI void
 evas_object_size_hint_aspect_get(const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h)
 {
@@ -868,26 +699,15 @@ evas_object_size_hint_aspect_get(const Evas_Object *obj, Evas_Aspect_Control *as
    MAGIC_CHECK_END();
    if ((!obj->size_hints) || obj->delete_me)
      {
-       if (aspect) *aspect = EVAS_ASPECT_CONTROL_NONE;
-       if (w) *w = 0; if (h) *h = 0;
-       return;
+        if (aspect) *aspect = EVAS_ASPECT_CONTROL_NONE;
+        if (w) *w = 0; if (h) *h = 0;
+        return;
      }
    if (aspect) *aspect = obj->size_hints->aspect.mode;
    if (w) *w = obj->size_hints->aspect.size.w;
    if (h) *h = obj->size_hints->aspect.size.h;
 }
 
-/**
- * Sets the size aspect control hint.
- *
- * This is not a size enforcement in any way, it's just a hint that should
- * be used whenever appropriate.
- *
- * @param    obj The given evas object.
- * @param aspect Hint on how to calculate size.
- * @param      w Integer to use as aspect width hint.
- * @param      h Integer to use as aspect height hint.
- */
 EAPI void
 evas_object_size_hint_aspect_set(Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h)
 {
@@ -905,19 +725,6 @@ evas_object_size_hint_aspect_set(Evas_Object *obj, Evas_Aspect_Control aspect, E
    evas_object_inform_call_changed_size_hints(obj);
 }
 
-/**
- * Retrieves the size align control hint.
- *
- * This is not a size enforcement in any way, it's just a hint that should
- * be used whenever appropriate.
- *
- * Note that if any of @p x or @p y are @c NULL, the @c NULL
- * parameters are ignored.
- *
- * @param    obj The given evas object.
- * @param      x Pointer to a double in which to store the align x.
- * @param      y Pointer to a double in which to store the align y.
- */
 EAPI void
 evas_object_size_hint_align_get(const Evas_Object *obj, double *x, double *y)
 {
@@ -927,27 +734,13 @@ evas_object_size_hint_align_get(const Evas_Object *obj, double *x, double *y)
    MAGIC_CHECK_END();
    if ((!obj->size_hints) || obj->delete_me)
      {
-       if (x) *x = 0.5; if (y) *y = 0.5;
-       return;
+        if (x) *x = 0.5; if (y) *y = 0.5;
+        return;
      }
    if (x) *x = obj->size_hints->align.x;
    if (y) *y = obj->size_hints->align.y;
 }
 
-/**
- * Sets the size align control hint.
- *
- * This is not a size enforcement in any way, it's just a hint that should
- * be used whenever appropriate.
- *
- * Accepted values are in the 0.0 to 1.0 range, with the special value
- * -1.0 used to specify "justify" or "fill" by some users. See
- * documentation of possible users.
- *
- * @param    obj The given evas object.
- * @param      x Double (0.0..1.0 or -1.0) to use as align x hint.
- * @param      y Double (0.0..1.0 or -1.0) to use as align y hint.
- */
 EAPI void
 evas_object_size_hint_align_set(Evas_Object *obj, double x, double y)
 {
@@ -964,23 +757,6 @@ evas_object_size_hint_align_set(Evas_Object *obj, double x, double y)
    evas_object_inform_call_changed_size_hints(obj);
 }
 
-/**
- * Retrieves the size weight control hint.
- *
- * This is not a size enforcement in any way, it's just a hint that should
- * be used whenever appropriate.
- *
- * Note that if any of @p x or @p y are @c NULL, the @c NULL
- * parameters are ignored.
- *
- * Accepted values are zero or positive values. Some users might use
- * this hint as a boolean, but some might consider it as a proportion,
- * see documentation of possible users.
- *
- * @param    obj The given evas object.
- * @param      x Pointer to a double in which to store the weight x.
- * @param      y Pointer to a double in which to store the weight y.
- */
 EAPI void
 evas_object_size_hint_weight_get(const Evas_Object *obj, double *x, double *y)
 {
@@ -990,23 +766,13 @@ evas_object_size_hint_weight_get(const Evas_Object *obj, double *x, double *y)
    MAGIC_CHECK_END();
    if ((!obj->size_hints) || obj->delete_me)
      {
-       if (x) *x = 0.0; if (y) *y = 0.0;
-       return;
+        if (x) *x = 0.0; if (y) *y = 0.0;
+        return;
      }
    if (x) *x = obj->size_hints->weight.x;
    if (y) *y = obj->size_hints->weight.y;
 }
 
-/**
- * Sets the size weight control hint.
- *
- * This is not a size enforcement in any way, it's just a hint that should
- * be used whenever appropriate.
- *
- * @param    obj The given evas object.
- * @param      x Double (0.0-1.0) to use as weight x hint.
- * @param      y Double (0.0-1.0) to use as weight y hint.
- */
 EAPI void
 evas_object_size_hint_weight_set(Evas_Object *obj, double x, double y)
 {
@@ -1023,21 +789,6 @@ evas_object_size_hint_weight_set(Evas_Object *obj, double x, double y)
    evas_object_inform_call_changed_size_hints(obj);
 }
 
-/**
- * Retrieves the size padding control hint.
- *
- * This is not a size enforcement in any way, it's just a hint that should
- * be used whenever appropriate.
- *
- * Note that if any of @p l, @p r, @p t or @p b are @c NULL, the @c
- * NULL parameters are ignored.
- *
- * @param    obj The given evas object.
- * @param      l Pointer to an integer in which to store left padding.
- * @param      r Pointer to an integer in which to store right padding.
- * @param      t Pointer to an integer in which to store top padding.
- * @param      b Pointer to an integer in which to store bottom padding.
- */
 EAPI void
 evas_object_size_hint_padding_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b)
 {
@@ -1048,9 +799,9 @@ evas_object_size_hint_padding_get(const Evas_Object *obj, Evas_Coord *l, Evas_Co
    MAGIC_CHECK_END();
    if ((!obj->size_hints) || obj->delete_me)
      {
-       if (l) *l = 0; if (r) *r = 0;
-       if (t) *t = 0; if (b) *b = 0;
-       return;
+        if (l) *l = 0; if (r) *r = 0;
+        if (t) *t = 0; if (b) *b = 0;
+        return;
      }
    if (l) *l = obj->size_hints->padding.l;
    if (r) *r = obj->size_hints->padding.r;
@@ -1058,18 +809,6 @@ evas_object_size_hint_padding_get(const Evas_Object *obj, Evas_Coord *l, Evas_Co
    if (b) *b = obj->size_hints->padding.b;
 }
 
-/**
- * Sets the size padding control hint.
- *
- * This is not a size enforcement in any way, it's just a hint that should
- * be used whenever appropriate.
- *
- * @param    obj The given evas object.
- * @param      l Integer to specify left padding.
- * @param      r Integer to specify right padding.
- * @param      t Integer to specify top padding.
- * @param      b Integer to specify bottom padding.
- */
 EAPI void
 evas_object_size_hint_padding_set(Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b)
 {
@@ -1088,16 +827,6 @@ evas_object_size_hint_padding_set(Evas_Object *obj, Evas_Coord l, Evas_Coord r,
    evas_object_inform_call_changed_size_hints(obj);
 }
 
-
-/**
- * @}
- */
-
-/**
- * Makes the given evas object visible.
- * @param   obj The given evas object.
- * @ingroup Evas_Object_Group_Basic
- */
 EAPI void
 evas_object_show(Evas_Object *obj)
 {
@@ -1109,11 +838,11 @@ evas_object_show(Evas_Object *obj)
    if (obj->smart.smart)
      {
        if (obj->smart.smart->smart_class->show)
-         obj->smart.smart->smart_class->show(obj);
+         obj->smart.smart->smart_class->show(obj);
      }
    if (obj->cur.visible)
      {
-       return;
+        return;
      }
    obj->cur.visible = 1;
    evas_object_change(obj);
@@ -1121,36 +850,25 @@ evas_object_show(Evas_Object *obj)
    if (obj->layer->evas->events_frozen <= 0)
      {
         evas_object_clip_across_clippees_check(obj);
-       evas_object_recalc_clippees(obj);
-       if (!evas_event_passes_through(obj))
-         {
-            if (!obj->smart.smart)
-              {
-                 if (evas_object_is_in_output_rect(obj,
-                                                   obj->layer->evas->pointer.x,
-                                                   obj->layer->evas->pointer.y, 1, 1))
-                   evas_event_feed_mouse_move(obj->layer->evas,
-                                              obj->layer->evas->pointer.x,
-                                              obj->layer->evas->pointer.y,
-                                              obj->layer->evas->last_timestamp,
-                                              NULL);
-              }
-         }
+        evas_object_recalc_clippees(obj);
+        if (!evas_event_passes_through(obj))
+          {
+             if (!obj->smart.smart)
+               {
+                  if (evas_object_is_in_output_rect(obj,
+                                                    obj->layer->evas->pointer.x,
+                                                    obj->layer->evas->pointer.y, 1, 1))
+                    evas_event_feed_mouse_move(obj->layer->evas,
+                                               obj->layer->evas->pointer.x,
+                                               obj->layer->evas->pointer.y,
+                                               obj->layer->evas->last_timestamp,
+                                               NULL);
+               }
+          }
      }
    evas_object_inform_call_show(obj);
 }
 
-/**
- * Makes the given evas object invisible.
- * @param   obj The given evas object.
- *
- * @note the hidden objects will not be checked for changes and will
- *       not catch events. That is, they are much ligher than an
- *       object that is invisible due indirect effects, such as
- *       clipped or out-of-viewport.
- *
- * @ingroup Evas_Object_Group_Basic
- */
 EAPI void
 evas_object_hide(Evas_Object *obj)
 {
@@ -1162,11 +880,11 @@ evas_object_hide(Evas_Object *obj)
    if (obj->smart.smart)
      {
        if (obj->smart.smart->smart_class->hide)
-         obj->smart.smart->smart_class->hide(obj);
+         obj->smart.smart->smart_class->hide(obj);
      }
    if (!obj->cur.visible)
      {
-       return;
+        return;
      }
    obj->cur.visible = 0;
    evas_object_change(obj);
@@ -1174,26 +892,26 @@ evas_object_hide(Evas_Object *obj)
    if (obj->layer->evas->events_frozen <= 0)
      {
         evas_object_clip_across_clippees_check(obj);
-       evas_object_recalc_clippees(obj);
-       if (!evas_event_passes_through(obj))
-         {
-            if ((!obj->smart.smart) ||
+        evas_object_recalc_clippees(obj);
+        if (!evas_event_passes_through(obj))
+          {
+             if ((!obj->smart.smart) ||
                  ((obj->cur.map) && (obj->cur.map->count == 4) && (obj->cur.usemap)))
-              {
-                 if (evas_object_is_in_output_rect(obj,
-                                                   obj->layer->evas->pointer.x,
-                                                   obj->layer->evas->pointer.y, 1, 1))
-                   evas_event_feed_mouse_move(obj->layer->evas,
-                                              obj->layer->evas->pointer.x,
-                                              obj->layer->evas->pointer.y,
-                                              obj->layer->evas->last_timestamp,
-                                              NULL);
-                 if (obj->delete_me) return;
-                 if (obj->mouse_grabbed > 0)
-                   {
+               {
+                  if (evas_object_is_in_output_rect(obj,
+                                                    obj->layer->evas->pointer.x,
+                                                    obj->layer->evas->pointer.y, 1, 1))
+                    evas_event_feed_mouse_move(obj->layer->evas,
+                                               obj->layer->evas->pointer.x,
+                                               obj->layer->evas->pointer.y,
+                                               obj->layer->evas->last_timestamp,
+                                               NULL);
+                  if (obj->delete_me) return;
+                  if (obj->mouse_grabbed > 0)
+                    {
 //                    if (obj->layer->evas->pointer.mouse_grabbed >= obj->mouse_grabbed)
-                        obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed;
-                   }
+                       obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed;
+                    }
                   if ((obj->mouse_in) || (obj->mouse_grabbed > 0))
                     {
                        obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, obj);
@@ -1208,7 +926,7 @@ evas_object_hide(Evas_Object *obj)
                     {
                        Evas_Event_Mouse_Out ev;
 
-                      _evas_object_event_new();
+                       _evas_object_event_new();
 
                        obj->mouse_in = 0;
                        ev.buttons = obj->layer->evas->pointer.button;
@@ -1219,30 +937,24 @@ evas_object_hide(Evas_Object *obj)
                        ev.data = NULL;
                        ev.modifiers = &(obj->layer->evas->modifiers);
                        ev.locks = &(obj->layer->evas->locks);
-                      ev.timestamp = obj->layer->evas->last_timestamp;
-                      ev.event_flags = EVAS_EVENT_FLAG_NONE;
+                       ev.timestamp = obj->layer->evas->last_timestamp;
+                       ev.event_flags = EVAS_EVENT_FLAG_NONE;
                        evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev);
                        _evas_post_event_callback_call(obj->layer->evas);
-                   }
-              }
-         }
+                    }
+               }
+          }
      }
    else
      {
-       if ((obj->mouse_in) || (obj->mouse_grabbed > 0))
-         obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, obj);
-       obj->mouse_grabbed = 0;
-       obj->mouse_in = 0;
+        if ((obj->mouse_in) || (obj->mouse_grabbed > 0))
+          obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, obj);
+        obj->mouse_grabbed = 0;
+        obj->mouse_in = 0;
      }
    evas_object_inform_call_hide(obj);
 }
 
-/**
- * Retrieves whether or not the given evas object is visible.
- * @param   obj The given evas object.
- * @return  @c 1 if the object is visible.  @c 0 otherwise.
- * @ingroup Evas_Object_Group_Basic
- */
 EAPI Eina_Bool
 evas_object_visible_get(const Evas_Object *obj)
 {
@@ -1253,15 +965,6 @@ evas_object_visible_get(const Evas_Object *obj)
    return obj->cur.visible;
 }
 
-/**
- * Sets the general colour of the given evas object to the given colour.
- * @param obj The given evas object.
- * @param r   The red component of the given colour.
- * @param g   The green component of the given colour.
- * @param b   The blue component of the given colour.
- * @param a   The alpha component of the given colour.
- * @ingroup Evas_Object_Group_Basic
- */
 EAPI void
 evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a)
 {
@@ -1277,7 +980,7 @@ evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a)
    if (obj->smart.smart)
      {
        if (obj->smart.smart->smart_class->color_set)
-         obj->smart.smart->smart_class->color_set(obj, r, g, b, a);
+         obj->smart.smart->smart_class->color_set(obj, r, g, b, a);
      }
    if ((obj->cur.color.r == r) &&
        (obj->cur.color.g == g) &&
@@ -1292,23 +995,6 @@ evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a)
    evas_object_change(obj);
 }
 
-/**
- * Retrieves the general colour of the given evas object.
- *
- * Note that if any of @p r, @p g, @p b or @p a are @c NULL, then the
- * @c NULL parameters are ignored.
- *
- * @param   obj The given evas object.
- * @param   r   Pointer to an integer in which to store the red component of
- *              the colour.
- * @param   g   Pointer to an integer in which to store the green component of
- *              the colour.
- * @param   b   Pointer to an integer in which to store the blue component of
- *              the colour.
- * @param   a   Pointer to an integer in which to store the alpha component of
- *              the colour.
- * @ingroup Evas_Object_Group_Basic
- */
 EAPI void
 evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
 {
@@ -1318,8 +1004,8 @@ evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
    MAGIC_CHECK_END();
    if (obj->delete_me)
      {
-       if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0;
-       return;
+        if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0;
+        return;
      }
    if (r) *r = obj->cur.color.r;
    if (g) *g = obj->cur.color.g;
@@ -1327,13 +1013,6 @@ evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
    if (a) *a = obj->cur.color.a;
 }
 
-/**
- * Sets whether or not the given evas object is to be drawn anti-aliased.
- *
- * @param   obj The given evas object.
- * @param   anti_alias 1 if the object is to be anti_aliased, 0 otherwise.
- * @ingroup Evas_Object_Group_Extras
- */
 EAPI void
 evas_object_anti_alias_set(Evas_Object *obj, Eina_Bool anti_alias)
 {
@@ -1347,13 +1026,6 @@ evas_object_anti_alias_set(Evas_Object *obj, Eina_Bool anti_alias)
    evas_object_change(obj);
 }
 
-
-/**
- * Retrieves whether or not the given evas object is to be drawn anti_aliased.
- * @param   obj The given evas object.
- * @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)
 {
@@ -1364,13 +1036,6 @@ evas_object_anti_alias_get(const Evas_Object *obj)
    return obj->cur.anti_alias;
 }
 
-/**
- * Sets the scaling factor for an evas object. Does not affect all objects.
- *
- * @param   obj The given evas object.
- * @param   scale The scaling factor. 1.0 == none.
- * @ingroup Evas_Object_Group_Extras
- */
 EAPI void
 evas_object_scale_set(Evas_Object *obj, double scale)
 {
@@ -1384,14 +1049,6 @@ evas_object_scale_set(Evas_Object *obj, double scale)
    if (obj->func->scale_update) obj->func->scale_update(obj);
 }
 
-
-/**
- * Retrieves the scaling factor for the given evas object.
- * @param   obj The given evas object.
- * @return  The scaling factor.
- *
- * @ingroup Evas_Object_Group_Extras
- */
 EAPI double
 evas_object_scale_get(const Evas_Object *obj)
 {
@@ -1402,12 +1059,6 @@ evas_object_scale_get(const Evas_Object *obj)
    return obj->cur.scale;
 }
 
-/**
- * Sets the render_op to be used for rendering the evas object.
- * @param   obj The given evas object.
- * @param   render_op one of the Evas_Render_Op values.
- * @ingroup Evas_Object_Group_Extras
- */
 EAPI void
 evas_object_render_op_set(Evas_Object *obj, Evas_Render_Op render_op)
 {
@@ -1421,12 +1072,6 @@ evas_object_render_op_set(Evas_Object *obj, Evas_Render_Op render_op)
    evas_object_change(obj);
 }
 
-/**
- * Retrieves the current value of the operation used for rendering the evas object.
- * @param   obj The given evas object.
- * @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)
 {
@@ -1437,12 +1082,6 @@ evas_object_render_op_get(const Evas_Object *obj)
    return obj->cur.render_op;
 }
 
-/**
- * Retrieves the evas that the given evas object is on.
- * @param   obj The given evas object.
- * @return  The evas that the object is on.
- * @ingroup Evas_Object_Group_Basic
- */
 EAPI Evas *
 evas_object_evas_get(const Evas_Object *obj)
 {
@@ -1453,21 +1092,6 @@ evas_object_evas_get(const Evas_Object *obj)
    return obj->layer->evas;
 }
 
-/**
- * @addtogroup Evas_Object_Group_Find
- * @{
- */
-
-/**
- * Retrieves the top object at the given position (x,y)
- * @param   e The given evas object.
- * @param   x The horizontal coordinate
- * @param   y The vertical coordinate
- * @param   include_pass_events_objects Boolean Flag to include or not
- * pass events objects
- * @param   include_hidden_objects Boolean Flag to include or not hidden objects
- * @return  The evas object that is over all others objects at the given position.
- */
 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)
 {
@@ -1483,28 +1107,22 @@ evas_object_top_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool i
 ////   yy = evas_coord_world_y_to_screen(e, y);
    EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
      {
-       Evas_Object *obj;
-
-       EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
-         {
-            if (obj->delete_me) continue;
-            if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue;
-            if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
-            evas_object_clip_recalc(obj);
-            if ((evas_object_is_in_output_rect(obj, xx, yy, 1, 1)) &&
-                (!obj->clip.clipees))
-              return obj;
-         }
+        Evas_Object *obj;
+
+        EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
+          {
+             if (obj->delete_me) continue;
+             if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue;
+             if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
+             evas_object_clip_recalc(obj);
+             if ((evas_object_is_in_output_rect(obj, xx, yy, 1, 1)) &&
+                 (!obj->clip.clipees))
+               return obj;
+          }
      }
    return NULL;
 }
 
-/**
- * Retrieves the top object at mouse pointer position
- * @param   e The given evas object.
- * @return The evas object that is over all others objects at the
- * pointer position.
- */
 EAPI Evas_Object *
 evas_object_top_at_pointer_get(const Evas *e)
 {
@@ -1512,18 +1130,6 @@ evas_object_top_at_pointer_get(const Evas *e)
    return evas_object_top_at_xy_get(e, e->pointer.x, e->pointer.y, 1, 1);
 }
 
-/**
- * Retrieves the top object in the given rectangle region
- * @param   e The given evas object.
- * @param   x The horizontal coordinate.
- * @param   y The vertical coordinate.
- * @param   w The width size.
- * @param   h The height size.
- * @param   include_pass_events_objects Boolean Flag to include or not pass events objects
- * @param   include_hidden_objects Boolean Flag to include or not hidden objects
- * @return  The evas object that is over all others objects at the pointer position.
- *
- */
 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)
 {
@@ -1545,33 +1151,22 @@ evas_object_top_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas
    if (hh < 1) hh = 1;
    EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
      {
-       Evas_Object *obj;
-
-       EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
-         {
-            if (obj->delete_me) continue;
-            if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue;
-            if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
-            evas_object_clip_recalc(obj);
-            if ((evas_object_is_in_output_rect(obj, xx, yy, ww, hh)) &&
-                (!obj->clip.clipees))
-              return obj;
-         }
+        Evas_Object *obj;
+
+        EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
+          {
+             if (obj->delete_me) continue;
+             if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue;
+             if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
+             evas_object_clip_recalc(obj);
+             if ((evas_object_is_in_output_rect(obj, xx, yy, ww, hh)) &&
+                 (!obj->clip.clipees))
+               return obj;
+          }
      }
    return NULL;
 }
 
-/**
- * Retrieves the objects at the given position
- * @param   e The given evas object.
- * @param   x The horizontal coordinate.
- * @param   y The vertical coordinate.
- * @param include_pass_events_objects Boolean Flag to include or not
- * pass events objects
- * @param   include_hidden_objects Boolean Flag to include or not hidden objects
- * @return  The list of evas objects at the pointer position.
- *
- */
 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)
 {
@@ -1588,28 +1183,23 @@ evas_objects_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool incl
 ////   yy = evas_coord_world_y_to_screen(e, y);
    EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
      {
-       Evas_Object *obj;
-
-       EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
-         {
-            if (obj->delete_me) continue;
-            if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue;
-            if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
-            evas_object_clip_recalc(obj);
-            if ((evas_object_is_in_output_rect(obj, xx, yy, 1, 1)) &&
-                (!obj->clip.clipees))
-              in = eina_list_prepend(in, obj);
-         }
+        Evas_Object *obj;
+
+        EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
+          {
+             if (obj->delete_me) continue;
+             if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue;
+             if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
+             evas_object_clip_recalc(obj);
+             if ((evas_object_is_in_output_rect(obj, xx, yy, 1, 1)) &&
+                 (!obj->clip.clipees))
+               in = eina_list_prepend(in, obj);
+          }
      }
    return in;
 }
 
 /**
- * To be documented.
- *
- * FIXME: To be fixed.
- */
-/**
  * Retrieves the objects in the given rectangle region
  * @param   e The given evas object.
  * @param   x The horizontal coordinate.
@@ -1643,27 +1233,23 @@ evas_objects_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Co
    if (hh < 1) hh = 1;
    EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
      {
-       Evas_Object *obj;
-
-       EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
-         {
-            if (obj->delete_me) continue;
-            if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue;
-            if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
-            evas_object_clip_recalc(obj);
-            if ((evas_object_is_in_output_rect(obj, xx, yy, ww, hh)) &&
-                (!obj->clip.clipees))
-              in = eina_list_prepend(in, obj);
-         }
+        Evas_Object *obj;
+
+        EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
+          {
+             if (obj->delete_me) continue;
+             if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue;
+             if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
+             evas_object_clip_recalc(obj);
+             if ((evas_object_is_in_output_rect(obj, xx, yy, ww, hh)) &&
+                 (!obj->clip.clipees))
+               in = eina_list_prepend(in, obj);
+          }
      }
    return in;
 }
 
 /**
- * @}
- */
-
-/**
  * Retrieves the name of the type of the given evas object.
  * @param   obj The given object.
  * @return  The name.
@@ -1714,7 +1300,7 @@ evas_object_precise_is_inside_get(const Evas_Object *obj)
  * Set a hint flag on the object that this is used as a static "clipper".
  * 
  * This is a hint to evas that this object is used as a big static clipper
- * and shouldnt be moved with children and otherwise considered specially. The
+ * and shouldn't be moved with children and otherwise considered specially. The
  * Default is off.
  * 
  * @param obj The given object.
index dff5cc4..44c3f54 100644 (file)
@@ -75,18 +75,8 @@ static const Evas_Object_Func object_func =
 /* the actual api call to add a rect */
 /* it has no other api calls as all properties are standard */
 
-/**
- * @addtogroup Evas_Object_Polygon
- * @{
- */
-
 EVAS_MEMPOOL(_mp_obj);
 
-/**
- * Adds a new evas polygon object to the given evas.
- * @param   e The given evas.
- * @return  A new evas polygon object.
- */
 EAPI Evas_Object *
 evas_object_polygon_add(Evas *e)
 {
@@ -101,13 +91,6 @@ evas_object_polygon_add(Evas *e)
    return obj;
 }
 
-/**
- * Adds the given point to the given evas polygon object.
- * @param obj The given evas polygon object.
- * @param x   The X coordinate of the given point.
- * @param y   The Y coordinate of the given point.
- * @ingroup Evas_Polygon_Group
- */
 EAPI void
 evas_object_polygon_point_add(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
 {
@@ -205,10 +188,6 @@ evas_object_polygon_point_add(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
    evas_object_inform_call_resize(obj);
 }
 
-/**
- * Removes all of the points from the given evas polygon object.
- * @param   obj The given polygon object.
- */
 EAPI void
 evas_object_polygon_points_clear(Evas_Object *obj)
 {
@@ -252,10 +231,6 @@ evas_object_polygon_points_clear(Evas_Object *obj)
    evas_object_inform_call_resize(obj);
 }
 
-/**
- * @}
- */
-
 /* all nice and private */
 static void
 evas_object_polygon_init(Evas_Object *obj)
index 50728ff..36678e7 100644 (file)
@@ -4,6 +4,8 @@
 /* private magic number for rectangle objects */
 static const char o_type[] = "rectangle";
 
+const char *o_rect_type = o_type;
+
 /* private struct for rectangle object internal data */
 typedef struct _Evas_Object_Rectangle      Evas_Object_Rectangle;
 
@@ -66,19 +68,8 @@ static const Evas_Object_Func object_func =
 /* the actual api call to add a rect */
 /* it has no other api calls as all properties are standard */
 
-
-/**
- * @addtogroup Evas_Object_Rectangle
- * @{
- */
-
 EVAS_MEMPOOL(_mp_obj);
 
-/**
- * Adds a rectangle to the given evas.
- * @param   e The given evas.
- * @return  The new rectangle object.
- */
 EAPI Evas_Object *
 evas_object_rectangle_add(Evas *e)
 {
@@ -93,10 +84,6 @@ evas_object_rectangle_add(Evas *e)
    return obj;
 }
 
-/**
- * @}
- */
-
 /* all nice and private */
 static void
 evas_object_rectangle_init(Evas_Object *obj)
index 81e545e..e1e8cf0 100644 (file)
@@ -20,7 +20,7 @@ struct _Evas_Object_Smart
 struct _Evas_Smart_Callback
 {
    const char *event;
-   void (*func) (void *data, Evas_Object *obj, void *event_info);
+   Evas_Smart_Cb func;
    void *func_data;
    char  delete_me : 1;
 };
@@ -42,39 +42,32 @@ static const Evas_Object_Func object_func =
 {
    /* methods (compulsory) */
    evas_object_smart_free,
-     evas_object_smart_render,
-     evas_object_smart_render_pre,
-     evas_object_smart_render_post,
-     evas_object_smart_id_get,
-     evas_object_smart_visual_id_get,
-     evas_object_smart_engine_data_get,
-     /* these are optional. NULL = nothing */
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL
+   evas_object_smart_render,
+   evas_object_smart_render_pre,
+   evas_object_smart_render_post,
+   evas_object_smart_id_get,
+   evas_object_smart_visual_id_get,
+   evas_object_smart_engine_data_get,
+   /* these are optional. NULL = nothing */
+   NULL,
+   NULL,
+   NULL,
+   NULL,
+   NULL,
+   NULL,
+   NULL,
+   NULL,
+   NULL,
+   NULL,
+   NULL,
+   NULL,
+   NULL
 };
 
 EVAS_MEMPOOL(_mp_obj);
 EVAS_MEMPOOL(_mp_cb);
 
 /* public funcs */
-/**
- * Store a pointer to user data for a smart object.
- *
- * @param obj The smart object
- * @param data A pointer to user data
- * @ingroup Evas_Smart_Object_Group
- */
 EAPI void
 evas_object_smart_data_set(Evas_Object *obj, void *data)
 {
@@ -90,14 +83,6 @@ evas_object_smart_data_set(Evas_Object *obj, void *data)
    o->data = data;
 }
 
-/**
- * Retrieve user data stored on a smart object.
- *
- * @param obj The smart object
- * @return A pointer to data stored using evas_object_smart_data_set(), or
- *         NULL if none has been set.
- * @ingroup Evas_Smart_Object_Group
- */
 EAPI void *
 evas_object_smart_data_get(const Evas_Object *obj)
 {
@@ -113,13 +98,6 @@ evas_object_smart_data_get(const Evas_Object *obj)
    return o->data;
 }
 
-/**
- * Get the Evas_Smart from which @p obj was created.
- *
- * @param obj a smart object
- * @return the Evas_Smart
- * @ingroup Evas_Smart_Object_Group
- */
 EAPI Evas_Smart *
 evas_object_smart_smart_get(const Evas_Object *obj)
 {
@@ -135,20 +113,6 @@ evas_object_smart_smart_get(const Evas_Object *obj)
    return obj->smart.smart;
 }
 
-/**
- * Set an evas object as a member of a smart object.
- *
- * @param obj The member object
- * @param smart_obj The smart object
- *
- * Members will automatically be stacked and layered with the smart object.
- * The various stacking function will operate on members relative to the
- * other members instead of the entire canvas.
- *
- * Non-member objects can not interleave a smart object's members.
- *
- * @ingroup Evas_Smart_Object_Group
- */
 EAPI void
 evas_object_smart_member_add(Evas_Object *obj, Evas_Object *smart_obj)
 {
@@ -168,27 +132,27 @@ evas_object_smart_member_add(Evas_Object *obj, Evas_Object *smart_obj)
    if (obj->delete_me)
      {
         CRIT("Adding deleted object %p to smart obj %p", obj, smart_obj);
-       abort();
-       return;
+        abort();
+        return;
      }
    if (smart_obj->delete_me)
      {
-       CRIT("Adding object %p to deleted smart obj %p", obj, smart_obj);
-       abort();
-       return;
+        CRIT("Adding object %p to deleted smart obj %p", obj, smart_obj);
+        abort();
+        return;
      }
    if (!smart_obj->layer)
      {
-       CRIT("No evas surface associated with smart object (%p)", smart_obj);
-       abort();
-       return;
+        CRIT("No evas surface associated with smart object (%p)", smart_obj);
+        abort();
+        return;
      }
    if (obj->layer && smart_obj->layer
        && obj->layer->evas != smart_obj->layer->evas)
      {
-       CRIT("Adding object %p from Evas (%p) from another Evas (%p)", obj, obj->layer->evas, smart_obj->layer->evas);
-       abort();
-       return;
+        CRIT("Adding object %p from Evas (%p) from another Evas (%p)", obj, obj->layer->evas, smart_obj->layer->evas);
+        abort();
+        return;
      }
 
    if (obj->smart.parent == smart_obj) return;
@@ -209,17 +173,6 @@ evas_object_smart_member_add(Evas_Object *obj, Evas_Object *smart_obj)
      smart_obj->smart.smart->smart_class->member_add(smart_obj, obj);
 }
 
-/**
- * Removes a member object from a smart object.
- *
- * @param obj the member object
- * @ingroup Evas_Smart_Object_Group
- *
- * This removes a member object from a smart object. The object will still
- * be on the canvas, but no longer associated with whichever smart object
- * it was associated with.
- *
- */
 EAPI void
 evas_object_smart_member_del(Evas_Object *obj)
 {
@@ -248,12 +201,6 @@ evas_object_smart_member_del(Evas_Object *obj)
    evas_object_mapped_clip_across_mark(obj);
 }
 
-/**
- * Gets the smart parent of an Evas_Object
- * @param obj the Evas_Object you want to get the parent
- * @return Returns the smart parent of @a obj, or NULL if @a obj is not a smart member of another Evas_Object
- * @ingroup Evas_Smart_Object_Group
- */
 EAPI Evas_Object *
 evas_object_smart_parent_get(const Evas_Object *obj)
 {
@@ -264,13 +211,6 @@ evas_object_smart_parent_get(const Evas_Object *obj)
    return obj->smart.parent;
 }
 
-/**
- * Checks the Smart type of the object and its parents
- * @param obj the Evas_Object to check the type of
- * @param type the type to check for
- * @return EINA_TRUE if @a obj or any of its parents if of type @a type, EINA_FALSE otherwise
- * @ingroup Evas_Smart_Object_Group
- */
 EAPI Eina_Bool
 evas_object_smart_type_check(const Evas_Object *obj, const char *type)
 {
@@ -285,21 +225,14 @@ evas_object_smart_type_check(const Evas_Object *obj, const char *type)
    sc = obj->smart.smart->smart_class;
    while (sc)
      {
-       if (!strcmp(sc->name, type))
-         return EINA_TRUE;
-       sc = sc->parent;
+        if (!strcmp(sc->name, type))
+          return EINA_TRUE;
+        sc = sc->parent;
      }
 
    return EINA_FALSE;
 }
 
-/**
- * Checks the Smart type of the object and its parents using pointer comparison
- * @param obj the Evas_Object to check the type of
- * @param type the type to check for. Must be the name pointer in the smart class used to create the object
- * @return EINA_TRUE if @a obj or any of its parents if of type @a type, EINA_FALSE otherwise
- * @ingroup Evas_Smart_Object_Group
- */
 EAPI Eina_Bool
 evas_object_smart_type_check_ptr(const Evas_Object *obj, const char *type)
 {
@@ -314,20 +247,14 @@ evas_object_smart_type_check_ptr(const Evas_Object *obj, const char *type)
    sc = obj->smart.smart->smart_class;
    while (sc)
      {
-       if (sc->name == type)
-         return EINA_TRUE;
-       sc = sc->parent;
+        if (sc->name == type)
+          return EINA_TRUE;
+        sc = sc->parent;
      }
 
    return EINA_FALSE;
 }
 
-/**
- * Gets the list of the member objects of an Evas_Object
- * @param obj the Evas_Object you want to get the list of member objects
- * @return Returns the list of the member objects of @a obj.
- * The returned list should be freed with eina_list_free() when you no longer need it
- */
 EAPI Eina_List *
 evas_object_smart_members_get(const Evas_Object *obj)
 {
@@ -345,7 +272,7 @@ evas_object_smart_members_get(const Evas_Object *obj)
 
    members = NULL;
    for (member = o->contained; member; member = member->next)
-      members = eina_list_append(members, member);
+     members = eina_list_append(members, member);
 
    return members;
 }
@@ -370,17 +297,9 @@ _evas_object_smart_members_all_del(Evas_Object *obj)
 {
    Evas_Object_Smart *o = (Evas_Object_Smart *)(obj->object_data);
    while (o->contained)
-      evas_object_del((Evas_Object *)(o->contained));
+     evas_object_del((Evas_Object *)(o->contained));
 }
 
-/**
- * Instantiates a new smart object described by @p s.
- *
- * @param e the evas on which to add the object
- * @param s the Evas_Smart describing the smart object
- * @return a new Evas_Object
- * @ingroup Evas_Smart_Object_Group
- */
 EAPI Evas_Object *
 evas_object_smart_add(Evas *e, Evas_Smart *s)
 {
@@ -407,17 +326,8 @@ evas_object_smart_add(Evas *e, Evas_Smart *s)
    return obj;
 }
 
-/**
- * Add a callback for the smart event specified by @p event.
- *
- * @param obj a smart object
- * @param event the event name
- * @param func the callback function
- * @param data user data to be passed to the callback function
- * @ingroup Evas_Smart_Object_Group
- */
 EAPI void
-evas_object_smart_callback_add(Evas_Object *obj, const char *event, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data)
+evas_object_smart_callback_add(Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data)
 {
    Evas_Object_Smart *o;
    Evas_Smart_Callback *cb;
@@ -441,19 +351,8 @@ evas_object_smart_callback_add(Evas_Object *obj, const char *event, void (*func)
    o->callbacks = eina_list_prepend(o->callbacks, cb);
 }
 
-/**
- * Remove a smart callback
- *
- * Removes a callback that was added by evas_object_smart_callback_add()
- *
- * @param obj a smart object
- * @param event the event name
- * @param func the callback function
- * @return the data pointer
- * @ingroup Evas_Smart_Object_Group
- */
 EAPI void *
-evas_object_smart_callback_del(Evas_Object *obj, const char *event, void (*func) (void *data, Evas_Object *obj, void *event_info))
+evas_object_smart_callback_del(Evas_Object *obj, const char *event, Evas_Smart_Cb func)
 {
    Evas_Object_Smart *o;
    Eina_List *l;
@@ -469,33 +368,20 @@ evas_object_smart_callback_del(Evas_Object *obj, const char *event, void (*func)
    if (!event) return NULL;
    EINA_LIST_FOREACH(o->callbacks, l, cb)
      {
-       if ((!strcmp(cb->event, event)) && (cb->func == func))
-         {
-            void *data;
-
-            data = cb->func_data;
-            cb->delete_me = 1;
-            o->deletions_waiting = 1;
-            evas_object_smart_callbacks_clear(obj);
-            return data;
-         }
+        if ((!strcmp(cb->event, event)) && (cb->func == func))
+          {
+             void *data;
+
+             data = cb->func_data;
+             cb->delete_me = 1;
+             o->deletions_waiting = 1;
+             evas_object_smart_callbacks_clear(obj);
+             return data;
+          }
      }
    return NULL;
 }
 
-/**
- * Call any smart callbacks on @p obj for @p event.
- *
- * @param obj the smart object
- * @param event the event name
- * @param event_info an event specific struct of info to pass to the callback
- *
- * This should be called internally in the smart object when some specific
- * event has occurred. The documentation for the smart object should include
- * a list of possible events and what type of @p event_info to expect.
- *
- * @ingroup Evas_Smart_Object_Group
- */
 EAPI void
 evas_object_smart_callback_call(Evas_Object *obj, const char *event, void *event_info)
 {
@@ -517,43 +403,19 @@ evas_object_smart_callback_call(Evas_Object *obj, const char *event, void *event
    strshare = eina_stringshare_add(event);
    EINA_LIST_FOREACH(o->callbacks, l, cb)
      {
-       if (!cb->delete_me)
-         {
-            if (cb->event == strshare)
-              cb->func(cb->func_data, obj, event_info);
-         }
-       if (obj->delete_me)
-         break;
+        if (!cb->delete_me)
+          {
+             if (cb->event == strshare)
+               cb->func(cb->func_data, obj, event_info);
+          }
+        if (obj->delete_me)
+          break;
      }
    eina_stringshare_del(strshare);
    o->walking_list--;
    evas_object_smart_callbacks_clear(obj);
 }
 
-/**
- * Set smart object instance callbacks descriptions.
- *
- * These descriptions are hints to be used by introspection and are
- * not enforced in any way.
- *
- * It will not be checked if instance callbacks descriptions have the
- * same name as another in class. Both are kept in different arrays
- * and users of evas_object_smart_callbacks_descriptions_get() should
- * handle this case as they wish.
- *
- * @param obj The smart object
- * @param descriptions NULL terminated (name != NULL) array with
- *        descriptions.  Array elements will not be modified, but
- *        reference to them and their contents will be made, so this
- *        array should be kept alive during object lifetime.
- * @return 1 on success, 0 on failure.
- * @ingroup Evas_Smart_Object_Group
- *
- * @note while instance callbacks descriptions are possible, they are
- *       not recommended. Use class callbacks descriptions instead as they
- *       make user's life simpler and will use less memory as descriptions
- *       and arrays will be shared among all instances.
- */
 EAPI Eina_Bool
 evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_Cb_Description *descriptions)
 {
@@ -571,8 +433,8 @@ evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_
 
    if ((!descriptions) || (!descriptions->name))
      {
-       evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, 0);
-       return 1;
+        evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, 0);
+        return 1;
      }
 
    for (count = 0, d = descriptions; d->name; d++)
@@ -589,35 +451,6 @@ evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_
    return 1;
 }
 
-/**
- * Get the callbacks descriptions known by this smart object.
- *
- * This call retrieves processed callbacks descriptions for both
- * instance and class. These arrays are sorted by description's name
- * and are @c NULL terminated, so both @a class_count and
- * @a instance_count can be ignored, the terminator @c NULL is not
- * counted in these values.
- *
- * @param obj the smart object.
- * @param class_descriptions where to store class callbacks
- *        descriptions array, if any is known. If no descriptions are
- *        known, @c NULL is returned. This parameter may be @c NULL if
- *        it is not of interest.
- * @param class_count returns how many class callbacks descriptions
- *        are known.
- * @param instance_descriptions where to store instance callbacks
- *        descriptions array, if any is known. If no descriptions are
- *        known, @c NULL is returned. This parameter may be @c NULL if
- *        it is not of interest.
- * @param instance_count returns how many instance callbacks
- *        descriptions are known.
- *
- * @note if just class descriptions are of interest, try
- *       evas_smart_callbacks_descriptions_get() instead.
- *
- * @see evas_smart_callbacks_descriptions_get()
- * @ingroup Evas_Smart_Object_Group
- */
 EAPI void
 evas_object_smart_callbacks_descriptions_get(const Evas_Object *obj, const Evas_Smart_Cb_Description ***class_descriptions, unsigned int *class_count, const Evas_Smart_Cb_Description ***instance_descriptions, unsigned int *instance_count)
 {
@@ -650,22 +483,6 @@ evas_object_smart_callbacks_descriptions_get(const Evas_Object *obj, const Evas_
      *instance_count = o->callbacks_descriptions.size;
 }
 
-/**
- * Find callback description for callback called @a name.
- *
- * @param obj the smart object.
- * @param name name of desired callback, must @b not be @c NULL.  The
- *        search have a special case for @a name being the same
- *        pointer as registered with Evas_Smart_Cb_Description, one
- *        can use it to avoid excessive use of strcmp().
- * @param class_description pointer to return class description or @c
- *        NULL if not found. If parameter is @c NULL, no search will
- *        be done on class descriptions.
- * @param instance_description pointer to return instance description
- *        or @c NULL if not found. If parameter is @c NULL, no search
- *        will be done on instance descriptions.
- * @return reference to description if found, @c NULL if not found.
- */
 EAPI void
 evas_object_smart_callback_description_find(const Evas_Object *obj, const char *name, const Evas_Smart_Cb_Description **class_description, const Evas_Smart_Cb_Description **instance_description)
 {
@@ -673,9 +490,9 @@ evas_object_smart_callback_description_find(const Evas_Object *obj, const char *
 
    if (!name)
      {
-       if (class_description) *class_description = NULL;
-       if (instance_description) *instance_description = NULL;
-       return;
+        if (class_description) *class_description = NULL;
+        if (instance_description) *instance_description = NULL;
+        return;
      }
 
    MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
@@ -692,32 +509,13 @@ evas_object_smart_callback_description_find(const Evas_Object *obj, const char *
 
    if (class_description)
      *class_description = evas_smart_cb_description_find
-       (&obj->smart.smart->callbacks, name);
+        (&obj->smart.smart->callbacks, name);
 
    if (instance_description)
      *instance_description = evas_smart_cb_description_find
-       (&o->callbacks_descriptions, name);
+        (&o->callbacks_descriptions, name);
 }
 
-/**
- * Set the need_recalculate flag of given smart object.
- *
- * If this flag is set then calculate() callback (method) of the given
- * smart object will be called, if one is provided, during render phase
- * usually evas_render(). After this step, this flag will be automatically
- * unset.
- *
- * If no calculate() is provided, this flag will be left unchanged.
- *
- * @note just setting this flag will not make scene dirty and evas_render()
- *       will have no effect. To do that, use evas_object_smart_changed(),
- *       that will automatically call this function with 1 as parameter.
- *
- * @param obj the smart object
- * @param value if one want to set or unset the need_recalculate flag.
- *
- * @ingroup Evas_Smart_Object_Group
- */
 EAPI void
 evas_object_smart_need_recalculate_set(Evas_Object *obj, Eina_Bool value)
 {
@@ -744,24 +542,12 @@ evas_object_smart_need_recalculate_set(Evas_Object *obj, Eina_Bool value)
     */
    if (o->need_recalculate)
      {
-       Evas *e = obj->layer->evas;
-       eina_array_push(&e->calculate_objects, obj);
+        Evas *e = obj->layer->evas;
+        eina_array_push(&e->calculate_objects, obj);
      }
    /* TODO: else, remove from array */
 }
 
-/**
- * Get the current value of need_recalculate flag.
- *
- * @note this flag will be unset during the render phase, after calculate()
- *       is called if one is provided.  If no calculate() is provided, then
- *       the flag will be left unchanged after render phase.
- *
- * @param obj the smart object
- * @return if flag is set or not.
- *
- * @ingroup Evas_Smart_Object_Group
- */
 EAPI Eina_Bool
 evas_object_smart_need_recalculate_get(const Evas_Object *obj)
 {
@@ -777,13 +563,6 @@ evas_object_smart_need_recalculate_get(const Evas_Object *obj)
    return o->need_recalculate;
 }
 
-/**
- * Call user provided calculate() and unset need_calculate.
- *
- * @param obj the smart object
- *
- * @ingroup Evas_Smart_Object_Group
- */
 EAPI void
 evas_object_smart_calculate(Evas_Object *obj)
 {
@@ -803,13 +582,6 @@ evas_object_smart_calculate(Evas_Object *obj)
    obj->smart.smart->smart_class->calculate(obj);
 }
 
-/**
- * Call user provided calculate() and unset need_calculate on all objects.
- *
- * @param e The canvas to calculate all objects in
- *
- * @ingroup Evas_Smart_Object_Group
- */
 EAPI void
 evas_smart_objects_calculate(Evas *e)
 {
@@ -835,36 +607,26 @@ evas_call_smarts_calculate(Evas *e)
    calculate = &e->calculate_objects;
    for (i = 0; i < calculate->count; i++)
      {
-       Evas_Object *obj;
-       Evas_Object_Smart *o;
+        Evas_Object *obj;
+        Evas_Object_Smart *o;
         int before;
 
-       obj = eina_array_data_get(calculate, i);
-       if (obj->delete_me)
-         continue;
+        obj = eina_array_data_get(calculate, i);
+        if (obj->delete_me)
+          continue;
 
         before = calculate->count;
-       o = obj->object_data;
-       if (o->need_recalculate)
-         {
-            o->need_recalculate = 0;
-            obj->smart.smart->smart_class->calculate(obj);
-         }
+        o = obj->object_data;
+        if (o->need_recalculate)
+          {
+             o->need_recalculate = 0;
+             obj->smart.smart->smart_class->calculate(obj);
+          }
      }
    in_smart_calc--;
    if (in_smart_calc == 0) eina_array_flush(calculate);
 }
 
-/**
- * Mark smart object as changed, dirty.
- *
- * This will inform the scene that it changed and needs to be redraw, also
- * setting need_recalculate on the given object.
- *
- * @see evas_object_smart_need_recalculate_set().
- *
- * @ingroup Evas_Smart_Object_Group
- */
 EAPI void
 evas_object_smart_changed(Evas_Object *obj)
 {
@@ -889,14 +651,14 @@ evas_object_smart_callbacks_clear(Evas_Object *obj)
    if (!o->deletions_waiting) return;
    for (l = o->callbacks; l;)
      {
-       cb = eina_list_data_get(l);
-       l = eina_list_next(l);
-       if (cb->delete_me)
-         {
-            o->callbacks = eina_list_remove(o->callbacks, cb);
-            if (cb->event) eina_stringshare_del(cb->event);
+        cb = eina_list_data_get(l);
+        l = eina_list_next(l);
+        if (cb->delete_me)
+          {
+             o->callbacks = eina_list_remove(o->callbacks, cb);
+             if (cb->event) eina_stringshare_del(cb->event);
              EVAS_MEMPOOL_FREE(_mp_cb, cb);
-         }
+          }
      }
 }
 
@@ -923,21 +685,21 @@ evas_object_smart_cleanup(Evas_Object *obj)
    o = (Evas_Object_Smart *)(obj->object_data);
    if (o->magic == MAGIC_OBJ_SMART)
      {
-       while (o->contained)
-         evas_object_smart_member_del((Evas_Object *)o->contained);
+        while (o->contained)
+          evas_object_smart_member_del((Evas_Object *)o->contained);
 
-       while (o->callbacks)
-         {
-            Evas_Smart_Callback *cb;
+        while (o->callbacks)
+          {
+             Evas_Smart_Callback *cb;
 
-            cb = o->callbacks->data;
-            o->callbacks = eina_list_remove(o->callbacks, cb);
-            if (cb->event) eina_stringshare_del(cb->event);
+             cb = o->callbacks->data;
+             o->callbacks = eina_list_remove(o->callbacks, cb);
+             if (cb->event) eina_stringshare_del(cb->event);
              EVAS_MEMPOOL_FREE(_mp_cb, cb);
-         }
+          }
 
-       evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, 0);
-       o->data = NULL;
+        evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, 0);
+        o->data = NULL;
      }
 
    obj->smart.parent = NULL;
@@ -962,10 +724,10 @@ evas_object_smart_member_cache_invalidate(Evas_Object *obj)
 
    for (l = o->contained; l; l = l->next)
      {
-       Evas_Object *obj2;
+        Evas_Object *obj2;
 
-       obj2 = (Evas_Object *)l;
-       evas_object_smart_member_cache_invalidate(obj2);
+        obj2 = (Evas_Object *)l;
+        evas_object_smart_member_cache_invalidate(obj2);
      }
 }
 
@@ -1071,10 +833,10 @@ evas_object_smart_render_pre(Evas_Object *obj)
    if ((obj->cur.map != obj->prev.map) ||
        (obj->cur.usemap != obj->prev.usemap))
      {
-       evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
+        evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
         goto done;
      }
-   done:
+done:
    obj->pre_render_done = 1;
 }
 
index 3357cb4..9b9fa6d 100644 (file)
@@ -1,22 +1,10 @@
 #include "evas_common.h"
 #include "evas_private.h"
 
-/**
- * @addtogroup Evas_Smart_Object_Clipped Clipped Smart Object
- * @{
- */
-
 #define CSO_DATA_GET_OR_RETURN(obj, ptr)                                \
   Evas_Object_Smart_Clipped_Data *ptr = evas_object_smart_data_get(obj); \
   if (!ptr) return;
 
-/**
- * Moves all children objects relative to given offset.
- *
- * @param obj the smart evas object to use.
- * @param dx horizontal offset.
- * @param dy vertical offset.
- */
 EAPI void
 evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy)
 {
@@ -41,14 +29,6 @@ evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_C
      }
 }
 
-/**
- * Get the clipper object for the given clipped smart object.
- *
- * @param obj the clipped smart object to retrieve the associated clipper.
- * @return the clipper object.
- *
- * @see evas_object_smart_clipped_smart_add()
- */
 EAPI Evas_Object *
 evas_object_smart_clipped_clipper_get(Evas_Object *obj)
 {
@@ -169,48 +149,6 @@ evas_object_smart_clipped_smart_member_del(Evas_Object *obj, Evas_Object *member
      evas_object_hide(cso->clipper);
 }
 
-/**
- * Set smart class callbacks so it implements the "Clipped Smart Object".
- *
- * This call will assign all the required methods of Evas_Smart_Class,
- * if one wants to "subclass" it, call this function and later
- * override values, if one wants to call the original method, save it
- * somewhere, example:
- *
- * @code
- * static Evas_Smart_Class parent_sc = EVAS_SMART_CLASS_INIT_NULL;
- *
- * static void my_class_smart_add(Evas_Object *o)
- * {
- *    parent_sc.add(o);
- *    evas_object_color_set(evas_object_smart_clipped_clipper_get(o),
- *                          255, 0, 0, 255);
- * }
- *
- * Evas_Smart_Class *my_class_new(void)
- * {
- *    static Evas_Smart_Class sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("MyClass");
- *    if (!parent_sc.name)
- *      {
- *         evas_object_smart_clipped_smart_set(&sc);
- *         parent_sc = sc;
- *         sc.add = my_class_smart_add;
- *      }
- *    return &sc;
- * }
- * @endcode
- *
- * Default behavior is:
- *  - add: creates a hidden clipper with "infinite" size;
- *  - del: delete all children objects;
- *  - move: move all objects relative relatively;
- *  - resize: not defined;
- *  - show: if there are children objects, show clipper;
- *  - hide: hides clipper;
- *  - color_set: set the color of clipper;
- *  - clip_set: set clipper of clipper;
- *  - clip_unset: unset the clipper of clipper;
- */
 EAPI void
 evas_object_smart_clipped_smart_set(Evas_Smart_Class *sc)
 {
@@ -230,9 +168,6 @@ evas_object_smart_clipped_smart_set(Evas_Smart_Class *sc)
    sc->member_del = evas_object_smart_clipped_smart_member_del;
 }
 
-/**
- * Get a pointer to the Clipped Smart Class to use for proper inheritance
- */
 EAPI const Evas_Smart_Class *
 evas_object_smart_clipped_class_get(void)
 {
@@ -246,7 +181,3 @@ evas_object_smart_clipped_class_get(void)
    class = &_sc;
    return class;
 }
-
-/**
- * @}
- */
index 0addce1..20b6a2d 100644 (file)
@@ -30,6 +30,9 @@ struct _Evas_Object_Table_Cache
 {
    struct {
       struct {
+         double h, v;
+      } weights;
+      struct {
         int h, v;
       } expands;
       struct {
@@ -37,11 +40,15 @@ struct _Evas_Object_Table_Cache
       } min;
    } total;
    struct {
+      double *h, *v;
+   } weights;
+   struct {
       Evas_Coord *h, *v;
    } sizes;
    struct {
       Eina_Bool *h, *v;
    } expands;
+   double ___pad; // padding to make sure doubles at end can be aligned
 };
 
 struct _Evas_Object_Table_Data
@@ -81,11 +88,6 @@ struct _Evas_Object_Table_Accessor
    const Evas_Object *table;
 };
 
-/**
- * @addtogroup Evas_Object_Table
- * @{
- */
-
 #define EVAS_OBJECT_TABLE_DATA_GET(o, ptr)                     \
   Evas_Object_Table_Data *ptr = evas_object_smart_data_get(o)
 
@@ -136,11 +138,11 @@ _evas_object_table_iterator_free(Evas_Object_Table_Iterator *it)
 }
 
 static Eina_Bool
-_evas_object_table_accessor_get_at(Evas_Object_Table_Accessor *it, unsigned int index, void **data)
+_evas_object_table_accessor_get_at(Evas_Object_Table_Accessor *it, unsigned int idx, void **data)
 {
    Evas_Object_Table_Option *opt = NULL;
 
-   if (!eina_accessor_data_get(it->real_accessor, index, (void **)&opt))
+   if (!eina_accessor_data_get(it->real_accessor, idx, (void **)&opt))
      return EINA_FALSE;
    if (data) *data = opt->obj;
    return EINA_TRUE;
@@ -165,8 +167,9 @@ _evas_object_table_cache_alloc(int cols, int rows)
    Evas_Object_Table_Cache *cache;
    int size;
 
-   size = (sizeof(Evas_Object_Table_Cache) +
-          (cols + rows) * (sizeof(Eina_Bool) + sizeof(Evas_Coord)));
+   size = sizeof(Evas_Object_Table_Cache) +
+      ((cols + rows) * 
+          (sizeof(double) + sizeof(Evas_Coord) + sizeof(Eina_Bool)));
    cache = malloc(size);
    if (!cache)
      {
@@ -175,7 +178,9 @@ _evas_object_table_cache_alloc(int cols, int rows)
        return NULL;
      }
 
-   cache->sizes.h = (Evas_Coord *)(cache + 1);
+   cache->weights.h = (double *)(cache + 1);
+   cache->weights.v = (double *)(cache->weights.h + cols);
+   cache->sizes.h = (Evas_Coord *)(cache->weights.v + rows);
    cache->sizes.v = (Evas_Coord *)(cache->sizes.h + cols);
    cache->expands.h = (Eina_Bool *)(cache->sizes.v + rows);
    cache->expands.v = (Eina_Bool *)(cache->expands.h + cols);
@@ -201,7 +206,7 @@ _evas_object_table_cache_reset(Evas_Object_Table_Data *priv)
    c->total.min.h = 0;
 
    size = ((priv->size.rows + priv->size.cols) *
-          (sizeof(Eina_Bool) + sizeof(Evas_Coord)));
+          (sizeof(double) + sizeof(Evas_Coord) + sizeof(Eina_Bool)));
    memset(c + 1, 0, size);
 }
 
@@ -308,31 +313,6 @@ _evas_object_table_calculate_cell(const Evas_Object_Table_Option *opt, Evas_Coor
      }
 }
 
-/* static Eina_Bool */
-/* _evas_object_table_check_hints_homogeneous_table(Evas_Object *child, double *align, Evas_Coord min, const char *axis_name) */
-/* { */
-/*    if (*align < 0.0) */
-/*      { */
-/*     /\* assume expand and align to the center. */
-/*      * this is compatible with evas_object_box behavior and is the */
-/*      * same as weight > 0.0. */
-/*      *\/ */
-/*     *align = 0.5; */
-/*     return 0; */
-/*      } */
-/*    else if (min < 1) */
-/*      { */
-/*     WRN("Child %p [%s, %s] has no minimum width " */
-/*             "and no %s expand (weight is not > 0.0). " */
-/*             "Assuming weight > 0.0\n", */
-/*             child, evas_object_type_get(child), evas_object_name_get(child), */
-/*             axis_name); */
-/*     return 0; */
-/*      } */
-
-/*    return 1; */
-/* } */
-
 static void
 _evas_object_table_calculate_hints_homogeneous(Evas_Object *o, Evas_Object_Table_Data *priv)
 {
@@ -375,14 +355,6 @@ _evas_object_table_calculate_hints_homogeneous(Evas_Object *o, Evas_Object_Table
             opt->expand_h = 1;
             expand_h = 1;
          }
-/*     else if ((priv->homogeneous == EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE) && */
-/*              (!_evas_object_table_check_hints_homogeneous_table */
-/*               (child, &opt->align.h, opt->min.w, "horizontal"))) */
-/*       { */
-/*          opt->expand_h = 1; */
-/*          expand_h = 1; */
-/*       } */
-
 
        opt->expand_v = 0;
        if ((weighth > 0.0) &&
@@ -392,13 +364,6 @@ _evas_object_table_calculate_hints_homogeneous(Evas_Object *o, Evas_Object_Table
             opt->expand_v = 1;
             expand_v = 1;
          }
-/*     else if ((priv->homogeneous == EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE) && */
-/*              (!_evas_object_table_check_hints_homogeneous_table */
-/*               (child, &opt->align.v, opt->min.h, "vertical"))) */
-/*       { */
-/*          opt->expand_v = 1; */
-/*          expand_v = 1; */
-/*       } */
 
        opt->fill_h = 0;
        if (opt->align.h < 0.0)
@@ -496,25 +461,48 @@ _evas_object_table_calculate_layout_homogeneous_sizes(const Evas_Object *o, cons
 static void
 _evas_object_table_calculate_layout_homogeneous(Evas_Object *o, Evas_Object_Table_Data *priv)
 {
-   Evas_Coord x, y, w, h, cellw, cellh;
+   Evas_Coord x = 0, y = 0, w = 0, h = 0, ww, hh, cellw = 0, cellh = 0;
    Eina_List *l;
    Evas_Object_Table_Option *opt;
-
+   
    _evas_object_table_calculate_layout_homogeneous_sizes
      (o, priv, &x, &y, &w, &h, &cellw, &cellh);
-
+   
+   ww = w - ((priv->size.cols - 1) * priv->pad.h);
+   hh = h - ((priv->size.rows - 1) * priv->pad.v);
+   
+   if (ww < 0) ww = 0;
+   if (ww < 0) ww = 0;
+   
    EINA_LIST_FOREACH(priv->children, l, opt)
      {
        Evas_Object *child = opt->obj;
-       Evas_Coord cx, cy, cw, ch;
+       Evas_Coord cx, cy, cw, ch, cox, coy, cow, coh;
 
-       cx = x + opt->col * (cellw + priv->pad.h);
-       cy = y + opt->row * (cellh + priv->pad.v);
+       cx = x + ((opt->col * ww) / priv->size.cols);
+        cw = x + (((opt->col + opt->colspan) * ww) / priv->size.cols) - cx;
+       cy = y + ((opt->row * hh) / priv->size.rows);
+        ch = y + (((opt->row + opt->rowspan) * hh) / priv->size.rows) - cy;
 
-       cw = opt->colspan * cellw - priv->pad.h;
-       ch = opt->rowspan * cellh - priv->pad.v;
+        cx += (opt->col) * priv->pad.h;
+        cy += (opt->row) * priv->pad.v;
+        
+        cox = cx;
+        coy = cy;
+        cow = cw;
+        coh = ch;
 
        _evas_object_table_calculate_cell(opt, &cx, &cy, &cw, &ch);
+        if (cw > cow)
+          {
+             cx = cox;
+             cw = cow;
+          }
+        if (ch > coh)
+          {
+             cy = coy;
+             ch = coh;
+          }
 
         if (priv->is_mirrored)
           {
@@ -543,8 +531,10 @@ _evas_object_table_count_expands(const Eina_Bool *expands, int start, int end)
    int count = 0;
 
    for (; itr < itr_end; itr++)
-     if (*itr)
-       count++;
+     {
+        if (*itr)
+           count++;
+     }
 
    return count;
 }
@@ -578,28 +568,55 @@ _evas_object_table_sizes_calc_noexpand(Evas_Coord *sizes, int start, int end, Ev
 }
 
 static void
-_evas_object_table_sizes_calc_expand(Evas_Coord *sizes, int start, int end, Evas_Coord space, const Eina_Bool *expands, int expand_count)
+_evas_object_table_sizes_calc_expand(Evas_Coord *sizes, int start, int end, Evas_Coord space, const Eina_Bool *expands, int expand_count, double *weights, double weighttot)
 {
    Evas_Coord *itr = sizes + start, *itr_end = sizes + end;
    const Eina_Bool *itr_expand = expands + start;
-   Evas_Coord step, last_space;
-
+   Evas_Coord step = 0, last_space = 0;
+   int total = 0, i = start;
+   
    /* XXX move to fixed point math and spread errors among cells */
-   step = space / expand_count;
-   last_space = space - step * (expand_count - 1);
-
-   for (; itr < itr_end; itr++, itr_expand++)
-     if (*itr_expand)
-       {
-         expand_count--;
-         if (expand_count > 0)
-           *itr += step;
-         else
-           {
-              *itr += last_space;
-              break;
-           }
-       }
+   if (weighttot > 0.0)
+     {
+        step = space / expand_count;
+        last_space = space - step * (expand_count - 1);
+     }
+
+   for (; itr < itr_end; itr++, itr_expand++, i++)
+     {
+        if (weighttot <= 0.0)
+          {
+             if (*itr_expand)
+               {
+                  expand_count--;
+                  if (expand_count > 0)
+                     *itr += step;
+                  else
+                    {
+                       *itr += last_space;
+                       break;
+                    }
+               }
+          }
+        else
+          {
+             if (*itr_expand)
+               {
+                  expand_count--;
+                  if (expand_count > 0)
+                    {
+                       step = (weights[i] / weighttot) * space;
+                       *itr += step;
+                       total += step;
+                    }
+                  else
+                    {
+                       *itr += space - total;
+                       break;
+                    }
+               }
+          }
+     }
 }
 
 static void
@@ -608,7 +625,9 @@ _evas_object_table_calculate_hints_regular(Evas_Object *o, Evas_Object_Table_Dat
    Evas_Object_Table_Option *opt;
    Evas_Object_Table_Cache *c;
    Eina_List *l;
-
+   double totweightw = 0.0, totweighth = 0.0;
+   int i;
+   
    if (!priv->cache)
      {
        priv->cache = _evas_object_table_cache_alloc
@@ -620,6 +639,10 @@ _evas_object_table_calculate_hints_regular(Evas_Object *o, Evas_Object_Table_Dat
    _evas_object_table_cache_reset(priv);
 
    /* cache interesting data */
+   memset(c->expands.h, 1, priv->size.cols);
+   memset(c->expands.v, 1, priv->size.rows);
+   memset(c->weights.h, 0, priv->size.cols);
+   memset(c->weights.v, 0, priv->size.rows);
    EINA_LIST_FOREACH(priv->children, l, opt)
      {
        Evas_Object *child = opt->obj;
@@ -643,7 +666,7 @@ _evas_object_table_calculate_hints_regular(Evas_Object *o, Evas_Object_Table_Dat
            ((opt->max.h < 0) ||
             ((opt->max.h > -1) && (opt->min.h < opt->max.h))))
          opt->expand_v = 1;
-
+        
        opt->fill_h = 0;
        if (opt->align.h < 0.0)
          {
@@ -657,11 +680,23 @@ _evas_object_table_calculate_hints_regular(Evas_Object *o, Evas_Object_Table_Dat
             opt->fill_v = 1;
          }
 
-       if (opt->expand_h)
-         memset(c->expands.h + opt->col, 1, opt->colspan);
-       if (opt->expand_v)
-         memset(c->expands.v + opt->row, 1, opt->rowspan);
+       if (!opt->expand_h)
+         memset(c->expands.h + opt->col, 0, opt->colspan);
+        else
+          {
+             for (i = opt->col; i < opt->col + opt->colspan; i++)
+                c->weights.h[i] += (weightw / (double)opt->colspan);
+          }
+       if (!opt->expand_v)
+         memset(c->expands.v + opt->row, 0, opt->rowspan);
+        else
+          {
+             for (i = opt->row; i < opt->row + opt->rowspan; i++)
+                c->weights.v[i] += (weighth / (double)opt->rowspan);
+          }
      }
+   for (i = 0; i < priv->size.cols; i++) totweightw += c->weights.h[i];
+   for (i = 0; i < priv->size.rows; i++) totweighth += c->weights.v[i];
 
    /* calculate sizes for each row and column */
    EINA_LIST_FOREACH(priv->children, l, opt)
@@ -682,7 +717,7 @@ _evas_object_table_calculate_hints_regular(Evas_Object *o, Evas_Object_Table_Dat
             if (count > 0)
               _evas_object_table_sizes_calc_expand
                 (c->sizes.h, opt->col, opt->end_col, space,
-                 c->expands.h, count);
+                 c->expands.h, count, c->weights.h, totweightw);
             else
               _evas_object_table_sizes_calc_noexpand
                 (c->sizes.h, opt->col, opt->end_col, space);
@@ -702,13 +737,16 @@ _evas_object_table_calculate_hints_regular(Evas_Object *o, Evas_Object_Table_Dat
             if (count > 0)
               _evas_object_table_sizes_calc_expand
                 (c->sizes.v, opt->row, opt->end_row, space,
-                 c->expands.v, count);
+                 c->expands.v, count, c->weights.v, totweighth);
             else
               _evas_object_table_sizes_calc_noexpand
                 (c->sizes.v, opt->row, opt->end_row, space);
          }
      }
 
+   c->total.weights.h = totweightw;
+   c->total.weights.v = totweighth;
+   
    c->total.expands.h = _evas_object_table_count_expands
      (c->expands.h, 0, priv->size.cols);
    c->total.expands.v = _evas_object_table_count_expands
@@ -760,7 +798,7 @@ _evas_object_table_calculate_layout_regular(Evas_Object *o, Evas_Object_Table_Da
        memcpy(cols, c->sizes.h, size);
        _evas_object_table_sizes_calc_expand
          (cols, 0, priv->size.cols, w - c->total.min.w,
-          c->expands.h, c->total.expands.h);
+          c->expands.h, c->total.expands.h, c->weights.h, c->total.weights.h);
      }
 
    /* handle vertical */
@@ -783,7 +821,7 @@ _evas_object_table_calculate_layout_regular(Evas_Object *o, Evas_Object_Table_Da
        memcpy(rows, c->sizes.v, size);
        _evas_object_table_sizes_calc_expand
          (rows, 0, priv->size.rows, h - c->total.min.h,
-          c->expands.v, c->total.expands.v);
+          c->expands.v, c->total.expands.v, c->weights.v, c->total.weights.v);
      }
 
    EINA_LIST_FOREACH(priv->children, l, opt)
@@ -916,23 +954,12 @@ _evas_object_table_smart_set_user(Evas_Smart_Class *sc)
    sc->calculate = _evas_object_table_smart_calculate;
 }
 
-/**
- * Create a new table.
- *
- * It's set to non-homogeneous by default, add children with
- * evas_object_table_pack().
- */
 EAPI Evas_Object *
 evas_object_table_add(Evas *evas)
 {
    return evas_object_smart_add(evas, _evas_object_table_smart_class_new());
 }
 
-/**
- * Create a table that is child of a given element @a parent.
- *
- * @see evas_object_table_add()
- */
 EAPI Evas_Object *
 evas_object_table_add_to(Evas_Object *parent)
 {
@@ -945,48 +972,6 @@ evas_object_table_add_to(Evas_Object *parent)
    return o;
 }
 
-/**
- * Set how this table should layout children.
- *
- * @todo consider aspect hint and respect it.
- *
- * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE
- * If table does not use homogeneous mode then columns and rows will
- * be calculated based on hints of individual cells. This operation
- * mode is more flexible, but more complex and heavy to calculate as
- * well. @b Weight properties are handled as a boolean
- * expand. Negative alignment will be considered as 0.5.
- *
- * @todo @c EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE should balance weight.
- *
- * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE
- * When homogeneous is relative to table the own table size is divided
- * equally among children, filling the whole table area. That is, if
- * table has @c WIDTH and @c COLUMNS, each cell will get <tt>WIDTH /
- * COLUMNS</tt> pixels. If children have minimum size that is larger
- * than this amount (including padding), then it will overflow and be
- * aligned respecting the alignment hint, possible overlapping sibling
- * cells. @b Weight hint is used as a boolean, if greater than zero it
- * will make the child expand in that axis, taking as much space as
- * possible (bounded to maximum size hint). Negative alignment will be
- * considered as 0.5.
- *
- * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM
- * When homogeneous is relative to item it means the greatest minimum
- * cell size will be used. That is, if no element is set to expand,
- * the table will have its contents to a minimum size, the bounding
- * box of all these children will be aligned relatively to the table
- * object using evas_object_table_align_get(). If the table area is
- * too small to hold this minimum bounding box, then the objects will
- * keep their size and the bounding box will overflow the box area,
- * still respecting the alignment. @b Weight hint is used as a
- * boolean, if greater than zero it will make that cell expand in that
- * axis, toggling the <b>expand mode</b>, which makes the table behave
- * much like @b EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE, except that the
- * bounding box will overflow and items will not overlap siblings. If
- * no minimum size is provided at all then the table will fallback to
- * expand mode as well.
- */
 EAPI void
 evas_object_table_homogeneous_set(Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous)
 {
@@ -998,11 +983,6 @@ evas_object_table_homogeneous_set(Evas_Object *o, Evas_Object_Table_Homogeneous_
    evas_object_smart_changed(o);
 }
 
-/**
- * Get the current layout homogeneous mode.
- *
- * @see evas_object_table_homogeneous_set()
- */
 EAPI Evas_Object_Table_Homogeneous_Mode
 evas_object_table_homogeneous_get(const Evas_Object *o)
 {
@@ -1010,9 +990,6 @@ evas_object_table_homogeneous_get(const Evas_Object *o)
    return priv->homogeneous;
 }
 
-/**
- * Set the alignment of the whole bounding box of contents.
- */
 EAPI void
 evas_object_table_align_set(Evas_Object *o, double horizontal, double vertical)
 {
@@ -1024,9 +1001,6 @@ evas_object_table_align_set(Evas_Object *o, double horizontal, double vertical)
    evas_object_smart_changed(o);
 }
 
-/**
- * Get alignment of the whole bounding box of contents.
- */
 EAPI void
 evas_object_table_align_get(const Evas_Object *o, double *horizontal, double *vertical)
 {
@@ -1043,9 +1017,6 @@ evas_object_table_align_get(const Evas_Object *o, double *horizontal, double *ve
      }
 }
 
-/**
- * Set padding between cells.
- */
 EAPI void
 evas_object_table_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical)
 {
@@ -1058,9 +1029,6 @@ evas_object_table_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord
    evas_object_smart_changed(o);
 }
 
-/**
- * Get padding between cells.
- */
 EAPI void
 evas_object_table_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical)
 {
@@ -1077,18 +1045,6 @@ evas_object_table_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas
      }
 }
 
-/**
- * Add a new child to a table object.
- *
- * @param o The given table object.
- * @param child The child object to add.
- * @param col relative-horizontal position to place child.
- * @param row relative-vertical position to place child.
- * @param colspan how many relative-horizontal position to use for this child.
- * @param rowspan how many relative-vertical position to use for this child.
- *
- * @return 1 on success, 0 on failure.
- */
 EAPI Eina_Bool
 evas_object_table_pack(Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
 {
@@ -1203,15 +1159,6 @@ _evas_object_table_remove_opt(Evas_Object_Table_Data *priv, Evas_Object_Table_Op
      }
 }
 
-/**
- * Remove child from table.
- *
- * @note removing a child will immediately call a walk over children in order
- *       to recalculate numbers of columns and rows. If you plan to remove
- *       all children, use evas_object_table_clear() instead.
- *
- * @return 1 on success, 0 on failure.
- */
 EAPI Eina_Bool
 evas_object_table_unpack(Evas_Object *o, Evas_Object *child)
 {
@@ -1242,12 +1189,6 @@ evas_object_table_unpack(Evas_Object *o, Evas_Object *child)
    return EINA_TRUE;
 }
 
-/**
- * Faster way to remove all child objects from a table object.
- *
- * @param o The given table object.
- * @param clear if true, it will delete just removed children.
- */
 EAPI void
 evas_object_table_clear(Evas_Object *o, Eina_Bool clear)
 {
@@ -1270,14 +1211,6 @@ evas_object_table_clear(Evas_Object *o, Eina_Bool clear)
    evas_object_smart_changed(o);
 }
 
-/**
- * Get the number of columns and rows this table takes.
- *
- * @note columns and rows are virtual entities, one can specify a table
- *       with a single object that takes 4 columns and 5 rows. The only
- *       difference for a single cell table is that paddings will be
- *       accounted proportionally.
- */
 EAPI void
 evas_object_table_col_row_size_get(const Evas_Object *o, int *cols, int *rows)
 {
@@ -1294,11 +1227,6 @@ evas_object_table_col_row_size_get(const Evas_Object *o, int *cols, int *rows)
      }
 }
 
-/**
- * Get an iterator to walk the list of children for the table.
- *
- * @note Do not remove or delete objects while walking the list.
- */
 EAPI Eina_Iterator *
 evas_object_table_iterator_new(const Evas_Object *o)
 {
@@ -1323,11 +1251,6 @@ evas_object_table_iterator_new(const Evas_Object *o)
    return &it->iterator;
 }
 
-/**
- * Get an accessor to get random access to the list of children for the table.
- *
- * @note Do not remove or delete objects while walking the list.
- */
 EAPI Eina_Accessor *
 evas_object_table_accessor_new(const Evas_Object *o)
 {
@@ -1352,14 +1275,6 @@ evas_object_table_accessor_new(const Evas_Object *o)
    return &it->accessor;
 }
 
-/**
- * Get the list of children for the table.
- *
- * @note This is a duplicate of the list kept by the table internally.
- *       It's up to the user to destroy it when it no longer needs it.
- *       It's possible to remove objects from the table when walking this
- *       list, but these removals won't be reflected on it.
- */
 EAPI Eina_List *
 evas_object_table_children_get(const Evas_Object *o)
 {
@@ -1374,11 +1289,6 @@ evas_object_table_children_get(const Evas_Object *o)
    return new_list;
 }
 
-/**
- * Get a child from the table using its coordinates
- *
- * @note This does not take into account col/row spanning
- */
 Evas_Object *
 evas_object_table_child_get(const Evas_Object *o, unsigned short col, unsigned short row)
 {
@@ -1393,15 +1303,6 @@ evas_object_table_child_get(const Evas_Object *o, unsigned short col, unsigned s
    return NULL;
 }
 
-/**
- * Gets the mirrored mode of the table. In mirrored mode the table items go
- * from right to left instead of left to right. That is, 1,1 is top right, not
- * to left.
- *
- * @param obj The table object.
- * @return EINA_TRUE if it's a mirrored table, EINA_FALSE otherwise.
- * @since 1.1.0
- */
 EAPI Eina_Bool
 evas_object_table_mirrored_get(const Evas_Object *obj)
 {
@@ -1410,15 +1311,6 @@ evas_object_table_mirrored_get(const Evas_Object *obj)
    return priv->is_mirrored;
 }
 
-/**
- * Sets the mirrored mode of the table. In mirrored mode the table items go
- * from right to left instead of left to right. That is, 1,1 is top right, not
- * to left.
- *
- * @param obj The table object.
- * @param mirrored the mirrored mode to set
- * @since 1.1.0
- */
 EAPI void
 evas_object_table_mirrored_set(Evas_Object *obj, Eina_Bool mirrored)
 {
@@ -1426,10 +1318,6 @@ evas_object_table_mirrored_set(Evas_Object *obj, Eina_Bool mirrored)
    if (priv->is_mirrored != mirrored)
      {
         priv->is_mirrored = mirrored;
-        _evas_object_table_smart_calculate_regular(obj, priv);
+        _evas_object_table_smart_calculate(obj);
      }
 }
-
-/**
- * @}
- */
index 5f39f78..c65b4aa 100644 (file)
@@ -25,15 +25,16 @@ struct _Evas_Object_Text
         unsigned char  r, g, b, a;
       } outline, shadow, glow, glow2;
 
-      unsigned char               style;
+      unsigned char        style;
    } cur, prev;
 
    float                       ascent, descent;
    float                       max_ascent, max_descent;
    Evas_BiDi_Paragraph_Props  *bidi_par_props;
+   const char                 *bidi_delimiters;
    Evas_Object_Text_Item      *items;
 
-   void                       *engine_data;
+   Evas_Font_Set              *font;
 
    char                        changed : 1;
 };
@@ -42,7 +43,6 @@ struct _Evas_Object_Text_Item
 {
    EINA_INLIST;
 
-   Eina_Unicode        *text; /*The shaped text */
    size_t               text_pos;
    size_t               visual_pos;
    Evas_Text_Props      text_props;
@@ -96,14 +96,8 @@ static const Evas_Object_Func object_func =
 /* the actual api call to add a rect */
 /* it has no other api calls as all properties are standard */
 
-/**
- * @addtogroup Evas_Object_Text
- * @{
- */
-
 EVAS_MEMPOOL(_mp_obj);
 
-/* FIXME: doc */
 static int
 _evas_object_text_char_coords_get(const Evas_Object *obj,
       const Evas_Object_Text *o,
@@ -114,27 +108,21 @@ _evas_object_text_char_coords_get(const Evas_Object *obj,
    EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it)
      {
         if ((it->text_pos <= pos) &&
-              (pos < it->text_pos + eina_unicode_strlen(it->text)))
+              (pos < (it->text_pos + it->text_props.text_len)))
           {
-             return ENFN->font_char_coords_get(ENDT, o->engine_data, it->text,
+             return ENFN->font_char_coords_get(ENDT, o->font,
                    &it->text_props, pos - it->text_pos, x, y, w, h);
           }
      }
    return 0;
 }
 
-/* FIXME: doc */
 static void
 _evas_object_text_item_clean(Evas_Object_Text_Item *it)
 {
    evas_common_text_props_content_unref(&it->text_props);
-   if (it->text)
-     {
-        free(it->text);
-     }
 }
 
-/* FIXME: doc */
 static void
 _evas_object_text_items_clear(Evas_Object_Text *o)
 {
@@ -165,7 +153,7 @@ _evas_object_text_it_compare_logical(const void *_it1, const void *_it2)
 
 }
 #endif
-/* FIXME: doc */
+
 static int
 _evas_object_text_last_up_to_pos(const Evas_Object *obj,
       const Evas_Object_Text *o, Evas_Coord cx, Evas_Coord cy)
@@ -192,8 +180,8 @@ _evas_object_text_last_up_to_pos(const Evas_Object *obj,
              if ((x <= cx) && (cx < x + it->adv))
                {
                   return it->text_pos + ENFN->font_last_up_to_pos(ENDT,
-                        o->engine_data,
-                        it->text, &it->text_props,
+                        o->font,
+                        &it->text_props,
                         cx - x,
                         cy);
                }
@@ -209,8 +197,8 @@ _evas_object_text_last_up_to_pos(const Evas_Object *obj,
              if ((it->x <= cx) && (cx < it->x + it->adv))
                {
                   return it->text_pos + ENFN->font_last_up_to_pos(ENDT,
-                        o->engine_data,
-                        it->text, &it->text_props,
+                        o->font,
+                        &it->text_props,
                         cx - it->x,
                         cy);
                }
@@ -219,7 +207,6 @@ _evas_object_text_last_up_to_pos(const Evas_Object *obj,
    return -1;
 }
 
-/* FIXME: doc */
 static int
 _evas_object_text_char_at_coords(const Evas_Object *obj,
       const Evas_Object_Text *o, Evas_Coord cx, Evas_Coord cy,
@@ -232,8 +219,8 @@ _evas_object_text_char_at_coords(const Evas_Object *obj,
         if ((it->x <= cx) && (cx < it->x + it->adv))
           {
              return it->text_pos + ENFN->font_char_at_coords_get(ENDT,
-                   o->engine_data,
-                   it->text, &it->text_props,
+                   o->font,
+                   &it->text_props,
                    cx,
                    cy,
                    rx, ry,
@@ -243,7 +230,6 @@ _evas_object_text_char_at_coords(const Evas_Object *obj,
    return -1;
 }
 
-/* FIXME: doc */
 static Evas_Coord
 _evas_object_text_horiz_advance_get(const Evas_Object *obj,
       const Evas_Object_Text *o)
@@ -260,7 +246,6 @@ _evas_object_text_horiz_advance_get(const Evas_Object *obj,
    return adv;
 }
 
-/* FIXME: doc */
 static Evas_Coord
 _evas_object_text_vert_advance_get(const Evas_Object *obj __UNUSED__,
       const Evas_Object_Text *o)
@@ -299,17 +284,6 @@ _evas_object_text_string_size_get(const Evas_Object *obj,
    if (ch) *ch = h;
 }
 
-/**
- * Creates a new text @c Evas_Object on the provided @c Evas canvas.
- *
- * @param e The @c Evas canvas to create the text object upon.
- *
- * @see evas_object_text_font_source_set
- * @see evas_object_text_font_set
- * @see evas_object_text_text_set
- *
- * @returns NULL on error, A pointer to a new @c Evas_Object on success.
- */
 EAPI Evas_Object *
 evas_object_text_add(Evas *e)
 {
@@ -324,12 +298,6 @@ evas_object_text_add(Evas *e)
    return obj;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_text_font_source_set(Evas_Object *obj, const char *font_source)
 {
@@ -354,12 +322,6 @@ evas_object_text_font_source_set(Evas_Object *obj, const char *font_source)
    eina_stringshare_replace(&o->cur.source, font_source);
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI const char *
 evas_object_text_font_source_get(const Evas_Object *obj)
 {
@@ -375,12 +337,6 @@ evas_object_text_font_source_get(const Evas_Object *obj)
    return o->cur.source;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_text_font_set(Evas_Object *obj, const char *font, Evas_Font_Size size)
 {
@@ -412,15 +368,15 @@ evas_object_text_font_set(Evas_Object *obj, const char *font, Evas_Font_Size siz
      }
 
 #ifdef EVAS_FRAME_QUEUING
-   if (o->engine_data)
-      evas_common_pipe_op_text_flush(o->engine_data);
+   if (o->font)
+      evas_common_pipe_op_text_flush((RGBA_Font *) o->font);
 #endif
 
    /* DO IT */
-   if (o->engine_data)
+   if (o->font)
      {
-       evas_font_free(obj->layer->evas, o->engine_data);
-       o->engine_data = NULL;
+       evas_font_free(obj->layer->evas, o->font);
+       o->font = NULL;
      }
    if (!same_font)
      {
@@ -433,14 +389,14 @@ evas_object_text_font_set(Evas_Object *obj, const char *font, Evas_Font_Size siz
        o->prev.font = NULL;
      }
    o->cur.size = size;
-   o->engine_data = evas_font_load(obj->layer->evas, o->cur.font, o->cur.source,
+   o->font = evas_font_load(obj->layer->evas, o->cur.font, o->cur.source,
                                   (int)(((double)o->cur.size) * obj->cur.scale));
-   if (o->engine_data)
+   if (o->font)
      {
-        o->ascent = ENFN->font_ascent_get(ENDT, o->engine_data);
-        o->descent = ENFN->font_descent_get(ENDT, o->engine_data);
-        o->max_ascent = ENFN->font_max_ascent_get(ENDT, o->engine_data);
-        o->max_descent = ENFN->font_max_descent_get(ENDT, o->engine_data);
+        o->ascent = ENFN->font_ascent_get(ENDT, o->font);
+        o->descent = ENFN->font_descent_get(ENDT, o->font);
+        o->max_ascent = ENFN->font_max_ascent_get(ENDT, o->font);
+        o->max_descent = ENFN->font_max_descent_get(ENDT, o->font);
      }
    else
      {
@@ -472,18 +428,6 @@ evas_object_text_font_set(Evas_Object *obj, const char *font, Evas_Font_Size siz
    evas_object_inform_call_resize(obj);
 }
 
-/**
- * Query evas for font information of a text @c Evas_Object.
- *
- * This function allows the font name and size of a text @c Evas_Object as
- * created with evas_object_text_add() to be queried. Be aware that the font
- * name string is still owned by Evas and should NOT have free() called on
- * it by the caller of the function.
- *
- * @param obj  The evas text object to query for font information.
- * @param font A pointer to the location to store the font name in (may be NULL).
- * @param size A pointer to the location to store the font size in (may be NULL).
- */
 EAPI void
 evas_object_text_font_get(const Evas_Object *obj, const char **font, Evas_Font_Size *size)
 {
@@ -515,30 +459,30 @@ evas_object_text_font_get(const Evas_Object *obj, const char **font, Evas_Font_S
  */
 static Evas_Object_Text_Item *
 _evas_object_text_item_new(Evas_Object *obj, Evas_Object_Text *o,
-      const Eina_Unicode *str,
+      Evas_Font_Instance *fi, const Eina_Unicode *str, Evas_Script_Type script,
       size_t pos, size_t visual_pos, size_t len)
 {
    Evas_Object_Text_Item *it;
 
    it = calloc(1, sizeof(Evas_Object_Text_Item));
-   it->text = calloc(sizeof(Eina_Unicode), len + 1);
    it->text_pos = pos;
    it->visual_pos = visual_pos;
-   eina_unicode_strncpy(it->text, str + pos, len);
    evas_common_text_props_bidi_set(&it->text_props, o->bidi_par_props,
          it->text_pos);
-   evas_common_text_props_script_set(&it->text_props, it->text);
-   if (o->engine_data)
+   evas_common_text_props_script_set(&it->text_props, script);
+
+   if (fi)
      {
         ENFN->font_text_props_info_create(ENDT,
-              o->engine_data, it->text, &it->text_props,
+              fi, str + pos, &it->text_props,
               o->bidi_par_props, it->text_pos, len);
+
         ENFN->font_string_size_get(ENDT,
-              o->engine_data,
-              it->text, &it->text_props,
+              o->font,
+              &it->text_props,
               &it->w, &it->h);
-        it->adv = it->w + ENFN->font_right_inset_get(ENDT, o->engine_data,
-                                                    &it->text_props);
+        it->adv = ENFN->font_h_advance_get(ENDT, o->font,
+              &it->text_props);
      }
    o->items = (Evas_Object_Text_Item *)
       eina_inlist_append(EINA_INLIST_GET(o->items), EINA_INLIST_GET(it));
@@ -611,41 +555,57 @@ _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 cutoff;
-   int len = eina_unicode_strlen(text);
+   int len = eina_unicode_strlen(text), par_len;
 #ifdef BIDI_SUPPORT
+   int *segment_idxs = NULL;
+   if (o->bidi_delimiters)
+      segment_idxs = evas_bidi_segment_idxs_get(text, o->bidi_delimiters);
    evas_bidi_paragraph_props_unref(o->bidi_par_props);
-   o->bidi_par_props = evas_bidi_paragraph_props_get(text);
+   o->bidi_par_props = evas_bidi_paragraph_props_get(text, len, segment_idxs);
    evas_bidi_props_reorder_line(NULL, 0, len, o->bidi_par_props, &v_to_l);
+   if (segment_idxs) free(segment_idxs);
 #endif
    visual_pos = pos = 0;
 
-   do
+   par_len = len;
+   while (len > 0)
      {
-        cutoff = evas_common_language_script_end_of_run_get(
+        Evas_Font_Instance *script_fi = NULL;
+        int script_len = len, tmp_cut;
+        Evas_Script_Type script;
+        tmp_cut = evas_common_language_script_end_of_run_get(
               text + pos,
               o->bidi_par_props,
-              pos, len - pos);
-        if (cutoff > 0)
+              pos, len);
+        if (tmp_cut > 0)
+           script_len = tmp_cut;
+
+        script = evas_common_language_script_type_get(text, script_len);
+
+        while (script_len > 0)
           {
+             Evas_Font_Instance *cur_fi = NULL;
+             int run_len = script_len;
+             if (o->font)
+               {
+                  run_len = ENFN->font_run_end_get(ENDT,
+                        o->font, &script_fi, &cur_fi,
+                        script, text + pos, script_len);
+               }
 #ifdef BIDI_SUPPORT
              visual_pos = evas_bidi_position_logical_to_visual(
-                   v_to_l, len, pos);
+                   v_to_l, par_len, pos);
 #else
              visual_pos = pos;
 #endif
-             _evas_object_text_item_new(obj, o, text, pos, visual_pos, cutoff);
-             pos += cutoff;
+             _evas_object_text_item_new(obj, o, cur_fi, text, script,
+                   pos, visual_pos, run_len);
+
+             pos += run_len;
+             script_len -= run_len;
+             len -= run_len;
           }
      }
-   while (cutoff > 0);
-#ifdef BIDI_SUPPORT
-   visual_pos = evas_bidi_position_logical_to_visual(
-         v_to_l, len, pos);
-#else
-   visual_pos = pos;
-#endif
-   _evas_object_text_item_new(obj, o, text, pos, visual_pos, len - pos);
 
    _evas_object_text_item_order(obj, o);
 
@@ -653,11 +613,6 @@ _evas_object_text_layout(Evas_Object *obj, Evas_Object_Text *o, const Eina_Unico
 }
 
 
-/**
- * Sets the text to be displayed by the given evas text object.
- * @param obj  Evas text object.
- * @param text Text to display.
- */
 EAPI void
 evas_object_text_text_set(Evas_Object *obj, const char *_text)
 {
@@ -719,11 +674,39 @@ evas_object_text_text_set(Evas_Object *obj, const char *_text)
    if (text) free(text);
 }
 
-/**
- * Retrieves the text currently being displayed by the given evas text object.
- * @param  obj The given evas text object.
- * @return The text currently being displayed.  Do not free it.
- */
+EAPI void
+evas_object_text_bidi_delimiters_set(Evas_Object *obj, const char *delim)
+{
+   Evas_Object_Text *o;
+
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return;
+   MAGIC_CHECK_END();
+   o = (Evas_Object_Text *)(obj->object_data);
+   MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
+   return;
+   MAGIC_CHECK_END();
+
+   eina_stringshare_replace(&o->bidi_delimiters, delim);
+}
+
+EAPI const char *
+evas_object_text_bidi_delimiters_get(const Evas_Object *obj)
+{
+   Evas_Object_Text *o;
+
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return NULL;
+   MAGIC_CHECK_END();
+   o = (Evas_Object_Text *)(obj->object_data);
+   MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
+   return NULL;
+   MAGIC_CHECK_END();
+
+   return o->bidi_delimiters;
+}
+
+
 EAPI const char *
 evas_object_text_text_get(const Evas_Object *obj)
 {
@@ -739,12 +722,6 @@ evas_object_text_text_get(const Evas_Object *obj)
    return o->cur.utf8_text;
 }
 
-/**
- * Retrieves the direction of the text currently being displayed in the
- * text object.
- * @param  obj The given evas text object.
- * @return the direction of the text
- */
 EAPI Evas_BiDi_Direction
 evas_object_text_direction_get(const Evas_Object *obj)
 {
@@ -764,12 +741,6 @@ evas_object_text_direction_get(const Evas_Object *obj)
    return EVAS_BIDI_DIRECTION_NATURAL;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI Evas_Coord
 evas_object_text_ascent_get(const Evas_Object *obj)
 {
@@ -785,12 +756,6 @@ evas_object_text_ascent_get(const Evas_Object *obj)
    return o->ascent;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI Evas_Coord
 evas_object_text_descent_get(const Evas_Object *obj)
 {
@@ -806,12 +771,6 @@ evas_object_text_descent_get(const Evas_Object *obj)
    return o->descent;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI Evas_Coord
 evas_object_text_max_ascent_get(const Evas_Object *obj)
 {
@@ -827,12 +786,6 @@ evas_object_text_max_ascent_get(const Evas_Object *obj)
    return o->max_ascent;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI Evas_Coord
 evas_object_text_max_descent_get(const Evas_Object *obj)
 {
@@ -848,12 +801,6 @@ evas_object_text_max_descent_get(const Evas_Object *obj)
    return o->max_descent;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI Evas_Coord
 evas_object_text_inset_get(const Evas_Object *obj)
 {
@@ -866,17 +813,11 @@ evas_object_text_inset_get(const Evas_Object *obj)
    MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
    return 0;
    MAGIC_CHECK_END();
-   if (!o->engine_data) return 0;
+   if (!o->font) return 0;
    if (!o->items) return 0;
-   return ENFN->font_inset_get(ENDT, o->engine_data, &o->items->text_props);
+   return ENFN->font_inset_get(ENDT, o->font, &o->items->text_props);
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI Evas_Coord
 evas_object_text_horiz_advance_get(const Evas_Object *obj)
 {
@@ -889,17 +830,11 @@ evas_object_text_horiz_advance_get(const Evas_Object *obj)
    MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
    return 0;
    MAGIC_CHECK_END();
-   if (!o->engine_data) return 0;
+   if (!o->font) return 0;
    if (!o->items) return 0;
    return _evas_object_text_horiz_advance_get(obj, o);
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI Evas_Coord
 evas_object_text_vert_advance_get(const Evas_Object *obj)
 {
@@ -912,29 +847,11 @@ evas_object_text_vert_advance_get(const Evas_Object *obj)
    MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
    return 0;
    MAGIC_CHECK_END();
-   if (!o->engine_data) return 0;
+   if (!o->font) return 0;
    if (!o->items) return o->ascent + o->descent;
    return _evas_object_text_vert_advance_get(obj, o);
 }
 
-/**
- * Retrieve position and dimension information of a character within a text @c Evas_Object.
- *
- * This function is used to obtain the X, Y, width and height of a the character
- * located at @p pos within the @c Evas_Object @p obj. @p obj must be a text object
- * as created with evas_object_text_add(). Any of the @c Evas_Coord parameters (@p cx,
- * @p cy, @p cw, @p ch) may be NULL in which case no value will be assigned to that
- * parameter.
- *
- * @param obj  The text object to retrieve position information for.
- * @param pos  The character position to request co-ordinates for.
- * @param cx   A pointer to an @c Evas_Coord to store the X value in (can be NULL).
- * @param cy   A pointer to an @c Evas_Coord to store the Y value in (can be NULL).
- * @param cw   A pointer to an @c Evas_Coord to store the Width value in (can be NULL).
- * @param ch   A pointer to an @c Evas_Coord to store the Height value in (can be NULL).
- *
- * @returns EINA_FALSE on error, EINA_TRUE on success.
- */
 EAPI Eina_Bool
 evas_object_text_char_pos_get(const Evas_Object *obj, int pos, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
 {
@@ -949,7 +866,7 @@ evas_object_text_char_pos_get(const Evas_Object *obj, int pos, Evas_Coord *cx, E
    MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
    return EINA_FALSE;
    MAGIC_CHECK_END();
-   if (!o->engine_data) return EINA_FALSE;
+   if (!o->font) return EINA_FALSE;
    if (!o->items || (pos < 0)) return EINA_FALSE;
    ret = _evas_object_text_char_coords_get(obj, o, (size_t) pos,
             &x, &y, &w, &h);
@@ -978,15 +895,6 @@ evas_object_text_char_pos_get(const Evas_Object *obj, int pos, Evas_Coord *cx, E
 }
 
 
-/**
- * Returns the logical position of the last char in the text
- * up to the pos given. this is NOT the position of the last char
- * because of the possibility of RTL in the text.
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI int
 evas_object_text_last_up_to_pos(const Evas_Object *obj, Evas_Coord x, Evas_Coord y)
 {
@@ -999,17 +907,11 @@ evas_object_text_last_up_to_pos(const Evas_Object *obj, Evas_Coord x, Evas_Coord
    MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
    return -1;
    MAGIC_CHECK_END();
-   if (!o->engine_data) return -1;
+   if (!o->font) return -1;
    if (!o->items) return -1;
    return _evas_object_text_last_up_to_pos(obj, o, x, y - o->max_ascent);
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI int
 evas_object_text_char_coords_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
 {
@@ -1024,7 +926,7 @@ evas_object_text_char_coords_get(const Evas_Object *obj, Evas_Coord x, Evas_Coor
    MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
    return -1;
    MAGIC_CHECK_END();
-   if (!o->engine_data) return -1;
+   if (!o->font) return -1;
    if (!o->items) return -1;
    ret = _evas_object_text_char_at_coords(obj, o, x, y - o->max_ascent,
          &rx, &ry, &rw, &rh);
@@ -1052,12 +954,6 @@ evas_object_text_char_coords_get(const Evas_Object *obj, Evas_Coord x, Evas_Coor
    return ret;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_text_style_set(Evas_Object *obj, Evas_Text_Style_Type style)
 {
@@ -1084,12 +980,6 @@ evas_object_text_style_set(Evas_Object *obj, Evas_Text_Style_Type style)
    evas_object_clip_dirty(obj);
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI Evas_Text_Style_Type
 evas_object_text_style_get(const Evas_Object *obj)
 {
@@ -1105,12 +995,6 @@ evas_object_text_style_get(const Evas_Object *obj)
    return o->cur.style;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_text_shadow_color_set(Evas_Object *obj, int r, int g, int b, int a)
 {
@@ -1134,12 +1018,6 @@ evas_object_text_shadow_color_set(Evas_Object *obj, int r, int g, int b, int a)
    evas_object_change(obj);
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_text_shadow_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
 {
@@ -1166,12 +1044,6 @@ evas_object_text_shadow_color_get(const Evas_Object *obj, int *r, int *g, int *b
    if (a) *a = o->cur.shadow.a;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_text_glow_color_set(Evas_Object *obj, int r, int g, int b, int a)
 {
@@ -1195,12 +1067,6 @@ evas_object_text_glow_color_set(Evas_Object *obj, int r, int g, int b, int a)
    evas_object_change(obj);
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_text_glow_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
 {
@@ -1227,12 +1093,6 @@ evas_object_text_glow_color_get(const Evas_Object *obj, int *r, int *g, int *b,
    if (a) *a = o->cur.glow.a;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_text_glow2_color_set(Evas_Object *obj, int r, int g, int b, int a)
 {
@@ -1256,12 +1116,6 @@ evas_object_text_glow2_color_set(Evas_Object *obj, int r, int g, int b, int a)
    evas_object_change(obj);
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_text_glow2_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
 {
@@ -1288,12 +1142,6 @@ evas_object_text_glow2_color_get(const Evas_Object *obj, int *r, int *g, int *b,
    if (a) *a = o->cur.glow2.a;
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_text_outline_color_set(Evas_Object *obj, int r, int g, int b, int a)
 {
@@ -1317,12 +1165,6 @@ evas_object_text_outline_color_set(Evas_Object *obj, int r, int g, int b, int a)
    evas_object_change(obj);
 }
 
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
 EAPI void
 evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
 {
@@ -1349,16 +1191,6 @@ evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *
    if (a) *a = o->cur.outline.a;
 }
 
-/**
- * Gets the text style pad of a text object.
- *
- * @param obj The given text object.
- * @param l The left pad (or NULL).
- * @param r The right pad (or NULL).
- * @param t The top pad (or NULL).
- * @param b The bottom pad (or NULL).
- *
- */
 EAPI void
 evas_object_text_style_pad_get(const Evas_Object *obj, int *l, int *r, int *t, int *b)
 {
@@ -1389,16 +1221,8 @@ evas_object_text_style_pad_get(const Evas_Object *obj, int *l, int *r, int *t, i
 }
 
 
-/**
- * @}
- */
 
 
-/**
- * Removes all font paths loaded into memory for the given evas.
- * @param   e The given evas.
- * @ingroup Evas_Font_Path_Group
- */
 EAPI void
 evas_font_path_clear(Evas *e)
 {
@@ -1412,12 +1236,6 @@ evas_font_path_clear(Evas *e)
      }
 }
 
-/**
- * Appends a font path to the list of font paths used by the given evas.
- * @param   e    The given evas.
- * @param   path The new font path.
- * @ingroup Evas_Font_Path_Group
- */
 EAPI void
 evas_font_path_append(Evas *e, const char *path)
 {
@@ -1429,12 +1247,6 @@ evas_font_path_append(Evas *e, const char *path)
    e->font_path = eina_list_append(e->font_path, eina_stringshare_add(path));
 }
 
-/**
- * Prepends a font path to the list of font paths used by the given evas.
- * @param   e The given evas.
- * @param   path The new font path.
- * @ingroup Evas_Font_Path_Group
- */
 EAPI void
 evas_font_path_prepend(Evas *e, const char *path)
 {
@@ -1446,12 +1258,6 @@ evas_font_path_prepend(Evas *e, const char *path)
    e->font_path = eina_list_prepend(e->font_path, eina_stringshare_add(path));
 }
 
-/**
- * Retrieves the list of font paths used by the given evas.
- * @param   e The given evas.
- * @return  The list of font paths used.
- * @ingroup Evas_Font_Path_Group
- */
 EAPI const Eina_List *
 evas_font_path_list(const Evas *e)
 {
@@ -1478,14 +1284,6 @@ evas_font_object_rehint(Evas_Object *obj)
      }
 }
 
-/**
- * Changes the font hinting for the given evas.
- *
- * @param e The given evas.
- * @param hinting The hinting to use, one of #EVAS_FONT_HINTING_NONE,
- *        #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE.
- * @ingroup Evas_Font_Group
- */
 EAPI void
 evas_font_hinting_set(Evas *e, Evas_Font_Hinting_Flags hinting)
 {
@@ -1506,14 +1304,6 @@ evas_font_hinting_set(Evas *e, Evas_Font_Hinting_Flags hinting)
      }
 }
 
-/**
- * Retrieves the font hinting used by the given evas.
- *
- * @param e The given evas to query.
- * @return The hinting in use, one of #EVAS_FONT_HINTING_NONE,
- *         #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE.
- * @ingroup Evas_Font_Group
- */
 EAPI Evas_Font_Hinting_Flags
 evas_font_hinting_get(const Evas *e)
 {
@@ -1523,15 +1313,6 @@ evas_font_hinting_get(const Evas *e)
    return e->hinting;
 }
 
-/**
- * Checks if the font hinting is supported by the given evas.
- *
- * @param e The given evas to query.
- * @param hinting The hinting to use, one of #EVAS_FONT_HINTING_NONE,
- *        #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE.
- * @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)
 {
@@ -1544,12 +1325,6 @@ evas_font_hinting_can_hint(const Evas *e, Evas_Font_Hinting_Flags hinting)
    return EINA_FALSE;
 }
 
-/**
- * Force the given evas and associated engine to flush its font cache.
- *
- * @param e The given evas to flush font cache.
- * @ingroup Evas_Font_Group
- */
 EAPI void
 evas_font_cache_flush(Evas *e)
 {
@@ -1560,14 +1335,6 @@ evas_font_cache_flush(Evas *e)
    e->engine.func->font_cache_flush(e->engine.data.output);
 }
 
-/**
- * Changes the size of font cache of the given evas.
- *
- * @param e The given evas to flush font cache.
- * @param size The size, in bytes.
- *
- * @ingroup Evas_Font_Group
- */
 EAPI void
 evas_font_cache_set(Evas *e, int size)
 {
@@ -1579,14 +1346,6 @@ evas_font_cache_set(Evas *e, int size)
    e->engine.func->font_cache_set(e->engine.data.output, size);
 }
 
-/**
- * Changes the size of font cache of the given evas.
- *
- * @param e The given evas to flush font cache.
- * @return The size, in bytes.
- *
- * @ingroup Evas_Font_Group
- */
 EAPI int
 evas_font_cache_get(const Evas *e)
 {
@@ -1597,20 +1356,6 @@ evas_font_cache_get(const Evas *e)
    return e->engine.func->font_cache_get(e->engine.data.output);
 }
 
-/**
- * List of available font descriptions known or found by this evas.
- *
- * The list depends on Evas compile time configuration, such as
- * fontconfig support, and the paths provided at runtime as explained
- * in @ref Evas_Font_Path_Group.
- *
- * @param e The evas instance to query.
- * @return a newly allocated list of strings. Do not change the
- *         strings.  Be sure to call evas_font_available_list_free()
- *         after you're done.
- *
- * @ingroup Evas_Font_Group
- */
 EAPI Eina_List *
 evas_font_available_list(const Evas *e)
 {
@@ -1621,14 +1366,6 @@ evas_font_available_list(const Evas *e)
    return evas_font_dir_available_list(e);
 }
 
-/**
- * Free list of font descriptions returned by evas_font_dir_available_list().
- *
- * @param e The evas instance that returned such list.
- * @param available the list returned by evas_font_dir_available_list().
- *
- * @ingroup Evas_Font_Group
- */
 EAPI void
 evas_font_available_list_free(Evas *e, Eina_List *available)
 {
@@ -1639,25 +1376,6 @@ evas_font_available_list_free(Evas *e, Eina_List *available)
    evas_font_dir_available_list_free(available);
 }
 
-/**
- * Gets the next character in the string
- *
- * Given the UTF-8 string in @p str, and starting byte position in @p pos,
- * this function will place in @p decoded the decoded code point at @p pos
- * and return the byte index for the next character in the string.
- *
- * The only boundary check done is that @p pos must be >= 0. Other than that,
- * no checks are performed, so passing an index value that's not within the
- * length of the string will result in undefined behavior.
- *
- * @param str The UTF-8 string
- * @param pos The byte index where to start
- * @param decoded Address where to store the decoded code point. Optional.
- *
- * @return The byte index of the next character
- *
- * @ingroup Evas_Utils
- */
 EAPI int
 evas_string_char_next_get(const char *str, int pos, int *decoded)
 {
@@ -1671,25 +1389,6 @@ evas_string_char_next_get(const char *str, int pos, int *decoded)
    return p;
 }
 
-/**
- * Gets the previous character in the string
- *
- * Given the UTF-8 string in @p str, and starting byte position in @p pos,
- * this function will place in @p decoded the decoded code point at @p pos
- * and return the byte index for the previous character in the string.
- *
- * The only boundary check done is that @p pos must be >= 1. Other than that,
- * no checks are performed, so passing an index value that's not within the
- * length of the string will result in undefined behavior.
- *
- * @param str The UTF-8 string
- * @param pos The byte index where to start
- * @param decoded Address where to store the decoded code point. Optional.
- *
- * @return The byte index of the previous character
- *
- * @ingroup Evas_Utils
- */
 EAPI int
 evas_string_char_prev_get(const char *str, int pos, int *decoded)
 {
@@ -1703,12 +1402,6 @@ evas_string_char_prev_get(const char *str, int pos, int *decoded)
    return p;
 }
 
-/**
- * Get the length in characters of the string.
- * @param  str The string to get the length of.
- * @return The length in characters (not bytes)
- * @ingroup Evas_Utils
- */
 EAPI int
 evas_string_char_len_get(const char *str)
 {
@@ -1716,87 +1409,125 @@ evas_string_char_len_get(const char *str)
    return eina_unicode_utf8_get_len(str);
 }
 
-/**
- * Get the minimum padding a style adds to the text.
- * @param style The style to determine padding.
- * @param     l Pointer to the current left padding value
- * @param     r Pointer to the current right padding value
- * @param     t Pointer to the current top padding value
- * @param     b Pointer to the current bottom padding value
- */
 void
 evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b)
 {
-   int sl, sr, st, sb;
+   int sl = 0, sr = 0, st = 0, sb = 0;
 
-   if (l) sl = *l;
-   else sl = 0;
+   /* Don't calc anything if there's no style. */
+   if (style != EVAS_TEXT_STYLE_PLAIN)
+     {
+        int shad_sz = 0, shad_dst = 0, out_sz = 0;
+        int dx = 0, minx = 0, maxx = 0;
+        int dy = 0, miny = 0, maxy = 0;
+        Eina_Bool have_shadow = EINA_FALSE;
 
-   if (r) sr = *r;
-   else sr = 0;
+        switch (style & EVAS_TEXT_STYLE_MASK_BASIC)
+          {
+           case EVAS_TEXT_STYLE_SHADOW:
+              shad_dst = 1;
+              have_shadow = EINA_TRUE;
+              break;
+           case EVAS_TEXT_STYLE_OUTLINE_SHADOW:
+           case EVAS_TEXT_STYLE_FAR_SHADOW:
+              shad_dst = 2;
+              out_sz = 1;
+              have_shadow = EINA_TRUE;
+              break;
+           case EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW:
+              shad_dst = 1;
+              shad_sz = 2;
+              out_sz = 1;
+              have_shadow = EINA_TRUE;
+              break;
+           case EVAS_TEXT_STYLE_FAR_SOFT_SHADOW:
+              shad_dst = 2;
+              shad_sz = 2;
+              have_shadow = EINA_TRUE;
+              break;
+           case EVAS_TEXT_STYLE_SOFT_SHADOW:
+              shad_dst = 1;
+              shad_sz = 2;
+              have_shadow = EINA_TRUE;
+              break;
+           case EVAS_TEXT_STYLE_GLOW:
+           case EVAS_TEXT_STYLE_SOFT_OUTLINE:
+              out_sz = 2;
+              break;
+           case EVAS_TEXT_STYLE_OUTLINE:
+              out_sz = 1;
+              break;
+           default:
+              break;
+          }
 
-   if (t) st = *t;
-   else st = 0;
+        minx = -out_sz;
+        maxx = out_sz;
+        miny = -out_sz;
+        maxy = out_sz;
+        if (have_shadow)
+          {
+             int shx1, shx2, shy1, shy2;
+             switch (style & EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION)
+               {
+                case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT:
+                   dx = 1;
+                   dy = 1;
+                   break;
+                case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM:
+                   dx = 0;
+                   dy = 1;
+                   break;
+                case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT:
+                   dx = -1;
+                   dy = 1;
+                   break;
+                case EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT:
+                   dx = -1;
+                   dy = 0;
+                   break;
+                case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT:
+                   dx = -1;
+                   dy = -1;
+                   break;
+                case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP:
+                   dx = 0;
+                   dy = -1;
+                   break;
+                case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT:
+                   dx = 1;
+                   dy = -1;
+                   break;
+                case EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT:
+                   dx = 1;
+                   dy = 0;
+                default:
+                   break;
+               }
+             shx1 = dx * shad_dst;
+             shx1 -= shad_sz;
+             shx2 = dx * shad_dst;
+             shx2 += shad_sz;
+             if (shx1 < minx) minx = shx1;
+             if (shx2 > maxx) maxx = shx2;
+
+             shy1 = dy * shad_dst;
+             shy1 -= shad_sz;
+             shy2 = dy * shad_dst;
+             shy2 += shad_sz;
+             if (shy1 < miny) miny = shy1;
+             if (shy2 > maxy) maxy = shy2;
+          }
 
-   if (b) sb = *b;
-   else sb = 0;
+        if (l) sl = *l;
+        if (r) sr = *r;
+        if (t) st = *t;
+        if (b) sb = *b;
 
-   if (style == EVAS_TEXT_STYLE_SHADOW)
-     {
-       if (sr < 1) sr = 1;
-       if (sb < 1) sb = 1;
-     }
-   else if (style == EVAS_TEXT_STYLE_OUTLINE)
-     {
-       if (sl < 1) sl = 1;
-       if (sr < 1) sr = 1;
-       if (st < 1) st = 1;
-       if (sb < 1) sb = 1;
-     }
-   else if (style == EVAS_TEXT_STYLE_SOFT_OUTLINE)
-     {
-       if (sl < 2) sl = 2;
-       if (sr < 2) sr = 2;
-       if (st < 2) st = 2;
-       if (sb < 2) sb = 2;
-     }
-   else if (style == EVAS_TEXT_STYLE_GLOW)
-     {
-       if (sl < 2) sl = 2;
-       if (sr < 2) sr = 2;
-       if (st < 2) st = 2;
-       if (sb < 2) sb = 2;
-     }
-   else if (style == EVAS_TEXT_STYLE_OUTLINE_SHADOW)
-     {
-       if (sl < 1) sl = 1;
-       if (sr < 2) sr = 2;
-       if (st < 1) st = 1;
-       if (sb < 2) sb = 2;
-     }
-   else if (style == EVAS_TEXT_STYLE_FAR_SHADOW)
-     {
-       if (sr < 2) sr = 2;
-       if (sb < 2) sb = 2;
-     }
-   else if (style == EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW)
-     {
-       if (sl < 1) sl = 1;
-       if (sr < 3) sr = 3;
-       if (st < 1) st = 1;
-       if (sb < 3) sb = 3;
-     }
-   else if (style == EVAS_TEXT_STYLE_SOFT_SHADOW)
-     {
-       if (sl < 1) sl = 1;
-       if (sr < 3) sr = 3;
-       if (st < 1) st = 1;
-       if (sb < 3) sb = 3;
-     }
-   else if (style == EVAS_TEXT_STYLE_FAR_SOFT_SHADOW)
-     {
-       if (sr < 4) sr = 4;
-       if (sb < 4) sb = 4;
+        if (sr < maxx) sr = maxx;
+        if (sl < -minx) sl = -minx;
+        if (sb < maxy) sb = maxy;
+        if (st < -miny) st = -miny;
      }
 
    if (l) *l = sl;
@@ -1861,7 +1592,7 @@ evas_object_text_free(Evas_Object *obj)
    if (o->cur.utf8_text) eina_stringshare_del(o->cur.utf8_text);
    if (o->cur.font) eina_stringshare_del(o->cur.font);
    if (o->cur.source) eina_stringshare_del(o->cur.source);
-   if (o->engine_data) evas_font_free(obj->layer->evas, o->engine_data);
+   if (o->font) evas_font_free(obj->layer->evas, o->font);
 #ifdef BIDI_SUPPORT
    evas_bidi_paragraph_props_unref(o->bidi_par_props);
 #endif
@@ -1884,6 +1615,7 @@ evas_object_text_render(Evas_Object *obj, void *output, void *context, void *sur
        {0, 1, 2, 1, 0}
      };
    int sl = 0, st = 0;
+   int shad_dst, shad_sz, dx, dy, haveshad;
 
    /* render object to surface with context, and offxet by x,y */
    o = (Evas_Object_Text *)(obj->object_data);
@@ -1944,11 +1676,11 @@ evas_object_text_render(Evas_Object *obj, void *output, void *context, void *sur
                                (((int)object->sub.col.a) * (amul)) / 255);
 
 #define DRAW_TEXT(ox, oy) \
-   if ((o->engine_data) && (it->text)) \
+   if ((o->font) && (it->text_props.len > 0)) \
      ENFN->font_draw(output, \
                     context, \
                     surface, \
-                    o->engine_data, \
+                    o->font, \
                     obj->cur.geometry.x + x + sl + ox + it->x, \
                     obj->cur.geometry.y + y + st + oy + \
                     (int) \
@@ -1957,48 +1689,105 @@ evas_object_text_render(Evas_Object *obj, void *output, void *context, void *sur
                     obj->cur.geometry.h, \
                     obj->cur.geometry.w, \
                     obj->cur.geometry.h, \
-                    it->text, &it->text_props);
-   EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it)
+                    &it->text_props);
+
+   /* shadows */
+   shad_dst = shad_sz = dx = dy = haveshad = 0;
+   switch (o->cur.style & EVAS_TEXT_STYLE_MASK_BASIC)
      {
-        /* shadows */
-        if (o->cur.style == EVAS_TEXT_STYLE_SHADOW)
-          {
-             COLOR_SET(o, cur, shadow);
-             DRAW_TEXT(1, 1);
-          }
-        else if ((o->cur.style == EVAS_TEXT_STYLE_OUTLINE_SHADOW) ||
-              (o->cur.style == EVAS_TEXT_STYLE_FAR_SHADOW))
-          {
-             COLOR_SET(o, cur, shadow);
-             DRAW_TEXT(2, 2);
-          }
-        else if ((o->cur.style == EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW) ||
-              (o->cur.style == EVAS_TEXT_STYLE_FAR_SOFT_SHADOW))
+      case EVAS_TEXT_STYLE_SHADOW:
+      case EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW:
+         shad_dst = 1;
+         haveshad = 1;
+         break;
+      case EVAS_TEXT_STYLE_OUTLINE_SHADOW:
+      case EVAS_TEXT_STYLE_FAR_SHADOW:
+         shad_dst = 2;
+         haveshad = 1;
+         break;
+      case EVAS_TEXT_STYLE_FAR_SOFT_SHADOW:
+         shad_dst = 2;
+         shad_sz = 2;
+         haveshad = 1;
+         break;
+      case EVAS_TEXT_STYLE_SOFT_SHADOW:
+         shad_dst = 1;
+         shad_sz = 2;
+         haveshad = 1;
+         break;
+      default:
+         break;
+     }
+   if (haveshad)
+     {
+        if (shad_dst > 0)
           {
-             for (j = 0; j < 5; j++)
+             switch (o->cur.style & EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION)
                {
-                  for (i = 0; i < 5; i++)
-                    {
-                       if (vals[i][j] != 0)
-                         {
-                            COLOR_SET_AMUL(o, cur, shadow, vals[i][j] * 50);
-                            DRAW_TEXT(i, j);
-                         }
-                    }
+                case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT:
+                   dx = 1;
+                   dy = 1;
+                   break;
+                case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM:
+                   dx = 0;
+                   dy = 1;
+                   break;
+                case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT:
+                   dx = -1;
+                   dy = 1;
+                   break;
+                case EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT:
+                   dx = -1;
+                   dy = 0;
+                   break;
+                case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT:
+                   dx = -1;
+                   dy = -1;
+                   break;
+                case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP:
+                   dx = 0;
+                   dy = -1;
+                   break;
+                case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT:
+                   dx = 1;
+                   dy = -1;
+                   break;
+                case EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT:
+                   dx = 1;
+                   dy = 0;
+                default:
+                   break;
                }
+             dx *= shad_dst;
+             dy *= shad_dst;
           }
-        else if (o->cur.style == EVAS_TEXT_STYLE_SOFT_SHADOW)
+     }
+   EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it)
+     {
+        /* Shadows */
+        if (haveshad)
           {
-             for (j = 0; j < 5; j++)
+             switch (shad_sz)
                {
-                  for (i = 0; i < 5; i++)
+                case 0:
+                  COLOR_SET(o, cur, shadow);
+                  DRAW_TEXT(dx, dy);
+                  break;
+                case 2:
+                  for (j = 0; j < 5; j++)
                     {
-                       if (vals[i][j] != 0)
+                       for (i = 0; i < 5; i++)
                          {
-                            COLOR_SET_AMUL(o, cur, shadow, vals[i][j] * 50);
-                            DRAW_TEXT(i - 1, j - 1);
+                            if (vals[i][j] != 0)
+                              {
+                                 COLOR_SET_AMUL(o, cur, shadow, vals[i][j] * 50);
+                                 DRAW_TEXT(i - 2 + dx, j - 2 + dy);
+                              }
                          }
                     }
+                  break;
+                default:
+                  break;
                }
           }
 
@@ -2216,7 +2005,7 @@ evas_object_text_engine_data_get(Evas_Object *obj)
 
    o = (Evas_Object_Text *)(obj->object_data);
    if (!o) return NULL;
-   return o->engine_data;
+   return o->font;
 }
 
 static int
@@ -2260,11 +2049,11 @@ _evas_object_text_rehint(Evas_Object *obj)
    int is, was;
 
    o = (Evas_Object_Text *)(obj->object_data);
-   if (!o->engine_data) return;
+   if (!o->font) return;
 #ifdef EVAS_FRAME_QUEUING
-   evas_common_pipe_op_text_flush(o->engine_data);
+   evas_common_pipe_op_text_flush((RGBA_Font *) o->font);
 #endif
-   evas_font_load_hinting_set(obj->layer->evas, o->engine_data,
+   evas_font_load_hinting_set(obj->layer->evas, o->font,
                              obj->layer->evas->hinting);
    was = evas_object_is_in_output_rect(obj,
                                       obj->layer->evas->pointer.x,
@@ -2305,7 +2094,7 @@ _evas_object_text_recalc(Evas_Object *obj)
 
    if (text) free(text);
 
-   if ((o->engine_data) && (o->items))
+   if ((o->font) && (o->items))
      {
        int w, h;
        int l = 0, r = 0, t = 0, b = 0;
index 22ad339..3c8e858 100644 (file)
@@ -1,75 +1,4 @@
 /**
- * @addtogroup Evas_Object_Textblock
- *
- * @{
- */
-
-/**
- * @section Evas_Object_Textblock_Tutorial Textblock Object Tutorial
- *
- * This part explains about the textblock object's API and proper usage.
- * If you want to develop textblock, you should also refer to @ref Evas_Object_Textblock_Internal.
- * The main user of the textblock object is the edje entry object in Edje, so
- * that's a good place to learn from, but I think this document is more than
- * enough, if it's not, please request for me info and I'll update it.
- *
- * @subsection textblock_intro Introduction
- * The textblock objects is, as implied, an object that can show big chunks of
- * text. Textblock supports many features including: Text formatting, automatic
- * and manual text alignment, embedding items (for example icons) and more.
- * Textblock has three important parts, the text paragraphs, the format nodes
- * and the cursors.
- *
- * @subsection textblock_cursors Textblock Object Cursors
- * A textblock Cursor @ref Evas_Textblock_Cursor is data type that represents
- * a position in a textblock. Each cursor contains information about the
- * paragraph it points to, the position in that paragraph and the object itself.
- * Cursors register to textblock objects upon creation, this means that once
- * you created a cursor, it belongs to a specific obj and you can't for example
- * copy a cursor "into" a cursor of a different object. Registered cursors
- * also have the added benefit of updating automatically upon textblock changes,
- * this means that if you have a cursor pointing to a specific character, it'll
- * still point to it even after you change the whole object completely (as long
- * as the char was not deleted), this is not possible without updating, because
- * as mentioned, each cursor holds a character position. There are many
- * functions that handle cursors, just check out the evas_textblock_cursor*
- * functions. For creation and deletion of cursors check out:
- * @see evas_object_textblock_cursor_new()
- * @see evas_textblock_cursor_free()
- * @note Cursors are generally the correct way to handle text in the textblock object, and there are enough functions to do everything you need with them (no need to get big chunks of text and processing them yourself).
- *
- * @subsection textblock_paragraphs Textblock Object Paragraphs
- * The textblock object is made out of text splitted to paragraphs (delimited
- * by the paragraph separation character). Each paragraph has many (or none)
- * format nodes associated with it which are responsible for the formatting
- * of that paragraph.
- *
- * @subsection textblock_format_nodes Textblock Object Format Nodes
- * As explained in @ref textblock_paragraphs each one of the format nodes
- * is associated with a paragraph.
- * There are two types of format nodes, visible and invisible:
- * Visible: formats that a cursor can point to, i.e formats that
- * occupy space, for example: newlines, tabs, items and etc. Some visible items
- * are made of two parts, in this case, only the opening tag is visible.
- * A closing tag (i.e a </tag> tag) should NEVER be visible.
- * Invisible: formats that don't occupy space, for example: bold and underline.
- * Being able to access format nodes is very important for some uses. For
- * example, edje uses the "<a>" format to create links in the text (and pop
- * popups above them when clicked). For the textblock object a is just a
- * formatting instruction (how to color the text), but edje utilizes the access
- * to the format nodes to make it do more.
- * For more information, take a look at all the evas_textblock_node_format_*
- * functions.
- * The translation of "<tag>" tags to actual format is done according to the
- * tags defined in the style, see @ref evas_textblock_style_set
- *
- * @subsection textblock_special_formats Special Formats
- * This section is not yet written. If you want some info about styles/formats
- * and how to use them, expedite's textblock_basic test is a great start.
- * @todo Write @textblock_special_formats
- */
-
-/**
  * @internal
  * @section Evas_Object_Textblock_Internal Internal Textblock Object Tutorial
  *
 #include "evas_common.h"
 #include "evas_private.h"
 
+#ifdef HAVE_LINEBREAK
+#include "linebreak.h"
+#endif
+
 /* save typing */
 #define ENFN obj->layer->evas->engine.func
 #define ENDT obj->layer->evas->engine.data.output
@@ -146,6 +79,12 @@ static const char o_type[] = "textblock";
 
 /* The char to be inserted instead of visible formats */
 #define EVAS_TEXTBLOCK_REPLACEMENT_CHAR 0xFFFC
+#define _PARAGRAPH_SEPARATOR 0x2029
+#define EVAS_TEXTBLOCK_IS_VISIBLE_FORMAT_CHAR(ch) \
+   (((ch) == EVAS_TEXTBLOCK_REPLACEMENT_CHAR) || \
+    ((ch) == '\n') || \
+    ((ch) == '\t') || \
+    ((ch) == _PARAGRAPH_SEPARATOR))
 
 /* private struct for textblock object internal data */
 /**
@@ -208,23 +147,48 @@ typedef struct _Evas_Object_Textblock_Format_Item Evas_Object_Textblock_Format_I
  */
 typedef struct _Evas_Object_Textblock_Format      Evas_Object_Textblock_Format;
 
-/* the current state of the formatting */
 /**
  * @internal
- * @def GET_PREV(text, ind)
- * Gets the index of the previous char in the text text, this simply returns
- * the current char pointed to and decrements ind but ensures it stays in
- * the text range.
+ * @def IS_AT_END(ti, ind)
+ * Return true if ind is at the end of the text item, false otherwise.
+ */
+#define IS_AT_END(ti, ind) (ind == ti->text_props.text_len)
+
+/**
+ * @internal
+ * @def MOVE_PREV_UNTIL(limit, ind)
+ * This decrements ind as long as ind > limit.
+ */
+#define MOVE_PREV_UNTIL(limit, ind) \
+   do \
+     { \
+        if ((limit) < (ind)) \
+           (ind)--; \
+     } \
+   while (0)
+
+/**
+ * @internal
+ * @def MOVE_NEXT_UNTIL(limit, ind)
+ * This increments ind as long as ind < limit
  */
-#define GET_PREV(text, ind) (text ? (((ind) > 0) ? (text[(ind)--]) : (text[ind])) : 0)
+#define MOVE_NEXT_UNTIL(limit, ind) \
+   do \
+     { \
+        if ((ind) < (limit)) \
+           (ind)++; \
+     } \
+   while (0)
+
 /**
  * @internal
- * @def GET_NEXT(text, ind)
- * Gets the index of the next in the text text, this simply returns
- * the current char pointed to and increments indd but ensures it stays in
- * the text range.
+ * @def GET_ITEM_TEXT(ti)
+ * Returns a const reference to the text of the ti (not null terminated).
  */
-#define GET_NEXT(text, ind) (text ? ((text[ind]) ? (text[(ind)++]) : (text[ind])) : 0)
+#define GET_ITEM_TEXT(ti) \
+   (((ti)->parent.text_node) ? \
+    (eina_ustrbuf_string_get((ti)->parent.text_node->unicode) + \
+      (ti)->parent.text_pos) : EINA_UNICODE_EMPTY_STRING)
 
 /*FIXME: document the structs and struct items. */
 struct _Evas_Object_Style_Tag
@@ -242,19 +206,27 @@ struct _Evas_Object_Textblock_Node_Text
    Eina_UStrbuf                       *unicode;
    char                               *utf8;
    Evas_Object_Textblock_Node_Format  *format_node;
-   Evas_BiDi_Paragraph_Props          *bidi_props;
+   Evas_Object_Textblock_Paragraph    *par;
    Eina_Bool                           dirty : 1;
+   Eina_Bool                           new : 1;
 };
 
 struct _Evas_Object_Textblock_Node_Format
 {
    EINA_INLIST;
-   Eina_Strbuf                        *format;
+   const char                         *format;
    Evas_Object_Textblock_Node_Text    *text_node;
    size_t                              offset;
-   Eina_Bool                           visible;
+   unsigned char                       anchor : 2;
+   Eina_Bool                           visible : 1;
+   Eina_Bool                           format_change : 1;
+   Eina_Bool                           new : 1;
 };
 
+#define ANCHOR_NONE 0
+#define ANCHOR_A 1
+#define ANCHOR_ITEM 2
+
 /**
  * @internal
  * @def _NODE_TEXT(x)
@@ -289,11 +261,18 @@ struct _Evas_Object_Textblock_Node_Format
 struct _Evas_Object_Textblock_Paragraph
 {
    EINA_INLIST;
+   EINA_RBTREE;
    Evas_Object_Textblock_Line        *lines;
    Evas_Object_Textblock_Node_Text   *text_node;
    Eina_List                         *logical_items;
-   int                                x, y, w, h;
+   Evas_BiDi_Paragraph_Props         *bidi_props; /* Only valid during layout */
+   Evas_BiDi_Direction                direction;
+   Evas_Coord                         y, w, h;
    int                                line_no;
+   Eina_Bool                          is_bidi : 1;
+   Eina_Bool                          visible : 1;
+   Eina_Bool                          indexed : 1;
+   Eina_Bool                          rendered : 1;
 };
 
 struct _Evas_Object_Textblock_Line
@@ -301,8 +280,7 @@ struct _Evas_Object_Textblock_Line
    EINA_INLIST;
    Evas_Object_Textblock_Item        *items;
    Evas_Object_Textblock_Paragraph   *par;
-   Evas_Object_Textblock_Text_Item   *ellip_ti;
-   int                                x, y, w, h;
+   Evas_Coord                         x, y, w, h;
    int                                baseline;
    int                                line_no;
 };
@@ -336,7 +314,6 @@ struct _Evas_Object_Textblock_Item
 struct _Evas_Object_Textblock_Text_Item
 {
    Evas_Object_Textblock_Item       parent;
-   Eina_Unicode                    *text;
    Evas_Text_Props                  text_props;
    int                              inset, baseline;
    Evas_Coord                       x_adjustment; /* Used to indicate by how
@@ -348,25 +325,22 @@ struct _Evas_Object_Textblock_Format_Item
    Evas_Object_Textblock_Item           parent;
    Evas_BiDi_Direction                  bidi_dir;
    const char                          *item;
-   Evas_Object_Textblock_Node_Format   *source_node;
-   int                                  y, ascent, descent;
+   int                                  y;
    unsigned char                        vsize : 2;
    unsigned char                        size : 2;
-   unsigned char                        formatme : 1;
+   Eina_Bool                            formatme : 1;
 };
 
 struct _Evas_Object_Textblock_Format
 {
-   int                  ref;
    double               halign;
-   Eina_Bool            halign_auto;
    double               valign;
    struct {
       const char       *name;
       const char       *source;
       const char       *fallbacks;
+      Evas_Font_Set    *font;
       int               size;
-      void             *font;
    } font;
    struct {
       struct {
@@ -377,22 +351,24 @@ struct _Evas_Object_Textblock_Format
    struct {
       int               l, r;
    } margin;
+   int                  ref;
    int                  tabstops;
    int                  linesize;
-   double               linerelsize;
    int                  linegap;
+   double               linerelsize;
    double               linerelgap;
    double               linefill;
    double               ellipsis;
    unsigned char        style;
-   unsigned char        wrap_word : 1;
-   unsigned char        wrap_char : 1;
-   unsigned char        wrap_mixed : 1;
-   unsigned char        underline : 1;
-   unsigned char        underline2 : 1;
-   unsigned char        strikethrough : 1;
-   unsigned char        backing : 1;
-   unsigned char        password : 1;
+   Eina_Bool            wrap_word : 1;
+   Eina_Bool            wrap_char : 1;
+   Eina_Bool            wrap_mixed : 1;
+   Eina_Bool            underline : 1;
+   Eina_Bool            underline2 : 1;
+   Eina_Bool            strikethrough : 1;
+   Eina_Bool            backing : 1;
+   Eina_Bool            password : 1;
+   Eina_Bool            halign_auto : 1;
 };
 
 struct _Evas_Textblock_Style
@@ -401,7 +377,7 @@ struct _Evas_Textblock_Style
    char                  *default_tag;
    Evas_Object_Style_Tag *tags;
    Eina_List             *objects;
-   unsigned char          delete_me : 1;
+   Eina_Bool              delete_me : 1;
 };
 
 struct _Evas_Textblock_Cursor
@@ -409,7 +385,6 @@ struct _Evas_Textblock_Cursor
    Evas_Object                     *obj;
    size_t                           pos;
    Evas_Object_Textblock_Node_Text *node;
-
 };
 
 struct _Evas_Object_Textblock
@@ -421,6 +396,10 @@ struct _Evas_Object_Textblock
    Evas_Object_Textblock_Node_Text    *text_nodes;
    Evas_Object_Textblock_Node_Format  *format_nodes;
    Evas_Object_Textblock_Paragraph    *paragraphs;
+   Evas_Object_Textblock_Text_Item    *ellip_ti;
+   Eina_Rbtree                        *par_index;
+   Eina_List                          *anchors_a;
+   Eina_List                          *anchors_item;
    int                                 last_w, last_h;
    struct {
       int                              l, r, t, b;
@@ -429,14 +408,16 @@ struct _Evas_Object_Textblock
    char                               *markup_text;
    void                               *engine_data;
    const char                         *repch;
+   const char                         *bidi_delimiters;
    struct {
       int                              w, h;
-      unsigned char                    valid : 1;
+      Eina_Bool                        valid : 1;
    } formatted, native;
-   unsigned char                       redraw : 1;
-   unsigned char                       changed : 1;
-   unsigned char                       content_changed : 1;
-   unsigned char                       have_ellipsis : 1;
+   Eina_Bool                           redraw : 1;
+   Eina_Bool                           changed : 1;
+   Eina_Bool                           content_changed : 1;
+   Eina_Bool                           format_changed : 1;
+   Eina_Bool                           have_ellipsis : 1;
    Eina_Bool                           newline_is_ps : 1;
 };
 
@@ -514,11 +495,11 @@ static void _evas_textblock_node_text_remove(Evas_Object_Textblock *o, Evas_Obje
 static void _evas_textblock_node_text_remove_formats_between(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Text *n, int start, int end);
 static Evas_Object_Textblock_Node_Format *_evas_textblock_cursor_node_format_before_or_at_pos_get(const Evas_Textblock_Cursor *cur);
 static size_t _evas_textblock_node_format_pos_get(const Evas_Object_Textblock_Node_Format *fmt);
-static Eina_Bool _evas_textblock_format_is_visible(const char *s);
 static void _evas_textblock_node_format_remove(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Format *n, int visual_adjustment);
-static void _evas_textblock_node_format_free(Evas_Object_Textblock_Node_Format *n);
+static void _evas_textblock_node_format_free(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Format *n);
 static void _evas_textblock_node_text_free(Evas_Object_Textblock_Node_Text *n);
-static void _evas_textblock_text_node_changed(Evas_Object_Textblock *o, Evas_Object *obj, Evas_Object_Textblock_Node_Text *n);
+static void _evas_textblock_changed(Evas_Object_Textblock *o, Evas_Object *obj);
+static void _evas_textblock_invalidate_all(Evas_Object_Textblock *o);
 static void _evas_textblock_cursors_update_offset(const Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Text *n, size_t start, int offset);
 static void _evas_textblock_cursors_set_node(Evas_Object_Textblock *o, const Evas_Object_Textblock_Node_Text *n, Evas_Object_Textblock_Node_Text *new_node);
 
@@ -640,7 +621,7 @@ _nodes_clear(const Evas_Object *obj)
 
         n = o->format_nodes;
         o->format_nodes = _NODE_FORMAT(eina_inlist_remove(EINA_INLIST_GET(o->format_nodes), EINA_INLIST_GET(n)));
-        _evas_textblock_node_format_free(n);
+        _evas_textblock_node_format_free(o, n);
      }
 }
 
@@ -677,7 +658,6 @@ _item_free(const Evas_Object *obj, Evas_Object_Textblock_Line *ln, Evas_Object_T
         Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it);
 
         evas_common_text_props_content_unref(&ti->text_props);
-        if (ti->text) free(ti->text);
      }
    else
      {
@@ -701,10 +681,9 @@ _item_free(const Evas_Object *obj, Evas_Object_Textblock_Line *ln, Evas_Object_T
  * @param ln the layout line to be freed, must not be NULL.
  */
 static void
-_line_free(const Evas_Object *obj, Evas_Object_Textblock_Line *ln)
+_line_free(Evas_Object_Textblock_Line *ln)
 {
    /* Items are freed from the logical list, except for the ellip item */
-   if (ln->ellip_ti) _item_free(obj, NULL, _ITEM(ln->ellip_ti));
    if (ln) free(ln);
 }
 
@@ -919,83 +898,14 @@ _is_white(Eina_Unicode c)
 
 /**
  * @internal
- * Creates a copy of a string without the whitespaces between byte indexes
- * clean_start and clean_end and frees str.
- *
- * FIXME: BROKEN FOR NON-ENGLISH.
- * @param clean_start The byte index of the location to start cleaning at.
- * @param clean_end The byte index of the location to end cleaning at.
- * @param str The string to copy and free.
- * @return a copy of str cleaned of whitespaces.
- */
-static char *
-_clean_white(int clean_start, int clean_end, char *str)
-{
-   char *p, *p2, *str2 = NULL;
-   int white, pwhite, start, ok;
-
-   /*FIXME: fix this function */
-   return strdup(str);
-   str2 = malloc(strlen(str) + 2);
-   p = str;
-   p2 = str2;
-   white = 0;
-   start = 1;
-   ok = 1;
-   while (*p != 0)
-     {
-        pwhite = white;
-        if (_is_white(*p)) white = 1;
-        else white = 0;
-        if ((pwhite) && (white)) ok = 0;
-        else
-          {
-             if (!clean_start)
-               {
-                  if ((start) && (pwhite) && (!white))
-                    {
-                       //                     *p2 = ' ';
-                       //                     p2++;
-                    }
-               }
-             ok = 1;
-             if (!white) start = 0;
-          }
-        if (clean_start)
-          {
-             if ((start) && (ok)) ok = 0;
-          }
-        if (ok)
-          {
-             *p2 = *p;
-             p2++;
-          }
-        p++;
-     }
-   *p2 = 0;
-   if (clean_end)
-     {
-        while (p2 > str2)
-          {
-             p2--;
-             if (!(isspace(*p2) || _is_white(*p2))) break;
-             *p2 = 0;
-          }
-     }
-   free(str);
-   return str2;
-}
-
-/**
- * @internal
  * Appends the text between s and p to the main cursor of the object.
  *
- * @param o The textblock to append to.
+ * @param cur the cursor to append to.
  * @param[in] s start of the string
  * @param[in] p end of the string
  */
 static void __UNUSED__
-_append_text_run(Evas_Object_Textblock *o, const char *s, const char *p)
+_append_text_run(Evas_Textblock_Cursor *cur, const char *s, const char *p)
 {
    if ((s) && (p > s))
      {
@@ -1004,9 +914,7 @@ _append_text_run(Evas_Object_Textblock *o, const char *s, const char *p)
         ts = alloca(p - s + 1);
         strncpy(ts, s, p - s);
         ts[p - s] = 0;
-        ts = _clean_white(0, 0, ts);
-        evas_textblock_cursor_text_append(o->cursor, ts);
-        free(ts);
+        evas_textblock_cursor_text_append(cur, ts);
      }
 }
 
@@ -1014,12 +922,12 @@ _append_text_run(Evas_Object_Textblock *o, const char *s, const char *p)
  * @internal
  * Prepends the text between s and p to the main cursor of the object.
  *
- * @param o The textblock to prepend to.
+ * @param cur the cursor to prepend to.
  * @param[in] s start of the string
  * @param[in] p end of the string
  */
 static void
-_prepend_text_run(Evas_Object_Textblock *o, const char *s, const char *p)
+_prepend_text_run(Evas_Textblock_Cursor *cur, const char *s, const char *p)
 {
    if ((s) && (p > s))
      {
@@ -1028,9 +936,7 @@ _prepend_text_run(Evas_Object_Textblock *o, const char *s, const char *p)
         ts = alloca(p - s + 1);
         strncpy(ts, s, p - s);
         ts[p - s] = 0;
-        ts = _clean_white(0, 0, ts);
-        evas_textblock_cursor_text_prepend(o->cursor, ts);
-        free(ts);
+        evas_textblock_cursor_text_prepend(cur, ts);
      }
 }
 
@@ -1271,9 +1177,11 @@ static void
 _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char *cmd, const char *param)
 {
    int new_font = 0;
+   int len;
    char *tmp_param;
 
-   tmp_param = alloca(strlen(param) + 1);
+   len = strlen(param);
+   tmp_param = alloca(len + 1);
 
    _format_clean_param(tmp_param, param);
    if (cmd == fontstr)
@@ -1497,19 +1405,60 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
      }
    else if (cmd == stylestr)
      {
-        if (!strcmp(tmp_param, "off")) fmt->style = EVAS_TEXT_STYLE_PLAIN;
-        else if (!strcmp(tmp_param, "none")) fmt->style = EVAS_TEXT_STYLE_PLAIN;
-        else if (!strcmp(tmp_param, "plain")) fmt->style = EVAS_TEXT_STYLE_PLAIN;
-        else if (!strcmp(tmp_param, "shadow")) fmt->style = EVAS_TEXT_STYLE_SHADOW;
-        else if (!strcmp(tmp_param, "outline")) fmt->style = EVAS_TEXT_STYLE_OUTLINE;
-        else if (!strcmp(tmp_param, "soft_outline")) fmt->style = EVAS_TEXT_STYLE_SOFT_OUTLINE;
-        else if (!strcmp(tmp_param, "outline_shadow")) fmt->style = EVAS_TEXT_STYLE_OUTLINE_SHADOW;
-        else if (!strcmp(tmp_param, "outline_soft_shadow")) fmt->style = EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW;
-        else if (!strcmp(tmp_param, "glow")) fmt->style = EVAS_TEXT_STYLE_GLOW;
-        else if (!strcmp(tmp_param, "far_shadow")) fmt->style = EVAS_TEXT_STYLE_FAR_SHADOW;
-        else if (!strcmp(tmp_param, "soft_shadow")) fmt->style = EVAS_TEXT_STYLE_SOFT_SHADOW;
-        else if (!strcmp(tmp_param, "far_soft_shadow")) fmt->style = EVAS_TEXT_STYLE_FAR_SOFT_SHADOW;
-        else fmt->style = EVAS_TEXT_STYLE_PLAIN;
+        char *p1, *p2, *p, *pp;
+
+        p1 = alloca(len + 1);
+        *p1 = 0;
+        p2 = alloca(len + 1);
+        *p2 = 0;
+        /* no comma */
+        if (!strstr(tmp_param, ",")) p1 = tmp_param;
+        else
+          {
+             /* split string "str1,str2" into p1 and p2 (if we have more than
+              * 1 str2 eg "str1,str2,str3,str4" then we don't care. p2 just
+              * ends up being the last one as right now it's only valid to have
+              * 1 comma and 2 strings */
+             pp = p1;
+             for (p = tmp_param; *p; p++)
+               {
+                  if (*p == ',')
+                    {
+                       *pp = 0;
+                       pp = p2;
+                       continue;
+                    }
+                  *pp = *p;
+                  pp++;
+               }
+             *pp = 0;
+          }
+        if      (!strcmp(p1, "off"))                 fmt->style = EVAS_TEXT_STYLE_PLAIN;
+        else if (!strcmp(p1, "none"))                fmt->style = EVAS_TEXT_STYLE_PLAIN;
+        else if (!strcmp(p1, "plain"))               fmt->style = EVAS_TEXT_STYLE_PLAIN;
+        else if (!strcmp(p1, "shadow"))              fmt->style = EVAS_TEXT_STYLE_SHADOW;
+        else if (!strcmp(p1, "outline"))             fmt->style = EVAS_TEXT_STYLE_OUTLINE;
+        else if (!strcmp(p1, "soft_outline"))        fmt->style = EVAS_TEXT_STYLE_SOFT_OUTLINE;
+        else if (!strcmp(p1, "outline_shadow"))      fmt->style = EVAS_TEXT_STYLE_OUTLINE_SHADOW;
+        else if (!strcmp(p1, "outline_soft_shadow")) fmt->style = EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW;
+        else if (!strcmp(p1, "glow"))                fmt->style = EVAS_TEXT_STYLE_GLOW;
+        else if (!strcmp(p1, "far_shadow"))          fmt->style = EVAS_TEXT_STYLE_FAR_SHADOW;
+        else if (!strcmp(p1, "soft_shadow"))         fmt->style = EVAS_TEXT_STYLE_SOFT_SHADOW;
+        else if (!strcmp(p1, "far_soft_shadow"))     fmt->style = EVAS_TEXT_STYLE_FAR_SOFT_SHADOW;
+        else                                         fmt->style = EVAS_TEXT_STYLE_PLAIN;
+        
+        if (*p2)
+          {
+             if      (!strcmp(p2, "bottom_right")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT);
+             else if (!strcmp(p2, "bottom"))       EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM);
+             else if (!strcmp(p2, "bottom_left"))  EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT);
+             else if (!strcmp(p2, "left"))         EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT);
+             else if (!strcmp(p2, "top_left"))     EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT);
+             else if (!strcmp(p2, "top"))          EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP);
+             else if (!strcmp(p2, "top_right"))    EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT);
+             else if (!strcmp(p2, "right"))        EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT);
+             else                                  EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT);
+          }
      }
    else if (cmd == tabstopsstr)
      {
@@ -1595,11 +1544,11 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
    else if (cmd == passwordstr)
      {
         if (!strcmp(tmp_param, "off"))
-           fmt->password = 0;
+          fmt->password = 0;
         else if (!strcmp(tmp_param, "on"))
-           fmt->password = 1;
+          fmt->password = 1;
      }
-  
+
    if (new_font)
      {
         void *of;
@@ -1803,7 +1752,9 @@ struct _Ctxt
    Evas_Object_Textblock_Paragraph *par;
    Evas_Object_Textblock_Line *ln;
 
+
    Eina_List *format_stack;
+   Evas_Object_Textblock_Format *fmt;
 
    int x, y;
    int w, h;
@@ -1814,7 +1765,8 @@ struct _Ctxt
    int underline_extend;
    int have_underline, have_underline2;
    double align, valign;
-   Eina_Bool align_auto;
+   Eina_Bool align_auto : 1;
+   Eina_Bool width_changed : 1;
 };
 
 static void _layout_text_add_logical_item(Ctxt *c, Evas_Object_Textblock_Text_Item *ti, Eina_List *rel);
@@ -1823,11 +1775,14 @@ static void _text_item_update_sizes(Ctxt *c, Evas_Object_Textblock_Text_Item *ti
  * @internal
  * Adjust the ascent/descent of the format and context.
  *
- * @param c The context to work on - Not NUL.
+ * @param maxascent The ascent to update - Not NUL.
+ * @param maxdescent The descent to update - Not NUL.
  * @param fmt The format to adjust - NOT NULL.
  */
 static void
-_layout_format_ascent_descent_adjust(Ctxt *c, Evas_Object_Textblock_Format *fmt)
+_layout_format_ascent_descent_adjust(const Evas_Object *obj,
+      Evas_Coord *maxascent, Evas_Coord *maxdescent,
+      Evas_Object_Textblock_Format *fmt)
 {
    int ascent, descent;
 
@@ -1835,8 +1790,8 @@ _layout_format_ascent_descent_adjust(Ctxt *c, Evas_Object_Textblock_Format *fmt)
      {
         //     ascent = c->ENFN->font_max_ascent_get(c->ENDT, fmt->font.font);
         //     descent = c->ENFN->font_max_descent_get(c->ENDT, fmt->font.font);
-        ascent = c->ENFN->font_ascent_get(c->ENDT, fmt->font.font);
-        descent = c->ENFN->font_descent_get(c->ENDT, fmt->font.font);
+        ascent = ENFN->font_ascent_get(ENDT, fmt->font.font);
+        descent = ENFN->font_descent_get(ENDT, fmt->font.font);
         if (fmt->linesize > 0)
           {
              if ((ascent + descent) < fmt->linesize)
@@ -1850,19 +1805,19 @@ _layout_format_ascent_descent_adjust(Ctxt *c, Evas_Object_Textblock_Format *fmt)
              descent = descent * fmt->linerelsize;
              ascent = ascent * fmt->linerelsize;
           }
-        c->maxdescent += fmt->linegap;
-        c->maxdescent += ((ascent + descent) * fmt->linerelgap);
-        if (c->maxascent < ascent) c->maxascent = ascent;
-        if (c->maxdescent < descent) c->maxdescent = descent;
+        *maxdescent += fmt->linegap;
+        *maxdescent += ((ascent + descent) * fmt->linerelgap);
+        if (*maxascent < ascent) *maxascent = ascent;
+        if (*maxdescent < descent) *maxdescent = descent;
         if (fmt->linefill > 0.0)
           {
              int dh;
 
-             dh = c->obj->cur.geometry.h - (c->maxascent + c->maxdescent);
+             dh = obj->cur.geometry.h - (*maxascent + *maxdescent);
              if (dh < 0) dh = 0;
              dh = fmt->linefill * dh;
-             c->maxdescent += dh / 2;
-             c->maxascent += dh - (dh / 2);
+             *maxdescent += dh / 2;
+             *maxascent += dh - (dh / 2);
              // FIXME: set flag that says "if heigh changes - reformat"
           }
      }
@@ -1889,31 +1844,155 @@ _layout_line_new(Ctxt *c, Evas_Object_Textblock_Format *fmt)
    c->maxascent = c->maxdescent = 0;
    c->ln->line_no = -1;
    c->ln->par = c->par;
-   _layout_format_ascent_descent_adjust(c, fmt);
+   _layout_format_ascent_descent_adjust(c->obj, &c->maxascent,
+         &c->maxdescent, fmt);
+}
+
+/* par index functions */
+static Eina_Rbtree_Direction
+_par_index_node_cmp(const Eina_Rbtree *left, const Eina_Rbtree *right,
+      void *data __UNUSED__)
+{
+   Evas_Object_Textblock_Paragraph *lpar, *rpar;
+   lpar = EINA_RBTREE_CONTAINER_GET(left, Evas_Object_Textblock_Paragraph);
+   rpar = EINA_RBTREE_CONTAINER_GET(right, Evas_Object_Textblock_Paragraph);
+   /* Because they can't be equal or overlap, we don't need to compare
+    * anything except for the y position */
+   return (lpar->y < rpar->y) ? EINA_RBTREE_LEFT : EINA_RBTREE_RIGHT;
+}
+
+static int
+_par_index_y_key_cmp(const Eina_Rbtree *node, const void *key,
+      int length __UNUSED__, void *data __UNUSED__)
+{
+   Evas_Coord y = *((const Evas_Coord *) key);
+   Evas_Object_Textblock_Paragraph *par;
+   par = EINA_RBTREE_CONTAINER_GET(node, Evas_Object_Textblock_Paragraph);
+
+   if (y < par->y)
+      return 1;
+   else if ((par->y <= y) && (y < par->y + par->h))
+      return 0;
+   else
+      return -1;
+}
+
+static int
+_par_index_line_no_key_cmp(const Eina_Rbtree *node, const void *key,
+      int length __UNUSED__, void *data __UNUSED__)
+{
+   int line_no = *((const int *) key);
+   Evas_Object_Textblock_Paragraph *par, *npar;
+   par = EINA_RBTREE_CONTAINER_GET(node, Evas_Object_Textblock_Paragraph);
+   npar = (Evas_Object_Textblock_Paragraph *) EINA_INLIST_GET(par)->next;
+
+   if (line_no < par->line_no)
+      return 1;
+   else if ((par->line_no <= par->line_no) &&
+         (!npar || (line_no < npar->line_no)))
+      return 0;
+   else return -1;
+}
+
+static inline Evas_Object_Textblock_Paragraph *
+_layout_find_paragraph_by_y(Evas_Object_Textblock *o, Evas_Coord y)
+{
+   Eina_Rbtree *tmp = eina_rbtree_inline_lookup(o->par_index, &y, 0,
+         _par_index_y_key_cmp, NULL);
+
+   return (tmp) ?
+      EINA_RBTREE_CONTAINER_GET(tmp, Evas_Object_Textblock_Paragraph) :
+      NULL;
+}
+
+static inline Evas_Object_Textblock_Paragraph *
+_layout_find_paragraph_by_line_no(Evas_Object_Textblock *o, int line_no)
+{
+   Eina_Rbtree *tmp = eina_rbtree_inline_lookup(o->par_index,
+         &line_no, 0, _par_index_line_no_key_cmp, NULL);
+
+   return (tmp) ?
+      EINA_RBTREE_CONTAINER_GET(tmp, Evas_Object_Textblock_Paragraph) :
+      NULL;
 }
+/* End of rbtree index functios */
 
 /**
  * @internal
  * Create a new layout paragraph.
+ * If c->par is not NULL, the paragraph is appended/prepended according
+ * to the append parameter. If it is NULL, the paragraph is appended at
+ * the end of the list.
  *
  * @param c The context to work on - Not NULL.
+ * @param n the associated text node
+ * @param append true to append, false to prpend.
  */
 static void
-_layout_paragraph_new(Ctxt *c, Evas_Object_Textblock_Node_Text *n)
+_layout_paragraph_new(Ctxt *c, Evas_Object_Textblock_Node_Text *n,
+      Eina_Bool append)
 {
+   Evas_Object_Textblock_Paragraph *rel_par = c->par;
    c->par = calloc(1, sizeof(Evas_Object_Textblock_Paragraph));
-   c->paragraphs = (Evas_Object_Textblock_Paragraph *)eina_inlist_append(EINA_INLIST_GET(c->paragraphs), EINA_INLIST_GET(c->par));
+   if (append || !rel_par)
+      c->paragraphs = (Evas_Object_Textblock_Paragraph *)
+         eina_inlist_append_relative(EINA_INLIST_GET(c->paragraphs),
+               EINA_INLIST_GET(c->par),
+               EINA_INLIST_GET(rel_par));
+   else
+      c->paragraphs = (Evas_Object_Textblock_Paragraph *)
+         eina_inlist_prepend_relative(EINA_INLIST_GET(c->paragraphs),
+               EINA_INLIST_GET(c->par),
+               EINA_INLIST_GET(rel_par));
+
    c->ln = NULL;
    c->par->text_node = n;
+   if (n)
+      n->par = c->par;
    c->par->line_no = -1;
+   c->par->visible = 1;
+}
+
+#ifdef BIDI_SUPPORT
+/**
+ * @internal
+ * Update bidi paragraph props.
+ *
+ * @param par The paragraph to update
+ */
+static inline void
+_layout_update_bidi_props(const Evas_Object_Textblock *o,
+      Evas_Object_Textblock_Paragraph *par)
+{
+   if (par->text_node)
+     {
+        const Eina_Unicode *text;
+        int *segment_idxs = NULL;
+        text = eina_ustrbuf_string_get(par->text_node->unicode);
+
+        if (o->bidi_delimiters)
+           segment_idxs = evas_bidi_segment_idxs_get(text, o->bidi_delimiters);
+
+        evas_bidi_paragraph_props_unref(par->bidi_props);
+        par->bidi_props = evas_bidi_paragraph_props_get(text,
+              eina_ustrbuf_length_get(par->text_node->unicode),
+              segment_idxs);
+        par->direction = EVAS_BIDI_PARAGRAPH_DIRECTION_IS_RTL(par->bidi_props) ?
+           EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR;
+        par->is_bidi = !!par->bidi_props;
+        if (segment_idxs) free(segment_idxs);
+     }
 }
+#endif
+
 
 /**
  * @internal
  * Free the visual lines in the paragraph (logical items are kept)
  */
 static void
-_paragraph_clear(const Evas_Object *obj, Evas_Object_Textblock_Paragraph *par)
+_paragraph_clear(const Evas_Object *obj __UNUSED__,
+      Evas_Object_Textblock_Paragraph *par)
 {
    while (par->lines)
      {
@@ -1921,9 +2000,8 @@ _paragraph_clear(const Evas_Object *obj, Evas_Object_Textblock_Paragraph *par)
 
         ln = (Evas_Object_Textblock_Line *) par->lines;
         par->lines = (Evas_Object_Textblock_Line *)eina_inlist_remove(EINA_INLIST_GET(par->lines), EINA_INLIST_GET(par->lines));
-        _line_free(obj, ln);
+        _line_free(ln);
      }
-   par->line_no = -1;
 }
 
 /**
@@ -1933,6 +2011,8 @@ _paragraph_clear(const Evas_Object *obj, Evas_Object_Textblock_Paragraph *par)
 static void
 _paragraph_free(const Evas_Object *obj, Evas_Object_Textblock_Paragraph *par)
 {
+   Evas_Object_Textblock *o;
+   o = (Evas_Object_Textblock *)(obj->object_data);
    _paragraph_clear(obj, par);
 
      {
@@ -1944,6 +2024,16 @@ _paragraph_free(const Evas_Object *obj, Evas_Object_Textblock_Paragraph *par)
           }
         eina_list_free(par->logical_items);
      }
+#ifdef BIDI_SUPPORT
+   if (par->bidi_props)
+      evas_bidi_paragraph_props_unref(par->bidi_props);
+#endif
+   /* If we are the active par of the text node, set to NULL */
+   if (par->text_node && (par->text_node->par == par))
+      par->text_node->par = NULL;
+   o->par_index = eina_rbtree_inline_remove(o->par_index,
+            EINA_RBTREE_GET(par), _par_index_node_cmp, NULL);
+
    free(par);
 }
 
@@ -1981,6 +2071,8 @@ _paragraphs_free(const Evas_Object *obj, Evas_Object_Textblock_Paragraph *pars)
 {
    Evas_Object_Textblock *o;
    o = (Evas_Object_Textblock *)(obj->object_data);
+   o->par_index = NULL;
+
    while (pars)
      {
         Evas_Object_Textblock_Paragraph *par;
@@ -2093,8 +2185,7 @@ _layout_line_align_get(Ctxt *c)
    if (c->align_auto && c->ln)
      {
         if (c->ln->items && c->ln->items->text_node &&
-              EVAS_BIDI_PARAGRAPH_DIRECTION_IS_RTL(
-                 c->ln->items->text_node->bidi_props))
+              (c->ln->par->direction == EVAS_BIDI_DIRECTION_RTL))
           {
              /* Align right*/
              return 1.0;
@@ -2109,6 +2200,7 @@ _layout_line_align_get(Ctxt *c)
    return c->align;
 }
 
+#ifdef BIDI_SUPPORT
 /**
  * @internal
  * Reorder the items in visual order
@@ -2116,20 +2208,20 @@ _layout_line_align_get(Ctxt *c)
  * @param line the line to reorder
  */
 static void
-_layout_line_order(Ctxt *c __UNUSED__, Evas_Object_Textblock_Line *line)
+_layout_line_reorder(Evas_Object_Textblock_Line *line)
 {
    /*FIXME: do it a bit more efficient - not very efficient ATM. */
-#ifdef BIDI_SUPPORT
    Evas_Object_Textblock_Item *it;
    EvasBiDiStrIndex *v_to_l = NULL;
+   Evas_Coord x;
    size_t start, end;
    size_t len;
 
    if (line->items && line->items->text_node &&
-         line->items->text_node->bidi_props)
+         line->par->bidi_props)
      {
         Evas_BiDi_Paragraph_Props *props;
-        props = line->items->text_node->bidi_props;
+        props = line->par->bidi_props;
         start = end = line->items->text_pos;
 
         /* Find the first and last positions in the line */
@@ -2194,9 +2286,115 @@ _layout_line_order(Ctxt *c __UNUSED__, Evas_Object_Textblock_Line *line)
      }
 
    if (v_to_l) free(v_to_l);
-#else
-   line = NULL;
+   x = 0;
+   EINA_INLIST_FOREACH(line->items, it)
+     {
+        it->x = x;
+        x += it->adv;
+     }
+}
 #endif
+
+/* FIXME: doc */
+static void
+_layout_calculate_format_item_size(const Evas_Object *obj,
+      const Evas_Object_Textblock_Format_Item *fi,
+      Evas_Coord *maxascent, Evas_Coord *maxdescent,
+      Evas_Coord *_y, Evas_Coord *_w, Evas_Coord *_h)
+{
+   /* Adjust sizes according to current line height/scale */
+   Evas_Coord w, h;
+   const char *p, *s;
+
+   s = fi->item;
+   w = fi->parent.w;
+   h = fi->parent.h;
+   switch (fi->size)
+     {
+      case SIZE:
+         if (!strncmp(s, "item", 4))
+           {
+              p = strstr(s, " size=");
+              if (p)
+                {
+                   p += 6;
+                   if (sscanf(p, "%ix%i", &w, &h) == 2)
+                     {
+                        w = w * obj->cur.scale;
+                        h = h * obj->cur.scale;
+                     }
+                }
+           }
+         break;
+      case SIZE_REL:
+         p = strstr((char *) s, " relsize=");
+         p += 9;
+         if (sscanf(p, "%ix%i", &w, &h) == 2)
+           {
+              int sz = 1;
+              if (fi->vsize == VSIZE_FULL)
+                {
+                   sz = *maxdescent + *maxascent;
+                }
+              else if (fi->vsize == VSIZE_ASCENT)
+                {
+                   sz = *maxascent;
+                }
+              w = (w * sz) / h;
+              h = sz;
+           }
+         break;
+      case SIZE_ABS:
+         /* Nothing to do */
+      default:
+         break;
+     }
+
+   switch (fi->size)
+     {
+      case SIZE:
+      case SIZE_ABS:
+         switch (fi->vsize)
+           {
+            case VSIZE_FULL:
+               if (fi->parent.h > (*maxdescent + *maxascent))
+                 {
+                    *maxascent += fi->parent.h - (*maxdescent + *maxascent);
+                    *_y = -*maxascent;
+                 }
+               else
+                  *_y = -(fi->parent.h - *maxdescent);
+               break;
+            case VSIZE_ASCENT:
+               if (fi->parent.h > *maxascent)
+                 {
+                    *maxascent = fi->parent.h;
+                    *_y = -fi->parent.h;
+                 }
+               else
+                  *_y = -fi->parent.h;
+               break;
+            default:
+               break;
+           }
+         break;
+      case SIZE_REL:
+         switch (fi->vsize)
+           {
+            case VSIZE_FULL:
+            case VSIZE_ASCENT:
+               *_y = -*maxascent;
+               break;
+            default:
+               break;
+           }
+         break;
+      default:
+         break;
+     }
+
+   *_w = w;
+   *_h = h;
 }
 
 /**
@@ -2215,8 +2413,6 @@ _layout_line_finalize(Ctxt *c, Evas_Object_Textblock_Format *fmt)
    Eina_Bool no_text = EINA_TRUE;
    Evas_Coord x = 0;
 
-   _layout_line_order(c, c->ln);
-
    c->maxascent = c->maxdescent = 0;
    EINA_INLIST_FOREACH(c->ln->items, it)
      {
@@ -2228,7 +2424,8 @@ _layout_line_finalize(Ctxt *c, Evas_Object_Textblock_Format *fmt)
      }
 
    if (no_text)
-     _layout_format_ascent_descent_adjust(c, fmt);
+      _layout_format_ascent_descent_adjust(c->obj, &c->maxascent,
+            &c->maxdescent, fmt);
 
    EINA_INLIST_FOREACH(c->ln->items, it)
      {
@@ -2237,115 +2434,23 @@ _layout_line_finalize(Ctxt *c, Evas_Object_Textblock_Format *fmt)
              Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it);
              if (ti->parent.format->font.font)
                ti->baseline = c->ENFN->font_max_ascent_get(c->ENDT, ti->parent.format->font.font);
-             _layout_format_ascent_descent_adjust(c, ti->parent.format);
+             _layout_format_ascent_descent_adjust(c->obj, &c->maxascent,
+                   &c->maxdescent, ti->parent.format);
           }
         else
           {
              Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it);
              if (!fi->formatme) goto loop_advance;
-             fi->ascent = c->maxascent;
-             fi->descent = c->maxdescent;
-             /* Adjust sizes according to current line height/scale */
-               {
-                  Evas_Coord w, h;
-                  const char *p, *s;
-
-                  s = eina_strbuf_string_get(fi->source_node->format);
-                  w = fi->parent.w;
-                  h = fi->parent.h;
-                  switch (fi->size)
-                    {
-                     case SIZE:
-                        if (!strncmp(s, "item", 4))
-                          {
-                             p = strstr(s, " size=");
-                             if (p)
-                               {
-                                  p += 6;
-                                  if (sscanf(p, "%ix%i", &w, &h) == 2)
-                                    {
-                                       w = w * c->obj->cur.scale;
-                                       h = h * c->obj->cur.scale;
-                                    }
-                               }
-                          }
-                        break;
-                     case SIZE_REL:
-                        p = strstr((char *) s, " relsize=");
-                        p += 9;
-                        if (sscanf(p, "%ix%i", &w, &h) == 2)
-                          {
-                             int sz = 1;
-                             if (fi->vsize == VSIZE_FULL)
-                               {
-                                  sz = c->maxdescent + c->maxascent;
-                               }
-                             else if (fi->vsize == VSIZE_ASCENT)
-                               {
-                                  sz = c->maxascent;
-                               }
-                             w = (w * sz) / h;
-                             h = sz;
-                          }
-                        break;
-                     case SIZE_ABS:
-                        /* Nothing to do */
-                     default:
-                        break;
-                    }
-                  fi->parent.w = fi->parent.adv = w;
-                  fi->parent.h = h;
-               }
-
-             switch (fi->size)
-               {
-                case SIZE:
-                case SIZE_ABS:
-                   switch (fi->vsize)
-                     {
-                      case VSIZE_FULL:
-                         if (fi->parent.h > (c->maxdescent + c->maxascent))
-                           {
-                              c->maxascent += fi->parent.h - (c->maxdescent + c->maxascent);
-                              fi->y = -c->maxascent;
-                           }
-                         else
-                           fi->y = -(fi->parent.h - c->maxdescent);
-                         break;
-                      case VSIZE_ASCENT:
-                         if (fi->parent.h > c->maxascent)
-                           {
-                              c->maxascent = fi->parent.h;
-                              fi->y = -fi->parent.h;
-                           }
-                         else
-                           fi->y = -fi->parent.h;
-                         break;
-                      default:
-                         break;
-                     }
-                   break;
-                case SIZE_REL:
-                   switch (fi->vsize)
-                     {
-                      case VSIZE_FULL:
-                      case VSIZE_ASCENT:
-                         fi->y = -fi->ascent;
-                         break;
-                      default:
-                         break;
-                     }
-                   break;
-                default:
-                   break;
-               }
+             _layout_calculate_format_item_size(c->obj, fi, &c->maxascent,
+                   &c->maxdescent, &fi->y, &fi->parent.w, &fi->parent.h);
+             fi->parent.adv = fi->parent.w;
           }
 
 loop_advance:
         it->x = x;
         x += it->adv;
 
-        if ((it->x + it->w) > c->ln->w) c->ln->w = it->x + it->w;
+        if ((it->x + it->adv) > c->ln->w) c->ln->w = it->x + it->adv;
      }
 
    c->ln->y = (c->y - c->par->y) + c->o->style_pad.t;
@@ -2359,11 +2464,6 @@ loop_advance:
      {
         if (c->maxdescent < 2) c->underline_extend = 2 - c->maxdescent;
      }
-   /* Update the paragraphs line number. */
-   if (c->par->line_no == -1)
-     {
-        c->par->line_no = c->line_no;
-     }
    c->ln->line_no = c->line_no - c->ln->par->line_no;
    c->line_no++;
    c->y += c->maxascent + c->maxdescent;
@@ -2373,18 +2473,22 @@ loop_advance:
            ((c->w - c->ln->w -
              c->o->style_pad.l - c->o->style_pad.r -
              c->marginl - c->marginr) * _layout_line_align_get(c));
-        if ((c->par->x + c->ln->x + c->ln->w + c->marginr - c->o->style_pad.l) > c->wmax)
-          c->wmax = c->par->x + c->ln->x + c->ln->w + c->marginl + c->marginr - c->o->style_pad.l;
      }
    else
      {
         c->ln->x = c->marginl + c->o->style_pad.l;
-        if ((c->par->x + c->ln->x + c->ln->w + c->marginr - c->o->style_pad.l) > c->wmax)
-          c->wmax = c->par->x + c->ln->x + c->ln->w + c->marginl + c->marginr - c->o->style_pad.l;
      }
+
    c->par->h = c->ln->y + c->ln->h;
-   if (c->ln->w + c->ln->x > c->par->w)
-     c->par->w = c->ln->x + c->ln->w;
+   if (c->ln->w > c->par->w)
+     c->par->w = c->ln->w;
+
+     {
+        Evas_Coord new_wmax = c->ln->w +
+           c->marginl + c->marginr - (c->o->style_pad.l + c->o->style_pad.r);
+        if (new_wmax > c->wmax)
+           c->wmax = new_wmax;
+     }
 }
 
 /**
@@ -2412,14 +2516,13 @@ _layout_line_advance(Ctxt *c, Evas_Object_Textblock_Format *fmt)
  * @param len the length of the string.
  */
 static Evas_Object_Textblock_Text_Item *
-_layout_text_item_new(Ctxt *c __UNUSED__, Evas_Object_Textblock_Format *fmt, const Eina_Unicode *str, size_t len)
+_layout_text_item_new(Ctxt *c __UNUSED__, Evas_Object_Textblock_Format *fmt)
 {
    Evas_Object_Textblock_Text_Item *ti;
 
    ti = calloc(1, sizeof(Evas_Object_Textblock_Text_Item));
    ti->parent.format = fmt;
    ti->parent.format->ref++;
-   ti->text = eina_unicode_strndup(str, len);
    ti->parent.type = EVAS_TEXTBLOCK_ITEM_TEXT;
    return ti;
 }
@@ -2445,7 +2548,7 @@ _layout_text_cutoff_get(Ctxt *c, Evas_Object_Textblock_Format *fmt,
            c->marginr - c->x - ti->x_adjustment;
         if (x < 0)
           x = 0;
-        return c->ENFN->font_last_up_to_pos(c->ENDT, fmt->font.font, ti->text,
+        return c->ENFN->font_last_up_to_pos(c->ENDT, fmt->font.font,
               &ti->text_props, x, 0);
      }
    return -1;
@@ -2453,7 +2556,7 @@ _layout_text_cutoff_get(Ctxt *c, Evas_Object_Textblock_Format *fmt,
 
 /**
  * @internal
- * Cut the text up until cut and split
+ * Split before cut, and strip if str[cut - 1] is a whitespace.
  *
  * @param c the context to work on - Not NULL.
  * @param ti the item to cut - not null.
@@ -2463,53 +2566,51 @@ _layout_text_cutoff_get(Ctxt *c, Evas_Object_Textblock_Format *fmt,
  */
 static Evas_Object_Textblock_Text_Item *
 _layout_item_text_split_strip_white(Ctxt *c,
-      Evas_Object_Textblock_Text_Item *ti, Eina_List *lti, int cut)
+      Evas_Object_Textblock_Text_Item *ti, Eina_List *lti, size_t cut)
 {
-   Eina_Unicode *ts;
+   const Eina_Unicode *ts;
    Evas_Object_Textblock_Text_Item *new_ti = NULL, *white_ti = NULL;
-   int cut2;
 
-   ts = ti->text;
-   if (_is_white(ts[cut]))
-     cut2 = cut + 1;
-   else
-     cut2 = cut;
+   ts = GET_ITEM_TEXT(ti);
 
-   if (ts[cut2] && (ti->text_props.text_len > 0))
+   if (!IS_AT_END(ti, cut) && (ti->text_props.text_len > 0))
      {
-        new_ti = _layout_text_item_new(c, ti->parent.format, &ts[cut2],
-                                       ti->text_props.text_len - cut2);
+        new_ti = _layout_text_item_new(c, ti->parent.format);
         new_ti->parent.text_node = ti->parent.text_node;
-        new_ti->parent.text_pos = ti->parent.text_pos + cut2;
+        new_ti->parent.text_pos = ti->parent.text_pos + cut;
         new_ti->parent.merge = EINA_TRUE;
-        ts[cut2] = 0;
 
         evas_common_text_props_split(&ti->text_props,
-                                     &new_ti->text_props, cut2);
+                                     &new_ti->text_props, cut);
         _layout_text_add_logical_item(c, new_ti, lti);
      }
 
-   if ((cut2 > cut) && (ti->text_props.text_len > 0))
+   /* Strip the previous white if needed */
+   if ((cut >= 1) && _is_white(ts[cut - 1]) && (ti->text_props.text_len > 0))
      {
-        white_ti = _layout_text_item_new(c, ti->parent.format, &ts[cut],
-                                       ti->text_props.text_len - cut);
-        white_ti->parent.text_node = ti->parent.text_node;
-        white_ti->parent.text_pos = ti->parent.text_pos + cut;
-        white_ti->parent.merge = EINA_TRUE;
-        white_ti->parent.visually_deleted = EINA_TRUE;
-        ts[cut] = 0;
+        if (cut - 1 > 0)
+          {
+             size_t white_cut = cut - 1;
+             white_ti = _layout_text_item_new(c, ti->parent.format);
+             white_ti->parent.text_node = ti->parent.text_node;
+             white_ti->parent.text_pos = ti->parent.text_pos + white_cut;
+             white_ti->parent.merge = EINA_TRUE;
+             white_ti->parent.visually_deleted = EINA_TRUE;
 
-        evas_common_text_props_split(&ti->text_props,
-              &white_ti->text_props, cut);
-        _layout_text_add_logical_item(c, white_ti, lti);
+             evas_common_text_props_split(&ti->text_props,
+                   &white_ti->text_props, white_cut);
+             _layout_text_add_logical_item(c, white_ti, lti);
+          }
+        else
+          {
+             /* Mark this one as the visually deleted. */
+             ti->parent.visually_deleted = EINA_TRUE;
+          }
      }
 
    if (new_ti || white_ti)
      {
         _text_item_update_sizes(c, ti);
-
-        ti->text = eina_unicode_strndup(ts, cut);
-        free(ts);
      }
    return new_ti;
 }
@@ -2527,20 +2628,10 @@ _layout_item_merge_and_free(Ctxt *c,
       Evas_Object_Textblock_Text_Item *item1,
       Evas_Object_Textblock_Text_Item *item2)
 {
-   Eina_Unicode *tmp;
-   size_t len1, len2;
-   len1 = item1->text_props.text_len;
-   len2 = item2->text_props.text_len;
    evas_common_text_props_merge(&item1->text_props,
          &item2->text_props);
 
-   item1->parent.w = item1->parent.adv + item2->parent.w;
-   item1->parent.adv += item2->parent.adv;
-
-   tmp = realloc(item1->text, (len1 + len2 + 1) * sizeof(Eina_Unicode));
-   eina_unicode_strncpy(tmp + len1, item2->text, len2);
-   item1->text = tmp;
-   item1->text[len1 + len2] = 0;
+   _text_item_update_sizes(c, item1);
 
    item1->parent.merge = EINA_FALSE;
    item1->parent.visually_deleted = EINA_FALSE;
@@ -2550,103 +2641,6 @@ _layout_item_merge_and_free(Ctxt *c,
 
 /**
  * @internal
- * Return the start of the last word up until start.
- *
- * @param str the string to work on.
- * @param start the start of where to look at.
- * @return the start of the last word up until start.
- */
-static int
-_layout_word_start(const Eina_Unicode *str, int start)
-{
-   int p, tp, chr = 0;
-
-   p = start;
-   chr = GET_NEXT(str, p);
-   if (_is_white(chr))
-     {
-        tp = p;
-        while (_is_white(chr) && (p >= 0))
-          {
-             tp = p;
-             chr = GET_NEXT(str, p);
-          }
-        return tp;
-     }
-   p = start;
-   tp = p;
-   while (p > 0)
-     {
-        chr = GET_PREV(str, p);
-        if (_is_white(chr)) break;
-        tp = p;
-     }
-   if (p < 0) p = 0;
-   if ((p >= 0) && (_is_white(chr)))
-     {
-        GET_NEXT(str, p);
-     }
-   return p;
-}
-
-/**
- * @internal
- * returns the index of the words end starting from p
- *
- * @param str the str to work on - NOT NULL.
- * @param p start position - must be within strings range..
- *
- * @return the position of the end of the word. -1 on error.
- */
-static int
-_layout_word_end(const Eina_Unicode *str, int p)
-{
-   int ch, tp;
-
-   tp = p;
-   ch = GET_NEXT(str, tp);
-   while ((!_is_white(ch)) && (tp >= 0) && (ch != 0))
-     {
-        p = tp;
-        ch = GET_NEXT(str, tp);
-     }
-   if (ch == 0) return -1;
-   return p;
-}
-
-/**
- * @internal
- * returns the index of the start of the next word.
- *
- * @param str the str to work on - NOT NULL.
- * @param p start position - must be within strings range..
- *
- * @return the position of the start of the next word. -1 on error.
- */
-static int
-_layout_word_next(Eina_Unicode *str, int p)
-{
-   int ch, tp;
-
-   tp = p;
-   ch = GET_NEXT(str, tp);
-   while ((!_is_white(ch)) && (tp >= 0) && (ch != 0))
-     {
-        p = tp;
-        ch = GET_NEXT(str, tp);
-     }
-   if (ch == 0) return -1;
-   while ((_is_white(ch)) && (tp >= 0) && (ch != 0))
-     {
-        p = tp;
-        ch = GET_NEXT(str, tp);
-     }
-   if (ch == 0) return -1;
-   return p;
-}
-
-/**
- * @internal
  * Calculates an item's size.
  *
  * @param c the context
@@ -2655,57 +2649,93 @@ _layout_word_next(Eina_Unicode *str, int p)
 static void
 _text_item_update_sizes(Ctxt *c, Evas_Object_Textblock_Text_Item *ti)
 {
-   int tw, th, inset, right_inset;
+   int tw, th, inset, advw;
    const Evas_Object_Textblock_Format *fmt = ti->parent.format;
+   int shad_sz = 0, shad_dst = 0, out_sz = 0;
+   int dx = 0, minx = 0, maxx = 0, shx1, shx2;
 
    tw = th = 0;
    if (fmt->font.font)
-     c->ENFN->font_string_size_get(c->ENDT, fmt->font.font, ti->text,
+     c->ENFN->font_string_size_get(c->ENDT, fmt->font.font,
            &ti->text_props, &tw, &th);
    inset = 0;
    if (fmt->font.font)
      inset = c->ENFN->font_inset_get(c->ENDT, fmt->font.font,
            &ti->text_props);
-   right_inset = 0;
+   advw = 0;
    if (fmt->font.font)
-      right_inset = c->ENFN->font_right_inset_get(c->ENDT, fmt->font.font,
-            &ti->text_props);
+      advw = c->ENFN->font_h_advance_get(c->ENDT, fmt->font.font,
+           &ti->text_props);
+
 
    /* These adjustments are calculated and thus heavily linked to those in
     * textblock_render!!! Don't change one without the other. */
-   switch (ti->parent.format->style)
-     {
-        case EVAS_TEXT_STYLE_SHADOW:
-           ti->x_adjustment = 1;
-           break;
-        case EVAS_TEXT_STYLE_OUTLINE_SHADOW:
-        case EVAS_TEXT_STYLE_FAR_SHADOW:
-           ti->x_adjustment = 2;
-           break;
-        case EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW:
-        case EVAS_TEXT_STYLE_FAR_SOFT_SHADOW:
-           ti->x_adjustment = 4;
-           break;
-        case EVAS_TEXT_STYLE_SOFT_SHADOW:
-           inset += 1;
-           ti->x_adjustment = 4;
-           break;
-        case EVAS_TEXT_STYLE_GLOW:
-        case EVAS_TEXT_STYLE_SOFT_OUTLINE:
-           inset += 2;
-           ti->x_adjustment = 4;
-           break;
-        case EVAS_TEXT_STYLE_OUTLINE:
-           inset += 1;
-           ti->x_adjustment = 1;
-           break;
-        default:
-           break;
-     }
+
+   switch (ti->parent.format->style & EVAS_TEXT_STYLE_MASK_BASIC)
+     {
+      case EVAS_TEXT_STYLE_SHADOW:
+        shad_dst = 1;
+        break;
+      case EVAS_TEXT_STYLE_OUTLINE_SHADOW:
+      case EVAS_TEXT_STYLE_FAR_SHADOW:
+        shad_dst = 2;
+        out_sz = 1;
+        break;
+      case EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW:
+        shad_dst = 1;
+        shad_sz = 2;
+        out_sz = 1;
+        break;
+      case EVAS_TEXT_STYLE_FAR_SOFT_SHADOW:
+        shad_dst = 2;
+        shad_sz = 2;
+        break;
+      case EVAS_TEXT_STYLE_SOFT_SHADOW:
+        shad_dst = 1;
+        shad_sz = 2;
+        break;
+      case EVAS_TEXT_STYLE_GLOW:
+      case EVAS_TEXT_STYLE_SOFT_OUTLINE:
+        out_sz = 2;
+        break;
+      case EVAS_TEXT_STYLE_OUTLINE:
+        out_sz = 1;
+        break;
+      default:
+        break;
+     }
+   switch (ti->parent.format->style & EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION)
+     {
+      case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT:
+      case EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT:
+      case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT:
+        dx = -1;
+        break;
+      case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT:
+      case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT:
+      case EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT:
+        dx = 1;
+      case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP:
+      case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM:
+      default:
+        dx = 0;
+        break;
+     }
+   minx = -out_sz;
+   maxx = out_sz;
+   shx1 = dx * shad_dst;
+   shx1 -= shad_sz;
+   shx2 = dx * shad_dst;
+   shx2 += shad_sz;
+   if (shx1 < minx) minx = shx1;
+   if (shx2 > maxx) maxx = shx2;
+   inset += -minx;
+   ti->x_adjustment = maxx - minx;
+   
    ti->inset = inset;
    ti->parent.w = tw + ti->x_adjustment;
    ti->parent.h = th;
-   ti->parent.adv = tw + right_inset;
+   ti->parent.adv = advw;
    ti->parent.x = 0;
 }
 
@@ -2743,11 +2773,11 @@ static void
 _layout_text_append(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Textblock_Node_Text *n, int start, int off, const char *repch)
 {
    int new_line, empty_item;
-   Eina_Unicode *alloc_str = NULL;
    const Eina_Unicode *str = EINA_UNICODE_EMPTY_STRING;
    const Eina_Unicode *tbase;
    Evas_Object_Textblock_Text_Item *ti;
    size_t cur_len = 0;
+   Eina_Unicode urepch = 0;
 
    /* prepare a working copy of the string, either filled by the repch or
     * filled with the true values */
@@ -2784,22 +2814,18 @@ _layout_text_append(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Text
           {
              int i, ind;
              Eina_Unicode *ptr;
-             Eina_Unicode urepch;
 
-             str = alloca((off + 1) * sizeof(Eina_Unicode));
-             tbase = str;
+             tbase = str = ptr = alloca((off + 1) * sizeof(Eina_Unicode));
              ind = 0;
              urepch = eina_unicode_utf8_get_next(repch, &ind);
-             for (i = 0, ptr = (Eina_Unicode *)tbase; i < off; ptr++, i++)
+             for (i = 0 ; i < off; ptr++, i++)
                *ptr = urepch;
              *ptr = 0;
           }
         /* Use the string, just cut the relevant parts */
         else
           {
-             str = eina_ustrbuf_string_get(n->unicode);
-             alloc_str = eina_unicode_strndup(str + start, off);
-             str = alloc_str;
+             str = eina_ustrbuf_string_get(n->unicode) + start;
           }
 
         cur_len = off;
@@ -2811,55 +2837,67 @@ skip:
    empty_item = 0;
 
 
-   while (str)
+   /* If there's no parent text node, only create an empty item */
+   if (!n)
+     {
+        ti = _layout_text_item_new(c, fmt);
+        ti->parent.text_node = NULL;
+        ti->parent.text_pos = 0;
+        _layout_text_add_logical_item(c, ti, NULL);
+
+        return;
+     }
+
+   while (cur_len > 0)
      {
-        int tmp_len;
+        Evas_Font_Instance *script_fi = NULL;
+        int script_len, tmp_cut;
+        Evas_Script_Type script;
 
-        ti = _layout_text_item_new(c, fmt, str, cur_len);
-        ti->parent.text_node = n;
-        ti->parent.text_pos = start + str - tbase;
-        tmp_len = off - (str - tbase);
-        if (ti->parent.text_node)
+        script_len = cur_len;
+
+        tmp_cut = evas_common_language_script_end_of_run_get(str,
+              c->par->bidi_props, start + str - tbase, script_len);
+        if (tmp_cut > 0)
           {
-             int tmp_cut;
-             tmp_cut = evas_common_language_script_end_of_run_get(
-                   ti->text,
-                   ti->parent.text_node->bidi_props,
-                   ti->parent.text_pos, tmp_len);
-             if (tmp_cut > 0)
-               {
-                  Eina_Unicode *ts;
+             script_len = tmp_cut;
+          }
+        cur_len -= script_len;
+
+        script = evas_common_language_script_type_get(str, script_len);
+
+
+        while (script_len > 0)
+          {
+             Evas_Font_Instance *cur_fi = NULL;
+             int run_len = script_len;
+             ti = _layout_text_item_new(c, fmt);
+             ti->parent.text_node = n;
+             ti->parent.text_pos = start + str - tbase;
 
-                  ts = ti->text;
-                  ts[tmp_cut] = 0;
-                  ti->text = eina_unicode_strndup(ts, tmp_cut);
-                  free(ts);
-                  tmp_len = tmp_cut;
+             if (ti->parent.format->font.font)
+               {
+                  run_len = c->ENFN->font_run_end_get(c->ENDT,
+                        ti->parent.format->font.font, &script_fi, &cur_fi,
+                        script, str, script_len);
                }
+
              evas_common_text_props_bidi_set(&ti->text_props,
-                   ti->parent.text_node->bidi_props, ti->parent.text_pos);
-             evas_common_text_props_script_set (&ti->text_props,
-                   ti->text);
-             if (ti->parent.format->font.font)
+                   c->par->bidi_props, ti->parent.text_pos);
+             evas_common_text_props_script_set(&ti->text_props, script);
+
+             if (cur_fi)
                {
                   c->ENFN->font_text_props_info_create(c->ENDT,
-                        ti->parent.format->font.font,
-                        ti->text, &ti->text_props,
-                        ti->parent.text_node->bidi_props,
-                        ti->parent.text_pos, tmp_len);
+                        cur_fi, str, &ti->text_props, c->par->bidi_props,
+                        ti->parent.text_pos, run_len);
                }
-          }
-        str += tmp_len;
-        cur_len -= tmp_len;
-
-        _layout_text_add_logical_item(c, ti, NULL);
+             str += run_len;
+             script_len -= run_len;
 
-        /* Break if we reached the end. */
-        if (!*str)
-          break;
+             _layout_text_add_logical_item(c, ti, NULL);
+          }
      }
-
-   if (alloc_str) free(alloc_str);
 }
 
 /**
@@ -2879,7 +2917,6 @@ _layout_format_item_add(Ctxt *c, Evas_Object_Textblock_Node_Format *n, const cha
 
    fi = calloc(1, sizeof(Evas_Object_Textblock_Format_Item));
    fi->item = eina_stringshare_add(item);
-   fi->source_node = n;
    fi->parent.type = EVAS_TEXTBLOCK_ITEM_FORMAT;
    fi->parent.format = fmt;
    fi->parent.format->ref++;
@@ -2891,7 +2928,7 @@ _layout_format_item_add(Ctxt *c, Evas_Object_Textblock_Node_Format *n, const cha
         fi->parent.text_pos = _evas_textblock_node_format_pos_get(n);
 #ifdef BIDI_SUPPORT
         fi->bidi_dir = (evas_bidi_is_rtl_char(
-              fi->parent.text_node->bidi_props,
+              c->par->bidi_props,
               0,
               fi->parent.text_pos)) ?
            EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR;
@@ -2904,6 +2941,13 @@ _layout_format_item_add(Ctxt *c, Evas_Object_Textblock_Node_Format *n, const cha
 
 /**
  * @internal
+ * Returns true if the item is a tab
+ * @def _IS_TAB(item)
+ */
+#define _IS_TAB(item)                                             \
+   (!strcmp(item, "\t") || !strcmp(item, "\\t"))
+/**
+ * @internal
  * Returns true if the item is a line spearator, false otherwise
  * @def _IS_LINE_SEPARATOR(item)
  */
@@ -2932,11 +2976,13 @@ _layout_format_item_add(Ctxt *c, Evas_Object_Textblock_Node_Format *n, const cha
  * @param style_pad_r the pad to update.
  * @param style_pad_t the pad to update.
  * @param style_pad_b the pad to update.
+ * @param create_item Create a new format item if true, only process otherwise.
  */
 static void
 _layout_do_format(const Evas_Object *obj __UNUSED__, Ctxt *c,
       Evas_Object_Textblock_Format **_fmt, Evas_Object_Textblock_Node_Format *n,
-      int *style_pad_l, int *style_pad_r, int *style_pad_t, int *style_pad_b)
+      int *style_pad_l, int *style_pad_r, int *style_pad_t, int *style_pad_b,
+      Eina_Bool create_item)
 {
    Evas_Object_Textblock_Format *fmt = *_fmt;
    /* FIXME: comment the algo */
@@ -2945,7 +2991,7 @@ _layout_do_format(const Evas_Object *obj __UNUSED__, Ctxt *c,
    const char *item;
    int handled = 0;
 
-   s = eina_strbuf_string_get(n->format);
+   s = n->format;
    if (!strncmp(s, "+ item ", 7))
      {
         // one of:
@@ -3018,22 +3064,29 @@ _layout_do_format(const Evas_Object *obj __UNUSED__, Ctxt *c,
                }
           }
 
-        fi = _layout_format_item_add(c, n, NULL, fmt);
-        fi->vsize = vsize;
-        fi->size = size;
-        fi->formatme = 1;
-        fi->parent.w = fi->parent.adv = w; /* For formats items it's usually
-                                              the same, we don't handle the
-                                              special cases yet. */
-        fi->parent.h = h;
+        if (create_item)
+          {
+             fi = _layout_format_item_add(c, n, s, fmt);
+             fi->vsize = vsize;
+             fi->size = size;
+             fi->formatme = 1;
+             /* For formats items it's usually
+                the same, we don't handle the
+                special cases yet. */
+             fi->parent.w = fi->parent.adv = w;
+             fi->parent.h = h;
+          }
         handled = 1;
      }
+
    if (!handled)
      {
+        Eina_Bool push_fmt = EINA_FALSE;
         if (s[0] == '+')
           {
              fmt = _layout_format_push(c, fmt);
              s++;
+             push_fmt = EINA_TRUE;
           }
         else if (s[0] == '-')
           {
@@ -3042,14 +3095,16 @@ _layout_do_format(const Evas_Object *obj __UNUSED__, Ctxt *c,
           }
         while ((item = _format_parse(&s)))
           {
-             char *tmp = alloca(s - item + 1);
-             strncpy(tmp, item, s - item);
-             tmp[s - item] = '\0';
              if (_format_is_param(item))
                {
-                  _layout_format_value_handle(c, fmt, item);
+                  /* Only handle it if it's a push format, otherwise,
+                   * don't let overwrite the format stack.. */
+                  if (push_fmt)
+                    {
+                       _layout_format_value_handle(c, fmt, item);
+                    }
                }
-             else
+             else if (create_item)
                {
                   if ((_IS_PARAGRAPH_SEPARATOR(c->o, item)) ||
                         (_IS_LINE_SEPARATOR(item)))
@@ -3057,6 +3112,7 @@ _layout_do_format(const Evas_Object *obj __UNUSED__, Ctxt *c,
                        Evas_Object_Textblock_Format_Item *fi;
 
                        fi = _layout_format_item_add(c, n, item, fmt);
+
                        fi->parent.w = fi->parent.adv = 0;
                     }
                   else if ((!strcmp(item, "\t")) || (!strcmp(item, "\\t")))
@@ -3094,210 +3150,400 @@ _layout_update_par(Ctxt *c)
      {
         c->par->y = 0;
      }
+
+   /* Insert it to the index now that we calculated it's y
+    * We don't need to reinsert even if y (they key) changed, because the
+    * order remains the same. */
+   if (!c->par->indexed)
+     {
+        c->o->par_index = eina_rbtree_inline_insert(c->o->par_index,
+              EINA_RBTREE_GET(c->par), _par_index_node_cmp, NULL);
+        c->par->indexed = EINA_TRUE;
+     }
 }
 
 /* -1 means no wrap */
 static int
 _layout_get_charwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt,
-      const Evas_Object_Textblock_Text_Item *ti)
+      const Evas_Object_Textblock_Text_Item *ti, size_t line_start,
+      const char *breaks)
 {
-   int wrap;
+   size_t uwrap;
+   size_t len = eina_ustrbuf_length_get(ti->parent.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 (wrap == 0)
-     GET_NEXT(ti->text, wrap);
-   if (!ti->text[wrap])
-     wrap = -1;
+     {
+        int wrap;
+        wrap = _layout_text_cutoff_get(c, fmt, ti);
+        if (wrap < 0)
+           return -1;
+        uwrap = (size_t) wrap + ti->parent.text_pos;
+     }
 
-   return wrap;
+
+   if (uwrap == line_start)
+      MOVE_NEXT_UNTIL(len, uwrap);
+   if ((uwrap <= line_start) || (uwrap > len))
+      return -1;
+
+   return uwrap;
 }
 
 /* -1 means no wrap */
+#ifdef HAVE_LINEBREAK
+
+/* Allow break means: if we can break after the current char */
+#define ALLOW_BREAK(i) \
+   (breaks[i] <= LINEBREAK_ALLOWBREAK)
+
+#else
+
+#define ALLOW_BREAK(i) \
+   (_is_white(str[i]))
+
+#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)
-{
-   int wrap = -1, twrap;
-   int orig_wrap;
-   Eina_Unicode ch;
-   const Eina_Unicode *str = ti->text;
-
-   wrap = _layout_text_cutoff_get(c, fmt, ti);
-   /* Avoiding too small textblocks to even contain one char */
-   if (wrap == 0)
-     GET_NEXT(str, wrap);
-   orig_wrap = wrap;
-   /* We need to wrap and found the position that overflows */
-   if (wrap > 0)
-     {
-        int index = wrap;
-        ch = GET_NEXT(str, index);
-        if (!_is_white(ch))
-          wrap = _layout_word_start(str, wrap);
-        /* If we found where to cut the text at, i.e the start
-         * of the word we were pointing at */
-        if (wrap > 0)
-          {
-             twrap = wrap;
-             ch = GET_PREV(str, twrap);
-             /* the text intersects the wrap point on a whitespace char */
-             if (_is_white(ch))
-               {
-                  return wrap;
-               }
-             /* intersects a word */
-             else
-               {
-                  /* walk back to start of word */
-                  twrap = _layout_word_start(str, wrap);
-                  if (twrap != 0)
-                    {
-                       wrap = twrap;
-                       ch = GET_PREV(str, wrap);
-                       return (str[wrap]) ? wrap : -1;
-                    }
-               }
+      const Evas_Object_Textblock_Text_Item *ti, 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);
+#ifndef HAVE_LINEBREAK
+   /* Not used without liblinebreak ATM. */
+   (void) breaks;
+#endif
+
+     {
+        int swrap = -1;
+        swrap = _layout_text_cutoff_get(c, fmt, ti);
+        /* Avoiding too small textblocks to even contain one char.
+         * FIXME: This can cause breaking inside ligatures. */
+
+        if (swrap < 0)
+           return -1;
+
+        orig_wrap = wrap = swrap + item_start;
+     }
+
+   if (wrap > line_start)
+     {
+        /* The wrapping point found is the first char of the next string
+           the rest works on the last char of the previous string.
+           If it's a whitespace, then it's ok, and no need to go back
+           because we'll remove it anyway. */
+        if (!_is_white(str[wrap]))
+           MOVE_PREV_UNTIL(line_start, wrap);
+        /* If there's a breakable point inside the text, scan backwards until
+         * we find it */
+        while (wrap > line_start)
+          {
+             if (ALLOW_BREAK(wrap))
+                break;
+             wrap--;
+          }
+
+        if ((wrap > line_start) ||
+              ((wrap == line_start) && (ALLOW_BREAK(wrap)) && (wrap < len)))
+          {
+             /* We found a suitable wrapping point, break here. */
+             MOVE_NEXT_UNTIL(len, wrap);
+             return wrap;
           }
-        /* If we weren't able to find the start of the word we
-         * are currently pointing at, or we were able but it's
-         * the first word - the end of this word is the wrap point, o */
         else
           {
-             /* wrap now is the index of the word START */
-             index = wrap;
-             ch = GET_NEXT(str, index);
-
-             /* If there are already items in this line, we
-              * should just try creating a new line for it */
-             if (c->ln->items)
+             if (mixed_wrap)
                {
-                  return 0;
+                  return ((orig_wrap >= line_start) && (orig_wrap < len)) ?
+                     ((int) orig_wrap) : -1;
                }
-             /* If there were no items in this line, try to do
-              * our best wrapping possible since it's the middle
-              * of the word */
              else
                {
-                  if (mixed_wrap)
-                    {
-                       return (str[orig_wrap]) ? orig_wrap : -1;
-                    }
-                  else
-                    {
-                       wrap = 0;
-                       twrap = _layout_word_end(ti->text, wrap);
-                       wrap = twrap;
-                       if (twrap >= 0)
-                         {
-                            ch = GET_NEXT(str, wrap);
-                            return (str[wrap]) ? wrap : -1;
-                         }
-                       else
-                         {
-                            return -1;
-                         }
-                    }
+                  /* Scan forward to find the next wrapping point */
+                  wrap = orig_wrap;
+                  wrap_after = EINA_TRUE;
                }
           }
      }
-   /* We need to wrap, but for some reason we failed obatining the
-    * overflow position. */
-   else
+
+   /* If we need to find the position after the cutting point */
+   if ((wrap == line_start) || (wrap_after))
      {
-        /*FIXME: sanitize this error handling - should probably
-         * never get here anyway unless something really bad
-         * has happend */
-        /* wrap now is the index of the word START */
-        if (wrap < 0) wrap = 0;
+        while (wrap < len)
+          {
+             if (ALLOW_BREAK(wrap))
+                break;
+             wrap++;
+          }
 
-        /* If there are already items in the line, break before. */
-        if (c->ln->items)
+
+        if ((wrap < len) && (wrap > line_start))
           {
-             return 0;
+             MOVE_NEXT_UNTIL(len, wrap);
+             return wrap;
           }
         else
           {
-             twrap = _layout_word_end(ti->text, wrap);
-             wrap = _layout_word_next(ti->text, wrap);
-             if (wrap >= 0)
-               {
-                  ch = GET_NEXT(str, wrap);
-                  return (str[wrap]) ? wrap : -1;
-               }
-             else if (twrap >= 0)
-               {
-                  ch = GET_NEXT(str, twrap);
-                  return (str[twrap]) ? twrap : -1;
-               }
+             return -1;
           }
      }
+
    return -1;
 }
 
 /* -1 means no wrap */
 static int
 _layout_get_wordwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt,
-      const Evas_Object_Textblock_Text_Item *ti)
+      const Evas_Object_Textblock_Text_Item *ti, size_t line_start,
+      const char *breaks)
 {
-   return _layout_get_word_mixwrap_common(c, fmt, ti, EINA_FALSE);
+   return _layout_get_word_mixwrap_common(c, fmt, ti, 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)
+      const Evas_Object_Textblock_Text_Item *ti, size_t line_start,
+      const char *breaks)
 {
-   return _layout_get_word_mixwrap_common(c, fmt, ti, EINA_TRUE);
+   return _layout_get_word_mixwrap_common(c, fmt, ti, EINA_TRUE, line_start,
+         breaks);
 }
 
+/* Should be moved inside _layout_ellipsis_item_new once we fix the hack in
+ * textblock render */
+static const Eina_Unicode _ellip_str[2] = { 0x2026, '\0' };
+
 static Evas_Object_Textblock_Text_Item *
 _layout_ellipsis_item_new(Ctxt *c, const Evas_Object_Textblock_Item *cur_it)
 {
    Evas_Object_Textblock_Text_Item *ellip_ti;
-   const Eina_Unicode _ellip_str[2] = { 0x2026, '\0' }; /* Ellipsis char */
+   Evas_Script_Type script;
+   Evas_Font_Instance *script_fi = NULL, *cur_fi;
    size_t len = 1; /* The length of _ellip_str */
-   /* We assume that the format stack has at least one time,
-    * the only reason it may not have, is more </> than <>, other
-    * than that, we're safe. The last item is the base format. */
-   ellip_ti = _layout_text_item_new(c,
-         eina_list_data_get(eina_list_last(c->format_stack)),
-         _ellip_str, len);
+
+   /* We can free it here, cause there's only one ellipsis item per tb. */
+   if (c->o->ellip_ti) _item_free(c->obj, NULL, _ITEM(c->o->ellip_ti));
+   c->o->ellip_ti = ellip_ti = _layout_text_item_new(c,
+         eina_list_data_get(eina_list_last(c->format_stack)));
    ellip_ti->parent.text_node = cur_it->text_node;
    ellip_ti->parent.text_pos = cur_it->text_pos;
+   script = evas_common_language_script_type_get(_ellip_str, len);
+
+   evas_common_text_props_bidi_set(&ellip_ti->text_props,
+         c->par->bidi_props, ellip_ti->parent.text_pos);
+   evas_common_text_props_script_set (&ellip_ti->text_props, script);
+
+   if (ellip_ti->parent.format->font.font)
+     {
+        /* It's only 1 char anyway, we don't need the run end. */
+        (void) c->ENFN->font_run_end_get(c->ENDT,
+              ellip_ti->parent.format->font.font, &script_fi, &cur_fi,
+              script, _ellip_str, len);
+
+        c->ENFN->font_text_props_info_create(c->ENDT,
+              cur_fi, _ellip_str, &ellip_ti->text_props,
+              c->par->bidi_props, ellip_ti->parent.text_pos, len);
+     }
+
+   _text_item_update_sizes(c, ellip_ti);
+
    if (cur_it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
      {
-        ellip_ti->parent.text_pos += _ITEM_TEXT(cur_it)->text_props.text_len;
+        ellip_ti->parent.text_pos += _ITEM_TEXT(cur_it)->text_props.text_len
+           - 1;
      }
    else
      {
         ellip_ti->parent.text_pos++;
      }
 
-   evas_common_text_props_bidi_set(&ellip_ti->text_props,
-         ellip_ti->parent.text_node->bidi_props, ellip_ti->parent.text_pos);
-   evas_common_text_props_script_set (&ellip_ti->text_props,
-         ellip_ti->text);
-   c->ENFN->font_text_props_info_create(c->ENDT,
-         ellip_ti->parent.format->font.font,
-         ellip_ti->text, &ellip_ti->text_props,
-         ellip_ti->parent.text_node->bidi_props,
-         ellip_ti->parent.text_pos, len);
-   _text_item_update_sizes(c, ellip_ti);
-
    return ellip_ti;
 }
 
+/**
+ * @internel
+ * Handle ellipsis
+ */
+static inline void
+_layout_handle_ellipsis(Ctxt *c, Evas_Object_Textblock_Item *it, Eina_List *i)
+{
+   Evas_Object_Textblock_Text_Item *ellip_ti, *last_ti;
+   Evas_Object_Textblock_Item *last_it;
+   Evas_Coord save_cx;
+   int wrap;
+   ellip_ti = _layout_ellipsis_item_new(c, it);
+   last_it = it;
+   last_ti = _ITEM_TEXT(it);
+
+   save_cx = c->x;
+   c->w -= ellip_ti->parent.w;
+   do
+     {
+        wrap = _layout_text_cutoff_get(c, last_it->format,
+              last_ti);
+        if ((wrap > 0) && !IS_AT_END(last_ti, (size_t) wrap))
+          {
+             _layout_item_text_split_strip_white(c, last_ti, i, wrap);
+          }
+        else if (wrap == 0)
+          {
+             if (!c->ln->items)
+                break;
+             /* We haven't added it yet at this point */
+             if (_ITEM(last_ti) != it)
+               {
+                  last_it =
+                     _ITEM(EINA_INLIST_GET(last_it)->prev);
+                  c->ln->items = _ITEM(eina_inlist_remove(
+                           EINA_INLIST_GET(c->ln->items),
+                           EINA_INLIST_GET(_ITEM(last_ti))));
+               }
+             else
+               {
+                  last_it =
+                     _ITEM(EINA_INLIST_GET(c->ln->items)->last);
+               }
+             last_ti = _ITEM_TEXT(last_it);
+             if (last_it)
+               {
+                  c->x -= last_it->adv;
+               }
+          }
+     }
+   while (last_it && (wrap == 0));
+   c->x = save_cx;
+   c->w += ellip_ti->parent.w;
+   /* If we should add this item, do it */
+   if (last_it == it)
+     {
+        c->ln->items = (Evas_Object_Textblock_Item *)
+           eina_inlist_append(EINA_INLIST_GET(c->ln->items),
+                 EINA_INLIST_GET(it));
+        if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT)
+          {
+             Evas_Object_Textblock_Format_Item *fi;
+             fi = _ITEM_FORMAT(it);
+             fi->y = c->y;
+          }
+     }
+   c->ln->items = (Evas_Object_Textblock_Item *)
+      eina_inlist_append(EINA_INLIST_GET(c->ln->items),
+            EINA_INLIST_GET(_ITEM(ellip_ti)));
+   _layout_line_finalize(c, ellip_ti->parent.format);
+}
+
+#ifdef BIDI_SUPPORT
+static void
+_layout_paragraph_reorder_lines(Evas_Object_Textblock_Paragraph *par)
+{
+   Evas_Object_Textblock_Line *ln;
+
+   EINA_INLIST_FOREACH(EINA_INLIST_GET(par->lines), ln)
+     {
+        _layout_line_reorder(ln);
+     }
+}
+#endif
+
+static void
+_layout_paragraph_render(Evas_Object_Textblock *o,
+      Evas_Object_Textblock_Paragraph *par)
+{
+   if (par->rendered)
+      return;
+   par->rendered = EINA_TRUE;
+
+#ifdef BIDI_SUPPORT
+   if (par->is_bidi)
+     {
+        _layout_update_bidi_props(o, par);
+        _layout_paragraph_reorder_lines(par);
+        /* Clear the bidi props because we don't need them anymore. */
+        if (par->bidi_props)
+          {
+             evas_bidi_paragraph_props_unref(par->bidi_props);
+             par->bidi_props = NULL;
+          }
+     }
+#endif
+}
+
 /* 0 means go ahead, 1 means break without an error, 2 means
  * break with an error, should probably clean this a bit (enum/macro)
  * FIXME ^ */
 static int
-_layout_visualize_par(Ctxt *c)
+_layout_par(Ctxt *c)
 {
    Evas_Object_Textblock_Item *it;
    Eina_List *i;
+   int ret = 0;
+   int wrap = -1;
+   char *line_breaks = NULL;
+
    if (!c->par->logical_items)
      return 2;
 
+   /* We want to show it. */
+   c->par->visible = 1;
+
+   /* Check if we need to skip this paragraph because it's already layouted
+    * correctly, and mark handled nodes as dirty. */
+   c->par->line_no = c->line_no;
+   if (c->par->text_node)
+     {
+        /* Skip this paragraph if width is the same, there is no ellipsis
+         * and we aren't just calculating. */
+        if (!c->par->text_node->new && !c->par->text_node->dirty &&
+              !c->width_changed && c->par->lines &&
+              !c->o->have_ellipsis)
+          {
+             Evas_Object_Textblock_Line *ln;
+             /* Update c->line_no */
+             ln = (Evas_Object_Textblock_Line *)
+                EINA_INLIST_GET(c->par->lines)->last;
+             if (ln)
+                c->line_no = c->par->line_no + ln->line_no + 1;
+             return 0;
+          }
+        c->par->text_node->dirty = EINA_FALSE;
+        c->par->text_node->new = EINA_FALSE;
+        c->par->rendered = EINA_FALSE;
+
+        /* Merge back and clear the paragraph */
+          {
+             Eina_List *itr, *itr_next;
+             Evas_Object_Textblock_Item *ititr, *prev_it = NULL;
+             _paragraph_clear(c->obj, c->par);
+             EINA_LIST_FOREACH_SAFE(c->par->logical_items, itr, itr_next, ititr)
+               {
+                  if (ititr->merge && prev_it &&
+                        (prev_it->type == EVAS_TEXTBLOCK_ITEM_TEXT) &&
+                        (ititr->type == EVAS_TEXTBLOCK_ITEM_TEXT))
+                    {
+                       _layout_item_merge_and_free(c, _ITEM_TEXT(prev_it),
+                             _ITEM_TEXT(ititr));
+                       c->par->logical_items =
+                          eina_list_remove_list(c->par->logical_items, itr);
+                    }
+                  else
+                    {
+                       prev_it = ititr;
+                    }
+               }
+          }
+     }
+
+   c->y = c->par->y;
+
    it = _ITEM(eina_list_data_get(c->par->logical_items));
    _layout_line_new(c, it->format);
    /* We walk on our own because we want to be able to add items from
@@ -3314,112 +3560,128 @@ _layout_visualize_par(Ctxt *c)
              continue;
           }
 
-        /* Check if we need to wrap, i.e the text is bigger than the width */
+
+        /* Check if we need to wrap, i.e the text is bigger than the width,
+           or we already found a wrap point. */
         if ((c->w >= 0) &&
-              ((c->x + it->w) >
-               (c->w - c->o->style_pad.l - c->o->style_pad.r -
-                c->marginl - c->marginr)))
+              (((c->x + it->adv) >
+                (c->w - c->o->style_pad.l - c->o->style_pad.r -
+                 c->marginl - c->marginr)) || (wrap > 0)))
           {
-             /* Handle ellipsis here */
+             /* Handle ellipsis here. If we don't have more width left
+              * and no height left, or no more width left and no wrapping. */
              if ((it->format->ellipsis == 1.0) && (c->h >= 0) &&
-                   (2 * it->h + c->y >
-                    c->h - c->o->style_pad.t - c->o->style_pad.b))
+                   ((2 * it->h + c->y >
+                     c->h - c->o->style_pad.t - c->o->style_pad.b) ||
+                    (!it->format->wrap_word && !it->format->wrap_char &&
+                     !it->format->wrap_mixed)))
                {
-                  Evas_Object_Textblock_Text_Item *ellip_ti, *last_ti;
-                  Evas_Object_Textblock_Item *last_it;
-                  Evas_Coord save_cx;
-                  int wrap;
-                  ellip_ti = _layout_ellipsis_item_new(c, it);
-                  last_it = it;
-                  last_ti = _ITEM_TEXT(it);
-
-                  save_cx = c->x;
-                  c->w -= ellip_ti->parent.w;
-                  do
-                    {
-                       wrap = _layout_text_cutoff_get(c, last_it->format,
-                             last_ti);
-                       if ((wrap > 0) && last_ti->text[wrap])
-                         {
-                            _layout_item_text_split_strip_white(c, last_ti, i,
-                                  wrap);
-                         }
-                       else if (wrap == 0)
-                         {
-                            if (!c->ln->items)
-                              break;
-                            /* We haven't added it yet at this point */
-                            if (_ITEM(last_ti) != it)
-                              {
-                                 last_it =
-                                    _ITEM(EINA_INLIST_GET(last_it)->prev);
-                                 c->ln->items = _ITEM(eina_inlist_remove(
-                                          EINA_INLIST_GET(c->ln->items),
-                                          EINA_INLIST_GET(_ITEM(last_ti))));
-                              }
-                            else
-                              {
-                                 last_it =
-                                    _ITEM(EINA_INLIST_GET(c->ln->items)->last);
-                              }
-                            last_ti = _ITEM_TEXT(last_it);
-                            if (last_it)
-                              {
-                                 c->x -= last_it->adv;
-                              }
-                         }
-                    }
-                  while (last_it && (wrap == 0));
-                  c->x = save_cx;
-                  c->w += ellip_ti->parent.w;
-                  /* If we should add this item, do it */
-                  if (last_it == it)
-                    {
-                       c->ln->items = (Evas_Object_Textblock_Item *)
-                          eina_inlist_append(EINA_INLIST_GET(c->ln->items),
-                                EINA_INLIST_GET(it));
-                       if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT)
-                         {
-                            Evas_Object_Textblock_Format_Item *fi;
-                            fi = _ITEM_FORMAT(it);
-                            fi->y = c->y;
-                         }
-                    }
-                  c->ln->items = (Evas_Object_Textblock_Item *)
-                     eina_inlist_append(EINA_INLIST_GET(c->ln->items),
-                           EINA_INLIST_GET(_ITEM(ellip_ti)));
-                  c->ln->ellip_ti = ellip_ti;
-                  _layout_line_finalize(c, ellip_ti->parent.format);
-
-                  return 1;
+                  _layout_handle_ellipsis(c, it, i);
+                  ret = 1;
+                  goto end;
                }
-             else if (it->format->wrap_word || it->format->wrap_char ||
-                it->format->wrap_mixed)
+             /* If we want to wrap and it's worth checking for wrapping
+              * (i.e there's actually text). */
+             else if ((it->format->wrap_word || it->format->wrap_char ||
+                it->format->wrap_mixed) && it->text_node)
                {
                   if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT)
                     {
                        /* Don't wrap if it's the only item */
                        if (c->ln->items)
                          {
-                            /*FIXME: I should handle tabs correctly, i.e like
-                             * spaces */
+                            /*FIXME: I should handle format correctly,
+                              i.e verify we are allowed to break here */
                             _layout_line_advance(c, it->format);
+                            wrap = -1;
                          }
                     }
                   else
                     {
                        Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it);
-                       int wrap;
+                       size_t line_start;
 
-                       adv_line = 1;
-                       if (it->format->wrap_word)
-                         wrap = _layout_get_wordwrap(c, it->format, ti);
-                       else if (it->format->wrap_char)
-                         wrap = _layout_get_charwrap(c, it->format, ti);
-                       else if (it->format->wrap_mixed)
-                         wrap = _layout_get_mixedwrap(c, it->format, ti);
+#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)
+                              {
+                                 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, "", line_breaks);
+                                 /* FIXME: "" should be text_props language */
+                              }
+                         }
+#endif
+                       if (c->ln->items)
+                          line_start = c->ln->items->text_pos;
                        else
-                         wrap = -1;
+                          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;
+                         }
+
+                       /* 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 < 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)
+                                   {
+                                      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;
+                              }
+                            /* 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 */
+                         }
 
                        if (wrap > 0)
                          {
@@ -3432,11 +3694,13 @@ _layout_visualize_par(Ctxt *c)
                             redo_item = 1;
                             _layout_line_advance(c, it->format);
                          }
+                       /* Reset wrap */
+                       wrap = -1;
                     }
                }
           }
 
-        if (!redo_item)
+        if (!redo_item && !it->visually_deleted)
           {
              c->ln->items = (Evas_Object_Textblock_Item *)
                 eina_inlist_append(EINA_INLIST_GET(c->ln->items),
@@ -3446,7 +3710,12 @@ _layout_visualize_par(Ctxt *c)
                   Evas_Object_Textblock_Format_Item *fi;
                   fi = _ITEM_FORMAT(it);
                   fi->y = c->y;
-                  if (fi->item && _IS_LINE_SEPARATOR(fi->item))
+                  /* If it's a newline, and we are not in newline compat
+                   * mode, or we are in newline compat mode, and this is
+                   * not used as a paragraph separator, advance */
+                  if (fi->item && _IS_LINE_SEPARATOR(fi->item) &&
+                        (!c->o->newline_is_ps ||
+                         eina_list_next(i)))
                     {
                        adv_line = 1;
                     }
@@ -3470,69 +3739,105 @@ _layout_visualize_par(Ctxt *c)
         /* Here 'it' is the last format used */
         _layout_line_finalize(c, it->format);
      }
-   return 0;
+
+end:
+#ifdef HAVE_LINEBREAK
+   if (line_breaks)
+      free(line_breaks);
+#endif
+
+   return ret;
 }
 
 /**
  * @internal
- * Create the layout from the nodes.
+ * Invalidate text nodes according to format changes
+ * This goes through all the new format changes and marks the text nodes
+ * that should be invalidated because of format changes.
  *
- * @param obj the evas object - NOT NULL.
- * @param calc_only true if should only calc sizes false if should also create the layout..
- * @param w the object's w, -1 means no wrapping (i.e infinite size)
- * @param h the object's h, -1 means inifinte size.
- * @param w_ret the object's calculated w.
- * @param h_ret the object's calculated h.
+ * @param c the working context.
  */
-static void
-_layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_ret)
+static inline void
+_format_changes_invalidate_text_nodes(Ctxt *c)
 {
-   Evas_Object_Textblock *o;
-   Ctxt ctxt, *c;
-   Evas_Object_Textblock_Node_Text *n;
-   Evas_Object_Textblock_Format *fmt = NULL;
-   int style_pad_l = 0, style_pad_r = 0, style_pad_t = 0, style_pad_b = 0;
-
-   /* setup context */
-   o = (Evas_Object_Textblock *)(obj->object_data);
-   c = &ctxt;
-   c->obj = (Evas_Object *)obj;
-   c->o = o;
-   c->paragraphs = c->par = NULL;
-   c->format_stack = NULL;
-   c->x = c->y = 0;
-   c->w = w;
-   c->h = h;
-   c->wmax = c->hmax = 0;
-   c->maxascent = c->maxdescent = 0;
-   c->marginl = c->marginr = 0;
-   c->have_underline = 0;
-   c->have_underline2 = 0;
-   c->underline_extend = 0;
-   c->line_no = 0;
-   c->align = 0.0;
-   c->align_auto = EINA_TRUE;
-   c->ln = NULL;
-
+   Evas_Object_Textblock_Node_Format *fnode = c->o->format_nodes;
+   Evas_Object_Textblock_Node_Text *start_n = NULL;
+   int balance = 0;
+   while (fnode)
+     {
+        if (fnode->new)
+          {
+             const char *fstr = fnode->format;
+             /* balance < 0 means we gave up and everything should be
+              * invalidated */
+             if (*fstr == '+')
+               {
+                  balance++;
+                  if (balance == 1)
+                     start_n = fnode->text_node;
+               }
+             else if (*fstr == '-')
+               {
+                  balance--;
+                  if (balance == 0)
+                    {
+                       Evas_Object_Textblock_Node_Text *f_tnode =
+                          fnode->text_node;
+                       while (start_n)
+                         {
+                            start_n->dirty = EINA_TRUE;
+                            if (start_n == f_tnode)
+                               break;
+                            start_n =
+                               _NODE_TEXT(EINA_INLIST_GET(start_n)->next);
+                         }
+                       start_n = NULL;
+                    }
+               }
+             else if (!fnode->visible)
+                balance = -1;
 
-   /* Start of logical layout creation */
+             if (balance < 0)
+               {
+                  /* if we don't already have a starting point, use the
+                   * current paragraph. */
+                  if (!start_n)
+                     start_n = fnode->text_node;
+                  break;
+               }
+          }
+        fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next);
+     }
 
-   /* setup default base style */
-   if ((c->o->style) && (c->o->style->default_tag))
+   if (balance != 0)
      {
-        fmt = _layout_format_push(c, NULL);
-        _format_fill(c->obj, fmt, c->o->style->default_tag);
+        while (start_n)
+          {
+             start_n->dirty = EINA_TRUE;
+             start_n = _NODE_TEXT(EINA_INLIST_GET(start_n)->next);
+          }
      }
-   if (!fmt)
+}
+
+
+/** FIXME: Document */
+static void
+_layout_pre(Ctxt *c, int *style_pad_l, int *style_pad_r, int *style_pad_t,
+      int *style_pad_b)
+{
+   Evas_Object *obj = c->obj;
+   Evas_Object_Textblock *o = c->o;
+   /* Mark text nodes as dirty if format have changed. */
+   if (c->o->format_changed)
      {
-        if (w_ret) *w_ret = 0;
-        if (h_ret) *h_ret = 0;
-        return;
+        _format_changes_invalidate_text_nodes(c);
      }
 
    if (o->content_changed)
      {
-        _paragraphs_free(obj, o->paragraphs);
+        Evas_Object_Textblock_Node_Text *n;
+        c->o->have_ellipsis = 0;
+        c->par = c->paragraphs = o->paragraphs;
         /* Go through all the text nodes to create the logical layout */
         EINA_INLIST_FOREACH(c->o->text_nodes, n)
           {
@@ -3540,15 +3845,72 @@ _layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_
              size_t start;
              int off;
 
-             n->dirty = 0; /* Mark as if we cleaned the paragraph, although
-                              we should really use it to fine tune the
-                              changes here, and not just blindly mark */
-             _layout_paragraph_new(c, n); /* Each node is a paragraph */
+             /* If it's not a new paragraph, either update it or skip it.
+              * Remove all the paragraphs that were deleted */
+             if (!n->new)
+               {
+                  /* Remove all the deleted paragraphs at this point */
+                  while (c->par->text_node != n)
+                    {
+                       Evas_Object_Textblock_Paragraph *tmp_par =
+                          (Evas_Object_Textblock_Paragraph *)
+                          EINA_INLIST_GET(c->par)->next;
+
+                       c->paragraphs = (Evas_Object_Textblock_Paragraph *)
+                          eina_inlist_remove(EINA_INLIST_GET(c->paragraphs),
+                                EINA_INLIST_GET(c->par));
+                       _paragraph_free(obj, c->par);
+
+                       c->par = tmp_par;
+                    }
+
+                  /* If it's dirty, remove and recreate, if it's clean,
+                   * skip to the next. */
+                  if (n->dirty)
+                    {
+                       Evas_Object_Textblock_Paragraph *prev_par = c->par;
+
+                       _layout_paragraph_new(c, n, EINA_TRUE);
+
+                       c->paragraphs = (Evas_Object_Textblock_Paragraph *)
+                          eina_inlist_remove(EINA_INLIST_GET(c->paragraphs),
+                                EINA_INLIST_GET(prev_par));
+                       _paragraph_free(obj, prev_par);
+                    }
+                  else
+                    {
+                       c->par = (Evas_Object_Textblock_Paragraph *)
+                          EINA_INLIST_GET(c->par)->next;
+
+                       /* Update the format stack according to the node's
+                        * formats */
+                       fnode = n->format_node;
+                       while (fnode && (fnode->text_node == n))
+                         {
+                            /* Only do this if this actually changes format */
+                            if (fnode->format_change)
+                               _layout_do_format(obj, c, &c->fmt, fnode,
+                                     style_pad_l, style_pad_r,
+                                     style_pad_t, style_pad_b, EINA_FALSE);
+                            fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next);
+                         }
+                       continue;
+                    }
+               }
+             else
+               {
+                  /* If it's a new paragraph, just add it. */
+                  _layout_paragraph_new(c, n, EINA_FALSE);
+               }
+
+#ifdef BIDI_SUPPORT
+             _layout_update_bidi_props(c->o, c->par);
+#endif
 
              /* For each text node to thorugh all of it's format nodes
               * append text from the start to the offset of the next format
-              * using the last format got. if needed it also creates format items
-              * this is the core algorithm of the layout mechanism.
+              * using the last format got. if needed it also creates format
+              * items this is the core algorithm of the layout mechanism.
               * Skip the unicode replacement chars when there are because
               * we don't want to print them. */
              fnode = n->format_node;
@@ -3557,13 +3919,13 @@ _layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_
                {
                   off += fnode->offset;
                   /* No need to skip on the first run, or a non-visible one */
-                  _layout_text_append(c, fmt, n, start, off, o->repch);
-                  _layout_do_format(obj, c, &fmt, fnode, &style_pad_l,
-                        &style_pad_r, &style_pad_t, &style_pad_b);
+                  _layout_text_append(c, c->fmt, n, start, off, o->repch);
+                  _layout_do_format(obj, c, &c->fmt, fnode, style_pad_l,
+                        style_pad_r, style_pad_t, style_pad_b, EINA_TRUE);
                   if ((c->have_underline2) || (c->have_underline))
                     {
-                       if (style_pad_b < c->underline_extend)
-                         style_pad_b = c->underline_extend;
+                       if (*style_pad_b < c->underline_extend)
+                         *style_pad_b = c->underline_extend;
                        c->have_underline = 0;
                        c->have_underline2 = 0;
                        c->underline_extend = 0;
@@ -3578,143 +3940,165 @@ _layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_
                     {
                        off = 0;
                     }
+                  fnode->new = EINA_FALSE;
                   fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next);
                }
-             _layout_text_append(c, fmt, n, start, -1, o->repch);
+             _layout_text_append(c, c->fmt, n, start, -1, o->repch);
+#ifdef BIDI_SUPPORT
+             /* Clear the bidi props because we don't need them anymore. */
+             if (c->par->bidi_props)
+               {
+                  evas_bidi_paragraph_props_unref(c->par->bidi_props);
+                  c->par->bidi_props = NULL;
+               }
+#endif
+             c->par = (Evas_Object_Textblock_Paragraph *)
+                EINA_INLIST_GET(c->par)->next;
+          }
+
+        /* Delete the rest of the layout paragraphs */
+        while (c->par)
+          {
+             Evas_Object_Textblock_Paragraph *tmp_par =
+                (Evas_Object_Textblock_Paragraph *)
+                EINA_INLIST_GET(c->par)->next;
+
+             c->paragraphs = (Evas_Object_Textblock_Paragraph *)
+                eina_inlist_remove(EINA_INLIST_GET(c->paragraphs),
+                      EINA_INLIST_GET(c->par));
+             _paragraph_free(obj, c->par);
+
+             c->par = tmp_par;
           }
         o->paragraphs = c->paragraphs;
+        c->par = NULL;
      }
-   else if (!calc_only)
+
+}
+
+/**
+ * @internal
+ * Create the layout from the nodes.
+ *
+ * @param obj the evas object - NOT NULL.
+ * @param calc_only true if should only calc sizes false if should also create the layout.. It assumes native size is being calculated, doesn't support formatted size atm.
+ * @param w the object's w, -1 means no wrapping (i.e infinite size)
+ * @param h the object's h, -1 means inifinte size.
+ * @param w_ret the object's calculated w.
+ * @param h_ret the object's calculated h.
+ */
+static void
+_layout(const Evas_Object *obj, int w, int h, int *w_ret, int *h_ret)
+{
+   Evas_Object_Textblock *o;
+   Ctxt ctxt, *c;
+   int style_pad_l = 0, style_pad_r = 0, style_pad_t = 0, style_pad_b = 0;
+
+   /* setup context */
+   o = (Evas_Object_Textblock *)(obj->object_data);
+   c = &ctxt;
+   c->obj = (Evas_Object *)obj;
+   c->o = o;
+   c->paragraphs = c->par = NULL;
+   c->format_stack = NULL;
+   c->fmt = NULL;
+   c->x = c->y = 0;
+   c->w = w;
+   c->h = h;
+   c->wmax = c->hmax = 0;
+   c->maxascent = c->maxdescent = 0;
+   c->marginl = c->marginr = 0;
+   c->have_underline = 0;
+   c->have_underline2 = 0;
+   c->underline_extend = 0;
+   c->line_no = 0;
+   c->align = 0.0;
+   c->align_auto = EINA_TRUE;
+   c->ln = NULL;
+   c->width_changed = (obj->cur.geometry.w != o->last_w);
+
+   /* Start of logical layout creation */
+   /* setup default base style */
+   if ((c->o->style) && (c->o->style->default_tag))
      {
-        _paragraphs_clear(obj, o->paragraphs);
-        c->paragraphs = o->paragraphs;
-        /* Merge the ones that need merging. */
-        /* Go through all the paragraphs, lines, items and merge if should be
-         * merged we merge backwards!!! */
-        Evas_Object_Textblock_Paragraph *par;
-        EINA_INLIST_FOREACH(EINA_INLIST_GET(c->paragraphs), par)
-          {
-             Eina_List *itr, *itr_next;
-             Evas_Object_Textblock_Item *it, *prev_it = NULL;
-             EINA_LIST_FOREACH_SAFE(par->logical_items, itr, itr_next, it)
-               {
-                  if (it->merge && prev_it &&
-                        (prev_it->type == EVAS_TEXTBLOCK_ITEM_TEXT) &&
-                        (it->type == EVAS_TEXTBLOCK_ITEM_TEXT))
-                    {
-                       _layout_item_merge_and_free(c, _ITEM_TEXT(prev_it),
-                             _ITEM_TEXT(it));
-                       par->logical_items =
-                          eina_list_remove_list(par->logical_items, itr);
-                    }
-                  else
-                    {
-                       prev_it = it;
-                    }
-               }
-          }
+        c->fmt = _layout_format_push(c, NULL);
+        _format_fill(c->obj, c->fmt, c->o->style->default_tag);
      }
-   else /* Calc only and content hasn't changed */
+   if (!c->fmt)
      {
-        c->paragraphs = o->paragraphs;
+        if (w_ret) *w_ret = 0;
+        if (h_ret) *h_ret = 0;
+        return;
      }
 
+   _layout_pre(c, &style_pad_l, &style_pad_r, &style_pad_t, &style_pad_b);
+   c->paragraphs = o->paragraphs;
+
    /* If there are no paragraphs, create the minimum needed,
     * if the last paragraph has no lines/text, create that as well */
    if (!c->paragraphs)
      {
-        _layout_paragraph_new(c, NULL);
+        _layout_paragraph_new(c, NULL, EINA_TRUE);
         o->paragraphs = c->paragraphs;
      }
    c->par = (Evas_Object_Textblock_Paragraph *)
       EINA_INLIST_GET(c->paragraphs)->last;
    if (!c->par->logical_items)
      {
-        _layout_text_append(c, fmt, NULL, 0, 0, NULL);
-     }
-
-   /* In the case of calc only, we copy the items and the paragraphs,
-    * but because we don't change OT_DATA we can use it, just copy the item
-    * and ref */
-   if (calc_only)
-     {
-        Evas_Object_Textblock_Paragraph *orig_pars, *par;
-        Eina_List *itr;
-        orig_pars = c->paragraphs;
-        c->paragraphs = NULL;
-        EINA_INLIST_FOREACH(EINA_INLIST_GET(orig_pars), par)
-          {
-             Evas_Object_Textblock_Item *it;
-             c->par = malloc(sizeof(Evas_Object_Textblock_Paragraph));
-             memcpy(c->par, par, sizeof(Evas_Object_Textblock_Paragraph));
-             /* Both of these should not be copied */
-             c->par->lines = NULL;
-             c->par->logical_items = NULL;
-             c->paragraphs = (Evas_Object_Textblock_Paragraph *)
-                eina_inlist_append(EINA_INLIST_GET(c->paragraphs),
-                      EINA_INLIST_GET(c->par));
-
-             /* Copy all the items */
-             EINA_LIST_FOREACH(par->logical_items, itr, it)
-               {
-                  Evas_Object_Textblock_Item *new_it;
-                  if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
-                    {
-                       new_it = malloc(sizeof(Evas_Object_Textblock_Text_Item));
-                       memcpy(new_it, it,
-                             sizeof(Evas_Object_Textblock_Text_Item));
-                    }
-                  else
-                    {
-                       new_it = malloc(
-                             sizeof(Evas_Object_Textblock_Format_Item));
-                       memcpy(new_it, it,
-                             sizeof(Evas_Object_Textblock_Format_Item));
-                    }
-                  c->par->logical_items =
-                     eina_list_append(c->par->logical_items, new_it);
-               }
-          }
+        _layout_text_append(c, c->fmt, NULL, 0, 0, NULL);
      }
 
-
    /* End of logical layout creation */
 
    /* Start of visual layout creation */
-   /* FIXME: move away? */
    {
-      Evas_Object_Textblock_Paragraph *par;
-      EINA_INLIST_FOREACH(c->paragraphs, par)
+      Evas_Object_Textblock_Paragraph *last_vis_par = NULL;
+
+      EINA_INLIST_FOREACH(c->paragraphs, c->par)
         {
-           c->par = par;
            _layout_update_par(c);
+
            /* Break if we should stop here. */
-           if (_layout_visualize_par(c))
-             break;
+           if (_layout_par(c))
+             {
+                last_vis_par = c->par;
+                break;
+             }
+        }
+
+      /* Mark all the rest of the paragraphs as invisible */
+      if (c->par)
+        {
+           c->par = (Evas_Object_Textblock_Paragraph *)
+              EINA_INLIST_GET(c->par)->next;
+           while (c->par)
+             {
+                c->par->visible = 0;
+                c->par = (Evas_Object_Textblock_Paragraph *)
+                   EINA_INLIST_GET(c->par)->next;
+             }
         }
+
+      /* Get the last visible paragraph in the layout */
+      if (!last_vis_par && c->paragraphs)
+         last_vis_par = (Evas_Object_Textblock_Paragraph *)
+            EINA_INLIST_GET(c->paragraphs)->last;
+
+      if (last_vis_par)
+         c->hmax = last_vis_par->y + last_vis_par->h;
    }
-   /* End of visual layout creation */
 
    /* Clean the rest of the format stack */
    while (c->format_stack)
      {
-        fmt = c->format_stack->data;
+        c->fmt = c->format_stack->data;
         c->format_stack = eina_list_remove_list(c->format_stack, c->format_stack);
-        _format_unref_free(c->obj, fmt);
-     }
-
-   if (c->paragraphs)
-     {
-        Evas_Object_Textblock_Paragraph *last_par;
-        last_par = (Evas_Object_Textblock_Paragraph *)
-           EINA_INLIST_GET(c->paragraphs)->last;
-        c->hmax = last_par->y + last_par->h;
+        _format_unref_free(c->obj, c->fmt);
      }
 
    if (w_ret) *w_ret = c->wmax;
    if (h_ret) *h_ret = c->hmax;
 
-   /* Is this really the place? */
    /* Vertically align the textblock */
    if ((o->valign > 0.0) && (c->h > c->hmax))
      {
@@ -3732,36 +4116,9 @@ _layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_
         o->style_pad.l = style_pad_l;
         o->style_pad.r = style_pad_r;
         o->style_pad.t = style_pad_t;
-        o->style_pad.b = style_pad_b;
-        if (!calc_only)
-          {
-             _paragraphs_clear(obj, c->paragraphs);
-          }
-        _layout(obj, calc_only, w, h, w_ret, h_ret);
-        return;
-     }
-
-   if (calc_only)
-     {
-        Evas_Object_Textblock_Paragraph *par;
-        while (c->paragraphs)
-          {
-             Eina_List *itr, *itrn;
-             Evas_Object_Textblock_Item *it;
-             par = c->paragraphs;
-             /* free all the items */
-             EINA_LIST_FOREACH_SAFE(par->logical_items, itr, itrn, it)
-               {
-                  par->logical_items =
-                     eina_list_remove_list(par->logical_items, itr);
-                  free(it);
-               }
-             c->paragraphs = (Evas_Object_Textblock_Paragraph *)
-                eina_inlist_remove(EINA_INLIST_GET(c->paragraphs),
-                      EINA_INLIST_GET(c->paragraphs));
-             _paragraph_clear(obj, par);
-             free(par);
-          }
+        o->style_pad.b = style_pad_b;
+        _paragraphs_clear(obj, c->paragraphs);
+        _layout(obj, w, h, w_ret, h_ret);
      }
 }
 
@@ -3777,16 +4134,14 @@ _relayout(const Evas_Object *obj)
    Evas_Object_Textblock *o;
 
    o = (Evas_Object_Textblock *)(obj->object_data);
-   o->have_ellipsis = 0;
-   _layout(obj,
-         0,
-         obj->cur.geometry.w, obj->cur.geometry.h,
+   _layout(obj, obj->cur.geometry.w, obj->cur.geometry.h,
          &o->formatted.w, &o->formatted.h);
    o->formatted.valid = 1;
    o->last_w = obj->cur.geometry.w;
    o->last_h = obj->cur.geometry.h;
    o->changed = 0;
    o->content_changed = 0;
+   o->format_changed = EINA_FALSE;
    o->redraw = 1;
 }
 
@@ -3804,22 +4159,17 @@ _relayout(const Evas_Object *obj)
 static void
 _find_layout_item_line_match(Evas_Object *obj, Evas_Object_Textblock_Node_Text *n, int pos, Evas_Object_Textblock_Line **lnr, Evas_Object_Textblock_Item **itr)
 {
-   Evas_Object_Textblock_Paragraph *par, *found_par = NULL;
+   Evas_Object_Textblock_Paragraph *found_par;
    Evas_Object_Textblock_Line *ln;
    Evas_Object_Textblock *o;
 
    o = (Evas_Object_Textblock *)(obj->object_data);
    if (!o->formatted.valid) _relayout(obj);
-   EINA_INLIST_FOREACH(o->paragraphs, par)
-     {
-        if (par->text_node == n)
-          {
-             found_par = par;
-             break;
-          }
-     }
+
+   found_par = n->par;
    if (found_par)
      {
+        _layout_paragraph_render(o, found_par);
         EINA_INLIST_FOREACH(found_par->lines, ln)
           {
              Evas_Object_Textblock_Item *it;
@@ -3870,34 +4220,24 @@ _find_layout_item_line_match(Evas_Object *obj, Evas_Object_Textblock_Node_Text *
 static Evas_Object_Textblock_Line *
 _find_layout_line_num(const Evas_Object *obj, int line)
 {
-   Evas_Object_Textblock_Paragraph *par, *prev_par = NULL;
+   Evas_Object_Textblock_Paragraph *par;
    Evas_Object_Textblock_Line *ln;
    Evas_Object_Textblock *o;
 
    o = (Evas_Object_Textblock *)(obj->object_data);
-   EINA_INLIST_FOREACH(o->paragraphs, par)
-     {
-        if (prev_par && (prev_par->line_no <= line) && (line < par->line_no))
-          {
-             break;
-          }
-        prev_par = par;
-     }
-   if (prev_par)
+
+   par = _layout_find_paragraph_by_line_no(o, line);
+   if (par)
      {
-        EINA_INLIST_FOREACH(prev_par->lines, ln)
+        _layout_paragraph_render(o, par);
+        EINA_INLIST_FOREACH(par->lines, ln)
           {
-             if (ln->par->line_no + ln->line_no == line) return ln;
+             if (par->line_no + ln->line_no == line) return ln;
           }
      }
    return NULL;
 }
 
-/**
- * Adds a textblock to the given evas.
- * @param   e The given evas.
- * @return  The new textblock object.
- */
 EAPI Evas_Object *
 evas_object_textblock_add(Evas *e)
 {
@@ -3912,10 +4252,6 @@ evas_object_textblock_add(Evas *e)
    return obj;
 }
 
-/**
- * Creates a new textblock style.
- * @return  The new textblock style.
- */
 EAPI Evas_Textblock_Style *
 evas_textblock_style_new(void)
 {
@@ -3925,10 +4261,6 @@ evas_textblock_style_new(void)
    return ts;
 }
 
-/**
- * Destroys a textblock style.
- * @param ts The textblock style to free.
- */
 EAPI void
 evas_textblock_style_free(Evas_Textblock_Style *ts)
 {
@@ -3942,14 +4274,6 @@ evas_textblock_style_free(Evas_Textblock_Style *ts)
    free(ts);
 }
 
-/**
- * Sets the style ts to the style passed as text by text.
- * Expected a string consisting of many (or none) tag='format' pairs.
- *
- * @param ts  the style to set.
- * @param text the text to parse - NOT NULL.
- * @return Returns no value.
- */
 EAPI void
 evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text)
 {
@@ -3967,7 +4291,8 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text)
         Evas_Object_Textblock *o;
 
         o = (Evas_Object_Textblock *)(obj->object_data);
-        _evas_textblock_text_node_changed(o, obj, NULL);
+        _evas_textblock_changed(o, obj);
+        _evas_textblock_invalidate_all(o);
      }
 
    _style_replace(ts, text);
@@ -4059,11 +4384,6 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text)
      }
 }
 
-/**
- * Return the text of the style ts.
- * @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)
 {
@@ -4072,12 +4392,6 @@ evas_textblock_style_get(const Evas_Textblock_Style *ts)
 }
 
 /* textblock styles */
-/**
- * Set the objects style to ts.
- * @param obj the evas object to set the style to.
- * @param ts  the style to set.
- * @return Returns no value.
- */
 EAPI void
 evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts)
 {
@@ -4104,14 +4418,10 @@ evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts)
      }
    o->style = ts;
 
-    _evas_textblock_text_node_changed(o, obj, NULL);
+   _evas_textblock_changed(o, obj);
+   _evas_textblock_invalidate_all(o);
 }
 
-/**
- * Return the style of an object.
- * @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)
 {
@@ -4119,12 +4429,6 @@ evas_object_textblock_style_get(const Evas_Object *obj)
    return o->style;
 }
 
-/**
- * @brief Set the "replacement character" to use for the given textblock object.
- *
- * @param obj The given textblock object.
- * @param ch The charset name.
- */
 EAPI void
 evas_object_textblock_replace_char_set(Evas_Object *obj, const char *ch)
 {
@@ -4132,17 +4436,10 @@ evas_object_textblock_replace_char_set(Evas_Object *obj, const char *ch)
    if (o->repch) eina_stringshare_del(o->repch);
    if (ch) o->repch = eina_stringshare_add(ch);
    else o->repch = NULL;
-   _evas_textblock_text_node_changed(o, obj, NULL);
+   _evas_textblock_changed(o, obj);
+   _evas_textblock_invalidate_all(o);
 }
 
-/**
- * @brief Sets newline mode. When true, newline character will behave
- * as a paragraph separator.
- *
- * @param obj The given textblock object.
- * @param mode EINA_TRUE for PS mode, EINA_FALSE otherwise.
- * @since 1.1.0
- */
 EAPI void
 evas_object_textblock_newline_mode_set(Evas_Object *obj, Eina_Bool mode)
 {
@@ -4155,14 +4452,6 @@ evas_object_textblock_newline_mode_set(Evas_Object *obj, Eina_Bool mode)
     * for new text inserted. */
 }
 
-/**
- * @brief Gets newline mode. When true, newline character behaves
- * as a paragraph separator.
- *
- * @param obj The given textblock object.
- * @return EINA_TRUE if in PS mode, EINA_FALSE otherwise.
- * @since 1.1.0
- */
 EAPI Eina_Bool
 evas_object_textblock_newline_mode_get(const Evas_Object *obj)
 {
@@ -4170,18 +4459,6 @@ evas_object_textblock_newline_mode_get(const Evas_Object *obj)
    return o->newline_is_ps;
 }
 
-/**
- * @brief Sets the vertical alignment of text within the textblock object
- * as a whole.
- *
- * Normally alignment is 0.0 (top of object). Values given should be
- * between 0.0 and 1.0 (1.0 bottom of object, 0.5 being vertically centered
- * etc.).
- *
- * @param obj The given textblock object.
- * @param align A value between 0.0 and 1.0
- * @since 1.1.0
- */
 EAPI void
 evas_object_textblock_valign_set(Evas_Object *obj, double align)
 {
@@ -4190,16 +4467,9 @@ evas_object_textblock_valign_set(Evas_Object *obj, double align)
    else if (align > 1.0) align = 1.0;
    if (o->valign == align) return;
    o->valign = align;
-    _evas_textblock_text_node_changed(o, obj, NULL);
+   _evas_textblock_changed(o, obj);
 }
 
-/**
- * @brief Gets the vertical alignment of a textblock
- *
- * @param obj The given textblock object.
- * @return The elignment set for the object
- * @since 1.1.0
- */
 EAPI double
 evas_object_textblock_valign_get(const Evas_Object *obj)
 {
@@ -4207,13 +4477,20 @@ evas_object_textblock_valign_get(const Evas_Object *obj)
    return o->valign;
 }
 
-/**
- * @brief Get the "replacement character" for given textblock object. Returns
- * NULL if no replacement character is in use.
- *
- * @param obj The given textblock object
- * @return replacement character or NULL
- */
+EAPI void
+evas_object_textblock_bidi_delimiters_set(Evas_Object *obj, const char *delim)
+{
+   TB_HEAD();
+   eina_stringshare_replace(&o->bidi_delimiters, delim);
+}
+
+EAPI const char *
+evas_object_textblock_bidi_delimiters_get(const Evas_Object *obj)
+{
+   TB_HEAD_RETURN(NULL);
+   return o->bidi_delimiters;
+}
+
 EAPI const char *
 evas_object_textblock_replace_char_get(Evas_Object *obj)
 {
@@ -4313,26 +4590,59 @@ _escaped_char_match(const char *s, int *adv)
 static inline const char *
 _escaped_char_get(const char *s, const char *s_end)
 {
-   const char *map_itr, *map_end;
+   /* Handle numeric escape codes. */
+   if (s[1] == '#')
+     {
+        static char utf8_escape[7]; /* Support up to 6 bytes utf8 */
+        char ustr[10];
+        Eina_Unicode uchar[2] = { 0, 0 };
+        char *utf8_char;
+        size_t len = 0;
+        int base = 10;
+        s += 2; /* Skip "&#" */
 
-   map_itr = escape_strings;
-   map_end = map_itr + sizeof(escape_strings);
+        if (tolower(*s) == 'x')
+          {
+             s++;
+             base = 16;
+          }
 
-   while (map_itr < map_end)
+        len = s_end - s;
+        if (len >= sizeof(ustr) + 1)
+           len = sizeof(ustr);
+
+        memcpy(ustr, s, len);
+        ustr[len] = '\0';
+        uchar[0] = strtol(ustr, NULL, base);
+
+        if (uchar[0] == 0)
+          return NULL;
+
+        utf8_char = eina_unicode_unicode_to_utf8(uchar, NULL);
+        strcpy(utf8_escape, utf8_char);
+        free(utf8_char);
+
+        return utf8_escape;
+     }
+   else
      {
-        if (_escaped_is_eq_and_advance(s, s_end, &map_itr, map_end))
-          return map_itr;
-        if (map_itr < map_end)
-          _escaped_advance_after_end_of_string(&map_itr);
+        const char *map_itr, *map_end;
+
+        map_itr = escape_strings;
+        map_end = map_itr + sizeof(escape_strings);
+
+        while (map_itr < map_end)
+          {
+             if (_escaped_is_eq_and_advance(s, s_end, &map_itr, map_end))
+                return map_itr;
+             if (map_itr < map_end)
+                _escaped_advance_after_end_of_string(&map_itr);
+          }
      }
+
    return NULL;
 }
 
-/**
- * Returns the unescaped version of escape.
- * @param escape the string to be escaped
- * @return the unescaped version of escape
- */
 EAPI const char *
 evas_textblock_escape_string_get(const char *escape)
 {
@@ -4340,25 +4650,12 @@ evas_textblock_escape_string_get(const char *escape)
    return _escaped_char_get(escape, escape + strlen(escape));
 }
 
-/**
- * Return the unescaped version of the string between start and end.
- *
- * @param escape_start the start of the string.
- * @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)
 {
    return _escaped_char_get(escape_start, escape_end);
 }
 
-/**
- * Returns the escaped version of the string.
- * @param string to escape
- * @param len_ret the len of the new escape
- * @return the escaped string.
- */
 EAPI const char *
 evas_textblock_string_escape_get(const char *string, int *len_ret)
 {
@@ -4405,15 +4702,6 @@ _prepend_escaped_char(Evas_Textblock_Cursor *cur, const char *s,
 }
 
 
-/**
- * Sets the tetxblock's text to the markup text.
- *
- * @note assumes text does not include the unicode object replacement char (0xFFFC)
- *
- * @param obj  the textblock object.
- * @param text the markup text to use.
- * @return Return no value.
- */
 EAPI void
 evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text)
 {
@@ -4446,15 +4734,6 @@ evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text)
      }
 }
 
-/**
- * Prepends markup to the cursor cur.
- *
- * @note assumes text does not include the unicode object replacement char (0xFFFC)
- *
- * @param cur  the cursor to prepend to.
- * @param text the markup text to prepend.
- * @return Return no value.
- */
 EAPI void
 evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char *text)
 {
@@ -4499,7 +4778,7 @@ evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char
                             match = _style_match_tag(o->style, ttag, ttag_len, &replace_len);
                             if (match)
                               {
-                                 evas_textblock_cursor_format_prepend(o->cursor, match);
+                                 evas_textblock_cursor_format_prepend(cur, match);
                               }
                             else
                               {
@@ -4518,7 +4797,7 @@ evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char
                                            strcpy(ttag2, "+ ");
                                            strcat(ttag2, ttag);
                                         }
-                                      evas_textblock_cursor_format_prepend(o->cursor, ttag2);
+                                      evas_textblock_cursor_format_prepend(cur, ttag2);
                                       free(ttag2);
                                    }
                               }
@@ -4528,12 +4807,12 @@ evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char
                     }
                   else if (esc_end)
                     {
-                       _prepend_escaped_char(o->cursor, esc_start, esc_end);
+                       _prepend_escaped_char(cur, esc_start, esc_end);
                        esc_start = esc_end = NULL;
                     }
                   else if (*p == 0)
                     {
-                       _prepend_text_run(o, s, p);
+                       _prepend_text_run(cur, s, p);
                        s = NULL;
                     }
                   if (*p == 0)
@@ -4547,7 +4826,7 @@ evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char
                         * the start of the tag */
                        tag_start = p;
                        tag_end = NULL;
-                       _prepend_text_run(o, s, p);
+                       _prepend_text_run(cur, s, p);
                        s = NULL;
                     }
                }
@@ -4567,7 +4846,7 @@ evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char
                         * the start of the escape sequence */
                        esc_start = p;
                        esc_end = NULL;
-                       _prepend_text_run(o, s, p);
+                       _prepend_text_run(cur, s, p);
                        s = NULL;
                     }
                }
@@ -4585,7 +4864,7 @@ evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char
                   /*FIXME: currently just remove them, maybe do something
                    * fancier in the future, atm it breaks if this char
                    * is inside <> */
-                  _prepend_text_run(o, s, p);
+                  _prepend_text_run(cur, s, p);
                   p += 2; /* it's also advanced later in this loop need +3
                            * in total*/
                   s = p + 1; /* One after the end of the replacement char */
@@ -4593,7 +4872,7 @@ evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char
              p++;
           }
      }
-   _evas_textblock_text_node_changed(o, obj, o->cursor->node);
+   _evas_textblock_changed(o, obj);
 }
 
 
@@ -4613,8 +4892,8 @@ _markup_get_format_append(Evas_Object_Textblock *o, Eina_Strbuf *txt, Evas_Objec
    const char *tag;
    const char *replace;
 
-   replace_len = eina_strbuf_length_get(fnode->format);
-   replace = eina_strbuf_string_get(fnode->format);
+   replace_len = strlen(fnode->format);
+   replace = fnode->format;
    tag = _style_match_replace(o->style, replace, replace_len, &tag_len);
    eina_strbuf_append_char(txt, '<');
    if (tag)
@@ -4628,7 +4907,7 @@ _markup_get_format_append(Evas_Object_Textblock *o, Eina_Strbuf *txt, Evas_Objec
         int pop = 0;
 
         // FIXME: need to escape
-        s = eina_strbuf_string_get(fnode->format);
+        s = fnode->format;
         if (*s == '+') push = 1;
         if (*s == '-') pop = 1;
         while ((*s == ' ') || (*s == '+') || (*s == '-')) s++;
@@ -4669,12 +4948,6 @@ _markup_get_text_append(Eina_Strbuf *txt, const Eina_Unicode *text)
      }
    free(base);
 }
-/**
- * Return the markup of the object.
- *
- * @param obj the evas object.
- * @return the markup text of the object.
- */
 EAPI const char *
 evas_object_textblock_text_markup_get(const Evas_Object *obj)
 {
@@ -4784,11 +5057,14 @@ _evas_textblock_nodes_merge(Evas_Object_Textblock *o, Evas_Object_Textblock_Node
      {
         to->format_node = from->format_node;
      }
-#ifdef BIDI_SUPPORT
-   evas_bidi_paragraph_props_unref(to->bidi_props);
-   to->bidi_props = evas_bidi_paragraph_props_get(
-         eina_ustrbuf_string_get(to->unicode));
-#endif
+
+   /* When it comes to how we handle it, merging is like removing both nodes
+    * and creating a new one, se we need to do the needed cleanups. */
+   if (to->par)
+      to->par->text_node = NULL;
+   to->par = NULL;
+
+   to->new = EINA_TRUE;
 
    _evas_textblock_cursors_set_node(o, from, to);
    _evas_textblock_node_text_remove(o, from);
@@ -4996,12 +5272,6 @@ _find_layout_item_match(const Evas_Textblock_Cursor *cur, Evas_Object_Textblock_
    return previous_format;
 }
 
-/**
- * Return the object's main cursor.
- *
- * @param obj the object.
- * @return the obj's main cursor.
- */
 EAPI const Evas_Textblock_Cursor *
 evas_object_textblock_cursor_get(const Evas_Object *obj)
 {
@@ -5009,16 +5279,6 @@ evas_object_textblock_cursor_get(const Evas_Object *obj)
    return o->cursor;
 }
 
-/**
- * Create a new cursor, associate it to the obj and init it to point
- * to the start of the textblock. Association to the object means the cursor
- * will be updated when the object will change.
- *
- * @note if you need speed and you know what you are doing, it's slightly faster to just allocate the cursor yourself and not associate it. (only people developing the actual object, and not users of the object).
- *
- * @param obj the object to associate to.
- * @return the new cursor.
- */
 EAPI Evas_Textblock_Cursor *
 evas_object_textblock_cursor_new(Evas_Object *obj)
 {
@@ -5034,13 +5294,6 @@ evas_object_textblock_cursor_new(Evas_Object *obj)
    return cur;
 }
 
-/**
- * Free the cursor and unassociate it from the object.
- * @note do not use it to free unassociated cursors.
- *
- * @param cur the cursor to free.
- * @return Returns no value.
- */
 EAPI void
 evas_textblock_cursor_free(Evas_Textblock_Cursor *cur)
 {
@@ -5053,12 +5306,6 @@ evas_textblock_cursor_free(Evas_Textblock_Cursor *cur)
    free(cur);
 }
 
-/**
- * Returns true if the cursor points to a format.
- *
- * @param cur the cursor to check.
- * @return Returns #EINA_TRUE if a cursor points to a format #EINA_FALSE otherwise.
- */
 EAPI Eina_Bool
 evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur)
 {
@@ -5068,24 +5315,25 @@ evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur)
       EINA_TRUE : EINA_FALSE;
 }
 
-/**
- * Returns the first format node.
- *
- * @param obj The evas, must not be NULL.
- * @return Returns the first format node, may be null if there are none.
- */
+EAPI const Eina_List *
+evas_textblock_node_format_list_get(const Evas_Object *obj, const char *anchor)
+{
+   TB_HEAD_RETURN(NULL);
+   if (!strcmp(anchor, "a"))
+      return o->anchors_a;
+   else if (!strcmp(anchor, "item"))
+      return o->anchors_item;
+
+   return NULL;
+}
+
 EAPI const Evas_Object_Textblock_Node_Format *
 evas_textblock_node_format_first_get(const Evas_Object *obj)
 {
    TB_HEAD_RETURN(NULL);
    return o->format_nodes;
 }
-/**
- * Returns the last format node.
- *
- * @param obj The evas textblock, must not be NULL.
- * @return Returns the first format node, may be null if there are none.
- */
+
 EAPI const Evas_Object_Textblock_Node_Format *
 evas_textblock_node_format_last_get(const Evas_Object *obj)
 {
@@ -5097,43 +5345,23 @@ evas_textblock_node_format_last_get(const Evas_Object *obj)
    return NULL;
 }
 
-/**
- * Returns the next format node (after n)
- *
- * @param n the current format node - not null.
- * @return Returns the next format node, may be null.
- */
 EAPI const Evas_Object_Textblock_Node_Format *
 evas_textblock_node_format_next_get(const Evas_Object_Textblock_Node_Format *n)
 {
    return _NODE_FORMAT(EINA_INLIST_GET(n)->next);
 }
 
-/**
- * Returns the prev format node (after n)
- *
- * @param n the current format node - not null.
- * @return Returns the prev format node, may be null.
- */
 EAPI const Evas_Object_Textblock_Node_Format *
 evas_textblock_node_format_prev_get(const Evas_Object_Textblock_Node_Format *n)
 {
    return _NODE_FORMAT(EINA_INLIST_GET(n)->prev);
 }
 
-/**
- * Remove a format node and it's match. i.e, removes a <tag> </tag> pair.
- * Assumes the node is the first part of <tag> i.e, this won't work if
- * n is a closing tag.
- *
- * @param obj the evas object of the textblock - not null.
- * @param n the current format node - not null.
- */
 EAPI void
 evas_textblock_node_format_remove_pair(Evas_Object *obj,
       Evas_Object_Textblock_Node_Format *n)
 {
-   Evas_Object_Textblock_Node_Text *tnode;
+   Evas_Object_Textblock_Node_Text *tnode1;
    Evas_Object_Textblock_Node_Format *fmt, *pnode;
    int level;
    TB_HEAD();
@@ -5142,12 +5370,11 @@ evas_textblock_node_format_remove_pair(Evas_Object *obj,
 
    pnode = NULL;
    fmt = n;
-   tnode = fmt->text_node;
    level = 0;
 
    do
      {
-        const char *fstr = eina_strbuf_string_get(fmt->format);
+        const char *fstr = fmt->format;
 
         if (fstr && (*fstr == '+'))
           {
@@ -5165,34 +5392,45 @@ evas_textblock_node_format_remove_pair(Evas_Object *obj,
 
    if (n->visible)
      {
-        size_t index = _evas_textblock_node_format_pos_get(n);
-        const char *format = eina_strbuf_string_get(n->format);
+        size_t ind = _evas_textblock_node_format_pos_get(n);
+        const char *format = n->format;
         Evas_Textblock_Cursor cur;
         cur.obj = obj;
 
-        eina_ustrbuf_remove(n->text_node->unicode, index, index + 1);
+        eina_ustrbuf_remove(n->text_node->unicode, ind, ind + 1);
         if (format && _IS_PARAGRAPH_SEPARATOR(o, format))
           {
              evas_textblock_cursor_set_at_format(&cur, n);
              _evas_textblock_cursor_nodes_merge(&cur);
           }
-        _evas_textblock_cursors_update_offset(&cur, n->text_node, index, -1);
+        _evas_textblock_cursors_update_offset(&cur, n->text_node, ind, -1);
      }
+   tnode1 = n->text_node;
    _evas_textblock_node_format_remove(o, n, 0);
    if (pnode && (pnode != n))
      {
+        Evas_Object_Textblock_Node_Text *tnode2;
+        tnode2 = pnode->text_node;
         /* pnode can never be visible! (it's the closing format) */
         _evas_textblock_node_format_remove(o, pnode, 0);
+
+        /* FIXME: Should be unified in the layout, for example, added to a list
+         * that checks this kind of removals. But until then, this is very fast
+         * and works. */
+        /* Mark all the text nodes in between the removed formats as dirty. */
+        while (tnode1)
+          {
+             tnode1->dirty = EINA_TRUE;
+             if (tnode1 == tnode2)
+                break;
+             tnode1 =
+                _NODE_TEXT(EINA_INLIST_GET(tnode1)->next);
+          }
      }
-   _evas_textblock_text_node_changed(o, obj, tnode);
+
+   _evas_textblock_changed(o, obj);
 }
 
-/**
- * Sets the cursor to the start of the first text node.
- *
- * @param cur the cursor to update.
- * @return Returns no value.
- */
 EAPI void
 evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur)
 {
@@ -5204,12 +5442,6 @@ evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur)
 
 }
 
-/**
- * sets the cursor to the end of the last text node.
- *
- * @param cur the cursor to set.
- * @return Returns no value.
- */
 EAPI void
 evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur)
 {
@@ -5235,12 +5467,6 @@ evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur)
      }
 }
 
-/**
- * Advances to the the start of the next text node
- *
- * @param cur the cursor to update
- * @return #EINA_TRUE if it managed to advance a paragraph, #EINA_FALSE otherwise.
- */
 EAPI Eina_Bool
 evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *cur)
 {
@@ -5263,12 +5489,6 @@ evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *cur)
    return EINA_FALSE;
 }
 
-/**
- * Advances to the the end of the previous text node
- *
- * @param cur the cursor to update
- * @return #EINA_TRUE if it managed to advance a paragraph, #EINA_FALSE otherwise.
- */
 EAPI Eina_Bool
 evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *cur)
 {
@@ -5295,12 +5515,6 @@ evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *cur)
    return EINA_FALSE;
 }
 
-/**
- * Sets the cursor to point to the place where format points to.
- *
- * @param cur the cursor to update.
- * @param n the format node to update according.
- */
 EAPI void
 evas_textblock_cursor_set_at_format(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *n)
 {
@@ -5309,12 +5523,6 @@ evas_textblock_cursor_set_at_format(Evas_Textblock_Cursor *cur, const Evas_Objec
    cur->pos = _evas_textblock_node_format_pos_get(n);
 }
 
-/**
- * Advances to the next format node
- *
- * @param cur the cursor to be updated.
- * @return #EINA_TRUE on success #EINA_FALSE otherwise.
- */
 EAPI Eina_Bool
 evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur)
 {
@@ -5352,12 +5560,6 @@ evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur)
    return EINA_FALSE;
 }
 
-/**
- * Advances to the previous format node.
- *
- * @param cur the cursor to update.
- * @return #EINA_TRUE on success #EINA_FALSE otherwise.
- */
 EAPI Eina_Bool
 evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur)
 {
@@ -5394,29 +5596,23 @@ evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur)
    return EINA_FALSE;
 }
 
-/**
- * Advances 1 char forward.
- *
- * @param cur the cursor to advance.
- * @return #EINA_TRUE on success #EINA_FALSE otherwise.
- */
 EAPI Eina_Bool
 evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur)
 {
-   int index;
+   int ind;
    const Eina_Unicode *text;
 
    if (!cur) return EINA_FALSE;
    if (!cur->node) return EINA_FALSE;
 
-   index = cur->pos;
+   ind = cur->pos;
    text = eina_ustrbuf_string_get(cur->node->unicode);
-   GET_NEXT(text, index);
+   if (text[ind]) ind++;
    /* Only allow pointing a null if it's the last paragraph.
     * because we don't have a PS there. */
-   if (text[index])
+   if (text[ind])
      {
-        cur->pos = index;
+        cur->pos = ind;
         return EINA_TRUE;
      }
    else
@@ -5425,10 +5621,10 @@ evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur)
           {
              /* If we already were at the end, that means we don't have
               * where to go next we should return FALSE */
-             if (cur->pos == (size_t) index)
+             if (cur->pos == (size_t) ind)
                return EINA_FALSE;
 
-             cur->pos = index;
+             cur->pos = ind;
              return EINA_TRUE;
           }
         else
@@ -5438,12 +5634,6 @@ evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur)
      }
 }
 
-/**
- * Advances 1 char backward.
- *
- * @param cur the cursor to advance.
- * @return #EINA_TRUE on success #EINA_FALSE otherwise.
- */
 EAPI Eina_Bool
 evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *cur)
 {
@@ -5458,12 +5648,6 @@ evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *cur)
    return evas_textblock_cursor_paragraph_prev(cur);
 }
 
-/**
- * Go to the first char in the node the cursor is pointing on.
- *
- * @param cur the cursor to update.
- * @return Returns no value.
- */
 EAPI void
 evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur)
 {
@@ -5472,33 +5656,21 @@ evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur)
 
 }
 
-/**
- * Go to the last char in a text node.
- *
- * @param cur the cursor to update.
- * @return Returns no value.
- */
 EAPI void
 evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur)
 {
-   int index;
+   int ind;
 
    if (!cur) return;
    if (!cur->node) return;
-   index = eina_ustrbuf_length_get(cur->node->unicode) - 1;
-   if (index >= 0)
-      cur->pos = index;
+   ind = eina_ustrbuf_length_get(cur->node->unicode) - 1;
+   if (ind >= 0)
+      cur->pos = ind;
    else
       cur->pos = 0;
 
 }
 
-/**
- * Go to the start of the current line
- *
- * @param cur the cursor to update.
- * @return Returns no value.
- */
 EAPI void
 evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur)
 {
@@ -5533,12 +5705,6 @@ evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur)
      }
 }
 
-/**
- * Go to the end of the current line.
- *
- * @param cur the cursor to update.
- * @return Returns no value.
- */
 EAPI void
 evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur)
 {
@@ -5568,15 +5734,15 @@ evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur)
      }
    if (it)
      {
-        size_t index;
+        size_t ind;
 
        cur->node = it->text_node;
        cur->pos = it->text_pos;
         if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
           {
-             index = _ITEM_TEXT(it)->text_props.text_len - 1;
-             GET_NEXT(_ITEM_TEXT(it)->text, index);
-             cur->pos += index;
+             ind = _ITEM_TEXT(it)->text_props.text_len - 1;
+             if (!IS_AT_END(_ITEM_TEXT(it), ind)) ind++;
+             cur->pos += ind;
           }
         else if (!EINA_INLIST_GET(ln)->next && !EINA_INLIST_GET(ln->par)->next)
           {
@@ -5587,40 +5753,53 @@ evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur)
 
 /**
  * @internal
- * checks if a format (as a string) is visible.
+ * checks if a format (as a string) is visible/changes format and sets the
+ * fnode properties accordingly.
  *
- * @param the string.
- * @return #EINA_TRUE if it represents a visible format #EINA_FALSE otherwise.
+ * @param fnode the format node
+ * @param s the string.
  */
-static Eina_Bool
-_evas_textblock_format_is_visible(const char *s)
+static void
+_evas_textblock_format_is_visible(Evas_Object_Textblock_Node_Format *fnode,
+      const char *s)
 {
    const char *item;
    Eina_Bool is_opener = EINA_TRUE;
 
-   if (!s) return EINA_FALSE;
+   fnode->visible = fnode->format_change = EINA_FALSE;
+   fnode->anchor = ANCHOR_NONE;
+   if (!s) return;
 
    if (s[0] == '+' || s[0] == '-')
      {
-        is_opener = (s[0] == '+') ? EINA_TRUE : EINA_FALSE;
+        is_opener = (s[0] == '+');
         s++;
+        fnode->format_change = EINA_TRUE;
      }
+
    while ((item = _format_parse(&s)))
      {
-        char *tmp;
-        tmp = alloca(s - item + 1);
-        strncpy(tmp, item, s - item);
-        tmp[s - item] = '\0';
+        int itlen = s - item;
         /* We care about all of the formats even after a - except for
          * item which we don't care after a - because it's just a standard
          * closing */
-        if (((!strcmp(item, "\n")) || (!strcmp(item, "\\n"))) ||
-              ((!strcmp(item, "\t")) || (!strcmp(item, "\\t"))) ||
-              (!strcmp(item, "ps")) ||
-              (!strncmp(item, "item", 4) && is_opener)) /*FIXME: formats like item2 will break it. */
-          return EINA_TRUE;
+        if ((!strncmp(item, "\n", itlen) || !strncmp(item, "\\n", itlen)) ||
+              (!strncmp(item, "\t", itlen) || !strncmp(item, "\\t", itlen)) ||
+              !strncmp(item, "ps", itlen) ||
+              (!strncmp(item, "item", itlen) && is_opener))
+          {
+             fnode->visible = EINA_TRUE;
+          }
+
+        if (is_opener && !strncmp(item, "a", itlen))
+          {
+             fnode->anchor = ANCHOR_A;
+          }
+        else if (is_opener && !strncmp(item, "item", itlen))
+          {
+             fnode->anchor = ANCHOR_ITEM;
+          }
      }
-   return EINA_FALSE;
 }
 
 /**
@@ -5681,7 +5860,7 @@ _evas_textblock_node_format_remove_matching(Evas_Object_Textblock *o,
    do
      {
         Evas_Object_Textblock_Node_Format *nnode;
-        const char *fstr = eina_strbuf_string_get(fmt->format);
+        const char *fstr = fmt->format;
 
         nnode = _NODE_FORMAT(EINA_INLIST_GET(fmt)->next);
         if (nnode)
@@ -5791,7 +5970,7 @@ _evas_textblock_node_format_remove(Evas_Object_Textblock *o, Evas_Object_Textblo
 
    o->format_nodes = _NODE_FORMAT(eina_inlist_remove(
            EINA_INLIST_GET(o->format_nodes), EINA_INLIST_GET(n)));
-   _evas_textblock_node_format_free(n);
+   _evas_textblock_node_format_free(o, n);
 }
 
 /**
@@ -5898,8 +6077,7 @@ _evas_textblock_node_text_adjust_offsets_to_start(Evas_Object_Textblock *o,
         if (!itr || (itr && (itr->text_node != n)))
           {
              /* Remove the PS, and return since it's the end of the node */
-             if (_IS_PARAGRAPH_SEPARATOR(o,
-                      eina_strbuf_string_get(last_node->format)))
+             if (_IS_PARAGRAPH_SEPARATOR(o, last_node->format))
                {
                   _evas_textblock_node_format_remove(o, last_node, 0);
                   return EINA_TRUE;
@@ -6047,12 +6225,6 @@ _evas_textblock_node_format_pos_get(const Evas_Object_Textblock_Node_Format *fmt
    return position + fmt->offset;
 }
 
-/**
- * Return the current cursor pos.
- *
- * @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)
 {
@@ -6071,12 +6243,6 @@ evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur)
    return npos + cur->pos;
 }
 
-/**
- * Set the cursor pos.
- *
- * @param cur the cursor to be set.
- * @param pos the pos to set.
- */
 EAPI void
 evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int _pos)
 {
@@ -6123,13 +6289,6 @@ evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int _pos)
 
 }
 
-/**
- * Go to the start of the line passed
- *
- * @param cur cursor to update.
- * @param line numer to set.
- * @return #EINA_TRUE on success, #EINA_FALSE on error.
- */
 EAPI Eina_Bool
 evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line)
 {
@@ -6158,13 +6317,6 @@ evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line)
    return EINA_TRUE;
 }
 
-/**
- * Compare two cursors.
- *
- * @param cur1 the first cursor.
- * @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)
 {
@@ -6193,14 +6345,6 @@ evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Text
    return 0;
 }
 
-/**
- * Make cur_dest point to the same place as cur. Does not work if they don't
- * point to the same object.
- *
- * @param cur the source cursor.
- * @param cur_dest destination cursor.
- * @return Returns no value.
- */
 EAPI void
 evas_textblock_cursor_copy(const Evas_Textblock_Cursor *cur, Evas_Textblock_Cursor *cur_dest)
 {
@@ -6229,10 +6373,8 @@ _evas_textblock_node_text_free(Evas_Object_Textblock_Node_Text *n)
    eina_ustrbuf_free(n->unicode);
    if (n->utf8)
      free(n->utf8);
-#ifdef BIDI_SUPPORT
-   if (&n->bidi_props)
-     evas_bidi_paragraph_props_unref(n->bidi_props);
-#endif
+   if (n->par)
+      n->par->text_node = NULL;
    free(n);
 }
 
@@ -6251,10 +6393,7 @@ _evas_textblock_node_text_new(void)
    n->unicode = eina_ustrbuf_new();
    /* We want to layout each paragraph at least once. */
    n->dirty = EINA_TRUE;
-#ifdef BIDI_SUPPORT
-   n->bidi_props = evas_bidi_paragraph_props_new();
-   n->bidi_props->direction = EVAS_BIDI_PARAGRAPH_NATURAL;
-#endif
+   n->new = EINA_TRUE;
 
    return n;
 }
@@ -6313,23 +6452,17 @@ _evas_textblock_cursor_break_paragraph(Evas_Textblock_Cursor *cur,
 
         /* cur->pos now points to the PS, move after. */
         start = cur->pos + 1;
-        text = eina_ustrbuf_string_get(cur->node->unicode);
         len = eina_ustrbuf_length_get(cur->node->unicode) - start;
-        eina_ustrbuf_append_length(n->unicode, text + start, len);
-        eina_ustrbuf_remove(cur->node->unicode, start, start + len);
-#ifdef BIDI_SUPPORT
-   evas_bidi_paragraph_props_unref(n->bidi_props);
-   n->bidi_props = evas_bidi_paragraph_props_get(
-         eina_ustrbuf_string_get(n->unicode));
-
-   evas_bidi_paragraph_props_unref(cur->node->bidi_props);
-   cur->node->bidi_props = evas_bidi_paragraph_props_get(
-         eina_ustrbuf_string_get(cur->node->unicode));
-#endif
+        if (len > 0)
+          {
+             text = eina_ustrbuf_string_get(cur->node->unicode);
+             eina_ustrbuf_append_length(n->unicode, text + start, len);
+             eina_ustrbuf_remove(cur->node->unicode, start, start + len);
+             cur->node->dirty = EINA_TRUE;
+          }
      }
    else
      {
-        Evas_Object_Textblock_Node_Format *fnode;
         fnode = o->format_nodes;
         if (fnode)
           {
@@ -6426,28 +6559,14 @@ _evas_textblock_cursors_update_offset(const Evas_Textblock_Cursor *cur,
 
 /**
  * @internal
- * Mark and notifiy that the textblock, and specifically a node has changed.
+ * Mark that the textblock has changed.
  *
  * @param o the textblock object.
  * @param obj the evas object.
- * @param n the paragraph that changed - NULL means all.
  */
 static void
-_evas_textblock_text_node_changed(Evas_Object_Textblock *o, Evas_Object *obj,
-      Evas_Object_Textblock_Node_Text *n)
+_evas_textblock_changed(Evas_Object_Textblock *o, Evas_Object *obj)
 {
-   if (!n)
-     {
-        Evas_Object_Textblock_Node_Text *itr;
-        EINA_INLIST_FOREACH(EINA_INLIST_GET(o->text_nodes), itr)
-          {
-             itr->dirty = EINA_TRUE;
-          }
-     }
-   else
-     {
-        n->dirty = EINA_TRUE;
-     }
    o->formatted.valid = 0;
    o->native.valid = 0;
    o->content_changed = 1;
@@ -6460,15 +6579,17 @@ _evas_textblock_text_node_changed(Evas_Object_Textblock *o, Evas_Object *obj,
    evas_object_change(obj);
 }
 
-/**
- * Adds text to the current cursor position and set the cursor to *before*
- * the start of the text just added.
- *
- * @param cur the cursor to where to add text at.
- * @param _text the text to add.
- * @return Returns the len of the text added.
- * @see evas_textblock_cursor_text_prepend()
- */
+static void
+_evas_textblock_invalidate_all(Evas_Object_Textblock *o)
+{
+   Evas_Object_Textblock_Node_Text *n;
+
+   EINA_INLIST_FOREACH(o->text_nodes, n)
+     {
+        n->dirty = EINA_TRUE;
+     }
+}
+
 EAPI int
 evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *_text)
 {
@@ -6526,24 +6647,16 @@ evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *_text)
    /* Advance the formats */
    if (fnode && (fnode->text_node == cur->node))
      fnode->offset += len;
-#ifdef BIDI_SUPPORT
-   evas_bidi_paragraph_props_unref(n->bidi_props);
-   n->bidi_props = evas_bidi_paragraph_props_get(eina_ustrbuf_string_get(n->unicode));
-#endif
-   _evas_textblock_text_node_changed(o, cur->obj, n);
+
+   _evas_textblock_changed(o, cur->obj);
+   n->dirty = EINA_TRUE;
    free(text);
+
+   if (!o->cursor->node)
+      o->cursor->node = o->text_nodes;
    return len;
 }
 
-/**
- * Adds text to the current cursor position and set the cursor to *after*
- * the start of the text just added.
- *
- * @param cur the cursor to where to add text at.
- * @param _text the text to add.
- * @return Returns the len of the text added.
- * @see evas_textblock_cursor_text_append()
- */
 EAPI int
 evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *_text)
 {
@@ -6558,13 +6671,19 @@ evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *_text
  * @internal
  * Free a format node
  *
- * @prama n the format node to free
+ * @param o the textblock object
+ * @param n the format node to free
  */
 static void
-_evas_textblock_node_format_free(Evas_Object_Textblock_Node_Format *n)
+_evas_textblock_node_format_free(Evas_Object_Textblock *o,
+      Evas_Object_Textblock_Node_Format *n)
 {
    if (!n) return;
-   eina_strbuf_free(n->format);
+   eina_stringshare_del(n->format);
+   if (n->anchor == ANCHOR_ITEM)
+      o->anchors_item = eina_list_remove(o->anchors_item, n);
+   else if (n->anchor == ANCHOR_A)
+      o->anchors_a = eina_list_remove(o->anchors_a, n);
    free(n);
 }
 
@@ -6573,29 +6692,30 @@ _evas_textblock_node_format_free(Evas_Object_Textblock_Node_Format *n)
  * Create a new format node.
  *
  * @param format the text to create the format node from.
+ * @param o the textblock object.
  * @return Returns the new format node
  */
 static Evas_Object_Textblock_Node_Format *
-_evas_textblock_node_format_new(const char *format)
+_evas_textblock_node_format_new(Evas_Object_Textblock *o, const char *format)
 {
    Evas_Object_Textblock_Node_Format *n;
 
    n = calloc(1, sizeof(Evas_Object_Textblock_Node_Format));
-   n->format = eina_strbuf_new();
-   eina_strbuf_append(n->format, format);
-   n->visible = _evas_textblock_format_is_visible(format);
+   n->format = eina_stringshare_add(format);
+   _evas_textblock_format_is_visible(n, format);
+   if (n->anchor == ANCHOR_A)
+     {
+        o->anchors_a = eina_list_append(o->anchors_a, n);
+     }
+   else if (n->anchor == ANCHOR_ITEM)
+     {
+        o->anchors_item = eina_list_append(o->anchors_item, n);
+     }
+   n->new = EINA_TRUE;
 
    return n;
 }
 
-/**
- * Check if the current cursor position points to the terminating null of the
- * last paragraph. (shouldn't be allowed to point to the terminating null of
- * any previous paragraph anyway.
- *
- * @param cur the cursor to look at.
- * @return #EINA_TRUE if the cursor points to the terminating null, #EINA_FALSE otherwise.
- */
 static Eina_Bool
 _evas_textblock_cursor_is_at_the_end(const Evas_Textblock_Cursor *cur)
 {
@@ -6608,20 +6728,6 @@ _evas_textblock_cursor_is_at_the_end(const Evas_Textblock_Cursor *cur)
               EINA_TRUE : EINA_FALSE;
 }
 
-/**
- * Adds format to the current cursor position. If the format being added is a
- * visible format, add it *before* the cursor position, otherwise, add it after.
- * This behavior is because visible formats are like characters and invisible
- * should be stacked in a way that the last one is added last.
- *
- * This function works with native formats, that means that style defined
- * tags like <br> won't work here. For those kind of things use markup prepend.
- *
- * @param cur the cursor to where to add format at.
- * @param format the format to add.
- * @return Returns true if a visible format was added, false otherwise.
- * @see evas_textblock_cursor_format_prepend()
- */
 EAPI Eina_Bool
 evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *format)
 {
@@ -6638,7 +6744,7 @@ evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *form
         evas_textblock_cursor_text_prepend(cur, "");
      }
 
-   n = _evas_textblock_node_format_new(format);
+   n = _evas_textblock_node_format_new(o, format);
    is_visible = n->visible;
    if (!cur->node)
      {
@@ -6716,8 +6822,19 @@ evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *form
      }
    if (is_visible && cur->node)
      {
-        eina_ustrbuf_insert_char(cur->node->unicode,
-              EVAS_TEXTBLOCK_REPLACEMENT_CHAR, cur->pos);
+        Eina_Unicode insert_char;
+        /* Insert a visual representation according to the type of the
+           format */
+        if (_IS_PARAGRAPH_SEPARATOR(o, format))
+           insert_char = _PARAGRAPH_SEPARATOR;
+        else if (_IS_LINE_SEPARATOR(format))
+           insert_char = '\n';
+        else if (_IS_TAB(format))
+           insert_char = '\t';
+        else
+           insert_char = EVAS_TEXTBLOCK_REPLACEMENT_CHAR;
+
+        eina_ustrbuf_insert_char(cur->node->unicode, insert_char, cur->pos);
 
         /* Advance all the cursors after our cursor */
         _evas_textblock_cursors_update_offset(cur, cur->node, cur->pos, 1);
@@ -6727,34 +6844,23 @@ evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *form
           }
         else
           {
-#ifdef BIDI_SUPPORT
-             evas_bidi_paragraph_props_unref(cur->node->bidi_props);
-             cur->node->bidi_props = evas_bidi_paragraph_props_get(
-                   eina_ustrbuf_string_get(cur->node->unicode));
-#endif
+             /* Handle visible format nodes here */
+             cur->node->dirty = EINA_TRUE;
+             n->new = EINA_FALSE;
           }
      }
+   else
+     {
+        o->format_changed = EINA_TRUE;
+     }
 
-   _evas_textblock_text_node_changed(o, cur->obj, cur->node);
+   _evas_textblock_changed(o, cur->obj);
 
+   if (!o->cursor->node)
+      o->cursor->node = o->text_nodes;
    return is_visible;
 }
 
-/**
- * Adds format to the current cursor position. If the format being added is a
- * visible format, add it *before* the cursor position, otherwise, add it after.
- * This behavior is because visible formats are like characters and invisible
- * should be stacked in a way that the last one is added last.
- * If the format is visible the cursor is advanced after it.
- *
- * This function works with native formats, that means that style defined
- * tags like <br> won't work here. For those kind of things use markup prepend.
- *
- * @param cur the cursor to where to add format at.
- * @param format the format to add.
- * @return Returns true if a visible format was added, false otherwise.
- * @see evas_textblock_cursor_format_prepend()
- */
 EAPI Eina_Bool
 evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *format)
 {
@@ -6771,13 +6877,6 @@ evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *for
 }
 
 
-/**
- * Delete the character at the location of the cursor. If there's a format
- * pointing to this position, delete it as well.
- *
- * @param cur the cursor pointing to the current location.
- * @return Returns no value.
- */
 EAPI void
 evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur)
 {
@@ -6785,15 +6884,19 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur)
    Evas_Object_Textblock_Node_Text *n, *n2;
    int merge_nodes = 0;
    const Eina_Unicode *text;
-   int chr, index, ppos;
+   int chr, ind, ppos;
 
    if (!cur || !cur->node) return;
    o = (Evas_Object_Textblock *)(cur->obj->object_data);
    n = cur->node;
 
    text = eina_ustrbuf_string_get(n->unicode);
-   index = cur->pos;
-   chr = GET_NEXT(text, index);
+   ind = cur->pos;
+   if (text[ind])
+      chr = text[ind++];
+   else
+      chr = 0;
+
    if (chr == 0) return;
    ppos = cur->pos;
    /* Remove a format node if needed, and remove the char only if the
@@ -6807,7 +6910,7 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur)
              Evas_Object_Textblock_Node_Format *last_fmt;
              /* If there's a PS it must be the last become it delimits paragraphs */
              last_fmt = _evas_textblock_node_format_last_at_off(fmt);
-             format = eina_strbuf_string_get(last_fmt->format);
+             format = last_fmt->format;
              if (format && _IS_PARAGRAPH_SEPARATOR(o, format))
                {
                   merge_nodes = 1;
@@ -6822,21 +6925,17 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur)
         fmt2 = _evas_textblock_cursor_node_format_before_or_at_pos_get(cur);
         fmt2 = _evas_textblock_node_format_last_at_off(fmt2);
         _evas_textblock_node_format_adjust_offset(o, cur->node, fmt2,
-              -(index - cur->pos));
+              -(ind - cur->pos));
 
         _evas_textblock_node_format_remove_matching(o, fmt);
      }
-   eina_ustrbuf_remove(n->unicode, cur->pos, index);
+   eina_ustrbuf_remove(n->unicode, cur->pos, ind);
    /* If it was a paragraph separator, we should merge the current with the
     * next, there must be a next. */
    if (merge_nodes)
      {
         _evas_textblock_cursor_nodes_merge(cur);
      }
-#ifdef BIDI_SUPPORT
-   evas_bidi_paragraph_props_unref(n->bidi_props);
-   n->bidi_props = evas_bidi_paragraph_props_get(eina_ustrbuf_string_get(n->unicode));
-#endif
 
    if (cur->pos == eina_ustrbuf_length_get(n->unicode))
      {
@@ -6848,22 +6947,16 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur)
          }
      }
 
-   _evas_textblock_cursors_update_offset(cur, n, ppos, -(index - ppos));
-   _evas_textblock_text_node_changed(o, cur->obj, cur->node);
+   _evas_textblock_cursors_update_offset(cur, n, ppos, -(ind - ppos));
+   _evas_textblock_changed(o, cur->obj);
+   cur->node->dirty = EINA_TRUE;
 }
 
-/**
- * Delete the range between cur1 and cur2.
- *
- * @param cur1 one side of the range.
- * @param cur2 the second side of the range
- * @return Returns no value.
- */
 EAPI void
 evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_Cursor *cur2)
 {
    Evas_Object_Textblock *o;
-   Evas_Object_Textblock_Node_Text *n1, *n2, *n;
+   Evas_Object_Textblock_Node_Text *n1, *n2;
    Eina_Bool should_merge = EINA_FALSE, reset_cursor = EINA_FALSE;
 
    if (!cur1 || !cur1->node) return;
@@ -6904,6 +6997,7 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
      }
    else
      {
+        Evas_Object_Textblock_Node_Text *n;
         int len;
         _evas_textblock_node_text_adjust_offsets_to_start(o, n1, cur1->pos, -1);
         n = _NODE_TEXT(EINA_INLIST_GET(n1)->next);
@@ -6940,26 +7034,15 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
         _evas_textblock_nodes_merge(o, n1);
      }
 
-#ifdef BIDI_SUPPORT
-   evas_bidi_paragraph_props_unref(n1->bidi_props);
-   n1->bidi_props = evas_bidi_paragraph_props_get(
-         eina_ustrbuf_string_get(n1->unicode));
-#endif
-
    evas_textblock_cursor_copy(cur1, cur2);
    if (reset_cursor)
      evas_textblock_cursor_copy(cur1, o->cursor);
 
-   _evas_textblock_text_node_changed(o, cur1->obj, cur1->node);
+   _evas_textblock_changed(o, cur1->obj);
+   n1->dirty = n2->dirty = EINA_TRUE;
 }
 
 
-/**
- * Return the content of the cursor.
- *
- * @param cur the cursor
- * @return the text in the range
- */
 EAPI char *
 evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur)
 {
@@ -6973,7 +7056,7 @@ evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur)
         tmp  = evas_textblock_node_format_text_get(
               _evas_textblock_node_visible_at_pos_get(
                  evas_textblock_cursor_format_get(cur)));
-        return strdup(tmp);
+        return (tmp) ? strdup(tmp) : NULL;
      }
 
    ustr = eina_ustrbuf_string_get(cur->node->unicode);
@@ -6984,17 +7067,6 @@ evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur)
    return s;
 }
 
-/**
- * Return the text in the range between cur1 and cur2
- *
- * FIXME: format is currently unused, you always get markup back.
- *
- * @param cur1 one side of the range.
- * @param cur2 the other side of the range
- * @param format to be documented
- * @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 __UNUSED__)
 {
@@ -7117,12 +7189,6 @@ evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Ev
      }
 }
 
-/**
- * Return the text of the paragraph cur points to - returns the text in markup..
- *
- * @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)
 {
@@ -7143,12 +7209,6 @@ evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur)
    return cur->node->utf8;
 }
 
-/**
- * Return the length of the paragraph, cheaper the eina_unicode_strlen()
- *
- * @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)
 {
@@ -7157,13 +7217,6 @@ evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur
    return eina_ustrbuf_length_get(cur->node->unicode);
 }
 
-/**
- * Return the format node at the position pointed by cur.
- *
- * @param cur the position to look at.
- * @return the format node if found, NULL otherwise.
- * @see evas_textblock_cursor_format_is_visible_get()
- */
 EAPI const Evas_Object_Textblock_Node_Format *
 evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur)
 {
@@ -7171,25 +7224,13 @@ evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur)
    if (!cur->node) return NULL;
    return _evas_textblock_cursor_node_format_at_pos_get(cur);
 }
-/**
- * Get the text format representation of the format node.
- *
- * @param fmt the format node.
- * @return the textual format of the format node.
- */
 EAPI const char *
 evas_textblock_node_format_text_get(const Evas_Object_Textblock_Node_Format *fmt)
 {
    if (!fmt) return NULL;
-   return eina_strbuf_string_get(fmt->format);
+   return fmt->format;
 }
 
-/**
- * Set the cursor to point to the position of fmt.
- *
- * @param cur the cursor to update
- * @param fmt the format to update according to.
- */
 EAPI void
 evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *fmt)
 {
@@ -7198,15 +7239,6 @@ evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Objec
    cur->pos = _evas_textblock_node_format_pos_get(fmt);
 }
 
-/**
- * Check if the current cursor position is a visible format. This way is more
- * efficient than evas_textblock_cursor_format_get() to check for the existence
- * of a visible format.
- *
- * @param cur the cursor to look at.
- * @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)
 {
@@ -7215,38 +7247,18 @@ evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur)
    if (!cur) return EINA_FALSE;
    if (!cur->node) return EINA_FALSE;
    text = eina_ustrbuf_string_get(cur->node->unicode);
-   return (text[cur->pos] == EVAS_TEXTBLOCK_REPLACEMENT_CHAR) ?
-              EINA_TRUE : EINA_FALSE;
+   return EVAS_TEXTBLOCK_IS_VISIBLE_FORMAT_CHAR(text[cur->pos]);
 }
 
-/**
- * Returns the geometry of the cursor. Depends on the type of cursor requested.
- * This should be used instead of char_geometry_get because there are weird
- * special cases with BiDi text.
- * in '_' cursor mode (i.e a line below the char) it's the same as char_geometry
- * get, except for the case of the last char of a line which depends on the
- * paragraph direction.
- *
- * in '|' cursor mode (i.e a line between two chars) it is very varyable.
- * For example consider the following visual string:
- * "abcCBA" (ABC are rtl chars), a cursor pointing on A should actually draw
- * a '|' between the c and the C.
- *
- * @param cur the cursor.
- * @param cx the x of the cursor
- * @param cy the y of the cursor
- * @param cw the width of the cursor
- * @param ch the height of the cursor
- * @param dir the direction of the cursor, can be NULL.
- * @param ctype the type of the cursor.
- * @return line number of the char on success, -1 on error.
- */
 EAPI int
 evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_BiDi_Direction *dir, Evas_Textblock_Cursor_Type ctype)
 {
    int ret = -1;
    const Evas_Textblock_Cursor *dir_cur;
    Evas_Textblock_Cursor cur2;
+   Evas_Object_Textblock *o;
+   o = (Evas_Object_Textblock *)(cur->obj->object_data);
+   if (!o->formatted.valid) _relayout(cur->obj);
 
    dir_cur = cur;
    if (ctype == EVAS_TEXTBLOCK_CURSOR_UNDER)
@@ -7272,8 +7284,7 @@ evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord
 
              fmt = _evas_textblock_cursor_node_format_at_pos_get(&cur2);
 
-             if (!fmt ||
-                   !_IS_LINE_SEPARATOR(eina_strbuf_string_get(fmt->format)))
+             if (!fmt || !_IS_LINE_SEPARATOR(fmt->format))
                {
                   dir_cur = &cur2;
                   before_char = EINA_FALSE;
@@ -7288,13 +7299,24 @@ evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord
              /* Adjust if the char is an rtl char */
              if (ret >= 0)
                {
-                  if ((!before_char &&
-                           evas_bidi_is_rtl_char(dir_cur->node->bidi_props, 0,
-                              dir_cur->pos)) ||
-                        (before_char &&
-                         !evas_bidi_is_rtl_char(dir_cur->node->bidi_props, 0,
-                            dir_cur->pos)))
+                  Eina_Bool is_rtl = EINA_FALSE;
+                  if (dir_cur->node->par->is_bidi)
+                    {
+                       Evas_Object_Textblock_Line *ln;
+                       Evas_Object_Textblock_Item *it;
+                       _find_layout_item_match(dir_cur, &ln, &it);
+                       if ((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) &&
+                             (_ITEM_TEXT(it)->text_props.bidi.dir ==
+                              EVAS_BIDI_DIRECTION_RTL))
+                          is_rtl = EINA_TRUE;
+                       else if ((it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) &&
+                             (_ITEM_FORMAT(it)->bidi_dir ==
+                              EVAS_BIDI_DIRECTION_RTL))
+                          is_rtl = EINA_TRUE;
+                    }
 
+                  if ((!before_char && is_rtl) ||
+                        (before_char && !is_rtl))
                     {
                        /* Just don't advance the width */
                        w = 0;
@@ -7307,9 +7329,24 @@ evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord
              ret = evas_textblock_cursor_pen_geometry_get(
                    dir_cur, &x, &y, &w, &h);
 #ifdef BIDI_SUPPORT
+             Eina_Bool is_rtl = EINA_FALSE;
+             if (dir_cur->node->par->is_bidi)
+               {
+                  Evas_Object_Textblock_Line *ln;
+                  Evas_Object_Textblock_Item *it;
+                  _find_layout_item_match(dir_cur, &ln, &it);
+                  if ((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) &&
+                        (_ITEM_TEXT(it)->text_props.bidi.dir ==
+                         EVAS_BIDI_DIRECTION_RTL))
+                     is_rtl = EINA_TRUE;
+                  else if ((it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) &&
+                        (_ITEM_FORMAT(it)->bidi_dir ==
+                         EVAS_BIDI_DIRECTION_RTL))
+                     is_rtl = EINA_TRUE;
+               }
+
              /* Adjust if the char is an rtl char */
-             if ((ret >= 0) && (!evas_bidi_is_rtl_char(
-                         dir_cur->node->bidi_props, 0, dir_cur->pos)))
+             if ((ret >= 0) && (!is_rtl))
                {
                   /* Just don't advance the width */
                   w = 0;
@@ -7333,16 +7370,30 @@ evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord
    if (dir && dir_cur && dir_cur->node)
      {
 #ifdef BIDI_SUPPORT
+        Eina_Bool is_rtl = EINA_FALSE;
+        if (dir_cur->node->par->is_bidi)
+          {
+             Evas_Object_Textblock_Line *ln;
+             Evas_Object_Textblock_Item *it;
+             _find_layout_item_match(dir_cur, &ln, &it);
+             if ((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) &&
+                   (_ITEM_TEXT(it)->text_props.bidi.dir ==
+                    EVAS_BIDI_DIRECTION_RTL))
+                is_rtl = EINA_TRUE;
+             else if ((it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) &&
+                   (_ITEM_FORMAT(it)->bidi_dir ==
+                    EVAS_BIDI_DIRECTION_RTL))
+                is_rtl = EINA_TRUE;
+          }
+
         if (_evas_textblock_cursor_is_at_the_end(dir_cur) && (dir_cur->pos > 0))
           {
-             *dir = (evas_bidi_is_rtl_char(dir_cur->node->bidi_props, 0,
-                      dir_cur->pos - 1)) ?
+             *dir = (is_rtl) ?
                 EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR;
           }
         else if (dir_cur->pos > 0)
           {
-             *dir = (evas_bidi_is_rtl_char(dir_cur->node->bidi_props, 0,
-                      dir_cur->pos)) ?
+             *dir = (is_rtl) ?
                 EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR;
           }
         else
@@ -7368,7 +7419,7 @@ evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord
  * @return line number of the char on success, -1 on error.
  */
 static int
-_evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *data, void *font, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch), const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
+_evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch), const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
 {
    Evas_Object_Textblock *o;
    Evas_Object_Textblock_Line *ln = NULL;
@@ -7381,6 +7432,8 @@ _evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *dat
 
    if (!cur) return -1;
    o = (Evas_Object_Textblock *)(cur->obj->object_data);
+   if (!o->formatted.valid) _relayout(cur->obj);
+
    if (!cur->node)
      {
         if (!o->text_nodes)
@@ -7388,7 +7441,7 @@ _evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *dat
              if (!o->paragraphs) return -1;
              ln = o->paragraphs->lines;
              if (!ln) return -1;
-             if (cx) *cx = ln->par->x + ln->x;
+             if (cx) *cx = ln->x;
              if (cy) *cy = ln->par->y + ln->y;
              if (cw) *cw = ln->w;
              if (ch) *ch = ln->h;
@@ -7397,7 +7450,6 @@ _evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *dat
         else
           return -1;
      }
-   if (!o->formatted.valid) _relayout(cur->obj);
 
    previous_format = _find_layout_item_match(cur, &ln, &it);
    if (!it)
@@ -7423,16 +7475,16 @@ _evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *dat
           {
              ret = query_func(cur->ENDT,
                    ti->parent.format->font.font,
-                   ti->text, &ti->text_props,
+                   &ti->text_props,
                    pos,
                    &x, &y, &w, &h);
           }
 
-        x += ln->par->x + ln->x + _ITEM(ti)->x;
+        x += ln->x + _ITEM(ti)->x;
 
-        if (x < ln->par->x + ln->x)
+        if (x < ln->x)
           {
-             x = ln->par->x + ln->x;
+             x = ln->x;
           }
        y = ln->par->y + ln->y;
        h = ln->h;
@@ -7441,8 +7493,7 @@ _evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *dat
      {
         if (previous_format)
           {
-             if (_IS_LINE_SEPARATOR(
-                      eina_strbuf_string_get(fi->source_node->format)))
+             if (_IS_LINE_SEPARATOR(fi->item))
                {
                   x = 0;
                   y = ln->par->y + ln->y + ln->h;
@@ -7450,15 +7501,14 @@ _evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *dat
              else
                {
 #ifdef BIDI_SUPPORT
-                  if (EVAS_BIDI_PARAGRAPH_DIRECTION_IS_RTL(
-                           fi->parent.text_node->bidi_props))
+                  if (ln->par->direction == EVAS_BIDI_DIRECTION_RTL)
                     {
-                       x = ln->par->x + ln->x;
+                       x = ln->x;
                     }
                   else
 #endif
                     {
-                       x = ln->par->x + ln->x + ln->w;
+                       x = ln->x + ln->w;
                     }
                   y = ln->par->y + ln->y;
                }
@@ -7467,7 +7517,7 @@ _evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *dat
           }
         else
           {
-             x = ln->par->x + ln->x + _ITEM(fi)->x;
+             x = ln->x + _ITEM(fi)->x;
              y = ln->par->y + ln->y;
              w = _ITEM(fi)->w;
              h = ln->h;
@@ -7484,16 +7534,6 @@ _evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *dat
    return ln->par->line_no + ln->line_no;
 }
 
-/**
- * Returns the geometry of the char at cur.
- *
- * @param cur the position of the char.
- * @param cx the x of the char.
- * @param cy the y of the char.
- * @param cw the w of the char.
- * @param ch the h of the char.
- * @return line number of the char on success, -1 on error.
- */
 EAPI int
 evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
 {
@@ -7501,16 +7541,6 @@ evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_C
          cur->ENFN->font_char_coords_get, cur, cx, cy, cw, ch);
 }
 
-/**
- * Returns the geometry of the pen at cur.
- *
- * @param cur the position of the char.
- * @param cpen_x the pen_x of the char.
- * @param cy the y of the char.
- * @param cadv the adv of the char.
- * @param ch the h of the char.
- * @return line number of the char on success, -1 on error.
- */
 EAPI int
 evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
 {
@@ -7518,16 +7548,6 @@ evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Co
          cur->ENFN->font_pen_coords_get, cur, cx, cy, cw, ch);
 }
 
-/**
- * Returns the geometry of the line at cur.
- *
- * @param cur the position of the line.
- * @param cx the x of the line.
- * @param cy the y of the line.
- * @param cw the width of the line.
- * @param ch the height of the line.
- * @return line number of the line on success, -1 on error.
- */
 EAPI int
 evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
 {
@@ -7548,7 +7568,7 @@ evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_C
         _find_layout_item_match(cur, &ln, &it);
      }
    if (!ln) return -1;
-   x = ln->par->x + ln->x;
+   x = ln->x;
    y = ln->par->y + ln->y;
    w = ln->w;
    h = ln->h;
@@ -7559,19 +7579,11 @@ evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_C
    return ln->par->line_no + ln->line_no;
 }
 
-/**
- * Set the position of the cursor according to the X and Y coordinates.
- *
- * @param cur the cursor to set.
- * @param x coord to set by.
- * @param y coord to set by.
- * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
- */
 EAPI Eina_Bool
 evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y)
 {
    Evas_Object_Textblock *o;
-   Evas_Object_Textblock_Paragraph *par, *found_par = NULL;
+   Evas_Object_Textblock_Paragraph *found_par;
    Evas_Object_Textblock_Line *ln;
    Evas_Object_Textblock_Item *it = NULL, *it_break = NULL;
 
@@ -7580,17 +7592,11 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
    if (!o->formatted.valid) _relayout(cur->obj);
    x += o->style_pad.l;
    y += o->style_pad.t;
-   EINA_INLIST_FOREACH(o->paragraphs, par)
-     {
-        if ((par->x <= x) && (par->x + par->w > x) &&
-              (par->y <= y) && (par->y + par->h > y))
-          {
-             found_par = par;
-             break;
-          }
-     }
+
+   found_par = _layout_find_paragraph_by_y(o, y);
    if (found_par)
      {
+        _layout_paragraph_render(o, found_par);
         EINA_INLIST_FOREACH(found_par->lines, ln)
           {
              if (ln->par->y + ln->y > y) break;
@@ -7598,12 +7604,12 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
                {
                   EINA_INLIST_FOREACH(ln->items, it)
                     {
-                       if ((it->x + ln->par->x + ln->x) > x)
+                       if ((it->x + ln->x) > x)
                          {
                             it_break = it;
                             break;
                          }
-                       if (((it->x + ln->par->x + ln->x) <= x) && (((it->x + ln->par->x + ln->x) + it->adv) > x))
+                       if (((it->x + ln->x) <= x) && (((it->x + ln->x) + it->adv) > x))
                          {
                             if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
                               {
@@ -7617,8 +7623,8 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
                                    pos = cur->ENFN->font_char_at_coords_get(
                                          cur->ENDT,
                                          ti->parent.format->font.font,
-                                         ti->text, &ti->text_props,
-                                         x - it->x - ln->par->x - ln->x, 0,
+                                         &ti->text_props,
+                                         x - it->x - ln->x, 0,
                                          &cx, &cy, &cw, &ch);
                                  if (pos < 0)
                                    return EINA_FALSE;
@@ -7631,7 +7637,7 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
                                  Evas_Object_Textblock_Format_Item *fi;
                                  fi = _ITEM_FORMAT(it);
                                  cur->pos = fi->parent.text_pos;
-                                 cur->node = fi->source_node->text_node;
+                                 cur->node = found_par->text_node;
                                  return EINA_TRUE;
                               }
                          }
@@ -7658,18 +7664,11 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
    return EINA_FALSE;
 }
 
-/**
- * Set the cursor position according to the y coord.
- *
- * @param cur the cur to be set.
- * @param y the coord to set by.
- * @return the line number found, -1 on error.
- */
 EAPI int
 evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y)
 {
    Evas_Object_Textblock *o;
-   Evas_Object_Textblock_Paragraph *par, *found_par = NULL;
+   Evas_Object_Textblock_Paragraph *found_par;
    Evas_Object_Textblock_Line *ln;
 
    if (!cur) return -1;
@@ -7677,17 +7676,11 @@ evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y)
    if (!o->formatted.valid) _relayout(cur->obj);
    y += o->style_pad.t;
 
-   EINA_INLIST_FOREACH(o->paragraphs, par)
-     {
-        if ((par->y <= y) && (par->y + par->h > y))
-          {
-             found_par = par;
-             break;
-          }
-     }
+   found_par = _layout_find_paragraph_by_y(o, y);
 
    if (found_par)
      {
+        _layout_paragraph_render(o, found_par);
         EINA_INLIST_FOREACH(found_par->lines, ln)
           {
              if (ln->par->y + ln->y > y) break;
@@ -7838,7 +7831,7 @@ _evas_textblock_cursor_range_in_line_geometry_get(
         ti = _ITEM_TEXT(it1);
         ret = cur->ENFN->font_pen_coords_get(cur->ENDT,
               ti->parent.format->font.font,
-              ti->text, &ti->text_props,
+              &ti->text_props,
               start,
               &x1, &y, &w1, &h);
         if (!ret)
@@ -7847,7 +7840,7 @@ _evas_textblock_cursor_range_in_line_geometry_get(
           }
         ret = cur->ENFN->font_pen_coords_get(cur->ENDT,
               ti->parent.format->font.font,
-              ti->text, &ti->text_props,
+              &ti->text_props,
               end,
               &x2, &y, &w2, &h);
         if (!ret)
@@ -7884,7 +7877,7 @@ _evas_textblock_cursor_range_in_line_geometry_get(
           {
              tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
              rects = eina_list_append(rects, tr);
-             tr->x = ln->par->x + ln->x + it1->x + x;
+             tr->x = ln->x + it1->x + x;
              tr->y = ln->par->y + ln->y;
              tr->h = ln->h;
              tr->w = w;
@@ -7907,7 +7900,7 @@ _evas_textblock_cursor_range_in_line_geometry_get(
 
              ret = cur->ENFN->font_pen_coords_get(cur->ENDT,
                    ti->parent.format->font.font,
-                   ti->text, &ti->text_props,
+                   &ti->text_props,
                    start,
                    &x, &y, &w, &h);
              if (!ret)
@@ -7932,7 +7925,7 @@ _evas_textblock_cursor_range_in_line_geometry_get(
           {
              tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
              rects = eina_list_append(rects, tr);
-             tr->x = ln->par->x + ln->x + it1->x + x;
+             tr->x = ln->x + it1->x + x;
              tr->y = ln->par->y + ln->y;
              tr->h = ln->h;
              tr->w = w;
@@ -7947,7 +7940,7 @@ _evas_textblock_cursor_range_in_line_geometry_get(
           {
              tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
              rects = eina_list_append(rects, tr);
-             tr->x = ln->par->x + ln->x + min_x;
+             tr->x = ln->x + min_x;
              tr->y = ln->par->y + ln->y;
              tr->h = ln->h;
              tr->w = max_x - min_x;
@@ -7961,7 +7954,7 @@ _evas_textblock_cursor_range_in_line_geometry_get(
 
              ret = cur->ENFN->font_pen_coords_get(cur->ENDT,
                    ti->parent.format->font.font,
-                   ti->text, &ti->text_props,
+                   &ti->text_props,
                    end,
                    &x, &y, &w, &h);
              if (!ret)
@@ -7986,7 +7979,7 @@ _evas_textblock_cursor_range_in_line_geometry_get(
           {
              tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
              rects = eina_list_append(rects, tr);
-             tr->x = ln->par->x + ln->x + it2->x + x;
+             tr->x = ln->x + it2->x + x;
              tr->y = ln->par->y + ln->y;
              tr->h = ln->h;
              tr->w = w;
@@ -7994,13 +7987,6 @@ _evas_textblock_cursor_range_in_line_geometry_get(
      }
    return rects;
 }
-/**
- * Get the geometry of a range.
- *
- * @param cur1 one side of the range.
- * @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)
 {
@@ -8055,7 +8041,7 @@ evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, cons
           {
             tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
             rects = eina_list_append(rects, tr);
-            tr->x = lni->par->x + lni->x;
+            tr->x = lni->x;
             tr->y = lni->par->y + lni->y;
             tr->h = lni->h;
             tr->w = lni->w;
@@ -8074,15 +8060,6 @@ evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, cons
    return rects;
 }
 
-/**
- * to be documented.
- * @param cur to be documented.
- * @param cx to be documented.
- * @param cy to be documented.
- * @param cw to be documented.
- * @param ch to be documented.
- * @return to be documented.
- */
 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)
 {
@@ -8099,7 +8076,7 @@ evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur,
    _find_layout_item_line_match(cur->obj, cur->node, cur->pos, &ln, &it);
    fi = _ITEM_FORMAT(it);
    if ((!ln) || (!fi)) return EINA_FALSE;
-   x = ln->par->x + ln->x + fi->parent.x;
+   x = ln->x + fi->parent.x;
    y = ln->par->y + ln->y + ln->baseline + fi->y;
    w = fi->parent.w;
    h = fi->parent.h;
@@ -8110,12 +8087,6 @@ evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur,
    return EINA_TRUE;
 }
 
-/**
- * Checks if the cursor points to the end of the line.
- *
- * @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)
 {
@@ -8133,17 +8104,6 @@ evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur)
 }
 
 /* general controls */
-/**
- * Get the geometry of a line number.
- *
- * @param obj the object.
- * @param line the line number.
- * @param cx x coord of the line.
- * @param cy y coord of the line.
- * @param cw w coord of the line.
- * @param ch h coord of the line.
- * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
- */
 EAPI Eina_Bool
 evas_object_textblock_line_number_geometry_get(const Evas_Object *obj, int line, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
 {
@@ -8152,20 +8112,13 @@ evas_object_textblock_line_number_geometry_get(const Evas_Object *obj, int line,
    TB_HEAD_RETURN(0);
    ln = _find_layout_line_num(obj, line);
    if (!ln) return EINA_FALSE;
-   if (cx) *cx = ln->par->x + ln->x;
+   if (cx) *cx = ln->x;
    if (cy) *cy = ln->par->y + ln->y;
    if (cw) *cw = ln->w;
    if (ch) *ch = ln->h;
    return EINA_TRUE;
 }
 
-/**
- * Clear the textblock object.
- * @note Does *NOT* free the evas object itself.
- *
- * @param obj the object to clear.
- * @return nothing.
- */
 EAPI void
 evas_object_textblock_clear(Evas_Object *obj)
 {
@@ -8173,6 +8126,12 @@ evas_object_textblock_clear(Evas_Object *obj)
    Evas_Textblock_Cursor *cur;
 
    TB_HEAD();
+   if (o->paragraphs)
+     {
+       _paragraphs_free(obj, o->paragraphs);
+       o->paragraphs = NULL;
+     }
+
    _nodes_clear(obj);
    o->cursor->node = NULL;
    o->cursor->pos = 0;
@@ -8182,35 +8141,9 @@ evas_object_textblock_clear(Evas_Object *obj)
        cur->pos = 0;
 
      }
-   if (o->paragraphs)
-     {
-       _paragraphs_free(obj, o->paragraphs);
-       o->paragraphs = NULL;
-     }
-   _evas_textblock_text_node_changed(o, obj, NULL);
+   _evas_textblock_changed(o, obj);
 }
 
-/**
- * Get the formatted width and height. This calculates the actual size after restricting
- * the textblock to the current size of the object.
- * The main difference between this and @ref evas_object_textblock_size_native_get
- * is that the "native" function does not wrapping into account
- * it just calculates the real width of the object if it was placed on an
- * infinite canvas, while this function gives the size after wrapping
- * according to the size restrictions of the object.
- *
- * For example for a textblock containing the text: "You shall not pass!"
- * with no margins or padding and assuming a monospace font and a size of
- * 7x10 char widths (for simplicity) has a native size of 19x1
- * and a formatted size of 5x4.
- *
- *
- * @param obj the evas object.
- * @param w[out] the width of the object.
- * @param h[out] the height of the object
- * @return Returns no value.
- * @see evas_object_textblock_size_native_get
- */
 EAPI void
 evas_object_textblock_size_formatted_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
 {
@@ -8220,51 +8153,100 @@ evas_object_textblock_size_formatted_get(const Evas_Object *obj, Evas_Coord *w,
    if (h) *h = o->formatted.h;
 }
 
-/**
- * Get the native width and height. This calculates the actual size without taking account
- * the current size of the object.
- * The main difference between this and @ref evas_object_textblock_size_formatted_get
- * is that the "native" function does not take wrapping into account
- * it just calculates the real width of the object if it was placed on an
- * infinite canvas, while the "formatted" function gives the size after
- * wrapping text according to the size restrictions of the object.
- *
- * For example for a textblock containing the text: "You shall not pass!"
- * with no margins or padding and assuming a monospace font and a size of
- * 7x10 char widths (for simplicity) has a native size of 19x1
- * and a formatted size of 5x4.
- *
- * @param obj the evas object of the textblock
- * @param w[out] the width returned
- * @param h[out] the height returned
- * @return Returns no value.
- */
+/* FIXME: doc */
+static void
+_size_native_calc_paragraph_size(const Evas_Object *obj,
+      const Evas_Object_Textblock *o,
+      const Evas_Object_Textblock_Paragraph *par,
+      Evas_Coord *_w, Evas_Coord *_h)
+{
+   Eina_List *i;
+   Evas_Object_Textblock_Item *it;
+   Evas_Coord x = 0, y = 0, wmax = 0, h = 0, ascent = 0, descent = 0;
+
+   EINA_LIST_FOREACH(par->logical_items, i, it)
+     {
+        if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT)
+          {
+             Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it);
+             if (fi->item && (_IS_LINE_SEPARATOR(fi->item) ||
+                      _IS_PARAGRAPH_SEPARATOR(o, fi->item)))
+               {
+                  /* If there are no text items yet, calc ascent/descent
+                   * according to the current format. */
+                  if (ascent + descent == 0)
+                     _layout_format_ascent_descent_adjust(obj, &ascent,
+                           &descent, it->format);
+
+                  if (ascent + descent > h)
+                     h = ascent + descent;
+                  if (x + it->adv > wmax)
+                     wmax = x + it->adv;
+                  y += h;
+                  x = h = 0;
+                  ascent = descent = 0;
+               }
+             else
+               {
+                  Evas_Coord fw, fh, fy;
+
+                  _layout_calculate_format_item_size(obj, fi, &ascent,
+                        &descent, &fy, &fw, &fh);
+
+                  if (fh > h)
+                     h = fh;
+                  x += fw;
+               }
+          }
+        else
+          {
+             _layout_format_ascent_descent_adjust(obj, &ascent,
+                   &descent, it->format);
+             x += it->adv;
+          }
+     }
+
+   /* Do the last addition */
+   if (ascent + descent > h)
+      h = ascent + descent;
+   if (x > wmax)
+      wmax = x;
+
+   *_h = y + h;
+   *_w = wmax;
+}
+
 EAPI void
 evas_object_textblock_size_native_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
 {
    TB_HEAD();
    if (!o->native.valid)
      {
-       _layout(obj,
-               1,
-               -1, -1,
-               &o->native.w, &o->native.h);
+        Evas_Coord wmax = 0, hmax = 0;
+        Evas_Object_Textblock_Paragraph *par;
+        /* We just want the layout objects to update, should probably
+         * split that. */
+        if (!o->formatted.valid) _relayout(obj);
+        EINA_INLIST_FOREACH(o->paragraphs, par)
+          {
+             Evas_Coord tw, th;
+             _size_native_calc_paragraph_size(obj, o, par, &tw, &th);
+             if (tw > wmax)
+                wmax = tw;
+             hmax += th;
+          }
+
+        o->native.w = wmax;
+        o->native.h = hmax;
+
        o->native.valid = 1;
         o->content_changed = 0;
+        o->format_changed = EINA_FALSE;
      }
    if (w) *w = o->native.w;
    if (h) *h = o->native.h;
 }
 
-/**
- * to be documented.
- * @param obj to be documented.
- * @param l to be documented.
- * @param r to be documented.
- * @param t to be documented.
- * @param b to be documented.
- * @return Returns no value.
- */
 EAPI void
 evas_object_textblock_style_insets_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b)
 {
@@ -8281,6 +8263,14 @@ static void
 evas_object_textblock_init(Evas_Object *obj)
 {
    Evas_Object_Textblock *o;
+#ifdef HAVE_LINEBREAK
+   static Eina_Bool linebreak_init = EINA_FALSE;
+   if (!linebreak_init)
+     {
+        linebreak_init = EINA_TRUE;
+        init_linebreak();
+     }
+#endif
 
    /* alloc image ob, setup methods and default values */
    obj->object_data = evas_object_textblock_new();
@@ -8339,6 +8329,7 @@ evas_object_textblock_free(Evas_Object *obj)
        free(cur);
      }
    if (o->repch) eina_stringshare_del(o->repch);
+   if (o->ellip_ti) _item_free(obj, NULL, _ITEM(o->ellip_ti));
    o->magic = 0;
    EVAS_MEMPOOL_FREE(_mp_obj, o);
   _format_command_shutdown();
@@ -8348,14 +8339,10 @@ evas_object_textblock_free(Evas_Object *obj)
 static void
 evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y)
 {
-   Evas_Object_Textblock_Paragraph *par;
+   Evas_Object_Textblock_Paragraph *par, *start = NULL;
    Evas_Object_Textblock_Line *ln;
    Evas_Object_Textblock *o;
    int i, j;
-   int pbacking = 0, backingx = 0;
-   int punderline = 0, underlinex = 0;
-   int punderline2 = 0, underline2x = 0;
-   int pstrikethrough = 0, strikethroughx = 0;
    unsigned char r = 0, g = 0, b = 0, a = 0;
    unsigned char r2 = 0, g2 = 0, b2 = 0, a2 = 0;
    unsigned char r3 = 0, g3 = 0, b3 = 0, a3 = 0;
@@ -8385,19 +8372,26 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
    if (!o->paragraphs) return;
 
 #define ITEM_WALK() \
-   EINA_INLIST_FOREACH(o->paragraphs, par) \
+   EINA_INLIST_FOREACH(start, par) \
      { \
+        if (!par->visible) continue; \
+        if (clip) \
+          { \
+             if ((obj->cur.geometry.y + y + par->y + par->h) < (cy - 20)) \
+             continue; \
+             if ((obj->cur.geometry.y + y + par->y) > (cy + ch + 20)) \
+             break; \
+          } \
+        _layout_paragraph_render(o, par); \
         EINA_INLIST_FOREACH(par->lines, ln) \
           { \
              Evas_Object_Textblock_Item *itr; \
              \
-             backingx = underlinex = underline2x = strikethroughx = 0; \
-             pbacking = punderline = punderline2 = pstrikethrough = 0; \
              if (clip) \
                { \
-                  if ((obj->cur.geometry.y + y + ln->par->y + ln->y + ln->h) < (cy - 20)) \
+                  if ((obj->cur.geometry.y + y + par->y + ln->y + ln->h) < (cy - 20)) \
                   continue; \
-                  if ((obj->cur.geometry.y + y + ln->par->y + ln->y) > (cy + ch + 20)) \
+                  if ((obj->cur.geometry.y + y + par->y + ln->y) > (cy + ch + 20)) \
                   break; \
                } \
              EINA_INLIST_FOREACH(ln->items, itr) \
@@ -8410,11 +8404,13 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
                      _ITEM_TEXT(itr)->baseline : ln->baseline; \
                   if (clip) \
                     { \
-                       if ((obj->cur.geometry.x + x + ln->par->x + ln->x + itr->x + itr->w) < (cx - 20)) \
+                       if ((obj->cur.geometry.x + x + ln->x + itr->x + itr->w) < (cx - 20)) \
                        continue; \
-                       if ((obj->cur.geometry.x + x + ln->par->x + ln->x + itr->x) > (cx + cw + 20)) \
+                       if ((obj->cur.geometry.x + x + ln->x + itr->x) > (cx + cw + 20)) \
                        break; \
                     } \
+                  if ((ln->x + itr->x + itr->w) <= 0) continue; \
+                  if (ln->x + itr->x > obj->cur.geometry.w) break; \
                   do
 
 #define ITEM_WALK_END() \
@@ -8437,13 +8433,10 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
          (obj->cur.cache.clip.a * ti->parent.format->color.col.a * (amul)) / 65025);
 #define DRAW_TEXT(ox, oy) \
    if (ti->parent.format->font.font) ENFN->font_draw(output, context, surface, ti->parent.format->font.font, \
-         obj->cur.geometry.x + ln->par->x + ln->x + ti->parent.x + x + (ox), \
+         obj->cur.geometry.x + ln->x + ti->parent.x + x + (ox), \
          obj->cur.geometry.y + ln->par->y + ln->y + yoff + y + (oy), \
-         ti->parent.w, ti->parent.h, ti->parent.w, ti->parent.h, ti->text, &ti->text_props);
-#define ITEM_WALK_LINE_SKIP_DROP() \
-   if ((ln->par->y + ln->y + ln->h) <= 0) continue; \
-   if (ln->par->y + ln->y > obj->cur.geometry.h) break
-
+         ti->parent.w, ti->parent.h, ti->parent.w, ti->parent.h, \
+         &ti->text_props);
 
    /* backing */
 #define DRAW_RECT(ox, oy, ow, oh, or, og, ob, oa) \
@@ -8458,7 +8451,7 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
         ENFN->rectangle_draw(output, \
               context, \
               surface, \
-              obj->cur.geometry.x + ln->par->x + ln->x + x + (ox), \
+              obj->cur.geometry.x + ln->x + x + (ox), \
               obj->cur.geometry.y + ln->par->y + ln->y + y + (oy), \
               (ow), \
               (oh)); \
@@ -8468,40 +8461,42 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
 #define DRAW_FORMAT(oname, oy, oh, or, og, ob, oa) \
    do \
      { \
-        if ((p ## oname) && (itr->x > oname ## x)) \
-          { \
-             DRAW_RECT(oname ## x, oy, itr->x - oname ## x, oh, or, og, ob, \
-                   oa); \
-          } \
-        \
         if (itr->format->oname) \
           { \
-             p ## oname = 1; \
              or = itr->format->color.oname.r; \
              og = itr->format->color.oname.g; \
              ob = itr->format->color.oname.b; \
              oa = itr->format->color.oname.a; \
+             if (!EINA_INLIST_GET(itr)->next) \
+               { \
+                  DRAW_RECT(itr->x, oy, itr->w, oh, or, og, ob, oa); \
+               } \
+             else \
+               { \
+                  DRAW_RECT(itr->x, oy, itr->adv, oh, or, og, ob, oa); \
+               } \
           } \
-        else \
-          { \
-             p ## oname = 0; \
-          } \
-        \
-        if (p ## oname && !EINA_INLIST_GET(itr)->next) \
-          { \
-             DRAW_RECT(itr->x, oy, itr->w, oh, or, og, ob, oa); \
-          } \
-        p ## oname = itr->format->oname; \
-        oname ## x = itr->x; \
      } \
    while (0)
 
+     {
+        Evas_Coord look_for_y = 0 - (obj->cur.geometry.y + y);
+        if (clip)
+          {
+             Evas_Coord tmp_lfy = cy - (obj->cur.geometry.y + y);
+             if (tmp_lfy > look_for_y)
+                look_for_y = tmp_lfy;
+          }
+
+        if (look_for_y >= 0)
+           start = _layout_find_paragraph_by_y(o, look_for_y);
+
+        if (!start)
+           start = o->paragraphs;
+     }
 
-   pbacking = punderline = punderline2 = pstrikethrough = 0;
    ITEM_WALK()
      {
-        ITEM_WALK_LINE_SKIP_DROP();
-
         DRAW_FORMAT(backing, 0, ln->h, r, g, b, a);
      }
    ITEM_WALK_END();
@@ -8514,49 +8509,101 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
    /* shadows */
    ITEM_WALK()
      {
+        int shad_dst, shad_sz, dx, dy, haveshad;
         Evas_Object_Textblock_Text_Item *ti;
-        ITEM_WALK_LINE_SKIP_DROP();
         ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL;
         if (!ti) continue;
 
-        if (ti->parent.format->style == EVAS_TEXT_STYLE_SHADOW)
+        shad_dst = shad_sz = dx = dy = haveshad = 0;
+        switch (ti->parent.format->style & EVAS_TEXT_STYLE_MASK_BASIC)
           {
-             COLOR_SET(shadow);
-             DRAW_TEXT(1, 1);
-          }
-        else if ((ti->parent.format->style == EVAS_TEXT_STYLE_OUTLINE_SHADOW) ||
-              (ti->parent.format->style == EVAS_TEXT_STYLE_FAR_SHADOW))
-          {
-             COLOR_SET(shadow);
-             DRAW_TEXT(2, 2);
+           case EVAS_TEXT_STYLE_SHADOW:
+           case EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW:
+             shad_dst = 1;
+             haveshad = 1;
+             break;
+           case EVAS_TEXT_STYLE_OUTLINE_SHADOW:
+           case EVAS_TEXT_STYLE_FAR_SHADOW:
+             shad_dst = 2;
+             haveshad = 1;
+             break;
+           case EVAS_TEXT_STYLE_FAR_SOFT_SHADOW:
+             shad_dst = 2;
+             shad_sz = 2;
+             haveshad = 1;
+             break;
+           case EVAS_TEXT_STYLE_SOFT_SHADOW:
+             shad_dst = 1;
+             shad_sz = 2;
+             haveshad = 1;
+             break;
+           default:
+             break;
           }
-        else if ((ti->parent.format->style == EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW) ||
-              (ti->parent.format->style == EVAS_TEXT_STYLE_FAR_SOFT_SHADOW))
+        if (haveshad)
           {
-             for (j = 0; j < 5; j++)
+             if (shad_dst > 0)
                {
-                  for (i = 0; i < 5; i++)
+                  switch (ti->parent.format->style & EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION)
                     {
-                       if (vals[i][j] != 0)
-                         {
-                            COLOR_SET_AMUL(shadow, vals[i][j] * 50);
-                            DRAW_TEXT(i, j);
-                         }
+                     case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT:
+                       dx = 1;
+                       dy = 1;
+                       break;
+                     case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM:
+                       dx = 0;
+                       dy = 1;
+                       break;
+                     case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT:
+                       dx = -1;
+                       dy = 1;
+                       break;
+                     case EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT:
+                       dx = -1;
+                       dy = 0;
+                       break;
+                     case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT:
+                       dx = -1;
+                       dy = -1;
+                       break;
+                     case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP:
+                       dx = 0;
+                       dy = -1;
+                       break;
+                     case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT:
+                       dx = 1;
+                       dy = -1;
+                       break;
+                     case EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT:
+                       dx = 1;
+                       dy = 0;
+                     default:
+                       break;
                     }
+                  dx *= shad_dst;
+                  dy *= shad_dst;
                }
-          }
-        else if (ti->parent.format->style == EVAS_TEXT_STYLE_SOFT_SHADOW)
-          {
-             for (j = 0; j < 5; j++)
+             switch (shad_sz)
                {
-                  for (i = 0; i < 5; i++)
+                case 0:
+                  COLOR_SET(shadow);
+                  DRAW_TEXT(dx, dy);
+                  break;
+                case 2:
+                  for (j = 0; j < 5; j++)
                     {
-                       if (vals[i][j] != 0)
+                       for (i = 0; i < 5; i++)
                          {
-                            COLOR_SET_AMUL(shadow, vals[i][j] * 50);
-                            DRAW_TEXT(i - 1, j - 1);
+                            if (vals[i][j] != 0)
+                              {
+                                 COLOR_SET_AMUL(shadow, vals[i][j] * 50);
+                                 DRAW_TEXT(i - 2 + dx, j - 2 + dy);
+                              }
                          }
                     }
+                  break;
+                default:
+                  break;
                }
           }
      }
@@ -8566,7 +8613,6 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
    ITEM_WALK()
      {
         Evas_Object_Textblock_Text_Item *ti;
-        ITEM_WALK_LINE_SKIP_DROP();
         ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL;
         if (!ti) continue;
 
@@ -8596,7 +8642,6 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
    ITEM_WALK()
      {
         Evas_Object_Textblock_Text_Item *ti;
-        ITEM_WALK_LINE_SKIP_DROP();
         ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL;
         if (!ti) continue;
 
@@ -8631,7 +8676,6 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
    ITEM_WALK()
      {
         Evas_Object_Textblock_Text_Item *ti;
-        ITEM_WALK_LINE_SKIP_DROP();
         ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL;
         /* NORMAL TEXT */
         if (ti)
@@ -8667,23 +8711,14 @@ evas_object_textblock_render_pre(Evas_Object *obj)
    /* then when this is done the object needs to figure if it changed and */
    /* if so what and where and add the appropriate redraw textblocks */
    o = (Evas_Object_Textblock *)(obj->object_data);
-   if ((o->changed) || (o->content_changed) ||
+   if ((o->changed) || (o->content_changed) || (o->format_changed) ||
        ((obj->cur.geometry.w != o->last_w) ||
            (((o->valign != 0.0) || (o->have_ellipsis)) &&
                (obj->cur.geometry.h != o->last_h))))
      {
-       o->formatted.valid = 0;
-       _layout(obj,
-               0,
-               obj->cur.geometry.w, obj->cur.geometry.h,
-               &o->formatted.w, &o->formatted.h);
-       o->formatted.valid = 1;
-       o->last_w = obj->cur.geometry.w;
-       o->last_h = obj->cur.geometry.h;
+        _relayout(obj);
        o->redraw = 0;
        evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
-       o->changed = 0;
-       o->content_changed = 0;
        is_v = evas_object_is_visible(obj);
        was_v = evas_object_was_visible(obj);
        goto done;
@@ -8692,8 +8727,6 @@ evas_object_textblock_render_pre(Evas_Object *obj)
      {
        o->redraw = 0;
        evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
-       o->changed = 0;
-       o->content_changed = 0;
        is_v = evas_object_is_visible(obj);
        was_v = evas_object_was_visible(obj);
        goto done;
@@ -8750,12 +8783,6 @@ evas_object_textblock_render_pre(Evas_Object *obj)
        evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
        goto done;
      }
-   if (o->changed || o->content_changed)
-     {
-       evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
-       o->changed = 0;
-       o->content_changed = 0;
-     }
    done:
    evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v);
 }
@@ -8868,7 +8895,7 @@ _evas_object_textblock_rehint(Evas_Object *obj)
                        if (ti->parent.format->font.font)
                          {  
 #ifdef EVAS_FRAME_QUEUING
-                            evas_common_pipe_op_text_flush(ti->parent.format->font.font);
+                            evas_common_pipe_op_text_flush((RGBA_Font *) ti->parent.format->font.font);
 #endif
                             evas_font_load_hinting_set(obj->layer->evas,
                                   ti->parent.format->font.font,
@@ -8878,7 +8905,8 @@ _evas_object_textblock_rehint(Evas_Object *obj)
                }
           }
      }
-   _evas_textblock_text_node_changed(o, obj, NULL);
+   _evas_textblock_changed(o, obj);
+   _evas_textblock_invalidate_all(o);
 }
 
 /**
@@ -8926,7 +8954,7 @@ pitem(Evas_Object_Textblock_Item *it)
    if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
      {
         ti = _ITEM_TEXT(it);
-        printf("Text: '%ls'\n", ti->text);
+        printf("Text: '%*ls'\n", ti->text_props.text_len, GET_ITEM_TEXT(ti));
      }
    else
      {
index 217acc5..da6b701 100644 (file)
@@ -11,47 +11,47 @@ evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h
      }
    else
      {
-       int x1[4], y1[4], i, j;
+       int pt_x[4], pt_y[4], i, j;
 
        if (x < xx)
          {
-            x1[0] = x;
-            x1[1] = xx;
+            pt_x[0] = x;
+            pt_x[1] = xx;
          }
        else
          {
-            x1[0] = xx;
-            x1[1] = x;
+            pt_x[0] = xx;
+            pt_x[1] = x;
          }
        if ((x + w) < (xx + ww))
          {
-            x1[2] = x + w;
-            x1[3] = xx + ww;
+            pt_x[2] = x + w;
+            pt_x[3] = xx + ww;
          }
        else
          {
-            x1[2] = xx + ww;
-            x1[3] = x + w;
+            pt_x[2] = xx + ww;
+            pt_x[3] = x + w;
          }
        if (y < yy)
          {
-            y1[0] = y;
-            y1[1] = yy;
+            pt_y[0] = y;
+            pt_y[1] = yy;
          }
        else
          {
-            y1[0] = yy;
-            y1[1] = y;
+            pt_y[0] = yy;
+            pt_y[1] = y;
          }
        if ((y + h) < (yy + hh))
          {
-            y1[2] = y + h;
-            y1[3] = yy + hh;
+            pt_y[2] = y + h;
+            pt_y[3] = yy + hh;
          }
        else
          {
-            y1[2] = yy + hh;
-            y1[3] = y + h;
+            pt_y[2] = yy + hh;
+            pt_y[3] = y + h;
          }
        for (j = 0; j < 3; j++)
          {
@@ -60,10 +60,10 @@ evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h
                  int intsec1, intsec2;
                  int tx, ty, tw, th;
 
-                 tx = x1[i];
-                 ty = y1[j];
-                 tw = x1[i + 1] - x1[i];
-                 th = y1[j + 1] - y1[j];
+                 tx = pt_x[i];
+                 ty = pt_y[j];
+                 tw = pt_x[i + 1] - pt_x[i];
+                 th = pt_y[j + 1] - pt_y[j];
 
                  intsec1 = (RECTS_INTERSECT(tx, ty, tw, th, x, y, w, h));
                  intsec2 = (RECTS_INTERSECT(tx, ty, tw, th, xx, yy, ww, hh));
index be11b0e..874dd4b 100644 (file)
@@ -15,9 +15,9 @@ rend_dbg(const char *txt)
      {
 #ifdef STDOUT_DBG
         dbf = stdout;
-#else           
+#else
         dbf = fopen("EVAS-RENDER-DEBUG.log", "w");
-#endif        
+#endif
         if (!dbf) return;
      }
    fputs(txt, dbf);
@@ -46,20 +46,6 @@ rend_dbg(const char *txt)
 static Eina_List *
 evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char do_draw);
 
-/**
- * Add a damage rectangle.
- *
- * @param e The given canvas pointer.
- * @param x The rectangle's left position.
- * @param y The rectangle's top position.
- * @param w The rectangle's width.
- * @param h The rectangle's height.
- *
- * This is the function by which one tells evas that a part of the
- * canvas has to be repainted.
- *
- * @ingroup Evas_Canvas
- */
 EAPI void
 evas_damage_rectangle_add(Evas *e, int x, int y, int w, int h)
 {
@@ -74,23 +60,6 @@ evas_damage_rectangle_add(Evas *e, int x, int y, int w, int h)
    e->changed = 1;
 }
 
-/**
- * Add an obscured region.
- *
- * @param e The given canvas pointer.
- * @param x The rectangle's left position.
- * @param y The rectangle's top position
- * @param w The rectangle's width.
- * @param h The rectangle's height.
- *
- * This is the function by which one tells evas that a part of the
- * canvas has not to be repainted. To make this region one that have
- * to be repainted, call the function evas_obscured_clear().
- *
- * @see evas_obscured_clear().
- *
- * @ingroup Evas_Canvas
- */
 EAPI void
 evas_obscured_rectangle_add(Evas *e, int x, int y, int w, int h)
 {
@@ -104,18 +73,6 @@ evas_obscured_rectangle_add(Evas *e, int x, int y, int w, int h)
    e->obscures = eina_list_append(e->obscures, r);
 }
 
-/**
- * Remove all obscured region rectangles from the canvas.
- *
- * @param e The given canvas pointer.
- *
- * This function removes all the rectangles from the obscured list of
- * the canvas. It takes obscured areas added with
- * evas_obscured_rectangle_add() and makes it a region that have to be
- * repainted.
- *
- * @ingroup Evas_Canvas
- */
 EAPI void
 evas_obscured_clear(Evas *e)
 {
@@ -135,14 +92,14 @@ _evas_render_has_map(Evas_Object *obj)
 {
    return ((!((obj->func->can_map) && (obj->func->can_map(obj)))) &&
            ((obj->cur.map) && (obj->cur.usemap)));
-//   return ((obj->cur.map) && (obj->cur.usemap));
+   //   return ((obj->cur.map) && (obj->cur.usemap));
 }
 
 static Eina_Bool
 _evas_render_had_map(Evas_Object *obj)
 {
    return ((obj->prev.map) && (obj->prev.usemap));
-//   return ((!obj->cur.map) && (obj->prev.usemap));
+   //   return ((!obj->cur.map) && (obj->prev.usemap));
 }
 
 static Eina_Bool
@@ -195,23 +152,45 @@ _evas_render_phase1_direct(Evas *e,
    Evas_Object *proxy;
 
    RD("  [--- PHASE 1 DIRECT\n");
+   for (i = 0; i < active_objects->count; i++)
+     {
+        Evas_Object *obj;
+
+        obj = eina_array_data_get(active_objects, i);
+        if (obj->changed)
+          {
+             /* Flag need redraw on proxy too */
+             evas_object_clip_recalc(obj);
+             if (obj->proxy.proxies)
+               {
+                  EINA_LIST_FOREACH(obj->proxy.proxies, l, proxy)
+                    proxy->proxy.redraw = 1;
+               }
+          }
+     }
    for (i = 0; i < render_objects->count; i++)
      {
-       Evas_Object *obj;
+        Evas_Object *obj;
 
-       obj = eina_array_data_get(render_objects, i);
+        obj = eina_array_data_get(render_objects, i);
         RD("    OBJ [%p] changed %i\n", obj, obj->changed);
-       if (obj->changed)
+        if (obj->changed)
           {
              /* Flag need redraw on proxy too */
              evas_object_clip_recalc(obj);
              obj->func->render_pre(obj);
              if (obj->proxy.proxies)
                {
-                  RD("      has proxies:\n");
                   obj->proxy.redraw = 1;
                   EINA_LIST_FOREACH(obj->proxy.proxies, l, proxy)
-                     proxy->func->render_pre(proxy);
+                    {
+                       proxy->func->render_pre(proxy);
+                       _evas_render_prev_cur_clip_cache_add(e, proxy);
+                    }
+               }
+             else if (obj->proxy.redraw)
+               {
+                  _evas_render_prev_cur_clip_cache_add(e, obj);
                }
              if (obj->pre_render_done)
                {
@@ -222,7 +201,7 @@ _evas_render_phase1_direct(Evas *e,
                      obj->prev.map, obj->prev.usemap,
                      _evas_render_has_map(obj),
                      _evas_render_had_map(obj));
-                  if ((obj->smart.smart) && 
+                  if ((obj->smart.smart) &&
                       (_evas_render_has_map(obj)))
                     {
                        RD("      has map + smart\n");
@@ -235,18 +214,18 @@ _evas_render_phase1_direct(Evas *e,
                   _evas_render_prev_cur_clip_cache_add(e, obj);
                }
           }
-       else
-         {
-            if (obj->smart.smart)
+        else
+          {
+             if (obj->smart.smart)
                {
-//                  obj->func->render_pre(obj);
+                  //                  obj->func->render_pre(obj);
                }
-            else if (obj->rect_del)
+             else if (obj->rect_del)
                {
                   RD("    rect del\n");
                   _evas_render_cur_clip_cache_del(e, obj);
                }
-         }
+          }
      }
    RD("  ---]\n");
 }
@@ -262,13 +241,13 @@ _evas_render_phase1_object_process(Evas *e, Evas_Object *obj,
 #ifdef REND_DGB
                                    , int level
 #endif
-                                   )
+                                  )
 {
    Eina_Bool clean_them = EINA_FALSE;
    Evas_Object *obj2;
    int is_active;
    Eina_Bool hmap;
-   
+
    obj->rect_del = 0;
    obj->render_pre = 0;
 
@@ -276,10 +255,10 @@ _evas_render_phase1_object_process(Evas *e, Evas_Object *obj,
    /* because of clip objects - delete 2 cycles later */
    if (obj->delete_me == 2)
 #else
-   if (obj->delete_me == evas_common_frameq_get_frameq_sz() + 2)
+     if (obj->delete_me == evas_common_frameq_get_frameq_sz() + 2)
 #endif
-        eina_array_push(delete_objects, obj);
-   else if (obj->delete_me != 0) obj->delete_me++;
+       eina_array_push(delete_objects, obj);
+     else if (obj->delete_me != 0) obj->delete_me++;
    /* If the object will be removed, we should not cache anything during this run. */
    if (obj->delete_me != 0) clean_them = EINA_TRUE;
 
@@ -306,13 +285,13 @@ _evas_render_phase1_object_process(Evas *e, Evas_Object *obj,
 
    if ((restack) && (!map))
      {
-       if (!obj->changed)
+        if (!obj->changed)
           {
              eina_array_push(&e->pending_objects, obj);
              obj->changed = 1;
           }
-       obj->restack = 1;
-       clean_them = EINA_TRUE;
+        obj->restack = 1;
+        clean_them = EINA_TRUE;
      }
 
    if (map)
@@ -350,7 +329,7 @@ _evas_render_phase1_object_process(Evas *e, Evas_Object *obj,
      {
         RDI(level);
         RD("      had map - restack objs\n");
-//        eina_array_push(restack_objects, obj);
+        //        eina_array_push(restack_objects, obj);
         _evas_render_prev_cur_clip_cache_add(e, obj);
         if (obj->changed)
           {
@@ -371,31 +350,31 @@ _evas_render_phase1_object_process(Evas *e, Evas_Object *obj,
    /* handle normal rendering. this object knows how to handle maps */
    if (obj->changed)
      {
-       if (obj->smart.smart)
-         {
+        if (obj->smart.smart)
+          {
              RDI(level);
              RD("      changed + smart - render ok\n");
-            eina_array_push(render_objects, obj);
-            obj->render_pre = 1;
-            EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
-              {
-                 _evas_render_phase1_object_process(e, obj2,
-                                                    active_objects,
-                                                    restack_objects,
-                                                    delete_objects,
-                                                    render_objects,
-                                                    obj->restack,
+             eina_array_push(render_objects, obj);
+             obj->render_pre = 1;
+             EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
+               {
+                  _evas_render_phase1_object_process(e, obj2,
+                                                     active_objects,
+                                                     restack_objects,
+                                                     delete_objects,
+                                                     render_objects,
+                                                     obj->restack,
                                                      map,
                                                      redraw_all
 #ifdef REND_DGB
                                                      , level + 1
 #endif
-                                                     );
-              }
-         }
-       else
-         {
-            if ((is_active) && (!obj->clip.clipees) &&
+                                                    );
+               }
+          }
+        else
+          {
+             if ((is_active) && (!obj->clip.clipees) &&
                  _evas_render_is_relevant(obj))
                {
                   RDI(level);
@@ -413,7 +392,7 @@ _evas_render_phase1_object_process(Evas *e, Evas_Object *obj,
                   RDI(level);
                   RD("      skip - not smart, not active or clippees or not relevant\n");
                }
-         }
+          }
      }
    else
      {
@@ -421,42 +400,42 @@ _evas_render_phase1_object_process(Evas *e, Evas_Object *obj,
            evas_object_is_visible(obj),
            obj->cur.visible, obj->cur.cache.clip.visible, obj->smart.smart, obj->cur.cache.clip.a,
            evas_object_was_visible(obj));
-       if ((!obj->clip.clipees) && (obj->delete_me == 0) &&
-           (_evas_render_can_render(obj) ||
-            (evas_object_was_visible(obj) && (!obj->prev.have_clipees))))
-         {
-            if (obj->smart.smart)
-              {
+        if ((!obj->clip.clipees) && (obj->delete_me == 0) &&
+            (_evas_render_can_render(obj) ||
+             (evas_object_was_visible(obj) && (!obj->prev.have_clipees))))
+          {
+             if (obj->smart.smart)
+               {
                   RDI(level);
                   RD("      smart + visible/was visible + not clip\n");
-                 eina_array_push(render_objects, obj);
-                 obj->render_pre = 1;
-                 EINA_INLIST_FOREACH
-                    (evas_object_smart_members_get_direct(obj), obj2)
-                   {
-                      _evas_render_phase1_object_process(e, obj2,
-                                                         active_objects,
-                                                         restack_objects,
-                                                         delete_objects,
-                                                         render_objects,
-                                                         restack, map,
-                                                          redraw_all
+                  eina_array_push(render_objects, obj);
+                  obj->render_pre = 1;
+                  EINA_INLIST_FOREACH
+                     (evas_object_smart_members_get_direct(obj), obj2)
+                       {
+                          _evas_render_phase1_object_process(e, obj2,
+                                                             active_objects,
+                                                             restack_objects,
+                                                             delete_objects,
+                                                             render_objects,
+                                                             restack, map,
+                                                             redraw_all
 #ifdef REND_DGB
-                                                          , level + 1
+                                                             , level + 1
 #endif
-                                                          );
-                   }
-              }
-            else
-              {
-                 if (evas_object_is_opaque(obj) &&
+                                                            );
+                       }
+               }
+             else
+               {
+                  if (evas_object_is_opaque(obj) &&
                       evas_object_is_visible(obj))
-                   {
+                    {
                        RDI(level);
                        RD("      opaque + visible\n");
-                      eina_array_push(render_objects, obj);
-                      obj->rect_del = 1;
-                   }
+                       eina_array_push(render_objects, obj);
+                       obj->rect_del = 1;
+                    }
                   else if (evas_object_is_visible(obj))
                     {
                        RDI(level);
@@ -469,37 +448,37 @@ _evas_render_phase1_object_process(Evas *e, Evas_Object *obj,
                        RDI(level);
                        RD("      skip\n");
                     }
-              }
-         }
-/*
-        else if (obj->smart.smart)
-          {
-             RDI(level);
-             RD("      smart + mot visible/was visible\n");
-             eina_array_push(render_objects, obj);
-             obj->render_pre = 1;
-             EINA_INLIST_FOREACH
-               (evas_object_smart_members_get_direct(obj), obj2)
-               {
-                  _evas_render_phase1_object_process(e, obj2,
-                                                     active_objects,
-                                                     restack_objects,
-                                                     delete_objects,
-                                                     render_objects,
-                                                     restack, map,
-                                                     redraw_all
-#ifdef REND_DGB
-                                                     , level + 1
-#endif
-                                                     );
                }
           }
- */
-     }
-   if (!is_active) obj->restack = 0;
-   RDI(level);
-   RD("    ---]\n");
-   return clean_them;
+        /*
+           else if (obj->smart.smart)
+           {
+           RDI(level);
+           RD("      smart + mot visible/was visible\n");
+           eina_array_push(render_objects, obj);
+           obj->render_pre = 1;
+           EINA_INLIST_FOREACH
+           (evas_object_smart_members_get_direct(obj), obj2)
+           {
+           _evas_render_phase1_object_process(e, obj2,
+           active_objects,
+           restack_objects,
+           delete_objects,
+           render_objects,
+           restack, map,
+           redraw_all
+#ifdef REND_DGB
+, level + 1
+#endif
+);
+}
+}
+         */
+}
+if (!is_active) obj->restack = 0;
+RDI(level);
+RD("    ---]\n");
+return clean_them;
 }
 
 static Eina_Bool
@@ -516,18 +495,18 @@ _evas_render_phase1_process(Evas *e,
    RD("  [--- PHASE 1\n");
    EINA_INLIST_FOREACH(e->layers, lay)
      {
-       Evas_Object *obj;
+        Evas_Object *obj;
 
-       EINA_INLIST_FOREACH(lay->objects, obj)
-         {
-            clean_them |= _evas_render_phase1_object_process
-               (e, obj, active_objects, restack_objects, delete_objects,
-                render_objects, 0, 0, redraw_all
+        EINA_INLIST_FOREACH(lay->objects, obj)
+          {
+             clean_them |= _evas_render_phase1_object_process
+                (e, obj, active_objects, restack_objects, delete_objects,
+                 render_objects, 0, 0, redraw_all
 #ifdef REND_DGB
-                , 1
+                 , 1
 #endif
                 );
-         }
+          }
      }
    RD("  ---]\n");
    return clean_them;
@@ -540,67 +519,67 @@ _evas_render_check_pending_objects(Eina_Array *pending_objects, Evas *e)
 
    for (i = 0; i < pending_objects->count; ++i)
      {
-       Evas_Object *obj;
-       int is_active, ok = 0;
+        Evas_Object *obj;
+        int is_active, ok = 0;
 
-       obj = eina_array_data_get(pending_objects, i);
+        obj = eina_array_data_get(pending_objects, i);
 
-       if (!obj->layer) goto clean_stuff;
+        if (!obj->layer) goto clean_stuff;
 
-       evas_object_clip_recalc(obj);
-       is_active = evas_object_is_active(obj);
+        evas_object_clip_recalc(obj);
+        is_active = evas_object_is_active(obj);
 
-       if ((!is_active) && (!obj->is_active) && (!obj->render_pre) &&
+        if ((!is_active) && (!obj->is_active) && (!obj->render_pre) &&
             (!obj->rect_del))
-         {
-            ok = 1;
-            goto clean_stuff;
-         }
-
-       if (obj->is_active == is_active)
-         {
-            if (obj->changed)
-              {
-                 if (obj->smart.smart)
-                   {
-                      if (obj->render_pre || obj->rect_del) ok = 1;
-                   }
-                 else
-                   if ((is_active) && (obj->restack) && (!obj->clip.clipees) &&
-                       (_evas_render_can_render(obj) ||
-                        (evas_object_was_visible(obj) && (!obj->prev.have_clipees))))
-                     {
-                        if (!(obj->render_pre || obj->rect_del)) ok = 1;
-                     }
+          {
+             ok = 1;
+             goto clean_stuff;
+          }
+
+        if (obj->is_active == is_active)
+          {
+             if (obj->changed)
+               {
+                  if (obj->smart.smart)
+                    {
+                       if (obj->render_pre || obj->rect_del) ok = 1;
+                    }
                   else
-                    if (is_active && (!obj->clip.clipees) &&
+                    if ((is_active) && (obj->restack) && (!obj->clip.clipees) &&
                         (_evas_render_can_render(obj) ||
                          (evas_object_was_visible(obj) && (!obj->prev.have_clipees))))
                       {
-                         if (obj->render_pre || obj->rect_del) ok = 1;
+                         if (!(obj->render_pre || obj->rect_del)) ok = 1;
                       }
-              }
-            else
-              {
-                 if ((!obj->clip.clipees) && (obj->delete_me == 0) &&
-                     (!obj->cur.have_clipees || (evas_object_was_visible(obj) && (!obj->prev.have_clipees)))
-                     && evas_object_is_opaque(obj) && evas_object_is_visible(obj))
+                    else
+                      if (is_active && (!obj->clip.clipees) &&
+                          (_evas_render_can_render(obj) ||
+                           (evas_object_was_visible(obj) && (!obj->prev.have_clipees))))
+                        {
+                           if (obj->render_pre || obj->rect_del) ok = 1;
+                        }
+               }
+             else
+               {
+                  if ((!obj->clip.clipees) && (obj->delete_me == 0) &&
+                      (!obj->cur.have_clipees || (evas_object_was_visible(obj) && (!obj->prev.have_clipees)))
+                      && evas_object_is_opaque(obj) && evas_object_is_visible(obj))
                     {
                        if (obj->rect_del || obj->smart.smart) ok = 1;
                     }
-              }
-         }
-
-     clean_stuff:
-       if (!ok)
-         {
-            eina_array_clean(&e->active_objects);
-            eina_array_clean(&e->render_objects);
-            eina_array_clean(&e->restack_objects);
-            eina_array_clean(&e->delete_objects);
-            e->invalidate = 1;
-            return ;
-         }
+               }
+          }
+
+clean_stuff:
+        if (!ok)
+          {
+             eina_array_clean(&e->active_objects);
+             eina_array_clean(&e->render_objects);
+             eina_array_clean(&e->restack_objects);
+             eina_array_clean(&e->delete_objects);
+             e->invalidate = 1;
+             return ;
+          }
      }
 }
 
@@ -615,7 +594,7 @@ pending_change(void *data, void *gdata __UNUSED__)
      {
         RD("  OBJ [%p] pending change %i -> 0, pre %i\n", obj, obj->changed, obj->pre_render_done);
         obj->pre_render_done = 0;
-//// FIXME: this wipes out changes
+        //// FIXME: this wipes out changes
         obj->changed = 0;
         obj->changed_move_only = 0;
         obj->changed_nomove = 0;
@@ -624,9 +603,9 @@ pending_change(void *data, void *gdata __UNUSED__)
    return obj->changed ? EINA_TRUE : EINA_FALSE;
 }
 /*
-static void
-unchange(Evas_Object *obj)
-{
+   static void
+   unchange(Evas_Object *obj)
+   {
    Evas_Object *obj2;
 
    if (!obj->changed) return;
@@ -635,38 +614,38 @@ unchange(Evas_Object *obj)
    obj->changed_nomove = 0;
    obj->changed_move = 0;
    EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
-     {
-        unchange(obj2);
-     }
-}
+   {
+   unchange(obj2);
+   }
+   }
 
-static int
-chlist(Evas_Object *obj, int i)
-{
+   static int
+   chlist(Evas_Object *obj, int i)
+   {
    Evas_Object *obj2;
    int j;
    int ret = 0;
 
    if (!obj->changed) return 0;
    for (j = 0; j < i; j++) printf(" ");
-   printf("ch2 %p %s %i [%i %i %ix%i] v %i/%i [r%i] %p\n", obj, 
-          obj->type, 
-          obj->changed_move_only,
-          obj->cur.geometry.x,
-          obj->cur.geometry.y,
-          obj->cur.geometry.w,
-          obj->cur.geometry.h,
-          obj->cur.visible,
-          obj->prev.visible,
-          obj->restack,
-          obj->clip.clipees);
+   printf("ch2 %p %s %i [%i %i %ix%i] v %i/%i [r%i] %p\n", obj,
+   obj->type,
+   obj->changed_move_only,
+   obj->cur.geometry.x,
+   obj->cur.geometry.y,
+   obj->cur.geometry.w,
+   obj->cur.geometry.h,
+   obj->cur.visible,
+   obj->prev.visible,
+   obj->restack,
+   obj->clip.clipees);
    EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
-     {
-        if (obj2->changed)
-           ret |= chlist(obj2, i + 1);
-     }
-}
-*/
+   {
+   if (obj2->changed)
+   ret |= chlist(obj2, i + 1);
+   }
+   }
+ */
 
 static Eina_Bool
 evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
@@ -675,7 +654,7 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
 #ifdef REND_DGB
                    , int level
 #endif
-                   )
+                  )
 {
    void *ctx;
    Evas_Object *obj2;
@@ -696,7 +675,7 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
      }
    else if (!(((evas_object_is_active(obj) && (!obj->clip.clipees) &&
                 (_evas_render_can_render(obj))))
-              ))
+             ))
      {
         RDI(level);
         RD("      }\n");
@@ -706,9 +685,9 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
    // set render_pre - for child objs that may not have gotten it.
    obj->pre_render_done = 1;
    RD("          Hasmap: %p (%d) %p %d -> %d\n",obj->func->can_map,
-                  obj->func->can_map ? obj->func->can_map(obj): -1,
-                  obj->cur.map, obj->cur.usemap,
-                  _evas_render_has_map(obj));
+      obj->func->can_map ? obj->func->can_map(obj): -1,
+      obj->cur.map, obj->cur.usemap,
+      _evas_render_has_map(obj));
    if (_evas_render_has_map(obj))
      {
         const Evas_Map_Point *p, *p_end;
@@ -716,7 +695,7 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
         int sw, sh;
         int changed = 0, rendered = 0;
 
-       clean_them = EINA_TRUE;
+        clean_them = EINA_TRUE;
 
         sw = obj->cur.geometry.w;
         sh = obj->cur.geometry.h;
@@ -733,7 +712,7 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
         pts[0].py = obj->cur.map->persp.py << FP;
         pts[0].foc = obj->cur.map->persp.foc << FP;
         pts[0].z0 = obj->cur.map->persp.z0 << FP;
-        
+
         p = obj->cur.map->points;
         p_end = p + obj->cur.map->count;
         pt = pts;
@@ -756,7 +735,7 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
         /* Copy last for software engine */
         if (obj->cur.map->count & 0x1)
           {
-            pts[obj->cur.map->count] = pts[obj->cur.map->count - 1];
+             pts[obj->cur.map->count] = pts[obj->cur.map->count - 1];
           }
 
 
@@ -768,7 +747,7 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
                   RDI(level);
                   RD("        new surf: %ix%i\n", sw, sh);
                   obj->layer->evas->engine.func->image_map_surface_free
-                    (e->engine.data.output, obj->cur.map->surface);
+                     (e->engine.data.output, obj->cur.map->surface);
                   obj->cur.map->surface = NULL;
                }
           }
@@ -778,41 +757,41 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
              obj->cur.map->surface_h = sh;
 
              obj->cur.map->surface =
-               obj->layer->evas->engine.func->image_map_surface_new
-               (e->engine.data.output, obj->cur.map->surface_w,
-                obj->cur.map->surface_h,
-                obj->cur.map->alpha);
+                obj->layer->evas->engine.func->image_map_surface_new
+                (e->engine.data.output, obj->cur.map->surface_w,
+                 obj->cur.map->surface_h,
+                 obj->cur.map->alpha);
              RDI(level);
              RD("        fisrt surf: %ix%i\n", sw, sh);
              changed = 1;
           }
         if (obj->smart.smart)
           {
-             Evas_Object *obj2;
-             
-             EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
+             Evas_Object *o2;
+
+             EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), o2)
                {
-                  if (!evas_object_is_visible(obj2) &&
-                      !evas_object_was_visible(obj2))
+                  if (!evas_object_is_visible(o2) &&
+                      !evas_object_was_visible(o2))
                     {
-                       obj2->changed = 0;
-                       obj2->changed_move_only = 0;
-                       obj2->changed_nomove = 0;
-                       obj2->changed_move = 0;
+                       o2->changed = 0;
+                       o2->changed_move_only = 0;
+                       o2->changed_nomove = 0;
+                       o2->changed_move = 0;
                        continue;
                     }
-                  if (obj2->changed)
+                  if (o2->changed)
                     {
-//                       chlist(obj2, 0);
+                       //                       chlist(o2, 0);
                        changed = 1;
-                       obj2->changed = 0;
-                       obj2->changed_move_only = 0;
-                       obj2->changed_nomove = 0;
-                       obj2->changed_move = 0;
+                       o2->changed = 0;
+                       o2->changed_move_only = 0;
+                       o2->changed_nomove = 0;
+                       o2->changed_move = 0;
                        break;
                     }
                }
-//             unchange(obj);
+             //             unchange(obj);
              obj->changed = 0;
              obj->changed_move_only = 0;
              obj->changed_nomove = 0;
@@ -834,7 +813,7 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
         if ((changed) && (obj->cur.map->surface))
           {
              int off_x2, off_y2;
-             
+
              RDI(level);
              RD("        children redraw\n");
              // FIXME: calculate "changes" within map surface and only clear
@@ -843,9 +822,9 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
                {
                   ctx = e->engine.func->context_new(e->engine.data.output);
                   e->engine.func->context_color_set
-                    (e->engine.data.output, ctx, 0, 0, 0, 0);
+                     (e->engine.data.output, ctx, 0, 0, 0, 0);
                   e->engine.func->context_render_op_set
-                    (e->engine.data.output, ctx, EVAS_RENDER_COPY);
+                     (e->engine.data.output, ctx, EVAS_RENDER_COPY);
                   e->engine.func->rectangle_draw(e->engine.data.output,
                                                  ctx,
                                                  obj->cur.map->surface,
@@ -860,17 +839,17 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
              if (obj->smart.smart)
                {
                   EINA_INLIST_FOREACH
-                    (evas_object_smart_members_get_direct(obj), obj2)
-                    {
-                       clean_them |= evas_render_mapped(e, obj2, ctx,
-                                                       obj->cur.map->surface,
-                                                       off_x2, off_y2, 1,
-                                                        ecx, ecy, ecw, ech
+                     (evas_object_smart_members_get_direct(obj), obj2)
+                       {
+                          clean_them |= evas_render_mapped(e, obj2, ctx,
+                                                           obj->cur.map->surface,
+                                                           off_x2, off_y2, 1,
+                                                           ecx, ecy, ecw, ech
 #ifdef REND_DGB
-                                                       , level + 1
+                                                           , level + 1
 #endif
-                                                       );
-                    }
+                                                          );
+                       }
                }
              else
                {
@@ -899,12 +878,12 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
         if (rendered)
           {
              obj->cur.map->surface = e->engine.func->image_dirty_region
-               (e->engine.data.output, obj->cur.map->surface,
-                0, 0, obj->cur.map->surface_w, obj->cur.map->surface_h);
+                (e->engine.data.output, obj->cur.map->surface,
+                 0, 0, obj->cur.map->surface_w, obj->cur.map->surface_h);
           }
         e->engine.func->context_clip_unset(e->engine.data.output,
                                            e->engine.data.context);
-        if (obj->cur.map->surface) 
+        if (obj->cur.map->surface)
           {
              if (obj->smart.smart)
                {
@@ -912,7 +891,7 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
                     {
                        int x, y, w, h;
                        Evas_Object *tobj;
-                       
+
                        obj->cur.cache.clip.dirty = 1;
                        tobj = obj->cur.map_parent;
                        obj->cur.map_parent = obj->cur.clipper->cur.map_parent;
@@ -923,10 +902,10 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
                        w = obj->cur.cache.clip.w;
                        h = obj->cur.cache.clip.h;
                        RECTS_CLIP_TO_RECT(x, y, w, h,
-                              obj->cur.clipper->cur.cache.clip.x,
-                              obj->cur.clipper->cur.cache.clip.y,
-                              obj->cur.clipper->cur.cache.clip.w,
-                              obj->cur.clipper->cur.cache.clip.h);
+                                          obj->cur.clipper->cur.cache.clip.x,
+                                          obj->cur.clipper->cur.cache.clip.y,
+                                          obj->cur.clipper->cur.cache.clip.w,
+                                          obj->cur.clipper->cur.cache.clip.h);
                        e->engine.func->context_clip_set(e->engine.data.output,
                                                         e->engine.data.context,
                                                         x + off_x, y + off_y, w, h);
@@ -937,17 +916,17 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
                   if (obj->cur.clipper)
                     {
                        int x, y, w, h;
-                       
+
                        evas_object_clip_recalc(obj);
                        x = obj->cur.cache.clip.x;
                        y = obj->cur.cache.clip.y;
                        w = obj->cur.cache.clip.w;
                        h = obj->cur.cache.clip.h;
                        RECTS_CLIP_TO_RECT(x, y, w, h,
-                              obj->cur.clipper->cur.cache.clip.x,
-                              obj->cur.clipper->cur.cache.clip.y,
-                              obj->cur.clipper->cur.cache.clip.w,
-                              obj->cur.clipper->cur.cache.clip.h);
+                                          obj->cur.clipper->cur.cache.clip.x,
+                                          obj->cur.clipper->cur.cache.clip.y,
+                                          obj->cur.clipper->cur.cache.clip.w,
+                                          obj->cur.clipper->cur.cache.clip.h);
                        e->engine.func->context_clip_set(e->engine.data.output,
                                                         e->engine.data.context,
                                                         x + off_x, y + off_y, w, h);
@@ -955,19 +934,19 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
                }
           }
         if (surface == e->engine.data.output)
-           e->engine.func->context_clip_clip(e->engine.data.output,
-                                             e->engine.data.context,
-                                             ecx, ecy, ecw, ech);
+          e->engine.func->context_clip_clip(e->engine.data.output,
+                                            e->engine.data.context,
+                                            ecx, ecy, ecw, ech);
         if (obj->cur.cache.clip.visible)
-           obj->layer->evas->engine.func->image_map_draw
-           (e->engine.data.output, e->engine.data.context, surface,
-            obj->cur.map->surface, obj->cur.map->count, pts,
-            obj->cur.map->smooth, 0);
+          obj->layer->evas->engine.func->image_map_draw
+             (e->engine.data.output, e->engine.data.context, surface,
+              obj->cur.map->surface, obj->cur.map->count, pts,
+              obj->cur.map->smooth, 0);
         // FIXME: needs to cache these maps and
         // keep them only rendering updates
-//        obj->layer->evas->engine.func->image_map_surface_free
-//          (e->engine.data.output, obj->cur.map->surface);
-//        obj->cur.map->surface = NULL;
+        //        obj->layer->evas->engine.func->image_map_surface_free
+        //          (e->engine.data.output, obj->cur.map->surface);
+        //        obj->cur.map->surface = NULL;
      }
    else
      {
@@ -979,17 +958,17 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
              if (obj->smart.smart)
                {
                   EINA_INLIST_FOREACH
-                    (evas_object_smart_members_get_direct(obj), obj2)
-                    {
-                       clean_them |= evas_render_mapped(e, obj2, ctx,
-                                                       surface,
-                                                       off_x, off_y, 1,
-                                                        ecx, ecy, ecw, ech
+                     (evas_object_smart_members_get_direct(obj), obj2)
+                       {
+                          clean_them |= evas_render_mapped(e, obj2, ctx,
+                                                           surface,
+                                                           off_x, off_y, 1,
+                                                           ecx, ecy, ecw, ech
 #ifdef REND_DGB
-                                                       , level + 1
+                                                           , level + 1
 #endif
-                                                       );
-                    }
+                                                          );
+                       }
                }
              else
                {
@@ -1024,7 +1003,7 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
 
                        RD("        clip: %i %i %ix%i [%i %i %ix%i]\n",
                           obj->cur.cache.clip.x + off_x,
-                          obj->cur.cache.clip.y + off_y, 
+                          obj->cur.cache.clip.y + off_y,
                           obj->cur.cache.clip.w,
                           obj->cur.cache.clip.h,
                           obj->cur.geometry.x + off_x,
@@ -1041,15 +1020,15 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
                     }
                   obj->func->render(obj, e->engine.data.output, ctx,
                                     surface, off_x, off_y);
-/*                  
-                  obj->layer->evas->engine.func->context_color_set(e->engine.data.output,
-                                                                   ctx,
-                                                                   0, 30, 0, 30);
-                  obj->layer->evas->engine.func->rectangle_draw(e->engine.data.output,
-                                                                ctx,
-                                                                surface,
-                                                                0, 0, 9999, 9999);
- */
+                  /*
+                                      obj->layer->evas->engine.func->context_color_set(e->engine.data.output,
+                                      ctx,
+                                      0, 30, 0, 30);
+                                      obj->layer->evas->engine.func->rectangle_draw(e->engine.data.output,
+                                      ctx,
+                                      surface,
+                                      0, 0, 9999, 9999);
                  */
                }
              e->engine.func->context_free(e->engine.data.output, ctx);
           }
@@ -1135,10 +1114,10 @@ evas_render_updates_internal(Evas *e,
    /* phase 2. force updates for restacks */
    for (i = 0; i < e->restack_objects.count; ++i)
      {
-       Evas_Object *obj;
+        Evas_Object *obj;
 
-       obj = eina_array_data_get(&e->restack_objects, i);
-       obj->func->render_pre(obj);
+        obj = eina_array_data_get(&e->restack_objects, i);
+        obj->func->render_pre(obj);
         _evas_render_prev_cur_clip_cache_add(e, obj);
      }
    eina_array_clean(&e->restack_objects);
@@ -1166,27 +1145,27 @@ evas_render_updates_internal(Evas *e,
      }
    if ((e->output.w != e->viewport.w) || (e->output.h != e->viewport.h))
      {
-       ERR("viewport size != output size!");
+        ERR("viewport size != output size!");
      }
    if (redraw_all)
      {
         e->engine.func->output_redraws_rect_add(e->engine.data.output,
-                                                0, 0, 
+                                                0, 0,
                                                 e->output.w, e->output.h);
      }
    /* phase 5. add obscures */
    EINA_LIST_FOREACH(e->obscures, ll, r)
      {
         e->engine.func->output_redraws_rect_del(e->engine.data.output,
-                                              r->x, r->y, r->w, r->h);
+                                                r->x, r->y, r->w, r->h);
      }
    /* build obscure objects list of active objects that obscure */
    for (i = 0; i < e->active_objects.count; ++i)
      {
-       Evas_Object *obj;
+        Evas_Object *obj;
 
-       obj = eina_array_data_get(&e->active_objects, i);
-       if (UNLIKELY((evas_object_is_opaque(obj) ||
+        obj = eina_array_data_get(&e->active_objects, i);
+        if (UNLIKELY((evas_object_is_opaque(obj) ||
                       ((obj->func->has_opaque_rect) &&
                        (obj->func->has_opaque_rect(obj)))) &&
                      evas_object_is_visible(obj) &&
@@ -1195,140 +1174,140 @@ evas_render_updates_internal(Evas *e,
                      (!obj->delete_me) &&
                      (obj->cur.cache.clip.visible) &&
                      (!obj->smart.smart)))
-/*       obscuring_objects = eina_list_append(obscuring_objects, obj); */
-         eina_array_push(&e->obscuring_objects, obj);
+          /*     obscuring_objects = eina_list_append(obscuring_objects, obj); */
+          eina_array_push(&e->obscuring_objects, obj);
      }
    /* save this list */
-/*    obscuring_objects_orig = obscuring_objects; */
-/*    obscuring_objects = NULL; */
+   /*    obscuring_objects_orig = obscuring_objects; */
+   /*    obscuring_objects = NULL; */
    /* phase 6. go thru each update rect and render objects in it*/
    if (do_draw)
      {
-       unsigned int offset = 0;
+        unsigned int offset = 0;
 
-       alpha = e->engine.func->canvas_alpha_get(e->engine.data.output, 
+        alpha = e->engine.func->canvas_alpha_get(e->engine.data.output,
                                                  e->engine.data.context);
 
-       while ((surface =
-               e->engine.func->output_redraws_next_update_get
+        while ((surface =
+                e->engine.func->output_redraws_next_update_get
                 (e->engine.data.output,
-                    &ux, &uy, &uw, &uh,
-                    &cx, &cy, &cw, &ch)))
-         {
-            int off_x, off_y;
+                 &ux, &uy, &uw, &uh,
+                 &cx, &cy, &cw, &ch)))
+          {
+             int off_x, off_y;
 
              RD("  [--- UPDATE %i %i %ix%i\n", ux, uy, uw, uh);
-            if (make_updates)
-              {
-                 Eina_Rectangle *rect;
-
-                 NEW_RECT(rect, ux, uy, uw, uh);
-                 if (rect)
-                   updates = eina_list_append(updates, rect);
-              }
+             if (make_updates)
+               {
+                  Eina_Rectangle *rect;
+
+                  NEW_RECT(rect, ux, uy, uw, uh);
+                  if (rect)
+                    updates = eina_list_append(updates, rect);
+               }
              haveup = 1;
-            off_x = cx - ux;
-            off_y = cy - uy;
-            /* build obscuring objects list (in order from bottom to top) */
-            for (i = 0; i < e->obscuring_objects.count; ++i)
-              {
-                 Evas_Object *obj;
-
-                 obj = (Evas_Object *)eina_array_data_get
+             off_x = cx - ux;
+             off_y = cy - uy;
+             /* build obscuring objects list (in order from bottom to top) */
+             for (i = 0; i < e->obscuring_objects.count; ++i)
+               {
+                  Evas_Object *obj;
+
+                  obj = (Evas_Object *)eina_array_data_get
                      (&e->obscuring_objects, i);
-                 if (evas_object_is_in_output_rect(obj, ux, uy, uw, uh))
-                   {
-                      eina_array_push(&e->temporary_objects, obj);
-                       
-                      /* reset the background of the area if needed (using cutout and engine alpha flag to help) */
+                  if (evas_object_is_in_output_rect(obj, ux, uy, uw, uh))
+                    {
+                       eina_array_push(&e->temporary_objects, obj);
+
+                       /* reset the background of the area if needed (using cutout and engine alpha flag to help) */
                        if (alpha)
                          {
                             if (evas_object_is_opaque(obj))
-                               e->engine.func->context_cutout_add
-                               (e->engine.data.output,
-                                   e->engine.data.context,
-                                   obj->cur.cache.clip.x + off_x,
-                                   obj->cur.cache.clip.y + off_y,
-                                   obj->cur.cache.clip.w,
-                                   obj->cur.cache.clip.h);
-                           else
-                             {
-                                if (obj->func->get_opaque_rect)
-                                  {
-                                     Evas_Coord obx, oby, obw, obh;
-
-                                     obj->func->get_opaque_rect
+                              e->engine.func->context_cutout_add
+                                 (e->engine.data.output,
+                                  e->engine.data.context,
+                                  obj->cur.cache.clip.x + off_x,
+                                  obj->cur.cache.clip.y + off_y,
+                                  obj->cur.cache.clip.w,
+                                  obj->cur.cache.clip.h);
+                            else
+                              {
+                                 if (obj->func->get_opaque_rect)
+                                   {
+                                      Evas_Coord obx, oby, obw, obh;
+
+                                      obj->func->get_opaque_rect
                                          (obj, &obx, &oby, &obw, &obh);
-                                     if ((obw > 0) && (obh > 0))
-                                       {
-                                          obx += off_x;
-                                          oby += off_y;
-                                          RECTS_CLIP_TO_RECT
+                                      if ((obw > 0) && (obh > 0))
+                                        {
+                                           obx += off_x;
+                                           oby += off_y;
+                                           RECTS_CLIP_TO_RECT
                                               (obx, oby, obw, obh,
-                                                  obj->cur.cache.clip.x + off_x,
-                                                  obj->cur.cache.clip.y + off_y,
-                                                  obj->cur.cache.clip.w,
-                                                  obj->cur.cache.clip.h);
-                                          e->engine.func->context_cutout_add
+                                               obj->cur.cache.clip.x + off_x,
+                                               obj->cur.cache.clip.y + off_y,
+                                               obj->cur.cache.clip.w,
+                                               obj->cur.cache.clip.h);
+                                           e->engine.func->context_cutout_add
                                               (e->engine.data.output,
-                                                  e->engine.data.context,
-                                                  obx, oby,
-                                                  obw, obh);
-                                       }
-                                  }
-                             }
-                        }
-                   }
-              }
-            if (alpha)
-              {
-                 e->engine.func->context_clip_set(e->engine.data.output,
-                                                  e->engine.data.context,
-                                                  ux, uy, uw, uh);
-                 e->engine.func->context_color_set(e->engine.data.output, 
-                                                    e->engine.data.context, 
+                                               e->engine.data.context,
+                                               obx, oby,
+                                               obw, obh);
+                                        }
+                                   }
+                              }
+                         }
+                    }
+               }
+             if (alpha)
+               {
+                  e->engine.func->context_clip_set(e->engine.data.output,
+                                                   e->engine.data.context,
+                                                   ux, uy, uw, uh);
+                  e->engine.func->context_color_set(e->engine.data.output,
+                                                    e->engine.data.context,
                                                     0, 0, 0, 0);
-                 e->engine.func->context_multiplier_unset
+                  e->engine.func->context_multiplier_unset
                      (e->engine.data.output, e->engine.data.context);
-                 e->engine.func->context_render_op_set(e->engine.data.output, 
+                  e->engine.func->context_render_op_set(e->engine.data.output,
                                                         e->engine.data.context,
                                                         EVAS_RENDER_COPY);
-                 e->engine.func->rectangle_draw(e->engine.data.output,
-                                                e->engine.data.context,
-                                                surface,
-                                                cx, cy, cw, ch);
-                 e->engine.func->context_cutout_clear(e->engine.data.output,
-                                                      e->engine.data.context);
-                 e->engine.func->context_clip_unset(e->engine.data.output,
+                  e->engine.func->rectangle_draw(e->engine.data.output,
+                                                 e->engine.data.context,
+                                                 surface,
+                                                 cx, cy, cw, ch);
+                  e->engine.func->context_cutout_clear(e->engine.data.output,
+                                                       e->engine.data.context);
+                  e->engine.func->context_clip_unset(e->engine.data.output,
                                                      e->engine.data.context);
-              }
-            /* render all object that intersect with rect */
+               }
+             /* render all object that intersect with rect */
              for (i = 0; i < e->active_objects.count; ++i)
-              {
-                 Evas_Object *obj;
+               {
+                  Evas_Object *obj;
 
-                 obj = eina_array_data_get(&e->active_objects, i);
+                  obj = eina_array_data_get(&e->active_objects, i);
 
-                 /* if it's in our outpout rect and it doesn't clip anything */
+                  /* if it's in our outpout rect and it doesn't clip anything */
                   RD("    OBJ: [%p] '%s' %i %i %ix%i\n", obj, obj->type, obj->cur.geometry.x, obj->cur.geometry.y, obj->cur.geometry.w, obj->cur.geometry.h);
-                 if ((evas_object_is_in_output_rect(obj, ux, uy, uw, uh) ||
+                  if ((evas_object_is_in_output_rect(obj, ux, uy, uw, uh) ||
                        (obj->smart.smart)) &&
-                     (!obj->clip.clipees) &&
-                     (obj->cur.visible) &&
-                     (!obj->delete_me) &&
-                     (obj->cur.cache.clip.visible) &&
-//                   (!obj->smart.smart) &&
-                     ((obj->cur.color.a > 0 || obj->cur.render_op != EVAS_RENDER_BLEND)))
-                   {
-                      int x, y, w, h;
+                      (!obj->clip.clipees) &&
+                      (obj->cur.visible) &&
+                      (!obj->delete_me) &&
+                      (obj->cur.cache.clip.visible) &&
+                      //                     (!obj->smart.smart) &&
+                      ((obj->cur.color.a > 0 || obj->cur.render_op != EVAS_RENDER_BLEND)))
+                    {
+                       int x, y, w, h;
 
                        RD("      DRAW (vis: %i, a: %i, clipees: %p\n", obj->cur.visible, obj->cur.color.a, obj->clip.clipees);
-                      if ((e->temporary_objects.count > offset) &&
-                          (eina_array_data_get(&e->temporary_objects, offset) == obj))
-                        offset++;
-                      x = cx; y = cy; w = cw; h = ch;
-                      if (((w > 0) && (h > 0)) || (obj->smart.smart))
-                        {
+                       if ((e->temporary_objects.count > offset) &&
+                           (eina_array_data_get(&e->temporary_objects, offset) == obj))
+                         offset++;
+                       x = cx; y = cy; w = cw; h = ch;
+                       if (((w > 0) && (h > 0)) || (obj->smart.smart))
+                         {
                             if (!obj->smart.smart)
                               {
                                  RECTS_CLIP_TO_RECT(x, y, w, h,
@@ -1338,31 +1317,29 @@ evas_render_updates_internal(Evas *e,
                                                     obj->cur.cache.clip.h);
                               }
                             if (obj->cur.mask)
-                               e->engine.func->context_mask_set(e->engine.data.output,
-                                                                e->engine.data.context,
-                                                                obj->cur.mask->func->engine_data_get(obj->cur.mask),
-                                                                obj->cur.mask->cur.geometry.x,
-                                                                obj->cur.mask->cur.geometry.y,
-                                                                obj->cur.mask->cur.geometry.w,
-                                                                obj->cur.mask->cur.geometry.h);
+                              e->engine.func->context_mask_set(e->engine.data.output,
+                                                               e->engine.data.context,
+                                                               obj->cur.mask->func->engine_data_get(obj->cur.mask),
+                                                               obj->cur.mask->cur.geometry.x + off_x,
+                                                               obj->cur.mask->cur.geometry.y + off_y,
+                                                               obj->cur.mask->cur.geometry.w,
+                                                               obj->cur.mask->cur.geometry.h);
                             else
-                               e->engine.func->context_mask_unset(e->engine.data.output,
-                                                                e->engine.data.context);
+                              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);
+                              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);
-
-
+                              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)
-                             {
-                                Evas_Object *obj2;
+                            for (j = offset; j < e->temporary_objects.count; ++j)
+                              {
+                                 Evas_Object *obj2;
 
-                                obj2 = (Evas_Object *) eina_array_data_get(&e->temporary_objects, j);
+                                 obj2 = (Evas_Object *) eina_array_data_get(&e->temporary_objects, j);
                                  if (evas_object_is_opaque(obj2))
                                    e->engine.func->context_cutout_add(e->engine.data.output,
                                                                       e->engine.data.context,
@@ -1377,7 +1354,7 @@ evas_render_updates_internal(Evas *e,
                                            Evas_Coord obx, oby, obw, obh;
 
                                            obj2->func->get_opaque_rect
-                                             (obj2, &obx, &oby, &obw, &obh);
+                                              (obj2, &obx, &oby, &obw, &obh);
                                            if ((obw > 0) && (obh > 0))
                                              {
                                                 obx += off_x;
@@ -1394,29 +1371,32 @@ evas_render_updates_internal(Evas *e,
                                              }
                                         }
                                    }
-                             }
+                              }
 #endif
+                            e->engine.func->context_clip_set(e->engine.data.output,
+                                                             e->engine.data.context,
+                                                             x, y, w, h);
                             clean_them |= evas_render_mapped(e, obj, e->engine.data.context,
-                                                            surface, off_x, off_y, 0,
+                                                             surface, off_x, off_y, 0,
                                                              cx, cy, cw, ch
 #ifdef REND_DGB
-                                                            , 1
+                                                             , 1
 #endif
-                                                            );
-                           e->engine.func->context_cutout_clear(e->engine.data.output,
-                                                                e->engine.data.context);
-                        }
-                   }
-              }
-            /* punch rect out */
-            e->engine.func->output_redraws_next_update_push(e->engine.data.output,
-                                                            surface,
-                                                            ux, uy, uw, uh);
-            /* free obscuring objects list */
-            eina_array_clean(&e->temporary_objects);
+                                                            );
+                            e->engine.func->context_cutout_clear(e->engine.data.output,
+                                                                 e->engine.data.context);
+                         }
+                    }
+               }
+             /* punch rect out */
+             e->engine.func->output_redraws_next_update_push(e->engine.data.output,
+                                                             surface,
+                                                             ux, uy, uw, uh);
+             /* free obscuring objects list */
+             eina_array_clean(&e->temporary_objects);
              RD("  ---]\n");
-         }
-       /* flush redraws */
+          }
+        /* flush redraws */
         if (haveup)
           {
              evas_event_callback_call(e, EVAS_CALLBACK_RENDER_FLUSH_PRE, NULL);
@@ -1429,39 +1409,39 @@ evas_render_updates_internal(Evas *e,
    /* and do a post render pass */
    for (i = 0; i < e->active_objects.count; ++i)
      {
-       Evas_Object *obj;
+        Evas_Object *obj;
 
-       obj = eina_array_data_get(&e->active_objects, i);
-       obj->pre_render_done = 0;
+        obj = eina_array_data_get(&e->active_objects, i);
+        obj->pre_render_done = 0;
         RD("    OBJ [%p] post... %i %i\n", obj, obj->changed, do_draw);
-       if ((obj->changed) && (do_draw))
-         {
+        if ((obj->changed) && (do_draw))
+          {
              RD("    OBJ [%p] post... func1\n", obj);
-            obj->func->render_post(obj);
-            obj->restack = 0;
-            obj->changed = 0;
+             obj->func->render_post(obj);
+             obj->restack = 0;
+             obj->changed = 0;
              obj->changed_move_only = 0;
              obj->changed_nomove = 0;
              obj->changed_move = 0;
-         }
+          }
         else if ((obj->cur.map != obj->prev.map) ||
                  (obj->cur.usemap != obj->prev.usemap))
           {
              RD("    OBJ [%p] post... func2\n", obj);
-            obj->func->render_post(obj);
-            obj->restack = 0;
-            obj->changed = 0;
+             obj->func->render_post(obj);
+             obj->restack = 0;
+             obj->changed = 0;
              obj->changed_move_only = 0;
              obj->changed_nomove = 0;
              obj->changed_move = 0;
           }
-/* moved to other pre-process phase 1
-       if (obj->delete_me == 2)
-         {
-            delete_objects = eina_list_append(delete_objects, obj);
-         }
-       else if (obj->delete_me != 0) obj->delete_me++;
- */
+        /* moved to other pre-process phase 1
+           if (obj->delete_me == 2)
+           {
+           delete_objects = eina_list_append(delete_objects, obj);
+           }
+           else if (obj->delete_me != 0) obj->delete_me++;
        */
      }
    /* free our obscuring object list */
    eina_array_clean(&e->obscuring_objects);
@@ -1470,13 +1450,21 @@ evas_render_updates_internal(Evas *e,
       them from the pending list. */
    eina_array_remove(&e->pending_objects, pending_change, NULL);
 
+   for (i = 0; i < e->render_objects.count; ++i)
+     {
+        Evas_Object *obj;
+
+        obj = eina_array_data_get(&e->render_objects, i);
+        obj->pre_render_done = 0;
+     }
+
    /* delete all objects flagged for deletion now */
    for (i = 0; i < e->delete_objects.count; ++i)
      {
-       Evas_Object *obj;
+        Evas_Object *obj;
 
-       obj = eina_array_data_get(&e->delete_objects, i);
-       evas_object_free(obj, 1);
+        obj = eina_array_data_get(&e->delete_objects, i);
+        evas_object_free(obj, 1);
      }
    eina_array_clean(&e->delete_objects);
 
@@ -1485,24 +1473,16 @@ evas_render_updates_internal(Evas *e,
    e->output.changed = 0;
    e->invalidate = 0;
 
-   for (i = 0; i < e->render_objects.count; ++i)
-     {
-        Evas_Object *obj;
-
-        obj = eina_array_data_get(&e->render_objects, i);
-        obj->pre_render_done = 0;
-     }
-
    /* If their are some object to restack or some object to delete,
     * it's useless to keep the render object list around. */
    if (clean_them)
      {
-       eina_array_clean(&e->active_objects);
-       eina_array_clean(&e->render_objects);
-       eina_array_clean(&e->restack_objects);
-       eina_array_clean(&e->delete_objects);
+        eina_array_clean(&e->active_objects);
+        eina_array_clean(&e->render_objects);
+        eina_array_clean(&e->restack_objects);
+        eina_array_clean(&e->delete_objects);
         eina_array_clean(&e->obscuring_objects);
-       e->invalidate = 1;
+        e->invalidate = 1;
      }
 
    evas_module_clean();
@@ -1512,37 +1492,15 @@ evas_render_updates_internal(Evas *e,
    return updates;
 }
 
-/**
- * Free the rectangles returned by evas_render_updates().
- *
- * @param updates The list of updated rectangles of the canvas.
- *
- * This function removes the region from the render updates list. It
- * makes the region doesn't be render updated anymore.
- *
- * @ingroup Evas_Canvas
- */
 EAPI void
 evas_render_updates_free(Eina_List *updates)
 {
    Eina_Rectangle *r;
 
    EINA_LIST_FREE(updates, r)
-     eina_rectangle_free(r);
+      eina_rectangle_free(r);
 }
 
-/**
- * Force immediate renderization of the given canvas.
- *
- * @param e The given canvas pointer.
- * @return A newly allocated list of updated rectangles of the canvas.
- *         Free this list with evas_render_updates_free().
- *
- * This function forces an immediate renderization update of the given
- * given canvas.
- *
- * @ingroup Evas_Canvas
- */
 EAPI Eina_List *
 evas_render_updates(Evas *e)
 {
@@ -1558,13 +1516,6 @@ evas_render_updates(Evas *e)
    return evas_render_updates_internal(e, 1, 1);
 }
 
-/**
- * Force renderization of the given canvas.
- *
- * @param e The given canvas pointer.
- *
- * @ingroup Evas_Canvas
- */
 EAPI void
 evas_render(Evas *e)
 {
@@ -1580,20 +1531,6 @@ evas_render(Evas *e)
    evas_render_updates_internal(e, 0, 1);
 }
 
-/**
- * Update the canvas internal objects but not triggering immediate
- * renderization.
- *
- * @param e The given canvas pointer.
- *
- * This function updates the canvas internal objects not triggering
- * renderization. To force renderization function evas_render() should
- * be used.
- *
- * @see evas_render.
- *
- * @ingroup Evas_Canvas
- */
 EAPI void
 evas_norender(Evas *e)
 {
@@ -1601,21 +1538,10 @@ evas_norender(Evas *e)
    return;
    MAGIC_CHECK_END();
 
-//   if (!e->changed) return;
+   //   if (!e->changed) return;
    evas_render_updates_internal(e, 0, 0);
 }
 
-/**
- * Make the canvas discard internally cached data used for rendering.
- *
- * @param e The given canvas pointer.
- *
- * This function flushes the arrays of delete, active and render objects.
- * Other things it may also discard are: shared memory segments,
- * temporary scratch buffers, cached data to avoid re-compute of that data etc.
- *
- * @ingroup Evas_Canvas
- */
 EAPI void
 evas_render_idle_flush(Evas *e)
 {
@@ -1652,27 +1578,13 @@ evas_sync(Evas *e)
 #endif
 }
 
-/**
- * Make the canvas discard as much data as possible used by the engine at
- * runtime.
- *
- * @param e The given canvas pointer.
- *
- * This function will unload images, delete textures and much more, where
- * possible. You may also want to call evas_render_idle_flush() immediately
- * prior to this to perhaps discard a little more, though evas_render_dump()
- * should implicitly delete most of what evas_render_idle_flush() might
- * discard too.
- *
- * @ingroup Evas_Canvas
- */
 static void
 _evas_render_dump_map_surfaces(Evas_Object *obj)
 {
    if ((obj->cur.map) && obj->cur.map->surface)
      {
         obj->layer->evas->engine.func->image_map_surface_free
-          (obj->layer->evas->engine.data.output, obj->cur.map->surface);
+           (obj->layer->evas->engine.data.output, obj->cur.map->surface);
         obj->cur.map->surface = NULL;
      }
 
@@ -1681,7 +1593,7 @@ _evas_render_dump_map_surfaces(Evas_Object *obj)
         Evas_Object *obj2;
 
         EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
-          _evas_render_dump_map_surfaces(obj2);
+           _evas_render_dump_map_surfaces(obj2);
      }
 }
 
@@ -1701,7 +1613,7 @@ evas_render_dump(Evas *e)
         EINA_INLIST_FOREACH(lay->objects, obj)
           {
              if ((obj->type) && (!strcmp(obj->type, "image")))
-                evas_object_inform_call_image_unloaded(obj);
+               evas_object_inform_call_image_unloaded(obj);
              _evas_render_dump_map_surfaces(obj);
           }
      }
@@ -1736,20 +1648,19 @@ evas_render_object_recalc(Evas_Object *obj)
 #ifndef EVAS_FRAME_QUEUING
    if ((!obj->changed) && (obj->delete_me < 2))
 #else
-   if ((!obj->changed))
+     if ((!obj->changed))
 #endif
-     {
-       Evas *e;
+       {
+          Evas *e;
 
-       e = obj->layer->evas;
-       if ((!e) || (e->cleanup)) return;
+          e = obj->layer->evas;
+          if ((!e) || (e->cleanup)) return;
 #ifdef EVAS_FRAME_QUEUING
-        if (obj->delete_me >= evas_common_frameq_get_frameq_sz() + 2) return;
+          if (obj->delete_me >= evas_common_frameq_get_frameq_sz() + 2) return;
 #endif
-        eina_array_push(&e->pending_objects, obj);
-       obj->changed = 1;
-     }
+          eina_array_push(&e->pending_objects, obj);
+          obj->changed = 1;
+       }
 }
 
-
 /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
index 0204a41..eb48bb8 100644 (file)
@@ -6,20 +6,6 @@ static void _evas_smart_class_callbacks_create(Evas_Smart *s);
 
 /* all public */
 
-/**
- * @addtogroup Evas_Smart_Group
- * @{
- */
-
-/**
- * Free an Evas_Smart
- *
- * If this smart was created using evas_smart_class_new(), the associated
- * Evas_Smart_Class will not be freed.
- *
- * @param s the Evas_Smart to free
- *
- */
 EAPI void
 evas_smart_free(Evas_Smart *s)
 {
@@ -33,12 +19,6 @@ evas_smart_free(Evas_Smart *s)
    free(s);
 }
 
-/**
- * Creates an Evas_Smart from an Evas_Smart_Class.
- *
- * @param sc the smart class definition
- * @return an Evas_Smart
- */
 EAPI Evas_Smart *
 evas_smart_class_new(const Evas_Smart_Class *sc)
 {
@@ -60,12 +40,6 @@ evas_smart_class_new(const Evas_Smart_Class *sc)
    return s;
 }
 
-/**
- * Get the Evas_Smart_Class of an Evas_Smart
- *
- * @param s the Evas_Smart
- * @return the Evas_Smart_Class
- */
 EAPI const Evas_Smart_Class *
 evas_smart_class_get(const Evas_Smart *s)
 {
@@ -75,15 +49,6 @@ evas_smart_class_get(const Evas_Smart *s)
    return s->smart_class;
 }
 
-/**
- * @brief Get the data pointer set on an Evas_Smart.
- *
- * @param s Evas_Smart
- *
- * This data pointer is set either as the final parameter to
- * evas_smart_new or 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)
 {
@@ -93,37 +58,6 @@ evas_smart_data_get(const Evas_Smart *s)
    return (void *)s->smart_class->data;
 }
 
-/**
- * Get the callbacks known by this Evas_Smart.
- *
- * This is likely different from Evas_Smart_Class::callbacks as it
- * will contain the callbacks of all class hierarchy sorted, while the
- * direct smart class member refers only to that specific class and
- * should not include parent's.
- *
- * If no callbacks are known, this function returns @c NULL.
- *
- * The array elements and thus their contents will be reference to
- * original values given to evas_smart_new() as
- * Evas_Smart_Class::callbacks.
- *
- * The array is sorted by name. The last array element is the @c NULL
- * pointer and is not counted in @a count. Loop iterations can check
- * any of these cases.
- *
- * @param s the Evas_Smart.
- * @param count returns the number of elements in returned array.
- * @return the array with callback descriptions known by this class,
- *         its size is returned in @a count parameter. It should not
- *         be modified anyhow. If no callbacks are known, @c NULL is
- *         returned. The array is sorted by name and elements refer to
- *         the original value given to evas_smart_new().
- *
- * @note objects may provide per-instance callbacks, use
- *       evas_object_smart_callbacks_descriptions_get() to get those
- *       as well.
- * @see evas_object_smart_callbacks_descriptions_get()
- */
 EAPI const Evas_Smart_Cb_Description **
 evas_smart_callbacks_descriptions_get(const Evas_Smart *s, unsigned int *count)
 {
@@ -136,16 +70,6 @@ evas_smart_callbacks_descriptions_get(const Evas_Smart *s, unsigned int *count)
    return s->callbacks.array;
 }
 
-/**
- * Find callback description for callback called @a name.
- *
- * @param s the Evas_Smart.
- * @param name name of desired callback, must @b not be @c NULL.  The
- *        search have a special case for @a name being the same
- *        pointer as registered with Evas_Smart_Cb_Description, one
- *        can use it to avoid excessive use of strcmp().
- * @return reference to description if found, @c NULL if not found.
- */
 EAPI const Evas_Smart_Cb_Description *
 evas_smart_callback_description_find(const Evas_Smart *s, const char *name)
 {
@@ -156,23 +80,6 @@ evas_smart_callback_description_find(const Evas_Smart *s, const char *name)
    return evas_smart_cb_description_find(&s->callbacks, name);
 }
 
-/**
- * Sets one class to inherit from the other.
- *
- * Copy all function pointers, set @c parent to @a parent_sc and copy
- * everything after sizeof(Evas_Smart_Class) present in @a parent_sc,
- * using @a parent_sc_size as reference.
- *
- * This is recommended instead of a single memcpy() since it will take
- * care to not modify @a sc name, version, callbacks and possible
- * other members.
- *
- * @param sc child class.
- * @param parent_sc parent class, will provide attributes.
- * @param parent_sc_size size of parent_sc structure, child should be at least
- *        this size. Everything after @c Evas_Smart_Class size is copied
- *        using regular memcpy().
- */
 EAPI Eina_Bool
 evas_smart_class_inherit_full(Evas_Smart_Class *sc, const Evas_Smart_Class *parent_sc, unsigned int parent_sc_size)
 {
@@ -205,9 +112,15 @@ evas_smart_class_inherit_full(Evas_Smart_Class *sc, const Evas_Smart_Class *pare
    return 1;
 }
 
-/**
- * @}
- */
+EAPI int
+evas_smart_usage_get(const Evas_Smart *s)
+{
+   MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART);
+   return 0;
+   MAGIC_CHECK_END();
+   return s->usage;
+}
+
 
 /* internal funcs */
 void
@@ -233,24 +146,24 @@ evas_smart_cb_descriptions_resize(Evas_Smart_Cb_Description_Array *a, unsigned i
 
    if (size == 0)
      {
-       free(a->array);
-       a->array = NULL;
-       a->size = 0;
-       return 1;
+        free(a->array);
+        a->array = NULL;
+        a->size = 0;
+        return 1;
      }
 
    tmp = realloc(a->array, (size + 1) * sizeof(Evas_Smart_Cb_Description *));
    if (tmp)
      {
-       a->array = tmp;
-       a->size = size;
-       a->array[size] = NULL;
-       return 1;
+        a->array = tmp;
+        a->size = size;
+        a->array[size] = NULL;
+        return 1;
      }
    else
      {
-       ERR("realloc failed!");
-       return 0;
+        ERR("realloc failed!");
+        return 0;
      }
 }
 
@@ -269,12 +182,12 @@ evas_smart_cb_descriptions_fix(Evas_Smart_Cb_Description_Array *a)
 
    if (!a)
      {
-       ERR("no array to fix!");
-       return;
+        ERR("no array to fix!");
+        return;
      }
 
    qsort(a->array, a->size, sizeof(Evas_Smart_Cb_Description *),
-        _evas_smart_cb_description_cmp_sort);
+         _evas_smart_cb_description_cmp_sort);
 
    DBG("%u callbacks", a->size);
    if (a->size)
@@ -282,29 +195,29 @@ evas_smart_cb_descriptions_fix(Evas_Smart_Cb_Description_Array *a)
 
    for (i = 0, j = 1; j < a->size; j++)
      {
-       const Evas_Smart_Cb_Description *cur, *prev;
-
-       cur = a->array[j];
-       prev = a->array[i];
-
-       DBG("%s [type=%s]", cur->name, cur->type);
-
-       if (strcmp(cur->name, prev->name) != 0)
-         {
-            i++;
-            if (i != j)
-              a->array[i] = a->array[j];
-         }
-       else
-         {
-            if (strcmp(cur->type, prev->type) == 0)
-              WRN("duplicated smart callback description"
-                  " with name '%s' and type '%s'", cur->name, cur->type);
-            else
-              ERR("callback descriptions named '%s' differ"
-                  " in type, keeping '%s', ignoring '%s'",
-                  cur->name, prev->type, cur->type);
-         }
+        const Evas_Smart_Cb_Description *cur, *prev;
+
+        cur = a->array[j];
+        prev = a->array[i];
+
+        DBG("%s [type=%s]", cur->name, cur->type);
+
+        if (strcmp(cur->name, prev->name) != 0)
+          {
+             i++;
+             if (i != j)
+               a->array[i] = a->array[j];
+          }
+        else
+          {
+             if (strcmp(cur->type, prev->type) == 0)
+               WRN("duplicated smart callback description"
+                   " with name '%s' and type '%s'", cur->name, cur->type);
+             else
+               ERR("callback descriptions named '%s' differ"
+                   " in type, keeping '%s', ignoring '%s'",
+                   cur->name, prev->type, cur->type);
+          }
      }
 
    evas_smart_cb_descriptions_resize(a, i + 1);
@@ -318,18 +231,18 @@ _evas_smart_class_callbacks_create(Evas_Smart *s)
 
    for (sc = s->smart_class; sc; sc = sc->parent)
      {
-       const Evas_Smart_Cb_Description *d;
-       for (d = sc->callbacks; d && d->name; d++)
-         n++;
+        const Evas_Smart_Cb_Description *d;
+        for (d = sc->callbacks; d && d->name; d++)
+          n++;
      }
 
    if (n == 0) return;
    if (!evas_smart_cb_descriptions_resize(&s->callbacks, n)) return;
    for (n = 0, sc = s->smart_class; sc; sc = sc->parent)
      {
-       const Evas_Smart_Cb_Description *d;
-       for (d = sc->callbacks; d && d->name; d++)
-         s->callbacks.array[n++] = d;
+        const Evas_Smart_Cb_Description *d;
+        for (d = sc->callbacks; d && d->name; d++)
+          s->callbacks.array[n++] = d;
      }
    evas_smart_cb_descriptions_fix(&s->callbacks);
 }
@@ -349,5 +262,5 @@ evas_smart_cb_description_find(const Evas_Smart_Cb_Description_Array *a, const c
 {
    if (!a->array) return NULL;
    return bsearch(name, a->array, a->size, sizeof(Evas_Smart_Cb_Description *),
-                 _evas_smart_cb_description_cmp_search);
+                  _evas_smart_cb_description_cmp_search);
 }
index 8369705..bf7aa21 100644 (file)
@@ -37,16 +37,6 @@ evas_object_below_get_internal(const Evas_Object *obj)
    return NULL;
 }
 
-/**
- * @addtogroup Evas_Object_Group_Basic
- * @{
- */
-
-/**
- * Raise @p obj to the top of its layer.
- *
- * @param obj the object to raise
- */
 EAPI void
 evas_object_raise(Evas_Object *obj)
 {
@@ -96,11 +86,6 @@ evas_object_raise(Evas_Object *obj)
      }
 }
 
-/**
- * Lower @p obj to the bottom of its layer.
- *
- * @param obj the object to lower
- */
 EAPI void
 evas_object_lower(Evas_Object *obj)
 {
@@ -150,18 +135,6 @@ evas_object_lower(Evas_Object *obj)
      }
 }
 
-/**
- * Stack @p obj immediately above @p above
- *
- * If @p obj is a member of a smart object, then @p above must also be
- * a member of the same smart object.
- *
- * Similarly, if @p obj is not a member of smart object, @p above may
- * not either.
- *
- * @param obj the object to stack
- * @param above the object above which to stack
- */
 EAPI void
 evas_object_stack_above(Evas_Object *obj, Evas_Object *above)
 {
@@ -242,18 +215,6 @@ evas_object_stack_above(Evas_Object *obj, Evas_Object *above)
      }
 }
 
-/**
- * Stack @p obj immediately below @p below
- *
- * If @p obj is a member of a smart object, then @p below must also be
- * a member of the same smart object.
- *
- * Similarly, if @p obj is not a member of smart object, @p below may
- * not either.
- *
- * @param obj the object to stack
- * @param below the object below which to stack
- */
 EAPI void
 evas_object_stack_below(Evas_Object *obj, Evas_Object *below)
 {
@@ -334,12 +295,6 @@ evas_object_stack_below(Evas_Object *obj, Evas_Object *below)
      }
 }
 
-/**
- * Get the evas object above @p obj
- *
- * @param obj an Evas_Object
- * @return the Evas_Object directly above
- */
 EAPI Evas_Object *
 evas_object_above_get(const Evas_Object *obj)
 {
@@ -365,12 +320,6 @@ evas_object_above_get(const Evas_Object *obj)
    return NULL;
 }
 
-/**
- * Get the evas object below @p obj
- *
- * @param obj an Evas_Object
- * @return the Evas_Object directly below
- */
 EAPI Evas_Object *
 evas_object_below_get(const Evas_Object *obj)
 {
@@ -396,21 +345,8 @@ evas_object_below_get(const Evas_Object *obj)
    return NULL;
 }
 
-/**
- * @}
- */
 
-/**
- * @addtogroup Evas_Object_Group_Find
- * @{
- */
 
-/**
- * Get the lowest evas object on the Evas @p e
- *
- * @param e an Evas
- * @return the lowest object
- */
 EAPI Evas_Object *
 evas_object_bottom_get(const Evas *e)
 {
@@ -431,12 +367,6 @@ evas_object_bottom_get(const Evas *e)
    return NULL;
 }
 
-/**
- * Get the highest evas object on the Evas @p e
- *
- * @param e an Evas
- * @return the highest object
- */
 EAPI Evas_Object *
 evas_object_top_get(const Evas *e)
 {
@@ -468,7 +398,3 @@ evas_object_top_get(const Evas *e)
 
    return obj;
 }
-
-/**
- * @}
- */
index 94cb27b..e141cae 100644 (file)
@@ -2,11 +2,6 @@
 #include "evas_private.h"
 #include "evas_cs.h"
 
-/**
- * Retrieves if the system wants to share bitmaps using the server.
- * @return @c EINA_TRUE if wants, @c EINA_FALSE otherwise.
- * @ingroup Evas_Cserve
- */
 EAPI Eina_Bool
 evas_cserve_want_get(void)
 {
@@ -16,11 +11,6 @@ evas_cserve_want_get(void)
    return 0;
 }
 
-/**
- * Retrieves if the system is connected to the server used to shae bitmaps.
- * @return @c EINA_TRUE if connected, @c EINA_FALSE otherwise.
- * @ingroup Evas_Cserve
- */
 EAPI Eina_Bool
 evas_cserve_connected_get(void)
 {
@@ -30,14 +20,6 @@ evas_cserve_connected_get(void)
    return 0;
 }
 
-/**
- * Retrieves if the system wants to share bitmaps using the server.
- * @param stats pointer to structure to fill with statistics about
- *        cache server.
- * @return @c EINA_TRUE if @p stats were filled with data,
- *         @c EINA_FALSE otherwise and @p stats is untouched.
- * @ingroup Evas_Cserve
- */
 EAPI Eina_Bool
 evas_cserve_stats_get(Evas_Cserve_Stats *stats)
 {
@@ -155,13 +137,6 @@ evas_cserve_image_cache_contents_clean(Evas_Cserve_Image_Cache *cache)
 #endif
 }
 
-/**
- * Retrieves the current configuration of the server.
- * @param config where to store current server configuration.
- * @return @c EINA_TRUE if @p config were filled with data,
- *         @c EINA_FALSE otherwise and @p config is untouched.
- * @ingroup Evas_Cserve
- */
 EAPI Eina_Bool
 evas_cserve_config_get(Evas_Cserve_Config *config)
 {
@@ -179,13 +154,6 @@ evas_cserve_config_get(Evas_Cserve_Config *config)
 #endif
 }
 
-/**
- * Changes the configuration of the server.
- * @param config where to store current server configuration.
- * @return @c EINA_TRUE if @p config were successfully applied,
- *         @c EINA_FALSE otherwise.
- * @ingroup Evas_Cserve
- */
 EAPI Eina_Bool
 evas_cserve_config_set(const Evas_Cserve_Config *config)
 {
@@ -202,10 +170,6 @@ evas_cserve_config_set(const Evas_Cserve_Config *config)
 #endif
 }
 
-/**
- * Force system to disconnect from cache server.
- * @ingroup Evas_Cserve
- */
 EAPI void
 evas_cserve_disconnect(void)
 {
diff --git a/src/lib/canvas/evas_transform.c b/src/lib/canvas/evas_transform.c
deleted file mode 100644 (file)
index b28c2cc..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "evas_common.h"
-#include "evas_private.h"
index 5d33c81..6ff6e2a 100644 (file)
@@ -13,7 +13,8 @@ AM_CPPFLAGS = \
 @FRIBIDI_CFLAGS@ \
 @EET_CFLAGS@ \
 @FONTCONFIG_CFLAGS@ \
-@pthread_cflags@
+@pthread_cflags@ \
+@PIXMAN_CFLAGS@
 
 if EVAS_CSERVE
 
index ffbefd3..73bbaed 100644 (file)
@@ -137,6 +137,7 @@ typedef struct
       struct {
          int x, y, w, h;
       } region;
+      Eina_Bool orientation;
    } lopt;
 } Op_Load; // +"file""key"
 typedef struct
@@ -272,7 +273,7 @@ EAPI Mem *evas_cserve_mem_new(int size, const char *name);
 EAPI void evas_cserve_mem_free(Mem *m);
     
 // for client
-EAPI Mem *evas_cserve_mem_open(int pid, int id, const char *name, int size, int write);
+EAPI Mem *evas_cserve_mem_open(int pid, int id, const char *name, int size, int do_write);
 EAPI void evas_cserve_mem_close(Mem *m);
 
 // for both
index e49074c..b24848d 100644 (file)
@@ -302,6 +302,7 @@ evas_cserve_image_load(Image_Entry *ie, const char *file, const char *key, RGBA_
    msg.lopt.region.y = lopt->region.y;
    msg.lopt.region.w = lopt->region.w;
    msg.lopt.region.h = lopt->region.h;
+   msg.lopt.orientation = lopt->orientation;
    if (file[0] != '/')
      {
         if (getcwd(wdb, sizeof(wdb)))
index 1fff9ba..c1a9782 100644 (file)
@@ -71,7 +71,7 @@ evas_cserve_mem_free(Mem *m)
 }
 
 EAPI Mem *
-evas_cserve_mem_open(int pid, int id, const char *name, int size, int write)
+evas_cserve_mem_open(int pid, int id, const char *name, int size, int do_write)
 {
    Mem *m;
    char buf[PATH_MAX];
@@ -89,7 +89,7 @@ evas_cserve_mem_open(int pid, int id, const char *name, int size, int write)
         return NULL;
      }
    m->size = size;
-   if (write)
+   if (do_write)
      m->fd = shm_open(m->name, O_RDWR, S_IRUSR | S_IWUSR);
    else
      m->fd = shm_open(m->name, O_RDONLY, S_IRUSR);
@@ -99,8 +99,8 @@ evas_cserve_mem_open(int pid, int id, const char *name, int size, int write)
         free(m);
         return NULL;
      }
-   m->write = write;
-   if (write)
+   m->write = do_write;
+   if (do_write)
      m->data = mmap(NULL, m->size, PROT_READ | PROT_WRITE, MAP_SHARED, m->fd, 0);
    else
      m->data = mmap(NULL, m->size, PROT_READ, MAP_SHARED, m->fd, 0);
diff --git a/src/lib/engines/.cvsignore b/src/lib/engines/.cvsignore
deleted file mode 100644 (file)
index 3dda729..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile.in
-Makefile
diff --git a/src/lib/engines/common/.cvsignore b/src/lib/engines/common/.cvsignore
deleted file mode 100644 (file)
index 306efda..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile.in
-Makefile
-.deps
-.libs
-libevas_engine_common.la
-*.lo
index 62b96aa..5a059b8 100644 (file)
@@ -11,9 +11,11 @@ AM_CPPFLAGS       = -I. \
                       -DPACKAGE_LIB_DIR=\"$(libdir)\" \
                       -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
                       @FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \
+                       @PIXMAN_CFLAGS@ \
                       @EET_CFLAGS@ @pthread_cflags@ \
                       @WIN32_CFLAGS@ @EINA_CFLAGS@ \
-                       @FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@
+                       @FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \
+                       @PIXMAN_CFLAGS@
 
 noinst_LTLIBRARIES      = libevas_engine_common.la
 libevas_engine_common_la_SOURCES  = \
@@ -102,6 +104,7 @@ evas_scale_span.h \
 evas_pipe.h \
 language/evas_bidi_utils.h \
 language/evas_language_utils.h \
+language/evas_script_table.h \
 evas_text_utils.h \
 evas_font_ot.h \
 evas_map_image_internal.c \
index d8055eb..4c077b3 100644 (file)
@@ -7,13 +7,9 @@
 #define ALIGN_FIX
 
 static void evas_common_copy_pixels_c        (DATA32 *src, DATA32 *dst, int len);
-#ifdef BUILD_MMX
 static void evas_common_copy_pixels_mmx      (DATA32 *src, DATA32 *dst, int len);
 static void evas_common_copy_pixels_mmx2     (DATA32 *src, DATA32 *dst, int len);
-#endif
-#ifdef BUILD_SSE
 static void evas_common_copy_pixels_sse/*NB*/ (DATA32 *src, DATA32 *dst, int len);
-#endif
 
 #ifdef BUILD_NEON
 static void evas_common_copy_pixels_neon     (DATA32 *src, DATA32 *dst, int len);
@@ -21,12 +17,8 @@ static void evas_common_copy_pixels_rev_neon (DATA32 *src, DATA32 *dst, int len)
 #endif
 
 static void evas_common_copy_pixels_rev_c           (DATA32 *src, DATA32 *dst, int len);
-#ifdef BUILD_MMX
 static void evas_common_copy_pixels_rev_mmx         (DATA32 *src, DATA32 *dst, int len);
-#endif
-#ifdef BUILD_SSE
 static void evas_common_copy_pixels_rev_sse/*NB*/ (DATA32 *src, DATA32 *dst, int len);
-#endif
 
 static void evas_common_copy_rev_pixels_c           (DATA32 *src, DATA32 *dst, int len);
 
index eb628c7..34e0ed3 100644 (file)
@@ -19,10 +19,9 @@ EAPI void               evas_common_draw_context_set_multiplier          (RGBA_D
 EAPI void               evas_common_draw_context_unset_multiplier        (RGBA_Draw_Context *dc);
 EAPI void               evas_common_draw_context_set_mask                (RGBA_Draw_Context *dc, RGBA_Image *im, int x, int y, int w, int h);
 EAPI void               evas_common_draw_context_unset_mask              (RGBA_Draw_Context *dc);
-
 EAPI Cutout_Rects      *evas_common_draw_context_cutouts_new             (void);
 EAPI void               evas_common_draw_context_cutouts_free            (Cutout_Rects* rects);
-EAPI void               evas_common_draw_context_cutouts_del             (Cutout_Rects* rects, int index);
+EAPI void               evas_common_draw_context_cutouts_del             (Cutout_Rects* rects, int idx);
 EAPI void               evas_common_draw_context_add_cutout              (RGBA_Draw_Context *dc, int x, int y, int w, int h);
 EAPI void               evas_common_draw_context_clear_cutouts           (RGBA_Draw_Context *dc);
 EAPI Cutout_Rects      *evas_common_draw_context_apply_cutouts           (RGBA_Draw_Context *dc);
index e2d4568..7652708 100644 (file)
@@ -18,16 +18,15 @@ evas_common_draw_context_cutouts_free(Cutout_Rects* rects)
 }
 
 EAPI void
-evas_common_draw_context_cutouts_del(Cutout_Rects* rects,
-                                     int index)
+evas_common_draw_context_cutouts_del(Cutout_Rects* rects, int idx)
 {
-   if ((index >= 0) && (index < rects->active))
+   if ((idx >= 0) && (idx < rects->active))
      {
-        Cutout_Rect*    rect;
+        Cutout_Rect *rect;
 
-       rect = rects->rects + index;
+       rect = rects->rects + idx;
         memmove(rect, rect + 1,
-               sizeof(Cutout_Rect) * (rects->active - index - 1));
+               sizeof(Cutout_Rect) * (rects->active - idx - 1));
         rects->active--;
      }
 }
@@ -212,10 +211,10 @@ evas_common_draw_context_add_cutout(RGBA_Draw_Context *dc, int x, int y, int w,
 }
 
 int
-evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect *split)
+evas_common_draw_context_cutout_split(Cutout_Rects* res, int idx, Cutout_Rect *split)
 {
    /* 1 input rect, multiple out */
-   Cutout_Rect  in = res->rects[index];
+   Cutout_Rect in = res->rects[idx];
 
    /* this is to save me a LOT of typing */
 #define INX1 (in.x)
@@ -255,8 +254,8 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
        R_NEW(res, in.x, SPY1, SPX1 - in.x, SPY2 - SPY1);
        R_NEW(res, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1);
         /* out => (in.x, SPY2, in.w, INY2 - SPY2) */
-        res->rects[index].h = INY2 - SPY2;
-        res->rects[index].y = SPY2;
+        res->rects[idx].h = INY2 - SPY2;
+        res->rects[idx].y = SPY2;
        return 1;
      }
    /* SSSSSSS
@@ -269,7 +268,7 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
     */
    if (!X1_IN && !X2_IN && !Y1_IN && !Y2_IN)
      {
-        evas_common_draw_context_cutouts_del(res, index);
+        evas_common_draw_context_cutouts_del(res, idx);
        return 0;
      }
    /* SSS
@@ -283,8 +282,8 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
    if (!X1_IN && X2_IN && !Y1_IN && !Y2_IN)
      {
         /* in => (SPX2, in.y, INX2 - SPX2, in.h) */
-        res->rects[index].w = INX2 - SPX2;
-        res->rects[index].x = SPX2;
+        res->rects[idx].w = INX2 - SPX2;
+        res->rects[idx].x = SPX2;
        return 1;
      }
    /*    S
@@ -299,8 +298,8 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
      {
         R_NEW(res, in.x, in.y, SPX1 - in.x, in.h);
         /* in => (SPX2, in.y, INX2 - SPX2, in.h) */
-        res->rects[index].w = INX2 - SPX2;
-        res->rects[index].x = SPX2;
+        res->rects[idx].w = INX2 - SPX2;
+        res->rects[idx].x = SPX2;
        return 1;
      }
    /*     SSS
@@ -314,7 +313,7 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
    if (X1_IN && !X2_IN && !Y1_IN && !Y2_IN)
      {
         /* in => (in.x, in.y, SPX1 - in.x, in.h) */
-        res->rects[index].w = SPX1 - in.x;
+        res->rects[idx].w = SPX1 - in.x;
        return 1;
      }
    /* SSSSSSS
@@ -328,8 +327,8 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
    if (!X1_IN && !X2_IN && !Y1_IN && Y2_IN)
      {
         /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
-        res->rects[index].h = INY2 - SPY2;
-        res->rects[index].y = SPY2;
+        res->rects[idx].h = INY2 - SPY2;
+        res->rects[idx].y = SPY2;
        return 1;
      }
    /*
@@ -344,7 +343,7 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
      {
         R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2);
         /* in => (in.x, in.y, in.w, SPY1 - in.y) */
-        res->rects[index].h = SPY1 - in.y;
+        res->rects[idx].h = SPY1 - in.y;
        return 1;
      }
    /*
@@ -358,7 +357,7 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
    if (!X1_IN && !X2_IN && Y1_IN && !Y2_IN)
      {
         /* in => (in.x, in.y, in.w, SPY1 - in.y) */
-        res->rects[index].h = SPY1 - in.y;
+        res->rects[idx].h = SPY1 - in.y;
        return 1;
      }
    /* SSS
@@ -373,8 +372,8 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
      {
        R_NEW(res, SPX2, in.y, INX2 - SPX2, SPY2 - in.y);
         /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
-        res->rects[index].h = INY2 - SPY2;
-        res->rects[index].y = SPY2;
+        res->rects[idx].h = INY2 - SPY2;
+        res->rects[idx].y = SPY2;
        return 1;
      }
    /*    S
@@ -390,8 +389,8 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
        R_NEW(res, in.x, in.y, SPX1 - in.x, SPY2 - in.y);
        R_NEW(res, SPX2, in.y, INX2 - SPX2, SPY2 - in.y);
         /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
-        res->rects[index].h = INY2 - SPY2;
-        res->rects[index].y = SPY2;
+        res->rects[idx].h = INY2 - SPY2;
+        res->rects[idx].y = SPY2;
        return 1;
      }
    /*     SSS
@@ -406,8 +405,8 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
      {
        R_NEW(res, in.x, in.y, SPX1 - in.x, SPY2 - in.y);
         /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
-        res->rects[index].h = INY2 - SPY2;
-        res->rects[index].y = SPY2;
+        res->rects[idx].h = INY2 - SPY2;
+        res->rects[idx].y = SPY2;
        return 1;
      }
    /*
@@ -423,7 +422,7 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
        R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2);
        R_NEW(res, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1);
         /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
-        res->rects[index].h = SPY1 - in.y;
+        res->rects[idx].h = SPY1 - in.y;
        return 1;
      }
    /*
@@ -439,7 +438,7 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
        R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2);
        R_NEW(res, in.x, SPY1, SPX1 - in.x, SPY2 - SPY1);
         /* in => (in.x, in.y, in.w, SPY1 - in.y) */
-        res->rects[index].h = SPY1 - in.y;
+        res->rects[idx].h = SPY1 - in.y;
        return 1;
      }
    /*
@@ -454,7 +453,7 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
      {
         R_NEW(res, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1);
         /* in => (in.x, in.y, in.w, SPY1 - in.y) */
-        res->rects[index].h = SPY1 - in.y;
+        res->rects[idx].h = SPY1 - in.y;
        return 1;
      }
    /*
@@ -470,7 +469,7 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
        R_NEW(res, in.x, SPY1, SPX1 - in.x, INY2 - SPY1);
         R_NEW(res, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1);
         /* in => (in.x, in.y, in.w, SPY1 - in.y) */
-        res->rects[index].h = SPY1 - in.y;
+        res->rects[idx].h = SPY1 - in.y;
        return 1;
      }
    /*
@@ -485,10 +484,10 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
      {
         R_NEW(res, in.x, SPY1, SPX1 - in.x, INY2 - SPY1);
         /* in => (in.x, in.y, in.w, SPY1 - in.y) */
-        res->rects[index].h = SPY1 - in.y;
+        res->rects[idx].h = SPY1 - in.y;
        return 1;
      }
-   evas_common_draw_context_cutouts_del(res, index);
+   evas_common_draw_context_cutouts_del(res, idx);
    return 0;
 #undef INX1
 #undef INX2
index 13e5dc5..533d897 100644 (file)
@@ -17,9 +17,10 @@ EAPI int               evas_common_font_get_line_advance     (RGBA_Font *fn);
 
 /* draw */
 
-EAPI void              evas_common_font_draw                 (RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Eina_Unicode *text, const Evas_Text_Props *intl_props);
-EAPI int               evas_common_font_glyph_search         (RGBA_Font *fn, RGBA_Font_Int **fi_ret, int gl);
+EAPI void              evas_common_font_draw                 (RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Evas_Text_Props *intl_props);
+EAPI int               evas_common_font_glyph_search         (RGBA_Font *fn, RGBA_Font_Int **fi_ret, Eina_Unicode gl);
 EAPI RGBA_Font_Glyph  *evas_common_font_int_cache_glyph_get  (RGBA_Font_Int *fi, FT_UInt index);
+EAPI FT_UInt           evas_common_get_char_index            (RGBA_Font_Int* fi, Eina_Unicode gl);
 EAPI void              evas_common_font_draw_init            (void);
 
 /* load */
@@ -30,40 +31,40 @@ EAPI int               evas_common_font_source_load_complete (RGBA_Font_Source *
 EAPI RGBA_Font_Source *evas_common_font_source_find          (const char *name);
 EAPI void              evas_common_font_source_free          (RGBA_Font_Source *fs);
 EAPI void              evas_common_font_size_use             (RGBA_Font *fn);
-EAPI RGBA_Font        *evas_common_font_memory_load          (const char *name, int size, const void *data, int data_size);
-EAPI RGBA_Font_Int    *evas_common_font_int_load             (const char *name, int size);
+EAPI RGBA_Font_Int    *evas_common_font_int_load             (const char *name, int size, Font_Rend_Flags wanted_rend);
 EAPI RGBA_Font_Int    *evas_common_font_int_load_init        (RGBA_Font_Int *fn);
 EAPI RGBA_Font_Int    *evas_common_font_int_load_complete    (RGBA_Font_Int *fi);
-EAPI RGBA_Font        *evas_common_font_memory_load          (const char *name, int size, const void *data, int data_size);
-EAPI RGBA_Font        *evas_common_font_load                 (const char *name, int size);
-EAPI RGBA_Font        *evas_common_font_add                  (RGBA_Font *fn, const char *name, int size);
-EAPI RGBA_Font        *evas_common_font_memory_add           (RGBA_Font *fn, const char *name, int size, const void *data, int data_size);
+EAPI RGBA_Font        *evas_common_font_memory_load          (const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend);
+EAPI RGBA_Font        *evas_common_font_load                 (const char *name, int size, Font_Rend_Flags wanted_rend);
+EAPI RGBA_Font        *evas_common_font_add                  (RGBA_Font *fn, const char *name, int size, Font_Rend_Flags wanted_rend);
+EAPI RGBA_Font        *evas_common_font_memory_add           (RGBA_Font *fn, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend);
 EAPI void              evas_common_font_free                 (RGBA_Font *fn);
 EAPI void              evas_common_font_hinting_set          (RGBA_Font *fn, Font_Hint_Flags hinting);
 EAPI Eina_Bool         evas_common_hinting_available         (Font_Hint_Flags hinting);
-EAPI RGBA_Font        *evas_common_font_memory_hinting_load  (const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting);
-EAPI RGBA_Font        *evas_common_font_hinting_load         (const char *name, int size, Font_Hint_Flags hinting);
-EAPI RGBA_Font        *evas_common_font_hinting_add          (RGBA_Font *fn, const char *name, int size, Font_Hint_Flags hinting);
-EAPI RGBA_Font        *evas_common_font_memory_hinting_add   (RGBA_Font *fn, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting);
+EAPI RGBA_Font        *evas_common_font_memory_hinting_load  (const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend);
+EAPI RGBA_Font        *evas_common_font_hinting_load         (const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend);
+EAPI RGBA_Font        *evas_common_font_hinting_add          (RGBA_Font *fn, const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend);
+EAPI RGBA_Font        *evas_common_font_memory_hinting_add   (RGBA_Font *fn, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend);
 EAPI void              evas_common_font_int_modify_cache_by  (RGBA_Font_Int *fi, int dir);
 EAPI int               evas_common_font_cache_get            (void);
 EAPI void              evas_common_font_cache_set            (int size);
 EAPI void              evas_common_font_flush                (void);
 EAPI void              evas_common_font_flush_last           (void);
-EAPI RGBA_Font_Int    *evas_common_font_int_find             (const char *name, int size);
+EAPI RGBA_Font_Int    *evas_common_font_int_find             (const char *name, int size, Font_Rend_Flags wanted_rend);
 EAPI void              evas_common_font_all_clear            (void);
 
 /* query */
 
 EAPI int               evas_common_font_query_kerning        (RGBA_Font_Int* fi, FT_UInt left, FT_UInt right, int* kerning);
-EAPI void              evas_common_font_query_size           (RGBA_Font *fn, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int *w, int *h);
+EAPI void              evas_common_font_query_size           (RGBA_Font *fn, const Evas_Text_Props *intl_props, int *w, int *h);
 EAPI int               evas_common_font_query_inset          (RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props);
 EAPI int               evas_common_font_query_right_inset    (RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props);
-EAPI void              evas_common_font_query_advance        (RGBA_Font *fn, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int *h_adv, int *v_adv);
-EAPI int               evas_common_font_query_char_coords    (RGBA_Font *fn, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch);
-EAPI int               evas_common_font_query_pen_coords     (RGBA_Font *fn, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch);
-EAPI int               evas_common_font_query_char_at_coords (RGBA_Font *fn, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch);
-EAPI int               evas_common_font_query_last_up_to_pos (RGBA_Font *fn, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int x, int y);
+EAPI void              evas_common_font_query_advance        (RGBA_Font *fn, const Evas_Text_Props *intl_props, int *h_adv, int *v_adv);
+EAPI int               evas_common_font_query_char_coords    (RGBA_Font *fn, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch);
+EAPI int               evas_common_font_query_pen_coords     (RGBA_Font *fn, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch);
+EAPI int               evas_common_font_query_char_at_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch);
+EAPI int               evas_common_font_query_last_up_to_pos (RGBA_Font *fn, const Evas_Text_Props *intl_props, int x, int y);
+EAPI int               evas_common_font_query_run_font_end_get(RGBA_Font *fn, RGBA_Font_Int **script_fi, RGBA_Font_Int **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len);
 
 #ifdef EVAS_FRAME_QUEUING
 EAPI void evas_common_font_draw_finish(void);
index 704db21..56807b8 100644 (file)
  */
 # define EVAS_FONT_WALK_TEXT_INIT() \
         int _pen_x = 0, _pen_y = 0; \
+        Evas_Coord _start_pen = (text_props->info && \
+              (text_props->start > 0)) ? \
+           text_props->info->glyph[text_props->start - 1].pen_after : 0 ; \
         size_t char_index; \
         (void) _pen_y; /* Sometimes it won't be used */
 
 /* Visual walk helper macros */
 #ifdef OT_SUPPORT
-#define _EVAS_FONT_WALK_TEXT_VISUAL_START() \
+#define _EVAS_FONT_WALK_TEXT_START() \
         Evas_Font_OT_Info *_ot_itr = (text_props->info) ? \
            text_props->info->ot + text_props->start : NULL; \
         for (char_index = 0 ; char_index < text_props->len ; char_index++, _glyph_itr++, _ot_itr++) \
           {
 #else
-#define _EVAS_FONT_WALK_TEXT_VISUAL_START() \
+#define _EVAS_FONT_WALK_TEXT_START() \
         for (char_index = 0 ; char_index < text_props->len ; char_index++, _glyph_itr++) \
           {
 #endif
 
 /**
- * @def EVAS_FONT_WALK_TEXT_VISUAL_START
+ * @def EVAS_FONT_WALK_TEXT_START
  * @internal
  * This runs through the text in visual order while updating char_index,
  * which is the current index in the text.
  * @see EVAS_FONT_WALK_TEXT_INIT
  * @see EVAS_FONT_WALK_TEXT_WORK
  * @see EVAS_FONT_WALK_TEXT_END
- * @see EVAS_FONT_WALK_TEXT_LOGICAL_START
  */
-#define EVAS_FONT_WALK_TEXT_VISUAL_START() \
+#define EVAS_FONT_WALK_TEXT_START() \
    do \
      { \
         Evas_Font_Glyph_Info *_glyph_itr = (text_props->info) ? \
            text_props->info->glyph + text_props->start : NULL; \
-        _EVAS_FONT_WALK_TEXT_VISUAL_START()
-
-/* Logical walk helper macros */
-#ifdef OT_SUPPORT
-#define _EVAS_FONT_WALK_TEXT_LOGICAL_START() \
-        Evas_Font_OT_Info *_ot_itr = (text_props->info) ? \
-           text_props->info->ot + text_props->start : NULL; \
-        if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) \
-          _ot_itr += text_props->len - 1; \
-        for ( ; _i > 0 ; char_index += _char_index_d, _i--, _glyph_itr += _char_index_d, _ot_itr += _char_index_d) \
-          {
-#else
-#define _EVAS_FONT_WALK_TEXT_LOGICAL_START() \
-        for ( ; _i > 0 ; char_index += _char_index_d, _i--, _glyph_itr += _char_index_d) \
-          {
-#endif
-
-/**
- * @def EVAS_FONT_WALK_TEXT_LOGICAL_START
- * @internal
- * This runs through the text in logical order while updating char_index,
- * which is the current index in the text.
- * Does not end with a ;
- * Take a look at EVAS_FONT_WALK_X_OFF and the like.
- * @see EVAS_FONT_WALK_TEXT_INIT
- * @see EVAS_FONT_WALK_TEXT_WORK
- * @see EVAS_FONT_WALK_TEXT_END
- * @see EVAS_FONT_WALK_TEXT_VISUAL_START
- */
-#ifdef BIDI_SUPPORT
-#define EVAS_FONT_WALK_TEXT_LOGICAL_START() \
-   do \
-     { \
-        Evas_Font_Glyph_Info *_glyph_itr = (text_props->info) ? \
-           text_props->info->glyph + text_props->start : \
-           NULL; \
-        int _char_index_d; \
-        size_t _i; \
-        _i = text_props->len; \
-        if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) \
-          { \
-             char_index = text_props->len - 1; \
-             _char_index_d = -1; \
-             _glyph_itr += text_props->len - 1; \
-          } \
-        else \
-          { \
-             char_index = 0; \
-             _char_index_d = 1; \
-          } \
-        _EVAS_FONT_WALK_TEXT_LOGICAL_START()
-
-#else
-#define EVAS_FONT_WALK_TEXT_LOGICAL_START() EVAS_FONT_WALK_TEXT_VISUAL_START()
-#endif
-
-#define EVAS_FONT_WALK_ORIG_LEN (_len)
+        _EVAS_FONT_WALK_TEXT_START()
 
 /*FIXME: doc */
 #ifdef OT_SUPPORT
 #define EVAS_FONT_WALK_IS_VISIBLE (_glyph_itr->index != 0)
 #define EVAS_FONT_WALK_X_BEAR (_glyph_itr->x_bear)
 #define EVAS_FONT_WALK_Y_BEAR (fg->glyph_out->top)
-#define _EVAS_FONT_WALK_X_ADV (_glyph_itr->advance)
+#define EVAS_FONT_WALK_X_ADV ((_glyph_itr > text_props->info->glyph) ? \
+      _glyph_itr->pen_after - (_glyph_itr - 1)->pen_after : \
+      _glyph_itr->pen_after)
 #define EVAS_FONT_WALK_WIDTH (_glyph_itr->width)
 
 #define EVAS_FONT_WALK_INDEX (_glyph_itr->index)
-#define EVAS_FONT_WALK_X_ADV \
-             (EVAS_FONT_ROUND_26_6_TO_INT(_EVAS_FONT_WALK_X_ADV))
-#define EVAS_FONT_WALK_PEN_X (EVAS_FONT_ROUND_26_6_TO_INT(_pen_x))
+#define EVAS_FONT_WALK_PEN_X (_pen_x)
+#define EVAS_FONT_WALK_PEN_X_AFTER (_glyph_itr->pen_after - _start_pen)
 #define EVAS_FONT_WALK_PEN_Y (EVAS_FONT_ROUND_26_6_TO_INT(_pen_y))
 #define EVAS_FONT_WALK_Y_ADV (0)
 #define EVAS_FONT_WALK_IS_LAST \
 /**
  * @def EVAS_FONT_WALK_TEXT_WORK
  * @internal
- * This macro actually updates the values mentioned in EVAS_FONT_WALK_TEXT_VISUAL_START
+ * This macro actually updates the values mentioned in EVAS_FONT_WALK_TEXT_START
  * according to the current positing in the walk.
- * @see EVAS_FONT_WALK_TEXT_VISUAL_START
+ * @see EVAS_FONT_WALK_TEXT_START
  * @see EVAS_FONT_WALK_TEXT_INIT
  * @see EVAS_FONT_WALK_TEXT_END
  */
 /**
  * @def EVAS_FONT_WALK_TEXT_END
  * @internal
- * Closes EVAS_FONT_WALK_TEXT_VISUAL_START, needs to end with a ;
- * @see EVAS_FONT_WALK_TEXT_VISUAL_START
+ * Closes EVAS_FONT_WALK_TEXT_START, needs to end with a ;
+ * @see EVAS_FONT_WALK_TEXT_START
  * @see EVAS_FONT_WALK_TEXT_INIT
  * @see EVAS_FONT_WALK_TEXT_WORK
  */
 #define EVAS_FONT_WALK_TEXT_END() \
              if (EVAS_FONT_WALK_IS_VISIBLE) \
                { \
-                  _pen_x += _EVAS_FONT_WALK_X_ADV; \
+                  _pen_x = _glyph_itr->pen_after - _start_pen; \
                } \
           } \
      } \
    while(0)
 
-
 #endif
index 5845b35..913fd12 100644 (file)
 #define WORD_CACHE_MAXLEN      50
 /* How many to cache */
 #define WORD_CACHE_NWORDS 40
+
 static int max_cached_words = WORD_CACHE_NWORDS;
 
 struct prword 
 {
    EINA_INLIST;
-   /* FIXME: Need to save font/size et al */
-   int size;
    struct cinfo *cinfo;
-   RGBA_Font *font;
-   const Eina_Unicode *str;
-   int len;
+   Evas_Text_Props text_props;
    DATA8 *im;
    int roww;
    int width;
@@ -49,7 +46,7 @@ struct cinfo
 #if defined(METRIC_CACHE) || defined(WORD_CACHE)
 LK(lock_words); // for word cache call
 static Eina_Inlist *words = NULL;
-static struct prword *evas_font_word_prerender(RGBA_Draw_Context *dc, const Eina_Unicode *text, const Evas_Text_Props *text_props, int len, RGBA_Font *fn, RGBA_Font_Int *fi);
+static struct prword *evas_font_word_prerender(RGBA_Draw_Context *dc, const Evas_Text_Props *text_props);
 #endif
 
 EAPI void
@@ -75,322 +72,6 @@ evas_common_font_draw_finish(void)
 }
 #endif
 
-static void
-_fash_int2_free(Fash_Int_Map2 *fash)
-{
-   int i;
-
-   for (i = 0; i < 256; i++) if (fash->bucket[i]) free(fash->bucket[i]);
-   free(fash);
-}
-
-static void
-_fash_int_free(Fash_Int *fash)
-{
-   int i;
-
-   for (i = 0; i < 256; i++) if (fash->bucket[i]) _fash_int2_free(fash->bucket[i]);
-   free(fash);
-}
-
-static Fash_Int *
-_fash_int_new(void)
-{
-   Fash_Int *fash = calloc(1, sizeof(Fash_Int));
-   fash->freeme = _fash_int_free;
-   return fash;
-}
-
-static Fash_Item_Index_Map *
-_fash_int_find(Fash_Int *fash, int item)
-{
-   int grp, maj, min;
-
-   // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
-   grp = (item >> 16) & 0xff;
-   maj = (item >> 8) & 0xff;
-   min = item & 0xff;
-   if (!fash->bucket[grp]) return NULL;
-   if (!fash->bucket[grp]->bucket[maj]) return NULL;
-   return &(fash->bucket[grp]->bucket[maj]->item[min]);
-}
-
-static void
-_fash_int_add(Fash_Int *fash, int item, RGBA_Font_Int *fint, int index)
-{
-   int grp, maj, min;
-
-   // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
-   grp = (item >> 16) & 0xff;
-   maj = (item >> 8) & 0xff;
-   min = item & 0xff;
-   if (!fash->bucket[grp])
-     fash->bucket[grp] = calloc(1, sizeof(Fash_Int_Map2));
-   EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]);
-   if (!fash->bucket[grp]->bucket[maj])
-     fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Int_Map));
-   EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]);
-   fash->bucket[grp]->bucket[maj]->item[min].fint = fint;
-   fash->bucket[grp]->bucket[maj]->item[min].index = index;
-}
-
-static void
-_fash_gl2_free(Fash_Glyph_Map2 *fash)
-{
-   int i;
-
-   for (i = 0; i < 256; i++) if (fash->bucket[i]) free(fash->bucket[i]);
-   free(fash);
-}
-
-static void
-_fash_gl_free(Fash_Glyph *fash)
-{
-   int i;
-
-   for (i = 0; i < 256; i++) if (fash->bucket[i]) _fash_gl2_free(fash->bucket[i]);
-   free(fash);
-}
-
-static Fash_Glyph *
-_fash_gl_new(void)
-{
-   Fash_Glyph *fash = calloc(1, sizeof(Fash_Glyph));
-   fash->freeme = _fash_gl_free;
-   return fash;
-}
-
-static RGBA_Font_Glyph *
-_fash_gl_find(Fash_Glyph *fash, int item)
-{
-   int grp, maj, min;
-
-   // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
-   grp = (item >> 16) & 0xff;
-   maj = (item >> 8) & 0xff;
-   min = item & 0xff;
-   if (!fash->bucket[grp]) return NULL;
-   if (!fash->bucket[grp]->bucket[maj]) return NULL;
-   return fash->bucket[grp]->bucket[maj]->item[min];
-}
-
-static void
-_fash_gl_add(Fash_Glyph *fash, int item, RGBA_Font_Glyph *glyph)
-{
-   int grp, maj, min;
-
-   // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
-   grp = (item >> 16) & 0xff;
-   maj = (item >> 8) & 0xff;
-   min = item & 0xff;
-   if (!fash->bucket[grp])
-     fash->bucket[grp] = calloc(1, sizeof(Fash_Glyph_Map2));
-   EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]);
-   if (!fash->bucket[grp]->bucket[maj])
-     fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Glyph_Map));
-   EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]);
-   fash->bucket[grp]->bucket[maj]->item[min] = glyph;
-}
-
-EAPI RGBA_Font_Glyph *
-evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt index)
-{
-   RGBA_Font_Glyph *fg;
-   FT_UInt hindex;
-   FT_Error error;
-   int size;
-   const FT_Int32 hintflags[3] =
-     { FT_LOAD_NO_HINTING, FT_LOAD_FORCE_AUTOHINT, FT_LOAD_NO_AUTOHINT };
-
-   evas_common_font_int_promote(fi);
-   if (fi->fash)
-     {
-        fg = _fash_gl_find(fi->fash, index);
-        if (fg == (void *)(-1)) return NULL;
-        else if (fg) return fg;
-     }
-
-   hindex = index + (fi->hinting * 500000000);
-
-//   fg = eina_hash_find(fi->glyphs, &hindex);
-//   if (fg) return fg;
-
-   evas_common_font_int_reload(fi);
-   FTLOCK();
-//   error = FT_Load_Glyph(fi->src->ft.face, index, FT_LOAD_NO_BITMAP);
-   error = FT_Load_Glyph(fi->src->ft.face, index,
-                        FT_LOAD_RENDER | hintflags[fi->hinting]);
-   FTUNLOCK();
-   if (error)
-     {
-        if (!fi->fash) fi->fash = _fash_gl_new();
-        if (fi->fash) _fash_gl_add(fi->fash, index, (void *)(-1));
-        return NULL;
-     }
-
-   fg = malloc(sizeof(struct _RGBA_Font_Glyph));
-   if (!fg) return NULL;
-   memset(fg, 0, (sizeof(struct _RGBA_Font_Glyph)));
-
-   FTLOCK();
-   error = FT_Get_Glyph(fi->src->ft.face->glyph, &(fg->glyph));
-   FTUNLOCK();
-   if (error)
-     {
-       free(fg);
-        if (!fi->fash) fi->fash = _fash_gl_new();
-        if (fi->fash) _fash_gl_add(fi->fash, index, (void *)(-1));
-       return NULL;
-     }
-   if (fg->glyph->format != FT_GLYPH_FORMAT_BITMAP)
-     {
-        FTLOCK();
-       error = FT_Glyph_To_Bitmap(&(fg->glyph), FT_RENDER_MODE_NORMAL, 0, 1);
-       if (error)
-         {
-            FT_Done_Glyph(fg->glyph);
-             FTUNLOCK();
-            free(fg);
-             if (!fi->fash) fi->fash = _fash_gl_new();
-             if (fi->fash) _fash_gl_add(fi->fash, index, (void *)(-1));
-            return NULL;
-         }
-        FTUNLOCK();
-     }
-   fg->glyph_out = (FT_BitmapGlyph)fg->glyph;
-   fg->index = hindex;
-   fg->fi = fi;
-
-   if (!fi->fash) fi->fash = _fash_gl_new();
-   if (fi->fash) _fash_gl_add(fi->fash, index, fg);
-   /* This '+ 200' is just an estimation of how much memory freetype will use
-    * on it's size. This value is not really used anywhere in code - it's
-    * only for statistics. */
-   size = sizeof(RGBA_Font_Glyph) + sizeof(Eina_List) +
-    (fg->glyph_out->bitmap.width * fg->glyph_out->bitmap.rows) + 200;
-   fi->usage += size;
-   if (fi->inuse) evas_common_font_int_use_increase(size);
-
-//   eina_hash_direct_add(fi->glyphs, &fg->index, fg);
-   return fg;
-}
-
-typedef struct _Font_Char_Index Font_Char_Index;
-struct _Font_Char_Index
-{
-   FT_UInt index;
-   int gl;
-};
-
-static FT_UInt
-_evas_common_get_char_index(RGBA_Font_Int* fi, int gl)
-{
-   Font_Char_Index result;
-   //FT_UInt ret;
-
-#ifdef HAVE_PTHREAD
-///   pthread_mutex_lock(&fi->ft_mutex);
-#endif
-
-//   result = eina_hash_find(fi->indexes, &gl);
-//   if (result) goto on_correct;
-//
-//   result = malloc(sizeof (Font_Char_Index));
-//   if (!result)
-//     {
-//#ifdef HAVE_PTHREAD
-//     pthread_mutex_unlock(&fi->ft_mutex);
-//#endif
-//     return FT_Get_Char_Index(fi->src->ft.face, gl);
-//     }
-
-   evas_common_font_int_reload(fi);
-   FTLOCK();
-   result.index = FT_Get_Char_Index(fi->src->ft.face, gl);
-   FTUNLOCK();
-   result.gl = gl;
-
-//   eina_hash_direct_add(fi->indexes, &result->gl, result);
-//
-// on_correct:
-#ifdef HAVE_PTHREAD
-//   pthread_mutex_unlock(&fi->ft_mutex);
-#endif
-   return result.index;
-}
-
-EAPI int
-evas_common_font_glyph_search(RGBA_Font *fn, RGBA_Font_Int **fi_ret, int gl)
-{
-   Eina_List *l;
-
-   if (fn->fash)
-     {
-        Fash_Item_Index_Map *fm = _fash_int_find(fn->fash, gl);
-        if (fm)
-          {
-             if (fm->fint)
-               {
-                  *fi_ret = fm->fint;
-                  return fm->index;
-               }
-             else if (fm->index == -1) return 0;
-          }
-     }
-
-   for (l = fn->fonts; l; l = l->next)
-     {
-       RGBA_Font_Int *fi;
-       int index;
-
-       fi = l->data;
-
-#if 0 /* FIXME: charmap user is disabled and use a deprecated data type. */
-/*        
-       if (fi->src->charmap) // Charmap loaded, FI/FS blank
-         {
-            index = evas_array_hash_search(fi->src->charmap, gl);
-            if (index != 0)
-              {
-                 evas_common_font_source_load_complete(fi->src);
-                 evas_common_font_int_load_complete(fi);
-
-                 evas_array_hash_free(fi->src->charmap);
-                 fi->src->charmap = NULL;
-
-                 *fi_ret = fi;
-                 return index;
-               }
-           }
-        else
-*/
-#endif
-        if (!fi->src->ft.face) /* Charmap not loaded, FI/FS blank */
-         {
-             evas_common_font_int_reload(fi);
-         }
-        if (fi->src->ft.face)
-         {
-            index = _evas_common_get_char_index(fi, gl);
-            if (index != 0)
-              {
-                 if (!fi->ft.size)
-                     evas_common_font_int_load_complete(fi);
-                  if (!fn->fash) fn->fash = _fash_int_new();
-                  if (fn->fash) _fash_int_add(fn->fash, gl, fi, index);
-                 *fi_ret = fi;
-                 return index;
-              }
-             else
-               {
-                  if (!fn->fash) fn->fash = _fash_int_new();
-                  if (fn->fash) _fash_int_add(fn->fash, gl, NULL, -1);
-               }
-         }
-     }
-   return 0;
-}
-
 /* 
  * 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)
@@ -398,28 +79,41 @@ evas_common_font_glyph_search(RGBA_Font *fn, RGBA_Font_Int **fi_ret, int gl)
  * is on the right, and not on the left).
  */
 static void
-evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Eina_Unicode *in_text,
+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, 
-                               int ext_h, RGBA_Font_Int *fi, int im_w, int im_h __UNUSED__)
+                               int ext_h, int im_w, int im_h __UNUSED__)
 {
-   const Eina_Unicode *text = in_text;
    DATA32 *im;
    FT_Face pface = NULL;
+   RGBA_Font_Int *fi;
    EVAS_FONT_WALK_TEXT_INIT();
 
+   fi = text_props->font_instance;
+   if (fi)
+     {
+        evas_common_font_int_reload(fi);
+
+        if (fi->src->current_size != fi->size)
+          {
+             FTLOCK();
+             FT_Activate_Size(fi->ft.size);
+             FTUNLOCK();
+             fi->src->current_size = fi->size;
+          }
+     }
+
+
 #if defined(METRIC_CACHE) || defined(WORD_CACHE)
    unsigned int len;
 
-   /* A fast strNlen would be nice (there is a wcsnlen strangely) */
-   len = eina_unicode_strnlen(text,WORD_CACHE_MAXLEN);
+   len = text_props->len;
 
    if (len > 2 && (len < WORD_CACHE_MAXLEN))
      {
         struct prword *word;
 
         word =
-          evas_font_word_prerender(dc, text, text_props,
-                                   len, fn, fi);
+          evas_font_word_prerender(dc, text_props);
         if (word)
           {
              int j, rowstart, rowend, xstart, xrun;
@@ -466,7 +160,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
                   return;
                }
 # elif defined(METRIC_CACHE)
-             int ind;
+             unsigned int ind;
 
              y += word->baseline;
              for (ind = 0 ; ind < len ; ind ++)
@@ -498,54 +192,19 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
 #endif
 
    im = dst->image.data;
-   /* Load the glyph according to the first letter of the script, preety
-    * bad, but will have to do */
-     {
-        /* Skip common chars */
-        const Eina_Unicode *tmp;
-        for (tmp = text ;
-              *tmp &&
-              evas_common_language_char_script_get(*tmp) ==
-              EVAS_SCRIPT_COMMON ;
-              tmp++)
-          ;
-        if (!*tmp && (tmp > text)) tmp--;
-        evas_common_font_glyph_search(fn, &fi, *tmp);
-     }
-
-   if (fi->src->current_size != fi->size)
-     {
-        FTLOCK();
-        FT_Activate_Size(fi->ft.size);
-        FTUNLOCK();
-        fi->src->current_size = fi->size;
-     }
 
-   EVAS_FONT_WALK_TEXT_VISUAL_START()
+   EVAS_FONT_WALK_TEXT_START()
      {
-        FT_UInt index;
+        FT_UInt idx;
         RGBA_Font_Glyph *fg;
         int chr_x, chr_y, chr_w;
+
         if (!EVAS_FONT_WALK_IS_VISIBLE) continue;
 
-#ifdef OT_SUPPORT
-        index = EVAS_FONT_WALK_INDEX;
-#else
-        /* FIXME: Should be removed once we split according to script without
-         * the use of harfbuzz */
-        index =
-           evas_common_font_glyph_search(fn, &fi, text[EVAS_FONT_WALK_POS]);
+        idx = EVAS_FONT_WALK_INDEX;
 
-        if (fi->src->current_size != fi->size)
-          {
-             FTLOCK();
-             FT_Activate_Size(fi->ft.size);
-             FTUNLOCK();
-             fi->src->current_size = fi->size;
-          }
-#endif
         LKL(fi->ft_mutex);
-        fg = evas_common_font_int_cache_glyph_get(fi, index);
+        fg = evas_common_font_int_cache_glyph_get(fi, idx);
         if (!fg)
           {
              LKU(fi->ft_mutex);
@@ -595,7 +254,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
                        else
                          {
                             if ((fg->glyph_out->bitmap.num_grays == 256) &&
-                                  (fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays))
+                                  (fg->glyph_out->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY))
                               {
                                  for (i = 0; i < h; i++)
                                    {
@@ -698,20 +357,16 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
 }
 
 EAPI void
-evas_common_font_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Eina_Unicode *text,
-                      const Evas_Text_Props *text_props)
+evas_common_font_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Evas_Text_Props *text_props)
 {
    int ext_x, ext_y, ext_w, ext_h;
    int im_w, im_h;
    RGBA_Gfx_Func func;
-   RGBA_Font_Int *fi;
    Cutout_Rects *rects;
    Cutout_Rect  *r;
    int c, cx, cy, cw, ch;
    int i;
 
-   fi = fn->fonts->data;
-
    im_w = dst->cache_entry.w;
    im_h = dst->cache_entry.h;
 
@@ -743,14 +398,13 @@ evas_common_font_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int
 #ifdef EVAS_FRAME_QUEUING
    LKL(fn->lock);
 #endif
-   evas_common_font_int_reload(fi);
 //   evas_common_font_size_use(fn);
    func = evas_common_gfx_func_composite_mask_color_span_get(dc->col.col, dst, 1, dc->render_op);
 
    if (!dc->cutout.rects)
      {
-        evas_common_font_draw_internal(dst, dc, fn, x, y, text, text_props,
-                                       func, ext_x, ext_y, ext_w, ext_h, fi,
+        evas_common_font_draw_internal(dst, dc, fn, x, y, text_props,
+                                       func, ext_x, ext_y, ext_w, ext_h,
                                        im_w, im_h);
      }
    else
@@ -765,8 +419,8 @@ evas_common_font_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int
                {
                   r = rects->rects + i;
                   evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
-                  evas_common_font_draw_internal(dst, dc, fn, x, y, text, text_props,
-                                                 func, r->x, r->y, r->w, r->h, fi,
+                  evas_common_font_draw_internal(dst, dc, fn, x, y, text_props,
+                                                 func, r->x, r->y, r->w, r->h,
                                                  im_w, im_h);
                }
              evas_common_draw_context_apply_clear_cutouts(rects);
@@ -778,22 +432,42 @@ evas_common_font_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int
 #endif
 }
 
-/* FIXME: Where is it freed at? */
 /* Only used if cache is on */
 #if defined(METRIC_CACHE) || defined(WORD_CACHE)
-struct prword *
-evas_font_word_prerender(RGBA_Draw_Context *dc, const Eina_Unicode *in_text, const Evas_Text_Props *text_props, int len, RGBA_Font *fn, RGBA_Font_Int *fi)
+
+static Eina_Bool
+_evas_font_word_prerender_text_props_equal(const Evas_Text_Props *_a, const Evas_Text_Props *_b)
+{
+   Evas_Font_Glyph_Info *gl1, *gl2;
+   size_t i;
+
+   if ((_a->len != _b->len) ||
+       (_a->font_instance != _b->font_instance))
+     return EINA_FALSE;
+
+   gl1 = _a->info->glyph + _a->start;
+   gl2 = _b->info->glyph + _b->start;
+   i = _a->len;
+   for ( ; (i > 0) && (gl1->index == gl2->index) ; i--, gl1++, gl2++)
+      ;
+
+   return (i == 0);
+}
+
+static struct prword *
+evas_font_word_prerender(RGBA_Draw_Context *dc, const Evas_Text_Props *text_props)
 {
    struct cinfo *metrics;
-   const Eina_Unicode *text = in_text;
    unsigned char *im;
    int width;
    int height, above, below, baseline, descent;
-   int i,j;
+   unsigned int i,j;
    struct prword *w;
    int last_delta = 0;
-   int gl;
+   Eina_Unicode gl;
    struct cinfo *ci;
+   unsigned int len = text_props->len;
+   RGBA_Font_Int *fi = (RGBA_Font_Int *) text_props->font_instance;
    EVAS_FONT_WALK_TEXT_INIT();
 
 # ifndef METRIC_CACHE
@@ -804,67 +478,28 @@ evas_font_word_prerender(RGBA_Draw_Context *dc, const Eina_Unicode *in_text, con
    LKL(lock_words);
    EINA_INLIST_FOREACH(words,w)
      {
-       if (w->len == len && w->font == fn && fi->size == w->size &&
-            (w->str == in_text || memcmp(w->str, in_text, len * sizeof(Eina_Unicode)) == 0)){
-           words = eina_inlist_promote(words, EINA_INLIST_GET(w));
-           LKU(lock_words);
-           return w;
-       }
+        if (_evas_font_word_prerender_text_props_equal(&w->text_props,
+                                                       text_props))
+          {
+             words = eina_inlist_promote(words, EINA_INLIST_GET(w));
+             LKU(lock_words);
+             return w;
+          }
      }
    LKU(lock_words);
 
    gl = dc->font_ext.func.gl_new ? 1: 0;
 
    above = 0; below = 0; baseline = 0; height = 0; descent = 0;
-   /* Load the glyph according to the first letter of the script, preety
-    * bad, but will have to do */
-     {
-        /* Skip common chars */
-        const Eina_Unicode *tmp;
-        for (tmp = text ;
-              *tmp &&
-              evas_common_language_char_script_get(*tmp) ==
-              EVAS_SCRIPT_COMMON ;
-              tmp++)
-          ;
-        if (!*tmp && (tmp > text)) tmp--;
-        evas_common_font_glyph_search(fn, &fi, *tmp);
-     }
-
-   if (fi->src->current_size != fi->size)
-     {
-        FTLOCK();
-        FT_Activate_Size(fi->ft.size);
-        FTUNLOCK();
-        fi->src->current_size = fi->size;
-     }
 
    /* First pass: Work out how big and populate */
-   /* It's a bit hackish to use index and fg here as they are internal,
-    * but that'll have to be good enough ATM */
-   len = text_props->len;
    metrics = malloc(sizeof(struct cinfo) * len);
    ci = metrics;
-   EVAS_FONT_WALK_TEXT_VISUAL_START()
+   EVAS_FONT_WALK_TEXT_START()
      {
         FT_UInt index;
         RGBA_Font_Glyph *fg;
-#ifdef OT_SUPPORT
         index = EVAS_FONT_WALK_INDEX;
-#else
-        /* FIXME: Should be removed once we split according to script without
-         * the use of harfbuzz */
-        index =
-           evas_common_font_glyph_search(fn, &fi, text[EVAS_FONT_WALK_POS]);
-
-        if (fi->src->current_size != fi->size)
-          {
-             FTLOCK();
-             FT_Activate_Size(fi->ft.size);
-             FTUNLOCK();
-             fi->src->current_size = fi->size;
-          }
-#endif
         LKL(fi->ft_mutex);
         fg = evas_common_font_int_cache_glyph_get(fi, index);
         if (!fg)
@@ -940,10 +575,7 @@ evas_font_word_prerender(RGBA_Draw_Context *dc, const Eina_Unicode *in_text, con
 
    save = malloc(sizeof(struct prword));
    save->cinfo = metrics;
-   save->str = eina_ustringshare_add(in_text);
-   save->font = fn;
-   save->size = fi->size;
-   save->len = len;
+   evas_common_text_props_content_copy_and_ref(&save->text_props, text_props);
    save->im = im;
    save->width = EVAS_FONT_WALK_PEN_X;
    if (last_delta < 0)
@@ -963,7 +595,7 @@ evas_font_word_prerender(RGBA_Draw_Context *dc, const Eina_Unicode *in_text, con
           {
              if (last->im) free(last->im);
              if (last->cinfo) free(last->cinfo);
-             eina_ustringshare_del(last->str);
+             evas_common_text_props_content_unref(&last->text_props);
              words = eina_inlist_remove(words, EINA_INLIST_GET(last));
              free(last);
           }
index 9048d53..48d3df0 100644 (file)
@@ -26,7 +26,12 @@ _evas_font_cache_int_cmp(const RGBA_Font_Int *k1, int k1_length __UNUSED__,
 {
    /* RGBA_Font_Source->name is a stringshare */
    if (k1->src->name == k2->src->name)
-     return k1->size - k2->size;
+     {
+        if (k1->size == k2->size)
+           return k1->wanted_rend - k2->wanted_rend;
+        else
+           return k1->size - k2->size;
+     }
    return strcmp(k1->src->name, k2->src->name);;
 }
 
@@ -34,8 +39,10 @@ static int
 _evas_font_cache_int_hash(const RGBA_Font_Int *key, int key_length __UNUSED__)
 {
    int hash;
+   unsigned int wanted_rend = key->wanted_rend;
    hash = eina_hash_djb2(key->src->name, eina_stringshare_strlen(key->src->name) + 1);
    hash ^= eina_hash_int32(&key->size, sizeof (int));
+   hash ^= eina_hash_int32(&wanted_rend, sizeof (int));
    return hash;
 }
 
@@ -45,9 +52,6 @@ _evas_common_font_source_free(RGBA_Font_Source *fs)
    FTLOCK();
    FT_Done_Face(fs->ft.face);
    FTUNLOCK();
-#ifdef OT_SUPPORT
-   evas_common_font_ot_unload_face(fs);
-#endif
    if (fs->name) eina_stringshare_del(fs->name);
    if (fs->file) eina_stringshare_del(fs->file);
    free(fs);
@@ -136,9 +140,6 @@ evas_common_font_source_memory_load(const char *name, const void *data, int data
       free(fs);
       return NULL;
     }
-#ifdef OT_SUPPORT
-  evas_common_font_ot_load_face(fs);
-#endif
    FTUNLOCK();
    fs->ft.orig_upem = fs->ft.face->units_per_EM;
    fs->references = 1;
@@ -172,9 +173,6 @@ evas_common_font_source_unload(RGBA_Font_Source *fs)
    FTLOCK();
    FT_Done_Face(fs->ft.face);
    fs->ft.face = NULL;
-#ifdef OT_SUPPORT
-   evas_common_font_ot_unload_face(fs);
-#endif
    FTUNLOCK();
 }
 
@@ -224,9 +222,6 @@ evas_common_font_source_load_complete(RGBA_Font_Source *fs)
        fs->ft.face = NULL;
        return error;
      }
-#ifdef OT_SUPPORT
-   evas_common_font_ot_load_face(fs);
-#endif
    FTUNLOCK();
    fs->ft.orig_upem = fs->ft.face->units_per_EM;
    return error;
@@ -304,11 +299,11 @@ _evas_common_font_int_cache_init(RGBA_Font_Int *fi)
 }
 
 EAPI RGBA_Font_Int *
-evas_common_font_int_memory_load(const char *name, int size, const void *data, int data_size)
+evas_common_font_int_memory_load(const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend)
 {
    RGBA_Font_Int *fi;
 
-   fi = evas_common_font_int_find(name, size);
+   fi = evas_common_font_int_find(name, size, wanted_rend);
    if (fi) return fi;
    fi = calloc(1, sizeof(RGBA_Font_Int));
    if (!fi) return NULL;
@@ -328,23 +323,26 @@ evas_common_font_int_memory_load(const char *name, int size, const void *data, i
 }
 
 EAPI RGBA_Font_Int *
-evas_common_font_int_load(const char *name, int size)
+evas_common_font_int_load(const char *name, int size,
+                          Font_Rend_Flags wanted_rend)
 {
    RGBA_Font_Int *fi;
 
-   fi = evas_common_font_int_find(name, size);
+   fi = evas_common_font_int_find(name, size, wanted_rend);
    if (fi) return fi;
    fi = calloc(1, sizeof(RGBA_Font_Int));
    if (!fi) return NULL;
    fi->src = evas_common_font_source_find(name);
    if (!fi->src && evas_file_path_is_file(name))
      fi->src = evas_common_font_source_load(name);
+
    if (!fi->src)
      {
        free(fi);
        return NULL;
      }
    fi->size = size;
+   fi->wanted_rend = wanted_rend;
    _evas_common_font_int_cache_init(fi);
    fi = evas_common_font_int_load_init(fi);
 //   evas_common_font_int_load_complete(fi);
@@ -431,16 +429,30 @@ evas_common_font_int_load_complete(RGBA_Font_Int *fi)
      }
    else ret = val;
    fi->max_h += ret;
+
+   /* If the loaded font doesn't match with wanted_rend value requested by
+    * textobject and textblock, Set the runtime_rend value as FONT_REND_ITALIC
+    * or FONT_REND_BOLD for software rendering. */
+   fi->runtime_rend = FONT_REND_REGULAR;
+   if ((fi->wanted_rend & FONT_REND_ITALIC) &&
+       !(fi->src->ft.face->style_flags & FT_STYLE_FLAG_ITALIC))
+      fi->runtime_rend |= FONT_REND_ITALIC;
+
+   if ((fi->wanted_rend & FONT_REND_BOLD) &&
+       !(fi->src->ft.face->style_flags & FT_STYLE_FLAG_BOLD))
+      fi->runtime_rend |= FONT_REND_BOLD;
+
    return fi;
 }
 
 EAPI RGBA_Font *
-evas_common_font_memory_load(const char *name, int size, const void *data, int data_size)
+evas_common_font_memory_load(const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend)
 {
    RGBA_Font *fn;
    RGBA_Font_Int *fi;
 
-   fi = evas_common_font_int_memory_load(name, size, data, data_size);
+   fi = evas_common_font_int_memory_load(name, size, data, data_size,
+                                         wanted_rend);
    if (!fi) return NULL;
    fn = calloc(1, sizeof(RGBA_Font));
    if (!fn)
@@ -462,7 +474,7 @@ evas_common_font_memory_load(const char *name, int size, const void *data, int d
 #ifdef EVAS_FRAME_QUEUING
    LKI(fn->ref_fq_add);
    LKI(fn->ref_fq_del);
-   pthread_cond_init(&(fn->cond_fq_del), NULL);
+   eina_condition_new(&(fn->cond_fq_del), &(fn->ref_fq_del));
 #endif
    if (fi->inuse) evas_common_font_int_promote(fi);
    else
@@ -479,12 +491,12 @@ evas_common_font_memory_load(const char *name, int size, const void *data, int d
 //   fi->fs
 
 EAPI RGBA_Font *
-evas_common_font_load(const char *name, int size)
+evas_common_font_load(const char *name, int size, Font_Rend_Flags wanted_rend)
 {
    RGBA_Font *fn;
    RGBA_Font_Int *fi;
 
-   fi = evas_common_font_int_load(name, size);
+   fi = evas_common_font_int_load(name, size, wanted_rend);
    if (!fi) return NULL;
    /* First font, complete load */
    if (!fi->ft.size)
@@ -517,6 +529,7 @@ evas_common_font_load(const char *name, int size)
          }
        return NULL;
      }
+
    fn->fonts = eina_list_append(fn->fonts, fi);
    fn->hinting = FONT_BYTECODE_HINT;
    fi->hinting = fn->hinting;
@@ -525,7 +538,7 @@ evas_common_font_load(const char *name, int size)
 #ifdef EVAS_FRAME_QUEUING
    LKI(fn->ref_fq_add);
    LKI(fn->ref_fq_del);
-   pthread_cond_init(&(fn->cond_fq_del), NULL);
+   eina_condition_new(&(fn->cond_fq_del), &(fn->ref_fq_del));
 #endif
    if (fi->inuse) evas_common_font_int_promote(fi);
    else
@@ -537,12 +550,12 @@ evas_common_font_load(const char *name, int size)
 }
 
 EAPI RGBA_Font *
-evas_common_font_add(RGBA_Font *fn, const char *name, int size)
+evas_common_font_add(RGBA_Font *fn, const char *name, int size, Font_Rend_Flags wanted_rend)
 {
    RGBA_Font_Int *fi;
 
    if (!fn) return NULL;
-   fi = evas_common_font_int_load(name, size);
+   fi = evas_common_font_int_load(name, size, wanted_rend);
    if (fi)
      {
        fn->fonts = eina_list_append(fn->fonts, fi);
@@ -559,13 +572,13 @@ evas_common_font_add(RGBA_Font *fn, const char *name, int size)
 }
 
 EAPI RGBA_Font *
-evas_common_font_memory_add(RGBA_Font *fn, const char *name, int size, const void *data, int data_size)
+evas_common_font_memory_add(RGBA_Font *fn, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend)
 {
    RGBA_Font_Int *fi;
 
    if (!fn)
       return NULL;
-   fi = evas_common_font_int_memory_load(name, size, data, data_size);
+   fi = evas_common_font_int_memory_load(name, size, data, data_size, wanted_rend);
    if (fi)
      {
        fn->fonts = eina_list_append(fn->fonts, fi);
@@ -618,7 +631,7 @@ evas_common_font_free(RGBA_Font *fn)
 #ifdef EVAS_FRAME_QUEUING
    LKD(fn->ref_fq_add);
    LKD(fn->ref_fq_del);
-   pthread_cond_destroy(&(fn->cond_fq_del));
+   eina_condition_free(&(fn->cond_fq_del));
 #endif
    free(fn);
 }
@@ -672,37 +685,38 @@ evas_common_hinting_available(Font_Hint_Flags hinting)
 }
 
 EAPI RGBA_Font *
-evas_common_font_memory_hinting_load(const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting)
+evas_common_font_memory_hinting_load(const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend)
 {
    RGBA_Font *fn;
 
-   fn = evas_common_font_memory_load(name, size, data, data_size);
+   fn = evas_common_font_memory_load(name, size, data, data_size, wanted_rend);
    if (fn) evas_common_font_hinting_set(fn, hinting);
    return fn;
 }
 
 EAPI RGBA_Font *
-evas_common_font_hinting_load(const char *name, int size, Font_Hint_Flags hinting)
+evas_common_font_hinting_load(const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend)
 {
    RGBA_Font *fn;
 
-   fn = evas_common_font_load(name, size);
+   fn = evas_common_font_load(name, size, wanted_rend);
    if (fn) evas_common_font_hinting_set(fn, hinting);
    return fn;
 }
 
 EAPI RGBA_Font *
-evas_common_font_hinting_add(RGBA_Font *fn, const char *name, int size, Font_Hint_Flags hinting)
+evas_common_font_hinting_add(RGBA_Font *fn, const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend)
 {
-   fn = evas_common_font_add(fn, name, size);
+   fn = evas_common_font_add(fn, name, size, wanted_rend);
    if (fn) evas_common_font_hinting_set(fn, hinting);
    return fn;
 }
 
 EAPI RGBA_Font *
-evas_common_font_memory_hinting_add(RGBA_Font *fn, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting)
+evas_common_font_memory_hinting_add(RGBA_Font *fn, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend)
 {
-   fn = evas_common_font_memory_add(fn, name, size, data, data_size);
+   fn = evas_common_font_memory_add(fn, name, size, data, data_size,
+                                    wanted_rend);
    if (fn) evas_common_font_hinting_set(fn, hinting);
    return fn;
 }
@@ -881,7 +895,8 @@ evas_common_font_flush_last(void)
 }
 
 EAPI RGBA_Font_Int *
-evas_common_font_int_find(const char *name, int size)
+evas_common_font_int_find(const char *name, int size,
+                          Font_Rend_Flags wanted_rend)
 {
    RGBA_Font_Int tmp_fi;
    RGBA_Font_Source tmp_fn;
@@ -890,6 +905,7 @@ evas_common_font_int_find(const char *name, int size)
    tmp_fn.name = (char*) eina_stringshare_add(name);
    tmp_fi.src = &tmp_fn;
    tmp_fi.size = size;
+   tmp_fi.wanted_rend = wanted_rend;
    fi = eina_hash_find(fonts, &tmp_fi);
    if (fi)
      {
index 821ab6e..a69c3cc 100644 (file)
@@ -3,6 +3,8 @@
 
 #include "evas_font_private.h"
 
+#include FT_OUTLINE_H
+
 FT_Library      evas_ft_lib = 0;
 static int      initialised = 0;
 
@@ -209,3 +211,329 @@ evas_common_font_get_line_advance(RGBA_Font *fn)
 //   return ret;
 }
 
+/* Set of common functions that are used in a couple of places. */
+
+static void
+_fash_int2_free(Fash_Int_Map2 *fash)
+{
+   int i;
+
+   for (i = 0; i < 256; i++) if (fash->bucket[i]) free(fash->bucket[i]);
+   free(fash);
+}
+
+static void
+_fash_int_free(Fash_Int *fash)
+{
+   int i;
+
+   for (i = 0; i < 256; i++) if (fash->bucket[i]) _fash_int2_free(fash->bucket[i]);
+   free(fash);
+}
+
+static Fash_Int *
+_fash_int_new(void)
+{
+   Fash_Int *fash = calloc(1, sizeof(Fash_Int));
+   fash->freeme = _fash_int_free;
+   return fash;
+}
+
+static Fash_Item_Index_Map *
+_fash_int_find(Fash_Int *fash, int item)
+{
+   int grp, maj, min;
+
+   // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
+   grp = (item >> 16) & 0xff;
+   maj = (item >> 8) & 0xff;
+   min = item & 0xff;
+   if (!fash->bucket[grp]) return NULL;
+   if (!fash->bucket[grp]->bucket[maj]) return NULL;
+   return &(fash->bucket[grp]->bucket[maj]->item[min]);
+}
+
+static void
+_fash_int_add(Fash_Int *fash, int item, RGBA_Font_Int *fint, int idx)
+{
+   int grp, maj, min;
+
+   // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
+   grp = (item >> 16) & 0xff;
+   maj = (item >> 8) & 0xff;
+   min = item & 0xff;
+   if (!fash->bucket[grp])
+     fash->bucket[grp] = calloc(1, sizeof(Fash_Int_Map2));
+   EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]);
+   if (!fash->bucket[grp]->bucket[maj])
+     fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Int_Map));
+   EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]);
+   fash->bucket[grp]->bucket[maj]->item[min].fint = fint;
+   fash->bucket[grp]->bucket[maj]->item[min].index = idx;
+}
+
+static void
+_fash_gl2_free(Fash_Glyph_Map2 *fash)
+{
+   int i;
+
+   for (i = 0; i < 256; i++) if (fash->bucket[i]) free(fash->bucket[i]);
+   free(fash);
+}
+
+static void
+_fash_gl_free(Fash_Glyph *fash)
+{
+   int i;
+
+   for (i = 0; i < 256; i++) if (fash->bucket[i]) _fash_gl2_free(fash->bucket[i]);
+   free(fash);
+}
+
+static Fash_Glyph *
+_fash_gl_new(void)
+{
+   Fash_Glyph *fash = calloc(1, sizeof(Fash_Glyph));
+   fash->freeme = _fash_gl_free;
+   return fash;
+}
+
+static RGBA_Font_Glyph *
+_fash_gl_find(Fash_Glyph *fash, int item)
+{
+   int grp, maj, min;
+
+   // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
+   grp = (item >> 16) & 0xff;
+   maj = (item >> 8) & 0xff;
+   min = item & 0xff;
+   if (!fash->bucket[grp]) return NULL;
+   if (!fash->bucket[grp]->bucket[maj]) return NULL;
+   return fash->bucket[grp]->bucket[maj]->item[min];
+}
+
+static void
+_fash_gl_add(Fash_Glyph *fash, int item, RGBA_Font_Glyph *glyph)
+{
+   int grp, maj, min;
+
+   // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
+   grp = (item >> 16) & 0xff;
+   maj = (item >> 8) & 0xff;
+   min = item & 0xff;
+   if (!fash->bucket[grp])
+     fash->bucket[grp] = calloc(1, sizeof(Fash_Glyph_Map2));
+   EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]);
+   if (!fash->bucket[grp]->bucket[maj])
+     fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Glyph_Map));
+   EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]);
+   fash->bucket[grp]->bucket[maj]->item[min] = glyph;
+}
+
+EAPI RGBA_Font_Glyph *
+evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt idx)
+{
+   RGBA_Font_Glyph *fg;
+   FT_UInt hindex;
+   FT_Error error;
+   int size;
+   const FT_Int32 hintflags[3] =
+     { FT_LOAD_NO_HINTING, FT_LOAD_FORCE_AUTOHINT, FT_LOAD_NO_AUTOHINT };
+   static FT_Matrix transform = {0x10000, 0x05000, 0x0000, 0x10000}; // about 12 degree.
+
+   evas_common_font_int_promote(fi);
+   if (fi->fash)
+     {
+        fg = _fash_gl_find(fi->fash, idx);
+        if (fg == (void *)(-1)) return NULL;
+        else if (fg) return fg;
+     }
+
+   hindex = idx + (fi->hinting * 500000000);
+
+//   fg = eina_hash_find(fi->glyphs, &hindex);
+//   if (fg) return fg;
+
+   evas_common_font_int_reload(fi);
+   FTLOCK();
+   error = FT_Load_Glyph(fi->src->ft.face, idx,
+                         FT_LOAD_DEFAULT | FT_LOAD_NO_BITMAP |
+                         hintflags[fi->hinting]);
+   FTUNLOCK();
+   if (error)
+     {
+        if (!fi->fash) fi->fash = _fash_gl_new();
+        if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
+        return NULL;
+     }
+
+   /* Transform the outline of Glyph according to runtime_rend. */
+   if (fi->runtime_rend & FONT_REND_ITALIC)
+      FT_Outline_Transform(&fi->src->ft.face->glyph->outline, &transform);
+   /* Embolden the outline of Glyph according to rundtime_rend. */
+   if (fi->runtime_rend & FONT_REND_BOLD)
+      FT_Outline_Embolden(&fi->src->ft.face->glyph->outline,
+            (fi->src->ft.face->size->metrics.x_ppem * 5 * 64) / 100);
+
+   fg = malloc(sizeof(struct _RGBA_Font_Glyph));
+   if (!fg) return NULL;
+   memset(fg, 0, (sizeof(struct _RGBA_Font_Glyph)));
+
+   FTLOCK();
+   error = FT_Get_Glyph(fi->src->ft.face->glyph, &(fg->glyph));
+   FTUNLOCK();
+   if (error)
+     {
+       free(fg);
+        if (!fi->fash) fi->fash = _fash_gl_new();
+        if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
+       return NULL;
+     }
+
+   FTLOCK();
+   error = FT_Glyph_To_Bitmap(&(fg->glyph), FT_RENDER_MODE_NORMAL, 0, 1);
+   if (error)
+     {
+        FT_Done_Glyph(fg->glyph);
+        FTUNLOCK();
+        free(fg);
+        if (!fi->fash) fi->fash = _fash_gl_new();
+        if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
+        return NULL;
+     }
+   FTUNLOCK();
+
+   fg->glyph_out = (FT_BitmapGlyph)fg->glyph;
+   fg->index = hindex;
+   fg->fi = fi;
+
+   if (!fi->fash) fi->fash = _fash_gl_new();
+   if (fi->fash) _fash_gl_add(fi->fash, idx, fg);
+   /* This '+ 200' is just an estimation of how much memory freetype will use
+    * on it's size. This value is not really used anywhere in code - it's
+    * only for statistics. */
+   size = sizeof(RGBA_Font_Glyph) + sizeof(Eina_List) +
+    (fg->glyph_out->bitmap.width * fg->glyph_out->bitmap.rows) + 200;
+   fi->usage += size;
+   if (fi->inuse) evas_common_font_int_use_increase(size);
+
+//   eina_hash_direct_add(fi->glyphs, &fg->index, fg);
+   return fg;
+}
+
+typedef struct _Font_Char_Index Font_Char_Index;
+struct _Font_Char_Index
+{
+   FT_UInt index;
+   Eina_Unicode gl;
+};
+
+EAPI FT_UInt
+evas_common_get_char_index(RGBA_Font_Int* fi, Eina_Unicode gl)
+{
+   Font_Char_Index result;
+   //FT_UInt ret;
+
+#ifdef HAVE_PTHREAD
+///   pthread_mutex_lock(&fi->ft_mutex);
+#endif
+
+//   result = eina_hash_find(fi->indexes, &gl);
+//   if (result) goto on_correct;
+//
+//   result = malloc(sizeof (Font_Char_Index));
+//   if (!result)
+//     {
+//#ifdef HAVE_PTHREAD
+//     pthread_mutex_unlock(&fi->ft_mutex);
+//#endif
+//     return FT_Get_Char_Index(fi->src->ft.face, gl);
+//     }
+
+   evas_common_font_int_reload(fi);
+   FTLOCK();
+   result.index = FT_Get_Char_Index(fi->src->ft.face, gl);
+   FTUNLOCK();
+   result.gl = gl;
+
+//   eina_hash_direct_add(fi->indexes, &result->gl, result);
+//
+// on_correct:
+#ifdef HAVE_PTHREAD
+//   pthread_mutex_unlock(&fi->ft_mutex);
+#endif
+   return result.index;
+}
+
+EAPI int
+evas_common_font_glyph_search(RGBA_Font *fn, RGBA_Font_Int **fi_ret, Eina_Unicode gl)
+{
+   Eina_List *l;
+
+   if (fn->fash)
+     {
+        Fash_Item_Index_Map *fm = _fash_int_find(fn->fash, gl);
+        if (fm)
+          {
+             if (fm->fint)
+               {
+                  *fi_ret = fm->fint;
+                  return fm->index;
+               }
+             else if (fm->index == -1) return 0;
+          }
+     }
+
+   for (l = fn->fonts; l; l = l->next)
+     {
+       RGBA_Font_Int *fi;
+       int idx;
+
+       fi = l->data;
+
+#if 0 /* FIXME: charmap user is disabled and use a deprecated data type. */
+/*        
+       if (fi->src->charmap) // Charmap loaded, FI/FS blank
+         {
+            idx = evas_array_hash_search(fi->src->charmap, gl);
+            if (idx != 0)
+              {
+                 evas_common_font_source_load_complete(fi->src);
+                 evas_common_font_int_load_complete(fi);
+
+                 evas_array_hash_free(fi->src->charmap);
+                 fi->src->charmap = NULL;
+
+                 *fi_ret = fi;
+                 return idx;
+               }
+           }
+        else
+*/
+#endif
+        if (!fi->src->ft.face) /* Charmap not loaded, FI/FS blank */
+         {
+             evas_common_font_int_reload(fi);
+         }
+        if (fi->src->ft.face)
+         {
+            idx = evas_common_get_char_index(fi, gl);
+            if (idx != 0)
+              {
+                 if (!fi->ft.size)
+                     evas_common_font_int_load_complete(fi);
+                  if (!fn->fash) fn->fash = _fash_int_new();
+                  if (fn->fash) _fash_int_add(fn->fash, gl, fi, idx);
+                 *fi_ret = fi;
+                 return idx;
+              }
+             else
+               {
+                  if (!fn->fash) fn->fash = _fash_int_new();
+                  if (fn->fash) _fash_int_add(fn->fash, gl, NULL, -1);
+               }
+         }
+     }
+   *fi_ret = NULL;
+   return 0;
+}
index 6a6a4e4..7fb9d08 100644 (file)
@@ -1,6 +1,6 @@
 #include "evas_font_ot.h"
 
-#ifdef OT_SUPPORT
+#ifdef USE_HARFBUZZ
 # include <hb.h>
 # include <hb-ft.h>
 #endif
 #include <Eina.h>
 #include "evas_font_private.h"
 
+#ifdef USE_HARFBUZZ
+static const hb_script_t
+_evas_script_to_harfbuzz[] =
+{
+  HB_SCRIPT_COMMON,
+  HB_SCRIPT_INHERITED,
+  HB_SCRIPT_ARABIC,
+  HB_SCRIPT_ARMENIAN,
+  HB_SCRIPT_BENGALI,
+  HB_SCRIPT_BOPOMOFO,
+  HB_SCRIPT_CHEROKEE,
+  HB_SCRIPT_COPTIC,
+  HB_SCRIPT_CYRILLIC,
+  HB_SCRIPT_DESERET,
+  HB_SCRIPT_DEVANAGARI,
+  HB_SCRIPT_ETHIOPIC,
+  HB_SCRIPT_GEORGIAN,
+  HB_SCRIPT_GOTHIC,
+  HB_SCRIPT_GREEK,
+  HB_SCRIPT_GUJARATI,
+  HB_SCRIPT_GURMUKHI,
+  HB_SCRIPT_HAN,
+  HB_SCRIPT_HANGUL,
+  HB_SCRIPT_HEBREW,
+  HB_SCRIPT_HIRAGANA,
+  HB_SCRIPT_KANNADA,
+  HB_SCRIPT_KATAKANA,
+  HB_SCRIPT_KHMER,
+  HB_SCRIPT_LAO,
+  HB_SCRIPT_LATIN,
+  HB_SCRIPT_MALAYALAM,
+  HB_SCRIPT_MONGOLIAN,
+  HB_SCRIPT_MYANMAR,
+  HB_SCRIPT_OGHAM,
+  HB_SCRIPT_OLD_ITALIC,
+  HB_SCRIPT_ORIYA,
+  HB_SCRIPT_RUNIC,
+  HB_SCRIPT_SINHALA,
+  HB_SCRIPT_SYRIAC,
+  HB_SCRIPT_TAMIL,
+  HB_SCRIPT_TELUGU,
+  HB_SCRIPT_THAANA,
+  HB_SCRIPT_THAI,
+  HB_SCRIPT_TIBETAN,
+  HB_SCRIPT_CANADIAN_ABORIGINAL,
+  HB_SCRIPT_YI,
+  HB_SCRIPT_TAGALOG,
+  HB_SCRIPT_HANUNOO,
+  HB_SCRIPT_BUHID,
+  HB_SCRIPT_TAGBANWA,
+
+  /* Unicode-4.0 additions */
+  HB_SCRIPT_BRAILLE,
+  HB_SCRIPT_CYPRIOT,
+  HB_SCRIPT_LIMBU,
+  HB_SCRIPT_OSMANYA,
+  HB_SCRIPT_SHAVIAN,
+  HB_SCRIPT_LINEAR_B,
+  HB_SCRIPT_TAI_LE,
+  HB_SCRIPT_UGARITIC,
+
+  /* Unicode-4.1 additions */
+  HB_SCRIPT_NEW_TAI_LUE,
+  HB_SCRIPT_BUGINESE,
+  HB_SCRIPT_GLAGOLITIC,
+  HB_SCRIPT_TIFINAGH,
+  HB_SCRIPT_SYLOTI_NAGRI,
+  HB_SCRIPT_OLD_PERSIAN,
+  HB_SCRIPT_KHAROSHTHI,
+
+  /* Unicode-5.0 additions */
+  HB_SCRIPT_UNKNOWN,
+  HB_SCRIPT_BALINESE,
+  HB_SCRIPT_CUNEIFORM,
+  HB_SCRIPT_PHOENICIAN,
+  HB_SCRIPT_PHAGS_PA,
+  HB_SCRIPT_NKO,
+
+  /* Unicode-5.1 additions */
+  HB_SCRIPT_KAYAH_LI,
+  HB_SCRIPT_LEPCHA,
+  HB_SCRIPT_REJANG,
+  HB_SCRIPT_SUNDANESE,
+  HB_SCRIPT_SAURASHTRA,
+  HB_SCRIPT_CHAM,
+  HB_SCRIPT_OL_CHIKI,
+  HB_SCRIPT_VAI,
+  HB_SCRIPT_CARIAN,
+  HB_SCRIPT_LYCIAN,
+  HB_SCRIPT_LYDIAN,
+
+  /* Unicode-5.2 additions */
+  HB_SCRIPT_AVESTAN,
+  HB_SCRIPT_BAMUM,
+  HB_SCRIPT_EGYPTIAN_HIEROGLYPHS,
+  HB_SCRIPT_IMPERIAL_ARAMAIC,
+  HB_SCRIPT_INSCRIPTIONAL_PAHLAVI,
+  HB_SCRIPT_INSCRIPTIONAL_PARTHIAN,
+  HB_SCRIPT_JAVANESE,
+  HB_SCRIPT_KAITHI,
+  HB_SCRIPT_TAI_THAM,
+  HB_SCRIPT_LISU,
+  HB_SCRIPT_MEETEI_MAYEK,
+  HB_SCRIPT_OLD_SOUTH_ARABIAN,
+  HB_SCRIPT_OLD_TURKIC,
+  HB_SCRIPT_SAMARITAN,
+  HB_SCRIPT_TAI_VIET,
+
+  /* Unicode-6.0 additions */
+  HB_SCRIPT_BATAK,
+  HB_SCRIPT_BRAHMI,
+  HB_SCRIPT_MANDAIC
+};
+#endif
+
 #ifdef OT_SUPPORT
 /* FIXME: doc. returns #items */
 EAPI int
@@ -63,131 +178,90 @@ evas_common_font_ot_cluster_size_get(const Evas_Text_Props *props, size_t char_i
    return (items > 0) ? items : 1;
 }
 
-EAPI void
-evas_common_font_ot_load_face(void *_font)
-{
-   RGBA_Font_Source *font = (RGBA_Font_Source *) _font;
-   /* Unload the face if by any chance it's already loaded */
-   evas_common_font_ot_unload_face(font);
-   font->hb.face = hb_ft_face_create(font->ft.face, NULL);
-}
-
-EAPI void
-evas_common_font_ot_unload_face(void *_font)
-{
-   RGBA_Font_Source *font = (RGBA_Font_Source *) _font;
-   if (!font->hb.face) return;
-   hb_face_destroy(font->hb.face);
-   font->hb.face = NULL;
-}
-
 /* Harfbuzz font functions */
-static hb_font_funcs_t *_ft_font_funcs = NULL;
 
-static hb_codepoint_t
-_evas_common_font_ot_hb_get_glyph(hb_font_t *font, hb_face_t *face,
-    const void *user_data, hb_codepoint_t unicode,
-    hb_codepoint_t variation_selector)
-{
-   RGBA_Font_Int *fi = (RGBA_Font_Int *) user_data;
-   return hb_font_funcs_get_glyph_func(_ft_font_funcs)(font, face,
-      fi->src->ft.face, unicode, variation_selector);
-}
-
-static void
-_evas_common_font_ot_hb_get_glyph_advance(hb_font_t *font, hb_face_t *face,
-   const void *user_data, hb_codepoint_t glyph,
-   hb_position_t *x_advance, hb_position_t *y_advance)
+static hb_position_t
+_evas_common_font_ot_hb_get_glyph_advance(hb_font_t *font,
+      void *font_data, hb_codepoint_t glyph,
+      void *user_data)
 {
    /* Use our cache*/
-   RGBA_Font_Int *fi = (RGBA_Font_Int *) user_data;
+   RGBA_Font_Int *fi = (RGBA_Font_Int *) font_data;
    RGBA_Font_Glyph *fg;
    (void) font;
-   (void) face;
+   (void) user_data;
    fg = evas_common_font_int_cache_glyph_get(fi, glyph);
    if (fg)
      {
-        *x_advance = fg->glyph->advance.x >> 10;
-        *y_advance = fg->glyph->advance.y >> 10;
+        return fg->glyph->advance.x >> 10;
      }
-}
-
-static void
-_evas_common_font_ot_hb_get_glyph_extents(hb_font_t *font, hb_face_t *face,
-   const void *user_data, hb_codepoint_t glyph, hb_glyph_extents_t *extents)
-{
-   RGBA_Font_Int *fi = (RGBA_Font_Int *) user_data;
-   hb_font_funcs_get_glyph_extents_func(_ft_font_funcs)(font, face,
-      fi->src->ft.face, glyph, extents);
-}
-
-static hb_bool_t
-_evas_common_font_ot_hb_get_contour_point(hb_font_t *font, hb_face_t *face,
-   const void *user_data, unsigned int point_index, hb_codepoint_t glyph,
-   hb_position_t *x, hb_position_t *y)
-{
-   RGBA_Font_Int *fi = (RGBA_Font_Int *) user_data;
-   return hb_font_funcs_get_contour_point_func(_ft_font_funcs)(font, face,
-      fi->src->ft.face, point_index, glyph, x, y);
+   return 0;
 }
 
 static hb_position_t
-_evas_common_font_ot_hb_get_kerning(hb_font_t *font, hb_face_t *face,
-   const void *user_data, hb_codepoint_t first_glyph,
-   hb_codepoint_t second_glyph)
+_evas_common_font_ot_hb_get_kerning(hb_font_t *font, void *font_data,
+   hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, void *user_data)
 {
-   RGBA_Font_Int *fi = (RGBA_Font_Int *) user_data;
+   RGBA_Font_Int *fi = (RGBA_Font_Int *) font_data;
    int kern;
    (void) font;
-   (void) face;
+   (void) user_data;
    if (evas_common_font_query_kerning(fi, first_glyph, second_glyph, &kern))
       return kern;
-   else
-      return 0;
+
+   return 0;
 }
 
 /* End of harfbuzz font funcs */
 
-static hb_font_funcs_t *
+static inline hb_font_funcs_t *
 _evas_common_font_ot_font_funcs_get(void)
 {
    static hb_font_funcs_t *font_funcs = NULL;
    if (!font_funcs)
      {
-        _ft_font_funcs = hb_ft_get_font_funcs();
         font_funcs = hb_font_funcs_create();
-        hb_font_funcs_set_glyph_func(font_funcs,
-            _evas_common_font_ot_hb_get_glyph);
-        hb_font_funcs_set_glyph_advance_func(font_funcs,
-            _evas_common_font_ot_hb_get_glyph_advance);
-        hb_font_funcs_set_glyph_extents_func(font_funcs,
-            _evas_common_font_ot_hb_get_glyph_extents);
-        hb_font_funcs_set_contour_point_func(font_funcs,
-            _evas_common_font_ot_hb_get_contour_point);
-        hb_font_funcs_set_kerning_func(font_funcs,
-            _evas_common_font_ot_hb_get_kerning);
+        hb_font_funcs_set_glyph_h_advance_func(font_funcs,
+            _evas_common_font_ot_hb_get_glyph_advance, NULL, NULL);
+        hb_font_funcs_set_glyph_h_kerning_func(font_funcs,
+            _evas_common_font_ot_hb_get_kerning, NULL, NULL);
      }
 
    return font_funcs;
 }
 
+static inline hb_unicode_funcs_t *
+_evas_common_font_ot_unicode_funcs_get(void)
+{
+   static hb_unicode_funcs_t *unicode_funcs = NULL;
+   if (!unicode_funcs)
+     {
+        unicode_funcs = hb_unicode_funcs_get_default();
+     }
+
+   return unicode_funcs;
+}
+
 static void
 _evas_common_font_ot_shape(hb_buffer_t *buffer, RGBA_Font_Int *fi)
 {
-   hb_font_t   *hb_font;
+   hb_font_t   *hb_font, *hb_ft_font;
+
+   hb_ft_font = hb_ft_font_create(fi->src->ft.face, NULL);
+   hb_font = hb_font_create_sub_font(hb_ft_font);
+
+   hb_font_set_funcs(hb_font, _evas_common_font_ot_font_funcs_get(), fi, NULL);
 
-   hb_font = hb_ft_font_create(fi->src->ft.face, NULL);
-   hb_font_set_funcs(hb_font, _evas_common_font_ot_font_funcs_get(), NULL, fi);
+   hb_shape(hb_font, buffer, NULL, 0);
 
-   hb_shape(hb_font, fi->src->hb.face, buffer, NULL, 0);
    hb_font_destroy(hb_font);
+   hb_font_destroy(hb_ft_font);
 }
 
 EAPI Eina_Bool
-evas_common_font_ot_populate_text_props(void *_fn, const Eina_Unicode *text,
+evas_common_font_ot_populate_text_props(const Eina_Unicode *text,
       Evas_Text_Props *props, int len)
 {
-   RGBA_Font *fn = (RGBA_Font *) _fn;
    RGBA_Font_Int *fi;
    hb_buffer_t *buffer;
    hb_glyph_position_t *positions;
@@ -196,28 +270,9 @@ evas_common_font_ot_populate_text_props(void *_fn, const Eina_Unicode *text,
    unsigned int i;
    Evas_Font_Glyph_Info *gl_itr;
    Evas_Font_OT_Info *ot_itr;
+   Evas_Coord pen_x = 0;
 
-   fi = fn->fonts->data;
-   /* Load the font needed for this script */
-     {
-        /* Skip common chars */
-        const Eina_Unicode *tmp;
-        for (tmp = text ;
-              *tmp &&
-              evas_common_language_char_script_get(*tmp) == EVAS_SCRIPT_COMMON ;
-              tmp++)
-          ;
-        if (!*tmp && (tmp > text)) tmp--;
-        evas_common_font_glyph_search(fn, &fi, *tmp);
-     }
-   evas_common_font_int_reload(fi);
-   if (fi->src->current_size != fi->size)
-     {
-        FTLOCK();
-        FT_Activate_Size(fi->ft.size);
-        FTUNLOCK();
-        fi->src->current_size = fi->size;
-     }
+   fi = props->font_instance;
 
    if (len < 0)
      {
@@ -229,10 +284,10 @@ evas_common_font_ot_populate_text_props(void *_fn, const Eina_Unicode *text,
      }
 
    buffer = hb_buffer_create(slen);
-   hb_buffer_set_unicode_funcs(buffer, evas_common_language_unicode_funcs_get());
+   hb_buffer_set_unicode_funcs(buffer, _evas_common_font_ot_unicode_funcs_get());
    hb_buffer_set_language(buffer, hb_language_from_string(
             evas_common_language_from_locale_get()));
-   hb_buffer_set_script(buffer, props->script);
+   hb_buffer_set_script(buffer, _evas_script_to_harfbuzz[props->script]);
    hb_buffer_set_direction(buffer,
          (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ?
          HB_DIRECTION_RTL : HB_DIRECTION_LTR);
@@ -246,17 +301,21 @@ evas_common_font_ot_populate_text_props(void *_fn, const Eina_Unicode *text,
          sizeof(Evas_Font_OT_Info));
    props->info->glyph = calloc(props->len,
               sizeof(Evas_Font_Glyph_Info));
-   positions = hb_buffer_get_glyph_positions(buffer);
-   infos = hb_buffer_get_glyph_infos(buffer);
+   positions = hb_buffer_get_glyph_positions(buffer, NULL);
+   infos = hb_buffer_get_glyph_infos(buffer, NULL);
    gl_itr = props->info->glyph;
    ot_itr = props->info->ot;
    for (i = 0 ; i < props->len ; i++)
      {
+        Evas_Coord adv;
         ot_itr->source_cluster = infos->cluster;
         ot_itr->x_offset = positions->x_offset;
         ot_itr->y_offset = positions->y_offset;
         gl_itr->index = infos->codepoint;
-        gl_itr->advance = positions->x_advance;
+        adv = positions->x_advance;
+
+        pen_x += adv;
+        gl_itr->pen_after = EVAS_FONT_ROUND_26_6_TO_INT(pen_x);
 
         ot_itr++;
         gl_itr++;
index 9cf0148..bc5ab02 100644 (file)
@@ -34,18 +34,12 @@ struct _Evas_Font_OT_Info
 #  define EVAS_FONT_OT_POS_GET(a)   ((a).source_cluster)
 # endif
 
-EAPI void
-evas_common_font_ot_load_face(void *_font);
-
-EAPI void
-evas_common_font_ot_unload_face(void *_font);
-
 # include "evas_text_utils.h"
 EAPI int
 evas_common_font_ot_cluster_size_get(const Evas_Text_Props *props, size_t char_index);
 
 EAPI Eina_Bool
-evas_common_font_ot_populate_text_props(void *fn, const Eina_Unicode *text,
+evas_common_font_ot_populate_text_props(const Eina_Unicode *text,
       Evas_Text_Props *props, int len);
 #endif
 
index f666e96..ca10a03 100644 (file)
 #include "evas_font_private.h" /* for Frame-Queuing support */
 #include "evas_font_ot.h"
 
+
+/* FIXME: Check coverage according to the font and not by actually loading */
+/**
+ * @internal
+ * Find the end of a run according to font coverage, and return the base script
+ * font and the current wanted font.
+ *
+ * @param[in] fn the font to use.
+ * @param script_fi The base font instance to be used with the script. If NULL, then it's calculated and returned in this variable, if not NULL, it's used and not modified.
+ * @param[out] cur_fi The font instance found for the current run.
+ * @param[in] script the base script
+ * @param[in] text the text to work on.
+ * @param[in] run_let the current run len, i.e "search limit".
+ * @return length of the run found.
+ */
 EAPI int
-evas_common_font_query_kerning(RGBA_Font_Int* fi,
-                              FT_UInt left, FT_UInt right,
-                              int* kerning)
+evas_common_font_query_run_font_end_get(RGBA_Font *fn, RGBA_Font_Int **script_fi, RGBA_Font_Int **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len)
+{
+   RGBA_Font_Int *fi = NULL;
+   const Eina_Unicode *run_end = text + run_len;
+   const Eina_Unicode *itr;
+
+   /* If there's no current script_fi, find it first */
+   if (!*script_fi)
+     {
+        const Eina_Unicode *base_char = NULL;
+        /* Skip common chars */
+        for (base_char = text ;
+             (base_char < run_end) &&
+             (evas_common_language_char_script_get(*base_char) != script) ;
+             base_char++)
+           ;
+        if (base_char == run_end) base_char = text;
+
+        /* Find the first renderable char */
+        while (base_char < run_end)
+          {
+             /* 0x1F is the last ASCII contral char, just a hack in
+              * the meanwhile. */
+             if ((*base_char > 0x1F) &&
+                   evas_common_font_glyph_search(fn, &fi, *base_char))
+                break;
+             base_char++;
+          }
+
+
+        /* If everything else fails, at least try to find a font for the
+         * replacement char */
+        if (base_char == run_end)
+           evas_common_font_glyph_search(fn, &fi, REPLACEMENT_CHAR);
+
+        if (!fi)
+           fi = fn->fonts->data;
+
+        *script_fi = fi;
+     }
+   else
+     {
+        fi = *script_fi;
+     }
+
+   /* Find the longest run of the same font starting from the start position
+    * and update cur_fi accordingly. */
+   itr = text;
+   while (itr < run_end)
+     {
+        RGBA_Font_Int *tmp_fi;
+        /* Itr will end up being the first of the next run  */
+        for ( ; itr < run_end ; itr++)
+          {
+             /* 0x1F is the last ASCII contral char, just a hack in
+              * the meanwhile. */
+             if (*itr <= 0x1F)
+                continue;
+             /* Break if either it's not in the font, or if it is in the
+              * script's font. */
+             if (fi == *script_fi)
+               {
+                  if (!evas_common_get_char_index(fi, *itr))
+                     break;
+               }
+             else
+               {
+                  if (evas_common_get_char_index(*script_fi, *itr))
+                     break;
+               }
+          }
+
+        if (itr == run_end)
+          {
+             /* We should do nothing. */
+          }
+        else if (itr == text)
+          {
+             /* If the script font doesn't fit even one char, find a new font. */
+
+             /* If we can find a font, use it. Otherwise, find the first
+              * char the run of chars that can't be rendered until the first
+              * one that can. */
+             if (evas_common_font_glyph_search(fn, &tmp_fi, *itr))
+               {
+                  fi = tmp_fi;
+               }
+             else
+               {
+                  itr++;
+                  /* Go through all the chars that can't be rendered with any
+                   * font */
+                  for ( ; itr < run_end ; itr++)
+                    {
+                       tmp_fi = fi;
+                       if (evas_common_get_char_index(fi, *itr) ||
+                             evas_common_font_glyph_search(fn, &tmp_fi, *itr))
+                         {
+                            fi = tmp_fi;
+                            break;
+                         }
+                    }
+
+                  /* If we found a renderable character and the found font
+                   * can render the replacement char, continue, otherwise
+                   * find a font most suitable for the replacement char and
+                   * break */
+                  if ((itr == run_end) ||
+                        !evas_common_get_char_index(fi, REPLACEMENT_CHAR))
+                    {
+                       evas_common_font_glyph_search(fn, &fi, REPLACEMENT_CHAR);
+                       break;
+                    }
+               }
+             itr++;
+          }
+        else
+          {
+             /* If this char is not renderable by any font, but the replacement
+              * char can be rendered using the currentfont, continue this
+              * run. */
+             if (!evas_common_font_glyph_search(fn, &tmp_fi, *itr) &&
+                   evas_common_get_char_index(fi, REPLACEMENT_CHAR))
+               {
+                  itr++;
+               }
+             else
+               {
+                  /* Done, we did as much as possible */
+                  break;
+               }
+          }
+     }
+
+   if (fi)
+      *cur_fi = fi;
+   else
+      *cur_fi = *script_fi;
+
+   return itr - text;
+}
+
+/**
+ * @internal
+ * Calculate the kerning between "left" and "right.
+ *
+ * @param fi the font instance to use
+ * @param left the left glyph index
+ * @param right the right glyph index
+ * @param[out] kerning the kerning calculated.
+ * @return FALSE on error, TRUE on success.
+ */
+EAPI int
+evas_common_font_query_kerning(RGBA_Font_Int *fi, FT_UInt left, FT_UInt right,
+                              int *kerning)
 {
    int *result;
    FT_Vector delta;
    int key[2];
    int error = 1;
 
-//   return 0;
    key[0] = left;
    key[1] = right;
 
@@ -32,7 +198,7 @@ evas_common_font_query_kerning(RGBA_Font_Int* fi,
    FTLOCK();
    if (FT_Get_Kerning(fi->src->ft.face,
                      key[0], key[1],
-                     ft_kerning_default, &delta) == 0)
+                     FT_KERNING_DEFAULT, &delta) == 0)
      {
        int *push;
 
@@ -58,7 +224,16 @@ evas_common_font_query_kerning(RGBA_Font_Int* fi,
    return error;
 }
 
-/* text x inset */
+/**
+ * @internal
+ * Calculate the inset of the text. Inset is the difference between the pen
+ * position of the first char in the string, and the first pixel drawn.
+ * (can be negative).
+ *
+ * @param fn the font set to use.
+ * @param text_props the string object.
+ * @return the calculated inset.
+ */
 EAPI int
 evas_common_font_query_inset(RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props)
 {
@@ -66,7 +241,18 @@ evas_common_font_query_inset(RGBA_Font *fn __UNUSED__, const Evas_Text_Props *te
    return text_props->info->glyph[text_props->start].x_bear;
 }
 
-/* text right x inset */
+/**
+ * @internal
+ * Calculate the right inset of the text. This is the difference between the
+ * pen position of the glyph after the last glyph in the text, and the last
+ * pixel drawn in the text (essentially "advance - width" of the last char).
+ *
+ * @param fn the font set to use.
+ * @param text_props the string object.
+ * @return the calculated inset.
+ *
+ * @see evas_common_font_query_inset()
+ */
 EAPI int
 evas_common_font_query_right_inset(RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props)
 {
@@ -79,87 +265,105 @@ evas_common_font_query_right_inset(RGBA_Font *fn __UNUSED__, const Evas_Text_Pro
    if (gli->width == 0)
       return 0;
 
-   return EVAS_FONT_ROUND_26_6_TO_INT(gli->advance) -
+   return ((gli > text_props->info->glyph) ?
+      gli->pen_after - (gli - 1)->pen_after : gli->pen_after) -
       (gli->width + gli->x_bear
 #ifdef OT_SUPPORT
-       + text_props->info->ot[text_props->start + text_props->len - 1].x_offset
+       + EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_X_OFF_GET(
+              text_props->info->ot[text_props->start + text_props->len - 1]))
 #endif
       );
 }
 
-/* size of the string (width and height) in pixels
- * BiDi handling: We receive the shaped string + other props from text_props,
- * We only care about the size, and the size does not depend on the visual order.
- * As long as we follow the logical string and get kerning data like we should,
- * we are fine.
+/**
+ * @internal
+ * Calculate the size of the string (width and height).
+ * The width is the disntance between the first pen position and the last pixel
+ * drawn.
+ * The height is the max ascent+descent of the font.
+ *
+ * @param fn the font set to use.
+ * @param text_props the string object.
+ * @param[out] w the calculated width
+ * @param[out] h the calculated height
  */
-
 EAPI void
-evas_common_font_query_size(RGBA_Font *fn, const Eina_Unicode *text __UNUSED__, const Evas_Text_Props *text_props, int *w, int *h)
+evas_common_font_query_size(RGBA_Font *fn, const Evas_Text_Props *text_props, int *w, int *h)
 {
-   int keep_width = 0;
-   int prev_pen_x = 0;
-   EVAS_FONT_WALK_TEXT_INIT();
+   Evas_Coord ret_w = 0;
 
-   EVAS_FONT_WALK_TEXT_VISUAL_START()
+   if (text_props->len > 0)
      {
-        EVAS_FONT_WALK_TEXT_WORK();
-        if (!EVAS_FONT_WALK_IS_VISIBLE) continue;
-        /* Keep the width because we'll need it for the last char */
-        keep_width = EVAS_FONT_WALK_WIDTH +
-           EVAS_FONT_WALK_X_OFF +
-           EVAS_FONT_WALK_X_BEAR;
-        /* Keep the previous EVAS_FONT_WALK_PEN_X, before it's advanced in TEXT_END */
-        prev_pen_x = EVAS_FONT_WALK_PEN_X;
-     }
-   EVAS_FONT_WALK_TEXT_END();
+        const Evas_Font_Glyph_Info *glyph = text_props->info->glyph +
+           text_props->start;
+        const Evas_Font_Glyph_Info *last_glyph = glyph;
 
-   /* If the last char is a whitespace, we use the advance as the size */
-   if (keep_width > 0)
-     {
-        if (w) *w = prev_pen_x + keep_width;
-     }
-   else
-     {
-        if (w) *w = EVAS_FONT_WALK_PEN_X;
+        if (text_props->len > 1)
+          {
+             last_glyph += text_props->len - 1;
+             ret_w = last_glyph[-1].pen_after;
+             if (text_props->start > 0)
+                ret_w -= glyph[-1].pen_after;
+          }
+#ifdef OT_SUPPORT
+        ret_w += EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_X_OFF_GET(
+              text_props->info->ot[text_props->start + text_props->len - 1]));
+#endif
+        ret_w += last_glyph->width + last_glyph->x_bear;
      }
+
+   if (w) *w = ret_w;
    if (h) *h = evas_common_font_max_ascent_get(fn) + evas_common_font_max_descent_get(fn);
 }
 
-/* h & v advance
- * BiDi handling: We receive the shaped string + other props from text_props,
- * We don't care about the order, as heights will remain the same (we already did
- * shaping) and as long as we go through the logical string and match the kerning
- * this way, we are safe.
+/**
+ * @internal
+ * Calculate the advance of the string. Advance is the distance between the
+ * first pen position and the pen position after the string.
+ *
+ * @param fn the font set to use.
+ * @param text_props the string object.
+ * @param[out] h_adv the calculated horizontal advance.
+ * @param[out] v_adv the calculated vertical advance.
  */
 EAPI void
-evas_common_font_query_advance(RGBA_Font *fn, const Eina_Unicode *text __UNUSED__, const Evas_Text_Props *text_props, int *h_adv, int *v_adv)
+evas_common_font_query_advance(RGBA_Font *fn, const Evas_Text_Props *text_props, int *h_adv, int *v_adv)
 {
-   EVAS_FONT_WALK_TEXT_INIT();
-
-   EVAS_FONT_WALK_TEXT_LOGICAL_START()
+   Evas_Coord ret_adv = 0;
+   if (text_props->len > 0)
      {
-        EVAS_FONT_WALK_TEXT_WORK();
-        if (!EVAS_FONT_WALK_IS_VISIBLE) continue;
+        const Evas_Font_Glyph_Info *glyph = text_props->info->glyph +
+           text_props->start;
+        ret_adv = glyph[text_props->len - 1].pen_after;
+        if (text_props->start > 0)
+           ret_adv -= glyph[-1].pen_after;
      }
-   EVAS_FONT_WALK_TEXT_END();
 
+   if (h_adv) *h_adv = ret_adv;
    if (v_adv) *v_adv = evas_common_font_get_line_advance(fn);
-   if (h_adv) *h_adv = EVAS_FONT_WALK_PEN_X;
 }
 
-/* x y w h for char at char pos for null it returns the position right after
- * the last char with 0 as width and height.
- * BiDi handling: We receive the shaped string + other props from text_props,
- * We care about the actual drawing location of the string, this is why we need
- * the visual string. We need to know how it's printed. After that we need to calculate
- * the reverse kerning in case of rtl parts. "pos" passed to this function is an
- * index in bytes, that is the actual byte location of the string, we need to find
- * the index in order to find it in the visual string.
+/**
+ * @internal
+ * Query the coordinates of the char at position pos. If the position is at the
+ * end of the string (i.e where the finishing null would be) it returns the
+ * coordinates of the position right after the last char. This is either on
+ * the left or on the right of the string, depending on BiDi direction. Returned
+ * width in this case is 0. It returns the x of the leftmost pixel drawn.
+ *
+ * @param fn the font set to use.
+ * @param text_props the string object.
+ * @param pos the position of the char in the string object (not actual position in the string object, but the position of the source character).
+ * @param[out] cx the calculated x - CAN BE NULL
+ * @param[out] cy the calculated y - CAN BE NULL
+ * @param[out] cw the calculated width - CAN BE NULL
+ * @param[out] ch the calculated height - CAN BE NULL
+ * @return TRUE on success, FALSE otherwise.
+ *
+ * @see evas_common_font_query_pen_coords()
  */
-
 EAPI int
-evas_common_font_query_char_coords(RGBA_Font *fn, const Eina_Unicode *text __UNUSED__, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch)
+evas_common_font_query_char_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch)
 {
    int asc, desc;
    size_t position = 0;
@@ -184,7 +388,7 @@ evas_common_font_query_char_coords(RGBA_Font *fn, const Eina_Unicode *text __UNU
         else
 #endif
           {
-             evas_common_font_query_advance(fn, text, text_props, cx, ch);
+             evas_common_font_query_advance(fn, text_props, cx, ch);
           }
         if (cy) *cy = 0;
         if (cw) *cw = 0;
@@ -196,7 +400,7 @@ evas_common_font_query_char_coords(RGBA_Font *fn, const Eina_Unicode *text __UNU
    int prev_cluster = -1;
    int found = 0, items = 1, item_pos = 1;
    int last_is_visible = 0;
-   EVAS_FONT_WALK_TEXT_VISUAL_START()
+   EVAS_FONT_WALK_TEXT_START()
      {
         EVAS_FONT_WALK_TEXT_WORK();
 
@@ -271,19 +475,31 @@ end:
    return ret_val;
 }
 
-/* x y w h for pen at char pos for null it returns the position right after
- * the last char with 0 as width and height. This is the same as char_coords
- * but it returns the pen_x and adv instead of x and w.
- * BiDi handling: We receive the shaped string + other props from text_props,
- * We care about the actual drawing location of the string, this is why we need
- * the visual string. We need to know how it's printed. After that we need to calculate
- * the reverse kerning in case of rtl parts. "pos" passed to this function is an
- * index in bytes, that is the actual byte location of the string, we need to find
- * the index in order to find it in the visual string.
+/**
+ * @internal
+ * Query the coordinates of the char at position pos. If the position is at the
+ * end of the string (i.e where the finishing null would be) it returns the
+ * coordinates of the position right after the last char. This is either on
+ * the left or on the right of the string, depending on BiDi direction. Returned
+ * advance in this case is 0.
+ *
+ * This is the same as evas_common_font_query_char_coords() except that the
+ * advance of the character is returned instead of the width and the pen
+ * position is returned instead of the actual pixel position.
+ *
+ * @param fn the font set to use.
+ * @param text_props the string object.
+ * @param pos the position of the char in the string object (not actual position in the string object, but the position of the source character).
+ * @param[out] cpenx the calculated x - CAN BE NULL
+ * @param[out] cy the calculated y - CAN BE NULL
+ * @param[out] cadv the calculated advance - CAN BE NULL
+ * @param[out] ch the calculated height - CAN BE NULL
+ * @return TRUE on success, FALSE otherwise.
+ *
+ * @see evas_common_font_query_char_coords()
  */
-
 EAPI int
-evas_common_font_query_pen_coords(RGBA_Font *fn, const Eina_Unicode *text __UNUSED__, const Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch)
+evas_common_font_query_pen_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch)
 {
    int asc, desc;
    size_t position;
@@ -308,7 +524,7 @@ evas_common_font_query_pen_coords(RGBA_Font *fn, const Eina_Unicode *text __UNUS
         else
 #endif
           {
-             evas_common_font_query_advance(fn, text, text_props, cpen_x, ch);
+             evas_common_font_query_advance(fn, text_props, cpen_x, ch);
           }
         if (cy) *cy = 0;
         if (cadv) *cadv = 0;
@@ -319,7 +535,7 @@ evas_common_font_query_pen_coords(RGBA_Font *fn, const Eina_Unicode *text __UNUS
    int prev_cluster = -1;
    int found = 0, items = 1, item_pos = 1;
    int last_is_visible = 0;
-   EVAS_FONT_WALK_TEXT_VISUAL_START()
+   EVAS_FONT_WALK_TEXT_START()
      {
         EVAS_FONT_WALK_TEXT_WORK();
 
@@ -391,15 +607,24 @@ end:
    return ret_val;
 }
 
-/* char pos of text at xy pos
- * BiDi handling: Since we are looking for the char at the specific coords,
- * we have to get the visual string (to which the coords relate to), do
- * reverse kerning query because we are working on the visual string, and then
- * we need to get the logical position of the char we found from the visual string.
+/**
+ * @internal
+ * Find the character at a specific x, y coordinates and return it's position
+ * in the text (not in the text object, but in the source text). Also calculate
+ * the char's geometry.
+ *
+ * @param fn the font set to use.
+ * @param text_props the string object.
+ * @param x the x to look at.
+ * @param y the y to look at.
+ * @param[out] cx the calculated x - CAN BE NULL
+ * @param[out] cy the calculated y - CAN BE NULL
+ * @param[out] cw the calculated width - CAN BE NULL
+ * @param[out] ch the calculated height - CAN BE NULL
+ * @return the position found, -1 on failure.
  */
-
 EAPI int
-evas_common_font_query_char_at_coords(RGBA_Font *fn, const Eina_Unicode *text __UNUSED__, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch)
+evas_common_font_query_char_at_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch)
 {
    int asc, desc;
    int ret_val = -1;
@@ -410,7 +635,7 @@ evas_common_font_query_char_at_coords(RGBA_Font *fn, const Eina_Unicode *text __
    Evas_Coord cluster_start = 0;
    int prev_cluster = -1;
    int found = 0, items = 1;
-   EVAS_FONT_WALK_TEXT_VISUAL_START()
+   EVAS_FONT_WALK_TEXT_START()
      {
         EVAS_FONT_WALK_TEXT_WORK();
         if (prev_cluster != (int) EVAS_FONT_WALK_POS)
@@ -430,8 +655,8 @@ evas_common_font_query_char_at_coords(RGBA_Font *fn, const Eina_Unicode *text __
         /* we need to see if the char at the visual position is the char,
          * we check that by checking if it's before the current pen
          * position and the next */
-        if ((x >= EVAS_FONT_WALK_PEN_X) && (x <= (EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_ADV)) &&
-              (y >= -asc) && (y <= desc))
+        if ((x >= EVAS_FONT_WALK_PEN_X) &&
+            (x <= (EVAS_FONT_WALK_PEN_X_AFTER)) && (y >= -asc) && (y <= desc))
           {
 #ifdef OT_SUPPORT
              items = evas_common_font_ot_cluster_size_get(text_props,
@@ -474,36 +699,88 @@ end:
    return ret_val;
 }
 
-/* position of the char after the last char in the text that will fit in xy.
- * BiDi handling: We receive the shaped string + other props from text_props,
- * All we care about is char sizes + kerning so we only really need to get the
- * shaped string to utf8, and then just go through it like in english, as it's
- * just the logical string, nothing special about that.
+/**
+ * @internal
+ * Find one after the last character that fits until the boundaries set by x
+ * and y. I.e find the first char that doesn't fit.
+ * This LOGICALLY walks the string. This is needed for wrapping for example
+ * where we want the first part to be the first logical part.
+ *
+ * @param fn the font set to use.
+ * @param text_props the string object.
+ * @param x the x boundary.
+ * @param y the y boundary.
+ * @return the position found, -1 on failure.
  */
-
 EAPI int
-evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const Eina_Unicode *text __UNUSED__, const Evas_Text_Props *text_props, int x, int y)
+evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const Evas_Text_Props *text_props, int x, int y)
 {
    int asc, desc;
    int ret=-1;
-   EVAS_FONT_WALK_TEXT_INIT();
 
    asc = evas_common_font_max_ascent_get(fn);
    desc = evas_common_font_max_descent_get(fn);
 
-   EVAS_FONT_WALK_TEXT_LOGICAL_START()
+#ifdef BIDI_SUPPORT
+   if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
      {
-        EVAS_FONT_WALK_TEXT_WORK();
-        if (!EVAS_FONT_WALK_IS_VISIBLE) continue;
+        Evas_Font_Glyph_Info *gli = (text_props->info) ?
+           text_props->info->glyph + text_props->start : NULL;
+        Evas_Coord full_adv = 0, pen_x = 0, start_pen = 0;
+        int i;
 
-        if ((x >= EVAS_FONT_WALK_PEN_X) && (x <= (EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_ADV)) &&
-              (y >= -asc) && (y <= desc))
+        if (text_props->len > 0)
           {
-             ret = EVAS_FONT_WALK_POS;
-             goto end;
+             full_adv = gli[text_props->len - 1].pen_after;
+             if (text_props->start > 0)
+               {
+                  start_pen = gli[-1].pen_after;
+                  full_adv -= start_pen;
+               }
+          }
+
+        gli += text_props->len - 1;
+        for (i = text_props->len - 1 ; i >= 0 ; i--, gli--)
+          {
+             pen_x = full_adv - (gli->pen_after - start_pen);
+             /* If invisible, skip */
+             if (gli->index == 0) continue;
+             if ((x >= pen_x) &&
+                 (((i == 0) && (x <= full_adv)) ||
+                  (x <= (full_adv - (gli[-1].pen_after - start_pen)))) &&
+                 (y >= -asc) && (y <= desc))
+               {
+#ifdef OT_SUPPORT
+                  ret = EVAS_FONT_OT_POS_GET(
+                     text_props->info->ot[text_props->start + i]) -
+                     text_props->text_offset;
+#else
+                  ret = text_props->text_len - i - 1;
+#endif
+                  goto end;
+               }
           }
      }
-   EVAS_FONT_WALK_TEXT_END();
+   else
+#endif
+     {
+        EVAS_FONT_WALK_TEXT_INIT();
+        /* When text is not rtl, visual direction = logical direction */
+        EVAS_FONT_WALK_TEXT_START()
+          {
+             EVAS_FONT_WALK_TEXT_WORK();
+             if (!EVAS_FONT_WALK_IS_VISIBLE) continue;
+
+             if ((x >= EVAS_FONT_WALK_PEN_X) &&
+                 (x <= (EVAS_FONT_WALK_PEN_X_AFTER)) &&
+                 (y >= -asc) && (y <= desc))
+               {
+                  ret = EVAS_FONT_WALK_POS;
+                  goto end;
+               }
+          }
+        EVAS_FONT_WALK_TEXT_END();
+     }
 
 end:
 
index 0e2a66a..6d5c620 100644 (file)
@@ -55,4 +55,8 @@ EAPI void
 EAPI int evas_common_load_rgba_image_module_from_file (Image_Entry *im);
 EAPI int evas_common_load_rgba_image_data_from_file   (Image_Entry *im);
 
+void _evas_common_rgba_image_post_surface(Image_Entry *ie);
+
+EAPI Eina_Bool evas_common_extension_can_load_get(const char *file);
+
 #endif /* _EVAS_IMAGE_H */
index 15ee166..c235f90 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "evas_common.h"
 #include "evas_private.h"
+#include "evas_image.h"
 
 int
 evas_common_rgba_image_from_data(Image_Entry* ie_dst, int w, int h, DATA32 *image_data, int alpha, int cspace)
@@ -31,6 +32,7 @@ evas_common_rgba_image_from_data(Image_Entry* ie_dst, int w, int h, DATA32 *imag
      }
    dst->cache_entry.space = cspace;
    evas_common_image_colorspace_dirty(dst);
+   _evas_common_rgba_image_post_surface(ie_dst);
    return 0;
 }
 
@@ -60,6 +62,7 @@ evas_common_rgba_image_from_copied_data(Image_Entry* ie_dst, int w, int h, DATA3
 
    dst->cache_entry.space = cspace;
    evas_common_image_colorspace_dirty(dst);
+   _evas_common_rgba_image_post_surface(ie_dst);
    return 0;
 }
 
@@ -80,6 +83,7 @@ evas_common_rgba_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, u
      dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char *) * 2);
    evas_common_image_colorspace_dirty(dst);
 
+   _evas_common_rgba_image_post_surface(ie_dst);
    return 0;
 }
 
@@ -126,5 +130,6 @@ evas_common_rgba_image_colorspace_set(Image_Entry* ie_dst, int cspace)
    dst->cache_entry.space = cspace;
    evas_common_image_colorspace_dirty(dst);
 
+   _evas_common_rgba_image_post_surface(ie_dst);
    return 0;
 }
index ba6b38d..d374f47 100644 (file)
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
 #include "evas_common.h"
 #include "evas_private.h"
 #include "evas_cs.h"
 
 struct ext_loader_s
 {
+   unsigned int length;
    const char *extension;
    const char *loader;
 };
 
+#define MATCHING(Ext, Module)                   \
+  { sizeof (Ext), Ext, Module }
+
 static const struct ext_loader_s loaders[] =
-{
-   { "png", "png" },
-   { "jpg", "jpeg" },
-   { "jpeg", "jpeg" },
-   { "jfif", "jpeg" },
-   { "eet", "eet" },
-   { "edj", "eet" },
-   { "eap", "eet" },
-   { "edb", "edb" },
-   { "xpm", "xpm" },
-   { "tiff", "tiff" },
-   { "tif", "tiff" },
-   { "svg", "svg" },
-   { "svgz", "svg" },
-   { "gif", "gif" },
-   { "pbm", "pmaps" },
-   { "pgm", "pmaps" },
-   { "ppm", "pmaps" },
-   { "pnm", "pmaps" },
-   { "bmp", "bmp" },
-   { "tga", "tga" },
-   { "wbmp", "wbmp" },
-   { "ico", "ico" },
-   { "cur", "ico" }
+{ /* map extensions to loaders to use for good first-guess tries */
+   MATCHING(".png", "png"),
+   MATCHING(".jpg", "jpeg"),
+   MATCHING(".jpeg", "jpeg"),
+   MATCHING(".jfif", "jpeg"),
+   MATCHING(".eet", "eet"),
+   MATCHING(".edj", "eet"),
+   MATCHING(".eap", "eet"),
+   MATCHING(".edb", "edb"),
+   MATCHING(".xpm", "xpm"),
+   MATCHING(".tiff", "tiff"),
+   MATCHING(".tif", "tiff"),
+   MATCHING(".svg", "svg"),
+   MATCHING(".svgz", "svg"),
+   MATCHING(".svg.gz", "svg"),
+   MATCHING(".gif", "gif"),
+   MATCHING(".pbm", "pmaps"),
+   MATCHING(".pgm", "pmaps"),
+   MATCHING(".ppm", "pmaps"),
+   MATCHING(".pnm", "pmaps"),
+   MATCHING(".bmp", "bmp"),
+   MATCHING(".tga", "tga"),
+   MATCHING(".wbmp", "wbmp"),
+   MATCHING(".ico", "ico"),
+   MATCHING(".cur", "ico"),
+   MATCHING(".psd", "psd"),
+   MATCHING(".pdf", "generic"),
+   MATCHING(".ps", "generic"),
+   MATCHING(".xcf", "generic"),
+   MATCHING(".xcf.gz", "generic"),
+   /* RAW */
+   MATCHING(".arw", "generic"),
+   MATCHING(".cr2", "generic"),
+   MATCHING(".crw", "generic"),
+   MATCHING(".dcr", "generic"),
+   MATCHING(".dng", "generic"),
+   MATCHING(".k25", "generic"),
+   MATCHING(".kdc", "generic"),
+   MATCHING(".erf", "generic"),
+   MATCHING(".mrw", "generic"),
+   MATCHING(".nef", "generic"),
+   MATCHING(".nrf", "generic"),
+   MATCHING(".nrw", "generic"),
+   MATCHING(".orf", "generic"),
+   MATCHING(".raw", "generic"),
+   MATCHING(".rw2", "generic"),
+   MATCHING(".pef", "generic"),
+   MATCHING(".raf", "generic"),
+   MATCHING(".sr2", "generic"),
+   MATCHING(".srf", "generic"),
+   MATCHING(".x3f", "generic"),
+   /* video */
+   MATCHING(".264", "generic"),
+   MATCHING(".3g2", "generic"),
+   MATCHING(".3gp", "generic"),
+   MATCHING(".3gp2", "generic"),
+   MATCHING(".3gpp", "generic"),
+   MATCHING(".3gpp2", "generic"),
+   MATCHING(".3p2", "generic"),
+   MATCHING(".asf", "generic"),
+   MATCHING(".avi", "generic"),
+   MATCHING(".bdm", "generic"),
+   MATCHING(".bdmv", "generic"),
+   MATCHING(".clpi", "generic"),
+   MATCHING(".clp", "generic"),
+   MATCHING(".fla", "generic"),
+   MATCHING(".flv", "generic"),
+   MATCHING(".m1v", "generic"),
+   MATCHING(".m2v", "generic"),
+   MATCHING(".m2t", "generic"),
+   MATCHING(".m4v", "generic"),
+   MATCHING(".mkv", "generic"),
+   MATCHING(".mov", "generic"),
+   MATCHING(".mp2", "generic"),
+   MATCHING(".mp2ts", "generic"),
+   MATCHING(".mp4", "generic"),
+   MATCHING(".mpe", "generic"),
+   MATCHING(".mpeg", "generic"),
+   MATCHING(".mpg", "generic"),
+   MATCHING(".mpl", "generic"),
+   MATCHING(".mpls", "generic"),
+   MATCHING(".mts", "generic"),
+   MATCHING(".mxf", "generic"),
+   MATCHING(".nut", "generic"),
+   MATCHING(".nuv", "generic"),
+   MATCHING(".ogg", "generic"),
+   MATCHING(".ogm", "generic"),
+   MATCHING(".ogv", "generic"),
+   MATCHING(".rm", "generic"),
+   MATCHING(".rmj", "generic"),
+   MATCHING(".rmm", "generic"),
+   MATCHING(".rms", "generic"),
+   MATCHING(".rmx", "generic"),
+   MATCHING(".rmvb", "generic"),
+   MATCHING(".swf", "generic"),
+   MATCHING(".ts", "generic"),
+   MATCHING(".weba", "generic"),
+   MATCHING(".webm", "generic"),
+   MATCHING(".wmv", "generic")
 };
 
 static const char *loaders_name[] =
-{
-  "png", "jpeg", "eet", "xpm", "tiff", "gif", "svg", "pmaps", "edb", "bmp", "tga", "wbmp", "ico"
+{ /* in order of most likely needed */
+  "png", "jpeg", "eet", "xpm", "tiff", "gif", "svg", "pmaps", "bmp", "tga", "wbmp", "ico", "psd", "edb", "generic"
 };
 
 struct evas_image_foreach_loader_data
@@ -75,11 +158,11 @@ EAPI int
 evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
 {
    Evas_Image_Load_Func *evas_image_load_func = NULL;
-   const char           *loader = NULL;
+   const char           *loader = NULL, *end;
    Evas_Module          *em;
-   char                 *dot;
+   struct stat          st;
    unsigned int          i;
-   int                   ret = EVAS_LOAD_ERROR_NONE;
+   int                   len, ret = EVAS_LOAD_ERROR_NONE;
    struct evas_image_foreach_loader_data fdata;
 
 
@@ -95,20 +178,26 @@ evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
              return EVAS_LOAD_ERROR_NONE;
           }
      }
-#endif   
-   dot = strrchr (ie->file, '.');
-   if (dot)
+#endif
+   if (stat(ie->file, &st) != 0 || S_ISDIR(st.st_mode))
      {
-       for (i = 0, ++dot; i < (sizeof (loaders) / sizeof (struct ext_loader_s)); ++i)
-         {
-            if (!strcasecmp(dot, loaders[i].extension))
-              {
-                 loader = loaders[i].loader;
-                 DBG("known loader '%s' handles extension '%s' of file '%s'",
-                     loader, dot, ie->file);
-                 break;
-              }
-         }
+        DBG("trying to open directory '%s' !", ie->file);
+        return EVAS_LOAD_ERROR_DOES_NOT_EXIST;
+     }
+
+   len = strlen(ie->file);
+   end = ie->file + len;
+   for (i = 0; i < (sizeof (loaders) / sizeof(struct ext_loader_s)); i++)
+     {
+        int len2 = strlen(loaders[i].extension);
+        if (len2 > len) continue;
+        if (!strcasecmp(end - len2, loaders[i].extension))
+          {
+             loader = loaders[i].loader;
+             DBG("known loader '%s' handles extension '%s' of file '%s'",
+                 loader, end - len2, ie->file);
+             break;
+          }
      }
 
    if (loader)
@@ -256,3 +345,23 @@ evas_common_load_rgba_image_data_from_file(Image_Entry *ie)
 
    return EVAS_LOAD_ERROR_NONE;
 }
+
+EAPI Eina_Bool
+evas_common_extension_can_load_get(const char *file)
+{
+   unsigned int length;
+   unsigned int i;
+
+   length = eina_stringshare_strlen(file) + 1;
+   if (length < 5) return EINA_FALSE;
+
+   for (i = 0; i < sizeof (loaders) / sizeof (struct ext_loader_s); ++i)
+     {
+        if (loaders[i].length > length) continue;
+
+        if (!strcasecmp(loaders[i].extension, file + length - loaders[i].length))
+          return EINA_TRUE;
+     }
+
+   return EINA_FALSE;
+}
index 2e76f7c..7a8984a 100644 (file)
@@ -140,24 +140,26 @@ _evas_common_rgba_image_new(void)
 #ifdef EVAS_FRAME_QUEUING
    LKI(im->cache_entry.ref_fq_add);
    LKI(im->cache_entry.ref_fq_del);
-   pthread_cond_init(&(im->cache_entry.cond_fq_del), NULL);
+   eina_condition_new(&(im->cache_entry.cond_fq_del),
+                     &(im->cache_entry.ref_fq_del));
 #endif
 
    evas_common_rgba_image_scalecache_init(&im->cache_entry);
+   
    return &im->cache_entry;
 }
 
 static void
 _evas_common_rgba_image_delete(Image_Entry *ie)
 {
-   RGBA_Image   *im = (RGBA_Image *) ie;
+   RGBA_Image *im = (RGBA_Image *)ie;
 
 #ifdef BUILD_PIPE_RENDER
    evas_common_pipe_free(im);
 # ifdef EVAS_FRAME_QUEUING
    LKD(im->cache_entry.ref_fq_add);
    LKD(im->cache_entry.ref_fq_del);
-   pthread_cond_destroy(&(im->cache_entry.cond_fq_del));
+   eina_condition_free(&(im->cache_entry.cond_fq_del));
 # endif
 #endif   
    evas_common_rgba_image_scalecache_shutdown(&im->cache_entry);
@@ -246,6 +248,42 @@ evas_common_rgba_image_unload(Image_Entry *ie)
 #endif
 }
 
+void
+_evas_common_rgba_image_post_surface(Image_Entry *ie)
+{
+#ifdef HAVE_PIXMAN
+   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            
+            PIXMAN_a8r8g8b8,
+//            PIXMAN_b8g8r8a8, 
+            im->cache_entry.w, im->cache_entry.h,
+            im->image.data, 
+            im->cache_entry.w * 4
+        );
+     }
+   else
+     {
+        im->pixman.im = pixman_image_create_bits
+        (
+// FIXME: endianess determines this            
+            PIXMAN_x8r8g8b8,
+//            PIXMAN_b8g8r8x8,
+            im->cache_entry.w, im->cache_entry.h,
+            im->image.data, 
+            im->cache_entry.w * 4
+        );
+     }
+#else
+   ie = NULL;
+#endif
+}
+
 static int
 _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h)
 {
@@ -275,7 +313,8 @@ _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned
 #  endif
 # endif
 #endif
-
+   _evas_common_rgba_image_post_surface(ie);
+   
    return 0;
 }
 
@@ -284,6 +323,13 @@ _evas_common_rgba_image_surface_delete(Image_Entry *ie)
 {
    RGBA_Image   *im = (RGBA_Image *) ie;
 
+#ifdef HAVE_PIXMAN
+   if (im->pixman.im)
+     {
+        pixman_image_unref(im->pixman.im);
+        im->pixman.im = NULL;
+     }
+#endif   
    if (ie->file)
      DBG("unload: [%p] %s %s", ie, ie->file, ie->key);
    if ((im->cs.data) && (im->image.data))
@@ -368,13 +414,13 @@ _evas_common_rgba_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src)
 static int
 _evas_common_rgba_image_ram_usage(Image_Entry *ie)
 {
-   RGBA_Image   *im = (RGBA_Image *) 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
index d9aeea7..1bec6c8 100644 (file)
@@ -13,5 +13,5 @@ void evas_common_rgba_image_scalecache_shutdown(Image_Entry *ie);
 void evas_common_rgba_image_scalecache_dirty(Image_Entry *ie);
 void evas_common_rgba_image_scalecache_orig_use(Image_Entry *ie);
 int evas_common_rgba_image_scalecache_usage_get(Image_Entry *ie);
-    
+
 #endif /* _EVAS_IMAGE_PRIVATE_H */
index 63d4c47..9b846a3 100644 (file)
@@ -100,6 +100,7 @@ evas_common_rgba_image_scalecache_init(Image_Entry *ie)
 {
 #ifdef SCALECACHE
    RGBA_Image *im = (RGBA_Image *)ie;
+   // NOTE: this conflicts with evas image cache init and del of lock
    LKI(im->cache.lock);
 #endif
 }
@@ -110,6 +111,7 @@ evas_common_rgba_image_scalecache_shutdown(Image_Entry *ie)
 #ifdef SCALECACHE
    RGBA_Image *im = (RGBA_Image *)ie;
    evas_common_rgba_image_scalecache_dirty(ie);
+   // NOTE: this conflicts with evas image cache init and del of lock
    LKD(im->cache.lock);
 #endif
 }
@@ -247,7 +249,6 @@ _sci_find(RGBA_Image *im,
           _sci_fix_newest(im);
         if (sci->im)
           {
-             LKL(cache_lock);
              evas_common_rgba_image_free(&sci->im->cache_entry);
              if (!sci->forced_unload)
                cache_size -= sci->dst_w * sci->dst_h * 4;
@@ -255,7 +256,6 @@ _sci_find(RGBA_Image *im,
                cache_size -= sci->size_adjust;
 //             INF(" 1- %i", sci->dst_w * sci->dst_h * 4);
              cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci);
-             LKU(cache_lock);
           }
 #ifdef EVAS_FRAME_QUEUING
         RWLKU(sci->lock);
@@ -398,19 +398,63 @@ evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst __UNU
                                           int dst_region_w, int dst_region_h)
 {
 #ifdef SCALECACHE
+   int locked = 0;
+   Eina_Lock_Result ret;
    RGBA_Image *im = (RGBA_Image *)ie;
    Scaleitem *sci;
    if (!im->image.data) return;
    if ((dst_region_w == 0) || (dst_region_h == 0) ||
        (src_region_w == 0) || (src_region_h == 0)) return;
-   LKL(im->cache.lock);
+   // was having major lock issues here - LKL was deadlocking. what was
+   // going on? it may have been an eina treads badness but this will stay here
+   // for now for debug
+#if 1
+   ret = LKT(im->cache.lock);
+   if (ret == EINA_FALSE) /* can't get image lock */
+     {
+        useconds_t slp = 1, slpt = 0;
+        
+        while (slpt < 500000)
+          {
+#ifdef _WIN32
+             Sleep(slp / 1000);
+#else
+             usleep(slp);
+#endif
+             slpt += slp;
+             slp++;
+             ret = LKT(im->cache.lock);
+             if (ret == EINA_LOCK_DEADLOCK)
+               {
+                  printf("WARNING: DEADLOCK on image %p (%s)\n", im, ie->file);
+               }
+             else
+               {
+                  locked = 1;
+                  break;
+               }
+          }
+        if (ret == EINA_FALSE)
+          {
+             printf("WARNING: lock still there after %i usec\n", slpt);
+             printf("WARNING: stucklock on image %p (%s)\n", im, ie->file);
+             LKDBG(im->cache.lock);
+          }
+     }
+   else if (ret == EINA_LOCK_DEADLOCK)
+     {
+        printf("WARNING: DEADLOCK on image %p (%s)\n", im, ie->file);
+     }
+   else locked = 1;
+#endif   
+   if (!locked) { LKL(im->cache.lock); locked = 1; }
    use_counter++;
    if ((src_region_w == dst_region_w) && (src_region_h == dst_region_h))
      {
         // 1:1 scale.
         im->cache.orig_usage++;
         im->cache.usage_count = use_counter;
-        LKU(im->cache.lock);
+        if (locked) LKU(im->cache.lock);
         return;
      }
    if ((!im->cache_entry.flags.alpha) && (!smooth))
@@ -419,7 +463,7 @@ evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst __UNU
         // or in some cases faster not cached
         im->cache.orig_usage++;
         im->cache.usage_count = use_counter;
-        LKU(im->cache.lock);
+        if (locked) LKU(im->cache.lock);
         return;
      }
    LKL(cache_lock);
@@ -429,7 +473,7 @@ evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst __UNU
    if (!sci)
      {
         LKU(cache_lock);
-        LKU(im->cache.lock);
+        if (locked) LKU(im->cache.lock);
         return;
      }
 //   INF("%10i | %4i %4i %4ix%4i -> %4i %4i %4ix%4i | %i",
@@ -466,7 +510,7 @@ evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst __UNU
    if (sci->usage_count > im->cache.newest_usage_count) 
      im->cache.newest_usage_count = sci->usage_count;
 //   INF("  -------------- used %8i#, %8i@", (int)sci->usage, (int)sci->usage_count);
-   LKU(im->cache.lock);
+   if (locked) LKU(im->cache.lock);
 #endif
 }
 
@@ -518,18 +562,11 @@ evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
         LKU(im->cache.lock);
         if (im->image.data)
           {
-             if (smooth)
-               evas_common_scale_rgba_in_to_out_clip_smooth(im, dst, dc,
-                                                            src_region_x, src_region_y, 
-                                                            src_region_w, src_region_h,
-                                                            dst_region_x, dst_region_y, 
-                                                            dst_region_w, dst_region_h);
-             else
-               evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc,
-                                                            src_region_x, src_region_y, 
-                                                            src_region_w, src_region_h,
-                                                            dst_region_x, dst_region_y, 
-                                                            dst_region_w, dst_region_h);
+             evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc,
+                                                          src_region_x, src_region_y, 
+                                                          src_region_w, src_region_h,
+                                                          dst_region_x, dst_region_y, 
+                                                          dst_region_w, dst_region_h);
           }
         return;
      }
diff --git a/src/lib/engines/common/evas_op_add/.cvsignore b/src/lib/engines/common/evas_op_add/.cvsignore
deleted file mode 100644 (file)
index 282522d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/src/lib/engines/common/evas_op_blend/.cvsignore b/src/lib/engines/common/evas_op_blend/.cvsignore
deleted file mode 100644 (file)
index 282522d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
index a57052c..6e35970 100644 (file)
@@ -200,6 +200,19 @@ _op_blend_pan_can_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, i
 
 static void
 _op_blend_pan_caa_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
+#if 1 
+   DATA32 *e;
+   int alpha;
+   c = 1 + (c & 0xff);
+   UNROLL8_PLD_WHILE(d, l, e,
+                    {
+                       DATA32 sc = MUL_256(c, *s);
+                       alpha = 256 - (sc >> 24);
+                       *d = sc + MUL_256(alpha, *d);
+                       d++;
+                       s++;
+                    });
+#else // the below neon is buggy!! misses rendering of spans, i think with alignment. quick - just disable this.
 #define AP     "_op_blend_pan_caa_dp_"
    DATA32 *e = d + l, *tmp = (void*)73;
       asm volatile (
@@ -400,6 +413,7 @@ _op_blend_pan_caa_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, i
        : "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q8", "q9", "memory"
       );
 #undef AP
+#endif   
 }
 
 #define _op_blend_pas_c_dp_neon _op_blend_p_c_dp_neon
diff --git a/src/lib/engines/common/evas_op_copy/.cvsignore b/src/lib/engines/common/evas_op_copy/.cvsignore
deleted file mode 100644 (file)
index 282522d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
index afda1d8..4575aee 100644 (file)
@@ -49,7 +49,7 @@ static RGBA_Gfx_Func op_copy_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst
 static RGBA_Gfx_Func op_copy_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
 
 static RGBA_Gfx_Pt_Func op_copy_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
-/* XXX: doesnt exist
+/* XXX: doesn't exist
 static RGBA_Gfx_Pt_Func op_copy_rel_color_pt_get(DATA32 col, RGBA_Image *dst);
  */
 static RGBA_Gfx_Pt_Func op_copy_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
diff --git a/src/lib/engines/common/evas_op_mask/.cvsignore b/src/lib/engines/common/evas_op_mask/.cvsignore
deleted file mode 100644 (file)
index 282522d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/src/lib/engines/common/evas_op_mul/.cvsignore b/src/lib/engines/common/evas_op_mul/.cvsignore
deleted file mode 100644 (file)
index 282522d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/src/lib/engines/common/evas_op_sub/.cvsignore b/src/lib/engines/common/evas_op_sub/.cvsignore
deleted file mode 100644 (file)
index 282522d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
index 1f1b030..66085c8 100644 (file)
@@ -75,7 +75,7 @@ evas_common_frame_add(Evas_FrameQ *frameq, Evas_Frame *frame)
    while ((int)eina_inlist_count(EINA_INLIST_GET(frameq->frames)) >= frameq->frameq_sz)
      {
         /* wait a worker thread finish previous frame */
-        pthread_cond_wait(&(frameq->cond_done), &(frameq->mutex));
+        eina_condition_wait(&(frameq->cond_done));
      }
    frameq->frames = (Evas_Frame *) eina_inlist_append(EINA_INLIST_GET(frameq->frames), EINA_INLIST_GET(frame));
 
@@ -92,7 +92,7 @@ evas_common_frame_add(Evas_FrameQ *frameq, Evas_Frame *frame)
 
    LKU(frameq->mutex);
 
-   pthread_cond_signal(&(frameq->cond_new));
+   eina_condition_signal(&(frameq->cond_new));
 }
 
 EAPI Evas_Surface *
@@ -146,10 +146,10 @@ EAPI void
 evas_common_frameq_init(void)
 {
    gframeq.frames = NULL;
-   pthread_cond_init(&(gframeq.cond_new), NULL);
-   pthread_cond_init(&(gframeq.cond_ready), NULL);
-   pthread_cond_init(&(gframeq.cond_done), NULL);
    LKI(gframeq.mutex);
+   eina_condition_new(&(gframeq.cond_new), &(gframeq.mutex));
+   eina_condition_new(&(gframeq.cond_ready), &(gframeq.mutex));
+   eina_condition_new(&(gframeq.cond_done), &(gframeq.mutex));
    gframeq.initialised = 0;    // worker thread are not created yet
    gframeq.frameq_sz = 1;      // this value ensures the first frame can be enqueued.
 }
@@ -159,13 +159,13 @@ evas_common_frameq_destroy(void)
 {
 #if 0 // let them destroyed indirectly with program exit
    LKL(gframeq.mutex);
-   pthread_cond_destroy(&(gframeq.cond_new));
-   pthread_cond_destroy(&(gframeq.cond_ready));
-   pthread_cond_destroy(&(gframeq.cond_done));
+   eina_condition_free(&(gframeq.cond_new));
+   eina_condition_free(&(gframeq.cond_ready));
+   eina_condition_free(&(gframeq.cond_done));
    LKU(gframeq.mutex);
 #endif
    LKD(gframeq.mutex);
-   
+
    gframeq.frames = NULL;
    gframeq.initialised = 0;
 }
@@ -180,7 +180,7 @@ evas_common_frameq_flush(void)
    while(eina_inlist_count(EINA_INLIST_GET(gframeq.frames)) > 0)
      {
         /* wait a worker thread finish previous frame */
-        pthread_cond_wait(&(gframeq.cond_done), &(gframeq.mutex));
+        eina_condition_wait(&(gframeq.cond_done));
    }
    LKU(gframeq.mutex);
 }
@@ -211,24 +211,24 @@ static void evas_common_pipe_op_free(RGBA_Pipe_Op *op);
 
 /* utils */
 static RGBA_Pipe *
-evas_common_pipe_add(RGBA_Pipe *pipe, RGBA_Pipe_Op **op)
+evas_common_pipe_add(RGBA_Pipe *rpipe, RGBA_Pipe_Op **op)
 {
    RGBA_Pipe *p;
    int first_pipe = 0;
 
-   if (!pipe)
+   if (!rpipe)
      {
         first_pipe = 1;
         p = calloc(1, sizeof(RGBA_Pipe));
         if (!p) return NULL;
-        pipe = (RGBA_Pipe *)eina_inlist_append(EINA_INLIST_GET(pipe), EINA_INLIST_GET(p));
+        rpipe = (RGBA_Pipe *)eina_inlist_append(EINA_INLIST_GET(rpipe), EINA_INLIST_GET(p));
      }
-   p = (RGBA_Pipe *)(EINA_INLIST_GET(pipe))->last;
+   p = (RGBA_Pipe *)(EINA_INLIST_GET(rpipe))->last;
    if (p->op_num == PIPE_LEN)
      {
         p = calloc(1, sizeof(RGBA_Pipe));
         if (!p) return NULL;
-        pipe = (RGBA_Pipe *)eina_inlist_append(EINA_INLIST_GET(pipe), EINA_INLIST_GET(p));
+        rpipe = (RGBA_Pipe *)eina_inlist_append(EINA_INLIST_GET(rpipe), EINA_INLIST_GET(p));
      }
    p->op_num++;
    *op = &(p->op[p->op_num - 1]);
@@ -236,7 +236,7 @@ evas_common_pipe_add(RGBA_Pipe *pipe, RGBA_Pipe_Op **op)
      {
         /* FIXME: PTHREAD init any thread locks etc */
      }
-   return pipe;
+   return rpipe;
 }
 
 static void
@@ -360,7 +360,7 @@ evas_common_frameq_thread(void *data)
                   break;
                }
              pthread_testcancel();
-             pthread_cond_wait(&(frameq->cond_new), &(frameq->mutex));
+             eina_condition_wait(&(frameq->cond_new));
           }
         LKU(frameq->mutex);
 
@@ -399,7 +399,7 @@ evas_common_frameq_thread(void *data)
 
         LKL(frameq->mutex);
         frame->ready = 1;
-        pthread_cond_signal(&frameq->cond_ready);
+        eina_condition_signal(&(frameq->cond_ready));
         LKU(frameq->mutex);
      }
 
@@ -585,7 +585,7 @@ evas_common_frameq_schedule_flush_time(int frameq_sz, int thread_no,
    long long current_time = 0LL;
    long long current_ready_interval = 0LL;
    long long theshold_time = SATISFACTION_THRESHOLD * 1000LL;  // ms -> usec
-   long long reset_time_interval;
+   long long reset_time_interval = 0LL;
    long long sleep_time = 0LL;
    long long saved_ready_time, saved_ready_interval;
    long long time_slept = 0LL;
@@ -735,7 +735,7 @@ evas_common_frameq_thread_post(void *data)
         LKL(frameq->mutex);
         while(!frameq->frames || !frameq->frames->ready)
           {
-             pthread_cond_wait(&(frameq->cond_ready), &(frameq->mutex));
+             eina_condition_wait(&(frameq->cond_ready));
           }
         frame = frameq->frames;
 
@@ -785,7 +785,7 @@ evas_common_frameq_thread_post(void *data)
                   EINA_INLIST_GET(frame));
 
         LKU(frameq->mutex);
-        pthread_cond_broadcast(&frameq->cond_done);
+        eina_condition_broadcast(&frameq->cond_done);
         evas_common_frame_dealloc(frame);
      }
 
@@ -869,6 +869,8 @@ evas_common_frameq_begin(void)
         gframeq.thread_num = cpunum;
         gframeq.frameq_sz = cpunum * FRAMEQ_SZ_PER_THREAD;
 
+       eina_threads_init();
+
         for (i = 0; i < gframeq.thread_num; i++)
           {
 
@@ -938,10 +940,10 @@ evas_common_frameq_finish(void)
    /* 2. send signal to worker threads so that they enter to the thread cancelation cleanup handler */
    for (i = 0; i < gframeq.thread_num; i++)
      {
-        pthread_cond_signal(&(gframeq.cond_new));
+        eina_condition_signal(&(gframeq.cond_new));
      }
    // send signal to post-worker thread
-   pthread_cond_signal(&(gframeq.cond_ready));
+   eina_condition_signal(&(gframeq.cond_ready));
 
    /* all the workers were created and detached before
     *  so don't need to join them here.
@@ -1174,12 +1176,11 @@ evas_common_pipe_op_text_free(RGBA_Pipe_Op *op)
    LKL(op->op.text.font->ref_fq_del);
    op->op.text.font->ref_fq[1]++;
    LKU(op->op.text.font->ref_fq_del);
-   pthread_cond_signal(&(op->op.text.font->cond_fq_del));
+   eina_condition_signal(&(op->op.text.font->cond_fq_del));
 #else
    evas_common_font_free(op->op.text.font);
 #endif
    evas_common_text_props_content_unref(&(op->op.text.intl_props));
-   free(op->op.text.text);
    evas_common_pipe_op_free(op);
 }
 
@@ -1195,7 +1196,7 @@ evas_common_pipe_op_text_flush(RGBA_Font *fn)
    LKL(fn->ref_fq_del);
 
    while (fn->ref_fq[0] != fn->ref_fq[1])
-      pthread_cond_wait(&(fn->cond_fq_del), &(fn->ref_fq_del));
+     eina_condition_wait(&(fn->cond_fq_del));
 
    LKU(fn->ref_fq_del);
    LKU(fn->ref_fq_add);
@@ -1217,28 +1218,27 @@ evas_common_pipe_text_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Threa
 #endif
         evas_common_font_draw(dst, &(context),
                   op->op.text.font, op->op.text.x, op->op.text.y,
-                  op->op.text.text, &op->op.text.intl_props);
+                  &op->op.text.intl_props);
      }
    else
      {
         evas_common_font_draw(dst, &(op->context),
                   op->op.text.font, op->op.text.x, op->op.text.y,
-                  op->op.text.text, &op->op.text.intl_props);
+                  &op->op.text.intl_props);
      }
 }
 
 EAPI void
 evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
-               RGBA_Font *fn, int x, int y, const Eina_Unicode *text, const Evas_Text_Props *intl_props)
+               RGBA_Font *fn, int x, int y, const Evas_Text_Props *intl_props)
 {
    RGBA_Pipe_Op *op;
 
-   if ((!fn) || (!text)) return;
+   if (!fn) return;
    dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op);
    if (!dst->cache_entry.pipe) return;
    op->op.text.x = x;
    op->op.text.y = y;
-   op->op.text.text = eina_unicode_strdup(text);
    evas_common_text_props_content_copy_and_ref(&(op->op.text.intl_props),
          intl_props);
 #ifdef EVAS_FRAME_QUEUING
@@ -1262,7 +1262,7 @@ evas_common_pipe_op_image_free(RGBA_Pipe_Op *op)
    LKL(op->op.image.src->cache_entry.ref_fq_del);
    op->op.image.src->cache_entry.ref_fq[1]++;
    LKU(op->op.image.src->cache_entry.ref_fq_del);
-   pthread_cond_signal(&(op->op.image.src->cache_entry.cond_fq_del)); 
+   eina_condition_signal(&(op->op.image.src->cache_entry.cond_fq_del));
 #else
    op->op.image.src->ref--;
    if (op->op.image.src->ref == 0)
@@ -1284,7 +1284,7 @@ evas_common_pipe_op_image_flush(RGBA_Image *im)
    LKL(im->cache_entry.ref_fq_del);
 
    while (im->cache_entry.ref_fq[0] != im->cache_entry.ref_fq[1])
-      pthread_cond_wait(&(im->cache_entry.cond_fq_del), &(im->cache_entry.ref_fq_del));
+     eina_condition_wait(&(im->cache_entry.cond_fq_del));
 
    LKU(im->cache_entry.ref_fq_del);
    LKU(im->cache_entry.ref_fq_add);
@@ -1566,20 +1566,20 @@ evas_common_pipe_map_render(RGBA_Image *root)
 static Eina_List *task = NULL;
 static Thinfo task_thinfo[TH_MAX];
 static pthread_barrier_t task_thbarrier[2];
-static LK(task_mutext) = PTHREAD_MUTEX_INITIALIZER;
+static LK(task_mutext);
 #endif
 
 #ifdef BUILD_PTHREAD
 static void*
 evas_common_pipe_load(void *data)
 {
-  Thinfo *thinfo;
+  Thinfo *tinfo;
 
-  thinfo = data;
+  tinfo = data;
   for (;;)
     {
       /* wait for start signal */
-      pthread_barrier_wait(&(thinfo->barrier[0]));
+      pthread_barrier_wait(&(tinfo->barrier[0]));
 
       while (task)
        {
@@ -1601,7 +1601,7 @@ evas_common_pipe_load(void *data)
        }
 
       /* send finished signal */    
-      pthread_barrier_wait(&(thinfo->barrier[1]));
+      pthread_barrier_wait(&(tinfo->barrier[1]));
     }
 
   return NULL;
@@ -1637,6 +1637,10 @@ evas_common_pipe_init(void)
 // waiting onm pthread barriers for async rendering on a single core!
 //     if (thread_num == 1) return EINA_FALSE;
 
+       eina_threads_init();
+
+        LKI(task_mutext);
+
        pthread_barrier_init(&(thbarrier[0]), NULL, thread_num + 1);
        pthread_barrier_init(&(thbarrier[1]), NULL, thread_num + 1);
        for (i = 0; i < thread_num; i++)
@@ -1676,11 +1680,8 @@ evas_common_pipe_init(void)
                            evas_common_pipe_load, &(task_thinfo[i]));
             pthread_attr_destroy(&attr);
          }
-
-#if defined(METRIC_CACHE) || defined(WORD_CACHE)
-       eina_threads_init();
-#endif
      }
+
    if (thread_num == 1) return EINA_FALSE;
    return EINA_TRUE;
 #endif
index df7f673..37b0136 100644 (file)
@@ -1,5 +1,7 @@
 #ifndef _EVAS_PIPE_H
 #define _EVAS_PIPE_H
+
+#include <sys/time.h>
 #include "language/evas_bidi_utils.h"
 
 #ifdef BUILD_PTHREAD
@@ -46,9 +48,9 @@ struct _Evas_FrameQ
 {
    int initialised;
    Evas_Frame   *frames;
-   pthread_cond_t cond_new;
-   pthread_cond_t cond_ready;
-   pthread_cond_t cond_done;
+   Eina_Condition cond_new;
+   Eina_Condition cond_ready;
+   Eina_Condition cond_done;
    LK(mutex);
 
    int             thread_num;
@@ -92,7 +94,7 @@ EAPI void evas_common_pipe_free(RGBA_Image *im);
 EAPI void evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
 EAPI void evas_common_pipe_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
 EAPI void evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
-EAPI void evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Eina_Unicode *text, const Evas_Text_Props *intl_props);
+EAPI void evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Evas_Text_Props *intl_props);
 EAPI void evas_common_pipe_image_load(RGBA_Image *im);
 EAPI void evas_common_pipe_image_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int smooth, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
 EAPI void evas_common_pipe_map_begin(RGBA_Image *root);
index 222c6b7..28aaf16 100644 (file)
@@ -54,57 +54,20 @@ rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, in
    RGBA_Gfx_Func func;
    int yy;
    DATA32 *ptr;
-   RGBA_Image *maskobj;
-   DATA8 *mask = NULL;
 
    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;
 
-   maskobj = dc->mask.mask;
-   if (maskobj)
-     {
-       func = evas_common_gfx_func_composite_mask_color_span_get(dc->col.col,
-                       dst, 1, dc->render_op);
-       mask = maskobj->mask.mask;
-     }
-   else
-      func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, w, dc->render_op);
+   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;
-
-   if (!mask)
-     {
-        for (yy = 0; yy < h; yy++)
-          {
-#ifdef EVAS_SLI
-             if (((yy + y) % dc->sli.h) == dc->sli.y)
-#endif
-               {
-                  func(NULL, NULL, dc->col.col, ptr, w);
-               }
-             ptr += dst->cache_entry.w;
-          }
-     }
-   else
+   for (yy = 0; yy < h; yy++)
      {
-        /* X Adjust */
-        mask += x - dc->mask.x;
-        /* Y Adjust */
-        mask += (y - dc->mask.y) * maskobj->cache_entry.w;
-        /* Draw with mask */
-        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, mask, dc->col.col, ptr, w);
-               }
-             ptr += dst->cache_entry.w;
-             mask += maskobj->cache_entry.w;
-          }
-
+         {
+            func(NULL, NULL, dc->col.col, ptr, w);
+         }
+       ptr += dst->cache_entry.w;
      }
 }
-
-
-/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
index b544c05..54b8e92 100644 (file)
@@ -92,9 +92,10 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
    DATA32  *ptr, *dst_ptr, *src_data, *dst_data;
    int      dst_jump;
    int      dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h;
+   int      m_clip_x = 0, m_clip_y = 0, m_clip_w = 0, m_clip_h = 0, mdx = 0, mdy = 0;
    int      src_w, src_h, dst_w, dst_h;
    RGBA_Gfx_Func func;
-   RGBA_Image *maskobj;
+   RGBA_Image *maskobj = NULL;
    DATA8   *mask = NULL;
 
    if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
@@ -139,6 +140,21 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
        dst_clip_h = dst_h;
      }
 
+   if (dc->mask.mask)
+     {
+        m_clip_x = dc->mask.x;
+        m_clip_y = dc->mask.y;
+        m_clip_w = dc->mask.mask->cache_entry.w;
+        m_clip_h = dc->mask.mask->cache_entry.h;
+        RECTS_CLIP_TO_RECT(m_clip_x, m_clip_y, m_clip_w, m_clip_h,
+                           dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h);
+        if ((m_clip_w <= 0) || (m_clip_h <= 0)) return;
+        dst_clip_x = m_clip_x;
+        dst_clip_y = m_clip_y;
+        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;
@@ -242,6 +258,15 @@ 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);
+              printf("Warning: Unscaled mask (%d/%d) // (%d/%d)\n",
+                              dst_region_w,src_region_w,
+                              dst_region_h,src_region_h);
+       }
+ */
      }
    else if (dc->mul.use)
      func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
@@ -250,24 +275,49 @@ 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))
      {
-       ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x;
-       for (y = 0; y < dst_clip_h; y++)
-         {
-           /* * blend here [clip_w *] ptr -> dst_ptr * */
-            if (mask)
-             {
-                 mask += dst_clip_x - dc->mask.x;
-                 mask += (dst_clip_y - dc->mask.y) * maskobj->cache_entry.w;
-             }
+#ifdef HAVE_PIXMAN
+        if ((1) &&
+            (src->pixman.im) && (dst->pixman.im) && 
+            ((!dc->mul.use) ||
+                ((dc->mul.use) && (dc->mul.col == 0xffffffff))) &&
+            ((dc->render_op == _EVAS_RENDER_COPY) ||
+                (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;
+             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, 
+                                    0, 0,
+                                    dst_clip_x, dst_clip_y, 
+                                    dst_clip_w, dst_clip_h);
+          }
+        else
+#endif
+          {
+             ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x;
+             if (mask)
+               {
+                  mdx = (m_clip_x - dc->mask.x) + (m_clip_x - dst_clip_x);
+                  mdy = (m_clip_y - dc->mask.y) + (m_clip_y - dst_clip_y);
+                  mask += mdx + (mdy * maskobj->cache_entry.w);
+               }
+             for (y = 0; y < dst_clip_h; y++)
+               {
+                  /* * blend here [clip_w *] ptr -> dst_ptr * */
 #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
-              {
-                 func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
-              }
-           ptr += src_w;
-           dst_ptr += dst_w;
-           if (mask) mask += maskobj->cache_entry.w;
+                    {
+                       func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
+                    }
+                  ptr += src_w;
+                  dst_ptr += dst_w;
+                  if (mask) mask += maskobj->cache_entry.w;
+               }
          }
      }
    else
index fa3161f..24529e5 100644 (file)
@@ -21,8 +21,8 @@
 
    if (mask)
      {
-        mask += dst_clip_x - dc->mask.x;
-        mask += (dst_clip_y - dc->mask.y) * maskobj->cache_entry.w;
+   //     mask += dst_clip_x - dc->mask.x;
+     //   mask += (dst_clip_y - dc->mask.y) * maskobj->cache_entry.w;
         while (dst_clip_h--)
           {
 
index 616cd7e..74c3c99 100644 (file)
@@ -5,9 +5,6 @@
 #include "language/evas_language_utils.h"
 #include "evas_font_ot.h"
 
-/* Used for showing "malformed" or missing chars */
-#define REPLACEMENT_CHAR 0xFFFD
-
 void
 evas_common_text_props_bidi_set(Evas_Text_Props *props,
       Evas_BiDi_Paragraph_Props *bidi_par_props, size_t start)
@@ -25,10 +22,9 @@ evas_common_text_props_bidi_set(Evas_Text_Props *props,
 }
 
 void
-evas_common_text_props_script_set(Evas_Text_Props *props,
-      const Eina_Unicode *str)
+evas_common_text_props_script_set(Evas_Text_Props *props, Evas_Script_Type scr)
 {
-   props->script = evas_common_language_script_type_get(str);
+   props->script = scr;
 }
 
 void
@@ -69,7 +65,87 @@ evas_common_text_props_content_unref(Evas_Text_Props *props)
      }
 }
 
-/* Won't work in the middle of ligatures, assumes cutoff < len */
+/* Returns the index of the logical char in the props. */
+EAPI int
+evas_common_text_props_index_find(Evas_Text_Props *props, int _cutoff)
+{
+#ifdef OT_SUPPORT
+   Evas_Font_OT_Info *ot_info;
+   int min = 0;
+   int max = props->len - 1;
+   int mid;
+
+   _cutoff += props->text_offset;
+   ot_info = props->info->ot + props->start;
+   if (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
+     {
+        /* Monotonic in a descending order */
+        do
+          {
+             mid = (min + max) / 2;
+
+             if (_cutoff > (int) ot_info[mid].source_cluster)
+                max = mid - 1;
+             else if (_cutoff < (int) ot_info[mid].source_cluster)
+                min = mid + 1;
+             else
+                break;
+          }
+        while (min <= max);
+     }
+   else
+     {
+        /* Monotonic in an ascending order */
+        do
+          {
+             mid = (min + max) / 2;
+
+             if (_cutoff < (int) ot_info[mid].source_cluster)
+                max = mid - 1;
+             else if (_cutoff > (int) ot_info[mid].source_cluster)
+                min = mid + 1;
+             else
+                break;
+          }
+        while (min <= max);
+     }
+
+   /* If we didn't find, abort */
+   if (min > max)
+      return -1;
+
+   ot_info += mid;
+   if (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
+     {
+        /* Walk to the last one of the same cluster */
+        for ( ; mid < (int) props->len ; mid++, ot_info++)
+          {
+             if (ot_info->source_cluster != (size_t) _cutoff)
+                break;
+          }
+        mid = props->len - mid;
+     }
+   else
+     {
+        /* Walk to the last one of the same cluster */
+        for ( ; mid >= 0 ; mid--, ot_info--)
+          {
+             if (ot_info->source_cluster != (size_t) _cutoff)
+                break;
+          }
+        mid++;
+     }
+
+   return mid;
+#else
+   return _cutoff;
+   (void) props;
+#endif
+}
+
+/* Won't work in the middle of ligatures, assumes cutoff < len.
+ * Also won't work in the middle of indic words, should handle that in a
+ * smart way. */
 EAPI void
 evas_common_text_props_split(Evas_Text_Props *base,
       Evas_Text_Props *ext, int _cutoff)
@@ -78,39 +154,13 @@ evas_common_text_props_split(Evas_Text_Props *base,
 
    /* Translate text cutoff pos to string object cutoff point */
 #ifdef OT_SUPPORT
-   cutoff = 0;
+   _cutoff = evas_common_text_props_index_find(base, _cutoff);
 
+   if (_cutoff > 0)
      {
-        Evas_Font_OT_Info *itr;
-        size_t i;
-        itr = base->info->ot + base->start;
-        _cutoff += base->text_offset;
-        /* FIXME: can I binary search? I don't think this is always sorted */
-        for (i = 0 ; i < base->len ; i++, itr++)
-          {
-             if (itr->source_cluster == (size_t) _cutoff)
-               {
-                  if (base->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
-                    {
-                       /* Walk to the last one of the same cluster */
-                       for ( ; i < base->len ; i++, itr++)
-                         {
-                            if (itr->source_cluster != (size_t) _cutoff)
-                              break;
-                         }
-                       cutoff = base->len - i;
-                    }
-                  else
-                    {
-                       cutoff = i;
-                    }
-                  break;
-               }
-          }
+        cutoff = (size_t) _cutoff;
      }
-
-   /* If we didn't find a reasonable cut location, return. */
-   if (cutoff == 0)
+   else
      {
         ERR("Couldn't find the cutoff position. Is it inside a cluster?");
         return;
@@ -170,11 +220,11 @@ evas_common_text_props_merge(Evas_Text_Props *item1,
 }
 
 EAPI Eina_Bool
-evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text,
-      Evas_Text_Props *text_props, int len)
+evas_common_text_props_content_create(void *_fi, const Eina_Unicode *text,
+      Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props,
+      size_t par_pos, int len)
 {
-   RGBA_Font *fn = (RGBA_Font *) _fn;
-   RGBA_Font_Int *fi;
+   RGBA_Font_Int *fi = (RGBA_Font_Int *) _fi;
 
    if (text_props->info)
      {
@@ -187,8 +237,8 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text,
      }
    text_props->info = calloc(1, sizeof(Evas_Text_Props_Info));
 
-   fi = fn->fonts->data;
-   /* evas_common_font_size_use(fn); */
+   text_props->font_instance = fi;
+
    evas_common_font_int_reload(fi);
    if (fi->src->current_size != fi->size)
      {
@@ -201,53 +251,34 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text,
 #ifdef OT_SUPPORT
    size_t char_index;
    Evas_Font_Glyph_Info *gl_itr;
-   const Eina_Unicode *base_char;
-   evas_common_font_ot_populate_text_props(fn, text, text_props, len);
+   Evas_Coord pen_x = 0, adjust_x = 0;
+   (void) par_props;
+   (void) par_pos;
 
-   /* Load the glyph according to the first letter of the script, preety
-    * bad, but will have to do */
-     {
-        /* Skip common chars */
-        for (base_char = text ;
-             *base_char &&
-             evas_common_language_char_script_get(*base_char) ==
-             EVAS_SCRIPT_COMMON ;
-             base_char++)
-           ;
-        if (!*base_char && (base_char > text)) base_char--;
-        evas_common_font_glyph_search(fn, &fi, *base_char);
-     }
+   evas_common_font_ot_populate_text_props(text, text_props, len);
 
    gl_itr = text_props->info->glyph;
    for (char_index = 0 ; char_index < text_props->len ; char_index++)
      {
-        FT_UInt index;
+        FT_UInt idx;
         RGBA_Font_Glyph *fg;
         Eina_Bool is_replacement = EINA_FALSE;
         /* If we got a malformed index, show the replacement char instead */
         if (gl_itr->index == 0)
           {
-             gl_itr->index =
-                evas_common_font_glyph_search(fn, &fi, REPLACEMENT_CHAR);
+             gl_itr->index = evas_common_get_char_index(fi, REPLACEMENT_CHAR);
              is_replacement = EINA_TRUE;
           }
-        index = gl_itr->index;
+        idx = gl_itr->index;
         LKL(fi->ft_mutex);
-        fg = evas_common_font_int_cache_glyph_get(fi, index);
+        fg = evas_common_font_int_cache_glyph_get(fi, idx);
         if (!fg)
           {
              LKU(fi->ft_mutex);
              continue;
           }
         LKU(fi->ft_mutex);
-        if (is_replacement)
-          {
-             /* Update the advance accordingly */
-             gl_itr->advance =
-                fg->glyph->advance.x >> 10;
-             /* FIXME: reload fi, a bit slow, but I have no choice. */
-             evas_common_font_glyph_search(fn, &fi, *base_char);
-          }
+
         gl_itr->x_bear = fg->glyph_out->left;
         gl_itr->width = fg->glyph_out->bitmap.width;
         /* text_props->info->glyph[char_index].advance =
@@ -255,8 +286,31 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text,
          * already done by the ot function */
         if (EVAS_FONT_CHARACTER_IS_INVISIBLE(
               text[text_props->info->ot[char_index].source_cluster]))
-           gl_itr->index = 0;
+          {
+             gl_itr->index = 0;
+             /* Reduce the current advance */
+             if (gl_itr > text_props->info->glyph)
+               {
+                  adjust_x -= gl_itr->pen_after - (gl_itr - 1)->pen_after;
+               }
+             else
+               {
+                  adjust_x -= gl_itr->pen_after;
+               }
+          }
+        else
+          {
+             if (is_replacement)
+               {
+                  /* Update the advance accordingly */
+                  adjust_x += (pen_x + (fg->glyph->advance.x >> 16)) -
+                     gl_itr->pen_after;
+               }
+             pen_x = gl_itr->pen_after;
+          }
+        gl_itr->pen_after += adjust_x;
 
+        fi = text_props->font_instance;
         gl_itr++;
      }
 #else
@@ -265,7 +319,20 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text,
    Eina_Bool use_kerning;
    FT_UInt prev_index;
    FT_Face pface = NULL;
+   Evas_Coord pen_x = 0;
    int adv_d, i;
+#if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT)
+   Eina_Unicode *base_str = NULL;
+   if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
+     {
+        text = base_str = eina_unicode_strndup(text, len);
+        evas_bidi_shape_string(base_str, par_props, par_pos, len);
+     }
+#else
+   (void) par_props;
+   (void) par_pos;
+#endif
+
    FTLOCK();
    use_kerning = FT_HAS_KERNING(fi->src->ft.face);
    FTUNLOCK();
@@ -288,32 +355,21 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text,
    gl_itr = text_props->info->glyph;
    for ( ; i > 0 ; gl_itr++, text += adv_d, i--)
      {
-        FT_UInt index;
+        FT_UInt idx;
         RGBA_Font_Glyph *fg;
         int _gl, kern;
+        Evas_Coord adv;
         _gl = *text;
         if (_gl == 0) break;
 
-        index = evas_common_font_glyph_search(fn, &fi, _gl);
-        if (index == 0)
+        idx = evas_common_get_char_index(fi, _gl);
+        if (idx == 0)
           {
-             index = evas_common_font_glyph_search(fn, &fi, REPLACEMENT_CHAR);
-          }
-
-        /* Should we really set the size per fi? This fixes a bug for Korean
-         * because for some reason different fis are chosen for different
-         * chars in some cases. But we should find the source of the problem
-         * and not just fix the symptom. */
-        if (fi->src->current_size != fi->size)
-          {
-             FTLOCK();
-             FT_Activate_Size(fi->ft.size);
-             FTUNLOCK();
-             fi->src->current_size = fi->size;
+             idx = evas_common_get_char_index(fi, REPLACEMENT_CHAR);
           }
 
         LKL(fi->ft_mutex);
-        fg = evas_common_font_int_cache_glyph_get(fi, index);
+        fg = evas_common_font_int_cache_glyph_get(fi, idx);
         if (!fg)
           {
              LKU(fi->ft_mutex);
@@ -321,49 +377,45 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text,
           }
         kern = 0;
 
-        if ((use_kerning) && (prev_index) && (index) &&
+        if ((use_kerning) && (prev_index) && (idx) &&
             (pface == fi->src->ft.face))
           {
-# ifdef BIDI_SUPPORT
-             /* if it's rtl, the kerning matching should be reversed, */
-             /* i.e prev index is now the index and the other way */
-             /* around. There is a slight exception when there are */
-             /* compositing chars involved.*/
-             if (text_props &&
-                 (text_props->bidi.dir != EVAS_BIDI_DIRECTION_RTL))
-               {
-                  if (evas_common_font_query_kerning(fi, index, prev_index, &kern))
-                    {
-                       (gl_itr - 1)->advance += kern;
-                    }
-               }
-             else
-# endif
+             if (evas_common_font_query_kerning(fi, prev_index, idx, &kern))
                {
-                  if (evas_common_font_query_kerning(fi, prev_index, index, &kern))
-                    {
-                       (gl_itr - 1)->advance += kern;
-                    }
+                  pen_x += kern;
+                  (gl_itr - 1)->pen_after +=
+                     EVAS_FONT_ROUND_26_6_TO_INT(kern);
                }
           }
 
         pface = fi->src->ft.face;
         LKU(fi->ft_mutex);
 
-        if (EVAS_FONT_CHARACTER_IS_INVISIBLE(_gl))
-           gl_itr->index = 0;
-
-        gl_itr->index = index;
+        gl_itr->index = idx;
         gl_itr->x_bear = fg->glyph_out->left;
-        gl_itr->advance = fg->glyph->advance.x >> 10;
+        adv = fg->glyph->advance.x >> 10;
         gl_itr->width = fg->glyph_out->bitmap.width;
 
-        prev_index = index;
+        if (EVAS_FONT_CHARACTER_IS_INVISIBLE(_gl))
+          {
+             gl_itr->index = 0;
+          }
+        else
+          {
+             pen_x += adv;
+          }
+
+        gl_itr->pen_after = EVAS_FONT_ROUND_26_6_TO_INT(pen_x);
+
+        prev_index = idx;
      }
    text_props->len = len;
+# if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT)
+   if (base_str)
+      free(base_str);
+# endif
 #endif
    text_props->text_len = len;
    text_props->info->refcount = 1;
    return EINA_TRUE;
 }
-
index e4907ab..fdfa4f7 100644 (file)
@@ -9,6 +9,9 @@ typedef struct _Evas_Font_Glyph_Info Evas_Font_Glyph_Info;
 # include "language/evas_bidi_utils.h"
 # include "language/evas_language_utils.h"
 
+/* Used for showing "malformed" or missing chars */
+#define REPLACEMENT_CHAR 0xFFFD
+
 struct _Evas_Text_Props
 {
    /* Start and len represent the start offset and the length in the
@@ -20,6 +23,7 @@ struct _Evas_Text_Props
    Evas_BiDi_Props bidi;
    Evas_Script_Type script;
    Evas_Text_Props_Info *info;
+   void *font_instance;
 };
 
 struct _Evas_Text_Props_Info
@@ -41,7 +45,7 @@ struct _Evas_Font_Glyph_Info
    Evas_Coord y_bear;
 #endif
    Evas_Coord width;
-   Evas_Coord advance;
+   Evas_Coord pen_after;
 };
 
 
@@ -50,12 +54,12 @@ evas_common_text_props_bidi_set(Evas_Text_Props *props,
       Evas_BiDi_Paragraph_Props *bidi_par_props, size_t start);
 
 void
-evas_common_text_props_script_set(Evas_Text_Props *props,
-      const Eina_Unicode *str);
+evas_common_text_props_script_set(Evas_Text_Props *props, Evas_Script_Type scr);
 
 EAPI Eina_Bool
-evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text,
-      Evas_Text_Props *text_props, int len);
+evas_common_text_props_content_create(void *_fi, const Eina_Unicode *text,
+      Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props,
+      size_t par_pos, int len);
 
 void
 evas_common_text_props_content_copy_and_ref(Evas_Text_Props *dst,
@@ -67,10 +71,13 @@ evas_common_text_props_content_ref(Evas_Text_Props *props);
 void
 evas_common_text_props_content_unref(Evas_Text_Props *props);
 
+EAPI int
+evas_common_text_props_index_find(Evas_Text_Props *props, int _cutoff);
 
 EAPI void
 evas_common_text_props_split(Evas_Text_Props *base, Evas_Text_Props *ext,
       int cutoff);
 EAPI void
 evas_common_text_props_merge(Evas_Text_Props *item1, const Evas_Text_Props *item2);
+
 #endif
index 52964a4..a6f0274 100644 (file)
         }             \
      } while(0)
 
+#if SIZEOF_FRIBIDICHAR != SIZEOF_EINA_UNICODE
+# define EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
+#endif
+
+#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
 /* Convert bidichar to eina_unicode assume both are valid pointers */
 static Eina_Unicode *
 _evas_bidi_fribidichar_to_unicode(Eina_Unicode *dest, const FriBidiChar *src)
@@ -58,6 +63,7 @@ _evas_bidi_unicode_to_fribidichar(FriBidiChar *dest, const Eina_Unicode *src)
    *dest = 0;
    return ret;
 }
+#endif
 
 /**
  * @internal
@@ -104,18 +110,13 @@ evas_bidi_shape_string(Eina_Unicode *eina_ustr, const Evas_BiDi_Paragraph_Props
      return EINA_FALSE;
 
    /* The size of fribidichar is different than eina_unicode, convert */
-   /*FIXME: Make this comparison at compile time and compile out
-    * unwanted code. - In all of this source file. (including the actual
-    * function declerations. */
-   if (sizeof(Eina_Unicode) != sizeof(FriBidiChar))
-     {
-        base_ustr = ustr = calloc(len + 1, sizeof(FriBidiChar));
-        ustr = _evas_bidi_unicode_to_fribidichar(ustr, eina_ustr);
-     }
-   else
-     {
-        ustr = (FriBidiChar *) eina_ustr;
-     }
+#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
+   base_ustr = ustr = calloc(len + 1, sizeof(FriBidiChar));
+   ustr = _evas_bidi_unicode_to_fribidichar(ustr, eina_ustr);
+#else
+   (void) base_ustr;
+   ustr = (FriBidiChar *) eina_ustr;
+#endif
 
 
    EvasBiDiJoiningType *join_types = NULL;
@@ -137,12 +138,67 @@ evas_bidi_shape_string(Eina_Unicode *eina_ustr, const Evas_BiDi_Paragraph_Props
    if (join_types) free(join_types);
 
    /* Convert back */
-   if (sizeof(Eina_Unicode) != sizeof(FriBidiChar))
+#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
+   eina_ustr = _evas_bidi_fribidichar_to_unicode(eina_ustr, ustr);
+   if (base_ustr) free(base_ustr);
+#endif
+   return EINA_TRUE;
+}
+
+/**
+ * @internal
+ * Return a -1 terminated array of the indexes of the delimiters (passed in
+ * delim) found in the string. This result should be used with par_props_get.
+ *
+ * @param str The string to parse
+ * @param delim a list of delimiters to work with.
+ * @return returns a -1 terminated array of indexes according to positions of the delimiters found. NULL if there were none.
+ */
+int *
+evas_bidi_segment_idxs_get(const Eina_Unicode *str, const char *delim)
+{
+   Eina_Unicode *udelim;
+   const Eina_Unicode *str_base = str;
+   int *ret, *tmp_ret;
+   int ret_idx = 0, ret_len = 10; /* arbitrary choice */
+   udelim = eina_unicode_utf8_to_unicode(delim, NULL);
+   ret = malloc(ret_len * sizeof(int));
+   for ( ; *str ; str++)
      {
-        eina_ustr = _evas_bidi_fribidichar_to_unicode(eina_ustr, ustr);
-        if (base_ustr) free(base_ustr);
+        const Eina_Unicode *del;
+        for (del = udelim ; *del ; del++)
+          {
+             if (*str == *del)
+               {
+                  if (ret_idx >= ret_len)
+                    {
+                       /* arbitrary choice */
+                       ret_len += 20;
+                       tmp_ret = realloc(ret, ret_len * sizeof(int));
+                       if (!tmp_ret)
+                         {
+                            free(ret);
+                            return NULL;
+                         }
+                    }
+                  ret[ret_idx++] = str - str_base;
+                  break;
+               }
+          }
      }
-   return EINA_TRUE;
+   free(udelim);
+
+   /* If no indexes were found return NULL */
+   if (ret_idx == 0)
+     {
+        free(ret);
+        return NULL;
+     }
+
+   ret[ret_idx] = -1;
+   tmp_ret = realloc(ret, (ret_idx + 1) * sizeof(int));
+
+   return (tmp_ret) ? tmp_ret : ret;
 }
 
 /**
@@ -150,19 +206,24 @@ evas_bidi_shape_string(Eina_Unicode *eina_ustr, const Evas_BiDi_Paragraph_Props
  * Allocates bidi properties according to ustr. First checks to see if the
  * passed has rtl chars, if not, it returns NULL.
  *
+ * Assumes all the segment_idxs are either -1 or legal, and > 0 indexes.
+ * Also assumes that the characters at the override points are of weak/neutral
+ * bidi type, otherwise unexpected results may occur.
+ *
  * @param ustr The string to update according to.
+ * @param len The length of the string
+ * @param segment_idxs A -1 terminated array of points to start a new bidi analysis at (used for section high level bidi overrides). - NULL means none.
  * @return returns allocated paragraph props on success, NULL otherwise.
  */
-
 Evas_BiDi_Paragraph_Props *
-evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr)
+evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr, size_t len,
+      int *segment_idxs)
 {
    Evas_BiDi_Paragraph_Props *bidi_props = NULL;
    EvasBiDiCharType *char_types = NULL;
    EvasBiDiLevel *embedding_levels = NULL;
    const FriBidiChar *ustr;
    FriBidiChar *base_ustr = NULL;
-   size_t len;
 
    if (!eina_ustr)
       return NULL;
@@ -176,16 +237,13 @@ evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr)
 
    len = eina_unicode_strlen(eina_ustr);
    /* The size of fribidichar s different than eina_unicode, convert */
-   if (sizeof(Eina_Unicode) != sizeof(FriBidiChar))
-     {
-        base_ustr = calloc(len + 1, sizeof(FriBidiChar));
-        base_ustr = _evas_bidi_unicode_to_fribidichar(base_ustr, eina_ustr);
-        ustr = base_ustr;
-     }
-   else
-     {
-        ustr = (const FriBidiChar *) eina_ustr;
-     }
+#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
+   base_ustr = calloc(len + 1, sizeof(FriBidiChar));
+   base_ustr = _evas_bidi_unicode_to_fribidichar(base_ustr, eina_ustr);
+   ustr = base_ustr;
+#else
+   ustr = (const FriBidiChar *) eina_ustr;
+#endif
 
    bidi_props = evas_bidi_paragraph_props_new();
 
@@ -204,10 +262,71 @@ evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr)
         len = -2;
         goto cleanup;
      }
-   if (!fribidi_get_par_embedding_levels(char_types, len, &bidi_props->direction, embedding_levels))
+
+   if (segment_idxs)
      {
-        len = -2;
-        goto cleanup;
+        size_t pos = 0;
+        int *itr;
+        EvasBiDiLevel base_level = 0;
+        EvasBiDiParType direction;
+
+        for (itr = segment_idxs ; *itr > 0 ; itr++)
+          {
+             direction = EVAS_BIDI_PARAGRAPH_NEUTRAL;
+             if (!fribidi_get_par_embedding_levels(char_types + pos,
+                      *itr - pos,
+                      &direction,
+                      embedding_levels + pos))
+               {
+                  len = -2;
+                  goto cleanup;
+               }
+
+             /* Only on the first run */
+             if (itr == segment_idxs)
+               {
+                  bidi_props->direction = direction;
+                  /* adjust base_level to be 1 for rtl paragraphs, and 0 for
+                   * ltr paragraphs. */
+                  base_level =
+                     EVAS_BIDI_PARAGRAPH_DIRECTION_IS_RTL(bidi_props) ? 1 : 0;
+               }
+
+             /* We want those chars at the override points to be on the base
+              * level and we also remove -2 cause we later increment them,
+              * just for simpler code paths */
+             embedding_levels[*itr] = base_level - 2;
+             pos = *itr + 1;
+          }
+
+        direction = EVAS_BIDI_PARAGRAPH_NEUTRAL;
+        if (!fribidi_get_par_embedding_levels(char_types + pos,
+                 len - pos,
+                 &direction,
+                 embedding_levels + pos))
+          {
+             len = -2;
+             goto cleanup;
+          }
+
+        /* Increment all levels by 2 to emulate embedding. */
+          {
+             EvasBiDiLevel *bitr = embedding_levels, *end;
+             end = bitr + len;
+             for ( ; bitr < end ; bitr++)
+               {
+                  *bitr += 2;
+               }
+          }
+     }
+   else
+     {
+        if (!fribidi_get_par_embedding_levels(char_types, len,
+                 &bidi_props->direction, embedding_levels))
+          {
+             len = -2;
+             goto cleanup;
+          }
      }
 
 
@@ -276,15 +395,12 @@ evas_bidi_props_reorder_line(Eina_Unicode *eina_ustr, size_t start, size_t len,
    if (eina_ustr)
      {
         /* The size of fribidichar is different than eina_unicode, convert */
-        if (sizeof(Eina_Unicode) != sizeof(FriBidiChar))
-          {
-             base_ustr = ustr = calloc(len + 1, sizeof(FriBidiChar));
-             ustr = _evas_bidi_unicode_to_fribidichar(ustr, eina_ustr);
-          }
-        else
-          {
-             ustr = (FriBidiChar *) eina_ustr;
-          }
+#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
+        base_ustr = ustr = calloc(len + 1, sizeof(FriBidiChar));
+        ustr = _evas_bidi_unicode_to_fribidichar(ustr, eina_ustr);
+#else
+        ustr = (FriBidiChar *) eina_ustr;
+#endif
      }
 
 
@@ -323,11 +439,10 @@ evas_bidi_props_reorder_line(Eina_Unicode *eina_ustr, size_t start, size_t len,
 
 
    /* The size of fribidichar is different than eina_unicode, convert */
-   if (sizeof(Eina_Unicode) != sizeof(FriBidiChar))
-     {
-        _evas_bidi_fribidichar_to_unicode(eina_ustr, base_ustr);
-        free(base_ustr);
-     }
+#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
+   _evas_bidi_fribidichar_to_unicode(eina_ustr, base_ustr);
+   free(base_ustr);
+#endif
    return EINA_FALSE;
 /* ERROR HANDLING */
 error:
@@ -424,12 +539,12 @@ evas_bidi_position_reverse(const Evas_BiDi_Props *props, int len, EvasBiDiStrInd
  * @return #EINA_TRUE if true, #EINA_FALSE otherwise.
  */
 Eina_Bool
-evas_bidi_is_rtl_char(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, EvasBiDiStrIndex index)
+evas_bidi_is_rtl_char(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, EvasBiDiStrIndex ind)
 {
-   if(!bidi_props || index < 0)
+   if(!bidi_props || ind < 0)
       return EINA_FALSE;
    return (FRIBIDI_IS_RTL(
-            bidi_props->embedding_levels[index + start]))
+            bidi_props->embedding_levels[ind + start]))
       ? EINA_TRUE : EINA_FALSE;
 }
 
@@ -438,7 +553,7 @@ evas_bidi_paragraph_props_new(void)
 {
    Evas_BiDi_Paragraph_Props *ret;
    ret = calloc(1, sizeof(Evas_BiDi_Paragraph_Props));
-   ret->direction = EVAS_BIDI_PARAGRAPH_NATURAL;
+   ret->direction = EVAS_BIDI_PARAGRAPH_NEUTRAL;
    ret->refcount = 1;
 
    return ret;
@@ -515,3 +630,15 @@ evas_bidi_props_clean(Evas_BiDi_Props *bidi_props)
  */
 #endif
 
+#if 0
+/* Good for debugging */
+static void
+dump_levels(Eina_Unicode *ustr, EvasBiDiLevel *emb)
+{
+   for ( ; *ustr ; ustr++, emb++)
+     {
+        printf("%lc %d\n", *ustr, *emb);
+     }
+}
+#endif
+
index 971c2c4..f1a374b 100644 (file)
@@ -84,8 +84,7 @@ struct _Evas_BiDi_Props
 
 #ifdef USE_FRIBIDI
 
-
-#define EVAS_BIDI_PARAGRAPH_NATURAL FRIBIDI_PAR_ON
+#define EVAS_BIDI_PARAGRAPH_NEUTRAL FRIBIDI_PAR_ON
 #define EVAS_BIDI_PARAGRAPH_LTR     FRIBIDI_PAR_LTR
 #define EVAS_BIDI_PARAGRAPH_RTL     FRIBIDI_PAR_RTL
 #define EVAS_BIDI_PARAGRAPH_WLTR    FRIBIDI_PAR_WLTR
@@ -120,7 +119,7 @@ Eina_Bool
 evas_bidi_props_reorder_line(Eina_Unicode *eina_ustr, size_t start, size_t len, const Evas_BiDi_Paragraph_Props *props, EvasBiDiStrIndex **_v_to_l);
 
 Evas_BiDi_Paragraph_Props *
-evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr) EINA_ARG_NONNULL(1) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
+evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr, size_t len, int *segment_idxs) EINA_ARG_NONNULL(1) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
 
 void
 evas_bidi_props_copy_and_ref(const Evas_BiDi_Props *src, Evas_BiDi_Props *dst);
@@ -143,6 +142,9 @@ evas_bidi_paragraph_props_unref(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_
 Evas_BiDi_Paragraph_Props *
 evas_bidi_paragraph_props_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
 
+int *
+evas_bidi_segment_idxs_get(const Eina_Unicode *str, const char *delim) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
+
 #endif
 /**
  * @}
index 2bdd53e..9c9b3e3 100644 (file)
 #include <Eina.h>
 
 #include "evas_language_utils.h"
-#include "evas_bidi_utils.h" /* Used for fallback. */
+#include "evas_bidi_utils.h" /* Used for splitting according to bidi */
 #include "../evas_font_ot.h" /* Used for harfbuzz info */
 
 #ifdef USE_HARFBUZZ
 # include <hb.h>
-# ifdef HAVE_HARFBUZZ_GLIB
-#  include <hb-glib.h>
-# endif
 #endif
 
-/* FIXME: rename and move */
-void *
-evas_common_language_unicode_funcs_get(void)
+#include "evas_script_table.h"
+
+static Evas_Script_Type
+_evas_common_language_char_script_search(Eina_Unicode unicode)
 {
-#if defined(USE_HARFBUZZ) && defined(HAVE_HARFBUZZ_GLIB)
-   return hb_glib_get_unicode_funcs();
-#endif
-   return NULL;
+   int min = 0;
+   int max  = (sizeof(_evas_script_slow_table) /
+      sizeof(_evas_script_slow_table[0])) - 1;
+   int mid;
+
+   do
+     {
+        mid = (min + max) / 2;
+
+        if (unicode < _evas_script_slow_table[mid].start)
+           max = mid - 1;
+        else if (unicode >= _evas_script_slow_table[mid].start +
+              _evas_script_slow_table[mid].len)
+           min = mid + 1;
+        else
+           return _evas_script_slow_table[mid].script;
+     }
+   while (min <= max);
+
+   return EVAS_SCRIPT_UNKNOWN;
 }
 
 Evas_Script_Type
 evas_common_language_char_script_get(Eina_Unicode unicode)
 {
-#ifdef USE_HARFBUZZ
-   static hb_unicode_funcs_t *funcs;
-   if (!funcs)
-        funcs = evas_common_language_unicode_funcs_get();
-   return hb_unicode_get_script(funcs, unicode);
-#else
-   (void) unicode;
-#endif
-   return EVAS_SCRIPT_COMMON;
+   if ((unicode >= 0) && (unicode < EVAS_SCRIPT_DIRECT_TABLE_LIMIT))
+      return _evas_script_fast_table[unicode];
+   else
+      return _evas_common_language_char_script_search(unicode);
 }
 
 int
@@ -55,7 +64,6 @@ evas_common_language_script_end_of_run_get(const Eina_Unicode *str,
       const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len)
 {
    /* FIXME: Use the standard segmentation instead */
-#ifdef OT_SUPPORT
    Evas_Script_Type first = EVAS_SCRIPT_UNKNOWN;
    int i;
    for (i = 0 ; i < len ; i++, str++)
@@ -74,7 +82,7 @@ evas_common_language_script_end_of_run_get(const Eina_Unicode *str,
              break;
           }
      }
-# ifdef BIDI_SUPPORT
+#ifdef BIDI_SUPPORT
      {
         int bidi_end;
         bidi_end = evas_bidi_end_of_run_get(bidi_props, start, len);
@@ -83,29 +91,20 @@ evas_common_language_script_end_of_run_get(const Eina_Unicode *str,
              i = (i < bidi_end) ? i : bidi_end;
           }
      }
-# else
-   (void) bidi_props;
-   (void) start;
-# endif
-   return (i < len) ? i : 0;
-#elif defined(BIDI_SUPPORT)
-   (void) str;
-   return evas_bidi_end_of_run_get(bidi_props, start, len);
 #else
    (void) bidi_props;
    (void) start;
-   (void) str;
-   (void) len;
-   return 0;
 #endif
+   return (i < len) ? i : 0;
 }
 
 Evas_Script_Type
-evas_common_language_script_type_get(const Eina_Unicode *str)
+evas_common_language_script_type_get(const Eina_Unicode *str, size_t len)
 {
    Evas_Script_Type script = EVAS_SCRIPT_COMMON;
+   const Eina_Unicode *end = str + len;
    /* Arabic is the first script in the array that's not a common/inherited */
-   for ( ; *str && ((script = evas_common_language_char_script_get(*str)) < EVAS_SCRIPT_ARABIC) ; str++)
+   for ( ; str < end && ((script = evas_common_language_char_script_get(*str)) < EVAS_SCRIPT_ARABIC) ; str++)
      ;
    return script;
 }
index 0993fd6..fa795ec 100644 (file)
@@ -4,10 +4,9 @@
 #include <Eina.h>
 #include "evas_bidi_utils.h"
 
-/* Unicode Script property - conforming to HARFBUZZ's */
+/* Unicode Script property */
 typedef enum
 {
-  EVAS_SCRIPT_INVALID_CODE = -1,
   EVAS_SCRIPT_COMMON       = 0,   /* Zyyy */
   EVAS_SCRIPT_INHERITED,          /* Qaai */
   EVAS_SCRIPT_ARABIC,             /* Arab */
@@ -105,27 +104,29 @@ typedef enum
   EVAS_SCRIPT_JAVANESE,               /* Java */
   EVAS_SCRIPT_KAITHI,                 /* Kthi */
   EVAS_SCRIPT_LISU,                   /* Lisu */
-  EVAS_SCRIPT_MEITEI_MAYEK,           /* Mtei */
+  EVAS_SCRIPT_MEETEI_MAYEK,           /* Mtei */
   EVAS_SCRIPT_OLD_SOUTH_ARABIAN,      /* Sarb */
   EVAS_SCRIPT_OLD_TURKIC,             /* Orkh */
   EVAS_SCRIPT_SAMARITAN,              /* Samr */
   EVAS_SCRIPT_TAI_THAM,               /* Lana */
-  EVAS_SCRIPT_TAI_VIET                /* Tavt */
+  EVAS_SCRIPT_TAI_VIET,                /* Tavt */
+
+  /* Unicode-6.0 additions */
+  EVAS_SCRIPT_BATAK,                  /* Batk */
+  EVAS_SCRIPT_BRAHMI,                 /* Brah */
+  EVAS_SCRIPT_MANDAIC,                /* Mand */
 } Evas_Script_Type;
 
 int
 evas_common_language_script_end_of_run_get(const Eina_Unicode *str, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len);
 
 Evas_Script_Type
-evas_common_language_script_type_get(const Eina_Unicode *str);
+evas_common_language_script_type_get(const Eina_Unicode *str, size_t len);
 
 Evas_Script_Type
 evas_common_language_char_script_get(Eina_Unicode unicode);
 
 const char *
 evas_common_language_from_locale_get(void);
-
-void *
-evas_common_language_unicode_funcs_get(void);
 #endif
 
diff --git a/src/lib/engines/common/language/evas_script_table.h b/src/lib/engines/common/language/evas_script_table.h
new file mode 100644 (file)
index 0000000..dd77db0
--- /dev/null
@@ -0,0 +1,3087 @@
+/* evas_script_table.h: Mostly based on output by gen-script-table.pl
+ * which is available in glib's tools.
+ *
+ * NOTICE: This is temporary and will only stay here until there will be
+ * a nice "UNICODE DATA" library to use. From my understanding it's already
+ * being worked on.
+ *
+ *  Date: Sun May  1 15:48:56 2011
+ *  Source: Scripts-6.0.0.txt
+ *
+ * Do not edit.
+ */
+
+#define EVAS_SCRIPT_DIRECT_TABLE_LIMIT 8192
+
+static const
+Eina_Unicode _evas_script_fast_table[EVAS_SCRIPT_DIRECT_TABLE_LIMIT] = {
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_BOPOMOFO,
+  EVAS_SCRIPT_BOPOMOFO, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC,
+  EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC,
+  EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC,
+  EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC,
+  EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARMENIAN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
+  EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
+  EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
+  EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
+  EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
+  EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
+  EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
+  EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
+  EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
+  EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
+  EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
+  EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
+  EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
+  EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
+  EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
+  EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
+  EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
+  EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
+  EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
+  EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
+  EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
+  EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
+  EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
+  EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
+  EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
+  EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
+  EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
+  EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
+  EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
+  EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
+  EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
+  EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
+  EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
+  EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
+  EVAS_SCRIPT_THAI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
+  EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
+  EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
+  EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
+  EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
+  EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
+  EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
+  EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
+  EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
+  EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
+  EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
+  EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_RUNIC,
+  EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGALOG,
+  EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
+  EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
+  EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
+  EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
+  EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
+  EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
+  EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
+  EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
+  EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
+  EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
+  EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
+  EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
+  EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
+  EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
+  EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
+  EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
+  EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
+  EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
+  EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGBANWA,
+  EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA,
+  EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA,
+  EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA,
+  EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA,
+  EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGBANWA,
+  EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
+  EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
+  EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
+  EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
+  EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
+  EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
+  EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
+  EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
+  EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
+  EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
+  EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAI_LE,
+  EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
+  EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
+  EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_BUGINESE,
+  EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
+  EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
+  EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
+  EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
+  EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
+  EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
+  EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
+  EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
+  EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BUGINESE,
+  EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
+  EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
+  EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
+  EVAS_SCRIPT_BATAK, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
+  EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
+  EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
+  EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
+  EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
+  EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
+  EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
+  EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
+  EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
+  EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
+  EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
+  EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
+  EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
+  EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
+  EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
+  EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
+  EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
+  EVAS_SCRIPT_COMMON, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_CYRILLIC,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
+  EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
+  EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
+};
+
+static const struct {
+    Eina_Unicode start;
+    short len;
+    Evas_Script_Type script;
+} _evas_script_slow_table[] = {
+ { 0x2000,    12, EVAS_SCRIPT_COMMON },
+ { 0x200c,     2, EVAS_SCRIPT_INHERITED },
+ { 0x200e,    87, EVAS_SCRIPT_COMMON },
+ { 0x206a,     7, EVAS_SCRIPT_COMMON },
+ { 0x2071,     1, EVAS_SCRIPT_LATIN },
+ { 0x2074,    11, EVAS_SCRIPT_COMMON },
+ { 0x207f,     1, EVAS_SCRIPT_LATIN },
+ { 0x2080,    15, EVAS_SCRIPT_COMMON },
+ { 0x2090,    13, EVAS_SCRIPT_LATIN },
+ { 0x20a0,    26, EVAS_SCRIPT_COMMON },
+ { 0x20d0,    33, EVAS_SCRIPT_INHERITED },
+ { 0x2100,    38, EVAS_SCRIPT_COMMON },
+ { 0x2126,     1, EVAS_SCRIPT_GREEK },
+ { 0x2127,     3, EVAS_SCRIPT_COMMON },
+ { 0x212a,     2, EVAS_SCRIPT_LATIN },
+ { 0x212c,     6, EVAS_SCRIPT_COMMON },
+ { 0x2132,     1, EVAS_SCRIPT_LATIN },
+ { 0x2133,    27, EVAS_SCRIPT_COMMON },
+ { 0x214e,     1, EVAS_SCRIPT_LATIN },
+ { 0x214f,    17, EVAS_SCRIPT_COMMON },
+ { 0x2160,    41, EVAS_SCRIPT_LATIN },
+ { 0x2189,     1, EVAS_SCRIPT_COMMON },
+ { 0x2190,   612, EVAS_SCRIPT_COMMON },
+ { 0x2400,    39, EVAS_SCRIPT_COMMON },
+ { 0x2440,    11, EVAS_SCRIPT_COMMON },
+ { 0x2460,   672, EVAS_SCRIPT_COMMON },
+ { 0x2701,   202, EVAS_SCRIPT_COMMON },
+ { 0x27cc,     1, EVAS_SCRIPT_COMMON },
+ { 0x27ce,    50, EVAS_SCRIPT_COMMON },
+ { 0x2800,   256, EVAS_SCRIPT_BRAILLE },
+ { 0x2900,   589, EVAS_SCRIPT_COMMON },
+ { 0x2b50,    10, EVAS_SCRIPT_COMMON },
+ { 0x2c00,    47, EVAS_SCRIPT_GLAGOLITIC },
+ { 0x2c30,    47, EVAS_SCRIPT_GLAGOLITIC },
+ { 0x2c60,    32, EVAS_SCRIPT_LATIN },
+ { 0x2c80,   114, EVAS_SCRIPT_COPTIC },
+ { 0x2cf9,     7, EVAS_SCRIPT_COPTIC },
+ { 0x2d00,    38, EVAS_SCRIPT_GEORGIAN },
+ { 0x2d30,    54, EVAS_SCRIPT_TIFINAGH },
+ { 0x2d6f,     2, EVAS_SCRIPT_TIFINAGH },
+ { 0x2d7f,     1, EVAS_SCRIPT_TIFINAGH },
+ { 0x2d80,    23, EVAS_SCRIPT_ETHIOPIC },
+ { 0x2da0,     7, EVAS_SCRIPT_ETHIOPIC },
+ { 0x2da8,     7, EVAS_SCRIPT_ETHIOPIC },
+ { 0x2db0,     7, EVAS_SCRIPT_ETHIOPIC },
+ { 0x2db8,     7, EVAS_SCRIPT_ETHIOPIC },
+ { 0x2dc0,     7, EVAS_SCRIPT_ETHIOPIC },
+ { 0x2dc8,     7, EVAS_SCRIPT_ETHIOPIC },
+ { 0x2dd0,     7, EVAS_SCRIPT_ETHIOPIC },
+ { 0x2dd8,     7, EVAS_SCRIPT_ETHIOPIC },
+ { 0x2de0,    32, EVAS_SCRIPT_CYRILLIC },
+ { 0x2e00,    50, EVAS_SCRIPT_COMMON },
+ { 0x2e80,    26, EVAS_SCRIPT_HAN },
+ { 0x2e9b,    89, EVAS_SCRIPT_HAN },
+ { 0x2f00,   214, EVAS_SCRIPT_HAN },
+ { 0x2ff0,    12, EVAS_SCRIPT_COMMON },
+ { 0x3000,     5, EVAS_SCRIPT_COMMON },
+ { 0x3005,     1, EVAS_SCRIPT_HAN },
+ { 0x3006,     1, EVAS_SCRIPT_COMMON },
+ { 0x3007,     1, EVAS_SCRIPT_HAN },
+ { 0x3008,    25, EVAS_SCRIPT_COMMON },
+ { 0x3021,     9, EVAS_SCRIPT_HAN },
+ { 0x302a,     4, EVAS_SCRIPT_INHERITED },
+ { 0x302e,     2, EVAS_SCRIPT_HANGUL },
+ { 0x3030,     8, EVAS_SCRIPT_COMMON },
+ { 0x3038,     4, EVAS_SCRIPT_HAN },
+ { 0x303c,     4, EVAS_SCRIPT_COMMON },
+ { 0x3041,    86, EVAS_SCRIPT_HIRAGANA },
+ { 0x3099,     2, EVAS_SCRIPT_INHERITED },
+ { 0x309b,     2, EVAS_SCRIPT_COMMON },
+ { 0x309d,     3, EVAS_SCRIPT_HIRAGANA },
+ { 0x30a0,     1, EVAS_SCRIPT_COMMON },
+ { 0x30a1,    90, EVAS_SCRIPT_KATAKANA },
+ { 0x30fb,     2, EVAS_SCRIPT_COMMON },
+ { 0x30fd,     3, EVAS_SCRIPT_KATAKANA },
+ { 0x3105,    41, EVAS_SCRIPT_BOPOMOFO },
+ { 0x3131,    94, EVAS_SCRIPT_HANGUL },
+ { 0x3190,    16, EVAS_SCRIPT_COMMON },
+ { 0x31a0,    27, EVAS_SCRIPT_BOPOMOFO },
+ { 0x31c0,    36, EVAS_SCRIPT_COMMON },
+ { 0x31f0,    16, EVAS_SCRIPT_KATAKANA },
+ { 0x3200,    31, EVAS_SCRIPT_HANGUL },
+ { 0x3220,    64, EVAS_SCRIPT_COMMON },
+ { 0x3260,    31, EVAS_SCRIPT_HANGUL },
+ { 0x327f,    81, EVAS_SCRIPT_COMMON },
+ { 0x32d0,    47, EVAS_SCRIPT_KATAKANA },
+ { 0x3300,    88, EVAS_SCRIPT_KATAKANA },
+ { 0x3358,   168, EVAS_SCRIPT_COMMON },
+ { 0x3400,  6582, EVAS_SCRIPT_HAN },
+ { 0x4dc0,    64, EVAS_SCRIPT_COMMON },
+ { 0x4e00, 20940, EVAS_SCRIPT_HAN },
+ { 0xa000,  1165, EVAS_SCRIPT_YI },
+ { 0xa490,    55, EVAS_SCRIPT_YI },
+ { 0xa4d0,    48, EVAS_SCRIPT_LISU },
+ { 0xa500,   300, EVAS_SCRIPT_VAI },
+ { 0xa640,    52, EVAS_SCRIPT_CYRILLIC },
+ { 0xa67c,    28, EVAS_SCRIPT_CYRILLIC },
+ { 0xa6a0,    88, EVAS_SCRIPT_BAMUM },
+ { 0xa700,    34, EVAS_SCRIPT_COMMON },
+ { 0xa722,   102, EVAS_SCRIPT_LATIN },
+ { 0xa788,     3, EVAS_SCRIPT_COMMON },
+ { 0xa78b,     4, EVAS_SCRIPT_LATIN },
+ { 0xa790,     2, EVAS_SCRIPT_LATIN },
+ { 0xa7a0,    10, EVAS_SCRIPT_LATIN },
+ { 0xa7fa,     6, EVAS_SCRIPT_LATIN },
+ { 0xa800,    44, EVAS_SCRIPT_SYLOTI_NAGRI },
+ { 0xa830,    10, EVAS_SCRIPT_COMMON },
+ { 0xa840,    56, EVAS_SCRIPT_PHAGS_PA },
+ { 0xa880,    69, EVAS_SCRIPT_SAURASHTRA },
+ { 0xa8ce,    12, EVAS_SCRIPT_SAURASHTRA },
+ { 0xa8e0,    28, EVAS_SCRIPT_DEVANAGARI },
+ { 0xa900,    48, EVAS_SCRIPT_KAYAH_LI },
+ { 0xa930,    36, EVAS_SCRIPT_REJANG },
+ { 0xa95f,     1, EVAS_SCRIPT_REJANG },
+ { 0xa960,    29, EVAS_SCRIPT_HANGUL },
+ { 0xa980,    78, EVAS_SCRIPT_JAVANESE },
+ { 0xa9cf,    11, EVAS_SCRIPT_JAVANESE },
+ { 0xa9de,     2, EVAS_SCRIPT_JAVANESE },
+ { 0xaa00,    55, EVAS_SCRIPT_CHAM },
+ { 0xaa40,    14, EVAS_SCRIPT_CHAM },
+ { 0xaa50,    10, EVAS_SCRIPT_CHAM },
+ { 0xaa5c,     4, EVAS_SCRIPT_CHAM },
+ { 0xaa60,    28, EVAS_SCRIPT_MYANMAR },
+ { 0xaa80,    67, EVAS_SCRIPT_TAI_VIET },
+ { 0xaadb,     5, EVAS_SCRIPT_TAI_VIET },
+ { 0xab01,     6, EVAS_SCRIPT_ETHIOPIC },
+ { 0xab09,     6, EVAS_SCRIPT_ETHIOPIC },
+ { 0xab11,     6, EVAS_SCRIPT_ETHIOPIC },
+ { 0xab20,     7, EVAS_SCRIPT_ETHIOPIC },
+ { 0xab28,     7, EVAS_SCRIPT_ETHIOPIC },
+ { 0xabc0,    46, EVAS_SCRIPT_MEETEI_MAYEK },
+ { 0xabf0,    10, EVAS_SCRIPT_MEETEI_MAYEK },
+ { 0xac00, 11172, EVAS_SCRIPT_HANGUL },
+ { 0xd7b0,    23, EVAS_SCRIPT_HANGUL },
+ { 0xd7cb,    49, EVAS_SCRIPT_HANGUL },
+ { 0xf900,   302, EVAS_SCRIPT_HAN },
+ { 0xfa30,    62, EVAS_SCRIPT_HAN },
+ { 0xfa70,   106, EVAS_SCRIPT_HAN },
+ { 0xfb00,     7, EVAS_SCRIPT_LATIN },
+ { 0xfb13,     5, EVAS_SCRIPT_ARMENIAN },
+ { 0xfb1d,    26, EVAS_SCRIPT_HEBREW },
+ { 0xfb38,     5, EVAS_SCRIPT_HEBREW },
+ { 0xfb3e,     1, EVAS_SCRIPT_HEBREW },
+ { 0xfb40,     2, EVAS_SCRIPT_HEBREW },
+ { 0xfb43,     2, EVAS_SCRIPT_HEBREW },
+ { 0xfb46,    10, EVAS_SCRIPT_HEBREW },
+ { 0xfb50,   114, EVAS_SCRIPT_ARABIC },
+ { 0xfbd3,   363, EVAS_SCRIPT_ARABIC },
+ { 0xfd3e,     2, EVAS_SCRIPT_COMMON },
+ { 0xfd50,    64, EVAS_SCRIPT_ARABIC },
+ { 0xfd92,    54, EVAS_SCRIPT_ARABIC },
+ { 0xfdf0,    13, EVAS_SCRIPT_ARABIC },
+ { 0xfdfd,     1, EVAS_SCRIPT_COMMON },
+ { 0xfe00,    16, EVAS_SCRIPT_INHERITED },
+ { 0xfe10,    10, EVAS_SCRIPT_COMMON },
+ { 0xfe20,     7, EVAS_SCRIPT_INHERITED },
+ { 0xfe30,    35, EVAS_SCRIPT_COMMON },
+ { 0xfe54,    19, EVAS_SCRIPT_COMMON },
+ { 0xfe68,     4, EVAS_SCRIPT_COMMON },
+ { 0xfe70,     5, EVAS_SCRIPT_ARABIC },
+ { 0xfe76,   135, EVAS_SCRIPT_ARABIC },
+ { 0xfeff,     1, EVAS_SCRIPT_COMMON },
+ { 0xff01,    32, EVAS_SCRIPT_COMMON },
+ { 0xff21,    26, EVAS_SCRIPT_LATIN },
+ { 0xff3b,     6, EVAS_SCRIPT_COMMON },
+ { 0xff41,    26, EVAS_SCRIPT_LATIN },
+ { 0xff5b,    11, EVAS_SCRIPT_COMMON },
+ { 0xff66,    10, EVAS_SCRIPT_KATAKANA },
+ { 0xff70,     1, EVAS_SCRIPT_COMMON },
+ { 0xff71,    45, EVAS_SCRIPT_KATAKANA },
+ { 0xff9e,     2, EVAS_SCRIPT_COMMON },
+ { 0xffa0,    31, EVAS_SCRIPT_HANGUL },
+ { 0xffc2,     6, EVAS_SCRIPT_HANGUL },
+ { 0xffca,     6, EVAS_SCRIPT_HANGUL },
+ { 0xffd2,     6, EVAS_SCRIPT_HANGUL },
+ { 0xffda,     3, EVAS_SCRIPT_HANGUL },
+ { 0xffe0,     7, EVAS_SCRIPT_COMMON },
+ { 0xffe8,     7, EVAS_SCRIPT_COMMON },
+ { 0xfff9,     5, EVAS_SCRIPT_COMMON },
+ { 0x10000,    12, EVAS_SCRIPT_LINEAR_B },
+ { 0x1000d,    26, EVAS_SCRIPT_LINEAR_B },
+ { 0x10028,    19, EVAS_SCRIPT_LINEAR_B },
+ { 0x1003c,     2, EVAS_SCRIPT_LINEAR_B },
+ { 0x1003f,    15, EVAS_SCRIPT_LINEAR_B },
+ { 0x10050,    14, EVAS_SCRIPT_LINEAR_B },
+ { 0x10080,   123, EVAS_SCRIPT_LINEAR_B },
+ { 0x10100,     3, EVAS_SCRIPT_COMMON },
+ { 0x10107,    45, EVAS_SCRIPT_COMMON },
+ { 0x10137,     9, EVAS_SCRIPT_COMMON },
+ { 0x10140,    75, EVAS_SCRIPT_GREEK },
+ { 0x10190,    12, EVAS_SCRIPT_COMMON },
+ { 0x101d0,    45, EVAS_SCRIPT_COMMON },
+ { 0x101fd,     1, EVAS_SCRIPT_INHERITED },
+ { 0x10280,    29, EVAS_SCRIPT_LYCIAN },
+ { 0x102a0,    49, EVAS_SCRIPT_CARIAN },
+ { 0x10300,    31, EVAS_SCRIPT_OLD_ITALIC },
+ { 0x10320,     4, EVAS_SCRIPT_OLD_ITALIC },
+ { 0x10330,    27, EVAS_SCRIPT_GOTHIC },
+ { 0x10380,    30, EVAS_SCRIPT_UGARITIC },
+ { 0x1039f,     1, EVAS_SCRIPT_UGARITIC },
+ { 0x103a0,    36, EVAS_SCRIPT_OLD_PERSIAN },
+ { 0x103c8,    14, EVAS_SCRIPT_OLD_PERSIAN },
+ { 0x10400,    80, EVAS_SCRIPT_DESERET },
+ { 0x10450,    48, EVAS_SCRIPT_SHAVIAN },
+ { 0x10480,    30, EVAS_SCRIPT_OSMANYA },
+ { 0x104a0,    10, EVAS_SCRIPT_OSMANYA },
+ { 0x10800,     6, EVAS_SCRIPT_CYPRIOT },
+ { 0x10808,     1, EVAS_SCRIPT_CYPRIOT },
+ { 0x1080a,    44, EVAS_SCRIPT_CYPRIOT },
+ { 0x10837,     2, EVAS_SCRIPT_CYPRIOT },
+ { 0x1083c,     1, EVAS_SCRIPT_CYPRIOT },
+ { 0x1083f,     1, EVAS_SCRIPT_CYPRIOT },
+ { 0x10840,    22, EVAS_SCRIPT_IMPERIAL_ARAMAIC },
+ { 0x10857,     9, EVAS_SCRIPT_IMPERIAL_ARAMAIC },
+ { 0x10900,    28, EVAS_SCRIPT_PHOENICIAN },
+ { 0x1091f,     1, EVAS_SCRIPT_PHOENICIAN },
+ { 0x10920,    26, EVAS_SCRIPT_LYDIAN },
+ { 0x1093f,     1, EVAS_SCRIPT_LYDIAN },
+ { 0x10a00,     4, EVAS_SCRIPT_KHAROSHTHI },
+ { 0x10a05,     2, EVAS_SCRIPT_KHAROSHTHI },
+ { 0x10a0c,     8, EVAS_SCRIPT_KHAROSHTHI },
+ { 0x10a15,     3, EVAS_SCRIPT_KHAROSHTHI },
+ { 0x10a19,    27, EVAS_SCRIPT_KHAROSHTHI },
+ { 0x10a38,     3, EVAS_SCRIPT_KHAROSHTHI },
+ { 0x10a3f,     9, EVAS_SCRIPT_KHAROSHTHI },
+ { 0x10a50,     9, EVAS_SCRIPT_KHAROSHTHI },
+ { 0x10a60,    32, EVAS_SCRIPT_OLD_SOUTH_ARABIAN },
+ { 0x10b00,    54, EVAS_SCRIPT_AVESTAN },
+ { 0x10b39,     7, EVAS_SCRIPT_AVESTAN },
+ { 0x10b40,    22, EVAS_SCRIPT_INSCRIPTIONAL_PARTHIAN },
+ { 0x10b58,     8, EVAS_SCRIPT_INSCRIPTIONAL_PARTHIAN },
+ { 0x10b60,    19, EVAS_SCRIPT_INSCRIPTIONAL_PAHLAVI },
+ { 0x10b78,     8, EVAS_SCRIPT_INSCRIPTIONAL_PAHLAVI },
+ { 0x10c00,    73, EVAS_SCRIPT_OLD_TURKIC },
+ { 0x10e60,    31, EVAS_SCRIPT_ARABIC },
+ { 0x11000,    78, EVAS_SCRIPT_BRAHMI },
+ { 0x11052,    30, EVAS_SCRIPT_BRAHMI },
+ { 0x11080,    66, EVAS_SCRIPT_KAITHI },
+ { 0x12000,   879, EVAS_SCRIPT_CUNEIFORM },
+ { 0x12400,    99, EVAS_SCRIPT_CUNEIFORM },
+ { 0x12470,     4, EVAS_SCRIPT_CUNEIFORM },
+ { 0x13000,  1071, EVAS_SCRIPT_EGYPTIAN_HIEROGLYPHS },
+ { 0x16800,   569, EVAS_SCRIPT_BAMUM },
+ { 0x1b000,     1, EVAS_SCRIPT_KATAKANA },
+ { 0x1b001,     1, EVAS_SCRIPT_HIRAGANA },
+ { 0x1d000,   246, EVAS_SCRIPT_COMMON },
+ { 0x1d100,    39, EVAS_SCRIPT_COMMON },
+ { 0x1d129,    62, EVAS_SCRIPT_COMMON },
+ { 0x1d167,     3, EVAS_SCRIPT_INHERITED },
+ { 0x1d16a,    17, EVAS_SCRIPT_COMMON },
+ { 0x1d17b,     8, EVAS_SCRIPT_INHERITED },
+ { 0x1d183,     2, EVAS_SCRIPT_COMMON },
+ { 0x1d185,     7, EVAS_SCRIPT_INHERITED },
+ { 0x1d18c,    30, EVAS_SCRIPT_COMMON },
+ { 0x1d1aa,     4, EVAS_SCRIPT_INHERITED },
+ { 0x1d1ae,    48, EVAS_SCRIPT_COMMON },
+ { 0x1d200,    70, EVAS_SCRIPT_GREEK },
+ { 0x1d300,    87, EVAS_SCRIPT_COMMON },
+ { 0x1d360,    18, EVAS_SCRIPT_COMMON },
+ { 0x1d400,    85, EVAS_SCRIPT_COMMON },
+ { 0x1d456,    71, EVAS_SCRIPT_COMMON },
+ { 0x1d49e,     2, EVAS_SCRIPT_COMMON },
+ { 0x1d4a2,     1, EVAS_SCRIPT_COMMON },
+ { 0x1d4a5,     2, EVAS_SCRIPT_COMMON },
+ { 0x1d4a9,     4, EVAS_SCRIPT_COMMON },
+ { 0x1d4ae,    12, EVAS_SCRIPT_COMMON },
+ { 0x1d4bb,     1, EVAS_SCRIPT_COMMON },
+ { 0x1d4bd,     7, EVAS_SCRIPT_COMMON },
+ { 0x1d4c5,    65, EVAS_SCRIPT_COMMON },
+ { 0x1d507,     4, EVAS_SCRIPT_COMMON },
+ { 0x1d50d,     8, EVAS_SCRIPT_COMMON },
+ { 0x1d516,     7, EVAS_SCRIPT_COMMON },
+ { 0x1d51e,    28, EVAS_SCRIPT_COMMON },
+ { 0x1d53b,     4, EVAS_SCRIPT_COMMON },
+ { 0x1d540,     5, EVAS_SCRIPT_COMMON },
+ { 0x1d546,     1, EVAS_SCRIPT_COMMON },
+ { 0x1d54a,     7, EVAS_SCRIPT_COMMON },
+ { 0x1d552,   340, EVAS_SCRIPT_COMMON },
+ { 0x1d6a8,   292, EVAS_SCRIPT_COMMON },
+ { 0x1d7ce,    50, EVAS_SCRIPT_COMMON },
+ { 0x1f000,    44, EVAS_SCRIPT_COMMON },
+ { 0x1f030,   100, EVAS_SCRIPT_COMMON },
+ { 0x1f0a0,    15, EVAS_SCRIPT_COMMON },
+ { 0x1f0b1,    14, EVAS_SCRIPT_COMMON },
+ { 0x1f0c1,    15, EVAS_SCRIPT_COMMON },
+ { 0x1f0d1,    15, EVAS_SCRIPT_COMMON },
+ { 0x1f100,    11, EVAS_SCRIPT_COMMON },
+ { 0x1f110,    31, EVAS_SCRIPT_COMMON },
+ { 0x1f130,    58, EVAS_SCRIPT_COMMON },
+ { 0x1f170,    43, EVAS_SCRIPT_COMMON },
+ { 0x1f1e6,    26, EVAS_SCRIPT_COMMON },
+ { 0x1f200,     1, EVAS_SCRIPT_HIRAGANA },
+ { 0x1f201,     2, EVAS_SCRIPT_COMMON },
+ { 0x1f210,    43, EVAS_SCRIPT_COMMON },
+ { 0x1f240,     9, EVAS_SCRIPT_COMMON },
+ { 0x1f250,     2, EVAS_SCRIPT_COMMON },
+ { 0x1f300,    33, EVAS_SCRIPT_COMMON },
+ { 0x1f330,     6, EVAS_SCRIPT_COMMON },
+ { 0x1f337,    70, EVAS_SCRIPT_COMMON },
+ { 0x1f380,    20, EVAS_SCRIPT_COMMON },
+ { 0x1f3a0,    37, EVAS_SCRIPT_COMMON },
+ { 0x1f3c6,     5, EVAS_SCRIPT_COMMON },
+ { 0x1f3e0,    17, EVAS_SCRIPT_COMMON },
+ { 0x1f400,    63, EVAS_SCRIPT_COMMON },
+ { 0x1f440,     1, EVAS_SCRIPT_COMMON },
+ { 0x1f442,   182, EVAS_SCRIPT_COMMON },
+ { 0x1f4f9,     4, EVAS_SCRIPT_COMMON },
+ { 0x1f500,    62, EVAS_SCRIPT_COMMON },
+ { 0x1f550,    24, EVAS_SCRIPT_COMMON },
+ { 0x1f5fb,     5, EVAS_SCRIPT_COMMON },
+ { 0x1f601,    16, EVAS_SCRIPT_COMMON },
+ { 0x1f612,     3, EVAS_SCRIPT_COMMON },
+ { 0x1f616,     1, EVAS_SCRIPT_COMMON },
+ { 0x1f618,     1, EVAS_SCRIPT_COMMON },
+ { 0x1f61a,     1, EVAS_SCRIPT_COMMON },
+ { 0x1f61c,     3, EVAS_SCRIPT_COMMON },
+ { 0x1f620,     6, EVAS_SCRIPT_COMMON },
+ { 0x1f628,     4, EVAS_SCRIPT_COMMON },
+ { 0x1f62d,     1, EVAS_SCRIPT_COMMON },
+ { 0x1f630,     4, EVAS_SCRIPT_COMMON },
+ { 0x1f635,    12, EVAS_SCRIPT_COMMON },
+ { 0x1f645,    11, EVAS_SCRIPT_COMMON },
+ { 0x1f680,    70, EVAS_SCRIPT_COMMON },
+ { 0x1f700,   116, EVAS_SCRIPT_COMMON },
+ { 0x20000, 42711, EVAS_SCRIPT_HAN },
+ { 0x2a700,  4149, EVAS_SCRIPT_HAN },
+ { 0x2b740,   222, EVAS_SCRIPT_HAN },
+ { 0x2f800,   542, EVAS_SCRIPT_HAN },
+ { 0xe0001,     1, EVAS_SCRIPT_COMMON },
+ { 0xe0020,    96, EVAS_SCRIPT_COMMON },
+ { 0xe0100,   240, EVAS_SCRIPT_INHERITED },
+};
diff --git a/src/lib/engines/common_16/.cvsignore b/src/lib/engines/common_16/.cvsignore
deleted file mode 100644 (file)
index 093d74e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile.in
-Makefile
-.deps
-.libs
-libevas_engine_common_16.la
-*.lo
index c7579fc..ef2ab30 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @VALGRIND_CFLAGS@ \
 @EINA_CFLAGS@ \
 @EET_CFLAGS@ \
index b22a85d..1884baf 100644 (file)
@@ -376,7 +376,6 @@ evas_common_soft16_line_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, i
    int dx, dy;
    int  x, y, w, h;
 
-   c_tmp.mask = NULL;
    c_tmp.use = 1;
    c_tmp.x = 0;
    c_tmp.y = 0;
index 5fdd086..58a1b1f 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @VALGRIND_CFLAGS@ \
 @EINA_CFLAGS@ \
 @EET_CFLAGS@ \
diff --git a/src/lib/file/.cvsignore b/src/lib/file/.cvsignore
deleted file mode 100644 (file)
index e62a1b3..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Makefile.in
-Makefile
-.deps
-.libs
-libevas_file.la
-evas_path.lo
-evas_module.lo
index 8d0ee97..7875fbe 100644 (file)
@@ -11,8 +11,9 @@ AM_CPPFLAGS = \
 @FREETYPE_CFLAGS@ \
 @EINA_CFLAGS@ \
 @EVIL_CFLAGS@ \
-@WIN32_CPPFLAGS@
-
+@WIN32_CPPFLAGS@ \
+@PIXMAN_CFLAGS@
+                       
 AM_CFLAGS = @WIN32_CFLAGS@
 
 noinst_LTLIBRARIES      = libevas_file.la
index 6466abd..7531dcd 100644 (file)
@@ -91,14 +91,11 @@ evas_module_paths_init(void)
   { evas_##Tn##_##Name##_init, evas_##Tn##_##Name##_shutdown }
 
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, buffer);
-EVAS_EINA_STATIC_MODULE_DEFINE(engine, cairo_x11);
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, direct3d);
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, directfb);
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, fb);
-EVAS_EINA_STATIC_MODULE_DEFINE(engine, gl_glew);
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, gl_x11);
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, gl_sdl);
-EVAS_EINA_STATIC_MODULE_DEFINE(engine, quartz);
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16);
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_ddraw);
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_sdl);
@@ -109,23 +106,23 @@ EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_8_x11);
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_ddraw);
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_gdi);
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_generic);
-EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_qtopia);
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_sdl);
 EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_x11);
-EVAS_EINA_STATIC_MODULE_DEFINE(engine, xrender_x11);
-EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, xpm);
 EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, bmp);
-EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, tiff);
-EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, svg);
-EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, png);
-EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, pmaps);
-EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, jpeg);
-EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, gif);
-EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, eet);
 EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, edb);
+EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, eet);
+EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, generic);
+EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, gif);
+EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, ico);
+EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, jpeg);
+EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, pmaps);
+EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, png);
+EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, psd);
+EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, svg);
 EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, tga);
+EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, tiff);
 EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, wbmp);
-EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, ico);
+EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, xpm);
 EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, edb);
 EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, eet);
 EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, jpeg);
@@ -139,9 +136,6 @@ static const struct {
 #ifdef EVAS_STATIC_BUILD_BUFFER
   EVAS_EINA_STATIC_MODULE_USE(engine, buffer),
 #endif
-#ifdef EVAS_STATIC_BUILD_CAIRO_X11
-  EVAS_EINA_STATIC_MODULE_USE(engine, cairo_x11),
-#endif
 #ifdef EVAS_STATIC_BUILD_DIRECT3D
   EVAS_EINA_STATIC_MODULE_USE(engine, direct3d),
 #endif
@@ -151,18 +145,12 @@ static const struct {
 #ifdef EVAS_STATIC_BUILD_FB
   EVAS_EINA_STATIC_MODULE_USE(engine, fb),
 #endif
-#ifdef EVAS_STATIC_BUILD_GL_GLEW
-  EVAS_EINA_STATIC_MODULE_USE(engine, gl_glew),
-#endif
 #ifdef EVAS_STATIC_BUILD_GL_X11
   EVAS_EINA_STATIC_MODULE_USE(engine, gl_x11),
 #endif
 #ifdef EVAS_STATIC_BUILD_GL_SDL
   EVAS_EINA_STATIC_MODULE_USE(engine, gl_sdl),
 #endif
-#ifdef EVAS_STATIC_BUILD_QUARTZ
-  EVAS_EINA_STATIC_MODULE_USE(engine, quartz),
-#endif
 #ifdef EVAS_STATIC_BUILD_SOFTWARE_16
   EVAS_EINA_STATIC_MODULE_USE(engine, software_16),
 #endif
@@ -193,56 +181,56 @@ static const struct {
 #ifdef EVAS_STATIC_BUILD_SOFTWARE_GENERIC
   EVAS_EINA_STATIC_MODULE_USE(engine, software_generic),
 #endif
-#ifdef EVAS_STATIC_BUILD_SOFTWARE_QTOPIA
-  EVAS_EINA_STATIC_MODULE_USE(engine, software_qtopia),
-#endif
 #ifdef EVAS_STATIC_BUILD_SOFTWARE_SDL
   EVAS_EINA_STATIC_MODULE_USE(engine, software_sdl),
 #endif
 #ifdef EVAS_STATIC_BUILD_SOFTWARE_X11
   EVAS_EINA_STATIC_MODULE_USE(engine, software_x11),
 #endif
-#ifdef EVAS_STATIC_BUILD_XRENDER_X11
-  EVAS_EINA_STATIC_MODULE_USE(engine, xrender_x11),
-#endif
-#ifdef EVAS_STATIC_BUILD_XPM
-  EVAS_EINA_STATIC_MODULE_USE(image_loader, xpm),
-#endif
 #ifdef EVAS_STATIC_BUILD_BMP
   EVAS_EINA_STATIC_MODULE_USE(image_loader, bmp),
 #endif
-#ifdef EVAS_STATIC_BUILD_TIFF
-  EVAS_EINA_STATIC_MODULE_USE(image_loader, tiff),
+#ifdef EVAS_STATIC_BUILD_EDB
+  EVAS_EINA_STATIC_MODULE_USE(image_loader, edb),
 #endif
-#ifdef EVAS_STATIC_BUILD_SVG
-  EVAS_EINA_STATIC_MODULE_USE(image_loader, svg),
+#ifdef EVAS_STATIC_BUILD_EET
+  EVAS_EINA_STATIC_MODULE_USE(image_loader, eet),
 #endif
-#ifdef EVAS_STATIC_BUILD_PNG
-  EVAS_EINA_STATIC_MODULE_USE(image_loader, png),
+#ifdef EVAS_STATIC_BUILD_GENERIC
+  EVAS_EINA_STATIC_MODULE_USE(image_loader, generic),
 #endif
-#ifdef EVAS_STATIC_BUILD_PMAPS
-  EVAS_EINA_STATIC_MODULE_USE(image_loader, pmaps),
+#ifdef EVAS_STATIC_BUILD_GIF
+  EVAS_EINA_STATIC_MODULE_USE(image_loader, gif),
+#endif
+#ifdef EVAS_STATIC_BUILD_ICO
+  EVAS_EINA_STATIC_MODULE_USE(image_loader, ico),
 #endif
 #ifdef EVAS_STATIC_BUILD_JPEG
   EVAS_EINA_STATIC_MODULE_USE(image_loader, jpeg),
 #endif
-#ifdef EVAS_STATIC_BUILD_GIF
-  EVAS_EINA_STATIC_MODULE_USE(image_loader, gif),
+#ifdef EVAS_STATIC_BUILD_PMAPS
+  EVAS_EINA_STATIC_MODULE_USE(image_loader, pmaps),
 #endif
-#ifdef EVAS_STATIC_BUILD_EET
-  EVAS_EINA_STATIC_MODULE_USE(image_loader, eet),
+#ifdef EVAS_STATIC_BUILD_PNG
+  EVAS_EINA_STATIC_MODULE_USE(image_loader, png),
 #endif
-#ifdef EVAS_STATIC_BUILD_EDB
-  EVAS_EINA_STATIC_MODULE_USE(image_loader, edb),
+#ifdef EVAS_STATIC_BUILD_PSD
+  EVAS_EINA_STATIC_MODULE_USE(image_loader, psd),
+#endif
+#ifdef EVAS_STATIC_BUILD_SVG
+  EVAS_EINA_STATIC_MODULE_USE(image_loader, svg),
 #endif
 #ifdef EVAS_STATIC_BUILD_TGA
   EVAS_EINA_STATIC_MODULE_USE(image_loader, tga),
 #endif
+#ifdef EVAS_STATIC_BUILD_TIFF
+  EVAS_EINA_STATIC_MODULE_USE(image_loader, tiff),
+#endif
 #ifdef EVAS_STATIC_BUILD_WBMP
   EVAS_EINA_STATIC_MODULE_USE(image_loader, wbmp),
 #endif
-#ifdef EVAS_STATIC_BUILD_ICO
-  EVAS_EINA_STATIC_MODULE_USE(image_loader, ico),
+#ifdef EVAS_STATIC_BUILD_XPM
+  EVAS_EINA_STATIC_MODULE_USE(image_loader, xpm),
 #endif
 #ifdef EVAS_STATIC_BUILD_EDB
   EVAS_EINA_STATIC_MODULE_USE(image_saver, edb),
diff --git a/src/lib/include/.cvsignore b/src/lib/include/.cvsignore
deleted file mode 100644 (file)
index 3dda729..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile.in
-Makefile
diff --git a/src/lib/include/evas_cairo_common.h b/src/lib/include/evas_cairo_common.h
deleted file mode 100644 (file)
index 57fc791..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-#ifndef EVAS_CAIRO_COMMON_H
-#define EVAS_CAIRO_COMMON_H
-
-#include "evas_common.h"
-#include "config.h"
-
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <sys/time.h>
-#include <unistd.h>
-
-#include <X11/Xlib.h>
-#include <X11/Xatom.h>
-#include <X11/Xutil.h>
-
-#include <cairo.h>
-#include <cairo-xlib.h>
-
-typedef struct _Evas_Cairo_Context                   Evas_Cairo_Context;
-typedef struct _Evas_Cairo_Image                     Evas_Cairo_Image;
-typedef struct _Evas_Cairo_Polygon                   Evas_Cairo_Polygon;
-typedef struct _Evas_Cairo_Polygon_Point             Evas_Cairo_Polygon_Point;
-
-struct _Evas_Cairo_Context
-{
-   cairo_t         *cairo;
-
-   struct {
-      double r, g, b, a;
-   } col;
-   struct {
-      unsigned int set : 1;
-      double r, g, b, a;
-   } mul;
-};
-
-struct _Evas_Cairo_Image
-{
-   RGBA_Image         *im;
-   int                 references;
-   DATA32             *mulpix;
-   cairo_surface_t    *surface;
-   cairo_pattern_t    *pattern;
-#if 0
-   Evas_Cairo_Context *cc;
-   char                dirty : 1;
-   char                cached : 1;
-#endif
-};
-
-struct _Evas_Cairo_Polygon
-{
-   Eina_List *points;
-};
-
-struct _Evas_Cairo_Polygon_Point
-{
-   int x, y;
-};
-
-#if 0
-struct _Evas_Cairo_Context
-{
-   unsigned char   r, g, b, a;
-
-   struct {
-      char         size : 1;
-      char         dither : 1;
-      char         blend : 1;
-      char         color : 1;
-      char         texture : 1;
-      char         clip : 1;
-      char         buf : 1;
-      char         other : 1;
-   } change;
-
-   struct {
-      char         active : 1;
-      int          x, y, w, h;
-   } clip;
-
-   struct {
-      int checked : 1;
-      int sgis_generate_mipmap : 1;
-      int nv_texture_rectangle : 1;
-   } ext;
-
-   int             references;
-
-   Eina_List      *images;
-};
-
-struct _Evas_Cairo_Image
-{
-   Evas_Cairo_Context *cc;
-   RGBA_Image         *im;
-   cairo_surface_t    *surf;
-   DATA32             *mulpix;
-   int                 references;
-   char                dirty : 1;
-   char                cached : 1;
-};
-
-struct _Evas_Cairo_Polygon
-{
-   Eina_List *points;
-};
-
-struct _Evas_Cairo_Polygon_Point
-{
-   int x, y;
-};
-#endif
-
-/*
-Evas_Engine_GL_Context  *evas_gl_common_context_new(void);
-void              evas_gl_common_context_free(Evas_Engine_GL_Context *gc);
-void              evas_gl_common_context_use(Evas_Engine_GL_Context *gc);
-void              evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h);
-void              evas_gl_common_context_color_set(Evas_Engine_GL_Context *gc, int r, int g, int b, int a);
-void              evas_gl_common_context_blend_set(Evas_Engine_GL_Context *gc, int blend);
-void              evas_gl_common_context_dither_set(Evas_Engine_GL_Context *gc, int dither);
-void              evas_gl_common_context_texture_set(Evas_Engine_GL_Context *gc, Evas_GL_Texture *tex, int smooth, int w, int h);
-void              evas_gl_common_context_font_texture_set(Evas_Engine_GL_Context *gc, Evas_GL_Font_Texture *ft);
-void              evas_gl_common_context_clip_set(Evas_Engine_GL_Context *gc, int on, int x, int y, int w, int h);
-void              evas_gl_common_context_read_buf_set(Evas_Engine_GL_Context *gc, GLenum buf);
-void              evas_gl_common_context_write_buf_set(Evas_Engine_GL_Context *gc, GLenum buf);
-
-Evas_GL_Texture  *evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im, int smooth);
-void              evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im, int smooth);
-void              evas_gl_common_texture_free(Evas_GL_Texture *tex);
-void              evas_gl_common_texture_mipmaps_build(Evas_GL_Texture *tex, RGBA_Image *im, int smooth);
-
-Evas_GL_Image    *evas_gl_common_image_load(Evas_Engine_GL_Context *gc, char *file, char *key);
-Evas_GL_Image    *evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, int w, int h, int *data);
-Evas_GL_Image    *evas_gl_common_image_new_from_copied_data(Evas_Engine_GL_Context *gc, int w, int h, int *data);
-Evas_GL_Image    *evas_gl_common_image_new(Evas_Engine_GL_Context *gc, int w, int h);
-void              evas_gl_common_image_free(Evas_GL_Image *im);
-void              evas_gl_common_image_dirty(Evas_GL_Image *im);
-
-Evas_GL_Polygon  *evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y);
-Evas_GL_Polygon  *evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly);
-
-void              evas_gl_common_swap_rect(Evas_Engine_GL_Context *gc, int x, int y, int w, int h);
-
-void              evas_gl_common_rect_draw(Evas_Engine_GL_Context *gc, RGBA_Draw_Context *dc, int x, int y, int w, int h);
-void              evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, RGBA_Draw_Context *dc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth);
-void              evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2);
-void              evas_gl_common_poly_draw(Evas_Engine_GL_Context *gc, RGBA_Draw_Context *dc, Evas_GL_Polygon *poly);
-
-Evas_GL_Font_Texture *evas_gl_font_texture_new(Evas_Engine_GL_Context *gc, RGBA_Font_Glyph *fg);
-void                  evas_gl_font_texture_free(Evas_GL_Font_Texture *ft);
-void                  evas_gl_font_texture_draw(Evas_Engine_GL_Context *gc, void *surface, RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg, int x, int y);
-*/
-
-#endif
index 5395451..e75da14 100644 (file)
 
 #include <Eina.h>
 #include "Evas.h"
+//#include "Evas_GL.h"
+
+#ifdef HAVE_PIXMAN
+#include <pixman.h>
+#endif
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -123,73 +128,25 @@ extern EAPI int _evas_log_dom_global;
 
 #ifdef BUILD_PTHREAD
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
+#define LK(x)  Eina_Lock x
+#define LKI(x) eina_lock_new(&(x))
+#define LKD(x) eina_lock_free(&(x))
+#define LKL(x) eina_lock_take(&(x))
+#define LKT(x) eina_lock_take_try(&(x))
+#define LKU(x) eina_lock_release(&(x))
+#define LKDBG(x) eina_lock_debug(&(x))
 
-# include <pthread.h>
-# include <sched.h>
-#ifdef __linux__
-# include <sys/time.h>
-# include <sys/resource.h>
-# include <errno.h>
-#endif
-
-//#define LKDEBUG 1
-
-#ifdef LKDEBUG
-EAPI Eina_Bool lockdebug;
-EAPI int lockmax;
-#endif
-
-#define LK(x)  pthread_mutex_t x
-#ifndef EVAS_FRAME_QUEUING
-# define LKI(x) pthread_mutex_init(&(x), NULL)
-#else
-# define LKI(x) do {pthread_mutexattr_t    __attr;\
-         pthread_mutexattr_init(&__attr); \
-         pthread_mutexattr_settype(&__attr, PTHREAD_MUTEX_RECURSIVE);  \
-         pthread_mutex_init(&(x), &__attr);} while (0)
-#endif
-# define LKD(x) pthread_mutex_destroy(&(x))
-# ifdef LKDEBUG
-#  define LKL(x) \
-   do { \
-      if (lockdebug) { \
-         struct timeval t0, t1; \
-         int dt; \
-         gettimeofday(&t0, NULL); \
-         pthread_mutex_lock(&(x)); \
-         gettimeofday(&t1, NULL); \
-         dt = (t1.tv_sec - t0.tv_sec) * 1000000; \
-         if (t1.tv_usec > t0.tv_usec) dt += (t1.tv_usec - t0.tv_usec); \
-         else dt -= t0.tv_usec - t1.tv_usec; \
-         dt /= 1000; \
-         if (dt > lockmax) { \
-            fprintf(stderr, "HANG %ims - %s:%i - %s()\n", \
-                    dt, __FILE__, __LINE__, __FUNCTION__); \
-         } \
-      } \
-      else { \
-         pthread_mutex_lock(&(x)); \
-      } \
-   } while (0)
-# else
-#  define LKL(x) pthread_mutex_lock(&(x))
-# endif
-# define LKT(x) pthread_mutex_trylock(&(x))
-# define LKU(x) pthread_mutex_unlock(&(x))
 # 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));
+#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
@@ -206,6 +163,7 @@ EAPI int lockmax;
 # define TH(x)
 # define THI(x)
 # define TH_MAX 0
+# define LKDBG(x)
 
 /* for rwlocks */
 #define RWLK(x) 
@@ -509,8 +467,19 @@ typedef enum _Font_Hint_Flags
    FONT_BYTECODE_HINT
 } Font_Hint_Flags;
 
+typedef enum _Font_Rend_Flags
+{
+   FONT_REND_REGULAR   = 0,
+   FONT_REND_ITALIC    = (1 << 0),
+   FONT_REND_BOLD      = (1 << 1),
+} Font_Rend_Flags;
+
 /*****************************************************************************/
 
+#if 0 // filtering disabled
+typedef struct _Filtered_Image Filtered_Image;
+#endif
+
 struct _RGBA_Image_Loadopts
 {
    int                  scale_down_by; // if > 1 then use this
@@ -519,6 +488,8 @@ struct _RGBA_Image_Loadopts
    struct {
       unsigned int      x, y, w, h;
    } region;
+
+   Eina_Bool            orientation; // if EINA_TRUE => should honor orientation information provided by file (like jpeg exif info)
 };
 
 struct _Image_Entry_Flags
@@ -585,7 +556,7 @@ struct _Image_Entry
 #ifdef EVAS_FRAME_QUEUING
    LK(ref_fq_add);
    LK(ref_fq_del);
-   pthread_cond_t cond_fq_del;
+   Eina_Condition cond_fq_del;
    int ref_fq[2];              // ref_fq[0] is for addition, ref_fq[1] is for deletion
 #endif
 #endif
@@ -621,6 +592,7 @@ struct _Image_Entry
    int                    server_id;
    int                    connect_num;
    int                    channel;
+   int                    load_error;
 };
 
 struct _Engine_Image_Entry
@@ -677,7 +649,6 @@ struct _RGBA_Draw_Context
       DATA32 col;
    } col;
    struct RGBA_Draw_Context_clip {
-      DATA8  *mask;
       int    x, y, w, h;
       Eina_Bool use : 1;
    } clip;
@@ -727,7 +698,6 @@ struct _RGBA_Pipe_Op
       struct {
         RGBA_Font          *font;
         int                 x, y;
-        Eina_Unicode       *text;
          Evas_Text_Props     intl_props;
       } text;
       struct {
@@ -799,6 +769,10 @@ struct _RGBA_Image
       Eina_Bool          dirty: 1;
    } mask;
 
+#if 0 // filtering disabled
+   Eina_List            *filtered;
+#endif
+   
    struct {
       LK(lock);
       Eina_List *list;
@@ -808,6 +782,12 @@ struct _RGBA_Image
       unsigned long long newest_usage;
       unsigned long long newest_usage_count;
    } cache;
+
+#ifdef HAVE_PIXMAN
+   struct {
+      pixman_image_t *im;
+   } pixman;
+#endif   
 };
 
 struct _RGBA_Polygon_Point
@@ -828,6 +808,16 @@ struct _RGBA_Map_Point
    FPc px, py, z0, foc;
 };
 
+#if 0 // filtering disabled
+struct _Filtered_Image
+{
+   void       *key;
+   size_t      keylen;
+   RGBA_Image *image;
+   int ref;
+};
+#endif
+
 // for fonts...
 /////
 typedef struct _Fash_Item_Index_Map Fash_Item_Index_Map;
@@ -880,7 +870,7 @@ struct _RGBA_Font
    int              references;
 #ifdef EVAS_FRAME_QUEUING
    int              ref_fq[2]; //ref_fq[0] is for addition, ref_fq[1] is for deletion
-   pthread_cond_t   cond_fq_del;
+   Eina_Condition   cond_fq_del;
    LK(ref_fq_add);
    LK(ref_fq_del);
 #endif
@@ -904,6 +894,9 @@ struct _RGBA_Font_Int
    } ft;
    LK(ft_mutex);
    Font_Hint_Flags  hinting;
+   Font_Rend_Flags  wanted_rend; /* The wanted rendering style */
+   Font_Rend_Flags  runtime_rend; /* The rendering we need to do on runtime
+                                     in order to comply with the wanted_rend. */
    unsigned char    sizeok : 1;
    unsigned char    inuse : 1;
 };
@@ -922,11 +915,6 @@ struct _RGBA_Font_Source
       int            orig_upem;
       FT_Face        face;
    } ft;
-#ifdef OT_SUPPORT
-   struct {
-      void *face;
-   } hb;
-#endif
 };
 
 struct _RGBA_Font_Glyph
@@ -1089,18 +1077,18 @@ struct _Convert_Pal
 
 #ifndef WORDS_BIGENDIAN
 /* x86 */
-#define A_VAL(p) ((DATA8 *)(p))[3]
-#define R_VAL(p) ((DATA8 *)(p))[2]
-#define G_VAL(p) ((DATA8 *)(p))[1]
-#define B_VAL(p) ((DATA8 *)(p))[0]
+#define A_VAL(p) (((DATA8 *)(p))[3])
+#define R_VAL(p) (((DATA8 *)(p))[2])
+#define G_VAL(p) (((DATA8 *)(p))[1])
+#define B_VAL(p) (((DATA8 *)(p))[0])
 #define AR_VAL(p) ((DATA16 *)(p)[1])
 #define GB_VAL(p) ((DATA16 *)(p)[0])
 #else
 /* ppc */
-#define A_VAL(p) ((DATA8 *)(p))[0]
-#define R_VAL(p) ((DATA8 *)(p))[1]
-#define G_VAL(p) ((DATA8 *)(p))[2]
-#define B_VAL(p) ((DATA8 *)(p))[3]
+#define A_VAL(p) (((DATA8 *)(p))[0])
+#define R_VAL(p) (((DATA8 *)(p))[1])
+#define G_VAL(p) (((DATA8 *)(p))[2])
+#define B_VAL(p) (((DATA8 *)(p))[3])
 #define AR_VAL(p) ((DATA16 *)(p)[0])
 #define GB_VAL(p) ((DATA16 *)(p)[1])
 #endif
index fb9bb53..8a126cd 100644 (file)
@@ -46,6 +46,14 @@ typedef struct _Evas_Map_Point              Evas_Map_Point;
 typedef struct _Evas_Smart_Cb_Description_Array Evas_Smart_Cb_Description_Array;
 typedef struct _Evas_Post_Callback          Evas_Post_Callback;
 
+/* General types - used for script type chceking */
+#define OPAQUE_TYPE(type) struct __##type { int a; }; \
+   typedef struct __##type type
+
+OPAQUE_TYPE(Evas_Font_Set); /* General type for RGBA_Font */
+OPAQUE_TYPE(Evas_Font_Instance); /* General type for RGBA_Font_Int */
+/* End of general types */
+
 #define MAGIC_EVAS                 0x70777770
 #define MAGIC_OBJ                  0x71777770
 #define MAGIC_OBJ_RECTANGLE        0x71777771
@@ -55,11 +63,11 @@ typedef struct _Evas_Post_Callback          Evas_Post_Callback;
 #define MAGIC_OBJ_TEXT             0x71777776
 #define MAGIC_OBJ_SMART            0x71777777
 #define MAGIC_OBJ_TEXTBLOCK        0x71777778
-#define MAGIC_OBJ_PROXY                   0x71777779
 #define MAGIC_SMART                0x72777770
 #define MAGIC_OBJ_SHAPE            0x72777773
 #define MAGIC_OBJ_CONTAINER        0x72777774
 #define MAGIC_OBJ_CUSTOM           0x72777775
+#define MAGIC_EVAS_GL              0x72777776
 
 #ifdef MAGIC_DEBUG
 # define MAGIC_CHECK_FAILED(o, t, m) \
@@ -381,6 +389,35 @@ struct _Evas_Map
    Evas_Map_Point        points[]; // actual points
 };
 
+#if 0 // filtering disabled
+/* nash: Split into two bits */
+typedef struct Evas_Filter_Info
+{
+   Evas_Filter filter;
+   Evas_Filter_Mode mode;
+
+   Eina_Bool dirty : 1;
+
+   int datalen;
+   void *data;
+   void (*data_free)(void *);
+
+   uint8_t *key;
+   uint32_t len;
+   Filtered_Image *cached;
+} Evas_Filter_Info;
+
+typedef Eina_Bool (*Evas_Software_Filter_Fn)(Evas_Filter_Info *, RGBA_Image *, RGBA_Image *);
+
+int evas_filter_get_size(Evas_Filter_Info *info, int inw, int inh,
+                     int *outw, int *outh, Eina_Bool inv);
+Eina_Bool evas_filter_always_alpha(Evas_Filter_Info *info);
+uint8_t *evas_filter_key_get(const Evas_Filter_Info *info, uint32_t *lenp);
+// expose for use in engines
+EAPI Evas_Software_Filter_Fn evas_filter_software_get(Evas_Filter_Info *info);
+void evas_filter_free(Evas_Object *o);
+#endif
+
 struct _Evas_Object
 {
    EINA_INLIST;
@@ -449,6 +486,10 @@ struct _Evas_Object
       Eina_Bool                redraw;
    } proxy;
 
+#if 0 // filtering disabled
+   Evas_Filter_Info           *filter;
+#endif
+   
    Evas_Size_Hints            *size_hints;
 
    int                         last_mouse_down_counter;
@@ -626,7 +667,7 @@ struct _Evas_Func
    void *(*image_size_set)                 (void *data, void *image, int w, int h);
    void (*image_stride_get)                (void *data, void *image, int *stride);
    void *(*image_dirty_region)             (void *data, void *image, int x, int y, int w, int h);
-   void *(*image_data_get)                 (void *data, void *image, int to_write, DATA32 **image_data);
+   void *(*image_data_get)                 (void *data, void *image, int to_write, DATA32 **image_data, int *err);
    void *(*image_data_put)                 (void *data, void *image, DATA32 *image_data);
    void  (*image_data_preload_request)     (void *data, void *image, const void *target);
    void  (*image_data_preload_cancel)      (void *data, void *image, const void *target);
@@ -647,22 +688,22 @@ struct _Evas_Func
    void (*image_cache_set)                 (void *data, int bytes);
    int  (*image_cache_get)                 (void *data);
 
-   void *(*font_load)                      (void *data, const char *name, int size);
-   void *(*font_memory_load)               (void *data, char *name, int size, const void *fdata, int fdata_size);
-   void *(*font_add)                       (void *data, void *font, const char *name, int size);
-   void *(*font_memory_add)                (void *data, void *font, char *name, int size, const void *fdata, int fdata_size);
-   void (*font_free)                       (void *data, void *font);
-   int  (*font_ascent_get)                 (void *data, void *font);
-   int  (*font_descent_get)                (void *data, void *font);
-   int  (*font_max_ascent_get)             (void *data, void *font);
-   int  (*font_max_descent_get)            (void *data, void *font);
-   void (*font_string_size_get)            (void *data, void *font, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int *w, int *h);
-   int  (*font_inset_get)                  (void *data, void *font, const Evas_Text_Props *text_props);
-   int  (*font_h_advance_get)              (void *data, void *font, const Eina_Unicode *text, const Evas_Text_Props *intl_props);
-   int  (*font_v_advance_get)              (void *data, void *font, const Eina_Unicode *text, const Evas_Text_Props *intl_props);
-   int  (*font_char_coords_get)            (void *data, void *font, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch);
-   int  (*font_char_at_coords_get)         (void *data, void *font, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch);
-   void (*font_draw)                       (void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, const Eina_Unicode *text, const Evas_Text_Props *intl_props);
+   Evas_Font_Set *(*font_load)             (void *data, const char *name, int size, Font_Rend_Flags wanted_rend);
+   Evas_Font_Set *(*font_memory_load)      (void *data, char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend);
+   Evas_Font_Set *(*font_add)              (void *data, Evas_Font_Set *font, const char *name, int size, Font_Rend_Flags wanted_rend);
+   Evas_Font_Set *(*font_memory_add)       (void *data, Evas_Font_Set *font, char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend);
+   void (*font_free)                       (void *data, Evas_Font_Set *font);
+   int  (*font_ascent_get)                 (void *data, Evas_Font_Set *font);
+   int  (*font_descent_get)                (void *data, Evas_Font_Set *font);
+   int  (*font_max_ascent_get)             (void *data, Evas_Font_Set *font);
+   int  (*font_max_descent_get)            (void *data, Evas_Font_Set *font);
+   void (*font_string_size_get)            (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int *w, int *h);
+   int  (*font_inset_get)                  (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props);
+   int  (*font_h_advance_get)              (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props);
+   int  (*font_v_advance_get)              (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props);
+   int  (*font_char_coords_get)            (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch);
+   int  (*font_char_at_coords_get)         (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch);
+   void (*font_draw)                       (void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w, int h, int ow, int oh, const Evas_Text_Props *intl_props);
 
    void (*font_cache_flush)                (void *data);
    void (*font_cache_set)                  (void *data, int bytes);
@@ -670,14 +711,14 @@ struct _Evas_Func
 
    /* Engine functions will over time expand from here */
 
-   void (*font_hinting_set)                (void *data, void *font, int hinting);
+   void (*font_hinting_set)                (void *data, Evas_Font_Set *font, int hinting);
    int  (*font_hinting_can_hint)           (void *data, int hinting);
 
 /*    void (*image_rotation_set)              (void *data, void *image); */
 
    void (*image_scale_hint_set)            (void *data, void *image, int hint);
    int  (*image_scale_hint_get)            (void *data, void *image);
-   int  (*font_last_up_to_pos)             (void *data, void *font, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int x, int y);
+   int  (*font_last_up_to_pos)             (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int x, int y);
 
    void (*image_map_draw)                  (void *data, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level);
    void *(*image_map_surface_new)          (void *data, int w, int h, int alpha);
@@ -685,9 +726,28 @@ struct _Evas_Func
 
    void (*image_content_hint_set)          (void *data, void *surface, int hint);
    int  (*image_content_hint_get)          (void *data, void *surface);
-   int  (*font_pen_coords_get)            (void *data, void *font, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch);
-   Eina_Bool (*font_text_props_info_create)                (void *data __UNUSED__, void *font, Eina_Unicode *text, Evas_Text_Props *intl_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len);
-   int  (*font_right_inset_get)                  (void *data, void *font, const Evas_Text_Props *text_props);
+   int  (*font_pen_coords_get)             (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch);
+   Eina_Bool (*font_text_props_info_create) (void *data __UNUSED__, Evas_Font_Instance *fi, const Eina_Unicode *text, Evas_Text_Props *intl_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len);
+   int  (*font_right_inset_get)            (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props);
+
+#if 0 // filtering disabled
+   void (*image_draw_filtered)             (void *data, void *context, void *surface, void *image, Evas_Filter_Info *filter);
+   Filtered_Image *(*image_filtered_get)   (void *image, uint8_t *key, size_t len);
+   Filtered_Image *(*image_filtered_save)  (void *image, void *filtered, uint8_t *key, size_t len);
+   void (*image_filtered_free)             (void *image, Filtered_Image *);
+#endif
+   
+   /* EFL-GL Glue Layer */
+   void *(*gl_surface_create)            (void *data, void *config, int w, int h);
+   int  (*gl_surface_destroy)            (void *data, void *surface);
+   void *(*gl_context_create)            (void *data, void *share_context);
+   int  (*gl_context_destroy)            (void *data, void *context);
+   int  (*gl_make_current)               (void *data, void *surface, void *context); 
+   void *(*gl_proc_address_get)          (void *data, const char *name);
+   int  (*gl_native_surface_get)         (void *data, void *surface, void *native_surface);
+   void *(*gl_api_get)                   (void *data);
+   int  (*image_load_error_get)          (void *data, void *image);
+   int  (*font_run_end_get)              (void *data, Evas_Font_Set *font, Evas_Font_Instance **script_fi, Evas_Font_Instance **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len);
 };
 
 struct _Evas_Image_Load_Func
@@ -756,6 +816,7 @@ const Evas_Smart_Cb_Description *evas_smart_cb_description_find(const Evas_Smart
 
 Eina_Bool _evas_object_image_preloading_get(const Evas_Object *obj);
 void _evas_object_image_preloading_set(Evas_Object *obj, Eina_Bool preloading);
+void _evas_object_image_preloading_check(Evas_Object *obj);
 void evas_object_smart_del(Evas_Object *obj);
 void evas_object_smart_cleanup(Evas_Object *obj);
 void evas_object_smart_member_raise(Evas_Object *member);
@@ -838,6 +899,7 @@ Eina_Bool evas_preload_thread_cancel(Evas_Preload_Pthread *thread);
 void _evas_walk(Evas *e);
 void _evas_unwalk(Evas *e);
 
+// expose for use in engines
 EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name);
 
 void evas_render_invalidate(Evas *e);
@@ -845,7 +907,7 @@ void evas_render_object_recalc(Evas_Object *obj);
 
 Eina_Bool evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y);
 Eina_Bool evas_map_coords_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord *mx, Evas_Coord *my, int grab);
-
+   
 /****************************************************************************/
 /*****************************************/
 /********************/
@@ -906,6 +968,8 @@ struct _Evas_Mempool
   
 #define EVAS_API_OVERRIDE(func, api, prefix) \
      (api)->func = prefix##func
+#define EVAS_API_RESET(func, api) \
+     (api)->func = NULL
 
 #include "evas_inline.x"
 
index f73d397..6e1aa51 100644 (file)
@@ -9,57 +9,6 @@ static int _evas_debug_init = 0;
 static int _evas_debug_show = 0;
 static int _evas_debug_abort = 0;
 
-/**
- * Return if any allocation errors have occurred during the prior function
- * @return The allocation error flag
- *
- * This function will return if any memory allocation errors occurred during,
- * and what kind they were. The return value will be one of
- * EVAS_ALLOC_ERROR_NONE, EVAS_ALLOC_ERROR_FATAL or EVAS_ALLOC_ERROR_RECOVERED
- * with each meaning something different.
- *
- * EVAS_ALLOC_ERROR_NONE means that no errors occurred at all and the function
- * worked as expected.
- *
- * EVAS_ALLOC_ERROR_FATAL means the function was completely unable to perform
- * its job and will  have  exited as cleanly as possible. The programmer
- * should consider this as a sign of very low memory and should try and safely
- * recover from the prior functions failure (or try free up memory elsewhere
- * and try again after more memory is freed).
- *
- * EVAS_ALLOC_ERROR_RECOVERED means that an allocation error occurred, but was
- * recovered from by evas finding memory of its own it has allocated and
- * freeing what it sees as not really usefully allocated memory. What is freed
- * may vary. Evas may reduce the resolution of images, free cached images or
- * fonts, trhow out pre-rendered data, reduce the complexity of change lists
- * etc. Evas and the program will function as per normal after this, but this
- * is a sign of low memory, and it is suggested that the program try and
- * identify memory it doesn't need, and free it.
- *
- * Example:
- * @code
- * extern Evas_Object *object;
- * void callback (void *data, Evas *e, Evas_Object *obj, void *event_info);
- *
- * evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_DOWN, callback, NULL);
- * if (evas_alloc_error() == EVAS_ALLOC_ERROR_FATAL)
- *   {
- *     fprintf(stderr, "ERROR: Completely unable to attach callabck. Must\n");
- *     fprintf(stderr, "       destroy object now as it cannot be used.\n");
- *     evas_object_del(object);
- *     object = NULL;
- *     fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n");
- *     my_memory_cleanup();
- *   }
- * if (evas_alloc_error() == EVAS_ALLOC_ERROR_RECOVERED)
- *   {
- *     fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n");
- *     my_memory_cleanup();
- *   }
- * @endcode
- *
- * @ingroup Evas_Group
- */
 EAPI Evas_Alloc_Error
 evas_alloc_error(void)
 {
diff --git a/src/modules/.cvsignore b/src/modules/.cvsignore
deleted file mode 100644 (file)
index 282522d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/src/modules/engines/.cvsignore b/src/modules/engines/.cvsignore
deleted file mode 100644 (file)
index 282522d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
index 40337a8..60acbd1 100644 (file)
@@ -21,9 +21,6 @@ endif
 if !EVAS_STATIC_BUILD_GL_COMMON
 SUBDIRS += gl_common
 endif
-if !EVAS_STATIC_BUILD_GL_GLEW
-SUBDIRS += gl_glew
-endif
 if !EVAS_STATIC_BUILD_GL_X11
 SUBDIRS += gl_x11
 endif
@@ -31,9 +28,6 @@ if !EVAS_STATIC_BUILD_GL_SDL
 SUBDIRS += gl_sdl
 endif
 
-if !EVAS_STATIC_BUILD_QUARTZ
-SUBDIRS += quartz
-endif
 if !EVAS_STATIC_BUILD_SOFTWARE_8
 SUBDIRS += software_8
 endif
@@ -64,16 +58,4 @@ endif
 if !EVAS_STATIC_BUILD_SOFTWARE_X11
 SUBDIRS += software_x11
 endif
-if !EVAS_STATIC_BUILD_XRENDER_X11
-SUBDIRS += xrender_x11
-endif
-
 
-#if !EVAS_STATIC_BUILD_CAIRO_X11
-#SUBDIRS +=
-#cairo_common
-#cairo_x11
-#endif
-#if !EVAS_STATIC_BUILD_SOFTWARE_QTOPIA
-#SUBDIRS += software_qtopia
-#endif
diff --git a/src/modules/engines/buffer/.cvsignore b/src/modules/engines/buffer/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index aa02fc6..19ac5a7 100644 (file)
@@ -7,7 +7,8 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib/include \
 -I$(top_srcdir)/src/modules/engines \
 @EINA_CFLAGS@ \
-@FREETYPE_CFLAGS@
+@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@
 
 AM_CFLAGS = @WIN32_CFLAGS@
 
diff --git a/src/modules/engines/cairo_common/.cvsignore b/src/modules/engines/cairo_common/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
diff --git a/src/modules/engines/cairo_common/Makefile.am b/src/modules/engines/cairo_common/Makefile.am
deleted file mode 100644 (file)
index 4ff6654..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = \
--I. \
--I$(top_srcdir)/src/lib \
--I$(top_srcdir)/src/lib/include \
-@FREETYPE_CFLAGS@ \
-@CAIRO_CFLAGS@ \
-@EINA_CFLAGS@
-
-if BUILD_ENGINE_CAIRO_COMMON
-
-noinst_LTLIBRARIES = libevas_engine_cairo_common.la
-
-libevas_engine_cairo_common_la_SOURCES = \
-evas_cairo_main.c
-
-libevas_engine_cairo_common_la_LIBADD = @EINA_LIBS@ @CAIRO_LIBS@ $(top_builddir)/src/lib/libevas.la
-
-endif
-
-EXTRA_DIST = \
-evas_cairo_private.h \
-evas_cairo_common.h
diff --git a/src/modules/engines/cairo_common/evas_cairo_common.h b/src/modules/engines/cairo_common/evas_cairo_common.h
deleted file mode 100644 (file)
index c7b119f..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef EVAS_CAIRO_COMMON_H
-#define EVAS_CAIRO_COMMON_H
-
-#include "evas_common.h"
-#include "config.h"
-
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <sys/time.h>
-#include <unistd.h>
-
-#include <X11/Xlib.h>
-#include <X11/Xatom.h>
-#include <X11/Xutil.h>
-
-#include <cairo.h>
-#include <cairo-xlib.h>
-
-typedef struct _Evas_Cairo_Context                   Evas_Cairo_Context;
-typedef struct _Evas_Cairo_Image                     Evas_Cairo_Image;
-typedef struct _Evas_Cairo_Polygon                   Evas_Cairo_Polygon;
-typedef struct _Evas_Cairo_Polygon_Point             Evas_Cairo_Polygon_Point;
-
-struct _Evas_Cairo_Context
-{
-   cairo_t         *cairo;
-
-   struct {
-      double r, g, b, a;
-   } col;
-   struct {
-      unsigned int set : 1;
-      double r, g, b, a;
-   } mul;
-};
-
-struct _Evas_Cairo_Image
-{
-   RGBA_Image         *im;
-   int                 references;
-   DATA32             *mulpix;
-   cairo_surface_t    *surface;
-   cairo_pattern_t    *pattern;
-};
-
-struct _Evas_Cairo_Polygon
-{
-   Eina_List *points;
-};
-
-struct _Evas_Cairo_Polygon_Point
-{
-   int x, y;
-};
-
-#endif
diff --git a/src/modules/engines/cairo_common/evas_cairo_main.c b/src/modules/engines/cairo_common/evas_cairo_main.c
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/src/modules/engines/cairo_common/evas_cairo_private.h b/src/modules/engines/cairo_common/evas_cairo_private.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/src/modules/engines/cairo_x11/.cvsignore b/src/modules/engines/cairo_x11/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
diff --git a/src/modules/engines/cairo_x11/Evas_Engine_Cairo_X11.h b/src/modules/engines/cairo_x11/Evas_Engine_Cairo_X11.h
deleted file mode 100644 (file)
index 65503a0..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef _EVAS_ENGINE_CAIRO_X11_H
-#define _EVAS_ENGINE_CAIRO_X11_H
-
-#include <X11/Xlib.h>
-
-typedef struct _Evas_Engine_Info_Cairo_X11 Evas_Engine_Info_Cairo_X11;
-
-struct _Evas_Engine_Info_Cairo_X11
-{
-   /* PRIVATE - don't mess with this baby or evas will poke its tongue out */
-   /* at you and make nasty noises */
-   Evas_Engine_Info magic;
-
-   /* engine specific data & parameters it needs to set up */
-   struct {
-      Display  *display;
-      Drawable  drawable;
-      Visual   *visual;
-      Colormap  colormap;
-      int       depth;
-   } info;
-   /* engine specific function calls to query stuff about the destination */
-   /* engine (what visual & colormap & depth to use, performance info etc. */
-
-   /* non-blocking or blocking mode */
-   Evas_Engine_Render_Mode render_mode;
-};
-#endif
-
-
diff --git a/src/modules/engines/cairo_x11/Makefile.am b/src/modules/engines/cairo_x11/Makefile.am
deleted file mode 100644 (file)
index d2fa180..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = \
--I. \
--I$(top_srcdir)/src/lib \
--I$(top_srcdir)/src/lib/include \
--I$(top_srcdir)/src/modules/engines/cairo_common \
-@FREETYPE_CFLAGS@ \
-@evas_engine_cairo_x11_cflags@ \
-@EINA_CFLAGS@
-
-if BUILD_ENGINE_CAIRO_X11
-
-CAIRO_X11_SOURCES = \
-evas_engine.c \
-evas_x_main.c
-
-CAIRO_X11_LIBADD = @evas_engine_cairo_x11_libs@ $(top_builddir)/src/modules/engines/cairo_common/libevas_engine_cairo_common.la
-
-
-includes_HEADERS = Evas_Engine_Cairo_X11.h
-includesdir = $(includedir)/evas-@VMAJ@
-
-if !EVAS_STATIC_BUILD_CAIRO_X11
-
-pkgdir = $(libdir)/evas/modules/engines/cairo_x11/$(MODULE_ARCH)
-pkg_LTLIBRARIES = module.la
-
-module_la_SOURCES = $(CAIRO_X11_SOURCES)
-
-module_la_LIBADD = @EINA_LIBS@ $(CAIRO_X11_SOURCES) $(top_builddir)/src/lib/libevas.la
-module_la_LDFLAGS = -module -avoid-version
-module_la_LIBTOOLFLAGS = --tag=disable-static
-
-else
-
-noinst_LTLIBRARIES = libevas_engine_cairo_x11.la
-
-libevas_engine_cairo_x11_la_SOURCES = $(CAIRO_X11_SOURCES)
-libevas_engine_cairo_x11_la_LIBADD = $(CAIRO_X11_LIBADD)
-
-endif
-endif
-
-EXTRA_DIST = evas_engine.h
diff --git a/src/modules/engines/cairo_x11/evas_engine.c b/src/modules/engines/cairo_x11/evas_engine.c
deleted file mode 100644 (file)
index 5a9881e..0000000
+++ /dev/null
@@ -1,1418 +0,0 @@
-#include <X11/Xlib.h>
-#include "evas_common.h"
-#include "evas_private.h"
-#include "evas_engine.h"
-#include "Evas_Engine_Cairo_X11.h"
-#include "evas_cairo_common.h"
-
-/* domain for eina_log */
-int _evas_engine_cairo_X11_log_dom = -1;
-
-static void *eng_info(Evas *e);
-static void eng_info_free(Evas *e, void *info);
-static int eng_setup(Evas *e, void *info);
-static void *eng_output_setup(int w, int h, Display *disp, Drawable draw, Visual *vis, Colormap cmap, int depth);
-static void eng_output_free(void *data);
-static void eng_output_resize(void *data, int w, int h);
-static void eng_output_tile_size_set(void *data, int w, int h);
-static void eng_output_redraws_rect_add(void *data, int x, int y, int w, int h);
-static void eng_output_redraws_rect_del(void *data, int x, int y, int w, int h);
-static void eng_output_redraws_clear(void *data);
-static void *eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch);
-static void eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h);
-static void eng_output_flush(void *data);
-
-static void *eng_context_new(void *data);
-static Eina_Bool eng_canvas_alpha_get(void *data, void *context);
-static void eng_context_free(void *data, void *context);
-static void eng_context_clip_set(void *data, void *context, int x, int y, int w, int h);
-static void eng_context_clip_clip(void *data, void *context, int x, int y, int w, int h);
-static void eng_context_clip_unset(void *data, void *context);
-static int eng_context_clip_get(void *data, void *context, int *x, int *y, int *w, int *h);
-static void eng_context_color_set(void *data, void *context, int r, int g, int b, int a);
-static int eng_context_color_get(void *data, void *context, int *r, int *g, int *b, int *a);
-static void eng_context_multiplier_set(void *data, void *context, int r, int g, int b, int a);
-static void eng_context_multiplier_unset(void *data, void *context);
-static int eng_context_multiplier_get(void *data, void *context, int *r, int *g, int *b, int *a);
-static void eng_context_cutout_add(void *data, void *context, int x, int y, int w, int h);
-static void eng_context_cutout_clear(void *data, void *context);
-static void eng_context_anti_alias_set(void *data, void *context, unsigned char aa);
-static unsigned char eng_context_anti_alias_get(void *data, void *context);
-static void eng_context_color_interpolation_set(void *data, void *context, int color_space);
-static int eng_context_color_interpolation_get(void *data, void *context);
-static void eng_context_render_op_set(void *data, void *context, int op);
-static int eng_context_render_op_get(void *data, void *context);
-
-static void eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h);
-
-static void eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int x2, int y2);
-
-static void *eng_polygon_point_add(void *data, void *context, void *polygon, int x, int y);
-static void *eng_polygon_points_clear(void *data, void *context, void *polygon);
-static void eng_polygon_draw(void *data, void *context, void *surface, void *polygon, int x, int y);
-
-static void *eng_image_load(void *data, char *file, char *key, int *error, Evas_Image_Load_Opts *lo);
-static void *eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
-static void *eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
-static void eng_image_free(void *data, void *image);
-static void eng_image_size_get(void *data, void *image, int *w, int *h);
-static void *eng_image_size_set(void *data, void *image, int w, int h);
-static void *eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h);
-static void *eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data);
-static void *eng_image_data_put(void *data, void *image, DATA32 *image_data);
-static void eng_image_data_preload_request(void *data, void *image, const void *target);
-static void eng_image_data_preload_cancel(void *data, void *image, const void *target);
-static void *eng_image_alpha_set(void *data, void *image, int has_alpha);
-static int eng_image_alpha_get(void *data, void *image);
-static void *eng_image_border_set(void *data, void *image, int l, int r, int t, int b);
-static void eng_image_border_get(void *data, void *image, int *l, int *r, int *t, int *b);
-static void eng_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth);
-static char *eng_image_comment_get(void *data, void *image, char *key);
-static char *eng_image_format_get(void *data, void *image);
-static void eng_image_colorspace_set(void *data, void *image, int cspace);
-static int eng_image_colorspace_get(void *data, void *image);
-static void eng_image_native_set(void *data, void *image, void *native);
-static void *eng_image_native_get(void *data, void *image);
-static void eng_image_cache_flush(void *data);
-static void eng_image_cache_set(void *data, int bytes);
-static int eng_image_cache_get(void *data);
-static void eng_image_scale_hint_set(void *data __UNUSED__, void *image, int hint);
-static int eng_image_scale_hint_get(void *data __UNUSED__, void *image);
-    
-static void *eng_font_load(void *data, char *name, int size);
-static void *eng_font_memory_load(void *data, char *name, int size, const void *fdata, int fdata_size);
-static void *eng_font_add(void *data, void *font, char *name, int size);
-static void *eng_font_memory_add(void *data, void *font, char *name, int size, const void *fdata, int fdata_size);
-static void eng_font_free(void *data, void *font);
-static int eng_font_ascent_get(void *data, void *font);
-static int eng_font_descent_get(void *data, void *font);
-static int eng_font_max_ascent_get(void *data, void *font);
-static int eng_font_max_descent_get(void *data, void *font);
-static void eng_font_string_size_get(void *data, void *font, char *text, int *w, int *h);
-static int eng_font_inset_get(void *data, void *font, const Evas_Text_Props *intl_props);
-static int eng_font_right_inset_get(void *data, void *font, const Evas_Text_Props *intl_props);
-static int eng_font_h_advance_get(void *data, void *font, char *text);
-static int eng_font_v_advance_get(void *data, void *font, char *text);
-static int eng_font_char_coords_get(void *data, void *font, char *text, int pos, int *cx, int *cy, int *cw, int *ch);
-static int eng_font_pen_coords_get(void *data, void *font, char *text, int pos, int *cpen_x, int *cy, int *cadv, int *ch);
-static Eina_Bool eng_font_text_props_info_create(void *data __UNUSED__, void *font, Eina_Unicode *text, Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len);
-static int eng_font_char_at_coords_get(void *data, void *font, char *text, int x, int y, int *cx, int *cy, int *cw, int *ch);
-static void eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, char *text);
-static void eng_font_cache_flush(void *data);
-static void eng_font_cache_set(void *data, int bytes);
-static int eng_font_cache_get(void *data);
-
-static void eng_font_hinting_set(void *data, void *font, int hinting);
-static int eng_font_hinting_can_hint(void *data, int hinting);
-
-static int eng_font_last_up_to_pos(void *data __UNUSED__, void *font, const char *text, int x, int y);
-
-typedef struct _Render_Engine Render_Engine;
-
-struct _Render_Engine
-{
-   Evas_Cairo_X11_Window *win;
-};
-
-static Evas_Func eng_func =
-{
-   eng_info,
-     eng_info_free,
-     eng_setup,
-     eng_output_free,
-     eng_output_resize,
-     eng_output_tile_size_set,
-     eng_output_redraws_rect_add,
-     eng_output_redraws_rect_del,
-     eng_output_redraws_clear,
-     eng_output_redraws_next_update_get,
-     eng_output_redraws_next_update_push,
-     eng_output_flush,
-     /* draw context virtual methods */
-     eng_context_new,
-     eng_canvas_alpha_get,
-     eng_context_free,
-     eng_context_clip_set,
-     eng_context_clip_clip,
-     eng_context_clip_unset,
-     eng_context_clip_get,
-     eng_context_color_set,
-     eng_context_color_get,
-     eng_context_multiplier_set,
-     eng_context_multiplier_unset,
-     eng_context_multiplier_get,
-     eng_context_cutout_add,
-     eng_context_cutout_clear,
-     eng_context_anti_alias_set,
-     eng_context_anti_alias_get,
-     eng_context_color_interpolation_set,
-     eng_context_color_interpolation_get,
-     eng_context_render_op_set,
-     eng_context_render_op_get,
-     /* rectangle draw funcs */
-     eng_rectangle_draw,
-     /* line draw funcs */
-     eng_line_draw,
-     /* polygon draw funcs */
-     eng_polygon_point_add,
-     eng_polygon_points_clear,
-     eng_polygon_draw,
-     /* image draw funcs */
-     eng_image_load,
-     eng_image_new_from_data,
-     eng_image_new_from_copied_data,
-     eng_image_free,
-     eng_image_size_get,
-     eng_image_size_set,
-     NULL,
-     eng_image_dirty_region,
-     eng_image_data_get,
-     eng_image_data_put,
-     eng_image_data_preload_request,
-     eng_image_data_preload_cancel,
-     eng_image_alpha_set,
-     eng_image_alpha_get,
-     eng_image_border_set,
-     eng_image_border_get,
-     eng_image_draw,
-     eng_image_comment_get,
-     eng_image_format_get,
-     eng_image_colorspace_set,
-     eng_image_colorspace_get,
-     eng_image_native_set,
-     eng_image_native_get,
-     /* image cache funcs */
-     eng_image_cache_flush,
-     eng_image_cache_set,
-     eng_image_cache_get,
-     /* font draw functions */
-     eng_font_load,
-     eng_font_memory_load,
-     eng_font_add,
-     eng_font_memory_add,
-     eng_font_free,
-     eng_font_ascent_get,
-     eng_font_descent_get,
-     eng_font_max_ascent_get,
-     eng_font_max_descent_get,
-     eng_font_string_size_get,
-     eng_font_inset_get,
-     eng_font_h_advance_get,
-     eng_font_v_advance_get,
-     eng_font_char_coords_get,
-     eng_font_char_at_coords_get,
-     eng_font_draw,
-     /* font cache functions */
-     eng_font_cache_flush,
-     eng_font_cache_set,
-     eng_font_cache_get,
-                              
-     eng_font_hinting_set,
-     eng_font_hinting_can_hint,
-     
-     eng_image_scale_hint_set,
-     eng_image_scale_hint_get,
-     /* more font draw functions */
-     eng_font_last_up_to_pos,
-     NULL, //   ORD(image_map_draw);
-     NULL, //   ORD(image_map_surface_new);
-     NULL, //   ORD(image_map_surface_free);
-     NULL, // eng_image_content_hint_set - software doesn't use it
-     NULL, // eng_image_content_hint_get - software doesn't use it
-     eng_font_pen_coords_get,
-     eng_font_text_props_info_create,
-     eng_font_right_inset_get
-     /* FUTURE software generic calls go here */
-};
-
-static void *
-eng_info(Evas *e)
-{
-   Evas_Engine_Info_Cairo_X11 *info;
-   INF("CAIRO: create info...");
-   info = calloc(1, sizeof(Evas_Engine_Info_Cairo_X11));
-   if (!info) return NULL;
-   info->magic.magic = rand();   
-   info->render_mode = EVAS_RENDER_MODE_BLOCKING;
-   return info;
-   e = NULL;
-}
-
-static void
-eng_info_free(Evas *e, void *info)
-{
-   Evas_Engine_Info_Cairo_X11 *in;
-   in = (Evas_Engine_Info_Cairo_X11 *)info;
-   free(in);
-}
-
-static int
-eng_setup(Evas *e, void *in)
-{
-   Render_Engine *re;
-   Evas_Engine_Info_Cairo_X11 *info;
-
-   info = (Evas_Engine_Info_Cairo_X11 *)in;
-   INF("CAIRO: setup info...");
-   if (!e->engine.data.output)
-     e->engine.data.output =
-     eng_output_setup(e->output.w,
-                                       e->output.h,
-                                       info->info.display,
-                                       info->info.drawable,
-                                       info->info.visual,
-                                       info->info.colormap,
-                                       info->info.depth);
-   if (!e->engine.data.output) return 0;
-
-   if (!e->engine.data.context)
-     e->engine.data.context =
-     e->engine.func->context_new(e->engine.data.output);
-   re = e->engine.data.output;
-
-   return 1;
-}
-
-static void *
-eng_output_setup(int w, int h, Display *disp, Drawable draw, Visual *vis, Colormap cmap, int depth)
-{
-   Render_Engine *re;
-
-   re = calloc(1, sizeof(Render_Engine));
-   if (!re)
-     return NULL;
-   re->win = eng_window_new(disp, draw,
-                                             0 /* FIXME: screen 0 assumption */,
-                                             vis, cmap, depth, w, h);
-   if (!re->win)
-     {
-       free(re);
-       return NULL;
-     }
-   INF("CAIRO: cairo window setup done.");
-   evas_common_cpu_init();
-
-   evas_common_blend_init();
-   evas_common_image_init();
-   evas_common_convert_init();
-   evas_common_scale_init();
-   evas_common_rectangle_init();
-   evas_common_polygon_init();
-   evas_common_line_init();
-   evas_common_font_init();
-   evas_common_draw_init();
-   evas_common_tilebuf_init();
-
-   return re;
-}
-
-static void
-eng_output_free(void *data)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-
-   eng_window_free(re->win);
-
-   free(re);
-
-   evas_common_font_shutdown();
-   evas_common_image_shutdown();
-}
-
-static void
-eng_output_resize(void *data, int w, int h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   re->win->w = w;
-   re->win->h = h;
-
-   eng_window_size_set(re->win, w, h);
-}
-
-static void
-eng_output_tile_size_set(void *data, int w, int h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   /* not used in cairo engine */
-}
-
-static void
-eng_output_redraws_rect_add(void *data, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-   /* FIXME? cairo_surface_mark_dirty_rectangle */
-
-   re = (Render_Engine *)data;
-   if (!re->win->draw.redraw)
-     {
-       re->win->draw.x1 = 0;
-       re->win->draw.y1 = 0;
-       re->win->draw.x2 = re->win->w - 1;
-       re->win->draw.y2 = re->win->h - 1;
-     }
-   else
-     {
-       if (x < re->win->draw.x1) re->win->draw.x1 = x;
-       if (y < re->win->draw.y1) re->win->draw.y1 = y;
-       if ((x + w - 1) > re->win->draw.x2) re->win->draw.x2 = x + w - 1;
-       if ((y + h - 1) > re->win->draw.y2) re->win->draw.y2 = y + h - 1;
-     }
-   re->win->draw.redraw = 1;
-}
-
-static void
-eng_output_redraws_rect_del(void *data, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   /* not used in cairo engine */
-}
-
-static void
-eng_output_redraws_clear(void *data)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   re->win->draw.redraw = 0;
-}
-
-static void *
-eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   if (!re->win->draw.redraw) return NULL;
-
-   if (x) *x = re->win->draw.x1;
-   if (y) *y = re->win->draw.y1;
-   if (w) *w = re->win->draw.x2 - re->win->draw.x1 + 1;
-   if (h) *h = re->win->draw.y2 - re->win->draw.y1 + 1;
-   if (cx) *cx = re->win->draw.x1;
-   if (cy) *cy = re->win->draw.y1;
-   if (cw) *cw = re->win->draw.x2 - re->win->draw.x1 + 1;
-   if (ch) *ch = re->win->draw.y2 - re->win->draw.y1 + 1;
-   return re;
-}
-
-static void
-eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   re->win->draw.redraw = 0;
-}
-
-static void
-eng_output_flush(void *data)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-   Eina_List *l;
-
-   re = (Render_Engine *)data;
-}
-
-static void *
-eng_context_new(void *data)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-
-   re = (Render_Engine *)data;
-   ctxt = calloc(1, sizeof(Evas_Cairo_Context));
-   if (!ctxt) return NULL;
-
-   ctxt->cairo = cairo_create(re->win->surface);
-
-   return ctxt;
-}
-
-static void
-eng_context_free(void *data, void *context)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-
-   re = (Render_Engine *)data;
-   ctxt = context;
-
-   cairo_destroy(ctxt->cairo);
-   free(ctxt);
-}
-
-static void
-eng_context_clip_set(void *data, void *context, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   /* not used in cairo engine */
-}
-
-static void
-eng_context_clip_clip(void *data, void *context, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   /* not used in cairo engine */
-}
-
-static void
-eng_context_clip_unset(void *data, void *context)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   /* not used in cairo engine */
-}
-
-static int
-eng_context_clip_get(void *data, void *context, int *x, int *y, int *w, int *h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   /* not used in cairo engine */
-   return 0;
-}
-
-static void
-eng_context_color_set(void *data, void *context, int r, int g, int b, int a)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-
-   ctxt->col.r = (double)r / 255.0;
-   ctxt->col.g = (double)g / 255.0;
-   ctxt->col.b = (double)b / 255.0;
-   ctxt->col.a = (double)a / 255.0;
-}
-
-static int
-eng_context_color_get(void *data, void *context, int *r, int *g, int *b, int *a)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-
-   if (r) *r = ctxt->col.r * 255;
-   if (g) *g = ctxt->col.g * 255;
-   if (b) *b = ctxt->col.b * 255;
-   if (a) *a = ctxt->col.a * 255;
-   return 1;
-}
-
-static void
-eng_context_multiplier_set(void *data, void *context, int r, int g, int b, int a)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-
-   ctxt->mul.r = (double)r / 255.0;
-   ctxt->mul.g = (double)g / 255.0;
-   ctxt->mul.b = (double)b / 255.0;
-   ctxt->mul.a = (double)a / 255.0;
-   ctxt->mul.set = 1;
-}
-
-static void
-eng_context_multiplier_unset(void *data, void *context)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-   ctxt->mul.set = 0;
-}
-
-static int
-eng_context_multiplier_get(void *data, void *context, int *r, int *g, int *b, int *a)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-
-   if (r) *r = ctxt->mul.r * 255;
-   if (g) *g = ctxt->mul.g * 255;
-   if (b) *b = ctxt->mul.b * 255;
-   if (a) *a = ctxt->mul.a * 255;
-   return ctxt->mul.set;
-}
-
-static void
-eng_context_cutout_add(void *data, void *context, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   /* not used in cairo engine */
-}
-
-static void
-eng_context_cutout_clear(void *data, void *context)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   /* not used in cairo engine */
-}
-
-static void
-eng_context_anti_alias_set(void *data, void *context, unsigned char aa)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-}
-
-static unsigned char
-eng_context_anti_alias_get(void *data, void *context)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   return 1;
-}
-
-static void
-eng_context_color_interpolation_set(void *data, void *context, int color_space)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-}
-
-static int
-eng_context_color_interpolation_get(void *data, void *context)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static void
-eng_context_render_op_set(void *data, void *context, int op)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-}
-
-static int
-eng_context_render_op_get(void *data, void *context)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-
-static void
-eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-   double r, g, b, a;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-
-   cairo_rectangle(ctxt->cairo, x, y, w, h);
-   r = ctxt->col.r;
-   g = ctxt->col.g;
-   b = ctxt->col.b;
-   a = ctxt->col.a;
-   if (ctxt->mul.set)
-     {
-       r *= ctxt->mul.r;
-       g *= ctxt->mul.g;
-       b *= ctxt->mul.b;
-       a *= ctxt->mul.a;
-     }
-   cairo_set_source_rgba(ctxt->cairo, r, g, b, a);
-   cairo_fill(ctxt->cairo);
-}
-
-static void
-eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int x2, int y2)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-   double r, g, b, a;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-
-   cairo_move_to(ctxt->cairo, x1, y1);
-   cairo_line_to(ctxt->cairo, x2, y2);
-   r = ctxt->col.r;
-   g = ctxt->col.g;
-   b = ctxt->col.b;
-   a = ctxt->col.a;
-   if (ctxt->mul.set)
-     {
-       r *= ctxt->mul.r;
-       g *= ctxt->mul.g;
-       b *= ctxt->mul.b;
-       a *= ctxt->mul.a;
-     }
-   cairo_set_source_rgba(ctxt->cairo, r, g, b, a);
-   cairo_stroke(ctxt->cairo);
-}
-
-static void *
-eng_polygon_point_add(void *data, void *context, void *polygon, int x, int y)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-   Evas_Cairo_Polygon *poly;
-   Evas_Cairo_Polygon_Point *pt;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-   poly = (Evas_Cairo_Polygon *)polygon;
-   if (!poly) poly = calloc(1, sizeof(Evas_Cairo_Polygon));
-
-   pt = malloc(sizeof(Evas_Cairo_Polygon_Point));
-   if (pt)
-     {
-       pt->x = x;
-       pt->y = y;
-       poly->points = eina_list_append(poly->points, pt);
-     }
-   return poly;
-}
-
-static void *
-eng_polygon_points_clear(void *data, void *context, void *polygon)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-   Evas_Cairo_Polygon *poly;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-   poly = (Evas_Cairo_Polygon *)polygon;
-   if (!poly) return NULL;
-
-   while (poly->points)
-     {
-       free(poly->points->data);
-       poly->points = eina_list_remove_list(poly->points, poly->points);
-     }
-   free(poly);
-
-   return NULL;
-}
-
-static void
-eng_polygon_draw(void *data, void *context, void *surface, void *polygon, int x, int y)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-   Evas_Cairo_Polygon *poly;
-   Evas_Cairo_Polygon_Point *pt;
-   double r, g, b, a;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-   poly = (Evas_Cairo_Polygon *)polygon;
-
-   pt = poly->points->data;
-   if (pt)
-     {
-       Eina_List *l;
-       cairo_move_to(ctxt->cairo, pt->x + x, pt->y + y);
-       EINA_LIST_FOREACH(poly->points->next, l, pt)
-         cairo_line_to(ctxt->cairo, pt->x + x, pt->y + y);
-     }
-   r = ctxt->col.r;
-   g = ctxt->col.g;
-   b = ctxt->col.b;
-   a = ctxt->col.a;
-   if (ctxt->mul.set)
-     {
-       r *= ctxt->mul.r;
-       g *= ctxt->mul.g;
-       b *= ctxt->mul.b;
-       a *= ctxt->mul.a;
-     }
-   cairo_set_source_rgba(ctxt->cairo, r, g, b, a);
-   cairo_stroke(ctxt->cairo);
-}
-
-static void *
-eng_image_load(void *data, char *file, char *key, int *error, Evas_Image_Load_Opts *lo)
-{
-   Render_Engine *re;
-   Evas_Cairo_Image *im;
-
-   re = (Render_Engine *)data;
-   im = calloc(1, sizeof(Evas_Cairo_Image));
-   if (!im)
-     {
-       *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
-       return NULL;
-     }
-
-   *error = EVAS_LOAD_ERROR_NONE;
-   im->im = evas_common_load_image_from_file(file, key, lo, error);
-   if (!im->im)
-     {
-       free(im);
-       return NULL;
-     }
-   im->references = 1;
-   return im;
-}
-
-static void *
-eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
-{
-   Render_Engine *re;
-   Evas_Cairo_Image *im;
-
-   re = (Render_Engine *)data;
-
-   /* FIXME, cache! */
-   im = calloc(1, sizeof(Evas_Cairo_Image));
-   if (!im) return NULL;
-
-   im->im = evas_common_image_new();
-   if (!im->im)
-     {
-       free(im);
-       return NULL;
-     }
-   im->im->image = evas_common_image_surface_new(im->im);
-   if (!im->im->image)
-     {
-       evas_common_image_free(im->im);
-       free(im);
-       return NULL;
-     }
-
-   im->im->image->w = w;
-   im->im->image->h = h;
-   im->im->image->data = image_data;
-   im->im->image->no_free = 1;
-   im->references = 1;
-   return im;
-}
-
-static void *
-eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
-{
-   Render_Engine *re;
-   Evas_Cairo_Image *im;
-
-   re = (Render_Engine *)data;
-
-   /* FIXME, cache! */
-   im = calloc(1, sizeof(Evas_Cairo_Image));
-   if (!im) return NULL;
-   im->references = 1;
-   im->im = evas_common_image_create(w, h);
-   if (!im->im)
-     {
-       free(im);
-       return NULL;
-     }
-   if (image_data)
-     memcpy(im->im->image->data, image_data, w * h * sizeof(DATA32));
-   return im;
-}
-
-static void
-eng_image_free(void *data, void *image)
-{
-   Render_Engine *re;
-   Evas_Cairo_Image *im;
-
-   re = (Render_Engine *)data;
-   im = (Evas_Cairo_Image *)image;
-   evas_common_image_unref(im->im);
-   if (im->surface) cairo_surface_destroy(im->surface);
-   if (im->pattern) cairo_pattern_destroy(im->pattern);
-   free(im);
-}
-
-static void
-eng_image_size_get(void *data, void *image, int *w, int *h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   if (!image)
-     {
-       if (w) *w = 0;
-       if (h) *h = 0;
-     }
-   else
-     {
-       Evas_Cairo_Image *im;
-
-       im = image;
-       if (w) *w = im->im->image->w;
-       if (h) *h = im->im->image->h;
-     }
-}
-
-static void *
-eng_image_size_set(void *data, void *image, int w, int h)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   return image;
-}
-
-static void *
-eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   return image;
-}
-
-static void *
-eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   *image_data = NULL;
-   return image;
-}
-
-static void *
-eng_image_data_put(void *data, void *image, DATA32 *image_data)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   return image;
-}
-
-static void
-eng_image_data_preload_request(void *data, void *image, const void *target)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   return image;
-}
-
-static void
-eng_image_data_preload_cancel(void *data, void *image, const void *target)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   return image;
-}
-
-static void *
-eng_image_alpha_set(void *data, void *image, int has_alpha)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   return image;
-}
-
-static int
-eng_image_alpha_get(void *data, void *image)
-{
-   Render_Engine *re;
-   Evas_Cairo_Image *im;
-
-   re = (Render_Engine *)data;
-   if (!image) return 0;
-
-   im = image;
-   if (im->im->cache_entry.flags.alpha) return 1;
-   return 0;
-}
-
-static void *
-eng_image_border_set(void *data, void *image, int l, int r, int t, int b)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   return image;
-}
-
-static void
-eng_image_border_get(void *data, void *image, int *l, int *r, int *t, int *b)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   return;
-}
-
-static void
-eng_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth)
-{
-   Render_Engine *re;
-   Evas_Cairo_Context *ctxt;
-   Evas_Cairo_Image *im;
-   DATA32 *pix;
-
-   re = (Render_Engine *)data;
-   ctxt = (Evas_Cairo_Context *)context;
-   if (!image) return;
-
-   im = image;
-   evas_common_load_image_data_from_file(im->im);
-   pix = im->im->image->data;
-   if (pix)
-     {
-       if (!im->surface)
-         {
-            im->mulpix = malloc(im->im->image->w * im->im->image->h * sizeof(DATA32));
-            if (im->mulpix)
-              {
-                 int i, n;
-                 DATA32 *p;
-
-                 n = im->im->image->w * im->im->image->h;
-                 p = im->mulpix;
-                 for (i = 0; i < n; i++)
-                   {
-                      int a;
-
-                      a = A_VAL(pix);
-                      R_VAL(p) = (R_VAL(pix) * a) / 255;
-                      G_VAL(p) = (G_VAL(pix) * a) / 255;
-                      B_VAL(p) = (B_VAL(pix) * a) / 255;
-                      A_VAL(p) = a;
-                      p++;
-                      pix++;
-                   }
-                 im->surface = cairo_image_surface_create_for_data(im->mulpix,
-                                                                   CAIRO_FORMAT_ARGB32,
-                                                                   im->im->image->w,
-                                                                   im->im->image->h,
-                                                                   0);
-                 im->pattern = cairo_pattern_create_for_surface(im->surface);
-              }
-         }
-
-       if (smooth)
-         cairo_pattern_set_filter(im->pattern, CAIRO_FILTER_BILINEAR);
-       else
-         cairo_pattern_set_filter(im->pattern, CAIRO_FILTER_NEAREST);
-       cairo_save(ctxt->cairo);
-       cairo_translate(ctxt->cairo, dst_x, dst_y);
-       cairo_scale(ctxt->cairo,
-                   (double)src_w / (double)dst_w,
-                   (double)src_h / (double)dst_h);
-       cairo_move_to(ctxt->cairo, 0, 0);
-       //     cairo_set_rgb_color(re->win->cairo,
-       //                        (double)(R_VAL(((RGBA_Draw_Context *)context)->col.col)) / 255.0,
-       //                        (double)(R_VAL(((RGBA_Draw_Context *)context)->col.col)) / 255.0,
-       //                        (double)(R_VAL(((RGBA_Draw_Context *)context)->col.col)) / 255.0);
-       //     cairo_set_alpha(re->win->cairo,
-       //                   (double)(A_VAL(((RGBA_Draw_Context *)context)->col.col)) / 255.0);
-       cairo_set_source_surface(ctxt->cairo,
-                                im->surface,
-                                im->im->image->w,
-                                im->im->image->h);
-       cairo_paint(ctxt->cairo);
-       cairo_restore(ctxt->cairo);
-     }
-}
-
-static char *
-eng_image_comment_get(void *data, void *image, char *key)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   return NULL;
-}
-
-static char *
-eng_image_format_get(void *data, void *image)
-{
-   Render_Engine *re;
-
-   /* FIXME */
-   re = (Render_Engine *)data;
-   return NULL;
-}
-
-static void
-eng_image_colorspace_set(void *data, void *image, int cspace)
-{
-}
-
-static int
-eng_image_colorspace_get(void *data, void *image)
-{
-   return EVAS_COLORSPACE_ARGB8888;
-}
-
-static void
-eng_image_native_set(void *data, void *image, void *native)
-{
-}
-
-static void *
-eng_image_native_get(void *data, void *image)
-{
-   return NULL;
-}
-
-static void
-eng_image_cache_flush(void *data)
-{
-   Render_Engine *re;
-   int tmp_size;
-
-   re = (Render_Engine *)data;
-   tmp_size = evas_common_image_get_cache();
-   evas_common_image_set_cache(0);
-   evas_common_image_set_cache(tmp_size);
-}
-
-static void
-eng_image_cache_set(void *data, int bytes)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   evas_common_image_set_cache(bytes);
-}
-
-static int
-eng_image_cache_get(void *data)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   return evas_common_image_get_cache();
-}
-
-static void
-eng_image_scale_hint_set(void *data __UNUSED__, void *image, int hint)
-{
-}
-
-static int
-eng_image_scale_hint_get(void *data __UNUSED__, void *image)
-{
-   return EVAS_IMAGE_SCALE_HINT_NONE;
-}
-
-static void *
-eng_font_load(void *data, char *name, int size)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return NULL;
-}
-
-static void *
-eng_font_memory_load(void *data, char *name, int size, const void *fdata, int fdata_size)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return NULL;
-}
-
-static void *
-eng_font_add(void *data, void *font, char *name, int size)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return NULL;
-}
-
-static void *
-eng_font_memory_add(void *data, void *font, char *name, int size, const void *fdata, int fdata_size)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return NULL;
-}
-
-static void
-eng_font_free(void *data, void *font)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-}
-
-static int
-eng_font_ascent_get(void *data, void *font)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static int
-eng_font_descent_get(void *data, void *font)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static int
-eng_font_max_ascent_get(void *data, void *font)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static int
-eng_font_max_descent_get(void *data, void *font)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static void
-eng_font_string_size_get(void *data, void *font, char *text, int *w, int *h)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-}
-
-static int
-eng_font_inset_get(void *data, void *font, const Evas_Text_Props *intl_props)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static int
-eng_font_h_advance_get(void *data, void *font, char *text)
-{
-   Render_Engine *re;
-   int h, v;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static int
-eng_font_v_advance_get(void *data, void *font, char *text)
-{
-   Render_Engine *re;
-   int h, v;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static int
-eng_font_char_coords_get(void *data, void *font, char *text, int pos, int *cx, int *cy, int *cw, int *ch)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static int
-eng_font_pen_coords_get(void *data, void *font, char *text, int pos, int *cpen_x, int *cy, int *cadv, int *ch)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-
-static Eina_Bool
-eng_font_text_props_info_create(void *data __UNUSED__, void *font, Eina_Unicode *text, Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return EINA_TRUE;
-}
-
-static int
-eng_font_char_at_coords_get(void *data, void *font, char *text, int x, int y, int *cx, int *cy, int *cw, int *ch)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static void
-eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, char *text)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-}
-
-static void
-eng_font_cache_flush(void *data)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-}
-
-static void
-eng_font_cache_set(void *data, int bytes)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-}
-
-static int
-eng_font_cache_get(void *data)
-{
-   Render_Engine *re;
-
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-   return 0;
-}
-
-static void
-eng_font_hinting_set(void *data, void *font, int hinting)
-{
-   Render_Engine *re;
-   
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-}
-
-static int
-eng_font_hinting_can_hint(void *data, int hinting)
-{
-   Render_Engine *re;
-   
-   /* FIXME, use cairo font subsystem */
-   re = (Render_Engine *)data;
-}
-
-static int
-eng_font_last_up_to_pos(void *data __UNUSED__, void *font, const char *text, int x, int y)
-{
-   return evas_common_font_query_last_up_to_pos(font, text, x, y);
-}
-
-static Eina_Bool
-eng_canvas_alpha_get(void *data, void *context)
-{
-   return EINA_FALSE;
-}
-
-static int
-module_open(Evas_Module *em)
-{
-   if (!em) return 0;
-   _evas_engine_cairo_X11_log_dom = eina_log_domain_register
-     ("evas-cairo_x11", EVAS_DEFAULT_LOG_COLOR);
-   if (_evas_engine_cairo_X11_log_dom < 0)
-     {
-        EINA_LOG_ERR("Can not create a module log domain.");
-        return 0;
-     }
-   em->functions = (void *)(&eng_func);
-   return 1;
-}
-
-static void
-module_close(Evas_Module *em)
-{
-  eina_log_domain_unregister(_evas_engine_cairo_X11_log_dom);
-}
-
-static Evas_Module_Api evas_modapi =
-{
-   EVAS_MODULE_API_VERSION,
-   "cairo_x11",
-   "none",
-   {
-     module_open,
-     module_close
-   }
-};
-
-EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, cairo_x11);
-
-#ifndef EVAS_STATIC_BUILD_CAIRO_X11
-EVAS_EINA_MODULE_DEFINE(engine, cairo_x11);
-#endif
diff --git a/src/modules/engines/cairo_x11/evas_engine.h b/src/modules/engines/cairo_x11/evas_engine.h
deleted file mode 100644 (file)
index a454af8..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef EVAS_ENGINE_H
-#define EVAS_ENGINE_H
-#include "evas_common.h"
-#include "evas_cairo_common.h"
-
-extern int _evas_engine_cairo_X11_log_dom ;
-
-#ifdef ERR
-# undef ERR
-#endif
-#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_cairo_X11_log_dom, __VA_ARGS__)
-
-#ifdef DBG
-# undef DBG
-#endif
-#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_cairo_X11_log_dom, __VA_ARGS__)
-
-#ifdef INF
-# undef INF
-#endif
-#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_cairo_X11_log_dom, __VA_ARGS__)
-
-#ifdef WRN
-# undef WRN
-#endif
-#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_cairo_X11_log_dom, __VA_ARGS__)
-
-#ifdef CRIT
-# undef CRIT
-#endif
-#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_cairo_X11_log_dom, __VA_ARGS__)
-
-
-typedef struct _Evas_Cairo_X11_Window Evas_Cairo_X11_Window;
-
-struct _Evas_Cairo_X11_Window
-{
-   Display         *disp;
-   Window           win;
-   int              w, h;
-   int              screen;
-   Visual          *visual;
-   Colormap         colormap;
-   int              depth;
-   cairo_surface_t *surface;
-
-   struct {
-      int redraw : 1;
-      int x1, y1, x2, y2;
-   } draw;
-};
-
-Evas_Cairo_X11_Window *
-  evas_engine_cairo_x11_window_new(Display *disp,
-                                  Window   win,
-                                  int      screen,
-                                  Visual  *vis,
-                                  Colormap cmap,
-                                  int      depth,
-                                  int      w,
-                                  int      h);
-void
-  evas_engine_cairo_x11_window_free(Evas_Cairo_X11_Window *cw);
-void
-  evas_engine_cairo_x11_window_use(Evas_Cairo_X11_Window *cw);
-void
-  evas_engine_cairo_x11_window_size_set(Evas_Cairo_X11_Window *cw, int w, int h);
-
-#endif
diff --git a/src/modules/engines/cairo_x11/evas_x_main.c b/src/modules/engines/cairo_x11/evas_x_main.c
deleted file mode 100644 (file)
index ae2cd82..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#include <X11/Xlib.h>
-#include "evas_common.h"
-#include "evas_private.h"
-#include "evas_engine.h"
-#include "Evas_Engine_Cairo_X11.h"
-#include "evas_cairo_common.h"
-
-static Evas_Cairo_X11_Window *_evas_cairo_x11_window = NULL;
-
-Evas_Cairo_X11_Window *
-evas_engine_cairo_x11_window_new(Display *disp,
-                                Window   win,
-                                int      screen,
-                                Visual  *vis,
-                                Colormap cmap,
-                                int      depth,
-                                int      w,
-                                int      h)
-{
-   Evas_Cairo_X11_Window *cw;
-
-   cw = calloc(1, sizeof(Evas_Cairo_X11_Window));
-   if (!cw) return NULL;
-   cw->disp = disp;
-   cw->win = win;
-   cw->screen = screen;
-   cw->visual = vis;
-   cw->colormap = cmap;
-   cw->depth = depth;
-   cw->surface = cairo_xlib_surface_create(disp, win, vis, w, h);
-   return cw;
-}
-
-void
-evas_engine_cairo_x11_window_free(Evas_Cairo_X11_Window *cw)
-{
-   if (cw == _evas_cairo_x11_window) _evas_cairo_x11_window = NULL;
-   cairo_surface_destroy(cw->surface);
-   free(cw);
-}
-
-void
-evas_engine_cairo_x11_window_use(Evas_Cairo_X11_Window *cw)
-{
-   if (_evas_cairo_x11_window != cw)
-     {
-       _evas_cairo_x11_window = cw;
-     }
-}
-
-void
-evas_engine_cairo_x11_window_size_set(Evas_Cairo_X11_Window *cw, int w, int h)
-{
-   cairo_xlib_surface_set_size(cw->surface, w, h);
-}
diff --git a/src/modules/engines/direct3d/.cvsignore b/src/modules/engines/direct3d/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index 6b64ef5..cdbfd52 100644 (file)
@@ -8,6 +8,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/modules/engines \
 @EINA_CFLAGS@ \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @evas_engine_direct3d_cflags@
 
 if BUILD_ENGINE_DIRECT3D
index 2ed59bc..f7722d8 100644 (file)
@@ -321,10 +321,11 @@ eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h)
 }
 
 static void *
-eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
+eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, int *err)
 {
    Render_Engine *re = (Render_Engine *)data;
    evas_direct3d_image_data_get(re->d3d, image, to_write, image_data);
+   if (err) *err = EVAS_LOAD_ERROR_NONE;
    return image;
 }
 
@@ -388,7 +389,7 @@ eng_image_scale_hint_get(void *data __UNUSED__, void *image)
 }
 
 static void
-eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, const Eina_Unicode *text, const Evas_Text_Props *intl_props)
+eng_font_draw(void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w, int h, int ow, int oh, const Evas_Text_Props *intl_props)
 {
    Render_Engine *re = (Render_Engine *)data;
        RGBA_Image im;
@@ -402,7 +403,7 @@ eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y
       evas_direct3d_font_texture_new,
       evas_direct3d_font_texture_free,
       evas_direct3d_font_texture_draw);
-   evas_common_font_draw(&im, context, font, x, y, text, intl_props);
+   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);
 }
 
index fae87da..5b00166 100644 (file)
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib/include \
 -I$(top_srcdir)/src/modules/engines \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @evas_engine_directfb_cflags@
 
index 4f960cd..12e080a 100644 (file)
@@ -1037,7 +1037,7 @@ evas_engine_dfb_output_idle_flush(void *data)
  * memory.
  */
 static void
-evas_engine_dfb_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Eina_Unicode *text, const Evas_Text_Props *intl_props)
+evas_engine_dfb_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *intl_props)
 {
    DirectFB_Engine_Image_Entry *eim = surface;
    IDirectFBSurface *screen;
@@ -1049,7 +1049,7 @@ evas_engine_dfb_font_draw(void *data, void *context, void *surface, void *font,
    if (!_dfb_lock_and_sync_image(screen, im, DSLF_READ | DSLF_WRITE))
      return;
 
-   evas_common_font_draw(im, context, font, x, y, text, intl_props);
+   evas_common_font_draw(im, context, font, x, y, intl_props);
    evas_common_cpu_end_opt();
 
    im->image.data = NULL;
diff --git a/src/modules/engines/fb/.cvsignore b/src/modules/engines/fb/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index 47527f7..55127bb 100644 (file)
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib/include \
 -I$(top_srcdir)/src/modules/engines \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @evas_engine_fb_cflags@
 
diff --git a/src/modules/engines/gl_common/.cvsignore b/src/modules/engines/gl_common/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index 4bde365..2bc7c95 100644 (file)
@@ -6,8 +6,9 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
-@EINA_CFLAGS@ \
-@GL_EET_CFLAGS@
+@PIXMAN_CFLAGS@ \
+@GL_EET_CFLAGS@ \
+@EINA_CFLAGS@
 
 if BUILD_ENGINE_GL_COMMON
 
@@ -23,6 +24,7 @@ evas_gl_image.c \
 evas_gl_font.c \
 evas_gl_polygon.c \
 evas_gl_line.c \
+evas_gl_filter.c \
 shader/rect_frag.h \
 shader/rect_frag_bin_s3c6410.h \
 shader/rect_vert.h \
@@ -62,7 +64,23 @@ shader/tex_vert_bin_s3c6410.h \
 shader/tex_nomul_frag.h \
 shader/tex_nomul_frag_bin_s3c6410.h \
 shader/tex_nomul_vert.h \
-shader/tex_nomul_vert_bin_s3c6410.h
+shader/tex_nomul_vert_bin_s3c6410.h \
+shader/filter_invert.h \
+shader/filter_invert_nomul.h \
+shader/filter_invert_bgra.h \
+shader/filter_invert_bgra_nomul.h \
+shader/filter_sepia.h \
+shader/filter_sepia_nomul.h \
+shader/filter_sepia_bgra.h \
+shader/filter_sepia_bgra_nomul.h \
+shader/filter_greyscale.h \
+shader/filter_greyscale_nomul.h \
+shader/filter_greyscale_bgra.h \
+shader/filter_greyscale_bgra_nomul.h \
+shader/filter_blur.h \
+shader/filter_blur_nomul.h \
+shader/filter_blur_bgra.h \
+shader/filter_blur_bgra_nomul.h
 
 libevas_engine_gl_common_la_LIBADD = @EINA_LIBS@ @GL_EET_LIBS@ @evas_engine_gl_common_libs@ @dlopen_libs@
 endif
@@ -97,4 +115,21 @@ shader/tex_frag.shd \
 shader/tex_frag_s3c6410.asm \
 shader/tex_vert.shd \
 shader/tex_nomul_frag.shd \
-shader/tex_nomul_vert.shd
+shader/tex_nomul_vert.shd \
+shader/filter_invert.shd \
+shader/filter_invert_nomul.shd \
+shader/filter_invert_bgra.shd \
+shader/filter_invert_bgra_nomul.shd \
+shader/filter_greyscale.shd \
+shader/filter_greyscale_nomul.shd \
+shader/filter_greyscale_bgra.shd \
+shader/filter_greyscale_bgra_nomul.shd \
+shader/filter_sepia.shd \
+shader/filter_sepia_nomul.shd \
+shader/filter_sepia_bgra.shd \
+shader/filter_sepia_bgra_nomul.shd \
+shader/filter_blur.shd \
+shader/filter_blur_nomul.shd \
+shader/filter_blur_bgra.shd \
+shader/filter_blur_bgra_nomul.shd
+
index 4e2205a..04007f7 100644 (file)
 #include <unistd.h>
 #include <Eet.h>
 
-#ifdef BUILD_ENGINE_GL_GLEW
-# include <GL/glew.h>
-#else
-# define GL_GLEXT_PROTOTYPES
-#endif
+#define GL_GLEXT_PROTOTYPES
 
 #ifdef BUILD_ENGINE_GL_QUARTZ
 # include <OpenGL/gl.h>
 #ifndef GL_PROGRAM_BINARY_FORMATS
 # define GL_PROGRAM_BINARY_FORMATS 0x87FF
 #endif
+#ifndef GL_PROGRAM_BINARY_RETRIEVABLE_HINT
+# define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
+#endif
 
 #define SHAD_VERTEX 0
 #define SHAD_COLOR  1
@@ -199,7 +198,8 @@ struct _Evas_GL_Shared
       Eina_List       *atlas[33][3];
    } tex;
    
-   Eina_Hash          *native_hash;
+   Eina_Hash          *native_pm_hash;
+   Eina_Hash          *native_tex_hash;
    
    struct {
       Evas_GL_Program  rect;
@@ -210,6 +210,18 @@ struct _Evas_GL_Shared
       Evas_GL_Program  img_mask;
       Evas_GL_Program  yuv,            yuv_nomul;
       Evas_GL_Program  tex,            tex_nomul;
+
+      Evas_GL_Program  filter_invert,         filter_invert_nomul;
+      Evas_GL_Program  filter_invert_bgra,    filter_invert_bgra_nomul;
+      Evas_GL_Program  filter_greyscale,      filter_greyscale_nomul;
+      Evas_GL_Program  filter_greyscale_bgra, filter_greyscale_bgra_nomul;
+      Evas_GL_Program  filter_sepia,          filter_sepia_nomul;
+      Evas_GL_Program  filter_sepia_bgra,     filter_sepia_bgra_nomul;
+#if 0
+      Evas_GL_Program  filter_blur_vert;
+      Evas_GL_Program  filter_blur,           filter_blur_nomul;
+      Evas_GL_Program  filter_blur_bgra,      filter_blur_bgra_nomul;
+#endif
    } shader;
    int references;
    int w, h;
@@ -299,6 +311,9 @@ struct _Evas_Engine_GL_Context
    Eina_Bool havestuff : 1;
    
    Evas_GL_Image *def_surface;
+
+   /* If this is set: Force drawing with a particular filter */
+   GLuint      filter_prog;
    
 #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
 // FIXME: hack. expose egl display to gl core for egl image sec extn.   
@@ -371,6 +386,8 @@ struct _Evas_GL_Image
    int scale_hint, content_hint;
    int csize;
    
+   Eina_List       *filtered;
+
    unsigned char    dirty : 1;
    unsigned char    cached : 1;
    unsigned char    alpha : 1;
@@ -419,6 +436,27 @@ extern Evas_GL_Program_Source shader_tex_vert_src;
 extern Evas_GL_Program_Source shader_tex_nomul_frag_src;
 extern Evas_GL_Program_Source shader_tex_nomul_vert_src;
 
+extern Evas_GL_Program_Source shader_filter_invert_frag_src;
+extern Evas_GL_Program_Source shader_filter_invert_nomul_frag_src;
+extern Evas_GL_Program_Source shader_filter_invert_bgra_frag_src;
+extern Evas_GL_Program_Source shader_filter_invert_bgra_nomul_frag_src;
+extern Evas_GL_Program_Source shader_filter_sepia_frag_src;
+extern Evas_GL_Program_Source shader_filter_sepia_nomul_frag_src;
+extern Evas_GL_Program_Source shader_filter_sepia_bgra_frag_src;
+extern Evas_GL_Program_Source shader_filter_sepia_bgra_nomul_frag_src;
+extern Evas_GL_Program_Source shader_filter_greyscale_frag_src;
+extern Evas_GL_Program_Source shader_filter_greyscale_nomul_frag_src;
+extern Evas_GL_Program_Source shader_filter_greyscale_bgra_frag_src;
+extern Evas_GL_Program_Source shader_filter_greyscale_bgra_nomul_frag_src;
+#if 0
+/* blur (annoyingly) needs (aka is faster with) a vertex shader */
+extern Evas_GL_Program_Source shader_filter_blur_vert_src;
+extern Evas_GL_Program_Source shader_filter_blur_frag_src;
+extern Evas_GL_Program_Source shader_filter_blur_nomul_frag_src;
+extern Evas_GL_Program_Source shader_filter_blur_bgra_frag_src;
+extern Evas_GL_Program_Source shader_filter_blur_bgra_nomul_frag_src;
+#endif
+
 void glerr(int err, const char *file, const char *func, int line, const char *op);
  
 Evas_Engine_GL_Context  *evas_gl_common_context_new(void);
@@ -449,6 +487,8 @@ void              evas_gl_common_context_image_mask_push(Evas_Engine_GL_Context
                                                     int x, int y, int w, int h,
                                                     int r, int g, int b, int a,
                                                     Eina_Bool smooth);
+
+
 void              evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc,
                                                    Evas_GL_Texture *tex,
                                                    double sx, double sy, double sw, double sh,
@@ -506,6 +546,7 @@ void              evas_gl_common_image_cache_flush(Evas_Engine_GL_Context *gc);
 void              evas_gl_common_image_free(Evas_GL_Image *im);
 Evas_GL_Image    *evas_gl_common_image_surface_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha);
 void              evas_gl_common_image_dirty(Evas_GL_Image *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
+void              evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im);
 void              evas_gl_common_image_map_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int npoints, RGBA_Map_Point *p, int smooth, int level);
 void              evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth);
 
@@ -519,12 +560,20 @@ void              evas_gl_common_poly_draw(Evas_Engine_GL_Context *gc, Evas_GL_P
 
 void              evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, int x1, int y1, int x2, int y2);
 
+#if 0 // filtering disabled
+void              evas_gl_common_filter_draw(Evas_Engine_GL_Context *context, Evas_GL_Image *im, Evas_Filter_Info *filter);
+Filtered_Image   *evas_gl_common_image_filtered_get(Evas_GL_Image *im, uint8_t *key, size_t keylen);
+Filtered_Image   *evas_gl_common_image_filtered_save(Evas_GL_Image *im, Evas_GL_Image *fimage, uint8_t *key, size_t keylen);
+void              evas_gl_common_image_filtered_free(Evas_GL_Image *im, Filtered_Image *);
+#endif
+
 extern void (*glsym_glGenFramebuffers)      (GLsizei a, GLuint *b);
 extern void (*glsym_glBindFramebuffer)      (GLenum a, GLuint b);
 extern void (*glsym_glFramebufferTexture2D) (GLenum a, GLenum b, GLenum c, GLuint d, GLint e);
 extern void (*glsym_glDeleteFramebuffers)   (GLsizei a, const GLuint *b);
 extern void (*glsym_glGetProgramBinary)     (GLuint a, GLsizei b, GLsizei *c, GLenum *d, void *e);
 extern void (*glsym_glProgramBinary)        (GLuint a, GLenum b, const void *c, GLint d);
+extern void (*glsym_glProgramParameteri)    (GLuint a, GLuint b, GLint d);
 
 #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
 extern void          *(*secsym_eglCreateImage)               (void *a, void *b, GLenum c, void *d, const int *e);
index 04ddf41..328d233 100644 (file)
@@ -13,6 +13,7 @@ void (*glsym_glFramebufferTexture2D) (GLenum a, GLenum b, GLenum c, GLuint d, GL
 void (*glsym_glDeleteFramebuffers)   (GLsizei a, const GLuint *b) = NULL;
 void (*glsym_glGetProgramBinary)     (GLuint a, GLsizei b, GLsizei *c, GLenum *d, void *e) = NULL;
 void (*glsym_glProgramBinary)        (GLuint a, GLenum b, const void *c, GLint d) = NULL;
+void (*glsym_glProgramParameteri)    (GLuint a, GLuint b, GLint d) = NULL;
 
 #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
 // just used for finding symbols :)
@@ -76,10 +77,16 @@ gl_symbols(void)
    FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinary", glsym_func_void);
    FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryEXT", glsym_func_void);
    FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryARB", glsym_func_void);
+   FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryOES", glsym_func_void);
 
    FINDSYM(glsym_glProgramBinary, "glProgramBinary", glsym_func_void);
    FINDSYM(glsym_glProgramBinary, "glProgramBinaryEXT", glsym_func_void);
    FINDSYM(glsym_glProgramBinary, "glProgramBinaryARB", glsym_func_void);
+   
+   FINDSYM(glsym_glProgramParameteri, "glProgramParameteri", glsym_func_void);
+   FINDSYM(glsym_glProgramParameteri, "glProgramParameteriEXT", glsym_func_void);
+   FINDSYM(glsym_glProgramParameteri, "glProgramParameteriARB", glsym_func_void);
+   
 #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
 #undef FINDSYM
 #define FINDSYM(dst, sym, typ) \
@@ -106,6 +113,24 @@ gl_symbols(void)
    FINDSYM(secsym_eglDestroyImage, "eglDestroyImageARB", secsym_func_uint);
    FINDSYM(secsym_eglDestroyImage, "eglDestroyImageKHR", secsym_func_uint);
    
+   FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinary", glsym_func_void);
+   FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryEXT", glsym_func_void);
+   FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryARB", glsym_func_void);
+   FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryOES", glsym_func_void);
+   FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryKHR", glsym_func_void);
+
+   FINDSYM(glsym_glProgramBinary, "glProgramBinary", glsym_func_void);
+   FINDSYM(glsym_glProgramBinary, "glProgramBinaryEXT", glsym_func_void);
+   FINDSYM(glsym_glProgramBinary, "glProgramBinaryARB", glsym_func_void);
+   FINDSYM(glsym_glProgramBinary, "glProgramBinaryOES", glsym_func_void);
+   FINDSYM(glsym_glProgramBinary, "glProgramBinaryKHR", glsym_func_void);
+   
+   FINDSYM(glsym_glProgramParameteri, "glProgramParameteri", glsym_func_void);
+   FINDSYM(glsym_glProgramParameteri, "glProgramParameteriEXT", glsym_func_void);
+   FINDSYM(glsym_glProgramParameteri, "glProgramParameteriARB", glsym_func_void);
+   FINDSYM(glsym_glProgramParameteri, "glProgramParameteriOES", glsym_func_void);
+   FINDSYM(glsym_glProgramParameteri, "glProgramParameteriKHR", glsym_func_void);
+   
    FINDSYM(secsym_glEGLImageTargetTexture2DOES, "glEGLImageTargetTexture2DOES", glsym_func_void);
    
    FINDSYM(secsym_eglMapImageSEC, "eglMapImageSEC", secsym_func_void_ptr);
@@ -481,7 +506,91 @@ _evas_gl_common_viewport_set(Evas_Engine_GL_Context *gc)
    glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.img_mask.prog, "mvp"), 1,
                       GL_FALSE, proj);
    GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUseProgram(gc->shared->shader.filter_invert.prog);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_invert.prog, "mvp"), 1,
+                      GL_FALSE, proj);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUseProgram(gc->shared->shader.filter_invert_nomul.prog);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_invert_nomul.prog, "mvp"), 1,
+                      GL_FALSE, proj);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUseProgram(gc->shared->shader.filter_invert_bgra.prog);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_invert_bgra.prog, "mvp"), 1,
+                      GL_FALSE, proj);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUseProgram(gc->shared->shader.filter_invert_bgra_nomul.prog);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_invert_bgra_nomul.prog, "mvp"), 1,
+                      GL_FALSE, proj);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
 
+   glUseProgram(gc->shared->shader.filter_greyscale.prog);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_greyscale.prog, "mvp"), 1,
+                      GL_FALSE, proj);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUseProgram(gc->shared->shader.filter_greyscale_nomul.prog);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_greyscale_nomul.prog, "mvp"), 1,
+                      GL_FALSE, proj);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUseProgram(gc->shared->shader.filter_greyscale_bgra.prog);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_greyscale_bgra.prog, "mvp"), 1,
+                      GL_FALSE, proj);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUseProgram(gc->shared->shader.filter_greyscale_bgra_nomul.prog);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_greyscale_bgra_nomul.prog, "mvp"), 1,
+                      GL_FALSE, proj);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+
+   glUseProgram(gc->shared->shader.filter_sepia.prog);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_sepia.prog, "mvp"), 1,
+                      GL_FALSE, proj);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUseProgram(gc->shared->shader.filter_sepia_nomul.prog);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_sepia_nomul.prog, "mvp"), 1,
+                      GL_FALSE, proj);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUseProgram(gc->shared->shader.filter_sepia_bgra.prog);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_sepia_bgra.prog, "mvp"), 1,
+                      GL_FALSE, proj);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUseProgram(gc->shared->shader.filter_sepia_bgra_nomul.prog);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_sepia_bgra_nomul.prog, "mvp"), 1,
+                      GL_FALSE, proj);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+
+#if 0
+   glUseProgram(gc->shared->shader.filter_blur_bgra_nomul.prog);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_blur_bgra_nomul.prog, "mvp"), 1,
+                      GL_FALSE, proj);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUseProgram(gc->shared->shader.filter_blur_bgra_nomul.prog);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_blur_bgra_nomul.prog, "mvp"), 1,
+                      GL_FALSE, proj);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUseProgram(gc->shared->shader.filter_blur_bgra_nomul.prog);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_blur_bgra_nomul.prog, "mvp"), 1,
+                      GL_FALSE, proj);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUseProgram(gc->shared->shader.filter_blur_bgra_nomul.prog);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+   glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.filter_blur_bgra_nomul.prog, "mvp"), 1,
+                      GL_FALSE, proj);
+   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+#endif
 
 
    glUseProgram(gc->pipe[0].shader.cur_prog);
@@ -571,10 +680,12 @@ evas_gl_common_context_new(void)
                       &(shared->info.max_texture_units));
         glGetIntegerv(GL_MAX_TEXTURE_SIZE,
                       &(shared->info.max_texture_size));
-        shared->info.max_vertex_elements = 6 * 10000;
+        shared->info.max_vertex_elements = 6 * 100000;
 #ifdef GL_MAX_ELEMENTS_VERTICES
+/* only applies to glDrawRangeElements. don't really need to get it.
         glGetIntegerv(GL_MAX_ELEMENTS_VERTICES,
                       &(shared->info.max_vertex_elements));
+ */
 #endif
         s = getenv("EVAS_GL_VERTEX_MAX");
         if (s) shared->info.max_vertex_elements = atoi(s);
@@ -620,6 +731,11 @@ evas_gl_common_context_new(void)
         GETENVOPT("EVAS_GL_ATLAS_MAX_W", atlas.max_w, 0, MAX_ATLAS_W);
         GETENVOPT("EVAS_GL_ATLAS_MAX_H", atlas.max_h, 0, MAX_ATLAS_H);
         GETENVOPT("EVAS_GL_ATLAS_SLOT_SIZE", atlas.slot_size, MIN_ATLAS_SLOT, MAX_ATLAS_SLOT);
+        s = (const char *)getenv("EVAS_GL_GET_PROGRAM_BINARY");
+        if (s)
+          {
+             if (atoi(s) == 0) shared->info.bin_program = 0;
+          }
 
         if (getenv("EVAS_GL_INFO"))
            fprintf(stderr,
@@ -634,6 +750,7 @@ evas_gl_common_context_new(void)
                    "\n"
                    "(can set EVAS_GL_VERTEX_MAX  EVAS_GL_NO_MAP_IMAGE_SEC  EVAS_GL_INFO  EVAS_GL_MEMINFO )\n"
                    "\n"
+                   "EVAS_GL_GET_PROGRAM_BINARY: %i\n"
                    "EVAS_GL_CUTOUT_MAX: %i\n"
                    "EVAS_GL_PIPES_MAX: %i\n"
                    "EVAS_GL_ATLAS_ALLOC_SIZE: %i\n"
@@ -650,6 +767,7 @@ evas_gl_common_context_new(void)
                    (int)shared->info.sec_image_map,
                    (int)shared->info.max_vertex_elements,
                    
+                   (int)shared->info.bin_program,
                    (int)shared->info.tune.cutout.max,
                    (int)shared->info.tune.pipes.max,
                    (int)shared->info.tune.atlas.max_alloc_size,
@@ -722,7 +840,6 @@ evas_gl_common_context_new(void)
 
 
 
-        
         glUseProgram(gc->pipe[0].shader.cur_prog);
         GLERR(__FUNCTION__, __FILE__, __LINE__, "");
         
@@ -735,7 +852,8 @@ evas_gl_common_context_new(void)
         // GLint loc = glGetUniformLocation(prog, "tex");
         // glUniform1iv(loc, 8, texes);
 
-        shared->native_hash = eina_hash_int32_new(NULL);
+        shared->native_pm_hash  = eina_hash_int32_new(NULL);
+        shared->native_tex_hash = eina_hash_int32_new(NULL);
      }
    gc->shared = shared;
    gc->shared->references++;
@@ -789,7 +907,9 @@ evas_gl_common_context_free(Evas_Engine_GL_Context *gc)
         evas_gl_common_shader_program_shutdown(&(gc->shared->shader.yuv_nomul));
         evas_gl_common_shader_program_shutdown(&(gc->shared->shader.tex));
         evas_gl_common_shader_program_shutdown(&(gc->shared->shader.tex_nomul));
-        
+
+       evas_gl_common_shader_program_shutdown(&(gc->shared->shader.filter_invert));
+
         while (gc->shared->images)
           {
              evas_gl_common_image_free(gc->shared->images->data);
@@ -805,7 +925,8 @@ evas_gl_common_context_free(Evas_Engine_GL_Context *gc)
                      evas_gl_texture_pool_empty(pt);
                }
           }
-        eina_hash_free(gc->shared->native_hash);
+        eina_hash_free(gc->shared->native_pm_hash);
+        eina_hash_free(gc->shared->native_tex_hash);
         free(gc->shared);
         shared = NULL;
      }
@@ -818,7 +939,7 @@ evas_gl_common_context_use(Evas_Engine_GL_Context *gc)
 {
    if (_evas_gl_common_context == gc) return;
    _evas_gl_common_context = gc;
-   _evas_gl_common_viewport_set(gc);
+   if (gc) _evas_gl_common_viewport_set(gc);
 }
 
 void
@@ -920,15 +1041,12 @@ evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc)
    GLERR(__FUNCTION__, __FILE__, __LINE__, "");
    glUseProgram(gc->pipe[0].shader.cur_prog);
    GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-
-
-
+   
    glActiveTexture(GL_TEXTURE0);
    GLERR(__FUNCTION__, __FILE__, __LINE__, "");
    glBindTexture(GL_TEXTURE_2D, gc->pipe[0].shader.cur_tex);
    GLERR(__FUNCTION__, __FILE__, __LINE__, "");
 
-
    _evas_gl_common_viewport_set(gc);
 }
 
@@ -1199,7 +1317,7 @@ evas_gl_common_context_rectangle_push(Evas_Engine_GL_Context *gc,
 
    if (a < 255) blend = 1;
    if (gc->dc->render_op == EVAS_RENDER_COPY) blend = 0;
-
+   
 again:
    vertex_array_size_check(gc, gc->state.top_pipe, 6);
    pn = gc->state.top_pipe;
@@ -1337,8 +1455,12 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
 
    if (!tex->alpha) blend = 0;
    if (a < 255) blend = 1;
-   
-   if (tex_only)
+
+   if (gc->filter_prog)
+     {
+        prog = gc->filter_prog;
+     }
+   else if (tex_only)
      {
         if (tex->pt->dyn.img)
           {
@@ -1563,7 +1685,6 @@ again:
      }
 }
 
-
 void
 evas_gl_common_context_image_mask_push(Evas_Engine_GL_Context *gc,
                                   Evas_GL_Texture *tex,
@@ -1764,21 +1885,20 @@ again:
      }
    else
      {
-            printf("B:\n");
         tx1 = ((double)(tex->x) + sx) / (double)tex->pt->w;
         ty1 = ((double)(tex->y) + sy) / (double)tex->pt->h;
         tx2 = ((double)(tex->x) + sx + sw) / (double)tex->pt->w;
         ty2 = ((double)(tex->y) + sy + sh) / (double)tex->pt->h;
 
         txm1 = (texm->x + sxm) / (double)texm->pt->w;
-        tym1 = (texm->y + sy) / (double)texm->pt->h;
+        tym1 = (texm->y + sym) / (double)texm->pt->h;
         txm2 = (texm->x + sxm + swm) / (double)texm->pt->w;
-        tym2 = (texm->y + sy + sh) / (double)texm->pt->h;
+        tym2 = (texm->y + sym + shm) / (double)texm->pt->h;
      }
-  printf(" %3.6lf %3.6lf %3.6lf %3.6lf\n",sx,sy,sw,sh);
-  printf("m%3.6lf %3.6lf %3.6lf %3.6lf\n",sxm,sym,swm,shm);
-  printf(" %3f %3f %3f %3f\n",tx1,ty1,tx2,ty2);
-  printf("m%3f %3f %3f %3f\n",txm1,tym1,txm2,tym2);
// printf(" %3.6lf %3.6lf %3.6lf %3.6lf\n",sx,sy,sw,sh);
//  printf("m%3.6lf %3.6lf %3.6lf %3.6lf\n",sxm,sym,swm,shm);
// printf(" %3f %3f %3f %3f\n",tx1,ty1,tx2,ty2);
// printf("m%3f %3f %3f %3f\n",txm1,tym1,txm2,tym2);
 
    PUSH_VERTEX(pn, x    , y    , 0);
    PUSH_VERTEX(pn, x + w, y    , 0);
@@ -2182,7 +2302,8 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
    if (a < 255) blend = 1;
    if (npoints != 4)
      {
-        // FIXME: nash - you didnt fix this for n points. its still all 4 point stuff!!! grrrr.
+        // FIXME: nash - you didn't fix this for n points. its still all
+        // 4 point stuff!!! grrrr.
         abort();
      }
    if ((A_VAL(&(p[0].col)) < 0xff) || (A_VAL(&(p[1].col)) < 0xff) ||
@@ -2274,6 +2395,41 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
           }
      }
    
+   x = w = (p[points[0]].x >> FP);
+   y = h = (p[points[0]].y >> FP);
+   for (i = 0; i < 4; i++)
+     {
+        tx[i] = ((double)(tex->x) + (((double)p[i].u) / FP1)) /
+          (double)tex->pt->w;
+        ty[i] = ((double)(tex->y) + (((double)p[i].v) / FP1)) / 
+          (double)tex->pt->h;
+        px = (p[points[i]].x >> FP);
+        if      (px < x) x = px;
+        else if (px > w) w = px;
+        py = (p[points[i]].y >> FP);
+        if      (py < y) y = py;
+        else if (py > h) h = py;
+        if (yuv)
+          {
+             t2x[i] = ((((double)p[i].u / 2) / FP1)) / (double)tex->ptu->w;
+             t2y[i] = ((((double)p[i].v / 2) / FP1)) / (double)tex->ptu->h;
+          }
+     }
+   w = w - x;
+   h = h - y;
+   
+   if (clip)
+     {
+        int nx = x, ny = y, nw = w, nh = h;
+        
+        RECTS_CLIP_TO_RECT(nx, ny, nw, nh, cx, cy, cw, ch);
+        if ((nx == x) && (ny == y) && (nw == w) && (nh == h))
+          {
+             clip = 0; cx = 0; cy = 0; cw = 0; ch = 0;
+          }
+        x = nx; y = nw; w = nw; h = nh;
+     }
+   
    if (!flat)
      {
         shader_array_flush(gc);
@@ -2466,29 +2622,6 @@ again:
      }
 #endif   
    
-   x = w = (p[points[0]].x >> FP);
-   y = h = (p[points[0]].y >> FP);
-   for (i = 0; i < 4; i++)
-     {
-        tx[i] = ((double)(tex->x) + (((double)p[i].u) / FP1)) /
-          (double)tex->pt->w;
-        ty[i] = ((double)(tex->y) + (((double)p[i].v) / FP1)) / 
-          (double)tex->pt->h;
-        px = (p[points[i]].x >> FP);
-        if      (px < x) x = px;
-        else if (px > w) w = py;
-        py = (p[points[i]].y >> FP);
-        if      (py < y) y = py;
-        else if (py > h) h = py;
-        if (yuv)
-          {
-             t2x[i] = ((((double)p[i].u / 2) / FP1)) / (double)tex->ptu->w;
-             t2y[i] = ((((double)p[i].v / 2) / FP1)) / (double)tex->ptu->h;
-          }
-     }
-   w = w - x;
-   h = h - y;
-   
    pipe_region_expand(gc, pn, x, y, w, h);
    
    pnum = gc->pipe[pn].array.num;
@@ -2499,8 +2632,12 @@ again:
 
    if ((tex->im) && (tex->im->native.data) && (!tex->im->native.yinvert))
      {
-        // FIXME: handle yinvert
-        ERR("not handling inverted y case for map");
+        for (i = 0; i < 4; i++)
+          {
+             ty[i] = 1.0 - ty[i];
+             if (yuv)
+                t2y[i] = 1.0 - t2y[i];
+          }
      }
    
    cmul = ARGB_JOIN(a, r, g, b);
@@ -2559,29 +2696,28 @@ evas_gl_common_context_flush(Evas_Engine_GL_Context *gc)
    shader_array_flush(gc);
 }
 
-//fix gl rot bug :  http://trac.enlightenment.org/e/changeset/58381
 static void
 scissor_rot(Evas_Engine_GL_Context *gc __UNUSED__,
             int rot, int gw, int gh, int cx, int cy, int cw, int ch)
 {
    switch (rot)
      {
-       case 0: // UP this way: ^
-         glScissor(cx, cy, cw, ch);
-         break;
-       case 90: // UP this way: <
-         glScissor(gh - (cy + ch), cx, ch, cw);
-         break;
-       case 180: // UP this way: v
-         glScissor(gw - (cx + cw), gh - (cy + ch), cw, ch);
-         break;
-       case 270: // UP this way: >
-         glScissor(cy, gw - (cx + cw), ch, cw);
-         break;
-       default: // assume up is up
-         glScissor(cx, cy, cw, ch);
-         break;
-    }
+      case 0: // UP this way: ^
+        glScissor(cx, cy, cw, ch);
+        break;
+      case 90: // UP this way: <
+        glScissor(gh - (cy + ch), cx, ch, cw);
+        break;
+      case 180: // UP this way: v
+        glScissor(gw - (cx + cw), gh - (cy + ch), cw, ch);
+        break;
+      case 270: // UP this way: >
+        glScissor(cy, gw - (cx + cw), ch, cw);
+        break;
+      default: // assume up is up
+        glScissor(cx, cy, cw, ch);
+        break;
+     }
 }
 
 static void
@@ -2626,13 +2762,11 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
                   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
                }
 #endif
-
              glActiveTexture(GL_TEXTURE0);
              GLERR(__FUNCTION__, __FILE__, __LINE__, "");
              glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_tex);
              GLERR(__FUNCTION__, __FILE__, __LINE__, "");
           }
-
         if (gc->pipe[i].array.im)
           {
 #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
@@ -2743,16 +2877,15 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
                   cy = gh - gc->pipe[i].shader.cy - gc->pipe[i].shader.ch;
                   if (fbo) cy = gc->pipe[i].shader.cy;
                   glEnable(GL_SCISSOR_TEST);
-
-                  if (!fbo) //fix gl rot bug :  http://trac.enlightenment.org/e/changeset/5838
-                     scissor_rot(gc, gc->rot, gw, gh,
+                  if (!fbo)
+                     scissor_rot(gc, gc->rot, gw, gh, 
                                  gc->pipe[i].shader.cx,
                                  cy,
                                  gc->pipe[i].shader.cw,
                                  gc->pipe[i].shader.ch);
                   else
-                    glScissor(gc->pipe[i].shader.cx, cy,
-                              gc->pipe[i].shader.cw, gc->pipe[i].shader.ch);
+                     glScissor(gc->pipe[i].shader.cx, cy,
+                               gc->pipe[i].shader.cw, gc->pipe[i].shader.ch);
                   setclip = 1;
                }
              else
@@ -2770,16 +2903,15 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
                {
                   cy = gh - gc->pipe[i].shader.cy - gc->pipe[i].shader.ch;
                   if (fbo) cy = gc->pipe[i].shader.cy;
-
-                  if (!fbo)  //fix gl rot bug :  http://trac.enlightenment.org/e/changeset/58381
-                     scissor_rot(gc, gc->rot, gw, gh,
+                  if (!fbo)
+                     scissor_rot(gc, gc->rot, gw, gh, 
                                  gc->pipe[i].shader.cx,
                                  cy,
                                  gc->pipe[i].shader.cw,
                                  gc->pipe[i].shader.ch);
                   else
-                    glScissor(gc->pipe[i].shader.cx, cy,
-                              gc->pipe[i].shader.cw, gc->pipe[i].shader.ch);
+                     glScissor(gc->pipe[i].shader.cx, cy,
+                               gc->pipe[i].shader.cw, gc->pipe[i].shader.ch);
                }
           }
 
@@ -2815,7 +2947,6 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
           {
             if (gc->pipe[i].array.use_texm)
               {
-                      printf("using tex m (%d)\n",gc->pipe[i].shader.cur_texm);
                  glEnableVertexAttribArray(SHAD_TEXM);
                   GLERR(__FUNCTION__, __FILE__, __LINE__, "");
                   glVertexAttribPointer(SHAD_TEXM, 2, GL_FLOAT, GL_FALSE, 0, gc->pipe[i].array.texm);
diff --git a/src/modules/engines/gl_common/evas_gl_filter.c b/src/modules/engines/gl_common/evas_gl_filter.c
new file mode 100644 (file)
index 0000000..a9d18d8
--- /dev/null
@@ -0,0 +1,181 @@
+#include "evas_gl_private.h"
+
+#if 0 // filtering disabled
+void
+evas_gl_common_filter_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, Evas_Filter_Info *filter)
+{
+   RGBA_Draw_Context *dc;
+   GLuint prog;
+   int r,g,b,a;
+   int nomul, bgra;
+
+   dc = gc->dc;
+
+   if (dc->mul.use)
+     {
+       a = (dc->mul.col >> 24) & 0xff;
+       r = (dc->mul.col >> 16) & 0xff;
+       g = (dc->mul.col >> 8 ) & 0xff;
+       b = (dc->mul.col      ) & 0xff;
+     }
+   else
+     {
+       r = g = b = a = 255;
+     }
+
+   nomul = (a == 255 && r == 255 && g == 255 && b == 255) ? 1 : 0;
+   bgra = (gc->shared->info.bgra) ? 1 : 0;
+
+   /* FIXME: This should so be a table */
+#if 0
+   if (filter->filter == EVAS_FILTER_BLUR)
+     {
+         if (bgra)
+          {
+             if (nomul)
+                prog = gc->shared->shader.filter_blur_bgra_nomul.prog;
+             else
+                prog = gc->shared->shader.filter_blur_bgra.prog;
+          }
+        else
+          {
+             if (a == 255 && r == 255 && g == 255 && b == 255)
+                prog = gc->shared->shader.filter_blur_nomul.prog;
+             else
+                prog = gc->shared->shader.filter_blur.prog;
+          }
+     }
+   else
+#endif
+     if (filter->filter == EVAS_FILTER_INVERT)
+     {
+        if (bgra)
+          {
+             if (nomul)
+                prog = gc->shared->shader.filter_invert_bgra_nomul.prog;
+             else
+                prog = gc->shared->shader.filter_invert_bgra.prog;
+          }
+        else
+          {
+             if (a == 255 && r == 255 && g == 255 && b == 255)
+                prog = gc->shared->shader.filter_invert_nomul.prog;
+             else
+                prog = gc->shared->shader.filter_invert.prog;
+          }
+     }
+   else if (filter->filter == EVAS_FILTER_SEPIA)
+     {
+        if (bgra)
+          {
+             if (nomul)
+                prog = gc->shared->shader.filter_sepia_bgra_nomul.prog;
+             else
+                prog = gc->shared->shader.filter_sepia_bgra.prog;
+          }
+        else
+          {
+             if (nomul)
+                prog = gc->shared->shader.filter_sepia_nomul.prog;
+             else
+                prog = gc->shared->shader.filter_sepia.prog;
+          }
+
+     }
+   else /*if (filter->filter == EVAS_FILTER_GREYSCALE)*/
+     {
+        printf("BGRA: %s  Nomul: %s\n",bgra?"true":"false",nomul?"nomul":"mul");
+        if (bgra)
+          {
+             if (nomul)
+                prog = gc->shared->shader.filter_greyscale_bgra_nomul.prog;
+             else
+                prog = gc->shared->shader.filter_greyscale_bgra.prog;
+          }
+        else
+          {
+             if (nomul)
+                prog = gc->shared->shader.filter_greyscale_nomul.prog;
+             else
+                prog = gc->shared->shader.filter_greyscale.prog;
+          }
+
+     }
+
+   printf("Prog: %d %d %d\n",prog,im->w,im->h);
+   gc->filter_prog = prog;
+   evas_gl_common_image_update(gc, im);
+   evas_gl_common_context_image_push(gc, im->tex, 0, 0, im->w, im->h,
+                                      0, 0, im->w, im->h,
+                                      r,g,b,a,
+                                      1, im->tex_only);
+   gc->filter_prog = 0;
+}
+
+
+Filtered_Image *
+evas_gl_common_image_filtered_get(Evas_GL_Image *im, uint8_t *key, size_t len)
+{
+   Filtered_Image *fi;
+   Eina_List *l;
+
+   for (l = im->filtered ; l ; l = l->next)
+     {
+         fi = l->data;
+         if (fi->keylen != len) continue;
+         if (memcmp(key, fi->key, len) != 0) continue;
+         fi->ref ++;
+         return fi;
+     }
+
+   return NULL;
+}
+
+Filtered_Image *
+evas_gl_common_image_filtered_save(Evas_GL_Image *im, Evas_GL_Image *fimage,
+                                   uint8_t *key, size_t keylen)
+{
+   Filtered_Image *fi;
+   Eina_List *l;
+
+   for (l = im->filtered ; l ; l = l->next)
+     {
+        fi = l->data;
+        if (fi->keylen != keylen) continue;
+        if (memcmp(key, fi->key, keylen) != 0) continue;
+
+        fi->image = (void *)fimage;
+        fi->ref ++;
+        return fi;
+     }
+
+   fi = calloc(1,sizeof(Filtered_Image));
+   if (!fi) return NULL;
+
+   fi->keylen = keylen;
+   fi->key = malloc(keylen);
+   memcpy(fi->key, key, keylen);
+   fi->image = (void *)fimage;
+   fi->ref = 1;
+
+   im->filtered = eina_list_prepend(im->filtered, fi);
+
+   return fi;
+}
+
+void
+evas_gl_common_image_filtered_free(Evas_GL_Image *image, Filtered_Image *fi)
+{
+   fi->ref --;
+   if (fi->ref) return;
+
+   free(fi->key);
+   evas_gl_common_image_free((void *)fi->image);
+   fi->image = NULL;
+
+   image->filtered = eina_list_remove(image->filtered, fi);
+}
+#endif
+
+
+/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
index 75e9ce6..237d8f1 100644 (file)
@@ -433,6 +433,11 @@ evas_gl_common_image_cache_flush(Evas_Engine_GL_Context *gc)
 void
 evas_gl_common_image_free(Evas_GL_Image *im)
 {
+#if 0 // filtering disabled
+   Filtered_Image *fi;
+#endif
+   
+   evas_gl_common_context_flush(im->gc);
    im->references--;
    if (im->references > 0) return;
    
@@ -449,6 +454,16 @@ evas_gl_common_image_free(Evas_GL_Image *im)
      }
    if (im->im) evas_cache_image_drop(&im->im->cache_entry);
    if (im->tex) evas_gl_common_texture_free(im->tex);
+
+#if 0 // filtering disabled
+   EINA_LIST_FREE(im->filtered, fi)
+     {
+       free(fi->key);
+       evas_gl_common_image_free((Evas_GL_Image *)fi->image);
+       free(fi);
+     }
+#endif
+
    free(im);
 }
 
@@ -485,8 +500,8 @@ evas_gl_common_image_dirty(Evas_GL_Image *im, unsigned int x, unsigned int y, un
    im->dirty = 1;
 }
 
-static void
-_evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im)
+void
+evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im)
 {
    if (!im->im) return;
 /*   
@@ -574,7 +589,7 @@ evas_gl_common_image_map_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im,
         r = g = b = a = 255;
      }
    
-   _evas_gl_common_image_update(gc, im);
+   evas_gl_common_image_update(gc, im);
 
    c = gc->dc->clip.use; 
    cx = gc->dc->clip.x; cy = gc->dc->clip.y; 
@@ -606,7 +621,7 @@ evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int sx,
    if (sw < 1) sw = 1;
    if (sh < 1) sh = 1;
    dc = gc->dc;
-   imm = dc->mask.mask;
+   imm = (Evas_GL_Image *)dc->mask.mask;
    if (dc->mul.use)
      {
        a = (dc->mul.col >> 24) & 0xff;
@@ -619,7 +634,7 @@ evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int sx,
        r = g = b = a = 255;
      }
    
-   _evas_gl_common_image_update(gc, im);
+   evas_gl_common_image_update(gc, im);
    if (!im->tex)
      {
         evas_gl_common_rect_draw(gc, dx, dy, dw, dh);
@@ -627,7 +642,7 @@ evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int sx,
      }
    if (imm)
      {
-        _evas_gl_common_image_update(gc, imm);
+        evas_gl_common_image_update(gc, imm);
         if (!imm->tex) imm = NULL; /* Turn of mask on error */
      }
 
@@ -790,7 +805,3 @@ evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int sx,
    /* restore clip info */
    gc->dc->clip.use = c; gc->dc->clip.x = cx; gc->dc->clip.y = cy; gc->dc->clip.w = cw; gc->dc->clip.h = ch;
 }
-
-
-
-/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
index 47c6781..0cc6d25 100644 (file)
@@ -443,6 +443,167 @@ Evas_GL_Program_Source shader_img_bgra_nomul_vert_src =
 };
 
 /////////////////////////////////////////////
+const char filter_invert_frag_glsl[] =
+#include "shader/filter_invert.h"
+  ;
+Evas_GL_Program_Source shader_filter_invert_frag_src =
+{
+   filter_invert_frag_glsl,
+   NULL, 0
+};
+
+const char filter_invert_nomul_frag_glsl[] =
+#include "shader/filter_invert_nomul.h"
+  ;
+Evas_GL_Program_Source shader_filter_invert_nomul_frag_src =
+{
+   filter_invert_nomul_frag_glsl,
+   NULL, 0
+};
+
+const char filter_invert_bgra_frag_glsl[] =
+#include "shader/filter_invert_bgra.h"
+  ;
+Evas_GL_Program_Source shader_filter_invert_bgra_frag_src =
+{
+   filter_invert_bgra_frag_glsl,
+   NULL, 0
+};
+const char filter_invert_bgra_nomul_frag_glsl[] =
+#include "shader/filter_invert_bgra_nomul.h"
+  ;
+Evas_GL_Program_Source shader_filter_invert_bgra_nomul_frag_src =
+{
+   filter_invert_bgra_nomul_frag_glsl,
+   NULL, 0
+};
+
+/////////////////////////////////////////////
+const char filter_greyscale_frag_glsl[] =
+#include "shader/filter_greyscale.h"
+  ;
+Evas_GL_Program_Source shader_filter_greyscale_frag_src =
+{
+   filter_greyscale_frag_glsl,
+   NULL, 0
+};
+
+const char filter_greyscale_nomul_frag_glsl[] =
+#include "shader/filter_greyscale_nomul.h"
+  ;
+Evas_GL_Program_Source shader_filter_greyscale_nomul_frag_src =
+{
+   filter_greyscale_nomul_frag_glsl,
+   NULL, 0
+};
+
+const char filter_greyscale_bgra_frag_glsl[] =
+#include "shader/filter_greyscale_bgra.h"
+  ;
+Evas_GL_Program_Source shader_filter_greyscale_bgra_frag_src =
+{
+   filter_greyscale_bgra_frag_glsl,
+   NULL, 0
+};
+const char filter_greyscale_bgra_nomul_frag_glsl[] =
+#include "shader/filter_greyscale_bgra_nomul.h"
+  ;
+Evas_GL_Program_Source shader_filter_greyscale_bgra_nomul_frag_src =
+{
+   filter_greyscale_bgra_nomul_frag_glsl,
+   NULL, 0
+};
+
+/////////////////////////////////////////////
+const char filter_sepia_frag_glsl[] =
+#include "shader/filter_sepia.h"
+  ;
+Evas_GL_Program_Source shader_filter_sepia_frag_src =
+{
+   filter_sepia_frag_glsl,
+   NULL, 0
+};
+
+const char filter_sepia_nomul_frag_glsl[] =
+#include "shader/filter_sepia_nomul.h"
+  ;
+Evas_GL_Program_Source shader_filter_sepia_nomul_frag_src =
+{
+   filter_sepia_nomul_frag_glsl,
+   NULL, 0
+};
+
+const char filter_sepia_bgra_frag_glsl[] =
+#include "shader/filter_sepia_bgra.h"
+  ;
+Evas_GL_Program_Source shader_filter_sepia_bgra_frag_src =
+{
+   filter_sepia_bgra_frag_glsl,
+   NULL, 0
+};
+const char filter_sepia_bgra_nomul_frag_glsl[] =
+#include "shader/filter_sepia_bgra_nomul.h"
+  ;
+Evas_GL_Program_Source shader_filter_sepia_bgra_nomul_frag_src =
+{
+   filter_sepia_bgra_nomul_frag_glsl,
+   NULL, 0
+};
+
+/////////////////////////////////////////////
+#if 0
+       Blur is a work in progress currently.
+       Mostly because GPUs are so hopeless.
+const char filter_blur_vert_glsl[] =
+#include "shader/filter_blur_vert.h"
+  ;
+
+Evas_GL_Program_Source shader_filter_blur_vert_src =
+{
+   filter_blur_vert_glsl,
+   NULL, 0
+};
+
+const char filter_blur_frag_glsl[] =
+#include "shader/filter_blur.h"
+  ;
+Evas_GL_Program_Source shader_filter_blur_frag_src =
+{
+   filter_blur_frag_glsl,
+   NULL, 0
+};
+
+const char filter_blur_nomul_frag_glsl[] =
+#include "shader/filter_blur_nomul.h"
+  ;
+Evas_GL_Program_Source shader_filter_blur_nomul_frag_src =
+{
+   filter_blur_nomul_frag_glsl,
+   NULL, 0
+};
+
+const char filter_blur_bgra_frag_glsl[] =
+#include "shader/filter_blur_bgra.h"
+  ;
+Evas_GL_Program_Source shader_filter_blur_bgra_frag_src =
+{
+   filter_blur_bgra_frag_glsl,
+   NULL, 0
+};
+const char filter_blur_bgra_nomul_frag_glsl[] =
+#include "shader/filter_blur_bgra_nomul.h"
+  ;
+Evas_GL_Program_Source shader_filter_blur_bgra_nomul_frag_src =
+{
+   filter_blur_bgra_nomul_frag_glsl,
+   NULL, 0
+};
+
+#endif
+
+
+
+/////////////////////////////////////////////
 static void
 gl_compile_link_error(GLuint target, const char *action)
 {
@@ -502,7 +663,6 @@ _evas_gl_shader_file_exists(const char *file)
    struct stat st;
    if (!file) return EINA_FALSE;
    if (stat(file, &st) < 0) return EINA_FALSE;
-
    return EINA_TRUE;
 }
 
@@ -527,30 +687,30 @@ _evas_gl_shader_file_mkpath(const char *path)
 
    if (_evas_gl_shader_file_is_dir(path)) return EINA_TRUE;
 
-   for (i = 0; path[i] != '\0'; ss[i] = path[i], i++)
+   for (i = 0; path[i]; ss[i] = path[i], i++)
      {
         if (i == sizeof(ss) - 1) return EINA_FALSE;
         if ((path[i] == '/') && (i > 0))
           {
-             ss[i] = '\0';
+             ss[i] = 0;
              if (!_evas_gl_shader_file_mkpath_if_not_exists(ss))
                return EINA_FALSE;
           }
      }
-   ss[i] = '\0';
+   ss[i] = 0;
    return _evas_gl_shader_file_mkpath_if_not_exists(ss);
 }
 
 static int
 _evas_gl_shader_dir_check(char *bin_shader_dir, int num)
 {
-   char *bin_shader_main_dir = NULL;
-   char *bin_shader_sub_dir = "/.evas/gl_common_shaders";
-
-   bin_shader_main_dir = getenv("HOME");
-   if (!bin_shader_main_dir ||bin_shader_main_dir[0] == '\0') return 0;
+   char *home = NULL;
+   char *subdir = ".cache/evas_gl_common_shaders";
 
-   snprintf(bin_shader_dir, num, "%s%s", bin_shader_main_dir, bin_shader_sub_dir);
+   home = getenv("HOME");
+   if ((!home) || (!home[0])) return 0;
+   
+   snprintf(bin_shader_dir, num, "%s/%s", home, subdir);
    return _evas_gl_shader_file_exists(bin_shader_dir);
 }
 
@@ -581,7 +741,7 @@ _evas_gl_shader_file_check(const char *bin_shader_dir, char *bin_shader_file, in
              j++;
           }
      }
-   after_name[j] = '\0';
+   after_name[j] = 0;
 
    snprintf(bin_shader_file, dir_num, "%s/%s", bin_shader_dir, after_name);
 
@@ -600,12 +760,12 @@ _evas_gl_common_shader_program_binary_init(Evas_GL_Program *p,
    if (!ef) return res;
 
    data = eet_read(ef, pname, &length);
-   if (!data || length <= 0) goto finish;
+   if ((!data) || (length <= 0)) goto finish;
 
    glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &num);
    if (num <= 0) goto finish;
 
-   formats = (int*)calloc(num, sizeof(int));
+   formats = calloc(num, sizeof(int));
    if (!formats) goto finish;
 
    glGetIntegerv(GL_PROGRAM_BINARY_FORMATS, formats);
@@ -613,13 +773,15 @@ _evas_gl_common_shader_program_binary_init(Evas_GL_Program *p,
 
    p->prog = glCreateProgram();
 
-   // TOOD: invalid rendering error occurs when attempting to use a glProgramBinary.
-   // in order to render correctly we should create a dummy vertex shader.
+#if 1
+   // TODO: invalid rendering error occurs when attempting to use a 
+   // glProgramBinary. in order to render correctly we should create a dummy 
+   // vertex shader.
    p->vert = glCreateShader(GL_VERTEX_SHADER);
    glAttachShader(p->prog, p->vert);
    p->frag = glCreateShader(GL_FRAGMENT_SHADER);
    glAttachShader(p->prog, p->frag);
-
+#endif
    glsym_glProgramBinary(p->prog, formats[0], data, length);
 
    glBindAttribLocation(p->prog, SHAD_VERTEX, "vertex");
@@ -628,18 +790,16 @@ _evas_gl_common_shader_program_binary_init(Evas_GL_Program *p,
    glBindAttribLocation(p->prog, SHAD_TEXUV2, "tex_coord2");
    glBindAttribLocation(p->prog, SHAD_TEXUV3, "tex_coord3");
    glBindAttribLocation(p->prog, SHAD_TEXM,   "tex_coordm");
-
    res = 1;
 
 finish:
    if (formats) free(formats);
    if (data) free(data);
-   if (!res && p->prog)
+   if ((!res) && (p->prog))
      {
         glDeleteProgram(p->prog);
         p->prog = 0;
      }
-
    return res;
 }
 
@@ -656,13 +816,11 @@ _evas_gl_common_shader_program_binary_save(Evas_GL_Program *p,
 
    glGetProgramiv(p->prog, GL_PROGRAM_BINARY_LENGTH, &length);
    GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-
    if (length <= 0) return 0;
 
    data = malloc(length);
    if (!data) return 0;
 
-
    glsym_glGetProgramBinary(p->prog, length, NULL, &format, data);
    GLERR(__FUNCTION__, __FILE__, __LINE__, "");
 
@@ -677,12 +835,12 @@ _evas_gl_common_shader_program_binary_save(Evas_GL_Program *p,
 
 static int
 _evas_gl_common_shader_program_source_init(Evas_GL_Program *p,
-                                   Evas_GL_Program_Source *vert,
-                                   Evas_GL_Program_Source *frag,
-                                   const char *name)
+                                           Evas_GL_Program_Source *vert,
+                                           Evas_GL_Program_Source *frag,
+                                           const char *name)
 {
    GLint ok;
-
+   
    p->vert = glCreateShader(GL_VERTEX_SHADER);
    p->frag = glCreateShader(GL_FRAGMENT_SHADER);
 #if defined (GLES_VARIETY_S3C6410)
@@ -721,6 +879,12 @@ _evas_gl_common_shader_program_source_init(Evas_GL_Program *p,
      }
 #endif
    p->prog = glCreateProgram();
+#if defined(GLES_VARIETY_S3C6410) || defined(GLES_VARIETY_SGX)
+#else
+   if ((glsym_glGetProgramBinary) && (glsym_glProgramParameteri))
+      glsym_glProgramParameteri(p->prog, GL_PROGRAM_BINARY_RETRIEVABLE_HINT, 
+                                GL_TRUE);
+#endif   
    glAttachShader(p->prog, p->vert);
    GLERR(__FUNCTION__, __FILE__, __LINE__, "");
    glAttachShader(p->prog, p->frag);
@@ -758,49 +922,120 @@ static int
 _evas_gl_common_shader_source_init(Evas_GL_Shared *shared)
 {
    if (!_evas_gl_common_shader_program_source_init(&(shared->shader.rect),
-                                                &(shader_rect_vert_src),
-                                                &(shader_rect_frag_src),
-                                                "rect")) return 0;
+                                                   &(shader_rect_vert_src),
+                                                   &(shader_rect_frag_src),
+                                                   "rect")) return 0;
    if (!_evas_gl_common_shader_program_source_init(&(shared->shader.font),
-                                                &(shader_font_vert_src),
-                                                &(shader_font_frag_src),
-                                                "font")) return 0;
+                                                   &(shader_font_vert_src),
+                                                   &(shader_font_frag_src),
+                                                   "font")) return 0;
    if (!_evas_gl_common_shader_program_source_init(&(shared->shader.img),
-                                                &(shader_img_vert_src),
-                                                &(shader_img_frag_src),
-                                                "img")) return 0;
+                                                   &(shader_img_vert_src),
+                                                   &(shader_img_frag_src),
+                                                   "img")) return 0;
    if (!_evas_gl_common_shader_program_source_init(&(shared->shader.img_nomul),
-                                                &(shader_img_nomul_vert_src),
-                                                &(shader_img_nomul_frag_src),
-                                                "img_nomul")) return 0;
+                                                   &(shader_img_nomul_vert_src),
+                                                   &(shader_img_nomul_frag_src),
+                                                   "img_nomul")) return 0;
    if (!_evas_gl_common_shader_program_source_init(&(shared->shader.img_bgra),
-                                                &(shader_img_bgra_vert_src),
+                                                   &(shader_img_bgra_vert_src),
                                                 &(shader_img_bgra_frag_src),
-                                                "img_bgra")) return 0;
+                                                   "img_bgra")) return 0;
    if (!_evas_gl_common_shader_program_source_init(&(shared->shader.img_bgra_nomul),
-                                                &(shader_img_bgra_nomul_vert_src),
-                                                &(shader_img_bgra_nomul_frag_src),
-                                                "img_bgra_nomul")) return 0;
+                                                   &(shader_img_bgra_nomul_vert_src),
+                                                   &(shader_img_bgra_nomul_frag_src),
+                                                   "img_bgra_nomul")) return 0;
    if (!_evas_gl_common_shader_program_source_init(&(shared->shader.img_mask),
-                                                &(shader_img_mask_vert_src),
-                                                &(shader_img_mask_frag_src),
-                                                "img_mask")) return 0;
+                                                   &(shader_img_mask_vert_src),
+                                                   &(shader_img_mask_frag_src),
+                                                   "img_mask")) return 0;
    if (!_evas_gl_common_shader_program_source_init(&(shared->shader.tex),
-                                                &(shader_tex_vert_src),
-                                                &(shader_tex_frag_src),
-                                                "tex")) return 0;
+                                                   &(shader_tex_vert_src),
+                                                   &(shader_tex_frag_src),
+                                                   "tex")) return 0;
    if (!_evas_gl_common_shader_program_source_init(&(shared->shader.tex_nomul),
-                                                &(shader_tex_nomul_vert_src),
-                                                &(shader_tex_nomul_frag_src),
-                                                "tex_nomul")) return 0;
+                                                   &(shader_tex_nomul_vert_src),
+                                                   &(shader_tex_nomul_frag_src),
+                                                   "tex_nomul")) return 0;
    if (!_evas_gl_common_shader_program_source_init(&(shared->shader.yuv),
-                                                &(shader_yuv_vert_src),
-                                                &(shader_yuv_frag_src),
-                                                "yuv")) return 0;
+                                                   &(shader_yuv_vert_src),
+                                                   &(shader_yuv_frag_src),
+                                                   "yuv")) return 0;
    if (!_evas_gl_common_shader_program_source_init(&(shared->shader.yuv_nomul),
-                                                &(shader_yuv_nomul_vert_src),
-                                                &(shader_yuv_nomul_frag_src),
-                                                "yuv_nomul")) return 0;
+                                                   &(shader_yuv_nomul_vert_src),
+                                                   &(shader_yuv_nomul_frag_src),
+                                                   "yuv_nomul")) return 0;
+   
+   /* Most of the filters use the image fragment shader */
+   if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_invert),
+                                                   &(shader_img_vert_src),
+                                                   &(shader_filter_invert_frag_src),
+                                                   "filter_invert")) return 0;
+   if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_invert_nomul),
+                                                   &(shader_img_vert_src),
+                                                   &(shader_filter_invert_nomul_frag_src),
+                                                   "filter_invert_nomul")) return 0;
+   if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_invert_bgra),
+                                                   &(shader_img_vert_src),
+                                                   &(shader_filter_invert_bgra_frag_src),
+                                                   "filter_invert_bgra")) return 0;
+   if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_invert_bgra_nomul),
+                                                   &(shader_img_vert_src),
+                                                   &(shader_filter_invert_bgra_nomul_frag_src),
+                                                   "filter_invert_bgra_nomul")) return 0;
+   
+   if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_sepia),
+                                                   &(shader_img_vert_src),
+                                                   &(shader_filter_sepia_frag_src),
+                                                   "filter_sepia")) return 0;
+   if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_sepia_nomul),
+                                                   &(shader_img_vert_src),
+                                                   &(shader_filter_sepia_nomul_frag_src),
+                                                   "filter_sepia_nomul")) return 0;
+   if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_sepia_bgra),
+                                                   &(shader_img_vert_src),
+                                                   &(shader_filter_sepia_bgra_frag_src),
+                                                   "filter_sepia_bgra")) return 0;
+   if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_sepia_bgra_nomul),
+                                                   &(shader_img_vert_src),
+                                                   &(shader_filter_sepia_bgra_nomul_frag_src),
+                                                   "filter_sepia_bgra_nomul")) return 0;
+   
+   if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_greyscale),
+                                                   &(shader_img_vert_src),
+                                                   &(shader_filter_greyscale_frag_src),
+                                                   "filter_greyscale")) return 0;
+   if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_greyscale_nomul),
+                                                   &(shader_img_vert_src),
+                                                   &(shader_filter_greyscale_nomul_frag_src),
+                                                   "filter_greyscale_nomul")) return 0;
+   if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_greyscale_bgra),
+                                                   &(shader_img_vert_src),
+                                                   &(shader_filter_greyscale_bgra_frag_src),
+                                                   "filter_greyscale_bgra")) return 0;
+   if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_greyscale_bgra_nomul),
+                                                   &(shader_img_vert_src),
+                                                   &(shader_filter_greyscale_bgra_nomul_frag_src),
+                                                   "filter_greyscale_bgra_nomul")) return 0;
+#if 0
+   if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_blur),
+                                                   &(shader_filter_blur_vert_src),
+                                                   &(shader_filter_blur_frag_src),
+                                                   "filter_blur")) return 0;
+   if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_blur_nomul),
+                                                   &(shader_filter_blur_vert_src),
+                                                   &(shader_filter_blur_nomul_frag_src),
+                                                   "filter_blur_nomul")) return 0;
+   if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_blur_bgra),
+                                                   &(shader_filter_blur_vert_src),
+                                                   &(shader_filter_blur_bgra_frag_src),
+                                                   "filter_blur_bgra")) return 0;
+   if (!_evas_gl_common_shader_program_source_init(&(shared->shader.filter_blur_bgra_nomul),
+                                                   &(shader_filter_blur_vert_src),
+                                                   &(shader_filter_blur_bgra_nomul_frag_src),
+                                                   "filter_blur_bgra_nomul")) return 0;
+#endif
+   
    return 1;
 }
 
@@ -808,15 +1043,17 @@ static int
 _evas_gl_common_shader_binary_init(Evas_GL_Shared *shared)
 {
    /* check eet */
-   Eet_File *et = NULL; //check eet file
-
+   Eet_File *et = NULL;
    char bin_dir_path[PATH_MAX];
    char bin_file_path[PATH_MAX];
 
-   if (!_evas_gl_shader_dir_check(bin_dir_path, sizeof(bin_dir_path))) return 0;
-
-   if (!_evas_gl_shader_file_check(bin_dir_path, bin_file_path, sizeof(bin_dir_path))) return 0;
-
+   if (!_evas_gl_shader_dir_check(bin_dir_path, sizeof(bin_dir_path)))
+      return 0;
+   
+   if (!_evas_gl_shader_file_check(bin_dir_path, bin_file_path,
+                                   sizeof(bin_dir_path))) 
+      return 0;
+   
    /* use eet */
    if (!eet_init()) return 0;
    et = eet_open(bin_file_path, EET_FILE_MODE_READ);
@@ -834,6 +1071,28 @@ _evas_gl_common_shader_binary_init(Evas_GL_Shared *shared)
    if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.yuv), "yuv", et)) goto error;
    if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.yuv_nomul), "yuv_nomul", et)) goto error;
 
+   /* Most of the filters use the image fragment shader */
+   if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_invert), "filter_invert", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_invert_nomul), "filter_invert_nomul", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_invert_bgra), "filter_invert_bgra", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_invert_bgra_nomul), "filter_invert_bgra_nomul", et)) goto error;
+
+   if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_sepia), "filter_sepia", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_sepia_nomul), "filter_sepia_nomul", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_sepia_bgra), "filter_sepia_bgra", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_sepia_bgra_nomul), "filter_sepia_bgra_nomul", et)) goto error;
+
+   if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_greyscale), "filter_greyscale", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_greyscale_nomul), "filter_greyscale_nomul", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_greyscale_bgra), "filter_greyscale_bgra", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_greyscale_bgra_nomul), "filter_greyscale_bgra_nomul", et)) goto error;
+#if 0
+   if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_blur), "filter_blur", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_blur_nomul), "filter_blur_nomul", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_blur_bgra), "filter_blur_bgra", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_init(&(shared->shader.filter_blur_bgra_nomul), "filter_blur_bgra_nomul", et)) goto error;
+#endif
+
    if (et) eet_close(et);
    eet_shutdown();
    return 1;
@@ -856,11 +1115,12 @@ _evas_gl_common_shader_binary_save(Evas_GL_Shared *shared)
    char tmp_file[PATH_MAX];
 
    if (!_evas_gl_shader_dir_check(bin_dir_path, sizeof(bin_dir_path)))
-     res = _evas_gl_shader_file_mkpath(bin_dir_path);
+      res = _evas_gl_shader_file_mkpath(bin_dir_path);
    if (!res) return 0; /* we can't make directory */
-
-   _evas_gl_shader_file_check(bin_dir_path, bin_file_path, sizeof(bin_dir_path));
-
+   
+   _evas_gl_shader_file_check(bin_dir_path, bin_file_path, 
+                              sizeof(bin_dir_path));
+   
    /* use mkstemp for writing */
    snprintf(tmp_file, sizeof(tmp_file), "%s.XXXXXX", bin_file_path);
    tmpfd = mkstemp(tmp_file);
@@ -884,6 +1144,27 @@ _evas_gl_common_shader_binary_save(Evas_GL_Shared *shared)
    if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.tex_nomul),"tex_nomul", et)) goto error;
    if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.yuv), "yuv", et)) goto error;
    if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.yuv_nomul), "yuv_nomul", et)) goto error;
+   /* Most of the filters use the image fragment shader */
+   if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_invert), "filter_invert", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_invert_nomul), "filter_invert_nomul", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_invert_bgra), "filter_invert_bgra", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_invert_bgra_nomul), "filter_invert_bgra_nomul", et)) goto error;
+
+   if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_sepia), "filter_sepia", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_sepia_nomul), "filter_sepia_nomul", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_sepia_bgra), "filter_sepia_bgra", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_sepia_bgra_nomul), "filter_sepia_bgra_nomul", et)) goto error;
+
+   if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_greyscale), "filter_greyscale", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_greyscale_nomul), "filter_greyscale_nomul", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_greyscale_bgra), "filter_greyscale_bgra", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_greyscale_bgra_nomul), "filter_greyscale_bgra_nomul", et)) goto error;
+#if 0
+   if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_blur), "filter_blur", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_blur_nomul), "filter_blur_nomul", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_blur_bgra), "filter_blur_bgra", et)) goto error;
+   if (!_evas_gl_common_shader_program_binary_save(&(shared->shader.filter_blur_bgra_nomul), "filter_blur_bgra_nomul", et)) goto error;
+#endif
 
    if (eet_close(et) != EET_ERROR_NONE) goto error;
    if (rename(tmp_file,bin_file_path) < 0) goto error;
@@ -901,14 +1182,12 @@ int
 evas_gl_common_shader_program_init(Evas_GL_Shared *shared)
 {
    // gl support binary shader and get env of binary shader path
-   if (shared->info.bin_program && _evas_gl_common_shader_binary_init(shared)) return 1;
-
+   if (shared->info.bin_program && 
+       _evas_gl_common_shader_binary_init(shared)) return 1;
    /* compile all shader.*/
    if (!_evas_gl_common_shader_source_init(shared)) return 0;
-
-   /* sucess compile all shader. if gl support binary shader, we need to save */
+   /* success compile all shader. if gl support binary shader, we need to save */
    if (shared->info.bin_program) _evas_gl_common_shader_binary_save(shared);
-
    return 1;
 }
 
index 6e8246b..9e3d8f8 100644 (file)
@@ -647,8 +647,6 @@ evas_gl_texture_pool_empty(Evas_GL_Texture_Pool *pt)
 #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
    if (pt->dyn.img)
      {
-        void *egldisplay = pt->gc->egldisp;
-        
         secsym_eglDestroyImage(pt->gc->egldisp, pt->dyn.img);
         pt->dyn.img = NULL;
         pt->dyn.data = NULL;
@@ -1052,13 +1050,13 @@ evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned i
    GLERR(__FUNCTION__, __FILE__, __LINE__, "");
    _tex_sub_2d(0, 0, w / 2, h / 2, tex->ptv->format, tex->ptv->dataformat, rows[h + (h / 2)]);
 #else
-   int y;
+   unsigned int y;
 
    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
    GLERR(__FUNCTION__, __FILE__, __LINE__, "");
    glBindTexture(GL_TEXTURE_2D, tex->pt->texture);
    GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-   if ((rows[1] - rows[0]) == w)
+   if ((rows[1] - rows[0]) == (int)w)
      _tex_sub_2d(0, 0, w, h, tex->pt->format, tex->pt->dataformat, rows[0]);
    else
      {
@@ -1068,7 +1066,7 @@ evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned i
 
    glBindTexture(GL_TEXTURE_2D, tex->ptu->texture);
    GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-   if ((rows[h + 1] - rows[h]) == (w / 2))
+   if ((rows[h + 1] - rows[h]) == (int)(w / 2))
      _tex_sub_2d(0, 0, w / 2, h / 2, tex->ptu->format, tex->ptu->dataformat, rows[h]);
    else
      {
@@ -1078,7 +1076,7 @@ evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned i
    
    glBindTexture(GL_TEXTURE_2D, tex->ptv->texture);
    GLERR(__FUNCTION__, __FILE__, __LINE__, "");
-   if ((rows[h + (h / 2) + 1] - rows[h + (h / 2)]) == (w / 2))
+   if ((rows[h + (h / 2) + 1] - rows[h + (h / 2)]) == (int)(w / 2))
      _tex_sub_2d(0, 0, w / 2, h / 2, tex->ptv->format, tex->ptv->dataformat, rows[h + (h / 2)]);
    else
      {
index 924096b..90ec941 100755 (executable)
@@ -35,7 +35,9 @@ compile img
 compile img_nomul
 compile img_bgra
 compile img_bgra_nomul
+compile img_mask
 compile yuv
 compile yuv_nomul
 compile tex
 compile tex_nomul
+## FIXME: compile filter_*
index ff7f28d..cb5d8ff 100755 (executable)
@@ -13,7 +13,9 @@ compile img
 compile img_nomul
 compile img_bgra
 compile img_bgra_nomul
+compile img_mask
 compile yuv
 compile yuv_nomul
 compile tex
 compile tex_nomul
+## FIXME: compile filter_*
diff --git a/src/modules/engines/gl_common/shader/filter_blur.h b/src/modules/engines/gl_common/shader/filter_blur.h
new file mode 100644 (file)
index 0000000..69e8c07
--- /dev/null
@@ -0,0 +1,20 @@
+"#ifdef GL_ES\n"
+"precision mediump float;\n"
+"#endif\n"
+"uniform sampler2D tex;\n"
+"uniform sampler1D gaussian;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"varying weight;\n"
+"uniform radius;\n"
+"void main()\n"
+"{\n"
+"      int i;\n"
+"      vec4 fc = vec4(0,0,0,0);\n"
+"      \n"
+"      for (i = 0 ; i < radius ; i ++){\n"
+"              fc += texture2D(tex, tex_c.xy).rgba *\n"
+"                      texture1D(gaussian,i/radius).aaaa;\n"
+"      }\n"
+"      gl_FragColor = fc / 4 * col;\n"
+"}\n"
diff --git a/src/modules/engines/gl_common/shader/filter_blur.shd b/src/modules/engines/gl_common/shader/filter_blur.shd
new file mode 100644 (file)
index 0000000..59b5809
--- /dev/null
@@ -0,0 +1,20 @@
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D tex;
+uniform sampler1D gaussian;
+varying vec4 col;
+varying vec2 tex_c;
+varying weight;
+uniform radius;
+void main()
+{
+       int i;
+       vec4 fc = vec4(0,0,0,0);
+       
+       for (i = 0 ; i < radius ; i ++){
+               fc += texture2D(tex, tex_c.xy).rgba *
+                       texture1D(gaussian,i/radius).aaaa;
+       }
+       gl_FragColor = fc / 4 * col;
+}
diff --git a/src/modules/engines/gl_common/shader/filter_blur_bgra.h b/src/modules/engines/gl_common/shader/filter_blur_bgra.h
new file mode 100644 (file)
index 0000000..4dc5f37
--- /dev/null
@@ -0,0 +1,20 @@
+"#ifdef GL_ES\n"
+"precision mediump float;\n"
+"#endif\n"
+"uniform sampler2D tex;\n"
+"uniform sampler1D gaussian;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"varying weight;\n"
+"uniform radius;\n"
+"void main()\n"
+"{\n"
+"      int i;\n"
+"      vec4 fc = vec4(0,0,0,0);\n"
+"      \n"
+"      for (i = 0 ; i < radius ; i ++){\n"
+"              fc += texture2D(tex, tex_c.xy).rgba *\n"
+"                      texture1D(gaussian,i/radius).aaaa;\n"
+"      }\n"
+"      gl_FragColor = fc / 4;\n"
+"}\n"
diff --git a/src/modules/engines/gl_common/shader/filter_blur_bgra.shd b/src/modules/engines/gl_common/shader/filter_blur_bgra.shd
new file mode 100644 (file)
index 0000000..efd7932
--- /dev/null
@@ -0,0 +1,20 @@
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D tex;
+uniform sampler1D gaussian;
+varying vec4 col;
+varying vec2 tex_c;
+varying weight;
+uniform radius;
+void main()
+{
+       int i;
+       vec4 fc = vec4(0,0,0,0);
+       
+       for (i = 0 ; i < radius ; i ++){
+               fc += texture2D(tex, tex_c.xy).rgba *
+                       texture1D(gaussian,i/radius).aaaa;
+       }
+       gl_FragColor = fc / 4;
+}
diff --git a/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.h b/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.h
new file mode 100644 (file)
index 0000000..4dc5f37
--- /dev/null
@@ -0,0 +1,20 @@
+"#ifdef GL_ES\n"
+"precision mediump float;\n"
+"#endif\n"
+"uniform sampler2D tex;\n"
+"uniform sampler1D gaussian;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"varying weight;\n"
+"uniform radius;\n"
+"void main()\n"
+"{\n"
+"      int i;\n"
+"      vec4 fc = vec4(0,0,0,0);\n"
+"      \n"
+"      for (i = 0 ; i < radius ; i ++){\n"
+"              fc += texture2D(tex, tex_c.xy).rgba *\n"
+"                      texture1D(gaussian,i/radius).aaaa;\n"
+"      }\n"
+"      gl_FragColor = fc / 4;\n"
+"}\n"
diff --git a/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.shd b/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.shd
new file mode 100644 (file)
index 0000000..efd7932
--- /dev/null
@@ -0,0 +1,20 @@
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D tex;
+uniform sampler1D gaussian;
+varying vec4 col;
+varying vec2 tex_c;
+varying weight;
+uniform radius;
+void main()
+{
+       int i;
+       vec4 fc = vec4(0,0,0,0);
+       
+       for (i = 0 ; i < radius ; i ++){
+               fc += texture2D(tex, tex_c.xy).rgba *
+                       texture1D(gaussian,i/radius).aaaa;
+       }
+       gl_FragColor = fc / 4;
+}
diff --git a/src/modules/engines/gl_common/shader/filter_blur_nomul.h b/src/modules/engines/gl_common/shader/filter_blur_nomul.h
new file mode 100644 (file)
index 0000000..4dc5f37
--- /dev/null
@@ -0,0 +1,20 @@
+"#ifdef GL_ES\n"
+"precision mediump float;\n"
+"#endif\n"
+"uniform sampler2D tex;\n"
+"uniform sampler1D gaussian;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"varying weight;\n"
+"uniform radius;\n"
+"void main()\n"
+"{\n"
+"      int i;\n"
+"      vec4 fc = vec4(0,0,0,0);\n"
+"      \n"
+"      for (i = 0 ; i < radius ; i ++){\n"
+"              fc += texture2D(tex, tex_c.xy).rgba *\n"
+"                      texture1D(gaussian,i/radius).aaaa;\n"
+"      }\n"
+"      gl_FragColor = fc / 4;\n"
+"}\n"
diff --git a/src/modules/engines/gl_common/shader/filter_blur_nomul.shd b/src/modules/engines/gl_common/shader/filter_blur_nomul.shd
new file mode 100644 (file)
index 0000000..efd7932
--- /dev/null
@@ -0,0 +1,20 @@
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D tex;
+uniform sampler1D gaussian;
+varying vec4 col;
+varying vec2 tex_c;
+varying weight;
+uniform radius;
+void main()
+{
+       int i;
+       vec4 fc = vec4(0,0,0,0);
+       
+       for (i = 0 ; i < radius ; i ++){
+               fc += texture2D(tex, tex_c.xy).rgba *
+                       texture1D(gaussian,i/radius).aaaa;
+       }
+       gl_FragColor = fc / 4;
+}
diff --git a/src/modules/engines/gl_common/shader/filter_blur_vert.h b/src/modules/engines/gl_common/shader/filter_blur_vert.h
new file mode 100644 (file)
index 0000000..ed13d77
--- /dev/null
@@ -0,0 +1,29 @@
+"#ifdef GL_ES\n"
+"precision mediump float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec4 color;\n"
+"attribute vec2 tex_coord;\n"
+"attribute float r;\n"
+"uniform mat4 mvp;\n"
+"uniform sampler1D tex_blur;\n"
+"varying float weight;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"\n"
+"void main(){\n"
+"      /* FIXME: This index should be tweaked so for \n"
+"              radius 1, I want 3 points at 1/4, 2/4, 3/4 */\n"
+"      /*\n"
+"      for (float i = 0 ; i <= radius * 2 ; i ++){\n"
+"              float pos = i;\n"
+"              float r = float(radius);\n"
+"              weight += sampler1D(tex_blur, 1.0 / (r * 2.0 * pos));\n"
+"      }*/\n"
+"      for (float i = 0.0 ; i < r * 2.0 ; i += 1.0){\n"
+"              weight += sampler1D(tex_blur, 1.0 / (r * 2.0 * i));\n"
+"      }\n"
+"      gl_Position = mvp * vertex;\n"
+"      col = color;\n"
+"      tex_c = tex_coord;\n"
+"}\n"
diff --git a/src/modules/engines/gl_common/shader/filter_blur_vert.shd b/src/modules/engines/gl_common/shader/filter_blur_vert.shd
new file mode 100644 (file)
index 0000000..e2ca7d5
--- /dev/null
@@ -0,0 +1,29 @@
+#ifdef GL_ES
+precision mediump float;
+#endif
+attribute vec4 vertex;
+attribute vec4 color;
+attribute vec2 tex_coord;
+attribute float r;
+uniform mat4 mvp;
+uniform sampler1D tex_blur;
+varying float weight;
+varying vec4 col;
+varying vec2 tex_c;
+
+void main(){
+       /* FIXME: This index should be tweaked so for 
+               radius 1, I want 3 points at 1/4, 2/4, 3/4 */
+       /*
+       for (float i = 0 ; i <= radius * 2 ; i ++){
+               float pos = i;
+               float r = float(radius);
+               weight += sampler1D(tex_blur, 1.0 / (r * 2.0 * pos));
+       }*/
+       for (float i = 0.0 ; i < r * 2.0 ; i += 1.0){
+               weight += sampler1D(tex_blur, 1.0 / (r * 2.0 * i));
+       }
+       gl_Position = mvp * vertex;
+       col = color;
+       tex_c = tex_coord;
+}
diff --git a/src/modules/engines/gl_common/shader/filter_greyscale.h b/src/modules/engines/gl_common/shader/filter_greyscale.h
new file mode 100644 (file)
index 0000000..7bb1b7b
--- /dev/null
@@ -0,0 +1,11 @@
+"#ifdef GL_ES\n"
+"precision mediump float;\n"
+"#endif\n"
+"uniform sampler2D tex;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"void main()\n"
+"{\n"
+"   float inten = dot(texture2D(tex,tex_c.xy).agb,vec3(.3, .59, .11));\n"
+"   gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r) * col;\n"
+"}\n"
diff --git a/src/modules/engines/gl_common/shader/filter_greyscale.shd b/src/modules/engines/gl_common/shader/filter_greyscale.shd
new file mode 100644 (file)
index 0000000..014e510
--- /dev/null
@@ -0,0 +1,11 @@
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D tex;
+varying vec4 col;
+varying vec2 tex_c;
+void main()
+{
+   float inten = dot(texture2D(tex,tex_c.xy).agb,vec3(.3, .59, .11));
+   gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r) * col;
+}
diff --git a/src/modules/engines/gl_common/shader/filter_greyscale_bgra.h b/src/modules/engines/gl_common/shader/filter_greyscale_bgra.h
new file mode 100644 (file)
index 0000000..e29c26a
--- /dev/null
@@ -0,0 +1,11 @@
+"#ifdef GL_ES\n"
+"precision mediump float;\n"
+"#endif\n"
+"uniform sampler2D tex;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"void main()\n"
+"{\n"
+"   float inten = dot(texture2D(tex,tex_c.xy).rgb,vec3(.3, .59, .11));\n"
+"   gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).a) * col;\n"
+"}\n"
diff --git a/src/modules/engines/gl_common/shader/filter_greyscale_bgra.shd b/src/modules/engines/gl_common/shader/filter_greyscale_bgra.shd
new file mode 100644 (file)
index 0000000..ec9ac11
--- /dev/null
@@ -0,0 +1,11 @@
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D tex;
+varying vec4 col;
+varying vec2 tex_c;
+void main()
+{
+   float inten = dot(texture2D(tex,tex_c.xy).rgb,vec3(.3, .59, .11));
+   gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).a) * col;
+}
diff --git a/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.h b/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.h
new file mode 100644 (file)
index 0000000..687670a
--- /dev/null
@@ -0,0 +1,10 @@
+"#ifdef GL_ES\n"
+"precision mediump float;\n"
+"#endif\n"
+"uniform sampler2D tex;\n"
+"varying vec2 tex_c;\n"
+"void main()\n"
+"{\n"
+"   float inten = dot(texture2D(tex,tex_c.xy).rgb,vec3(.3, .59, .11));\n"
+"   gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).a);\n"
+"}\n"
diff --git a/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.shd b/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.shd
new file mode 100644 (file)
index 0000000..b4dcc30
--- /dev/null
@@ -0,0 +1,10 @@
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D tex;
+varying vec2 tex_c;
+void main()
+{
+   float inten = dot(texture2D(tex,tex_c.xy).rgb,vec3(.3, .59, .11));
+   gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).a);
+}
diff --git a/src/modules/engines/gl_common/shader/filter_greyscale_nomul.h b/src/modules/engines/gl_common/shader/filter_greyscale_nomul.h
new file mode 100644 (file)
index 0000000..1de16b9
--- /dev/null
@@ -0,0 +1,10 @@
+"#ifdef GL_ES\n"
+"precision mediump float;\n"
+"#endif\n"
+"uniform sampler2D tex;\n"
+"varying vec2 tex_c;\n"
+"void main()\n"
+"{\n"
+"   float inten = dot(texture2D(tex,tex_c.xy).abg,vec3(.3, .59, .11));\n"
+"   gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r);\n"
+"}\n"
diff --git a/src/modules/engines/gl_common/shader/filter_greyscale_nomul.shd b/src/modules/engines/gl_common/shader/filter_greyscale_nomul.shd
new file mode 100644 (file)
index 0000000..327e311
--- /dev/null
@@ -0,0 +1,10 @@
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D tex;
+varying vec2 tex_c;
+void main()
+{
+   float inten = dot(texture2D(tex,tex_c.xy).abg,vec3(.3, .59, .11));
+   gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r);
+}
diff --git a/src/modules/engines/gl_common/shader/filter_invert.h b/src/modules/engines/gl_common/shader/filter_invert.h
new file mode 100644 (file)
index 0000000..2b5268a
--- /dev/null
@@ -0,0 +1,10 @@
+"#ifdef GL_ES\n"
+"precision mediump float;\n"
+"#endif\n"
+"uniform sampler2D tex;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"void main()\n"
+"{\n"
+"   gl_FragColor = (vec4(0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy).bgra)*col;\n"
+"}\n"
diff --git a/src/modules/engines/gl_common/shader/filter_invert.shd b/src/modules/engines/gl_common/shader/filter_invert.shd
new file mode 100644 (file)
index 0000000..a405099
--- /dev/null
@@ -0,0 +1,10 @@
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D tex;
+varying vec4 col;
+varying vec2 tex_c;
+void main()
+{
+   gl_FragColor = (vec4(0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy).bgra)*col;
+}
diff --git a/src/modules/engines/gl_common/shader/filter_invert_bgra.h b/src/modules/engines/gl_common/shader/filter_invert_bgra.h
new file mode 100644 (file)
index 0000000..6ab298d
--- /dev/null
@@ -0,0 +1,10 @@
+"#ifdef GL_ES\n"
+"precision mediump float;\n"
+"#endif\n"
+"uniform sampler2D tex;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"void main()\n"
+"{\n"
+"   gl_FragColor = (vec4(1.0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy))*col;\n"
+"}\n"
diff --git a/src/modules/engines/gl_common/shader/filter_invert_bgra.shd b/src/modules/engines/gl_common/shader/filter_invert_bgra.shd
new file mode 100644 (file)
index 0000000..1e60507
--- /dev/null
@@ -0,0 +1,10 @@
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D tex;
+varying vec4 col;
+varying vec2 tex_c;
+void main()
+{
+   gl_FragColor = (vec4(1.0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy))*col;
+}
diff --git a/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.h b/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.h
new file mode 100644 (file)
index 0000000..b0d0d53
--- /dev/null
@@ -0,0 +1,11 @@
+"#ifdef GL_ES\n"
+"precision mediump float;\n"
+"#endif\n"
+"uniform sampler2D tex;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"void main()\n"
+"{\n"
+"   vec3 inv = vec3(1.0, 1.0, 1.0) - texture2D(tex,tex_c.xy).rgb;\n"
+"   gl_FragColor = vec4(inv.r, inv.g, inv.b, 1.0);\n"
+"}\n"
diff --git a/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.shd b/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.shd
new file mode 100644 (file)
index 0000000..2b37345
--- /dev/null
@@ -0,0 +1,11 @@
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D tex;
+varying vec4 col;
+varying vec2 tex_c;
+void main()
+{
+   vec3 inv = vec3(1.0, 1.0, 1.0) - texture2D(tex,tex_c.xy).rgb;
+   gl_FragColor = vec4(inv.r, inv.g, inv.b, 1.0);
+}
diff --git a/src/modules/engines/gl_common/shader/filter_invert_nomul.h b/src/modules/engines/gl_common/shader/filter_invert_nomul.h
new file mode 100644 (file)
index 0000000..2b5268a
--- /dev/null
@@ -0,0 +1,10 @@
+"#ifdef GL_ES\n"
+"precision mediump float;\n"
+"#endif\n"
+"uniform sampler2D tex;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"void main()\n"
+"{\n"
+"   gl_FragColor = (vec4(0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy).bgra)*col;\n"
+"}\n"
diff --git a/src/modules/engines/gl_common/shader/filter_invert_nomul.shd b/src/modules/engines/gl_common/shader/filter_invert_nomul.shd
new file mode 100644 (file)
index 0000000..a405099
--- /dev/null
@@ -0,0 +1,10 @@
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D tex;
+varying vec4 col;
+varying vec2 tex_c;
+void main()
+{
+   gl_FragColor = (vec4(0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy).bgra)*col;
+}
diff --git a/src/modules/engines/gl_common/shader/filter_sepia.h b/src/modules/engines/gl_common/shader/filter_sepia.h
new file mode 100644 (file)
index 0000000..821c824
--- /dev/null
@@ -0,0 +1,16 @@
+"#ifdef GL_ES\n"
+"precision mediump float;\n"
+"#endif\n"
+"uniform sampler2D tex;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"void main()\n"
+"{\n"
+"      vec3 inp = texture2D(tex,tex_c.xy).abg;\n"
+"      vec4 sep;\n"
+"      sep.r = dot(inp, vec3(.393, .769, .189));\n"
+"      sep.g = dot(inp, vec3(.349, .686, .168));\n"
+"      sep.b = dot(inp, vec3(.272, .534, .131));\n"
+"      sep.a = texture2D(tex,tex_c.xy).r;\n"
+"      gl_FragColor = sep * col;\n"
+"}\n"
diff --git a/src/modules/engines/gl_common/shader/filter_sepia.shd b/src/modules/engines/gl_common/shader/filter_sepia.shd
new file mode 100644 (file)
index 0000000..63b6208
--- /dev/null
@@ -0,0 +1,16 @@
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D tex;
+varying vec4 col;
+varying vec2 tex_c;
+void main()
+{
+       vec3 inp = texture2D(tex,tex_c.xy).abg;
+       vec4 sep;
+       sep.r = dot(inp, vec3(.393, .769, .189));
+       sep.g = dot(inp, vec3(.349, .686, .168));
+       sep.b = dot(inp, vec3(.272, .534, .131));
+       sep.a = texture2D(tex,tex_c.xy).r;
+       gl_FragColor = sep * col;
+}
diff --git a/src/modules/engines/gl_common/shader/filter_sepia_bgra.h b/src/modules/engines/gl_common/shader/filter_sepia_bgra.h
new file mode 100644 (file)
index 0000000..66f88d3
--- /dev/null
@@ -0,0 +1,16 @@
+"#ifdef GL_ES\n"
+"precision mediump float;\n"
+"#endif\n"
+"uniform sampler2D tex;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"void main()\n"
+"{\n"
+"      vec3 inp = texture2D(tex,tex_c.xy).rgb;\n"
+"      vec4 sep;\n"
+"      sep.r = dot(inp, vec3(.393, .769, .189));\n"
+"      sep.g = dot(inp, vec3(.349, .686, .168));\n"
+"      sep.b = dot(inp, vec3(.272, .534, .131));\n"
+"      sep.a = texture2D(tex,tex_c.xy).a;\n"
+"      gl_FragColor = sep * col;\n"
+"}\n"
diff --git a/src/modules/engines/gl_common/shader/filter_sepia_bgra.shd b/src/modules/engines/gl_common/shader/filter_sepia_bgra.shd
new file mode 100644 (file)
index 0000000..d267b9c
--- /dev/null
@@ -0,0 +1,16 @@
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D tex;
+varying vec4 col;
+varying vec2 tex_c;
+void main()
+{
+       vec3 inp = texture2D(tex,tex_c.xy).rgb;
+       vec4 sep;
+       sep.r = dot(inp, vec3(.393, .769, .189));
+       sep.g = dot(inp, vec3(.349, .686, .168));
+       sep.b = dot(inp, vec3(.272, .534, .131));
+       sep.a = texture2D(tex,tex_c.xy).a;
+       gl_FragColor = sep * col;
+}
diff --git a/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.h b/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.h
new file mode 100644 (file)
index 0000000..6990485
--- /dev/null
@@ -0,0 +1,14 @@
+"#ifdef GL_ES\n"
+"precision mediump float;\n"
+"#endif\n"
+"uniform sampler2D tex;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"void main()\n"
+"{\n"
+"      vec3 inp = texture2D(tex,tex_c.xy).rgb;\n"
+"      gl_FragColor.r = dot(inp, vec3(.393, .769, .189));\n"
+"      gl_FragColor.g = dot(inp, vec3(.349, .686, .168));\n"
+"      gl_FragColor.b = dot(inp, vec3(.272, .534, .131));\n"
+"      gl_FragColor.a = texture2D(tex,tex_c.xy).a;\n"
+"}\n"
diff --git a/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.shd b/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.shd
new file mode 100644 (file)
index 0000000..f2be987
--- /dev/null
@@ -0,0 +1,14 @@
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D tex;
+varying vec4 col;
+varying vec2 tex_c;
+void main()
+{
+       vec3 inp = texture2D(tex,tex_c.xy).rgb;
+       gl_FragColor.r = dot(inp, vec3(.393, .769, .189));
+       gl_FragColor.g = dot(inp, vec3(.349, .686, .168));
+       gl_FragColor.b = dot(inp, vec3(.272, .534, .131));
+       gl_FragColor.a = texture2D(tex,tex_c.xy).a;
+}
diff --git a/src/modules/engines/gl_common/shader/filter_sepia_nomul.h b/src/modules/engines/gl_common/shader/filter_sepia_nomul.h
new file mode 100644 (file)
index 0000000..ba4621c
--- /dev/null
@@ -0,0 +1,14 @@
+"#ifdef GL_ES\n"
+"precision mediump float;\n"
+"#endif\n"
+"uniform sampler2D tex;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"void main()\n"
+"{\n"
+"      vec3 inp = texture2D(tex,tex_c.xy).abg;\n"
+"      gl_FragColor.r = dot(inp, vec3(.393, .769, .189));\n"
+"      gl_FragColor.g = dot(inp, vec3(.349, .686, .168));\n"
+"      gl_FragColor.b = dot(inp, vec3(.272, .534, .131));\n"
+"      gl_FragColor.a = texture2D(tex,tex_c.xy).r;\n"
+"}\n"
diff --git a/src/modules/engines/gl_common/shader/filter_sepia_nomul.shd b/src/modules/engines/gl_common/shader/filter_sepia_nomul.shd
new file mode 100644 (file)
index 0000000..cdd109e
--- /dev/null
@@ -0,0 +1,14 @@
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D tex;
+varying vec4 col;
+varying vec2 tex_c;
+void main()
+{
+       vec3 inp = texture2D(tex,tex_c.xy).abg;
+       gl_FragColor.r = dot(inp, vec3(.393, .769, .189));
+       gl_FragColor.g = dot(inp, vec3(.349, .686, .168));
+       gl_FragColor.b = dot(inp, vec3(.272, .534, .131));
+       gl_FragColor.a = texture2D(tex,tex_c.xy).r;
+}
diff --git a/src/modules/engines/gl_glew/.cvsignore b/src/modules/engines/gl_glew/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
diff --git a/src/modules/engines/gl_glew/Evas_Engine_GL_Glew.h b/src/modules/engines/gl_glew/Evas_Engine_GL_Glew.h
deleted file mode 100644 (file)
index a83496e..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef __EVAS_ENGINE_GL_GLEW_H__
-#define __EVAS_ENGINE_GL_GLEW_H__
-
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-
-typedef struct _Evas_Engine_Info_GL_Glew              Evas_Engine_Info_GL_Glew;
-
-struct _Evas_Engine_Info_GL_Glew
-{
-   /* PRIVATE - don't mess with this baby or evas will poke its tongue out */
-   /* at you and make nasty noises */
-   Evas_Engine_Info magic;
-
-   /* engine specific data & parameters it needs to set up */
-   struct {
-      HWND  window;
-      int   depth;
-   } info;
-
-   /* non-blocking or blocking mode */
-   Evas_Engine_Render_Mode render_mode;
-};
-
-
-#endif /* __EVAS_ENGINE_GL_GLEW_H__ */
diff --git a/src/modules/engines/gl_glew/Makefile.am b/src/modules/engines/gl_glew/Makefile.am
deleted file mode 100644 (file)
index 13307f7..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = \
--I. \
--I$(top_srcdir)/src/lib \
--I$(top_srcdir)/src/lib/include \
--I$(top_srcdir)/src/modules/engines/gl_common \
-@EINA_CFLAGS@ \
-@FREETYPE_CFLAGS@ \
-@evas_engine_gl_glew_cflags@
-
-if BUILD_ENGINE_GL_GLEW
-
-GL_GLEW_SOURCES = \
-evas_engine.c \
-evas_glew_win32_main.c
-
-GL_GLEW_LIBADD = @evas_engine_gl_glew_libs@ $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la
-
-
-includes_HEADERS = Evas_Engine_GL_Glew.h
-includesdir = $(includedir)/evas-@VMAJ@
-
-if !EVAS_STATIC_BUILD_GL_GLEW
-
-pkgdir = $(libdir)/evas/modules/engines/gl_glew/$(MODULE_ARCH)
-pkg_LTLIBRARIES = module.la
-
-module_la_SOURCES  = $(GL_GLEW_SOURCES)
-module_la_LIBADD = $(GL_GLEW_LIBADD) $(top_builddir)/src/lib/libevas.la
-module_la_LDFLAGS = @lt_enable_auto_import@ -no-undefined -module -avoid-version
-module_la_LIBTOOLFLAGS = --tag=disable-static
-
-else
-
-noinst_LTLIBRARIES = libevas_engine_gl_glew.la
-
-libevas_engine_gl_glew_la_SOURCES = $(GL_GLEW_SOURCES)
-libevas_engine_gl_glew_la_LIBADD = $(GL_GLEW_LIBADD)
-
-endif
-endif
-
-EXTRA_DIST = evas_engine.h
diff --git a/src/modules/engines/gl_glew/evas_engine.c b/src/modules/engines/gl_glew/evas_engine.c
deleted file mode 100644 (file)
index 43e349d..0000000
+++ /dev/null
@@ -1,887 +0,0 @@
-#include "evas_common.h" /* Also includes international specific stuff */
-#include "evas_engine.h"
-
-int _evas_engine_GL_glew_log_dom = -1;
-
-/* function tables - filled in later (func and parent func) */
-static Evas_Func func, pfunc;
-
-typedef struct _Render_Engine Render_Engine;
-
-struct _Render_Engine
-{
-   Evas_GL_Glew_Window *window;
-   int                  end;
-};
-
-static void *
-eng_info(Evas *e __UNUSED__)
-{
-   Evas_Engine_Info_GL_Glew *info;
-   info = calloc(1, sizeof(Evas_Engine_Info_GL_Glew));
-   if (!info) return NULL;
-   info->magic.magic = rand();
-   info->render_mode = EVAS_RENDER_MODE_BLOCKING;
-   return info;
-}
-
-static void
-eng_info_free(Evas *e __UNUSED__, void *info)
-{
-   Evas_Engine_Info_GL_Glew *in;
-
-   eina_log_domain_unregister(_evas_engine_GL_glew_log_dom);
-   in = (Evas_Engine_Info_GL_Glew *)info;
-   free(in);
-}
-
-static int
-eng_setup(Evas *e, void *in)
-{
-   Render_Engine            *re;
-   Evas_Engine_Info_GL_Glew *info;
-
-   info = (Evas_Engine_Info_GL_Glew *)in;
-   if (!e->engine.data.output)
-     {
-       re = calloc(1, sizeof(Render_Engine));
-       if (!re) return 0;
-
-       e->engine.data.output = re;
-       re->window = eng_window_new(info->info.window,
-                                    info->info.depth,
-                                    e->output.w,
-                                    e->output.h);
-       if (!re->window)
-         {
-            free(re);
-            e->engine.data.output = NULL;
-            return 0;
-         }
-
-       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();
-     }
-   else
-     {
-       re = e->engine.data.output;
-       eng_window_free(re->window);
-       re->window = eng_window_new(info->info.window,
-                                    info->info.depth,
-                                    e->output.w,
-                                    e->output.h);
-     }
-   if (!e->engine.data.output) return 0;
-
-   if (!e->engine.data.context)
-     e->engine.data.context =
-       e->engine.func->context_new(e->engine.data.output);
-   eng_window_use(re->window);
-
-   return 1;
-}
-
-static void
-eng_output_free(void *data)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   eng_window_free(re->window);
-   free(re);
-
-   evas_common_font_shutdown();
-   evas_common_image_shutdown();
-}
-
-static void
-eng_output_resize(void *data, int w, int h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   re->window->width = w;
-   re->window->height = h;
-   evas_gl_common_context_resize(re->window->gl_context, w, h);
-}
-
-static void
-eng_output_tile_size_set(void *data __UNUSED__, int w __UNUSED__, int h __UNUSED__)
-{
-}
-
-static void
-eng_output_redraws_rect_add(void *data, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   evas_gl_common_context_resize(re->window->gl_context, re->window->width, re->window->height);
-   /* simple bounding box */
-   if (!re->window->draw.redraw)
-     {
-#if 0
-       re->window->draw.x1 = x;
-       re->window->draw.y1 = y;
-       re->window->draw.x2 = x + w - 1;
-       re->window->draw.y2 = y + h - 1;
-#else
-       re->window->draw.x1 = 0;
-       re->window->draw.y1 = 0;
-       re->window->draw.x2 = re->window->width - 1;
-       re->window->draw.y2 = re->window->height - 1;
-#endif
-     }
-   else
-     {
-       if (x < re->window->draw.x1) re->window->draw.x1 = x;
-       if (y < re->window->draw.y1) re->window->draw.y1 = y;
-       if ((x + w - 1) > re->window->draw.x2) re->window->draw.x2 = x + w - 1;
-       if ((y + h - 1) > re->window->draw.y2) re->window->draw.y2 = y + h - 1;
-     }
-   re->window->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__)
-{
-}
-
-static void
-eng_output_redraws_clear(void *data)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   re->window->draw.redraw = 0;
-}
-
-#define SLOW_GL_COPY_RECT 1
-/* 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;
-
-   re = (Render_Engine *)data;
-   evas_gl_common_context_flush(re->window->gl_context);
-   /* get the upate rect surface - return engine data as dummy */
-   if (!re->window->draw.redraw)
-     {
-//     printf("GL: NO updates!\n");
-       return NULL;
-     }
-//   printf("GL: update....!\n");
-#ifdef SLOW_GL_COPY_RECT
-   /* if any update - just return the whole canvas - works with swap
-    * buffers then */
-   if (x) *x = 0;
-   if (y) *y = 0;
-   if (w) *w = re->window->width;
-   if (h) *h = re->window->height;
-   if (cx) *cx = 0;
-   if (cy) *cy = 0;
-   if (cw) *cw = re->window->width;
-   if (ch) *ch = re->window->height;
-#else
-   /* 1 update - INCREDIBLY SLOW if combined with swap_rect in flush. a gl
-    * problem where there just is no hardware path for somethnig that
-    * obviously SHOULD be there */
-   /* only 1 update to minimise gl context games and rendering multiple update
-    * regions as evas does with other engines
-    */
-   if (x) *x = re->window->draw.x1;
-   if (y) *y = re->window->draw.y1;
-   if (w) *w = re->window->draw.x2 - re->window->draw.x1 + 1;
-   if (h) *h = re->window->draw.y2 - re->window->draw.y1 + 1;
-   if (cx) *cx = re->window->draw.x1;
-   if (cy) *cy = re->window->draw.y1;
-   if (cw) *cw = re->window->draw.x2 - re->window->draw.x1 + 1;
-   if (ch) *ch = re->window->draw.y2 - re->window->draw.y1 + 1;
-#endif
-// clear buffer. only needed for dest alpha
-//   glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
-//   glClear(GL_COLOR_BUFFER_BIT);
-   return re;
-}
-
-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;
-
-   re = (Render_Engine *)data;
-   /* put back update surface.. in this case just unflag redraw */
-   re->window->draw.redraw = 0;
-   re->window->draw.drew = 1;
-   evas_gl_common_context_flush(re->window->gl_context);
-}
-
-static void
-eng_output_flush(void *data)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   if (!re->window->draw.drew) return;
-
-   re->window->draw.drew = 0;
-   eng_window_use(re->window);
-
-#ifdef VSYNC_TO_SCREEN
-   eng_window_vsync_set(1);
-#endif
-#ifdef SLOW_GL_COPY_RECT
-   eng_window_swap_buffers(re->window);
-#else
-   /* SLOW AS ALL HELL */
-   evas_gl_common_swap_rect(re->window->gl_context,
-                           re->window->draw.x1, re->window->draw.y1,
-                           re->window->draw.x2 - re->window->draw.x1 + 1,
-                           re->window->draw.y2 - re->window->draw.y1 + 1);
-#endif
-}
-
-static void
-eng_output_idle_flush(void *data __UNUSED__)
-{
-}
-
-static void
-eng_output_dump(void *data __UNUSED__)
-{
-   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->window->gl_context);
-}
-
-static void
-eng_context_cutout_add(void *data __UNUSED__, void *context, int x, int y, int w, int h)
-{
-   evas_common_draw_context_add_cutout(context, x, y, w, h);
-}
-
-static void
-eng_context_cutout_clear(void *data __UNUSED__, void *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->window);
-   re->window->gl_context->dc = context;
-   evas_gl_common_rect_draw(re->window->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->window);
-   re->window->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, void *polygon, int x, int y)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-//--//      return evas_gl_common_poly_point_add(polygon, x, y);
-   return NULL;
-
-}
-
-static void *
-eng_polygon_points_clear(void *data, void *context, void *polygon)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-//--//      return evas_gl_common_poly_points_clear(polygon);
-   return NULL;
-}
-
-static void
-eng_polygon_draw(void *data, void *context, void *surface, void *polygon, int x, int y)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   re->window->gl_context->dc = context;
-//--//   evas_gl_common_poly_draw(re->window->gl_context, polygon, x, y);
-}
-
-static int
-eng_image_alpha_get(void *data, void *image)
-{
-   Evas_GL_Image *im;
-
-   if (!image) return 1;
-   im = image;
-   /* FIXME: can move to gl_common */
-   switch (im->cs.space)
-     {
-      case EVAS_COLORSPACE_ARGB8888:
-       if (im->im->cache_entry.flags.alpha) return 1;
-      default:
-       break;
-     }
-   return 0;
-}
-
-static int
-eng_image_colorspace_get(void *data, void *image)
-{
-   Evas_GL_Image *im;
-
-   if (!image) return EVAS_COLORSPACE_ARGB8888;
-   im = image;
-   return im->cs.space;
-}
-
-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;
-   eng_window_use(re->window);
-   im = 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);
-   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__)
-{
-   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__)
-{
-}
-
-static char *
-eng_image_comment_get(void *data __UNUSED__, void *image, char *key __UNUSED__)
-{
-   Evas_GL_Image *im;
-
-   if (!image) return NULL;
-   im = (Evas_GL_Image *)image;
-   return im->im->info.comment;
-}
-
-static char *
-eng_image_format_get(void *data __UNUSED__, void *image)
-{
-   Evas_GL_Image *im;
-
-   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;
-   /* FIXME: can move to gl_common */
-   if (im->cs.space == cspace) return;
-   eng_window_use(re->window);
-   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:
-       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);
-         }
-       im->cs.data = calloc(1, im->im->cache_entry.h * sizeof(unsigned char *) * 2);
-       im->cs.no_free = 0;
-       break;
-      default:
-       abort();
-       break;
-     }
-   im->cs.space = cspace;
-}
-
-static void
-eng_image_native_set(void *data __UNUSED__, void *image __UNUSED__, void *native __UNUSED__)
-{
-}
-
-static void *
-eng_image_native_get(void *data __UNUSED__, void *image __UNUSED__)
-{
-   return NULL;
-}
-
-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->window);
-   return evas_gl_common_image_load(re->window->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->window);
-   return evas_gl_common_image_new_from_data(re->window->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->window);
-   return evas_gl_common_image_new_from_copied_data(re->window->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->window);
-   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)->im->cache_entry.w;
-   if (h) *h = ((Evas_GL_Image *)image)->im->cache_entry.h;
-
-}
-
-static void *
-eng_image_size_set(void *data, void *image, int w, int h)
-{
-   Render_Engine *re;
-   Evas_GL_Image *im, *im_old;
-
-   re = (Render_Engine *)data;
-   if (!image) return NULL;
-   eng_window_use(re->window);
-   im_old = image;
-   if ((eng_image_colorspace_get(data, image) == EVAS_COLORSPACE_YCBCR422P601_PL) ||
-       (eng_image_colorspace_get(data, image) == EVAS_COLORSPACE_YCBCR422P709_PL))
-     w &= ~0x1;
-   if ((im_old) && (im_old->im->cache_entry.w == w) && (im_old->im->cache_entry.h == h))
-
-     return image;
-   if (im_old)
-     {
-       im = evas_gl_common_image_new(re->window->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->window->gl_context, w, h, 1, EVAS_COLORSPACE_ARGB8888);
-   return im;
-}
-
-static void *
-eng_image_dirty_region(void *data, void *image, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   if (!image) return NULL;
-   eng_window_use(re->window);
-   evas_gl_common_image_dirty(image);
-   return image;
-}
-
-static void *
-eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
-{
-   Render_Engine *re;
-   Evas_GL_Image *im;
-
-   re = (Render_Engine *)data;
-   if (!image)
-     {
-       *image_data = NULL;
-       return NULL;
-     }
-   im = image;
-   eng_window_use(re->window);
-   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;
-                      return im;
-                   }
-                 evas_gl_common_image_free(im);
-                 im = im_new;
-              }
-            else
-              evas_gl_common_image_dirty(im);
-         }
-       *image_data = im->im->image.data;
-       break;
-      case EVAS_COLORSPACE_YCBCR422P601_PL:
-      case EVAS_COLORSPACE_YCBCR422P709_PL:
-       *image_data = im->cs.data;
-       break;
-      default:
-       abort();
-       break;
-     }
-   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;
-   eng_window_use(re->window);
-   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:
-        if (image_data != im->cs.data)
-         {
-            if (im->cs.data)
-              {
-                 if (!im->cs.no_free) free(im->cs.data);
-              }
-            im->cs.data = image_data;
-         }
-       break;
-      default:
-       abort();
-       break;
-     }
-   /* hmmm - but if we wrote... why bother? */
-   evas_gl_common_image_dirty(im);
-   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 ;
-   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 ;
-   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 __UNUSED__, 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->window);
-   re->window->gl_context->dc = context;
-   evas_gl_common_image_draw(re->window->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 __UNUSED__, int hint __UNUSED__)
-{
-}
-
-static int
-eng_image_scale_hint_get(void *data __UNUSED__, void *image __UNUSED__)
-{
-   return EVAS_IMAGE_SCALE_HINT_NONE;
-}
-
-static void
-eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level)
-{
-   // XXX
-}
-
-static void *
-eng_image_map_surface_new(void *data __UNUSED__, int w, int h, int alpha)
-{
-   // XXX
-   return NULL;
-}
-
-static void
-eng_image_map_surface_free(void *data __UNUSED__, void *surface)
-{
-   // XXX
-}
-
-static void
-eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, const Eina_Unicode *text, const Evas_Text_Props *intl_props)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   eng_window_use(re->window);
-     {
-        // 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());
-        if (!im) return;
-        im->cache_entry.w = re->window->width;
-        im->cache_entry.h = re->window->height;
-       evas_common_draw_context_font_ext_set(context,
-                                             re->window->gl_context,
-                                             evas_gl_font_texture_new,
-                                             evas_gl_font_texture_free,
-                                             evas_gl_font_texture_draw);
-       evas_common_font_draw(im, context, font, x, y, text, intl_props);
-       evas_common_draw_context_font_ext_set(context,
-                                             NULL,
-                                             NULL,
-                                             NULL,
-                                             NULL);
-     }
-}
-
-static Eina_Bool
-eng_canvas_alpha_get(void *data __UNUSED__, void *info __UNUSED__)
-{
-   // FIXME: support ARGB gl targets!!!
-   return EINA_FALSE;
-}
-
-static int
-module_open(Evas_Module *em)
-{
-   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;
-   _evas_engine_GL_glew_log_dom = eina_log_domain_register
-     ("evas-gl_glew", EVAS_DEFAULT_LOG_COLOR);
-   if (_evas_engine_GL_glew_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_native_set);
-   ORD(image_native_get);
-
-   ORD(font_draw);
-   
-   ORD(image_scale_hint_set);
-   ORD(image_scale_hint_get);
-   
-   ORD(image_map_draw);
-   ORD(image_map_surface_new);
-   ORD(image_map_surface_free);
-   
-   /* now advertise out own api */
-   em->functions = (void *)(&func);
-   return 1;
-}
-
-static void
-module_close(Evas_Module *em)
-{
-  eina_log_domain_unregister(_evas_engine_GL_glew_log_dom);
-  evas_gl_common_module_close();
-}
-
-static Evas_Module_Api evas_modapi =
-{
-   EVAS_MODULE_API_VERSION,
-   "gl_glew",
-   "none",
-   {
-     module_open,
-     module_close
-   }
-};
-
-EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, gl_glew);
-
-#ifndef EVAS_STATIC_BUILD_GL_GLEW
-EVAS_EINA_MODULE_DEFINE(engine, gl_glew);
-#endif
diff --git a/src/modules/engines/gl_glew/evas_engine.h b/src/modules/engines/gl_glew/evas_engine.h
deleted file mode 100644 (file)
index 46393fb..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#ifndef __EVAS_ENGINE_H__
-#define __EVAS_ENGINE_H__
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <windows.h>
-
-#include "evas_gl_common.h"
-#include "Evas_Engine_GL_Glew.h"
-
-extern int _evas_engine_GL_glew_log_dom ;
-#ifdef ERR
-# undef ERR
-#endif
-#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_GL_glew_log_dom, __VA_ARGS__)
-
-#ifdef DBG
-# undef DBG
-#endif
-#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_GL_glew_log_dom, __VA_ARGS__)
-
-#ifdef INF
-# undef INF
-#endif
-#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_GL_glew_log_dom, __VA_ARGS__)
-
-#ifdef WRN
-# undef WRN
-#endif
-#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_GL_glew_log_dom, __VA_ARGS__)
-
-#ifdef CRIT
-# undef CRIT
-#endif
-#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_GL_glew_log_dom, __VA_ARGS__)
-
-typedef struct _Evas_GL_Glew_Window Evas_GL_Glew_Window;
-
-struct _Evas_GL_Glew_Window
-{
-#ifdef _WIN32
-   HWND             window;
-   HDC              dc;
-   HGLRC            context;
-#endif
-   int              width;
-   int              height;
-   int              depth;
-   Evas_Engine_GL_Context *gl_context;
-   struct {
-      int           x1;
-      int           y1;
-      int           x2;
-      int           y2;
-      int           redraw : 1;
-      int           drew : 1;
-   } draw;
-};
-
-#ifdef _WIN32
-Evas_GL_Glew_Window *eng_window_new(HWND window,
-                                    int  depth,
-                                    int  width,
-                                    int  height);
-#endif
-
-void eng_window_free(Evas_GL_Glew_Window *gw);
-void eng_window_use(Evas_GL_Glew_Window *gw);
-void eng_window_swap_buffers(Evas_GL_Glew_Window *gw);
-void eng_window_vsync_set(int on);
-
-
-#endif /* __EVAS_ENGINE_H__ */
diff --git a/src/modules/engines/gl_glew/evas_glew_win32_main.c b/src/modules/engines/gl_glew/evas_glew_win32_main.c
deleted file mode 100644 (file)
index 3e3b664..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-#include "evas_engine.h"
-
-#ifdef HAVE_GL_GLEW_H
-# include <GL/wglew.h>
-#endif
-
-static Evas_GL_Glew_Window *_evas_gl_glew_window = NULL;
-
-Evas_GL_Glew_Window *
-eng_window_new(HWND  window,
-               int   depth,
-               int   width,
-               int   height)
-{
-   PIXELFORMATDESCRIPTOR pfd;
-   Evas_GL_Glew_Window  *gw;
-   int                   format;
-
-   gw = calloc(1, sizeof(Evas_GL_Glew_Window));
-   if (!gw) return NULL;
-
-   gw->window = window;
-   gw->depth = depth;
-
-   gw->dc = GetDC(window);
-   if (!gw->dc)
-    goto free_window;
-
-   ZeroMemory(&pfd, sizeof (pfd));
-   pfd.nSize = sizeof (pfd);
-   pfd.nVersion = 1;
-   pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
-   pfd.iPixelType = PFD_TYPE_RGBA;
-   pfd.cColorBits = 24;
-   pfd.cDepthBits = 32;
-   pfd.iLayerType = PFD_MAIN_PLANE;
-
-   format = ChoosePixelFormat(gw->dc, &pfd);
-   if (!format)
-     goto release_dc;
-
-   SetPixelFormat(gw->dc, format, &pfd);
-
-   if (pfd.iPixelType != PFD_TYPE_RGBA)
-     goto release_dc;
-
-   gw->context = wglCreateContext(gw->dc);
-   if (!gw->context)
-     goto release_dc;
-
-   wglMakeCurrent(gw->dc, gw->context);
-
-   if (glewInit() != GLEW_OK)
-     goto delete_context;
-
-   if (!GLEW_VERSION_2_0)
-     {
-        ERR("OpenGL 2.0 not supported. Exiting...");
-        goto delete_context;
-     }
-
-   _evas_gl_glew_window = gw;
-
-   gw->gl_context = evas_gl_common_context_new();
-   if (!gw->gl_context)
-     goto delete_context;
-   evas_gl_common_context_resize(gw->gl_context, width, height);
-
-   return gw;
-
- delete_context:
-   wglMakeCurrent(NULL, NULL);
-   wglDeleteContext(gw->context);
- release_dc:
-   ReleaseDC(window, gw->dc);
- free_window:
-   free(gw);
-
-   return NULL;
-}
-
-void
-eng_window_free(Evas_GL_Glew_Window *gw)
-{
-   if (!gw)
-     return;
-   if (gw == _evas_gl_glew_window) _evas_gl_glew_window = NULL;
-   evas_gl_common_context_free(gw->gl_context);
-   wglMakeCurrent(NULL, NULL);
-   wglDeleteContext(gw->context);
-   ReleaseDC(gw->window, gw->dc);
-   free(gw);
-}
-
-void
-eng_window_use(Evas_GL_Glew_Window *gw)
-{
-   if (_evas_gl_glew_window != gw)
-     {
-        if (_evas_gl_glew_window)
-          evas_gl_common_context_flush(_evas_gl_glew_window->gl_context);
-        _evas_gl_glew_window = gw;
-        wglMakeCurrent(gw->dc, gw->context);
-     }
-   evas_gl_common_context_use(gw->gl_context);
-}
-
-void
-eng_window_swap_buffers(Evas_GL_Glew_Window *gw)
-{
-   SwapBuffers(gw->dc);
-}
-
-void
-eng_window_vsync_set(int on)
-{
-#if 1 /* Using Glew */
-   wglSwapIntervalEXT(on);
-#else /* Using plain OpenGL */
-   const char *extensions = glGetString(GL_EXTENSIONS);
-
-   /* check if WGL_EXT_swap_control extension is supported */
-   if (strstr(extensions, "WGL_EXT_swap_control") == 0)
-     return;
-   else
-     {
-        wglSwapIntervalEXT = (PFNWGLSWAPINTERVALFARPROC)wglGetProcAddress("wglSwapIntervalEXT");
-
-        if (wglSwapIntervalEXT)
-          wglSwapIntervalEXT(on);
-     }
-#endif
-}
index 57da21b..961bf41 100644 (file)
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib/include \
 -I$(top_srcdir)/src/modules/engines/gl_common \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @evas_engine_gl_sdl_cflags@
 
index fd4f817..397f76a 100644 (file)
@@ -637,24 +637,27 @@ eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h)
 }
 
 static void *
-eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
+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;
      }
-   evas_cache_image_load_data(&im->im->cache_entry);
+   error = evas_cache_image_load_data(&im->im->cache_entry);
    switch (im->cs.space)
      {
       case EVAS_COLORSPACE_ARGB8888:
@@ -670,7 +673,8 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
                  if (!im_new)
                    {
                       *image_data = NULL;
-                      return im;
+                       if (err) *err = error;
+                       return im;
                    }
                  evas_gl_common_image_free(im);
                  im = im_new;
@@ -688,6 +692,7 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
        abort();
        break;
      }
+   if (err) *err = error;
    return im;
 }
 
@@ -817,7 +822,7 @@ eng_image_scale_hint_get(void *data __UNUSED__, void *image)
 }
 
 static void
-eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Eina_Unicode *text, const Evas_Text_Props *intl_props)
+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;
 
@@ -837,7 +842,8 @@ eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y
                                              evas_gl_font_texture_new,
                                              evas_gl_font_texture_free,
                                              evas_gl_font_texture_draw);
-       evas_common_font_draw(im, context, font, x, y, text, intl_props);
+       evas_common_font_draw(im, context, (RGBA_Font *) font, x, y,
+              intl_props);
        evas_common_draw_context_font_ext_set(context,
                                              NULL,
                                              NULL,
@@ -854,6 +860,17 @@ eng_canvas_alpha_get(void *data __UNUSED__, void *info __UNUSED__)
 }
 
 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 int
 module_open(Evas_Module *em)
 {
    if (!em) return 0;
@@ -917,6 +934,12 @@ module_open(Evas_Module *em)
    ORD(image_colorspace_get);
    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);
@@ -925,6 +948,25 @@ module_open(Evas_Module *em)
    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_proc_address_get);
+//   ORD(gl_native_surface_get);
+   
+//   ORD(gl_api_get);
+   
+   ORD(image_load_error_get);
    
    /* now advertise out own api */
    em->functions = (void *)(&func);
diff --git a/src/modules/engines/gl_x11/.cvsignore b/src/modules/engines/gl_x11/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index d599dea..ee5bf04 100644 (file)
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
 -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_gl_x11_cflags@
index f943209..04426d4 100644 (file)
@@ -2,6 +2,8 @@
 #include "evas_engine.h"
 
 #include <dlfcn.h>      /* dlopen,dlclose,etc */
+#define EVAS_GL_NO_GL_H_CHECK 1
+#include "Evas_GL.h"
 
 #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
 // EGL / GLES
@@ -12,7 +14,9 @@
 // GLX
 #endif
 
-typedef struct _Render_Engine Render_Engine;
+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;
 
 struct _Render_Engine
 {
@@ -30,6 +34,39 @@ struct _Render_Engine
    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;
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+   EGLContext  context;
+#else   
+   GLXContext  context;
+#endif
+   GLuint      fbo;     
+   
+   Render_Engine_GL_Surface   *current_sfc;
+};
+
 static int initted = 0;
 static int gl_wins = 0;
 
@@ -57,6 +94,9 @@ typedef _eng_fn (*glsym_func_eng_fn) ();
 typedef void    (*glsym_func_void) ();
 typedef int     (*glsym_func_int) ();
 typedef XID     (*glsym_func_xid) ();
+typedef unsigned int     (*glsym_func_uint) ();
+typedef unsigned char    (*glsym_func_uchar) ();
+typedef unsigned char   *(*glsym_func_uchar_ptr) ();
 
 _eng_fn  (*glsym_glXGetProcAddress)  (const char *a) = NULL;
 void     (*glsym_glXBindTexImage)    (Display *a, GLXDrawable b, int c, int *d) = NULL;
@@ -152,6 +192,9 @@ int _evas_engine_GL_X11_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;
+
 struct xrdb_user
 {
    time_t last_stat;
@@ -389,6 +432,7 @@ eng_setup(Evas *e, void *in)
                                            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--;
@@ -425,7 +469,7 @@ eng_setup(Evas *e, void *in)
      e->engine.data.context =
      e->engine.func->context_new(e->engine.data.output);
    eng_window_use(re->win);
-   
+
    re->vsync = 0;
    if (re->win->alpha)
      {
@@ -655,8 +699,16 @@ eng_output_flush(void *data)
         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);
+     }
 #ifdef FRAMECOUNT
    double t1 = get_time();
    printf("%1.5f\n", t1 - t0);
@@ -1084,8 +1136,11 @@ _native_bind_cb(void *data, void *image)
     }
   else if (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL)
     {
-      // FIXME: implement
+      glBindTexture(GL_TEXTURE_2D, n->ns.data.opengl.texture_id); 
+      GLERR(__FUNCTION__, __FILE__, __LINE__, "");
     }
+   return;
+   data = NULL;
 }
 
 static void
@@ -1115,8 +1170,11 @@ _native_unbind_cb(void *data, void *image)
     }
   else if (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL)
     {
-      // FIXME: implement
+      glBindTexture(GL_TEXTURE_2D, 0); 
+      GLERR(__FUNCTION__, __FILE__, __LINE__, "");
     }
+   return;
+   data = NULL;
 }
 
 static void
@@ -1125,12 +1183,12 @@ _native_free_cb(void *data, void *image)
   Render_Engine *re = data;
   Evas_GL_Image *im = image;
   Native *n = im->native.data;
-  uint32_t pmid;
+  uint32_t pmid, texid;
 
   if (n->ns.type == EVAS_NATIVE_SURFACE_X11)
     {
       pmid = n->pixmap;
-      eina_hash_del(re->win->gl_context->shared->native_hash, &pmid, im);
+      eina_hash_del(re->win->gl_context->shared->native_pm_hash, &pmid, im);
 #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
       if (n->egl_surface)
         {
@@ -1173,7 +1231,8 @@ _native_free_cb(void *data, void *image)
     }
   else if (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL)
     {
-      // FIXME: implement
+      texid = n->ns.data.opengl.texture_id;
+      eina_hash_del(re->win->gl_context->shared->native_tex_hash, &texid, im);
     }
   im->native.data        = NULL;
   im->native.func.data   = NULL;
@@ -1192,9 +1251,23 @@ eng_image_native_set(void *data, void *image, void *native)
   Visual *vis = NULL;
   Pixmap pm = 0;
   Native *n = NULL;
-  uint32_t pmid;
+  uint32_t pmid, texid;
+  unsigned int tex = 0;
+  unsigned int fbo = 0; 
   
-  if (!im) return NULL;
+  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)
     {
@@ -1212,7 +1285,15 @@ eng_image_native_set(void *data, void *image, void *native)
         }
       else if (ns->type == EVAS_NATIVE_SURFACE_OPENGL)
         {
-          // FIXME: implement
+          tex = ns->data.opengl.texture_id;
+          fbo = ns->data.opengl.framebuffer_id;
+          if (im->native.data)
+            {
+              Evas_Native_Surface *ens = im->native.data;
+              if ((ens->data.opengl.texture_id == tex) && 
+                  (ens->data.opengl.framebuffer_id == fbo))
+                return im;
+            }
         }
     }
   if ((!ns) && (!im->native.data)) return im;
@@ -1231,7 +1312,7 @@ eng_image_native_set(void *data, void *image, void *native)
   if (ns->type == EVAS_NATIVE_SURFACE_X11)
     {
       pmid = pm;
-      im2 = eina_hash_find(re->win->gl_context->shared->native_hash, &pmid);
+      im2 = eina_hash_find(re->win->gl_context->shared->native_pm_hash, &pmid);
       if (im2 == im) return im;
       if (im2)
         {
@@ -1246,7 +1327,20 @@ eng_image_native_set(void *data, void *image, void *native)
     }
   else if (ns->type == EVAS_NATIVE_SURFACE_OPENGL)
     {
-      // FIXME: implement
+       texid = tex;
+       im2 = eina_hash_find(re->win->gl_context->shared->native_tex_hash, &texid);
+       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,
@@ -1265,7 +1359,7 @@ eng_image_native_set(void *data, void *image, void *native)
               int config_attrs[20];
               int num_config, i = 0;
               
-              eina_hash_add(re->win->gl_context->shared->native_hash, &pmid, im);
+              eina_hash_add(re->win->gl_context->shared->native_pm_hash, &pmid, im);
               
               config_attrs[i++] = EGL_RED_SIZE;
               config_attrs[i++] = 8;
@@ -1331,7 +1425,7 @@ eng_image_native_set(void *data, void *image, void *native)
               unsigned int target = 0;
               unsigned int i = 0;
               
-              eina_hash_add(re->win->gl_context->shared->native_hash, &pmid, im);
+              eina_hash_add(re->win->gl_context->shared->native_pm_hash, &pmid, im);
               if ((re->win->depth_cfg[depth].tex_target &
                    GLX_TEXTURE_2D_BIT_EXT) 
                   //                 && (1) // we assume npo2 for now
@@ -1430,7 +1524,41 @@ eng_image_native_set(void *data, void *image, void *native)
     }
   else if (ns->type == EVAS_NATIVE_SURFACE_OPENGL)
     {
-      // FIXME: implement
+      if (native)
+        {
+          n = calloc(1, sizeof(Native));
+          if (n)
+            {
+              memcpy(&(n->ns), ns, sizeof(Evas_Native_Surface));
+
+              eina_hash_add(re->win->gl_context->shared->native_tex_hash, &texid, im);
+
+              n->pixmap = 0;
+              n->visual = 0;
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+              n->egl_surface = 0;
+#else
+              n->fbc = 0;
+              n->glx_pixmap = 0;
+#endif
+
+              im->native.yinvert     = 0;
+              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;
+              
+              // FIXME: need to implement mapping sub texture regions
+              // x, y, w, h for possible texture atlasing
+
+              evas_gl_common_image_native_enable(im);
+            }
+        }
+
     }
    return im;
 }
@@ -1446,6 +1574,41 @@ eng_image_native_get(void *data __UNUSED__, void *image)
    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
+
+
 //
 //
 /////////////////////////////////////////////////////////////////////////
@@ -1573,30 +1736,34 @@ eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h)
 }
 
 static void *
-eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
+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;
      }
    if ((im->tex) && (im->tex->pt) && (im->tex->pt->dyn.data))
      {
         *image_data = im->tex->pt->dyn.data;
+        if (err) *err = EVAS_LOAD_ERROR_NONE;
         return im;
      }
    eng_window_use(re->win);
-   evas_cache_image_load_data(&im->im->cache_entry);
+   error = evas_cache_image_load_data(&im->im->cache_entry);
    switch (im->cs.space)
      {
       case EVAS_COLORSPACE_ARGB8888:
@@ -1614,6 +1781,7 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
                  if (!im_new)
                    {
                       *image_data = NULL;
+                       if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
                       return im;
                    }
                  evas_gl_common_image_free(im);
@@ -1632,6 +1800,7 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
        abort();
        break;
      }
+   if (err) *err = error;
    return im;
 }
 
@@ -1762,7 +1931,7 @@ eng_image_scale_hint_get(void *data __UNUSED__, void *image)
 }
 
 static void
-eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level)
+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;
@@ -1774,7 +1943,7 @@ eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *im
    re->win->gl_context->dc = context;
    if (npoints != 4)
      {
-        // FIXME: nash - you didnt fix this
+        // FIXME: nash - you didn't fix this
         abort();
      }
    if ((p[0].x == p[3].x) &&
@@ -1813,7 +1982,7 @@ eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *im
 }
 
 static void *
-eng_image_map_surface_new(void *data __UNUSED__, int w, int h, int alpha)
+eng_image_map_surface_new(void *data, int w, int h, int alpha)
 {
    Render_Engine *re;
    
@@ -1842,7 +2011,7 @@ eng_image_content_hint_get(void *data __UNUSED__, void *image)
 }
 
 static void
-eng_image_cache_flush(void *data __UNUSED__)
+eng_image_cache_flush(void *data)
 {
    Render_Engine *re;
    int tmp_size;
@@ -1857,7 +2026,7 @@ eng_image_cache_flush(void *data __UNUSED__)
 }
 
 static void
-eng_image_cache_set(void *data __UNUSED__, int bytes)
+eng_image_cache_set(void *data, int bytes)
 {
    Render_Engine *re;
    
@@ -1870,17 +2039,14 @@ eng_image_cache_set(void *data __UNUSED__, int bytes)
 static int
 eng_image_cache_get(void *data __UNUSED__)
 {
-   Render_Engine *re;
-   
-   re = (Render_Engine *)data;
    return evas_common_image_get_cache();
 }
 
-
 static void
 eng_image_stride_get(void *data __UNUSED__, void *image, int *stride)
 {
    Evas_GL_Image *im = image;
+
    *stride = im->w * 4;
    if ((im->tex) && (im->tex->pt->dyn.img))
      {
@@ -1890,7 +2056,7 @@ eng_image_stride_get(void *data __UNUSED__, void *image, int *stride)
 }
 
 static void
-eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Eina_Unicode *text, const Evas_Text_Props *intl_props)
+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;
 
@@ -1911,7 +2077,8 @@ eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y
                                              evas_gl_font_texture_new,
                                              evas_gl_font_texture_free,
                                              evas_gl_font_texture_draw);
-       evas_common_font_draw(im, context, font, x, y, text, intl_props);
+       evas_common_font_draw(im, context, (RGBA_Font *) font, x, y,
+                              intl_props);
        evas_common_draw_context_font_ext_set(context,
                                              NULL,
                                              NULL,
@@ -1928,6 +2095,812 @@ eng_canvas_alpha_get(void *data __UNUSED__, void *info __UNUSED__)
 }
 
 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_8:
+         sfc->rt_fmt          = GL_RGB;
+         sfc->rt_internal_fmt = GL_RGB;
+         break;
+      case EVAS_GL_RGBA_8:
+         sfc->rt_fmt          = GL_RGBA;
+         sfc->rt_internal_fmt = GL_RGBA;
+         break;
+      case EVAS_GL_RGB_32:
+         // Only supported on some hw 
+         // Fill it in later...
+      case EVAS_GL_RGBA_32:
+         // Only supported on some hw
+         // Fill it in later...
+      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:
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+         // 24 bit doesn't work... just cover it with 16 for now..
+         sfc->rb_depth_fmt = GL_DEPTH_COMPONENT16;
+#else
+         sfc->rb_depth_fmt = GL_DEPTH_COMPONENT;
+#endif
+         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:
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+         sfc->rb_stencil_fmt = GL_STENCIL_INDEX8;
+#else
+         sfc->rb_stencil_fmt = GL_STENCIL_INDEX;
+#endif
+         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 );
+   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);
+
+   // Depth RenderBuffer - Create storage here...
+   if (sfc->depth_bits != EVAS_GL_DEPTH_NONE)
+     {
+        glGenRenderbuffers(1, &sfc->rb_depth);
+        glBindRenderbuffer(GL_RENDERBUFFER, sfc->rb_depth);
+        glRenderbufferStorage(GL_RENDERBUFFER, sfc->rb_depth_fmt,
+                              sfc->w, sfc->h);
+        glBindRenderbuffer(GL_RENDERBUFFER, 0);
+     }
+
+   // Stencil RenderBuffer - Create Storage here...
+   if (sfc->stencil_bits != EVAS_GL_STENCIL_NONE)
+     {
+        glGenRenderbuffers(1, &sfc->rb_stencil);
+        glBindRenderbuffer(GL_RENDERBUFFER, sfc->rb_stencil);
+        glRenderbufferStorage(GL_RENDERBUFFER, sfc->rb_stencil_fmt,
+                              sfc->w, sfc->h);
+        glBindRenderbuffer(GL_RENDERBUFFER, 0);
+     }
+
+   return 1;
+}
+
+static int
+_attach_fbo_surface(Render_Engine *data __UNUSED__, 
+                    Render_Engine_GL_Surface *sfc, 
+                    Render_Engine_GL_Context *ctx)
+{
+   int fb_status;
+
+   // FBO
+   glBindFramebuffer(GL_FRAMEBUFFER, ctx->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);
+        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);
+        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;
+   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 Render Target Texture/Buffers if not initialized
+   if (!sfc->initialized) 
+     {
+        // 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. 
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+        ret = eglMakeCurrent(re->win->egl_disp, re->win->egl_surface[0], re->win->egl_surface[0], re->win->egl_context[0]);
+#else
+        ret = glXMakeCurrent(re->info->info.display, re->win->win, re->win->context);
+#endif
+        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;
+          }
+
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+        ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, 
+                             EGL_NO_SURFACE, EGL_NO_CONTEXT);
+#else
+        ret = glXMakeCurrent(re->info->info.display, None, NULL);
+#endif
+        if (!ret) 
+          {
+             ERR("xxxMakeCurrent() failed!");
+             free(sfc);
+             return 0;
+          }
+        sfc->initialized = 1;
+     }
+
+   return sfc;
+}
+
+static int
+eng_gl_surface_destroy(void *data, void *surface)
+{
+   Render_Engine *re;
+   Render_Engine_GL_Surface *sfc;
+   int ret;
+
+   re  = (Render_Engine *)data;
+   sfc = (Render_Engine_GL_Surface*)surface;
+
+   // I'm using evas's original context to delete the created fbo and texture
+   // This is because the fbo/texture was created in the user created context
+   // but the context can be destroyed already...
+   // I don't think this is the best way but at least for now this is A WAY. 
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+   ret = eglMakeCurrent(re->win->egl_disp, re->win->egl_surface[0], re->win->egl_surface[0], re->win->egl_context[0]);
+#else
+   ret = glXMakeCurrent(re->info->info.display, re->win->win, re->win->context);
+#endif
+   if (!ret) 
+     {
+        ERR("xxxMakeCurrent() failed!");
+        return 0;
+     }
+
+   // Delete FBO/RBO and Texture here
+   if (glIsTexture(sfc->rt_tex))
+     glDeleteTextures(1, &sfc->rt_tex);
+
+   if (glIsBuffer(sfc->rb_depth))
+     glDeleteRenderbuffers(1, &sfc->rb_depth);
+
+   if (glIsBuffer(sfc->rb_stencil))
+     glDeleteRenderbuffers(1, &sfc->rb_stencil);
+
+
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+   ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+#else
+   ret = glXMakeCurrent(re->info->info.display, None, NULL);
+#endif
+   if (!ret) 
+     {
+        ERR("xxxMakeCurrent() failed!");
+        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;
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+   int context_attrs[3];
+#endif   
+
+   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.
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+   // 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;
+     }
+#else
+   // GLX
+   if (share_context)
+     {
+        ctx->context = glXCreateContext(re->info->info.display,
+                                        re->win->visualinfo,
+                                        share_ctx->context,    // Share Context
+                                        1);
+     }
+   else 
+     {
+        ctx->context = glXCreateContext(re->info->info.display,
+                                        re->win->visualinfo,
+                                        re->win->context,      // Evas' GL Context
+                                        1);
+     }
+
+   if (!ctx->context) 
+     {
+        ERR("glXCreateContext() fail.");
+        return NULL;
+     }
+#endif
+
+   ctx->initialized = 0;
+   ctx->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;
+   int ret;
+
+   re  = (Render_Engine *)data;
+   ctx = (Render_Engine_GL_Context*)context;
+
+   // 1. Do a make current with the given context
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+   ret = eglMakeCurrent(re->win->egl_disp, re->win->egl_surface[0], 
+                        re->win->egl_surface[0], ctx->context);
+#else
+   ret = glXMakeCurrent(re->info->info.display, re->win->win, 
+                        ctx->context);
+#endif
+   if (!ret) 
+     {
+        ERR("xxxMakeCurrent() failed!");
+        return 0;
+     }
+
+   // 2. Delete the FBO
+   if (glIsBuffer(ctx->fbo))
+     glDeleteBuffers(1, &ctx->fbo);
+
+   // 3. Destroy the Context
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+   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);
+#else
+   glXDestroyContext(re->info->info.display, ctx->context);
+
+   ctx->context = 0;
+
+   ret = glXMakeCurrent(re->info->info.display, None, NULL);
+#endif
+   if (!ret) 
+     {
+        ERR("xxxMakeCurrent() failed!");
+        return 0;
+     }
+
+   free(ctx);
+   context = NULL;
+
+   return 1;
+}
+
+static int
+eng_gl_make_current(void *data, void *surface, void *context)
+{
+   Render_Engine *re;
+   Render_Engine_GL_Surface *sfc;
+   Render_Engine_GL_Context *ctx;
+   int ret = 0;
+
+   re  = (Render_Engine *)data;
+   sfc = (Render_Engine_GL_Surface*)surface;
+   ctx = (Render_Engine_GL_Context*)context;
+
+   // Flush remainder of what's in Evas' pipeline
+   if (re->win)
+     {
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+        if ((eglGetCurrentContext() == re->win->egl_context[0]) ||
+            (eglGetCurrentSurface(EGL_READ) == re->win->egl_surface[0]) ||
+            (eglGetCurrentSurface(EGL_DRAW) == re->win->egl_surface[0]))
+          {
+             evas_gl_common_context_use(re->win->gl_context);
+             evas_gl_common_context_flush(re->win->gl_context);
+          }
+#else
+        if (glXGetCurrentContext() == re->win->context)
+          {
+             evas_gl_common_context_use(re->win->gl_context);
+             evas_gl_common_context_flush(re->win->gl_context);
+          }
+#endif   
+        eng_window_use(NULL);
+        evas_gl_common_context_use(NULL);
+     }
+
+   // Unset surface/context
+   if ((!sfc) || (!ctx))
+     {
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+        ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, 
+                             EGL_NO_SURFACE, EGL_NO_CONTEXT);
+#else
+        ret = glXMakeCurrent(re->info->info.display, None, NULL);
+#endif
+        if (!ret) 
+          {
+             ERR("xxxMakeCurrent() failed!");
+             return 0;
+          }
+        return ret;
+     }
+
+   // Don't do a make current if it's already current
+   ret = 1;
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+   if ((eglGetCurrentContext() != ctx->context))
+      ret = eglMakeCurrent(re->win->egl_disp, re->win->egl_surface[0], 
+                           re->win->egl_surface[0], ctx->context);
+#else
+   if (glXGetCurrentContext() != ctx->context)
+      ret = glXMakeCurrent(re->info->info.display, re->win->win, ctx->context);
+#endif
+   if (!ret) 
+     {
+        ERR("xxxMakeCurrent() failed!");
+        return 0;
+     }
+
+   // Create FBO if not already created
+   if (!ctx->initialized) 
+     {
+        glGenFramebuffers(1, &ctx->fbo);
+        ctx->initialized = 1;
+     }
+
+   // Attach FBO if it hasn't been attached or if surface changed
+   if ((!sfc->fbo_attached) || (ctx != sfc->current_ctx))
+     {
+        if (!_attach_fbo_surface(re, sfc, ctx)) 
+          {
+             ERR("_attach_fbo_surface() failed.");
+             return 0;
+          }
+        sfc->fbo_attached = 1;
+     }
+
+   // Set the current surface/context 
+   ctx->current_sfc = sfc;
+   sfc->current_ctx = ctx;
+
+   // Bind FBO
+   glBindFramebuffer(GL_FRAMEBUFFER, ctx->fbo);
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+#else
+   //glDrawBuffer(GL_COLOR_ATTACHMENT0);
+#endif
+
+   return 1;
+}
+
+static void *
+eng_gl_proc_address_get(void *data __UNUSED__, const char *name)
+{
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+   if (glsym_eglGetProcAddress) return glsym_eglGetProcAddress(name);
+   return dlsym(RTLD_DEFAULT, name);
+#else
+   if (glsym_glXGetProcAddress) return glsym_glXGetProcAddress(name);
+   return dlsym(RTLD_DEFAULT, name);
+#endif
+}
+
+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.framebuffer_id = sfc->fbo;
+   //ns->data.opengl.framebuffer_id = ctx->fbo;
+   ns->data.opengl.x = 0;
+   ns->data.opengl.y = 0;
+   ns->data.opengl.w = sfc->w;
+   ns->data.opengl.h = sfc->h;
+   
+   return 1;
+}
+
+#if 1
+static void
+evgl_glBindFramebuffer(GLenum target, GLuint framebuffer)
+{
+   // Add logic to take care when framebuffer=0
+   glBindFramebuffer(target, framebuffer);
+}
+
+static void
+evgl_glBindRenderbuffer(GLenum target, GLuint renderbuffer)
+{
+   // Add logic to take care when renderbuffer=0
+   glBindRenderbuffer(target, renderbuffer);
+}
+
+static void
+evgl_glClearDepthf(GLclampf depth)
+{
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+   glClearDepthf(depth);
+#else
+   glClearDepth(depth);
+#endif
+}
+
+static void
+evgl_glDepthRangef(GLclampf zNear, GLclampf zFar)
+{
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+   glDepthRangef(zNear, zFar);
+#else
+   glDepthRange(zNear, zFar);
+#endif
+}
+
+static void
+evgl_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
+{
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+   glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
+#else
+   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;
+#endif
+}
+
+static void
+evgl_glReleaseShaderCompiler(void)
+{
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+   glReleaseShaderCompiler();
+#else
+#endif
+}
+
+static void
+evgl_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length)
+{
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+   glShaderBinary(n, shaders, binaryformat, binary, length);
+#else
+// FIXME: need to dlsym/getprocaddress for this
+   return;
+   n = binaryformat = length = 0;
+   shaders = binary = 0;
+#endif
+}
+
+#endif 
+
+static void *
+eng_gl_api_get(void *data)
+{
+   Render_Engine *re;
+
+   re  = (Render_Engine *)data;
+
+   gl_funcs.version = EVAS_GL_API_VERSION;
+#if 1
+#define ORD(f) EVAS_API_OVERRIDE(f, &gl_funcs, )
+   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
+
+// 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);
+#undef ORD
+
+#endif 
+
+   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 int
 module_open(Evas_Module *em)
 {
    static Eina_Bool xrm_inited = EINA_FALSE;
@@ -1999,6 +2972,12 @@ module_open(Evas_Module *em)
    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);
    
@@ -2016,6 +2995,18 @@ module_open(Evas_Module *em)
    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_proc_address_get);
+   ORD(gl_native_surface_get);
+
+   ORD(gl_api_get);
+   
+   ORD(image_load_error_get);
    
    /* now advertise out own api */
    em->functions = (void *)(&func);
@@ -2052,3 +3043,5 @@ EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, gl_x11);
 #ifndef EVAS_STATIC_BUILD_GL_X11
 EVAS_EINA_MODULE_DEFINE(engine, gl_x11);
 #endif
+
+/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
index 0d63f9d..b7163c2 100644 (file)
@@ -2,45 +2,44 @@
 #define EVAS_ENGINE_H
 
 #include "config.h"
-#ifdef HAVE_GL_GLEW_H
-# include <GL/glxew.h>
-#else
-# if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
-#  if defined(GLES_VARIETY_S3C6410)
-#   include <EGL/egl.h>
-#   include <GLES2/gl2.h>
-#   include <X11/Xlib.h>
-#   include <X11/Xatom.h>
-#   include <X11/Xutil.h>
-#   include <X11/extensions/Xrender.h>
-#   include <X11/Xresource.h> // xres - dpi
-#  elif defined(GLES_VARIETY_SGX)
-#   define SUPPORT_X11 1
-#   include <EGL/egl.h>
-#   include <GLES2/gl2.h>
-#   include <GLES2/gl2ext.h>
-#   include <X11/Xlib.h>
-#   include <X11/Xatom.h>
-#   include <X11/Xutil.h>
-#   include <X11/extensions/Xrender.h>
-#   include <X11/Xresource.h> // xres - dpi
-#endif
-# else
+#include "evas_common.h"
+#include "evas_private.h"
+#include "evas_gl_common.h"
+#include "Evas.h"
+#include "Evas_Engine_GL_X11.h"
+
+#define GL_GLEXT_PROTOTYPES
+
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+# if defined(GLES_VARIETY_S3C6410)
+#  include <EGL/egl.h>
+#  include <GLES2/gl2.h>
+#  include <X11/Xlib.h>
+#  include <X11/Xatom.h>
+#  include <X11/Xutil.h>
+#  include <X11/extensions/Xrender.h>
+#  include <X11/Xresource.h> // xres - dpi
+# elif defined(GLES_VARIETY_SGX)
+#  define SUPPORT_X11 1
+#  include <EGL/egl.h>
+#  include <GLES2/gl2.h>
+#  include <GLES2/gl2ext.h>
 #  include <X11/Xlib.h>
 #  include <X11/Xatom.h>
 #  include <X11/Xutil.h>
 #  include <X11/extensions/Xrender.h>
 #  include <X11/Xresource.h> // xres - dpi
-#  include <GL/gl.h>
-#  include <GL/glext.h>
-#  include <GL/glx.h>
 # endif
+#else
+# include <X11/Xlib.h>
+# include <X11/Xatom.h>
+# include <X11/Xutil.h>
+# include <X11/extensions/Xrender.h>
+# include <X11/Xresource.h> // xres - dpi
+# include <GL/gl.h>
+# include <GL/glext.h>
+# include <GL/glx.h>
 #endif
-#include "evas_common.h"
-#include "evas_private.h"
-#include "evas_gl_common.h"
-#include "Evas.h"
-#include "Evas_Engine_GL_X11.h"
 
 extern int _evas_engine_GL_X11_log_dom ;
 #ifdef ERR
index e370e75..d25de0e 100644 (file)
@@ -214,14 +214,13 @@ eng_window_new(Display *disp,
        eng_window_free(gw);
         return NULL;
      }
-    _evas_gl_x11_window = gw;
 
    vendor = glGetString(GL_VENDOR);
    renderer = glGetString(GL_RENDERER);
    version = glGetString(GL_VERSION);
-   if (!vendor) vendor = "-UNKNOWN-";
-   if (!renderer) renderer = "-UNKNOWN-";
-   if (!version) version = "-UNKNOWN-";
+   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);
@@ -500,7 +499,6 @@ eng_window_new(Display *disp,
           }
      }
 #endif
-   _evas_gl_x11_window = gw;
    
    gw->gl_context = evas_gl_common_context_new();
    if (!gw->gl_context)
@@ -511,10 +509,11 @@ eng_window_new(Display *disp,
 #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
    gw->gl_context->egldisp = gw->egl_disp;
 #endif   
-   evas_gl_common_context_use(gw->gl_context);
+   eng_window_use(gw);
    evas_gl_common_context_resize(gw->gl_context, w, h, rot);
    gw->surf = 1;
    return gw;
+   indirect = 0;
 }
 
 void
@@ -525,13 +524,13 @@ eng_window_free(Evas_GL_X11_Window *gw)
    eng_window_use(gw);
    if (gw == _evas_gl_x11_window) _evas_gl_x11_window = NULL;
    if (gw->gl_context)
-      {
-         ref = gw->gl_context->references - 1;
-         evas_gl_common_context_free(gw->gl_context);
-      }
+     {
+        ref = gw->gl_context->references - 1;
+        evas_gl_common_context_free(gw->gl_context);
+     }
 #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]);
+      eglDestroySurface(gw->egl_disp, gw->egl_surface[0]);
    if (ref == 0)
      {
         if (context) eglDestroyContext(gw->egl_disp, context);
@@ -570,15 +569,23 @@ eng_window_use(Evas_GL_X11_Window *gw)
                 _evas_gl_x11_window->egl_surface[0]))
            force_use = EINA_TRUE;
      }
-#else   
+#else
+   if (_evas_gl_x11_window)
+     {
+        if (glXGetCurrentContext() != _evas_gl_x11_window->context)
+           force_use = EINA_TRUE;
+     }
 #endif   
    if ((_evas_gl_x11_window != gw) || (force_use))
      {
         if (_evas_gl_x11_window)
-          evas_gl_common_context_flush(_evas_gl_x11_window->gl_context);
-       _evas_gl_x11_window = gw;
-       if (gw)
-         {
+          {
+             evas_gl_common_context_use(_evas_gl_x11_window->gl_context);
+             evas_gl_common_context_flush(_evas_gl_x11_window->gl_context);
+          }
+        _evas_gl_x11_window = gw;
+        if (gw)
+          {
 // EGL / GLES
 #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
            if (gw->egl_surface[0] != EGL_NO_SURFACE)
@@ -609,7 +616,7 @@ eng_window_use(Evas_GL_X11_Window *gw)
                  }
              }
 #endif
-         }
+          }
      }
    if (gw) evas_gl_common_context_use(gw->gl_context);
 }
diff --git a/src/modules/engines/quartz/Evas_Engine_Quartz.h b/src/modules/engines/quartz/Evas_Engine_Quartz.h
deleted file mode 100644 (file)
index 0a277f4..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef _EVAS_ENGINE_QUARTZ_H
-#define _EVAS_ENGINE_QUARTZ_H
-
-#include <ApplicationServices/ApplicationServices.h>
-
-typedef struct _Evas_Engine_Info_Quartz Evas_Engine_Info_Quartz;
-
-struct _Evas_Engine_Info_Quartz
-{
-   /* 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 {
-      CGContextRef context;
-   } info;
-
-   /* non-blocking or blocking mode */
-   Evas_Engine_Render_Mode render_mode;
-};
-
-#endif
-
-
diff --git a/src/modules/engines/quartz/Makefile.am b/src/modules/engines/quartz/Makefile.am
deleted file mode 100644 (file)
index 17be2de..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = \
--I. \
--I$(top_srcdir)/src/lib \
--I$(top_srcdir)/src/lib/include \
-@evas_engine_quartz_cflags@ \
-@FREETYPE_CFLAGS@ \
-@EINA_CFLAGS@
-
-if BUILD_ENGINE_QUARTZ
-
-QUARTZ_SOURCES = evas_engine.c
-QUARTZ_LIBADD = @evas_engine_quartz_libs@
-
-
-includes_HEADERS = Evas_Engine_Quartz.h
-includesdir = $(includedir)/evas-@VMAJ@
-
-if !EVAS_STATIC_BUILD_QUARTZ
-
-pkgdir = $(libdir)/evas/modules/engines/quartz/$(MODULE_ARCH)
-pkg_LTLIBRARIES = module.la
-
-module_la_SOURCES = $(QUARTZ_SOURCES)
-module_la_LIBADD = @EINA_LIBS@ $(QUARTZ_LIBADD) $(top_builddir)/src/lib/libevas.la
-module_la_LDFLAGS = -module -avoid-version
-module_la_LIBTOOLFLAGS = --tag=disable-static
-
-else
-
-noinst_LTLIBRARIES = libevas_engine_quartz.la
-
-libevas_engine_quartz_la_SOURCES = $(QUARTZ_SOURCES)
-libevas_engine_quartz_la_LIBADD = $(QUARTZ_LIBADD)
-
-endif
-endif
-
-EXTRA_DIST = \
-evas_engine.h \
-evas_quartz_private.h
diff --git a/src/modules/engines/quartz/README b/src/modules/engines/quartz/README
deleted file mode 100644 (file)
index eb12dc6..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-================
-==INSTALLATION==
-================
-
-Here's what I had to do to get Evas_Quartz working on a fresh install of Mac OS X Leopard (Evas_Quartz is currently not versions prior to 10.5):
-
-1) Install all system software updates.
-
-2) Install the XCode developer tools (this includes GCC).
-
-3) Install macports.
-
-4) Put /opt/local/bin in your path, permanently. (I put it in front of everything else, because the newer versions of autotools provided by ports are required to build evas)
-
-5) With macports, install the following: m4, autoconf, automake, libtool, pkgconfig, zlib, libpng, jpeg, freetype, tiff.
-
-6) Check out a version of Evas that includes Evas_Quartz (from CVS).
-
-7) Set up your environment. You need to, at the very least, set:
-       CFLAGS=-I/opt/local/include
-       LDFLAGS=-L/opt/local/lib
-       
-8) Build and install eet.
-
-9) Build and install evas. Make sure to use --enable-quartz when configuring!
-
-==============
-==KNOWN BUGS==
-==============
-
-****  A few different types of gradients don't currently draw.
-**    Textbox drawing is a little bit off (because of hardcoded constants that shouldn't exist).
\ No newline at end of file
diff --git a/src/modules/engines/quartz/evas_engine.c b/src/modules/engines/quartz/evas_engine.c
deleted file mode 100644 (file)
index 6ed0c25..0000000
+++ /dev/null
@@ -1,1353 +0,0 @@
-#include <ApplicationServices/ApplicationServices.h>
-
-#include "evas_common.h"
-#include "evas_private.h"
-#include "evas_engine.h"
-#include "Evas_Engine_Quartz.h"
-#include "evas_quartz_private.h"
-int _evas_engine_quartz_log_dom = -1;
-static Evas_Func func;
-
-typedef struct _Render_Engine Render_Engine;
-
-struct _Render_Engine
-{
-   CGContextRef ctx;
-   int w, h;
-
-   struct
-   {
-      int redraw : 1;
-      int x1, y1, x2, y2;
-   } draw;
-};
-
-static inline void
-flip_pixels(int *y, int *h, void *re)
-{
-   // We need to flip the Y axis, because Quartz uses a coordinate system
-   // with the origin in the bottom left, while Evas uses a top left origin.
-
-   (*y) = ((Evas_Quartz_Context *)re)->h - (*y);
-
-   if (h && y) (*y) -= *h;
-}
-
-static void *
-eng_info(Evas *e)
-{
-   Evas_Engine_Info_Quartz *info;
-   
-   info = calloc(1, sizeof(Evas_Engine_Info_Quartz));
-   if (!info) return NULL;
-   info->magic.magic = rand();
-   info->render_mode = EVAS_RENDER_MODE_BLOCKING;
-   return info;
-}
-
-static void
-eng_info_free(Evas *e, void *info)
-{
-   free((Evas_Engine_Info_Quartz *)info);
-}
-
-static int
-eng_setup(Evas *e, void *in)
-{
-   Render_Engine *re;
-   Evas_Engine_Info_Quartz *info = (Evas_Engine_Info_Quartz *)in;
-
-   if (!e->engine.data.output)
-     e->engine.data.output = eng_output_setup(info->info.context, e->output.w, e->output.h);
-   if (!e->engine.data.output) return 0;
-
-   if (!e->engine.data.context)
-      e->engine.data.context = e->engine.func->context_new(e->engine.data.output);
-
-   ((Evas_Quartz_Context *)e->engine.data.context)->w = e->output.w;
-   ((Evas_Quartz_Context *)e->engine.data.context)->h = e->output.h;
-
-   return 1;
-}
-
-#pragma mark Output Setup
-
-static void *
-eng_output_setup(CGContextRef context, int w, int h)
-{
-   Render_Engine *re = calloc(1, sizeof(Render_Engine));
-   if (!re) return NULL;
-
-   re->ctx = context;
-   re->w = w;
-   re->h = h;
-
-   evas_common_cpu_init();
-
-   evas_common_blend_init();
-   evas_common_image_init();
-   evas_common_convert_init();
-   evas_common_scale_init();
-   evas_common_rectangle_init();
-   evas_common_polygon_init();
-   evas_common_line_init();
-   evas_common_font_init();
-   evas_common_draw_init();
-   evas_common_tilebuf_init();
-
-   return re;
-}
-
-static void
-eng_output_free(void *data)
-{
-   Render_Engine *re = (Render_Engine *)data;
-
-   free(re);
-
-   evas_common_font_shutdown();
-   evas_common_image_shutdown();
-}
-
-static void
-eng_output_resize(void *data, int w, int h)
-{
-   Render_Engine *re = (Render_Engine *)data;
-
-   re->w = w;
-   re->h = h;
-}
-
-static void
-eng_output_redraws_rect_add(void *data, int x, int y, int w, int h)
-{
-   Render_Engine *re = (Render_Engine *)data;
-
-   if (!re->draw.redraw)
-   {
-      re->draw.x1 = x;
-      re->draw.y1 = y;
-      re->draw.x2 = x + w;
-      re->draw.y2 = y + h;
-   }
-   else
-   {
-      if (x < re->draw.x1) re->draw.x1 = x;
-      if (y < re->draw.y1) re->draw.y1 = y;
-      if ((x + w - 1) > re->draw.x2) re->draw.x2 = x + w - 1;
-      if ((y + h - 1) > re->draw.y2) re->draw.y2 = y + h - 1;
-   }
-
-   re->draw.redraw = 1;
-}
-
-static void
-eng_output_redraws_rect_del(void *data, int x, int y, int w, int h)
-{
-   // FIXME: Implement this?
-}
-
-static void
-eng_output_redraws_clear(void *data)
-{
-   Render_Engine *re = (Render_Engine *)data;
-
-   re->draw.redraw = 0;
-}
-
-static void *
-eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch)
-{
-   Render_Engine *re = (Render_Engine *)data;
-
-   if (!re->draw.redraw) return NULL;
-
-   if (x) *x = re->draw.x1;
-   if (y) *y = re->draw.y1;
-   if (w) *w = re->draw.x2 - re->draw.x1 + 1;
-   if (h) *h = re->draw.y2 - re->draw.y1 + 1;
-   if (cx) *cx = re->draw.x1;
-   if (cy) *cy = re->draw.y1;
-   if (cw) *cw = re->draw.x2 - re->draw.x1 + 1;
-   if (ch) *ch = re->draw.y2 - re->draw.y1 + 1;
-
-   return re;
-}
-
-static void
-eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h)
-{
-   Render_Engine *re = (Render_Engine *)data;
-   Evas_Quartz_Context *ctx = (Evas_Quartz_Context *)(re->ctx);
-   re->draw.redraw = 0;
-
-   flip_pixels(&y, &h, ctx);
-
-   CGContextClearRect(re->ctx, CGRectMake(x, y, w, h));
-}
-
-static void
-eng_output_flush(void *data)
-{
-   // By default, Apple coalesces calls to CGContextFlush, but this actually
-   // blocks if called more than 60 times per second, which is a waste of time.
-   //
-   // http://developer.apple.com/technotes/tn2005/tn2133.html
-
-   CGContextFlush(((Render_Engine *)data)->ctx);
-}
-
-#pragma mark Context Manipulation
-
-static void *
-eng_context_new(void *data)
-{
-   Evas_Quartz_Context *ctxt = calloc(1, sizeof(Evas_Quartz_Context));
-   if (!ctxt) return NULL;
-
-   return ctxt;
-}
-
-static void
-eng_context_free(void *data, void *context)
-{
-   Render_Engine *re = (Render_Engine *)data;
-   Evas_Quartz_Context *ctxt = (Evas_Quartz_Context *)context;
-
-   if (re->ctx) CGContextRelease(re->ctx);
-   free(ctxt);
-}
-
-static void
-eng_context_clip_set(void *data, void *context, int x, int y, int w, int h)
-{
-   Render_Engine *re = (Render_Engine *)data;
-   Evas_Quartz_Context *ctxt = (Evas_Quartz_Context *)context;
-
-   flip_pixels(&y, &h, ctxt);
-
-   CGContextResetClip(re->ctx);
-   CGContextClipToRect(re->ctx, CGRectMake(0, 0, re->w, re->h)); // don't draw over the title bar
-   CGContextClipToRect(re->ctx, CGRectMake(x, y, w, h));
-
-   ctxt->clipped = 1;
-}
-
-static void
-eng_context_clip_unset(void *data, void *context)
-{
-   Render_Engine *re = (Render_Engine *)data;
-   Evas_Quartz_Context *ctxt = (Evas_Quartz_Context *)context;
-
-   CGContextResetClip(re->ctx);
-
-   ctxt->clipped = 0;
-}
-
-static int
-eng_context_clip_get(void *data, void *context, int *x, int *y, int *w, int *h)
-{
-   Render_Engine *re = (Render_Engine *)data;
-   Evas_Quartz_Context *ctxt = (Evas_Quartz_Context *)context;
-
-   CGRect clip = CGContextGetClipBoundingBox(re->ctx);
-   if (x) *x = clip.origin.x;
-   if (y) *y = clip.origin.y;
-   if (w) *w = clip.size.width;
-   if (h) *h = clip.size.height;
-
-   return ctxt->clipped;
-}
-
-static void
-eng_context_color_set(void *data, void *context, int r, int g, int b, int a)
-{
-   Evas_Quartz_Context *ctxt = (Evas_Quartz_Context *)context;
-
-   ctxt->col.r = (double)r / 255.0;
-   ctxt->col.g = (double)g / 255.0;
-   ctxt->col.b = (double)b / 255.0;
-   ctxt->col.a = (double)a / 255.0;
-}
-
-static int
-eng_context_color_get(void *data, void *context, int *r, int *g, int *b, int *a)
-{
-   Evas_Quartz_Context *ctxt = (Evas_Quartz_Context *)context;
-
-   if (r) *r = ctxt->col.r * 255;
-   if (g) *g = ctxt->col.g * 255;
-   if (b) *b = ctxt->col.b * 255;
-   if (a) *a = ctxt->col.a * 255;
-   return 1;
-}
-
-static void
-eng_context_multiplier_set(void *data, void *context, int r, int g, int b, int a)
-{
-   Render_Engine *re = (Render_Engine *)data;
-   Evas_Quartz_Context *ctxt = (Evas_Quartz_Context *)context;
-
-   ctxt->mul.r = (double)r / 255.0;
-   ctxt->mul.g = (double)g / 255.0;
-   ctxt->mul.b = (double)b / 255.0;
-   ctxt->mul.a = (double)a / 255.0;
-   ctxt->mul.set = 1;
-
-   CGContextSetAlpha(re->ctx, ctxt->mul.a);
-}
-
-static void
-eng_context_multiplier_unset(void *data, void *context)
-{
-   Render_Engine *re = (Render_Engine *)data;
-   Evas_Quartz_Context *ctxt = (Evas_Quartz_Context *)context;
-
-   ctxt->mul.set = 0;
-   CGContextSetAlpha(re->ctx, 1.0);
-}
-
-static int
-eng_context_multiplier_get(void *data, void *context, int *r, int *g, int *b, int *a)
-{
-   Evas_Quartz_Context *ctxt = (Evas_Quartz_Context *)context;
-
-   if (r) *r = ctxt->mul.r * 255;
-   if (g) *g = ctxt->mul.g * 255;
-   if (b) *b = ctxt->mul.b * 255;
-   if (a) *a = ctxt->mul.a * 255;
-   return ctxt->mul.set;
-}
-
-static void
-eng_context_cutout_add(void *data, void *context, int x, int y, int w, int h)
-{
-   // FIXME: This doesn't seem to be implemented anywhere. What does it do?
-}
-
-static void
-eng_context_cutout_clear(void *data, void *context)
-{
-   // FIXME: This doesn't seem to be implemented anywhere. What does it do?
-}
-
-static void
-eng_context_anti_alias_set(void *data, void *context, unsigned char aa)
-{
-   Render_Engine *re = (Render_Engine *)data;
-   Evas_Quartz_Context *ctxt = (Evas_Quartz_Context *)context;
-
-   ctxt->aa = aa;
-
-   CGContextSetAllowsAntialiasing(re->ctx, (bool)aa);
-   CGContextSetShouldAntialias(re->ctx, (bool)aa);
-   CGContextSetInterpolationQuality(re->ctx, kCGInterpolationLow); // is it OK to assume low quality?
-}
-
-static unsigned char
-eng_context_anti_alias_get(void *data, void *context)
-{
-   Evas_Quartz_Context *ctxt = (Evas_Quartz_Context *)context;
-
-   return ctxt->aa;
-}
-
-#pragma mark Rectangle Drawing
-
-static void
-eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h)
-{
-   Render_Engine *re = (Render_Engine *)data;
-   Evas_Quartz_Context *ctxt = (Evas_Quartz_Context *)context;
-   double r, g, b, a;
-
-   flip_pixels(&y, &h, ctxt);
-
-   r = ctxt->col.r;
-   g = ctxt->col.g;
-   b = ctxt->col.b;
-   a = ctxt->col.a;
-
-   if (ctxt->mul.set)
-   {
-      r *= ctxt->mul.r;
-      g *= ctxt->mul.g;
-      b *= ctxt->mul.b;
-      a *= ctxt->mul.a;
-   }
-
-   CGContextSetRGBFillColor(re->ctx, r, g, b, a);
-   CGContextFillRect(re->ctx, CGRectMake(x, y, w, h));
-}
-
-#pragma mark Line Drawing
-
-static void
-eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int x2, int y2)
-{
-   Render_Engine *re = (Render_Engine *)data;
-   Evas_Quartz_Context *ctxt = (Evas_Quartz_Context *)context;
-   double r, g, b, a;
-
-   flip_pixels(&y1, NULL, ctxt);
-   flip_pixels(&y2, NULL, ctxt);
-
-   r = ctxt->col.r;
-   g = ctxt->col.g;
-   b = ctxt->col.b;
-   a = ctxt->col.a;
-
-   if (ctxt->mul.set)
-   {
-      r *= ctxt->mul.r;
-      g *= ctxt->mul.g;
-      b *= ctxt->mul.b;
-      a *= ctxt->mul.a;
-   }
-
-   CGContextSetRGBStrokeColor(re->ctx, r, g, b, a);
-   CGContextBeginPath(re->ctx);
-   CGContextMoveToPoint(re->ctx, x1, y1);
-   CGContextAddLineToPoint(re->ctx, x2, y2);
-   CGContextStrokePath(re->ctx);
-}
-
-#pragma mark Polygon Manipulation & Drawing
-
-static void *
-eng_polygon_point_add(void *data, void *context, void *polygon, int x, int y)
-{
-   Evas_Quartz_Polygon *poly;
-   Evas_Quartz_Polygon_Point *pt;
-   Evas_Quartz_Context *ctxt = (Evas_Quartz_Context *)context;
-
-   flip_pixels(&y, NULL, ctxt);
-
-   poly = (Evas_Quartz_Polygon *)polygon;
-   if (!poly) poly = calloc(1, sizeof(Evas_Quartz_Polygon));
-   if (!poly) return NULL;
-
-   pt = calloc(1, sizeof(Evas_Quartz_Polygon_Point));
-   if (pt)
-   {
-      pt->x = x;
-      pt->y = y;
-      poly->points = eina_list_append(poly->points, pt);
-   }
-   return poly;
-}
-
-static void *
-eng_polygon_points_clear(void *data, void *context, void *polygon)
-{
-   Evas_Quartz_Polygon *poly;
-
-   poly = (Evas_Quartz_Polygon *)polygon;
-   if (!poly) return NULL;
-
-   while (poly->points)
-   {
-      free(poly->points->data);
-      poly->points = eina_list_remove_list(poly->points, poly->points);
-   }
-   free(poly);
-
-   return NULL;
-}
-
-static void
-eng_polygon_draw(void *data, void *context, void *surface, void *polygon)
-{
-   Render_Engine *re = (Render_Engine *)data;
-   Evas_Quartz_Context *ctxt = (Evas_Quartz_Context *)context;
-   Evas_Quartz_Polygon *poly = (Evas_Quartz_Polygon *)polygon;
-   Evas_Quartz_Polygon_Point *pt;
-
-   double r, g, b, a;
-
-   CGContextBeginPath(re->ctx);
-
-   pt = poly->points->data;
-   if (pt)
-   {
-      Eina_List *l;
-      CGContextMoveToPoint(re->ctx, pt->x, pt->y);
-      EINA_LIST_FOREACH(poly->points->next, l, pt)
-       CGContextAddLineToPoint(re->ctx, pt->x, pt->y);
-   }
-
-   r = ctxt->col.r;
-   g = ctxt->col.g;
-   b = ctxt->col.b;
-   a = ctxt->col.a;
-
-   if (ctxt->mul.set)
-   {
-      r *= ctxt->mul.r;
-      g *= ctxt->mul.g;
-      b *= ctxt->mul.b;
-      a *= ctxt->mul.a;
-   }
-
-   CGContextSetRGBFillColor(re->ctx, r, g, b, a);
-   CGContextFillPath(re->ctx);
-}
-
-#pragma mark Image Manipulation & Drawing
-
-static void *
-eng_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo)
-{
-   Evas_Quartz_Image *im = calloc(1, sizeof(Evas_Quartz_Image));
-
-   // FIXME: set error before returning without a new image...
-   // I can't figure out what to set it to, even trying to follow through the core code.
-   // Also, none of the other engines set it.
-
-   if (!im)
-     {
-       *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
-       return NULL;
-     }
-
-   *error = EVAS_LOAD_ERROR_NONE;
-   im->im = (RGBA_Image *)evas_common_load_image_from_file(file, key, lo, error);
-   if (!im->im)
-   {
-      free(im);
-      return NULL;
-   }
-   im->references = 1;
-   return im;
-}
-
-static void *
-eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
-{
-   Evas_Quartz_Image *im = calloc(1, sizeof(Evas_Quartz_Image));
-
-   if (!im) return NULL;
-
-   im->im = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(), w, h, image_data, alpha, cspace);
-   im->references = 1;
-
-   if (!im->im)
-   {
-      free(im);
-      return NULL;
-   }
-
-   return im;
-}
-
-static void *
-eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
-{
-   Evas_Quartz_Image *im = calloc(1, sizeof(Evas_Quartz_Image));
-
-   if (!im) return NULL;
-
-   im->im = (RGBA_Image *)evas_cache_image_copied_data(evas_common_image_cache_get(), w, h, image_data, alpha, cspace);
-   im->references = 1;
-
-   if (!im->im)
-   {
-      free(im);
-      return NULL;
-   }
-
-   return im;
-}
-
-static void
-eng_image_free(void *data, void *image)
-{
-   Evas_Quartz_Image *im = (Evas_Quartz_Image *)image;
-
-   if (!im) return;
-
-   if (--im->references > 0) return;
-
-   if (im->cgim) CGImageRelease(im->cgim);
-   if (im->im) evas_cache_image_drop(&im->im->cache_entry);
-   free(im);
-}
-
-static void
-eng_image_data_preload_request(void *data __UNUSED__, void *image, const void *target)
-{
-   Evas_Quartz_Image *im = (Evas_Quartz_Image *)image;
-
-   if (!im || !im->im) return ;
-   evas_cache_image_preload_data(&im->im->cache_entry, target);
-}
-
-static void
-eng_image_data_preload_cancel(void *data __UNUSED__, void *image, const void *target)
-{
-   Evas_Quartz_Image *im = (Evas_Quartz_Image *)image;
-
-   if (!im || !im->im) return ;
-   evas_cache_image_preload_cancel(&im->im->cache_entry, target);
-}
-
-static void *
-eng_image_size_set(void *data, void *image, int w, int h)
-{
-   Evas_Quartz_Image *im = (Evas_Quartz_Image *)image;
-   Evas_Quartz_Image *im_old;
-
-   if (!im) return NULL;
-   im_old = image;
-   if ((eng_image_colorspace_get(data, image) == EVAS_COLORSPACE_YCBCR422P601_PL) ||
-       (eng_image_colorspace_get(data, image) == EVAS_COLORSPACE_YCBCR422P709_PL))
-      w &= ~0x1;
-
-   if ((im_old) && (im_old->im->cache_entry.w == w) && (im_old->im->cache_entry.h == h))
-      return image;
-
-   if ((w <= 0) || (h <= 0))
-   {
-      eng_image_free(data, im_old);
-      return NULL;
-   }
-
-   if (im_old)
-   {
-      im = eng_image_new_from_data(data, w, h, im_old->im->image.data, eng_image_alpha_get(data, im_old), eng_image_colorspace_get(data, im_old));
-      eng_image_free(data, im_old);
-   }
-   else
-      im = eng_image_new_from_data(data, w, h, NULL, true, EVAS_COLORSPACE_ARGB8888);
-   return im;
-}
-
-static void
-eng_image_size_get(void *data, void *image, int *w, int *h)
-{
-   Evas_Quartz_Image *im = (Evas_Quartz_Image *)image;
-
-   if (!image)
-   {
-      if (w) *w = 0;
-      if (h) *h = 0;
-   }
-   else
-   {
-      if (w) *w = im->im->cache_entry.w;
-      if (h) *h = im->im->cache_entry.h;
-   }
-}
-
-static void *
-eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h)
-{
-   Evas_Quartz_Image *im = (Evas_Quartz_Image *)image;
-
-   if ((im) && (im->im))
-      return evas_cache_image_dirty(&im->im->cache_entry, x, y, w, h);
-}
-
-static void *
-eng_image_alpha_set(void *data, void *image, int has_alpha)
-{
-   Evas_Quartz_Image *im = (Evas_Quartz_Image *)image;
-
-   if ((!im) || (!im->im)) return NULL;
-
-   if (im->im->cache_entry.space != EVAS_COLORSPACE_ARGB8888)
-   {
-      im->im->cache_entry.flags.alpha = 0;
-   }
-   else
-   {
-      im->im = (RGBA_Image *)evas_cache_image_alone(&im->im->cache_entry);
-      evas_common_image_colorspace_dirty(im->im);
-      im->im->cache_entry.flags.alpha = has_alpha ? 1 : 0;
-   }
-
-   return im;
-}
-
-static int
-eng_image_alpha_get(void *data, void *image)
-{
-   Evas_Quartz_Image *im = (Evas_Quartz_Image *) image;
-
-   if (!im->im) return 0;
-
-   return (int)(im->im->cache_entry.flags.alpha);
-}
-
-static char *
-eng_image_comment_get(void *data, void *image, char *key)
-{
-   Evas_Quartz_Image *im = (Evas_Quartz_Image *)image;
-
-   if ((!im) || (!im->im))
-      return NULL;
-   else
-      return im->im->info.comment;
-}
-
-static char *
-eng_image_format_get(void *data, void *image)
-{
-   // these are unimplemented for now, until core features are finished
-
-   return NULL;
-}
-
-static void
-eng_image_colorspace_set(void *data, void *image, int cspace)
-{
-   Evas_Quartz_Image *im = (Evas_Quartz_Image *)image;
-
-   if (!im)
-      return;
-   else
-      evas_cache_image_colorspace(&im->im->cache_entry, cspace);
-}
-
-static int
-eng_image_colorspace_get(void *data, void *image)
-{
-   Evas_Quartz_Image *im = (Evas_Quartz_Image *)image;
-
-   if (!im)
-      return EVAS_COLORSPACE_ARGB8888;
-   else
-      return im->im->cache_entry.space;
-}
-
-static void
-eng_image_native_set(void *data, void *image, void *native)
-{
-   // these are unimplemented for now, until core features are finished
-}
-
-static void *
-eng_image_native_get(void *data, void *image)
-{
-   // these are unimplemented for now, until core features are finished
-   return NULL;
-}
-
-static void *
-eng_image_data_put(void *data, void *image, DATA32 *image_data)
-{
-   // FIXME: one last leak somewhere in this function
-
-   Evas_Quartz_Image *im_old = (Evas_Quartz_Image *)image;
-
-   if (!im_old) return NULL;
-
-   if (im_old->cgim)
-   {
-      CGImageRelease(im_old->cgim);
-      im_old->cgim = NULL;
-   }
-
-   switch (im_old->im->cache_entry.space)
-   {
-      case EVAS_COLORSPACE_ARGB8888:
-         image = eng_image_new_from_data(data, im_old->im->cache_entry.w, im_old->im->cache_entry.h, image_data, 1, EVAS_COLORSPACE_ARGB8888);
-         eng_image_free(data, im_old);
-         break;
-      case EVAS_COLORSPACE_YCBCR422P709_PL:
-      case EVAS_COLORSPACE_YCBCR422P601_PL:
-         if (image_data != im_old->im->cs.data)
-         {
-            if (im_old->im->cs.data)
-               if (!im_old->im->cs.no_free)
-                  free(im_old->im->cs.data);
-
-            im_old->im->cs.data = image_data;
-            evas_common_image_colorspace_dirty(im_old->im);
-         }
-         break;
-   }
-
-   if (!image) return NULL;
-
-   return image;
-}
-
-static void *
-eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
-{
-   Evas_Quartz_Image *im = (Evas_Quartz_Image *)image;
-
-   if ((!im) || (!im->im))
-   {
-      *image_data = NULL;
-      return NULL;
-   }
-
-   switch (im->im->cache_entry.space)
-   {
-      case EVAS_COLORSPACE_ARGB8888:
-         if (to_write)
-         {
-            CGImageRelease(im->cgim);
-            im->cgim = NULL;
-
-            if (im->references > 1)
-            {
-               Evas_Quartz_Image *im_new;
-               im_new = eng_image_new_from_copied_data(data,
-                                                       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)
-               {
-                  if (image_data) *image_data = NULL;
-                  return im;
-               }
-
-               eng_image_free(data, im);
-               im = im_new;
-            }
-            else
-            {
-               im->im = (RGBA_Image *)evas_cache_image_dirty(&im->im->cache_entry,
-                                                            0, 0,
-                                                            im->im->cache_entry.w, im->im->cache_entry.h);
-               im->references++;
-            }
-         }
-
-         evas_cache_image_load_data(&im->im->cache_entry);
-
-         if (image_data) *image_data = im->im->image.data;
-         break;
-      case EVAS_COLORSPACE_YCBCR422P709_PL:
-      case EVAS_COLORSPACE_YCBCR422P601_PL:
-         if (image_data) *image_data = im->im->cs.data;
-         im->references++;
-         break;
-      default:
-         abort(); // this seems ... incredibly unreasonable, but GL does it...
-         break;
-   }
-
-   return im;
-}
-
-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 = (Render_Engine *)data;
-   Evas_Quartz_Context *ctxt = (Evas_Quartz_Context *)context;
-   Evas_Quartz_Image *im = (Evas_Quartz_Image *)image;
-   flip_pixels(&dst_y, &dst_h, ctxt);
-
-   if ((!im) || (!im->im)) return;
-
-   if (!im->cgim)
-   {
-      CGColorSpaceRef colorspace;
-      CGDataProviderRef provider;
-      evas_cache_image_load_data(&im->im->cache_entry);
-      evas_common_image_colorspace_normalize((RGBA_Image *)(&im->im->cache_entry));
-
-      if (!im->im->image.data) return;
-
-      colorspace = CGColorSpaceCreateDeviceRGB();
-      provider = CGDataProviderCreateWithData(NULL,
-                                              im->im->image.data,
-                                              im->im->cache_entry.w * im->im->cache_entry.h * sizeof(DATA32),
-                                              NULL);
-      im->cgim = CGImageCreate(im->im->cache_entry.w,
-                               im->im->cache_entry.h,
-                               8,
-                               8 * 4,
-                               4 * im->im->cache_entry.w,
-                               colorspace,
-                               kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host,
-                               provider,
-                               NULL,
-                               smooth,
-                               kCGRenderingIntentDefault);
-
-      CGDataProviderRelease(provider);
-      CGColorSpaceRelease(colorspace);
-
-      if (!im->cgim) return;
-   }
-
-   CGImageRef subImage = NULL;
-
-   if (src_x != 0 || src_y != 0 || src_w != 0 || src_h != 0)
-   {
-      subImage = CGImageCreateWithImageInRect(im->cgim, CGRectMake(src_x,src_y,src_w,src_h));
-      if (!subImage) return;
-
-      CGContextDrawImage(re->ctx, CGRectMake(dst_x, dst_y, dst_w, dst_h), subImage);
-      CGImageRelease(subImage);
-   }
-   else
-      CGContextDrawImage(re->ctx, CGRectMake(dst_x, dst_y, dst_w, dst_h), im->cgim);
-}
-
-static void
-eng_image_scale_hint_set(void *data __UNUSED__, void *image, int hint)
-{
-}
-
-static int
-eng_image_scale_hint_get(void *data __UNUSED__, void *image)
-{
-   return EVAS_IMAGE_SCALE_HINT_NONE;
-}
-
-
-#pragma mark Text Manipulation & Drawing
-
-static Evas_Quartz_Font *
-quartz_font_from_ats(ATSFontContainerRef container, int size)
-{
-   ItemCount count;
-   ATSFontRef *fonts;
-   CTFontRef font;
-   CFStringRef keys[1];
-   CFTypeRef values[1];
-   CFDictionaryRef attr;
-   Evas_Quartz_Font *loaded_font;
-
-   ATSFontFindFromContainer(container, kATSOptionFlagsDefault, 0, NULL, &count);
-   fonts = calloc(count, sizeof(ATSFontRef));
-   if (!fonts) return NULL;
-   ATSFontFindFromContainer(container, kATSOptionFlagsDefault, count, fonts, NULL);
-
-   font = CTFontCreateWithPlatformFont(fonts[0], size, NULL, NULL);
-
-   loaded_font = calloc(1, sizeof(Evas_Quartz_Font));
-   if (!font || !loaded_font)
-      {
-         if (loaded_font) free(loaded_font);
-         if (fonts) free(fonts);
-         if (font) CFRelease(font);
-         return NULL;
-      }
-
-   keys[0] = kCTFontAttributeName;
-   values[0] = font;
-   attr = CFDictionaryCreate(NULL,
-                            (const void **)&keys,
-                            (const void **)&values,
-                            sizeof(keys) / sizeof(keys[0]),
-                            &kCFTypeDictionaryKeyCallBacks,
-                            &kCFTypeDictionaryValueCallBacks);
-
-   loaded_font->font = font;
-   loaded_font->attr = attr;
-   loaded_font->size = size;
-
-   free(fonts);
-
-   return loaded_font;
-}
-
-static void *
-eng_font_add(void *data, void *font, const char *name, int size)
-{
-   // FIXME: what is this function supposed to do?
-   // if I delete it, we eventually crash when it gets run
-
-   return (char *)name;
-}
-
-static void *
-eng_font_load(void *data, const char *name, int size)
-{
-   FSRef fontFile;
-   ATSFontContainerRef container;
-
-   FSPathMakeRef((unsigned char *)name, &fontFile, NULL);
-   ATSFontActivateFromFileReference(&fontFile, kATSFontContextLocal, kATSFontFormatUnspecified, NULL, kATSOptionFlagsDefault, &container);
-
-   return quartz_font_from_ats(container, size);;
-}
-
-static void *
-eng_font_memory_load(void *data, char *name, int size, const void *fdata, int fdata_size)
-{
-   ATSFontContainerRef container;
-
-   ATSFontActivateFromMemory((void *)fdata, fdata_size, kATSFontContextLocal, kATSFontFormatUnspecified, NULL, kATSOptionFlagsDefault, &container);
-
-   return quartz_font_from_ats(container, size);
-}
-
-static void
-eng_font_free(void *data, void *font)
-{
-   Evas_Quartz_Font *loaded_font = (Evas_Quartz_Font *)font;
-
-   CFRelease(loaded_font->font);
-   CFRelease(loaded_font->attr);
-   free(loaded_font);
-}
-
-static int
-eng_font_ascent_get(void *data, void *font)
-{
-   Evas_Quartz_Font *loaded_font = (Evas_Quartz_Font *)font;
-
-   return CTFontGetAscent(loaded_font->font);
-}
-
-static int
-eng_font_descent_get(void *data, void *font)
-{
-   Evas_Quartz_Font *loaded_font = (Evas_Quartz_Font *)font;
-
-   return CTFontGetDescent(loaded_font->font);
-}
-
-static int
-eng_font_max_ascent_get(void *data, void *font)
-{
-   Evas_Quartz_Font *loaded_font = (Evas_Quartz_Font *)font;
-
-   return CTFontGetAscent(loaded_font->font);
-}
-
-static int
-eng_font_max_descent_get(void *data, void *font)
-{
-   Evas_Quartz_Font *loaded_font = (Evas_Quartz_Font *)font;
-
-   return CTFontGetDescent(loaded_font->font);
-}
-
-static void
-eng_font_string_size_get(void *data, void *font, const char *text, const Evas_Text_Props *text_props, int *w, int *h)
-{
-   Render_Engine *re = (Render_Engine *)data;
-   Evas_Quartz_Font *loaded_font = (Evas_Quartz_Font *)font;
-
-   CFStringRef string = CFStringCreateWithCString(NULL, text, kCFStringEncodingUTF8);
-   CFAttributedStringRef attrString = CFAttributedStringCreate(NULL, string, loaded_font->attr);
-   CTLineRef line = CTLineCreateWithAttributedString(attrString);
-   CGContextSetTextMatrix(re->ctx, CGAffineTransformIdentity);
-   CGContextSetTextPosition(re->ctx, 0, CTFontGetDescent(loaded_font->font));
-   CGRect bounds = CTLineGetImageBounds(line, re->ctx);
-
-   // Descenders on characters seem to leave origin at typographic origin, instead of image origin.
-   // Evas expects text to be treated like an image, so we have to offset by the typographic origin.
-
-   if (w) (*w) = ceil(bounds.size.width + bounds.origin.x);
-   if (h) (*h) = ceil(bounds.size.height + bounds.origin.y);
-
-   CFRelease(attrString);
-   CFRelease(string);
-   CFRelease(line);
-}
-
-static int
-eng_font_inset_get(void *data, void *font, const Evas_Text_Props *intl_props)
-{
-   return 0;
-}
-
-static int
-eng_font_h_advance_get(void *data, void *font, const char *text, const Evas_Text_Props *text_props)
-{
-   int w;
-
-   eng_font_string_size_get(data, font, text, text_props, &w, NULL);
-
-   return w + 2; // FIXME: shouldn't need a constant here. from where do we get word spacing?
-   // it seems we lose the space between differently-styled text in a text block. Why?
-}
-
-static int
-eng_font_v_advance_get(void *data, void *font, const char *text, const Evas_Text_Props *text_props)
-{
-   int h;
-
-   eng_font_string_size_get(data, font, text, text_props, NULL, &h);
-
-   return h;
-}
-
-static int
-eng_font_char_coords_get(void *data, void *font, const char *text, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch)
-{
-   Evas_Quartz_Font *loaded_font = (Evas_Quartz_Font *)font;
-
-   CFStringRef string = CFStringCreateWithCString(NULL, text, kCFStringEncodingUTF8);
-   CFAttributedStringRef attrString = CFAttributedStringCreate(NULL, string, loaded_font->attr);
-   CTLineRef line = CTLineCreateWithAttributedString(attrString);
-
-   float offset = CTLineGetOffsetForStringIndex(line, pos, NULL);
-   if (cx) *cx = offset;
-   if (cy) *cy = loaded_font->size;
-
-   CFRelease(attrString);
-   CFRelease(string);
-   CFRelease(line);
-
-   return 1;
-}
-
-/*FIXME: this is *NOT* implemennted correctly, look at the other engines to
- * see what needed to be done */
-static int
-eng_font_pen_coords_get(void *data, void *font, const char *text, const Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch)
-{
-   return eng_font_char_coords_get(data, font, text, text_props, pos, cpen_x,
-         cy, cadv, ch);
-}
-
-static Eina_Bool
-eng_font_text_props_info_create(void *data __UNUSED__, void *font, Eina_Unicode *text, Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len)
-{
-   (void) font;
-   (void) text;
-   (void) text_props;
-   (void) par_props;
-   (void) pos;
-   (void) len;
-#if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT)
-   evas_bidi_shape_string(text, par_props, pos, len);
-#endif
-   return evas_common_text_props_content_create(font, text, text_props, len);
-}
-
-static int
-eng_font_char_at_coords_get(void *data, void *font, const char *text, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch)
-{
-   // Return the index of the character at the given point, also lookup it's origin x, y, w, and h.
-   Evas_Quartz_Font *loaded_font = (Evas_Quartz_Font *)font;
-
-   CFStringRef string = CFStringCreateWithCString(NULL, text, kCFStringEncodingUTF8);
-   CFAttributedStringRef attrString = CFAttributedStringCreate(NULL, string, loaded_font->attr);
-   CTLineRef line = CTLineCreateWithAttributedString(attrString);
-
-   int stringIndex = (int) CTLineGetStringIndexForPosition(line, CGPointMake(x, y));
-
-   // In order to get the character's size and position, look up the position of this character and the next one
-   eng_font_char_coords_get(data, font, text, text_props, stringIndex, cx, cy, NULL, NULL);
-   eng_font_char_coords_get(data, font, text, text_props, stringIndex + 1, cw, NULL, NULL, NULL);
-
-   if (cw && cx) *cw -= *cx;
-   if (ch) *ch = loaded_font->size;
-
-   CFRelease(attrString);
-   CFRelease(string);
-   CFRelease(line);
-
-   return stringIndex;
-}
-
-static void
-eng_font_hinting_set(void *data, void *font, int hinting)
-{
-   Evas_Quartz_Font *loaded_font = (Evas_Quartz_Font *)font;
-   loaded_font->hint = hinting;
-}
-
-static int
-eng_font_hinting_can_hint(void *data, int hinting)
-{
-   return 1;
-}
-
-static void
-eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, const char *text, const Evas_Text_Props *text_props)
-{
-   Render_Engine *re = (Render_Engine *)data;
-   Evas_Quartz_Context *ctxt = (Evas_Quartz_Context *)context;
-   Evas_Quartz_Font *loaded_font = (Evas_Quartz_Font *)font;
-   double r, g, b, a;
-   CGFloat colors[4];
-   CGColorSpaceRef colorspace;
-   CGColorRef color;
-   CFStringRef keys[2];
-   CFTypeRef values[2];
-   CFDictionaryRef attr;
-   CFStringRef string;
-   CFAttributedStringRef attrString;
-   CTLineRef line;
-
-   flip_pixels(&y, &h, ctxt);
-
-   // FIXME: I know this should never happen, but the next line is magic.
-   // It's also... broken. It /works/, but ... for example, subtracting 1 shouldn't need to happen.
-   // The text drawing is a mess, but this is the closest I've gotten yet...
-
-   y += floor(CTFontGetAscent(loaded_font->font) - (CTFontGetXHeight(loaded_font->font) + CTFontGetDescent(loaded_font->font))) - 1;
-
-   CGContextSetShouldSmoothFonts(re->ctx, (bool)(loaded_font->hint));
-
-   r = ctxt->col.r;
-   g = ctxt->col.g;
-   b = ctxt->col.b;
-   a = ctxt->col.a;
-
-   if (ctxt->mul.set)
-   {
-      r *= ctxt->mul.r;
-      g *= ctxt->mul.g;
-      b *= ctxt->mul.b;
-      a *= ctxt->mul.a;
-   }
-
-   colors[0] = r;
-   colors[1] = g;
-   colors[2] = b;
-   colors[3] = a;
-
-   // Create an attributed string
-   colorspace = CGColorSpaceCreateDeviceRGB();
-   color = CGColorCreate(colorspace, colors);
-
-   keys[0] =   kCTFontAttributeName;
-   values[0] = loaded_font->font;
-   keys[1] =   kCTForegroundColorAttributeName;
-   values[1] = color;
-
-   attr = CFDictionaryCreate(NULL, (const void **)&keys, (const void **)&values, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
-   string = CFStringCreateWithCString(NULL, text, kCFStringEncodingUTF8);
-   attrString = CFAttributedStringCreate(NULL, string, attr);
-
-   // Draw the string
-   line = CTLineCreateWithAttributedString(attrString);
-   CGContextSetTextMatrix(re->ctx, CGAffineTransformIdentity);
-   CGContextSetTextPosition(re->ctx, x, y + h);
-   CTLineDraw(line, re->ctx);
-
-   // Clean up
-   CGColorSpaceRelease(colorspace);
-   CFRelease(attr);
-   CFRelease(string);
-   CFRelease(attrString);
-   CFRelease(line);
-   CGColorRelease(color);
-}
-
-#pragma mark Module Function Export
-
-static int
-module_open(Evas_Module *em)
-{
-   if (!em) return 0;
-
-   if (!_evas_module_engine_inherit(&func, "software_generic")) return 0;
-
-   _evas_engine_quartz_log_dom = eina_log_domain_register
-     ("evas-quartz", EVAS_DEFAULT_LOG_COLOR);
-   if (_evas_engine_quartz_log_dom < 0)
-     {
-        EINA_LOG_ERR("Can not create a module log domain.");
-        return 0;
-     }
-
-   #define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_)
-   ORD(context_anti_alias_get);
-   ORD(context_anti_alias_set);
-   ORD(context_clip_get);
-   ORD(context_clip_set);
-   ORD(context_clip_unset);
-   ORD(context_color_get);
-   ORD(context_color_set);
-   ORD(context_cutout_add);
-   ORD(context_cutout_clear);
-   ORD(context_free);
-   ORD(context_multiplier_get);
-   ORD(context_multiplier_set);
-   ORD(context_multiplier_unset);
-   ORD(context_new);
-   ORD(font_add);
-   ORD(font_ascent_get);
-   ORD(font_char_at_coords_get);
-   ORD(font_char_coords_get);
-   ORD(font_descent_get);
-   ORD(font_draw);
-   ORD(font_free);
-   ORD(font_hinting_can_hint);
-   ORD(font_hinting_set);
-   ORD(font_h_advance_get);
-   ORD(font_inset_get);
-   ORD(font_load);
-   ORD(font_max_ascent_get);
-   ORD(font_max_descent_get);
-   ORD(font_memory_load);
-   ORD(font_string_size_get);
-   ORD(font_v_advance_get);
-   ORD(image_alpha_get);
-   ORD(image_alpha_set);
-   ORD(image_colorspace_get);
-   ORD(image_colorspace_set);
-   ORD(image_comment_get);
-   ORD(image_data_get);
-   ORD(image_data_put);
-   ORD(image_data_preload_request);
-   ORD(image_data_preload_cancel);
-   ORD(image_dirty_region);
-   ORD(image_draw);
-   ORD(image_format_get);
-   ORD(image_free);
-   ORD(image_load);
-   ORD(image_native_get);
-   ORD(image_native_set);
-   ORD(image_new_from_copied_data);
-   ORD(image_new_from_data);
-   ORD(image_size_get);
-   ORD(image_size_set);
-   ORD(info);
-   ORD(info_free);
-   ORD(line_draw);
-   ORD(output_flush);
-   ORD(output_free);
-   ORD(output_redraws_clear);
-   ORD(output_redraws_next_update_get);
-   ORD(output_redraws_next_update_push);
-   ORD(output_redraws_rect_add);
-   ORD(output_redraws_rect_del);
-   ORD(output_resize);
-   ORD(polygon_draw);
-   ORD(polygon_points_clear);
-   ORD(polygon_point_add);
-   ORD(rectangle_draw);
-   ORD(setup);
-
-   ORD(image_scale_hint_set);
-   ORD(image_scale_hint_get);
-
-//   ORD(image_map_draw);
-//   ORD(image_map_surface_new);
-//   ORD(image_map_surface_free);
-   /* now advertise out our api */
-   em->functions = (void *)(&func);
-   return 1;
-}
-
-static void
-module_close(Evas_Module *em)
-{
-   eina_log_domain_unregister(_evas_engine_quartz_log_dom);
-}
-
-static Evas_Module_Api evas_modapi =
-{
-   EVAS_MODULE_API_VERSION,
-   "quartz",
-   "none",
-   {
-     module_open,
-     module_close
-   }
-};
-
-EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, quartz);
-
-#ifndef EVAS_STATIC_BUILD_QUARTZ
-EVAS_EINA_MODULE_DEFINE(engine, quartz);
-#endif
diff --git a/src/modules/engines/quartz/evas_engine.h b/src/modules/engines/quartz/evas_engine.h
deleted file mode 100644 (file)
index c259c07..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-#ifndef EVAS_ENGINE_H
-#define EVAS_ENGINE_H
-
-#include <ApplicationServices/ApplicationServices.h>
-
-/* log domain variable declared in evas_engine.c */
-extern int _evas_engine_quartz_log_dom ;
-#ifdef ERR
-# undef ERR
-#endif
-#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_quartz_log_dom, __VA_ARGS__)
-
-#ifdef DBG
-# undef DBG
-#endif
-#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_quartz_log_dom, __VA_ARGS__)
-
-#ifdef INF
-# undef INF
-#endif
-#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_quartz_log_dom, __VA_ARGS__)
-
-#ifdef WRN
-# undef WRN
-#endif
-#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_quartz_log_dom, __VA_ARGS__)
-
-#ifdef CRIT
-# undef CRIT
-#endif
-#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_quartz_log_dom, __VA_ARGS__)
-
-typedef struct _Evas_Quartz_Context Evas_Quartz_Context;
-
-struct _Evas_Quartz_Context
-{
-   int         w, h;
-
-   struct
-   {
-      double   r, g, b, a;
-   } col;
-
-   struct
-   {
-      double   r, g, b, a;
-      int      set : 1;
-   } mul;
-
-   unsigned char aa, clipped;
-};
-
-typedef struct _Evas_Quartz_Polygon Evas_Quartz_Polygon;
-
-struct _Evas_Quartz_Polygon
-{
-   Eina_List *points;
-};
-
-typedef struct _Evas_Quartz_Polygon_Point Evas_Quartz_Polygon_Point;
-
-struct _Evas_Quartz_Polygon_Point
-{
-   int x, y;
-};
-
-typedef struct _Evas_Quartz_Image Evas_Quartz_Image;
-
-struct _Evas_Quartz_Image
-{
-   RGBA_Image  *im;
-   CGImageRef  cgim;
-
-   int         references;
-};
-
-typedef struct _Evas_Quartz_Font Evas_Quartz_Font;
-
-struct _Evas_Quartz_Font
-{
-   CTFontRef         font;
-   CFDictionaryRef   attr;
-   int               hint;
-   int               size;
-};
-
-#endif
diff --git a/src/modules/engines/quartz/evas_quartz_private.h b/src/modules/engines/quartz/evas_quartz_private.h
deleted file mode 100644 (file)
index 024d274..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-#ifndef _EVAS_QUARTZ_PRIVATE_H_
-#define _EVAS_QUARTZ_PRIVATE_H_
-
-#include "evas_common.h"/* Also includes international specific stuff */
-#include "evas_engine.h"
-
-CG_EXTERN void CGContextResetClip (CGContextRef); // undocumented CoreGraphics function to clear clip rect
-
-static inline void flip_pixels(int *y, int *h, void *re);
-
-static void *eng_info(Evas *e);
-static void eng_info_free(Evas *e, void *info);
-
-static void *eng_output_setup(CGContextRef context, int w, int h);
-static int eng_setup(Evas *e, void *in);
-
-static void eng_output_free(void *data);
-static void eng_output_resize(void *data, int w, int h);
-static void eng_output_redraws_rect_add(void *data, int x, int y, int w, int h);
-static void eng_output_redraws_rect_del(void *data, int x, int y, int w, int h);
-static void eng_output_redraws_clear(void *data);
-static void *eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch);
-static void eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h);
-static void eng_output_flush(void *data);
-
-static void *eng_context_new(void *data);
-static void eng_context_free(void *data, void *context);
-static void eng_context_clip_set(void *data, void *context, int x, int y, int w, int h);
-static void eng_context_clip_unset(void *data, void *context);
-static int eng_context_clip_get(void *data, void *context, int *x, int *y, int *w, int *h);
-static void eng_context_color_set(void *data, void *context, int r, int g, int b, int a);
-static int eng_context_color_get(void *data, void *context, int *r, int *g, int *b, int *a);
-static void eng_context_multiplier_set(void *data, void *context, int r, int g, int b, int a);
-static void eng_context_multiplier_unset(void *data, void *context);
-static int eng_context_multiplier_get(void *data, void *context, int *r, int *g, int *b, int *a);
-static void eng_context_cutout_add(void *data, void *context, int x, int y, int w, int h);
-static void eng_context_cutout_clear(void *data, void *context);
-static void eng_context_anti_alias_set(void *data, void *context, unsigned char aa);
-static unsigned char eng_context_anti_alias_get(void *data, void *context);
-
-static void eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h);
-
-static void eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int x2, int y2);
-
-static void *eng_polygon_point_add(void *data, void *context, void *polygon, int x, int y);
-static void *eng_polygon_points_clear(void *data, void *context, void *polygon);
-static void eng_polygon_draw(void *data, void *context, void *surface, void *polygon);
-
-static void *eng_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo);
-
-static void *eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
-static void *eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
-static void eng_image_free(void *data, void *image);
-static void eng_image_size_get(void *data, void *image, int *w, int *h);
-static void *eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h);
-static void *eng_image_alpha_set(void *data, void *image, int has_alpha);
-static int eng_image_alpha_get(void *data, void *image);
-static char *eng_image_comment_get(void *data, void *image, char *key);
-static char *eng_image_format_get(void *data, void *image);
-static void eng_image_colorspace_set(void *data, void *image, int cspace);
-static int eng_image_colorspace_get(void *data, void *image);
-static void eng_image_native_set(void *data, void *image, void *native);
-static void *eng_image_native_get(void *data, void *image);
-static void *eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data);
-static void *eng_image_data_put(void *data, void *image, DATA32 *image_data);
-static void *eng_image_size_set(void *data, void *image, int w, int h);
-static void eng_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth);
-
-static void *eng_font_add(void *data, void *font, const char *name, int size);
-static Evas_Quartz_Font *quartz_font_from_ats(ATSFontContainerRef container, int size);
-static void *eng_font_load(void *data, const char *name, int size);
-static void *eng_font_memory_load(void *data, char *name, int size, const void *fdata, int fdata_size);
-static void eng_font_free(void *data, void *font);
-static int eng_font_ascent_get(void *data, void *font);
-static int eng_font_descent_get(void *data, void *font);
-static int eng_font_max_ascent_get(void *data, void *font);
-static int eng_font_max_descent_get(void *data, void *font);
-static void eng_font_string_size_get(void *data, void *font, const char *text, const Evas_Text_Props *intl_props, int *w, int *h);
-static int eng_font_inset_get(void *data, void *font, const Evas_Text_Props *intl_props);
-static int eng_font_right_inset_get(void *data, void *font, const Evas_Text_Props *intl_props);
-static int eng_font_h_advance_get(void *data, void *font, const char *text, const Evas_Text_Props *intl_props);
-static int eng_font_v_advance_get(void *data, void *font, const char *text, const Evas_Text_Props *intl_props);
-static int eng_font_char_coords_get(void *data, void *font, const char *text, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch);
-static int eng_font_pen_coords_get(void *data, void *font, const char *text, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch);
-static Eina_Bool eng_font_text_props_info_create(void *data __UNUSED__, void *font, Eina_Unicode *text, Evas_Text_Props *intl_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len);
-static int eng_font_char_at_coords_get(void *data, void *font, const char *text, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch);
-static void eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, const char *text, const Evas_Text_Props *intl_props);
-static void eng_font_hinting_set(void *data, void *font, int hinting);
-static int eng_font_hinting_can_hint(void *data, int hinting);
-
-#endif /* _EVAS_QUARTZ_PRIVATE_H_ */
diff --git a/src/modules/engines/software_16/.cvsignore b/src/modules/engines/software_16/.cvsignore
deleted file mode 100644 (file)
index 09980ae..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
index 1735d7b..070d610 100644 (file)
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib/include \
 -I$(top_srcdir)/src/modules/engines \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@
 
 AM_CFLAGS = @WIN32_CFLAGS@
index eaec10e..5aad3a0 100644 (file)
@@ -9,6 +9,8 @@
  *****
  */
 int _evas_soft16_log_dom = -1;
+/* function tables - filled in later (func and parent func) */
+static Evas_Func func, pfunc;
 #ifdef ERR
 #undef ERR
 #endif
@@ -39,141 +41,6 @@ int _evas_soft16_log_dom = -1;
            __FUNCTION__, __FILE__, __LINE__)
 
 static void
-eng_output_dump(void *data __UNUSED__)
-{
-   evas_common_image_image_all_unload();
-   evas_common_font_font_all_unload();
-}
-
-static void *
-eng_context_new(void *data __UNUSED__)
-{
-   return evas_common_draw_context_new();
-}
-
-static void
-eng_context_free(void *data __UNUSED__, void *context)
-{
-   evas_common_draw_context_free(context);
-}
-
-static void
-eng_context_clip_set(void *data __UNUSED__, void *context, int x, int y, int w, int h)
-{
-   evas_common_draw_context_set_clip(context, x, y, w, h);
-}
-
-static void
-eng_context_clip_clip(void *data __UNUSED__, void *context, int x, int y, int w, int h)
-{
-   evas_common_draw_context_clip_clip(context, x, y, w, h);
-}
-
-static void
-eng_context_clip_unset(void *data __UNUSED__, void *context)
-{
-   evas_common_draw_context_unset_clip(context);
-}
-
-static int
-eng_context_clip_get(void *data __UNUSED__, void *context, int *x, int *y, int *w, int *h)
-{
-   *x = ((RGBA_Draw_Context *)context)->clip.x;
-   *y = ((RGBA_Draw_Context *)context)->clip.y;
-   *w = ((RGBA_Draw_Context *)context)->clip.w;
-   *h = ((RGBA_Draw_Context *)context)->clip.h;
-   return ((RGBA_Draw_Context *)context)->clip.use;
-}
-
-static void
-eng_context_color_set(void *data __UNUSED__, void *context, int r, int g, int b, int a)
-{
-   evas_common_draw_context_set_color(context, r, g, b, a);
-}
-
-static int
-eng_context_color_get(void *data __UNUSED__, void *context, int *r, int *g, int *b, int *a)
-{
-   *r = (int)(R_VAL(&((RGBA_Draw_Context *)context)->col.col));
-   *g = (int)(G_VAL(&((RGBA_Draw_Context *)context)->col.col));
-   *b = (int)(B_VAL(&((RGBA_Draw_Context *)context)->col.col));
-   *a = (int)(A_VAL(&((RGBA_Draw_Context *)context)->col.col));
-   return 1;
-}
-
-static void
-eng_context_multiplier_set(void *data __UNUSED__, void *context, int r, int g, int b, int a)
-{
-   evas_common_draw_context_set_multiplier(context, r, g, b, a);
-}
-
-static void
-eng_context_multiplier_unset(void *data __UNUSED__, void *context)
-{
-   evas_common_draw_context_unset_multiplier(context);
-}
-
-static int
-eng_context_multiplier_get(void *data __UNUSED__, void *context, int *r, int *g, int *b, int *a)
-{
-   *r = (int)(R_VAL(&((RGBA_Draw_Context *)context)->mul.col));
-   *g = (int)(G_VAL(&((RGBA_Draw_Context *)context)->mul.col));
-   *b = (int)(B_VAL(&((RGBA_Draw_Context *)context)->mul.col));
-   *a = (int)(A_VAL(&((RGBA_Draw_Context *)context)->mul.col));
-   return ((RGBA_Draw_Context *)context)->mul.use;
-}
-
-static void
-eng_context_cutout_add(void *data __UNUSED__, void *context, int x, int y, int w, int h)
-{
-   evas_common_draw_context_add_cutout(context, x, y, w, h);
-}
-
-static void
-eng_context_cutout_clear(void *data __UNUSED__, void *context)
-{
-   evas_common_draw_context_clear_cutouts(context);
-}
-
-static void
-eng_context_anti_alias_set(void *data __UNUSED__, void *context, unsigned char aa)
-{
-   evas_common_draw_context_set_anti_alias(context, aa);
-}
-
-static unsigned char
-eng_context_anti_alias_get(void *data __UNUSED__, void *context)
-{
-   return ((RGBA_Draw_Context *)context)->anti_alias;
-}
-
-static void
-eng_context_color_interpolation_set(void *data __UNUSED__, void *context, int color_space)
-{
-   evas_common_draw_context_set_color_interpolation(context, color_space);
-}
-
-static int
-eng_context_color_interpolation_get(void *data __UNUSED__, void *context)
-{
-   return ((RGBA_Draw_Context *)context)->interpolation.color_space;
-}
-
-static void
-eng_context_render_op_set(void *data __UNUSED__, void *context, int op)
-{
-   evas_common_draw_context_set_render_op(context, op);
-}
-
-static int
-eng_context_render_op_get(void *data __UNUSED__, void *context)
-{
-   return ((RGBA_Draw_Context *)context)->render_op;
-}
-
-
-
-static void
 eng_rectangle_draw(void *data __UNUSED__, void *context, void *surface, int x, int y, int w, int h)
 {
    evas_common_soft16_rectangle_draw(surface, context, x, y, w, h);
@@ -185,18 +52,6 @@ eng_line_draw(void *data __UNUSED__, void *context, void *surface, int x1, int y
    evas_common_soft16_line_draw(surface, context, x1, y1, x2, y2);
 }
 
-static void *
-eng_polygon_point_add(void *data __UNUSED__, void *context __UNUSED__, void *polygon, int x, int y)
-{
-   return evas_common_polygon_point_add(polygon, x, y);
-}
-
-static void *
-eng_polygon_points_clear(void *data __UNUSED__, void *context __UNUSED__, void *polygon)
-{
-   return evas_common_polygon_points_clear(polygon);
-}
-
 static void
 eng_polygon_draw(void *data __UNUSED__, void *context, void *surface, void *polygon, int x, int y)
 {
@@ -213,12 +68,6 @@ eng_image_alpha_get(void *data __UNUSED__, void *image)
    return im->cache_entry.flags.alpha;
 }
 
-static int
-eng_image_colorspace_get(void *data __UNUSED__, void *image __UNUSED__)
-{
-   return EVAS_COLORSPACE_RGB565_A5P;
-}
-
 static void *
 eng_image_alpha_set(void *data __UNUSED__, void *image, int have_alpha)
 {
@@ -228,17 +77,6 @@ eng_image_alpha_set(void *data __UNUSED__, void *image, int have_alpha)
    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__)
-{
-   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__)
-{
-}
-
 static char *
 eng_image_comment_get(void *data __UNUSED__, void *image __UNUSED__, char *key __UNUSED__)
 {
@@ -252,6 +90,12 @@ eng_image_format_get(void *data __UNUSED__, void *image __UNUSED__)
    return NULL;
 }
 
+eng_image_colorspace_get(void *data __UNUSED__, void *image __UNUSED__)
+{
+   return EVAS_COLORSPACE_RGB565_A5P;
+}
+
+
 static void
 eng_image_colorspace_set(void *data __UNUSED__, void *image __UNUSED__, int cspace __UNUSED__)
 {
@@ -303,12 +147,6 @@ eng_image_new_from_copied_data(void *data __UNUSED__, int w, int h, DATA32 *imag
 }
 
 static void
-eng_image_free(void *data __UNUSED__, void *image)
-{
-   evas_cache_image_drop((Image_Entry *) image);
-}
-
-static void
 eng_image_size_get(void *data __UNUSED__, void *image, int *w, int *h)
 {
    Soft16_Image *im;
@@ -353,9 +191,10 @@ eng_image_dirty_region(void *data __UNUSED__, void *image, int x __UNUSED__, int
 }
 
 static void *
-eng_image_data_get(void *data __UNUSED__, void *image, int to_write, DATA32 **image_data)
+eng_image_data_get(void *data __UNUSED__, void *image, int to_write, DATA32 **image_data, int *err)
 {
    Soft16_Image *im;
+   int error;
 
    if (!image)
      {
@@ -364,13 +203,14 @@ eng_image_data_get(void *data __UNUSED__, void *image, int to_write, DATA32 **im
      }
 
    im = image;
-   evas_cache_image_load_data(&im->cache_entry);
+   error = evas_cache_image_load_data(&im->cache_entry);
 
    if (to_write)
      im = (Soft16_Image *) evas_cache_image_alone(&im->cache_entry);
 
    if (image_data) *image_data = (DATA32 *) im->pixels;
 
+   if (err) *err = error;
    return im;
 }
 
@@ -450,137 +290,8 @@ eng_image_cache_get(void *data __UNUSED__)
    return evas_cache_image_get(evas_common_soft16_image_cache_get());
 }
 
-static void *
-eng_font_load(void *data __UNUSED__, const char *name, int size)
-{
-   return evas_common_font_load(name, size);
-}
-
-static void *
-eng_font_memory_load(void *data __UNUSED__, char *name, int size, const void *fdata, int fdata_size)
-{
-   return evas_common_font_memory_load(name, size, fdata, fdata_size);
-}
-
-static void *
-eng_font_add(void *data __UNUSED__, void *font, const char *name, int size)
-{
-   return evas_common_font_add(font, name, size);
-}
-
-static void *
-eng_font_memory_add(void *data __UNUSED__, void *font, char *name, int size, const void *fdata, int fdata_size)
-{
-   return evas_common_font_memory_add(font, name, size, fdata, fdata_size);
-}
-
 static void
-eng_font_free(void *data __UNUSED__, void *font)
-{
-   evas_common_font_free(font);
-}
-
-static int
-eng_font_ascent_get(void *data __UNUSED__, void *font)
-{
-   return evas_common_font_ascent_get(font);
-}
-
-static int
-eng_font_descent_get(void *data __UNUSED__, void *font)
-{
-   return evas_common_font_descent_get(font);
-}
-
-static int
-eng_font_max_ascent_get(void *data __UNUSED__, void *font)
-{
-   return evas_common_font_max_ascent_get(font);
-}
-
-static int
-eng_font_max_descent_get(void *data __UNUSED__, void *font)
-{
-   return evas_common_font_max_descent_get(font);
-}
-
-static void
-eng_font_string_size_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int *w, int *h)
-{
-   evas_common_font_query_size(font, text, text_props, w, h);
-}
-
-static int
-eng_font_inset_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props)
-{
-   return evas_common_font_query_inset(font, text_props);
-}
-
-static int
-eng_font_right_inset_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props)
-{
-   return evas_common_font_query_right_inset(font, text_props);
-}
-
-static int
-eng_font_h_advance_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props)
-{
-   int h, v;
-
-   evas_common_font_query_advance(font, text, text_props, &h, &v);
-   return h;
-}
-
-static int
-eng_font_v_advance_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props)
-{
-   int h, v;
-
-   evas_common_font_query_advance(font, text, text_props, &h, &v);
-   return v;
-}
-
-static int
-eng_font_pen_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch)
-{
-   return evas_common_font_query_pen_coords(font, text, text_props, pos, cpen_x, cy, cadv, ch);
-}
-
-static Eina_Bool
-eng_font_text_props_info_create(void *data __UNUSED__, void *font, Eina_Unicode *text, Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len)
-{
-   (void) font;
-   (void) text;
-   (void) text_props;
-   (void) par_props;
-   (void) pos;
-   (void) len;
-#if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT)
-   evas_bidi_shape_string(text, par_props, pos, len);
-#endif
-   return evas_common_text_props_content_create(font, text, text_props, len);
-}
-
-static int
-eng_font_char_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch)
-{
-   return evas_common_font_query_char_coords(font, text, text_props, pos, cx, cy, cw, ch);
-}
-
-static int
-eng_font_char_at_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch)
-{
-   return evas_common_font_query_char_at_coords(font, text, text_props, x, y, cx, cy, cw, ch);
-}
-
-static int
-eng_font_last_up_to_pos(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int x, int y)
-{
-   return evas_common_font_query_last_up_to_pos(font, text, text_props, x, y);
-}
-
-static void
-eng_font_draw(void *data __UNUSED__, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Eina_Unicode *text, const Evas_Text_Props *text_props)
+eng_font_draw(void *data __UNUSED__, 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 *text_props)
 {
    static RGBA_Image    *im = NULL;
    Soft16_Image         *dst = surface;
@@ -593,7 +304,7 @@ eng_font_draw(void *data __UNUSED__, void *context, void *surface, void *font, i
                                         evas_common_soft16_font_glyph_new,
                                         evas_common_soft16_font_glyph_free,
                                         evas_common_soft16_font_glyph_draw);
-   evas_common_font_draw(im, context, font, x, y, text, text_props);
+   evas_common_font_draw(im, context, (RGBA_Font *) font, x, y, text_props);
    evas_common_draw_context_font_ext_set(context,
                                         NULL,
                                         NULL,
@@ -601,162 +312,6 @@ eng_font_draw(void *data __UNUSED__, void *context, void *surface, void *font, i
                                         NULL);
 }
 
-static void
-eng_font_cache_flush(void *data __UNUSED__)
-{
-   evas_common_font_flush();
-}
-
-static void
-eng_font_cache_set(void *data __UNUSED__, int bytes)
-{
-   evas_common_font_cache_set(bytes);
-}
-
-static int
-eng_font_cache_get(void *data __UNUSED__)
-{
-   return evas_common_font_cache_get();
-}
-
-static void
-eng_font_hinting_set(void *data __UNUSED__, void *font, int hinting)
-{
-   evas_common_font_hinting_set(font, hinting);
-}
-
-static int
-eng_font_hinting_can_hint(void *data __UNUSED__, int hinting)
-{
-   return evas_common_hinting_available(hinting);
-}
-
-static Eina_Bool
-eng_canvas_alpha_get(void *data __UNUSED__, void *context __UNUSED__)
-{
-   return EINA_TRUE;
-}
-
-/*
- *****
- **
- ** ENGINE API
- **
- *****
- */
-
-static Evas_Func func =
-{
-   NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     eng_output_dump,
-     /* draw context virtual methods */
-     eng_context_new,
-     eng_canvas_alpha_get,
-     eng_context_free,
-     eng_context_clip_set,
-     eng_context_clip_clip,
-     eng_context_clip_unset,
-     eng_context_clip_get,
-     eng_context_color_set,
-     eng_context_color_get,
-     eng_context_multiplier_set,
-     eng_context_multiplier_unset,
-     eng_context_multiplier_get,
-     eng_context_cutout_add,
-     eng_context_cutout_clear,
-     eng_context_anti_alias_set,
-     eng_context_anti_alias_get,
-     eng_context_color_interpolation_set,
-     eng_context_color_interpolation_get,
-     eng_context_render_op_set,
-     eng_context_render_op_get,
-     /* rect draw funcs */
-     eng_rectangle_draw,
-     /* line draw funcs */
-     eng_line_draw,
-     /* polygon draw funcs */
-     eng_polygon_point_add,
-     eng_polygon_points_clear,
-     eng_polygon_draw,
-     /* image draw funcs */
-     eng_image_load,
-     eng_image_new_from_data,
-     eng_image_new_from_copied_data,
-     eng_image_free,
-     eng_image_size_get,
-     eng_image_size_set,
-     eng_image_stride_get,
-     eng_image_dirty_region,
-     eng_image_data_get,
-     eng_image_data_put,
-     eng_image_data_preload_request,
-     eng_image_data_preload_cancel,
-     eng_image_alpha_set,
-     eng_image_alpha_get,
-     eng_image_border_set,
-     eng_image_border_get,
-     eng_image_draw,
-     eng_image_comment_get,
-     eng_image_format_get,
-     eng_image_colorspace_set,
-     eng_image_colorspace_get,
-     eng_image_native_set,
-     eng_image_native_get,
-     /* image cache funcs */
-     eng_image_cache_flush,
-     eng_image_cache_set,
-     eng_image_cache_get,
-     /* font draw functions */
-     eng_font_load,
-     eng_font_memory_load,
-     eng_font_add,
-     eng_font_memory_add,
-     eng_font_free,
-     eng_font_ascent_get,
-     eng_font_descent_get,
-     eng_font_max_ascent_get,
-     eng_font_max_descent_get,
-     eng_font_string_size_get,
-     eng_font_inset_get,
-     eng_font_h_advance_get,
-     eng_font_v_advance_get,
-     eng_font_char_coords_get,
-     eng_font_char_at_coords_get,
-     eng_font_draw,
-     /* font cache functions */
-     eng_font_cache_flush,
-     eng_font_cache_set,
-     eng_font_cache_get,
-     /* font hinting functions */
-     eng_font_hinting_set,
-     eng_font_hinting_can_hint,
-     eng_image_scale_hint_set,
-     eng_image_scale_hint_get,
-     /* more font draw functions */
-     eng_font_last_up_to_pos,
-     NULL, //   ORD(image_map_draw);
-     NULL, //   ORD(image_map_surface_new);
-     NULL, //   ORD(image_map_surface_free);
-     NULL, // eng_image_content_hint_set - software doesn't use it
-     NULL, // eng_image_content_hint_get - software doesn't use it
-     eng_font_pen_coords_get,
-     eng_font_text_props_info_create,
-     eng_font_right_inset_get
-     /* FUTURE software generic calls go here */
-};
-
 /*
  *****
  **
@@ -769,6 +324,7 @@ static int
 module_open(Evas_Module *em)
 {
    if (!em) return 0;
+   if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
    _evas_soft16_log_dom = eina_log_domain_register
      ("evas-software_16", EVAS_DEFAULT_LOG_COLOR);
    if (_evas_soft16_log_dom < 0)
@@ -776,6 +332,43 @@ module_open(Evas_Module *em)
         EINA_LOG_ERR("Can not create a module log domain.");
         return 0;
      }
+   /* store it for later use */
+   func = pfunc;
+   /* now to override methods */
+   EVAS_API_RESET(info, &func);
+   EVAS_API_RESET(info_free, &func);
+   EVAS_API_RESET(setup, &func);
+#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_)
+   ORD(rectangle_draw);
+   ORD(line_draw);
+   ORD(polygon_draw);
+   ORD(image_load);
+   ORD(image_new_from_data);
+   ORD(image_new_from_copied_data);
+   ORD(image_size_get);
+   ORD(image_size_set);
+   ORD(image_stride_get);
+   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_draw);
+   ORD(image_comment_get);
+   ORD(image_format_get);
+   ORD(image_colorspace_set);
+   ORD(image_colorspace_get);
+   ORD(image_native_set);
+   ORD(image_native_get);
+   ORD(image_cache_flush);
+   ORD(image_cache_set);
+   ORD(image_cache_get);
+   ORD(font_draw);
+   ORD(image_scale_hint_set);
+   ORD(image_scale_hint_get);
+
    em->functions = (void *)(&func);
    
    return 1;
diff --git a/src/modules/engines/software_16_ddraw/.cvsignore b/src/modules/engines/software_16_ddraw/.cvsignore
deleted file mode 100644 (file)
index 8cb5c05..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile.in
-Makefile
-.deps
-.libs
index d32019e..adbf477 100644 (file)
@@ -9,6 +9,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/modules/engines/software_16 \
 @EINA_CFLAGS@ \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @evas_engine_software_16_ddraw_cflags@
 
 if BUILD_ENGINE_SOFTWARE_16_DDRAW
diff --git a/src/modules/engines/software_16_sdl/.cvsignore b/src/modules/engines/software_16_sdl/.cvsignore
deleted file mode 100644 (file)
index 09980ae..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
index 5a8dc2f..af0197d 100644 (file)
@@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS     = 1.4 foreign
 
 MAINTAINERCLEANFILES = Makefile.in
 
-INCLUDES = -I. -I$(top_srcdir)/src/lib -I$(top_srcdir)/src/lib/include @FREETYPE_CFLAGS@ @SDL_CFLAGS@ @EINA_CFLAGS@
+INCLUDES = -I. -I$(top_srcdir)/src/lib -I$(top_srcdir)/src/lib/include @FREETYPE_CFLAGS@ @PIXMAN_CFLAGS@ @SDL_CFLAGS@ @EINA_CFLAGS@
 
 if BUILD_ENGINE_SOFTWARE_SDL
 
index e4cf501..53e1995 100644 (file)
@@ -666,18 +666,19 @@ evas_engine_sdl16_image_dirty_region(void *data __UNUSED__,
 
 static void*
 evas_engine_sdl16_image_data_get(void *data __UNUSED__, void *image,
-                                 int to_write, DATA32** image_data)
+                                 int to_write, DATA32** image_data, int *err)
 {
    SDL_Engine_Image_Entry       *eim = image;
    Soft16_Image                 *im;
-
+   int                           error;
+   
    if (!eim)
      {
         *image_data = NULL;
         return NULL;
      }
    im = (Soft16_Image *) eim->cache_entry.src;
-   evas_cache_image_load_data(&im->cache_entry);
+   error = evas_cache_image_load_data(&im->cache_entry);
 
    if (to_write)
      eim = (SDL_Engine_Image_Entry *) evas_cache_engine_image_alone(&eim->cache_entry,
@@ -686,6 +687,7 @@ evas_engine_sdl16_image_data_get(void *data __UNUSED__, void *image,
    /* FIXME: Handle colorspace conversion correctly. */
    if (image_data) *image_data = (DATA32 *) im->pixels;
 
+   if (err) *err = error;
    return eim;
 }
 
@@ -873,7 +875,7 @@ evas_engine_sdl16_image_format_get(void *data __UNUSED__, void *image __UNUSED__
 }
 
 static void
-evas_engine_sdl16_font_draw(void *data __UNUSED__, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Eina_Unicode *text, const Evas_Text_Props *intl_props)
+evas_engine_sdl16_font_draw(void *data __UNUSED__, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *intl_props)
 {
    static RGBA_Image            *im = NULL;
    SDL_Engine_Image_Entry       *eim = surface;
@@ -895,7 +897,7 @@ evas_engine_sdl16_font_draw(void *data __UNUSED__, void *context, void *surface,
                                          evas_common_soft16_font_glyph_new,
                                          evas_common_soft16_font_glyph_free,
                                          evas_common_soft16_font_glyph_draw);
-   evas_common_font_draw(im, context, font, x, y, text, intl_props);
+   evas_common_font_draw(im, context, font, x, y, intl_props);
    evas_common_draw_context_font_ext_set(context,
                                          NULL,
                                          NULL,
diff --git a/src/modules/engines/software_16_wince/.cvsignore b/src/modules/engines/software_16_wince/.cvsignore
deleted file mode 100644 (file)
index 9730646..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.la
-*.lo
index d7e39b4..7f0c666 100644 (file)
@@ -9,6 +9,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/modules/engines/software_16 \
 @EINA_CFLAGS@ \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @evas_engine_software_16_wince_cflags@
 
 if BUILD_ENGINE_SOFTWARE_16_WINCE
diff --git a/src/modules/engines/software_16_x11/.cvsignore b/src/modules/engines/software_16_x11/.cvsignore
deleted file mode 100644 (file)
index 09980ae..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
index dc24584..812492e 100644 (file)
@@ -9,6 +9,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/modules/engines/software_16 \
 @FREETYPE_CFLAGS@ \
 @EINA_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @evas_engine_software_16_x11_cflags@
 
 if BUILD_ENGINE_SOFTWARE_16_X11
index 4c48018..145b766 100644 (file)
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib/include \
 -I$(top_srcdir)/src/modules/engines \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@
 
 AM_CFLAGS = @WIN32_CFLAGS@
index e060cdb..c7c123a 100644 (file)
@@ -9,6 +9,9 @@
  *****
  */
 int _evas_soft8_log_dom = -1;
+
+static Evas_Func func, pfunc;
+
 #ifdef ERR
 #undef ERR
 #endif
@@ -39,149 +42,6 @@ int _evas_soft8_log_dom = -1;
            __FUNCTION__, __FILE__, __LINE__)
 
 static void
-eng_output_dump(void *data __UNUSED__)
-{
-   evas_common_image_image_all_unload();
-   evas_common_font_font_all_unload();
-}
-
-static void *
-eng_context_new(void *data __UNUSED__)
-{
-   return evas_common_draw_context_new();
-}
-
-static void
-eng_context_free(void *data __UNUSED__, void *context)
-{
-   evas_common_draw_context_free(context);
-}
-
-static void
-eng_context_clip_set(void *data __UNUSED__, void *context, int x, int y, int w,
-                     int h)
-{
-   evas_common_draw_context_set_clip(context, x, y, w, h);
-}
-
-static void
-eng_context_clip_clip(void *data __UNUSED__, void *context, int x, int y, int w,
-                      int h)
-{
-   evas_common_draw_context_clip_clip(context, x, y, w, h);
-}
-
-static void
-eng_context_clip_unset(void *data __UNUSED__, void *context)
-{
-   evas_common_draw_context_unset_clip(context);
-}
-
-static int
-eng_context_clip_get(void *data __UNUSED__, void *context, int *x, int *y,
-                     int *w, int *h)
-{
-   *x = ((RGBA_Draw_Context *) context)->clip.x;
-   *y = ((RGBA_Draw_Context *) context)->clip.y;
-   *w = ((RGBA_Draw_Context *) context)->clip.w;
-   *h = ((RGBA_Draw_Context *) context)->clip.h;
-   return ((RGBA_Draw_Context *) context)->clip.use;
-}
-
-static void
-eng_context_color_set(void *data __UNUSED__, void *context, int r, int g, int b,
-                      int a)
-{
-   evas_common_draw_context_set_color(context, r, g, b, a);
-}
-
-static int
-eng_context_color_get(void *data __UNUSED__, void *context, int *r, int *g,
-                      int *b, int *a)
-{
-   *r = (int)(R_VAL(&((RGBA_Draw_Context *) context)->col.col));
-   *g = (int)(G_VAL(&((RGBA_Draw_Context *) context)->col.col));
-   *b = (int)(B_VAL(&((RGBA_Draw_Context *) context)->col.col));
-   *a = (int)(A_VAL(&((RGBA_Draw_Context *) context)->col.col));
-   return 1;
-}
-
-static void
-eng_context_multiplier_set(void *data __UNUSED__, void *context, int r, int g,
-                           int b, int a)
-{
-   evas_common_draw_context_set_multiplier(context, r, g, b, a);
-}
-
-static void
-eng_context_multiplier_unset(void *data __UNUSED__, void *context)
-{
-   evas_common_draw_context_unset_multiplier(context);
-}
-
-static int
-eng_context_multiplier_get(void *data __UNUSED__, void *context, int *r, int *g,
-                           int *b, int *a)
-{
-   *r = (int)(R_VAL(&((RGBA_Draw_Context *) context)->mul.col));
-   *g = (int)(G_VAL(&((RGBA_Draw_Context *) context)->mul.col));
-   *b = (int)(B_VAL(&((RGBA_Draw_Context *) context)->mul.col));
-   *a = (int)(A_VAL(&((RGBA_Draw_Context *) context)->mul.col));
-   return ((RGBA_Draw_Context *) context)->mul.use;
-}
-
-static void
-eng_context_cutout_add(void *data __UNUSED__, void *context, int x, int y,
-                       int w, int h)
-{
-   evas_common_draw_context_add_cutout(context, x, y, w, h);
-}
-
-static void
-eng_context_cutout_clear(void *data __UNUSED__, void *context)
-{
-   evas_common_draw_context_clear_cutouts(context);
-}
-
-static void
-eng_context_anti_alias_set(void *data __UNUSED__, void *context,
-                           unsigned char aa)
-{
-   evas_common_draw_context_set_anti_alias(context, aa);
-}
-
-static unsigned char
-eng_context_anti_alias_get(void *data __UNUSED__, void *context)
-{
-   return ((RGBA_Draw_Context *) context)->anti_alias;
-}
-
-static void
-eng_context_color_interpolation_set(void *data __UNUSED__, void *context,
-                                    int color_space)
-{
-   evas_common_draw_context_set_color_interpolation(context, color_space);
-}
-
-static int
-eng_context_color_interpolation_get(void *data __UNUSED__, void *context)
-{
-   return ((RGBA_Draw_Context *) context)->interpolation.color_space;
-}
-
-static void
-eng_context_render_op_set(void *data __UNUSED__, void *context, int op)
-{
-   evas_common_draw_context_set_render_op(context, op);
-}
-
-static int
-eng_context_render_op_get(void *data __UNUSED__, void *context)
-{
-   return ((RGBA_Draw_Context *) context)->render_op;
-}
-
-static void
 eng_rectangle_draw(void *data __UNUSED__, void *context, void *surface, int x,
                    int y, int w, int h)
 {
@@ -195,20 +55,6 @@ eng_line_draw(void *data __UNUSED__, void *context, void *surface, int x1,
    evas_common_soft8_line_draw(surface, context, x1, y1, x2, y2);
 }
 
-static void *
-eng_polygon_point_add(void *data __UNUSED__, void *context __UNUSED__,
-                      void *polygon, int x, int y)
-{
-   return evas_common_polygon_point_add(polygon, x, y);
-}
-
-static void *
-eng_polygon_points_clear(void *data __UNUSED__, void *context __UNUSED__,
-                         void *polygon)
-{
-   return evas_common_polygon_points_clear(polygon);
-}
-
 static void
 eng_polygon_draw(void *data __UNUSED__, void *context, void *surface,
                  void *polygon, int x, int y)
@@ -243,20 +89,6 @@ eng_image_alpha_set(void *data __UNUSED__, void *image, int have_alpha)
    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__)
-{
-   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__)
-{
-}
-
 static char *
 eng_image_comment_get(void *data __UNUSED__, void *image __UNUSED__,
                       char *key __UNUSED__)
@@ -393,9 +225,10 @@ eng_image_dirty_region(void *data __UNUSED__, void *image __UNUSED__,
 
 static void *
 eng_image_data_get(void *data __UNUSED__, void *image, int to_write,
-                   DATA32 ** image_data)
+                   DATA32 ** image_data, int *err)
 {
    Soft8_Image *im;
+   int error;
 
    if (!image)
      {
@@ -404,7 +237,7 @@ eng_image_data_get(void *data __UNUSED__, void *image, int to_write,
      }
 
    im = image;
-   evas_cache_image_load_data(&im->cache_entry);
+   error = evas_cache_image_load_data(&im->cache_entry);
 
    if (to_write)
       im = (Soft8_Image *) evas_cache_image_alone(&im->cache_entry);
@@ -412,6 +245,7 @@ eng_image_data_get(void *data __UNUSED__, void *image, int to_write,
    if (image_data)
       *image_data = (DATA32 *) im->pixels;
 
+   if (err) *err = error;
    return im;
 }
 
@@ -504,147 +338,13 @@ eng_image_cache_get(void *data __UNUSED__)
    return evas_cache_image_get(evas_common_soft8_image_cache_get());
 }
 
-static void *
-eng_font_load(void *data __UNUSED__, const char *name, int size)
-{
-   return evas_common_font_load(name, size);
-}
-
-static void *
-eng_font_memory_load(void *data __UNUSED__, char *name, int size,
-                     const void *fdata, int fdata_size)
-{
-   return evas_common_font_memory_load(name, size, fdata, fdata_size);
-}
-
-static void *
-eng_font_add(void *data __UNUSED__, void *font, const char *name, int size)
-{
-   return evas_common_font_add(font, name, size);
-}
-
-static void *
-eng_font_memory_add(void *data __UNUSED__, void *font, char *name, int size,
-                    const void *fdata, int fdata_size)
-{
-   return evas_common_font_memory_add(font, name, size, fdata, fdata_size);
-}
-
-static void
-eng_font_free(void *data __UNUSED__, void *font)
-{
-   evas_common_font_free(font);
-}
-
-static int
-eng_font_ascent_get(void *data __UNUSED__, void *font)
-{
-   return evas_common_font_ascent_get(font);
-}
-
-static int
-eng_font_descent_get(void *data __UNUSED__, void *font)
-{
-   return evas_common_font_descent_get(font);
-}
-
-static int
-eng_font_max_ascent_get(void *data __UNUSED__, void *font)
-{
-   return evas_common_font_max_ascent_get(font);
-}
-
-static int
-eng_font_max_descent_get(void *data __UNUSED__, void *font)
-{
-   return evas_common_font_max_descent_get(font);
-}
-
 static void
-eng_font_string_size_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, 
-                         int *w, int *h)
-{
-   evas_common_font_query_size(font, text, text_props, w, h);
-}
-
-static int
-eng_font_inset_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props)
-{
-   return evas_common_font_query_inset(font, text_props);
-}
-
-static int
-eng_font_right_inset_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props)
+eng_font_draw(void *data __UNUSED__, 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 *text_props)
 {
-   return evas_common_font_query_right_inset(font, text_props);
-}
-
-static int
-eng_font_h_advance_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props)
-{
-   int h, v;
-
-   evas_common_font_query_advance(font, text, text_props, &h, &v);
-   return h;
-}
-
-static int
-eng_font_v_advance_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props)
-{
-   int h, v;
-
-   evas_common_font_query_advance(font, text, text_props, &h, &v);
-   return v;
-}
-
-static int
-eng_font_pen_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, 
-                         int pos, int *cpen, int *cy, int *cadv, int *ch)
-{
-   return evas_common_font_query_pen_coords(font, text, text_props, pos, cpen, cy, cadv, ch);
-}
-
-static Eina_Bool
-eng_font_text_props_info_create(void *data __UNUSED__, void *font, Eina_Unicode *text, Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len)
-{
-   (void) font;
-   (void) text;
-   (void) text_props;
-   (void) par_props;
-   (void) pos;
-   (void) len;
-#if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT)
-   evas_bidi_shape_string(text, par_props, pos, len);
-#endif
-   return evas_common_text_props_content_create(font, text, text_props, len);
-}
-
-static int
-eng_font_char_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, 
-                         int pos, int *cx, int *cy, int *cw, int *ch)
-{
-   return evas_common_font_query_char_coords(font, text, text_props, pos, cx, cy, cw, ch);
-}
-
-static int
-eng_font_char_at_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, 
-                            int x, int y, int *cx, int *cy, int *cw, int *ch)
-{
-   return evas_common_font_query_char_at_coords(font, text, text_props, x, y, cx, cy, cw, ch);
-}
-
-static int
-eng_font_last_up_to_pos(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, 
-                        int x, int y)
-{
-   return evas_common_font_query_last_up_to_pos(font, text, text_props, x, y);
-}
-
-static void
-eng_font_draw(void *data __UNUSED__, void *context, void *surface, void *font,
-              int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Eina_Unicode *text, const Evas_Text_Props *text_props)
-{
-   evas_common_font_draw(surface, context, font, x, y, text, text_props);
+   evas_common_font_draw(surface, context, (RGBA_Font *) font, x, y,
+         text_props);
    evas_common_draw_context_font_ext_set(context, NULL, NULL, NULL, NULL);
 }
 
@@ -654,155 +354,6 @@ eng_font_cache_flush(void *data __UNUSED__)
    evas_common_font_flush();
 }
 
-static void
-eng_font_cache_set(void *data __UNUSED__, int bytes)
-{
-   evas_common_font_cache_set(bytes);
-}
-
-static int
-eng_font_cache_get(void *data __UNUSED__)
-{
-   return evas_common_font_cache_get();
-}
-
-static void
-eng_font_hinting_set(void *data __UNUSED__, void *font, int hinting)
-{
-   evas_common_font_hinting_set(font, hinting);
-}
-
-static int
-eng_font_hinting_can_hint(void *data __UNUSED__, int hinting)
-{
-   return evas_common_hinting_available(hinting);
-}
-
-static Eina_Bool
-eng_canvas_alpha_get(void *data __UNUSED__, void *context __UNUSED__)
-{
-   return EINA_TRUE;
-}
-
-/*
- *****
- **
- ** ENGINE API
- **
- *****
- */
-
-static Evas_Func func = {
-   NULL,
-   NULL,
-   NULL,
-   NULL,
-   NULL,
-   NULL,
-   NULL,
-   NULL,
-   NULL,
-   NULL,
-   NULL,
-   NULL,
-   NULL,
-   eng_output_dump,
-   /* draw context virtual methods */
-   eng_context_new,
-   eng_canvas_alpha_get,
-   eng_context_free,
-   eng_context_clip_set,
-   eng_context_clip_clip,
-   eng_context_clip_unset,
-   eng_context_clip_get,
-   eng_context_color_set,
-   eng_context_color_get,
-   eng_context_multiplier_set,
-   eng_context_multiplier_unset,
-   eng_context_multiplier_get,
-   eng_context_cutout_add,
-   eng_context_cutout_clear,
-   eng_context_anti_alias_set,
-   eng_context_anti_alias_get,
-   eng_context_color_interpolation_set,
-   eng_context_color_interpolation_get,
-   eng_context_render_op_set,
-   eng_context_render_op_get,
-   /* rect draw funcs */
-   eng_rectangle_draw,
-   /* line draw funcs */
-   eng_line_draw,
-   /* polygon draw funcs */
-   eng_polygon_point_add,
-   eng_polygon_points_clear,
-   eng_polygon_draw,
-   /* image draw funcs */
-   eng_image_load,
-   eng_image_new_from_data,
-   eng_image_new_from_copied_data,
-   eng_image_free,
-   eng_image_size_get,
-   eng_image_size_set,
-   eng_image_stride_get,
-   eng_image_dirty_region,
-   eng_image_data_get,
-   eng_image_data_put,
-   eng_image_data_preload_request,
-   eng_image_data_preload_cancel,
-   eng_image_alpha_set,
-   eng_image_alpha_get,
-   eng_image_border_set,
-   eng_image_border_get,
-   eng_image_draw,
-   eng_image_comment_get,
-   eng_image_format_get,
-   eng_image_colorspace_set,
-   eng_image_colorspace_get,
-   eng_image_native_set,
-   eng_image_native_get,
-   /* image cache funcs */
-   eng_image_cache_flush,
-   eng_image_cache_set,
-   eng_image_cache_get,
-   /* font draw functions */
-   eng_font_load,
-   eng_font_memory_load,
-   eng_font_add,
-   eng_font_memory_add,
-   eng_font_free,
-   eng_font_ascent_get,
-   eng_font_descent_get,
-   eng_font_max_ascent_get,
-   eng_font_max_descent_get,
-   eng_font_string_size_get,
-   eng_font_inset_get,
-   eng_font_h_advance_get,
-   eng_font_v_advance_get,
-   eng_font_char_coords_get,
-   eng_font_char_at_coords_get,
-   eng_font_draw,
-   /* font cache functions */
-   eng_font_cache_flush,
-   eng_font_cache_set,
-   eng_font_cache_get,
-   /* font hinting functions */
-   eng_font_hinting_set,
-   eng_font_hinting_can_hint,
-   eng_image_scale_hint_set,
-   eng_image_scale_hint_get,
-   /* more font draw functions */
-   eng_font_last_up_to_pos,
-   NULL, //   ORD(image_map_draw);
-   NULL, //   ORD(image_map_surface_new);
-   NULL, //   ORD(image_map_surface_free);
-   NULL, // eng_image_content_hint_set - software doesn't use it
-   NULL, // eng_image_content_hint_get - software doesn't use it
-   eng_font_pen_coords_get,
-   eng_font_text_props_info_create,
-   eng_font_right_inset_get
-   /* FUTURE software generic calls go here */
-};
-
 /*
  *****
  **
@@ -816,6 +367,7 @@ module_open(Evas_Module * em)
 {
    if (!em)
       return 0;
+   if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
    _evas_soft8_log_dom = eina_log_domain_register
      ("evas-software_8", EVAS_DEFAULT_LOG_COLOR);
    if (_evas_soft8_log_dom < 0)
@@ -823,6 +375,44 @@ module_open(Evas_Module * em)
         EINA_LOG_ERR("Can not create a module log domain.");
         return 0;
      }
+   /* store it for later use */
+   func = pfunc;
+   /* now to override methods */
+   EVAS_API_RESET(info, &func);
+   EVAS_API_RESET(info_free, &func);
+   EVAS_API_RESET(setup, &func);
+#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_)
+   ORD(rectangle_draw);
+   ORD(line_draw);
+   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_stride_get);
+   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_draw);
+   ORD(image_comment_get);
+   ORD(image_format_get);
+   ORD(image_colorspace_set);
+   ORD(image_colorspace_get);
+   ORD(image_native_set);
+   ORD(image_native_get);
+   ORD(image_cache_flush);
+   ORD(image_cache_set);
+   ORD(image_cache_get);
+   ORD(font_draw);
+   ORD(image_scale_hint_set);
+   ORD(image_scale_hint_get);
+
    em->functions = (void *)(&func);
 
    return 1;
index bfb2b9b..3689577 100644 (file)
@@ -8,6 +8,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/modules/engines \
 -I$(top_srcdir)/src/modules/engines/software_8 \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @evas_engine_software_8_x11_cflags@ \
 -I/usr/include/pixman-1
diff --git a/src/modules/engines/software_ddraw/.cvsignore b/src/modules/engines/software_ddraw/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index 7a5856e..594c7ab 100644 (file)
@@ -8,6 +8,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/modules/engines \
 @EINA_CFLAGS@ \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @evas_engine_software_ddraw_cflags@
 
 if BUILD_ENGINE_SOFTWARE_DDRAW
index 02a60c0..ccb8084 100644 (file)
@@ -8,6 +8,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/modules/engines \
 @EINA_CFLAGS@ \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @evas_engine_software_gdi_cflags@
 
 if BUILD_ENGINE_SOFTWARE_GDI
diff --git a/src/modules/engines/software_generic/.cvsignore b/src/modules/engines/software_generic/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index 8278969..d7986f1 100644 (file)
@@ -7,7 +7,8 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib/include \
 -I$(top_srcdir)/src/modules/engines \
 @EINA_CFLAGS@ \
-@FREETYPE_CFLAGS@
+@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@
 
 AM_CFLAGS = @WIN32_CFLAGS@
 
index f99599f..f1ebc97 100644 (file)
@@ -107,12 +107,13 @@ eng_context_mask_unset(void *data __UNUSED__, void *context)
 {
    evas_common_draw_context_unset_mask(context);
 }
-
+/*
 static void *
 eng_context_mask_get(void *data __UNUSED__, void *context)
 {
    return ((RGBA_Draw_Context *)context)->mask.mask;
 }
+*/
 
 static void
 eng_context_cutout_add(void *data __UNUSED__, void *context, int x, int y, int w, int h)
@@ -276,6 +277,7 @@ eng_image_mask_create(void *data __UNUSED__, void *image)
    if (!im->image.data)
       evas_cache_image_load_data(&im->cache_entry);
    src = im->image.data;
+   if (!src) return;
    for (end = dst + sz ; dst < end ; dst ++, src ++)
       *dst = *src >> 24;
    im->mask.dirty = 0;
@@ -410,9 +412,10 @@ eng_image_dirty_region(void *data __UNUSED__, void *image, int x, int y, int w,
 }
 
 static void *
-eng_image_data_get(void *data __UNUSED__, void *image, int to_write, DATA32 **image_data)
+eng_image_data_get(void *data __UNUSED__, void *image, int to_write, DATA32 **image_data, int *err)
 {
    RGBA_Image *im;
+   int error;
 
    if (!image)
      {
@@ -420,12 +423,12 @@ eng_image_data_get(void *data __UNUSED__, void *image, int to_write, DATA32 **im
        return NULL;
      }
    im = image;
-   evas_cache_image_load_data(&im->cache_entry);
+   error = evas_cache_image_load_data(&im->cache_entry);
    switch (im->cache_entry.space)
      {
       case EVAS_COLORSPACE_ARGB8888:
        if (to_write)
-          im = (RGBA_Image *) evas_cache_image_alone(&im->cache_entry);
+          im = (RGBA_Image *)evas_cache_image_alone(&im->cache_entry);
        *image_data = im->image.data;
        break;
       case EVAS_COLORSPACE_YCBCR422P601_PL:
@@ -436,6 +439,7 @@ eng_image_data_get(void *data __UNUSED__, void *image, int to_write, DATA32 **im
        abort();
        break;
      }
+   if (err) *err = error;
    return im;
 }
 
@@ -471,6 +475,7 @@ eng_image_data_put(void *data, void *image, DATA32 *image_data)
                  if (!im->cs.no_free) free(im->cs.data);
               }
             im->cs.data = image_data;
+            evas_common_image_colorspace_dirty(im);
          }
         break;
       default:
@@ -512,11 +517,11 @@ eng_image_draw(void *data __UNUSED__, void *context, void *surface, void *image,
 #endif
         )
      {
-        evas_common_rgba_image_scalecache_prepare((Image_Entry *)(im),
+        evas_common_rgba_image_scalecache_prepare((Image_Entry *)(im), 
                                                   surface, context, smooth,
                                                   src_x, src_y, src_w, src_h,
                                                   dst_x, dst_y, dst_w, dst_h);
-
+        
         evas_common_pipe_image_draw(im, surface, context, smooth,
                                     src_x, src_y, src_w, src_h,
                                     dst_x, dst_y, dst_w, dst_h);
@@ -533,7 +538,7 @@ eng_image_draw(void *data __UNUSED__, void *context, void *surface, void *image,
         evas_common_rgba_image_scalecache_do(&im->cache_entry, surface, context, smooth,
                                              src_x, src_y, src_w, src_h,
                                              dst_x, dst_y, dst_w, dst_h);
-/*
+/*        
        if (smooth)
          evas_common_scale_rgba_in_to_out_clip_smooth(im, surface, context,
                                                       src_x, src_y, src_w, src_h,
@@ -670,137 +675,141 @@ eng_image_cache_get(void *data __UNUSED__)
    return evas_common_image_get_cache();
 }
 
-static void *
-eng_font_load(void *data __UNUSED__, const char *name, int size)
+static Evas_Font_Set *
+eng_font_load(void *data __UNUSED__, const char *name, int size,
+      Font_Rend_Flags wanted_rend)
 {
-   return evas_common_font_load(name, size);
+   return (Evas_Font_Set *) evas_common_font_load(name, size, wanted_rend);
 }
 
-static void *
-eng_font_memory_load(void *data __UNUSED__, char *name, int size, const void *fdata, int fdata_size)
+static Evas_Font_Set *
+eng_font_memory_load(void *data __UNUSED__, char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend)
 {
-   return evas_common_font_memory_load(name, size, fdata, fdata_size);
+   return (Evas_Font_Set *) evas_common_font_memory_load(name, size, fdata,
+         fdata_size, wanted_rend);
 }
 
-static void *
-eng_font_add(void *data __UNUSED__, void *font, const char *name, int size)
+static Evas_Font_Set *
+eng_font_add(void *data __UNUSED__, Evas_Font_Set *font, const char *name, int size, Font_Rend_Flags wanted_rend)
 {
-   return evas_common_font_add(font, name, size);
+   return (Evas_Font_Set *) evas_common_font_add((RGBA_Font *) font, name,
+         size, wanted_rend);
 }
 
-static void *
-eng_font_memory_add(void *data __UNUSED__, void *font, char *name, int size, const void *fdata, int fdata_size)
+static Evas_Font_Set *
+eng_font_memory_add(void *data __UNUSED__, Evas_Font_Set *font, char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend)
 {
-   return evas_common_font_memory_add(font, name, size, fdata, fdata_size);
+   return (Evas_Font_Set *) evas_common_font_memory_add((RGBA_Font *) font,
+         name, size, fdata, fdata_size, wanted_rend);
 }
 
 static void
-eng_font_free(void *data __UNUSED__, void *font)
+eng_font_free(void *data __UNUSED__, Evas_Font_Set *font)
 {
-   evas_common_font_free(font);
+   evas_common_font_free((RGBA_Font *) font);
 }
 
 static int
-eng_font_ascent_get(void *data __UNUSED__, void *font)
+eng_font_ascent_get(void *data __UNUSED__, Evas_Font_Set *font)
 {
-   return evas_common_font_ascent_get(font);
+   return evas_common_font_ascent_get((RGBA_Font *) font);
 }
 
 static int
-eng_font_descent_get(void *data __UNUSED__, void *font)
+eng_font_descent_get(void *data __UNUSED__, Evas_Font_Set *font)
 {
-   return evas_common_font_descent_get(font);
+   return evas_common_font_descent_get((RGBA_Font *) font);
 }
 
 static int
-eng_font_max_ascent_get(void *data __UNUSED__, void *font)
+eng_font_max_ascent_get(void *data __UNUSED__, Evas_Font_Set *font)
 {
-   return evas_common_font_max_ascent_get(font);
+   return evas_common_font_max_ascent_get((RGBA_Font *) font);
 }
 
 static int
-eng_font_max_descent_get(void *data __UNUSED__, void *font)
+eng_font_max_descent_get(void *data __UNUSED__, Evas_Font_Set *font)
 {
-   return evas_common_font_max_descent_get(font);
+   return evas_common_font_max_descent_get((RGBA_Font *) font);
 }
 
 static void
-eng_font_string_size_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int *w, int *h)
+eng_font_string_size_get(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props, int *w, int *h)
 {
-   evas_common_font_query_size(font, text, text_props, w, h);
+   evas_common_font_query_size((RGBA_Font *) font, text_props, w, h);
 }
 
 static int
-eng_font_inset_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props)
+eng_font_inset_get(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props)
 {
-   return evas_common_font_query_inset(font, text_props);
+   return evas_common_font_query_inset((RGBA_Font *) font, text_props);
 }
 
 static int
-eng_font_right_inset_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props)
+eng_font_right_inset_get(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props)
 {
-   return evas_common_font_query_right_inset(font, text_props);
+   return evas_common_font_query_right_inset((RGBA_Font *) font, text_props);
 }
 
 static int
-eng_font_h_advance_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props)
+eng_font_h_advance_get(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props)
 {
    int h, v;
 
-   evas_common_font_query_advance(font, text, text_props, &h, &v);
+   evas_common_font_query_advance((RGBA_Font *) font, text_props, &h, &v);
    return h;
 }
 
 static int
-eng_font_v_advance_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props)
+eng_font_v_advance_get(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props)
 {
    int h, v;
 
-   evas_common_font_query_advance(font, text, text_props, &h, &v);
+   evas_common_font_query_advance((RGBA_Font *) font, text_props, &h, &v);
    return v;
 }
 
 static int
-eng_font_pen_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch)
+eng_font_pen_coords_get(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch)
 {
-   return evas_common_font_query_pen_coords(font, text, text_props, pos, cpen_x, cy, cadv, ch);
+   return evas_common_font_query_pen_coords((RGBA_Font *) font, text_props, pos, cpen_x, cy, cadv, ch);
 }
 
 static Eina_Bool
-eng_font_text_props_info_create(void *data __UNUSED__, void *font, Eina_Unicode *text, Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len)
-{
-   (void) font;
-   (void) text;
-   (void) text_props;
-   (void) par_props;
-   (void) pos;
-   (void) len;
-#if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT)
-   evas_bidi_shape_string(text, par_props, pos, len);
-#endif
-   return evas_common_text_props_content_create(font, text, text_props, len);
+eng_font_text_props_info_create(void *data __UNUSED__, Evas_Font_Instance *fi, const Eina_Unicode *text, Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, size_t par_pos, size_t len)
+{
+   return evas_common_text_props_content_create((RGBA_Font_Int *) fi, text,
+         text_props, par_props, par_pos, len);
 }
 
 static int
-eng_font_char_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch)
+eng_font_char_coords_get(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch)
 {
-   return evas_common_font_query_char_coords(font, text, text_props, pos, cx, cy, cw, ch);
+   return evas_common_font_query_char_coords((RGBA_Font *) font, text_props, pos, cx, cy, cw, ch);
 }
 
 static int
-eng_font_char_at_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch)
+eng_font_char_at_coords_get(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch)
 {
-   return evas_common_font_query_char_at_coords(font, text, text_props, x, y, cx, cy, cw, ch);
+   return evas_common_font_query_char_at_coords((RGBA_Font *) font, text_props, x, y, cx, cy, cw, ch);
 }
 
 static int
-eng_font_last_up_to_pos(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int x, int y)
+eng_font_last_up_to_pos(void *data __UNUSED__, Evas_Font_Set *font, const Evas_Text_Props *text_props, int x, int y)
 {
-   return evas_common_font_query_last_up_to_pos(font, text, text_props, x, y);
+   return evas_common_font_query_last_up_to_pos((RGBA_Font *) font, text_props, x, y);
+}
+
+static int
+eng_font_run_font_end_get(void *data __UNUSED__, Evas_Font_Set *font, Evas_Font_Instance **script_fi, Evas_Font_Instance **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len)
+{
+   return evas_common_font_query_run_font_end_get((RGBA_Font *) font,
+         (RGBA_Font_Int **) script_fi, (RGBA_Font_Int **) cur_fi,
+         script, text, run_len);
 }
 
 static void
-eng_font_draw(void *data __UNUSED__, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Eina_Unicode *text, const Evas_Text_Props *text_props)
+eng_font_draw(void *data __UNUSED__, 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 *text_props)
 {
 #ifdef BUILD_PIPE_RENDER
    if ((cpunum > 1)
@@ -808,11 +817,13 @@ eng_font_draw(void *data __UNUSED__, void *context, void *surface, void *font, i
         && evas_common_frameq_enabled()
 #endif
         )
-     evas_common_pipe_text_draw(surface, context, font, x, y, text, text_props);
+     evas_common_pipe_text_draw(surface, context, (RGBA_Font *) font, x, y,
+           text_props);
    else
 #endif   
      {
-       evas_common_font_draw(surface, context, font, x, y, text, text_props);
+       evas_common_font_draw(surface, context, (RGBA_Font *) font, x, y,
+              text_props);
        evas_common_cpu_end_opt();
      }
 }
@@ -841,9 +852,9 @@ eng_font_cache_get(void *data __UNUSED__)
 }
 
 static void
-eng_font_hinting_set(void *data __UNUSED__, void *font, int hinting)
+eng_font_hinting_set(void *data __UNUSED__, Evas_Font_Set *font, int hinting)
 {
-   evas_common_font_hinting_set(font, hinting);
+   evas_common_font_hinting_set((RGBA_Font *) font, hinting);
 }
 
 static int
@@ -858,6 +869,99 @@ eng_canvas_alpha_get(void *data __UNUSED__, void *info __UNUSED__)
    return EINA_TRUE;
 }
 
+
+/* Filter API */
+#if 0 // filtering disabled
+static void
+eng_image_draw_filtered(void *data __UNUSED__, void *context __UNUSED__,
+                        void *surface, void *image, Evas_Filter_Info *filter)
+{
+   Evas_Software_Filter_Fn fn;
+   RGBA_Image *im = image;
+
+   fn = evas_filter_software_get(filter);
+   if (!fn) return;
+   if (im->cache_entry.cache) evas_cache_image_load_data(&im->cache_entry);
+   fn(filter, image, surface);
+   return;
+}
+
+static Filtered_Image *
+eng_image_filtered_get(void *image, uint8_t *key, size_t keylen)
+{
+   RGBA_Image *im = image;
+   Filtered_Image *fi;
+   Eina_List *l;
+
+   for (l = im->filtered ; l ; l = l->next)
+     {
+         fi = l->data;
+         if (fi->keylen != keylen) continue;
+         if (memcmp(key, fi->key, keylen) != 0) continue;
+         fi->ref ++;
+         return fi;
+     }
+
+   return NULL;
+}
+
+static Filtered_Image *
+eng_image_filtered_save(void *image, void *fimage, uint8_t *key, size_t keylen)
+{
+   RGBA_Image *im = image;
+   Filtered_Image *fi;
+   Eina_List *l;
+
+   for (l = im->filtered ; l ; l = l->next)
+     {
+        fi = l->data;
+        if (fi->keylen != keylen) continue;
+        if (memcmp(key, fi->key, keylen) == 0) continue;
+        evas_cache_image_drop((void *)fi->image);
+        fi->image = fimage;
+        return fi;
+     }
+
+   fi = calloc(1,sizeof(Filtered_Image));
+   if (!fi) return NULL;
+
+   fi->keylen = keylen;
+   fi->key = malloc(keylen);
+   memcpy(fi->key, key, keylen);
+   fi->image = fimage;
+   fi->ref = 1;
+
+   im->filtered = eina_list_prepend(im->filtered, fi);
+
+   return fi;
+}
+
+static void
+eng_image_filtered_free(void *image, Filtered_Image *fi)
+{
+   RGBA_Image *im = image;
+
+   fi->ref --;
+   if (fi->ref) return;
+
+   free(fi->key);
+   evas_cache_image_drop(&fi->image->cache_entry);
+   fi->image = NULL;
+
+   im->filtered = eina_list_remove(im->filtered, fi);
+}
+#endif
+
+static int
+eng_image_load_error_get(void *data __UNUSED__, void *image)
+{
+   RGBA_Image *im;
+   
+   if (!image) return EVAS_LOAD_ERROR_NONE;
+   im = image;
+   return im->cache_entry.load_error;
+}
+
 /*
  *****
  **
@@ -970,7 +1074,6 @@ static Evas_Func func =
      eng_image_scale_hint_get,
      /* more font draw functions */
      eng_font_last_up_to_pos,
-     /* FUTURE software generic calls go here (done) */
      eng_image_map_draw,
      eng_image_map_surface_new,
      eng_image_map_surface_free,
@@ -978,8 +1081,24 @@ static Evas_Func func =
      NULL, // eng_image_content_hint_get - software doesn't use it
      eng_font_pen_coords_get,
      eng_font_text_props_info_create,
-     eng_font_right_inset_get
-     /* FUTURE software generic calls go here */
+     eng_font_right_inset_get,
+#if 0 // filtering disabled
+     eng_image_draw_filtered,
+     eng_image_filtered_get,
+     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_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
+     eng_image_load_error_get,
+     eng_font_run_font_end_get
+   /* FUTURE software generic calls go here */
 };
 
 /*
diff --git a/src/modules/engines/software_qtopia/.cvsignore b/src/modules/engines/software_qtopia/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
diff --git a/src/modules/engines/software_qtopia/Evas_Engine_Software_Qtopia.h b/src/modules/engines/software_qtopia/Evas_Engine_Software_Qtopia.h
deleted file mode 100644 (file)
index 6878b05..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef _EVAS_ENGINE_SOFTWARE_QTOPIA_H
-#define _EVAS_ENGINE_SOFTWARE_QTOPIA_H
-
-#ifdef EVAS_COMMON_H
-#ifdef EVAS_PRIVATE_H
-typedef void QWidget;
-#endif
-#endif
-
-#ifndef EVAS_COMMON_H
-#ifndef EVAS_PRIVATE_H
-#include <qwidget.h>
-#endif
-#endif
-
-typedef struct _Evas_Engine_Info_Software_Qtopia Evas_Engine_Info_Software_Qtopia;
-
-struct _Evas_Engine_Info_Software_Qtopia
-{
-   /* PRIVATE - don't mess with this baby or evas will poke its tongue out */
-   /* at you and make nasty noises */
-   Evas_Engine_Info magic;
-
-   struct {
-      QWidget *target;
-      int      rotation;
-   } info;
-
-   /* non-blocking or blocking mode */
-   Evas_Engine_Render_Mode render_mode;
-};
-#endif
-
-
diff --git a/src/modules/engines/software_qtopia/Makefile.am b/src/modules/engines/software_qtopia/Makefile.am
deleted file mode 100644 (file)
index fdbd47c..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = \
--I. \
--I$(top_srcdir)/src/lib \
--I$(top_srcdir)/src/lib/include \
--I$(top_srcdir)/src/modules/engines \
-@FREETYPE_CFLAGS@ \
-@EINA_CFLAGS@ \
-@evas_engine_software_qtopia_cflags@
-
-AM_CXXFLAGS = $(CFLAGS) -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -DNO_DEBUG
-
-if BUILD_ENGINE_SOFTWARE_QTOPIA
-
-SOFTWARE_QTOPIA_SOURCES = \
-evas_engine.c \
-evas_outbuf.c \
-evas_qt_main.cpp
-
-SOFTWARE_QTOPIA_LIBADD = @evas_engine_software_qtopia_libs@
-
-
-includes_HEADERS = Evas_Engine_Software_Qtopia.h
-includesdir = $(includedir)/evas-@VMAJ@
-
-if !EVAS_STATIC_BUILD_SOFTWARE_QTOPIA
-
-pkgdir = $(libdir)/evas/modules/engines/software_qtopia/$(MODULE_ARCH)
-pkg_LTLIBRARIES = module.la
-module_la_SOURCES = $(SOFTWARE_QTOPIA_SOURCES)
-module_la_LIBADD = @EINA_LIBS@ $(SOFTWARE_QTOPIA_LIBADD) $(top_builddir)/src/lib/libevas.la
-module_la_LDFLAGS = -module -avoid-version
-module_la_LIBTOOLFLAGS = --tag=disable-static
-
-else
-
-noinst_LTLIBRARIES = libevas_engine_software_qtopia.la
-
-libevas_engine_software_qtopia_la_SOURCES = $(SOFTWARE_QTOPIA_SOURCES)
-libevas_engine_software_qtopia_la_LIBADD = $(SOFTWARE_QTOPIA_LIBADD)
-
-endif
-endif
-
-EXTRA_DIST = evas_engine.h
diff --git a/src/modules/engines/software_qtopia/evas_engine.c b/src/modules/engines/software_qtopia/evas_engine.c
deleted file mode 100644 (file)
index 1d84d57..0000000
+++ /dev/null
@@ -1,327 +0,0 @@
-#include "evas_common.h"
-#include "evas_private.h"
-#include "evas_engine.h"
-#include "Evas_Engine_Software_Qtopia.h"
-
-int _evas_engine_soft_qtopia_log_dom = -1;
-/* function tables - filled in later (func and parent func) */
-static Evas_Func func, pfunc;
-
-/* engine struct data */
-typedef struct _Render_Engine Render_Engine;
-
-struct _Render_Engine
-{
-   Tilebuf          *tb;
-   Outbuf           *ob;
-   Tilebuf_Rect     *rects;
-   Eina_Inlist      *cur_rect;
-   int               end : 1;
-};
-
-/* prototypes we will use here */
-static void *_output_setup(int w, int h, int rot, QWidget *target);
-
-static void *eng_info(Evas *e);
-static void eng_info_free(Evas *e, void *info);
-static int eng_setup(Evas *e, void *info);
-static void eng_output_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);
-
-/* internal engine routines */
-static void *
-_output_setup(int w, int h, int rot, QWidget *target)
-{
-   Render_Engine *re;
-
-   re = calloc(1, sizeof(Render_Engine));
-   if (!re)
-     return NULL;
-   /* if we haven't initialized - init (automatic abort if already done) */
-   evas_common_cpu_init();
-
-   evas_common_blend_init();
-   evas_common_image_init();
-   evas_common_convert_init();
-   evas_common_scale_init();
-   evas_common_rectangle_init();
-   evas_common_polygon_init();
-   evas_common_line_init();
-   evas_common_font_init();
-   evas_common_draw_init();
-   evas_common_tilebuf_init();
-
-   evas_qtopia_outbuf_software_qtopia_init();
-
-   /* get any stored performance metrics from device (xserver) */
-   re->ob = evas_qtopia_outbuf_software_qtopia_setup_q(w, h, rot, OUTBUF_DEPTH_INHERIT, target);
-   if (!re->ob)
-     {
-       free(re);
-       return NULL;
-     }
-   evas_qtopia_outbuf_software_qtopia_set_have_backbuf(re->ob, 0);
-   re->tb = evas_common_tilebuf_new(w, h);
-   if (!re->tb)
-     {
-       evas_qtopia_outbuf_software_qtopia_free(re->ob);
-       free(re);
-       return NULL;
-     }
-   /* in preliminary tests 16x16 gave highest framerates */
-   evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
-   return re;
-}
-
-/* engine api this module provides */
-static void *
-eng_info(Evas *e)
-{
-   Evas_Engine_Info_Software_Qtopia *info;
-   info = calloc(1, sizeof(Evas_Engine_Info_Software_Qtopia));
-   if (!info) return NULL;
-   info->magic.magic = rand();
-   info->render_mode = EVAS_RENDER_MODE_BLOCKING;
-   return info;
-   e = NULL;
-}
-
-static void
-eng_info_free(Evas *e, void *info)
-{
-   Evas_Engine_Info_Software_Qtopia *in;
-   in = (Evas_Engine_Info_Software_Qtopia *)info;
-   free(in);
-}
-
-static int
-eng_setup(Evas *e, void *in)
-{
-   Render_Engine *re;
-   Evas_Engine_Info_Software_Qtopia *info;
-
-   info = (Evas_Engine_Info_Software_Qtopia *)in;
-   if (!e->engine.data.output)
-     e->engine.data.output =
-     _output_setup(e->output.w,
-                  e->output.h,
-                  info->info.rotation,
-                  info->info.target);
-  if (!e->engine.data.output) return 0;
-   if (!e->engine.data.context)
-     e->engine.data.context =
-     e->engine.func->context_new(e->engine.data.output);
-
-   re = e->engine.data.output;
-
-   return 1;
-}
-
-static void
-eng_output_free(void *data)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   evas_qtopia_outbuf_software_qtopia_free(re->ob);
-   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;
-
-   re = (Render_Engine *)data;
-   evas_qtopia_outbuf_software_qtopia_reconfigure(re->ob, w, h,
-                                                 evas_qtopia_outbuf_software_qtopia_get_rot(re->ob),
-                                                 OUTBUF_DEPTH_INHERIT);
-   evas_qtopia_outbuf_software_qtopia_set_have_backbuf(re->ob, 0);
-   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;
-   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;
-
-   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);
-}
-
-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;
-   RGBA_Image *surface;
-   Tilebuf_Rect *rect;
-   int ux, uy, uw, uh;
-
-   re = (Render_Engine *)data;
-   if (re->end)
-     {
-       re->end = 0;
-       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 = 1;
-     }
-
-   surface = evas_qtopia_outbuf_software_qtopia_new_region_for_update(re->ob,
-                                                         ux, uy, uw, uh,
-                                                         cx, cy, cw, ch);
-   *x = ux; *y = uy; *w = uw; *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;
-   Evas_Engine_Info_Software_Qtopia *info;
-
-   re = (Render_Engine *)data;
-#ifdef BUILD_PIPE_RENDER
-   evas_common_pipe_map_begin(surface);
-#endif   
-   evas_qtopia_outbuf_software_qtopia_push_updated_region(re->ob, surface, x, y, w, h);
-   evas_qtopia_outbuf_software_qtopia_free_region_for_update(re->ob, surface);
-   evas_common_cpu_end_opt();
-}
-
-static void
-eng_output_flush(void *data)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-}
-
-static void
-eng_output_idle_flush(void *data)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-}
-
-static Eina_Bool
-eng_canvas_alpha_get(void *data, void *context)
-{
-   return EINA_FALSE;
-}
-
-/* module advertising code */
-static int
-module_open(Evas_Module *em)
-{
-   if (!em) return 0;
-   /* get whatever engine module we inherit from */
-   if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
-   _evas_engine_soft_qtopia_log_dom = eina_log_domain_register
-     ("evas-software_qtopia", EVAS_DEFAULT_LOG_COLOR);
-   if(_evas_engine_soft_qtopia_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(output_flush);
-   ORD(output_idle_flush);
-   /* now advertise out own api */
-   em->functions = (void *)(&func);
-   return 1;
-}
-
-static void
-module_close(Evas_Module *em)
-{
-  eina_log_domain_unregister(_evas_engine_soft_qtopia_log_dom);
-}
-
-static Evas_Module_Api evas_modapi =
-{
-   EVAS_MODULE_API_VERSION,
-   "software_qtopia",
-   "none",
-   {
-     module_open,
-     module_close
-   }
-};
-
-EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, software_qtopia);
-
-#ifndef EVAS_STATIC_BUILD_SOFTWARE_QTOPIA
-EVAS_EINA_MODULE_DEFINE(engine, software_qtopia);
-#endif
diff --git a/src/modules/engines/software_qtopia/evas_engine.h b/src/modules/engines/software_qtopia/evas_engine.h
deleted file mode 100644 (file)
index 9e65fbe..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-#ifndef EVAS_ENGINE_H
-#define EVAS_ENGINE_H
-
-extern int _evas_engine_soft_qtopia_log_dom ;
-#ifdef ERR
-# undef ERR
-#endif
-#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_qtopia_log_dom, __VA_ARGS__)
-
-#ifdef DBG
-# undef DBG
-#endif
-#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_qtopia_log_dom, __VA_ARGS__)
-
-#ifdef INF
-# undef INF
-#endif
-#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_qtopia_log_dom, __VA_ARGS__)
-
-#ifdef WRN
-# undef WRN
-#endif
-#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_qtopia_log_dom, __VA_ARGS__)
-
-#ifdef CRIT
-# undef CRIT
-#endif
-#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_qtopia_log_dom, __VA_ARGS__)
-
-typedef struct _Outbuf                Outbuf;
-typedef struct _QT_Direct             QT_Direct;
-typedef struct _QT_Direct_Rect        QT_Direct_Rect;
-
-enum _Outbuf_Depth
-{
-   OUTBUF_DEPTH_NONE,
-     OUTBUF_DEPTH_INHERIT,
-     OUTBUF_DEPTH_RGB_16BPP_565_565_DITHERED,
-     OUTBUF_DEPTH_RGB_16BPP_555_555_DITHERED,
-     OUTBUF_DEPTH_RGB_16BPP_444_444_DITHERED,
-     OUTBUF_DEPTH_RGB_16BPP_565_444_DITHERED,
-     OUTBUF_DEPTH_RGB_32BPP_888_8888,
-     OUTBUF_DEPTH_LAST
-};
-
-typedef enum   _Outbuf_Depth          Outbuf_Depth;
-
-
-struct _Outbuf
-{
-   Outbuf_Depth    depth;
-   int             w, h;
-   int             rot;
-
-   struct {
-      void *target;
-
-      struct {
-        DATA32    r, g, b;
-      } mask;
-      RGBA_Image  *back_buf;
-   } priv;
-};
-
-struct _QT_Direct_Rect
-{
-   int x, y, w, h;
-};
-
-struct _QT_Direct
-{
-   /* our target widget */
-   void *target;
-   /* our direct painter object */
-   void *direct;
-   /* The fb */
-   struct
-     {
-       DATA8             *data;
-       int                bpp;
-       int                rotation;
-       int                width;
-       struct {
-          DATA32          r, g, b;
-       } mask;
-     } fb;
-   /* Relative to fb coords */
-   struct {
-      int                 count;
-      QT_Direct_Rect     *r;
-   } rects;
-   /* Relative to fb coords */
-   QT_Direct_Rect         location;
-   QT_Direct_Rect         updated;
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/****/
-void             x_software_qtopia_init                    (void);
-
-void         evas_qtopia_outbuf_software_qtopia_init                   (void);
-void         evas_qtopia_outbuf_software_qtopia_free                   (Outbuf *buf);
-
-Outbuf      *evas_qtopia_outbuf_software_qtopia_setup_q                (int w, int h, int rot, Outbuf_Depth depth, void *target);
-
-void         evas_qtopia_outbuf_software_qtopia_blit                   (Outbuf *buf, int src_x, int src_y, int w, int h, int dst_x, int dst_y);
-void         evas_qtopia_outbuf_software_qtopia_update                 (Outbuf *buf, int x, int y, int w, int h);
-RGBA_Image  *evas_qtopia_outbuf_software_qtopia_new_region_for_update  (Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
-void         evas_qtopia_outbuf_software_qtopia_free_region_for_update (Outbuf *buf, RGBA_Image *update);
-void         evas_qtopia_outbuf_software_qtopia_push_updated_region    (Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h);
-void         evas_qtopia_outbuf_software_qtopia_reconfigure            (Outbuf *buf, int w, int h, int rot, Outbuf_Depth depth);
-int          evas_qtopia_outbuf_software_qtopia_get_width              (Outbuf *buf);
-int          evas_qtopia_outbuf_software_qtopia_get_height             (Outbuf *buf);
-Outbuf_Depth evas_qtopia_outbuf_software_qtopia_get_depth              (Outbuf *buf);
-int          evas_qtopia_outbuf_software_qtopia_get_rot                (Outbuf *buf);
-int          evas_qtopia_outbuf_software_qtopia_get_have_backbuf       (Outbuf *buf);
-void         evas_qtopia_outbuf_software_qtopia_set_have_backbuf       (Outbuf *buf, int have_backbuf);
-
-QT_Direct   *evas_qt_main_direct_start                     (void *target);
-void         evas_qt_main_direct_stop                      (QT_Direct *d);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/src/modules/engines/software_qtopia/evas_outbuf.c b/src/modules/engines/software_qtopia/evas_outbuf.c
deleted file mode 100644 (file)
index 3e6790e..0000000
+++ /dev/null
@@ -1,245 +0,0 @@
-#include "evas_common.h"
-#include "evas_engine.h"
-#include "evas_private.h"
-#include "Evas_Engine_Software_Qtopia.h"
-#include <sys/time.h>
-#include <sys/utsname.h>
-
-void
-evas_qtopia_outbuf_software_qtopia_init(void)
-{
-}
-
-void
-evas_qtopia_outbuf_software_qtopia_free(Outbuf *buf)
-{
-   free(buf);
-}
-
-Outbuf *
-evas_qtopia_outbuf_software_qtopia_setup_q(int w, int h, int rot, Outbuf_Depth depth, QWidget *target)
-{
-   Outbuf *buf;
-
-   buf = calloc(1, sizeof(Outbuf));
-   if (!buf)
-     {
-       free(buf);
-       return NULL;
-     }
-
-   buf->w = w;
-   buf->h = h;
-   buf->rot = rot;
-   buf->priv.target = target;
-     {
-       QT_Direct *direct;
-
-       direct = evas_qt_main_direct_start(buf->priv.target);
-       if (direct)
-         {
-            buf->w = direct->location.w;
-            buf->h = direct->location.h;
-            buf->rot = direct->fb.rotation;
-            evas_qt_main_direct_stop(direct);
-         }
-     }
-   return buf;
-}
-
-void
-evas_qtopia_outbuf_software_qtopia_blit(Outbuf *buf, int src_x, int src_y, int w, int h, int dst_x, int dst_y)
-{
-}
-
-void
-evas_qtopia_outbuf_software_qtopia_update(Outbuf *buf, int x, int y, int w, int h)
-{
-}
-
-RGBA_Image *
-evas_qtopia_outbuf_software_qtopia_new_region_for_update(Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch)
-{
-   RGBA_Image *im;
-
-   *cx = 0; *cy = 0; *cw = w; *ch = h;
-   im = evas_common_image_create(w, h);
-   return im;
-}
-
-void
-evas_qtopia_outbuf_software_qtopia_free_region_for_update(Outbuf *buf, RGBA_Image *update)
-{
-   evas_common_image_free(update);
-}
-
-void
-evas_qtopia_outbuf_software_qtopia_push_updated_region(Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h)
-{
-   Gfx_Func_Convert conv_func;
-   DATA8 *data;
-   QT_Direct *d;
-
-   data = NULL;
-   conv_func = NULL;
-
-   d = evas_qt_main_direct_start(buf->priv.target);
-   if (d)
-     {
-       int i;
-
-       for (i = 0; i < d->rects.count; i++)
-         {
-            int fb_bytes;
-            DATA8 *fb_mem;
-            int ox, oy, ow, oh;
-            int rx, ry, rw, rh;
-
-            ox = x; oy = y; ow = w; oh = h;
-            rx = d->rects.r[i].x - d->location.x;
-            ry = d->rects.r[i].y - d->location.y;
-            rw = d->rects.r[i].w;
-            rh = d->rects.r[i].h;
-            if (x < rx)
-              {
-                 w += (x - rx);
-                 x = rx;
-              }
-            if (y < ry)
-              {
-                 h += (y - ry);
-                 y = ry;
-              }
-            if ((w <= 0) || (h <= 0)) goto nope;
-            if ((x + w) > (rx + rw)) w = (rx + rw - x);
-            if ((y + h) > (ry + rh)) h = (ry + rh - y);
-            if ((w <= 0) || (h <= 0)) goto nope;
-            fb_bytes = d->fb.bpp / 8;
-            if (buf->rot == 0)
-              {
-                 fb_mem = d->fb.data +
-                   ((d->location.y * d->fb.width * fb_bytes) +
-                    (d->location.x * fb_bytes));
-                 data = fb_mem + (fb_bytes * (x + (y * d->fb.width)));
-                 conv_func = evas_common_convert_func_get(data, w, h, d->fb.bpp,
-                                              d->fb.mask.r, d->fb.mask.g, d->fb.mask.b,
-                                              PAL_MODE_NONE, buf->rot);
-              }
-            else if (buf->rot == 180)
-              {
-                // FIXME
-              }
-            else if (buf->rot == 270)
-              {
-                  fb_mem = d->fb.data +
-                   (fb_bytes *
-                    ((d->location.x * d->fb.width) +
-                     (d->fb.width - d->location.y - d->location.h)));
-                 data = fb_mem + (fb_bytes * (buf->h - y - h + (x * d->fb.width)));
-                 conv_func = evas_common_convert_func_get(data, h, w, d->fb.bpp,
-                                              d->fb.mask.r, d->fb.mask.g, d->fb.mask.b,
-                                              PAL_MODE_NONE, buf->rot);
-              }
-            else if (buf->rot == 90)
-              {
-                 // FIXME: wrong fb_mem
-                 fb_mem = d->fb.data +
-                   ((d->location.y * d->fb.width * fb_bytes) +
-                    (d->location.x * fb_bytes));
-                 data = fb_mem + (fb_bytes * (y + ((buf->w - x - w) * d->fb.width)));
-                 conv_func = evas_common_convert_func_get(data, h, w, d->fb.bpp,
-                                              d->fb.mask.r, d->fb.mask.g, d->fb.mask.b,
-                                              PAL_MODE_NONE, buf->rot);
-              }
-            if (conv_func)
-              {
-                 DATA32 *src_data;
-
-                 if (buf->rot == 0)
-                   {
-                      src_data = update->image->data +
-                        (ow * (y - oy)) + (x - ox);
-                      conv_func(src_data, data,
-                                ow - w,
-                                d->fb.width - w,
-                                w, h,
-                                x, y, NULL);
-                   }
-                 else if (buf->rot == 180)
-                   {
-                     // FIXME
-                   }
-                 else if (buf->rot == 270)
-                   {
-                      src_data = update->image->data +
-                        (ow * (y - oy)) + (x - ox);
-                      conv_func(src_data, data,
-                                ow - w,
-                                d->fb.width - h,
-                                h, w,
-                                x, y, NULL);
-                   }
-                 else if (buf->rot == 90)
-                   {
-                      src_data = update->image->data +
-                        (ow * (y - oy)) + (x - ox);
-                      conv_func(src_data, data,
-                                ow - w,
-                                d->fb.width - h,
-                                h, w,
-                                x, y, NULL);
-                   }
-              }
-            nope:;
-            x = ox; y = oy; w = ow; h = oh;
-         }
-       d->updated.x = x; d->updated.y = y; d->updated.w = w; d->updated.h = h;
-       evas_qt_main_direct_stop(d);
-     }
-}
-
-void
-evas_qtopia_outbuf_software_qtopia_reconfigure(Outbuf *buf, int w, int h, int rot, Outbuf_Depth depth)
-{
-   if ((w == buf->w) && (h == buf->h) &&
-       (rot == buf->rot) && (depth == buf->depth))
-     return;
-   buf->w = w;
-   buf->h = h;
-   buf->rot = rot;
-}
-
-int
-evas_qtopia_outbuf_software_qtopia_get_width(Outbuf *buf)
-{
-   return buf->w;
-}
-
-int
-evas_qtopia_outbuf_software_qtopia_get_height(Outbuf *buf)
-{
-   return buf->h;
-}
-
-Outbuf_Depth
-evas_qtopia_outbuf_software_qtopia_get_depth(Outbuf *buf)
-{
-   return buf->depth;
-}
-
-int
-evas_qtopia_outbuf_software_qtopia_get_rot(Outbuf *buf)
-{
-   return buf->rot;
-}
-
-int
-evas_qtopia_outbuf_software_qtopia_get_have_backbuf(Outbuf *buf)
-{
-   return 0;
-}
-
-void
-evas_qtopia_outbuf_software_qtopia_set_have_backbuf(Outbuf *buf, int have_backbuf)
-{
-}
diff --git a/src/modules/engines/software_qtopia/evas_qt_main.cpp b/src/modules/engines/software_qtopia/evas_qt_main.cpp
deleted file mode 100644 (file)
index bca95ba..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-#include "evas_common.h"
-#include "evas_engine.h"
-#include <qwidget.h>
-#include <qnamespace.h>
-#include <qbrush.h>
-#include <qpainter.h>
-#include <qdirectpainter_qws.h>
-
-//#define QVFB_BUG
-
-extern "C" {
-   QT_Direct *
-     evas_qt_main_direct_start(void *target)
-       {
-         QT_Direct *d;
-         QDirectPainter *dp;
-         QWidget *widget;
-         int i;
-
-         widget = (QWidget *)target;
-         dp = new QDirectPainter(widget);
-         if (!dp) return NULL;
-         d = (QT_Direct *)calloc(1, sizeof(QT_Direct));
-         if (!d) return NULL;
-         d->target = target;
-         d->direct = (void *)dp;
-         d->fb.data = dp->frameBuffer();
-         d->fb.bpp = dp->depth();
-         d->fb.width = dp->lineStep() / (d->fb.bpp / 8);
-         if (dp->depth() == 16)
-           {
-              d->fb.mask.r = 0xf800;
-              d->fb.mask.g = 0x07e0;
-              d->fb.mask.b = 0x001f;
-           }
-         else if (dp->depth() == 32)
-           {
-              d->fb.mask.r = 0x00ff0000;
-              d->fb.mask.g = 0x0000ff00;
-              d->fb.mask.b = 0x000000ff;
-           }
-         else
-           {
-              delete dp;
-              free(d);
-              return NULL;
-           }
-         d->fb.rotation = dp->transformOrientation() * 90;
-         d->rects.count = dp->numRects();
-         if (d->rects.count > 0)
-           {
-              d->rects.r = (QT_Direct_Rect *)calloc(d->rects.count, sizeof(QT_Direct_Rect));
-              if (d->rects.r)
-                {
-                   for (i = 0; i < d->rects.count; i++)
-                     {
-                        QRect r;
-
-                        r = dp->rect(i);
-                        if (d->fb.rotation == 0)
-                          {
-                             d->rects.r[i].x = r.x();
-                             d->rects.r[i].y = r.y();
-                             d->rects.r[i].w = r.width();
-                             d->rects.r[i].h = r.height();
-                          }
-                        else if (d->fb.rotation == 270)
-                          {
-                             d->rects.r[i].x = r.y();
-                             d->rects.r[i].y = d->fb.width - r.x() - r.width();
-                             d->rects.r[i].w = r.height();
-                             d->rects.r[i].h = r.width();
-                          }
-                        else if (d->fb.rotation == 90)
-                          {
-                             // FIXME: do
-                          }
-                     }
-                }
-              else
-                d->rects.count = 0;
-           }
-         d->location.x = dp->xOffset();
-         d->location.y = dp->yOffset();
-         d->location.w = dp->width();
-         d->location.h = dp->height();
-         return d;
-       }
-   void
-     evas_qt_main_direct_stop(QT_Direct *d)
-       {
-         QDirectPainter *dp;
-
-#ifdef QVFB_BUG
-           {
-              QWidget *target = (QWidget *)d->target;
-              QRect rect(d->updated.x, d->updated.y,
-                         d->updated.w, d->updated.h);
-              QPainter p(target);
-
-              p.fillRect(rect, QBrush::NoBrush);
-           }
-#endif
-         dp = (QDirectPainter *)d->direct;
-         delete dp;
-         if (d->rects.r) free(d->rects.r);
-         free(d);
-       }
-}
diff --git a/src/modules/engines/software_sdl/.cvsignore b/src/modules/engines/software_sdl/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index 57892f6..dc548ba 100644 (file)
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib/include \
 -I$(top_srcdir)/src/modules/engines \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @evas_engine_software_sdl_cflags@
 
index 7c6f2b5..137f9e5 100644 (file)
@@ -425,7 +425,7 @@ evas_engine_sdl_image_dirty_region(void *data,
 
 static void*
 evas_engine_sdl_image_data_get(void *data, void *image,
-                              int to_write, DATA32** image_data)
+                              int to_write, DATA32** image_data, int *err)
 {
    SDL_Engine_Image_Entry       *eim = image;
    RGBA_Image                   *im;
@@ -435,6 +435,7 @@ evas_engine_sdl_image_data_get(void *data, void *image,
    if (!eim)
      {
         *image_data = NULL;
+        if (err) *err = EVAS_LOAD_ERROR_GENERIC;
         return NULL;
      }
    im = (RGBA_Image *) eim->cache_entry.src;
@@ -456,6 +457,7 @@ evas_engine_sdl_image_data_get(void *data, void *image,
         abort();
         break;
      }
+   if (err) *err = EVAS_LOAD_ERROR_NONE;
    return eim;
 }
 
@@ -750,7 +752,7 @@ evas_engine_sdl_font_draw(void *data __UNUSED__, void *context, void *surface, v
        _SDL_UPDATE_PIXELS(eim);
      }
 
-   evas_common_font_draw((RGBA_Image *) eim->cache_entry.src, context, font, x, y, text, intl_props);
+   evas_common_font_draw((RGBA_Image *) eim->cache_entry.src, context, font, x, y, intl_props);
    evas_common_cpu_end_opt();
 
    if (mustlock_im)
diff --git a/src/modules/engines/software_x11/.cvsignore b/src/modules/engines/software_x11/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index 86960b7..675c6cd 100644 (file)
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib/include \
 -I$(top_srcdir)/src/modules/engines \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @evas_engine_software_xlib_cflags@ \
 @evas_engine_software_xcb_cflags@
index b4932ce..ef61755 100644 (file)
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <xcb/shm.h>
 #include <xcb/xcb_image.h>
 #include <pixman.h>
@@ -40,7 +44,6 @@ _find_xcbob(xcb_connection_t *conn, int depth, int w, int h, int shm, void *data
    int                lbytes;
    int                bpp;
 
-//   return evas_software_xcb_x_output_buffer_new(d, v, depth, w, h, shm, data);
    if (!shm)
      return evas_software_xcb_x_output_buffer_new(conn, depth, w, h, shm, data);
    if (depth > 1)
@@ -92,7 +95,6 @@ _find_xcbob(xcb_connection_t *conn, int depth, int w, int h, int shm, void *data
 static void
 _unfind_xcbob(Xcb_Output_Buffer *xcbob, int sync)
 {
-//   evas_software_xcb_x_output_buffer_free(xcbob, sync); return;
    if (xcbob->shm_info)
      {
        shmpool = eina_list_prepend(shmpool, xcbob);
@@ -398,8 +400,14 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
        Eina_Rectangle *rect;
 
        RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, buf->w, buf->h);
+       obr = calloc(1, sizeof(Outbuf_Region));
+        if (!obr) return NULL;
        rect = eina_rectangle_new(x, y, w, h);
-       if (!rect) return NULL;
+       if (!rect)
+          {
+             free(obr);
+             return NULL;
+          }
 
        buf->priv.onebuf_regions = eina_list_append(buf->priv.onebuf_regions, rect);
        if (buf->priv.onebuf)
@@ -416,7 +424,6 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
               }
             return buf->priv.onebuf;
          }
-       obr = calloc(1, sizeof(Outbuf_Region));
        obr->x = 0;
        obr->y = 0;
        obr->w = buf->w;
@@ -439,21 +446,37 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
                                                                 buf->w, buf->h,
                                                                 use_shm,
                                                                 NULL);
+             if (!obr->xcbob)
+               {
+                  free(obr);
+                  return NULL;
+               }
              im = (RGBA_Image *) evas_cache_image_data(evas_common_image_cache_get(),
                                                        buf->w, buf->h,
                                                        (DATA32 *)evas_software_xcb_x_output_buffer_data(obr->xcbob, &bpl),
                                                        alpha, EVAS_COLORSPACE_ARGB8888);
-            im->extended_info = obr;
-            if (buf->priv.x11.xcb.mask)
-              obr->mxcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x11.xcb.conn,
-                                                                   1,
-                                                                   buf->w, buf->h,
-                                                                   use_shm,
-                                                                   NULL);
+             if (!im)
+               {
+                  evas_software_xcb_x_output_buffer_free(obr->xcbob, 0);
+                  free(obr);
+                  return NULL;
+               }
+             im->extended_info = obr;
+             if (buf->priv.x11.xcb.mask)
+                obr->mxcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x11.xcb.conn,
+                                                                    1,
+                                                                    buf->w, buf->h,
+                                                                    use_shm,
+                                                                    NULL);
          }
        else
          {
             im = (RGBA_Image *) evas_cache_image_empty(evas_common_image_cache_get());
+             if (!im)
+               {
+                  free(obr);
+                  return NULL;
+               }
              im->cache_entry.flags.alpha |= alpha ? 1 : 0;
              evas_cache_image_surface_alloc(&im->cache_entry, buf->w, buf->h);
             im->extended_info = obr;
@@ -464,6 +487,12 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
                                                                      buf->w, buf->h,
                                                                      use_shm,
                                                                      NULL);
+                  if (!obr->xcbob)
+                    {
+                       evas_cache_image_drop(&im->cache_entry);
+                       free(obr);
+                       return NULL;
+                    }
                   if (buf->priv.x11.xcb.mask)
                     obr->mxcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x11.xcb.conn,
                                                                         1,
@@ -478,6 +507,12 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
                                                                      buf->h, buf->w,
                                                                      use_shm,
                                                                      NULL);
+                  if (!obr->xcbob)
+                    {
+                       evas_cache_image_drop(&im->cache_entry);
+                       free(obr);
+                       return NULL;
+                    }
                   if (buf->priv.x11.xcb.mask)
                     obr->mxcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x11.xcb.conn,
                                                                         1,
@@ -488,9 +523,11 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
          }
        /* FIXME: We should be able to remove this memset, but somewhere in the process
           we copy too much to the destination surface and some area are not cleaned before copy. */
-       if (alpha)
-          /* FIXME: faster memset! */
-          memset(im->image.data, 0, w * h * sizeof(DATA32));
+       if ((alpha) && (im->image.data))
+          {
+             /* FIXME: faster memset! */
+             memset(im->image.data, 0, w * h * sizeof(DATA32));
+          }
 
        buf->priv.onebuf = im;
        return im;
@@ -498,6 +535,7 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
 
 
    obr = calloc(1, sizeof(Outbuf_Region));
+   if (!obr) return NULL;
    obr->x = x;
    obr->y = y;
    obr->w = w;
@@ -526,27 +564,37 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
                                  w, h,
                                  use_shm,
                                  NULL);
-        im = (RGBA_Image *) evas_cache_image_data(evas_common_image_cache_get(),
-                                                  w, h,
-                                                  (DATA32 *) evas_software_xcb_x_output_buffer_data(obr->xcbob, &bpl),
-                                                  alpha, EVAS_COLORSPACE_ARGB8888);
-       im->extended_info = obr;
+        if (!obr->xcbob)
+          {
+             free(obr);
+             return NULL;
+          }
+        im = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(),
+                                                 w, h,
+                                                 (DATA32 *) evas_software_xcb_x_output_buffer_data(obr->xcbob, &bpl),
+                                                 alpha, EVAS_COLORSPACE_ARGB8888);
+        if (!im)
+          {
+             _unfind_xcbob(obr->xcbob, 0);
+             free(obr);
+             return NULL;
+          }
+        im->extended_info = obr;
        if (buf->priv.x11.xcb.mask)
          obr->mxcbob = _find_xcbob(buf->priv.x11.xcb.conn,
                                     1,
                                     w, h,
                                     use_shm,
                                     NULL);
-/*       obr->mxcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x11.xcb.conn, */
-/*                                                           1, */
-/*                                                           w, */
-/*                                                           h, */
-/*                                                           use_shm, */
-/*                                                           NULL); */
      }
    else
      {
-        im = (RGBA_Image *) evas_cache_image_empty(evas_common_image_cache_get());
+        im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get());
+        if (!im)
+          {
+             free(obr);
+             return NULL;
+          }
         im->cache_entry.flags.alpha |= alpha ? 1 : 0;
         evas_cache_image_surface_alloc(&im->cache_entry, w, h);
        im->extended_info = obr;
@@ -557,6 +605,12 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
                                       w, h,
                                       use_shm,
                                       NULL);
+             if (!obr->xcbob)
+               {
+                  evas_cache_image_drop(&im->cache_entry);
+                  free(obr);
+                  return NULL;
+               }
              if (buf->priv.x11.xcb.mask)
                obr->mxcbob = _find_xcbob(buf->priv.x11.xcb.conn,
                                          1,
@@ -564,12 +618,6 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
                                          use_shm,
                                          NULL);
           }
-/*        obr->xcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x11.xcb.conn, */
-/*                                                           buf->priv.x11.xcb.depth, */
-/*                                                           w, */
-/*                                                           h, */
-/*                                                           use_shm, */
-/*                                                           NULL); */
        else if ((buf->rot == 90) || (buf->rot == 270))
           {
              obr->xcbob = _find_xcbob(buf->priv.x11.xcb.conn,
@@ -577,6 +625,12 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
                                       h, w,
                                       use_shm,
                                       NULL);
+             if (!obr->xcbob)
+               {
+                  evas_cache_image_drop(&im->cache_entry);
+                  free(obr);
+                  return NULL;
+               }
              if (buf->priv.x11.xcb.mask)
                obr->mxcbob = _find_xcbob(buf->priv.x11.xcb.conn,
                                          1,
@@ -584,31 +638,15 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
                                          use_shm,
                                          NULL);
           }
-/*       obr->xcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x11.xcb.conn, */
-/*                                                          buf->priv.x11.xcb.depth, */
-/*                                                          h, */
-/*                                                          w, */
-/*                                                          use_shm, */
-/*                                                          NULL); */
-/*
-       if (buf->priv.x11.xcb.mask)
-         obr->mxcbob = _find_xcbob(buf->priv.x11.xcb.conn,
-                                    1, w, h,
-                                    use_shm,
-                                    NULL);
-*/
-/*       obr->mxcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x11.xcb.conn, */
-/*                                                           1, */
-/*                                                           w, */
-/*                                                           h, */
-/*                                                           use_shm, */
-/*                                                           NULL); */
      }
    /* FIXME: We should be able to remove this memset, but somewhere in the process
       we copy too much to the destination surface and some area are not cleaned before copy. */
-   if ((buf->priv.x11.xcb.mask) || (buf->priv.destination_alpha))
-       /* FIXME: faster memset! */
-     memset(im->image.data, 0, w * h * sizeof(DATA32));
+   if (((buf->priv.x11.xlib.mask) || (buf->priv.destination_alpha)) &&
+       (im->image.data))
+     {
+        /* FIXME: faster memset! */
+        memset(im->image.data, 0, w * h * sizeof(DATA32));
+     }
 
    buf->priv.pending_writes = eina_list_append(buf->priv.pending_writes, im);
    return im;
@@ -654,9 +692,10 @@ evas_software_xcb_outbuf_flush(Outbuf *buf)
                                 buf->priv.x11.xcb.gc,
                                 0, 0, pixman_region_n_rects(&tmpr),
                                 (const xcb_rectangle_t *)pixman_region_rectangles(&tmpr, NULL));
-       evas_software_xcb_x_output_buffer_paste(obr->xcbob, buf->priv.x11.xcb.win,
-                                               buf->priv.x11.xcb.gc,
-                                               0, 0, 0);
+        if (obr->xcbob)
+           evas_software_xcb_x_output_buffer_paste(obr->xcbob, buf->priv.x11.xcb.win,
+                                                   buf->priv.x11.xcb.gc,
+                                                   0, 0, 0);
        if (obr->mxcbob)
          {
              xcb_set_clip_rectangles(buf->priv.x11.xcb.conn, XCB_CLIP_ORDERING_YX_BANDED,
@@ -685,11 +724,12 @@ evas_software_xcb_outbuf_flush(Outbuf *buf)
                                                    obr->y,
                                                    obr->w,
                                                    obr->h);
-             evas_software_xcb_x_output_buffer_paste(obr->xcbob,
-                                                     buf->priv.x11.xcb.win,
-                                                     buf->priv.x11.xcb.gc,
-                                                     obr->x,
-                                                     obr->y, 0);
+             if (obr->xcbob)
+                evas_software_xcb_x_output_buffer_paste(obr->xcbob,
+                                                        buf->priv.x11.xcb.win,
+                                                        buf->priv.x11.xcb.gc,
+                                                        obr->x,
+                                                        obr->y, 0);
              if (obr->mxcbob)
                evas_software_xcb_x_output_buffer_paste(obr->mxcbob,
                                                        buf->priv.x11.xcb.mask,
@@ -706,8 +746,6 @@ evas_software_xcb_outbuf_flush(Outbuf *buf)
             evas_cache_image_drop(&im->cache_entry);
             if (obr->xcbob) _unfind_xcbob(obr->xcbob, 0);
             if (obr->mxcbob) _unfind_xcbob(obr->mxcbob, 0);
-/*              if (obr->xcbob) evas_software_xcb_x_output_buffer_free(obr->xcbob, 0); */
-/*              if (obr->mxcbob) evas_software_xcb_x_output_buffer_free(obr->mxcbob, 0); */
              free(obr);
           }
        buf->priv.prev_pending_writes = buf->priv.pending_writes;
@@ -743,10 +781,6 @@ evas_software_xcb_outbuf_flush(Outbuf *buf)
             evas_cache_image_drop(&im->cache_entry);
             if (obr->xcbob) _unfind_xcbob(obr->xcbob, 0);
             if (obr->mxcbob) _unfind_xcbob(obr->mxcbob, 0);
-/*
-            if (obr->xcbob) evas_software_x11_x_output_buffer_free(obr->xcbob, 0);
-            if (obr->mxcbob) evas_software_x11_x_output_buffer_free(obr->mxcbob, 0);
- */
             free(obr);
             evas_cache_image_drop(&im->cache_entry);
          }
@@ -842,8 +876,11 @@ evas_software_xcb_outbuf_push_updated_region(Outbuf     *buf,
      }
    if (!conv_func) return;
 
+   if (!obr->xcbob) return;
    data = evas_software_xcb_x_output_buffer_data(obr->xcbob, &bpl);
+   if (!data) return;
    src_data = update->image.data;
+   if (!src_data) return;
    if (buf->rot == 0)
      {
        obr->x = x;
@@ -901,9 +938,10 @@ evas_software_xcb_outbuf_push_updated_region(Outbuf     *buf,
        if (buf->priv.debug)
          evas_software_xcb_outbuf_debug_show(buf, buf->priv.x11.xcb.win,
                                              obr->x, obr->y, obr->w, obr->h);
-       evas_software_xcb_x_output_buffer_paste(obr->xcbob, buf->priv.x11.xcb.win,
-                                               buf->priv.x11.xcb.gc,
-                                               obr->x, obr->y, 0);
+        if (obr->xcbob)
+           evas_software_xcb_x_output_buffer_paste(obr->xcbob, buf->priv.x11.xcb.win,
+                                                   buf->priv.x11.xcb.gc,
+                                                   obr->x, obr->y, 0);
      }
 #endif
    if (obr->mxcbob)
@@ -1028,10 +1066,10 @@ evas_software_xcb_outbuf_mask_set(Outbuf        *buf,
      }
    buf->priv.x11.xcb.mask = mask;
    if (buf->priv.x11.xcb.mask)
-      {
-        buf->priv.x11.xcb.gcm = xcb_generate_id(buf->priv.x11.xcb.conn);
-        xcb_create_gc(buf->priv.x11.xcb.conn, buf->priv.x11.xcb.gcm, buf->priv.x11.xcb.win, 0, NULL);
-      }
+     {
+        buf->priv.x11.xcb.gcm = xcb_generate_id(buf->priv.x11.xcb.conn);
+        xcb_create_gc(buf->priv.x11.xcb.conn, buf->priv.x11.xcb.gcm, buf->priv.x11.xcb.win, 0, NULL);
+     }
 }
 
 void
@@ -1063,16 +1101,17 @@ evas_software_xcb_outbuf_debug_show(Outbuf        *buf,
 
       i = xcb_setup_roots_iterator((xcb_setup_t *)xcb_get_setup(buf->priv.x11.xcb.conn));
       for (; i.rem; xcb_screen_next(&i))
-        if (i.data->root == geom->root)
-           {
-              screen = i.data;
-              break;
-           }
+        {
+           if (i.data->root == geom->root)
+             {
+                screen = i.data;
+                break;
+             }
+        }
       free (geom);
    }
    for (i = 0; i < 20; i++)
      {
-/*     xcb_image_t    *image; */
        xcb_rectangle_t rect = { x, y, w, h};
        uint32_t        mask;
        uint32_t        value[2];
@@ -1084,9 +1123,6 @@ evas_software_xcb_outbuf_debug_show(Outbuf        *buf,
        xcb_poly_fill_rectangle (buf->priv.x11.xcb.conn, draw, buf->priv.x11.xcb.gc, 1, &rect);
         /* we sync */
         free(xcb_get_input_focus_reply(buf->priv.x11.xcb.conn, xcb_get_input_focus_unchecked(buf->priv.x11.xcb.conn), NULL));
-//     image = xcb_image_get(buf->priv.x11.xcb.conn, draw, x, y, w, h, XCB_ALL_PLANES, XCB_IMAGE_FORMAT_Z_PIXMAP);
-//     if (image)
-//        xcb_image_destroy(image);
         /* we sync */
         free(xcb_get_input_focus_reply(buf->priv.x11.xcb.conn, xcb_get_input_focus_unchecked(buf->priv.x11.xcb.conn), NULL));
        mask = XCB_GC_FOREGROUND | XCB_GC_GRAPHICS_EXPOSURES;
@@ -1096,9 +1132,6 @@ evas_software_xcb_outbuf_debug_show(Outbuf        *buf,
        xcb_poly_fill_rectangle (buf->priv.x11.xcb.conn, draw, buf->priv.x11.xcb.gc, 1, &rect);
         /* we sync */
         free(xcb_get_input_focus_reply(buf->priv.x11.xcb.conn, xcb_get_input_focus_unchecked(buf->priv.x11.xcb.conn), NULL));
-//     image = xcb_image_get(buf->priv.x11.xcb.conn, draw, x, y, w, h, XCB_ALL_PLANES, XCB_IMAGE_FORMAT_Z_PIXMAP);
-//     if (image)
-//        xcb_image_destroy(image);
         /* we sync */
         free(xcb_get_input_focus_reply(buf->priv.x11.xcb.conn, xcb_get_input_focus_unchecked(buf->priv.x11.xcb.conn), NULL));
      }
index af0b691..6514a58 100644 (file)
@@ -324,11 +324,6 @@ evas_software_xlib_x_output_buffer_new(Display *d, Visual *v, int depth, int w,
                               }
                             if (!_x_err)
                               {
-//                              printf("SHM++ ID=%i -> %i bytes [%i creates]\n",
-//                                     xob->shm_info->shmid,
-//                                     xob->xim->bytes_per_line * xob->xim->height,
-//                                     creates);
-//                              creates++;
                                 xob->bpl = xob->xim->bytes_per_line;
                                 xob->psize = xob->bpl * xob->h;
                                 return xob;
@@ -376,10 +371,6 @@ evas_software_xlib_x_output_buffer_free(X_Output_Buffer *xob, int sync)
 {
    if (xob->shm_info)
      {
-//     printf("SHM-- ID=%i -> %i bytes, [sync=%i]\n",
-//            xob->shm_info->shmid,
-//            xob->xim->bytes_per_line * xob->xim->height,
-//            sync);
        if (sync) XSync(xob->display, False);
        XShmDetach(xob->display, xob->shm_info);
        XDestroyImage(xob->xim);
@@ -400,14 +391,12 @@ evas_software_xlib_x_output_buffer_paste(X_Output_Buffer *xob, Drawable d, GC gc
 {
    if (xob->shm_info)
      {
-//     printf("shm\n");
        XShmPutImage(xob->display, d, gc, xob->xim, 0, 0, x, y,
                     xob->w, xob->h, False);
        if (sync) XSync(xob->display, False);
      }
    else
      {
-//     printf("NO! shm\n");
        XPutImage(xob->display, d, gc, xob->xim, 0, 0, x, y,
                  xob->w, xob->h);
      }
index c9ad163..1c67579 100644 (file)
@@ -47,7 +47,6 @@ _find_xob(Display *d, Visual *v, int depth, int w, int h, int shm, void *data)
    int fitness = 0x7fffffff;
    int sz, lbytes, bpp;
 
-//   return evas_software_xlib_x_output_buffer_new(d, v, depth, w, h, shm, data);
    if (!shm)
      return evas_software_xlib_x_output_buffer_new(d, v, depth, w, h, shm, data);
    if (depth > 1)
@@ -105,7 +104,6 @@ _find_xob(Display *d, Visual *v, int depth, int w, int h, int shm, void *data)
 static void
 _unfind_xob(X_Output_Buffer *xob, int sync)
 {
-//   evas_software_xlib_x_output_buffer_free(xob, sync); return;
    if (xob->shm_info)
      {
         SHMPOOL_LOCK();
@@ -383,8 +381,14 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w
        Eina_Rectangle *rect;
 
        RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, buf->w, buf->h);
+       obr = calloc(1, sizeof(Outbuf_Region));
+        if (!obr) return NULL;
        rect = eina_rectangle_new(x, y, w, h);
-       if (!rect) return NULL;
+        if (!rect)
+          {
+             free(obr);
+             return NULL;
+          }
 
        buf->priv.onebuf_regions = eina_list_append(buf->priv.onebuf_regions, rect);
        if (buf->priv.onebuf)
@@ -400,7 +404,6 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w
               }
             return buf->priv.onebuf;
          }
-       obr = calloc(1, sizeof(Outbuf_Region));
        obr->x = 0;
        obr->y = 0;
        obr->w = buf->w;
@@ -424,22 +427,38 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w
                                                              buf->w, buf->h,
                                                              use_shm,
                                                              NULL);
-             im = (RGBA_Image *) evas_cache_image_data(evas_common_image_cache_get(),
-                                                       buf->w, buf->h,
-                                                       (DATA32 *) evas_software_xlib_x_output_buffer_data(obr->xob, &bpl),
-                                                       alpha, EVAS_COLORSPACE_ARGB8888);
-            im->extended_info = obr;
-            if (buf->priv.x11.xlib.mask)
-              obr->mxob = evas_software_xlib_x_output_buffer_new(buf->priv.x11.xlib.disp,
-                                                                buf->priv.x11.xlib.vis,
-                                                                1,
-                                                                buf->w, buf->h,
-                                                                use_shm,
-                                                                NULL);
+             if (!obr->xob)
+               {
+                  free(obr);
+                  return NULL;
+               }
+             im = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(),
+                                                      buf->w, buf->h,
+                                                      (DATA32 *) evas_software_xlib_x_output_buffer_data(obr->xob, &bpl),
+                                                      alpha, EVAS_COLORSPACE_ARGB8888);
+             if (!im)
+               {
+                  evas_software_xlib_x_output_buffer_free(obr->xob, 0);
+                  free(obr);
+                  return NULL;
+               }
+             im->extended_info = obr;
+             if (buf->priv.x11.xlib.mask)
+                obr->mxob = evas_software_xlib_x_output_buffer_new(buf->priv.x11.xlib.disp,
+                                                                   buf->priv.x11.xlib.vis,
+                                                                   1,
+                                                                   buf->w, buf->h,
+                                                                   use_shm,
+                                                                   NULL);
          }
        else
          {
-            im = (RGBA_Image *) evas_cache_image_empty(evas_common_image_cache_get());
+            im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get());
+             if (!im)
+               {
+                  free(obr);
+                  return NULL;
+               }
              im->cache_entry.flags.alpha |= alpha ? 1 : 0;
              evas_cache_image_surface_alloc(&im->cache_entry, buf->w, buf->h);
             im->extended_info = obr;
@@ -451,12 +470,18 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w
                                                                     buf->w, buf->h,
                                                                     use_shm,
                                                                     NULL);
+                  if (!obr->xob)
+                    {
+                       evas_cache_image_drop(&im->cache_entry);
+                       free(obr);
+                       return NULL;
+                    }
                   if (buf->priv.x11.xlib.mask)
-                    obr->mxob = evas_software_xlib_x_output_buffer_new(buf->priv.x11.xlib.disp,
-                                                                       buf->priv.x11.xlib.vis,
-                                                                       1, buf->w, buf->h,
-                                                                       use_shm,
-                                                                       NULL);
+                     obr->mxob = evas_software_xlib_x_output_buffer_new(buf->priv.x11.xlib.disp,
+                                                                        buf->priv.x11.xlib.vis,
+                                                                        1, buf->w, buf->h,
+                                                                        use_shm,
+                                                                        NULL);
                }
             else if ((buf->rot == 90) || (buf->rot == 270))
                {
@@ -466,6 +491,12 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w
                                                                     buf->h, buf->w,
                                                                     use_shm,
                                                                     NULL);
+                  if (!obr->xob)
+                    {
+                       evas_cache_image_drop(&im->cache_entry);
+                       free(obr);
+                       return NULL;
+                    }
                   if (buf->priv.x11.xlib.mask)
                     obr->mxob = evas_software_xlib_x_output_buffer_new(buf->priv.x11.xlib.disp,
                                                                        buf->priv.x11.xlib.vis,
@@ -476,15 +507,18 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w
          }
        /* FIXME: We should be able to remove this memset, but somewhere in the process
           we copy too much to the destination surface and some area are not cleaned before copy. */
-       if (alpha)
-          /* FIXME: faster memset! */
-          memset(im->image.data, 0, w * h * sizeof(DATA32));
+        if ((alpha) && (im->image.data))
+          {
+             /* FIXME: faster memset! */
+             memset(im->image.data, 0, w * h * sizeof(DATA32));
+          }
 
         buf->priv.onebuf = im;
        return im;
      }
 
    obr = calloc(1, sizeof(Outbuf_Region));
+   if (!obr) return NULL;
    obr->x = x;
    obr->y = y;
    obr->w = w;
@@ -514,16 +548,21 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w
                             w, h,
                             use_shm,
                             NULL);
-/*      obr->xob = evas_software_xlib_x_output_buffer_new(buf->priv.x11.xlib.disp, */
-/*                                                      buf->priv.x11.xlib.vis, */
-/*                                                      buf->priv.x11.xlib.depth, */
-/*                                                      w, h, */
-/*                                                      use_shm, */
-/*                                                      NULL); */
-        im = (RGBA_Image *) evas_cache_image_data(evas_common_image_cache_get(),
-                                                  w, h,
-                                                  (DATA32 *) evas_software_xlib_x_output_buffer_data(obr->xob, &bpl),
-                                                  alpha, EVAS_COLORSPACE_ARGB8888);
+        if (!obr->xob)
+          {
+             free(obr);
+             return NULL;
+          }
+        im = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(),
+                                                 w, h,
+                                                 (DATA32 *) evas_software_xlib_x_output_buffer_data(obr->xob, &bpl),
+                                                 alpha, EVAS_COLORSPACE_ARGB8888);
+        if (!im)
+          {
+             _unfind_xob(obr->xob, 0);
+             free(obr);
+             return NULL;
+          }
        im->extended_info = obr;
        if (buf->priv.x11.xlib.mask)
          obr->mxob = _find_xob(buf->priv.x11.xlib.disp,
@@ -531,17 +570,15 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w
                                1, w, h,
                                use_shm,
                                NULL);
-/*
-         obr->mxob = evas_software_xlib_x_output_buffer_new(buf->priv.x11.xlib.disp,
-                                                           buf->priv.x11.xlib.vis,
-                                                           1, w, h,
-                                                           use_shm,
-                                                           NULL);
- */
      }
    else
      {
-        im = (RGBA_Image *) evas_cache_image_empty(evas_common_image_cache_get());
+        im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get());
+        if (!im)
+          {
+             free(obr);
+             return NULL;
+          }
         im->cache_entry.flags.alpha |= alpha ? 1 : 0;
         evas_cache_image_surface_alloc(&im->cache_entry, w, h);
        im->extended_info = obr;
@@ -553,6 +590,12 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w
                                   w, h,
                                   use_shm,
                                   NULL);
+             if (!obr->xob)
+               {
+                  evas_cache_image_drop(&im->cache_entry);
+                  free(obr);
+                  return NULL;
+               }
              if (buf->priv.x11.xlib.mask)
                obr->mxob = _find_xob(buf->priv.x11.xlib.disp,
                                      buf->priv.x11.xlib.vis,
@@ -560,14 +603,6 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w
                                      use_shm,
                                      NULL);
           }
-/*
-         obr->xob = evas_software_xlib_x_output_buffer_new(buf->priv.x11.xlib.disp,
-                                                          buf->priv.x11.xlib.vis,
-                                                          buf->priv.x11.xlib.depth,
-                                                          w, h,
-                                                          use_shm,
-                                                          NULL);
- */
        else if ((buf->rot == 90) || (buf->rot == 270))
           {
              obr->xob = _find_xob(buf->priv.x11.xlib.disp,
@@ -576,6 +611,12 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w
                                   h, w,
                                   use_shm,
                                   NULL);
+             if (!obr->xob)
+               {
+                  evas_cache_image_drop(&im->cache_entry);
+                  free(obr);
+                  return NULL;
+               }
              if (buf->priv.x11.xlib.mask)
                obr->mxob = _find_xob(buf->priv.x11.xlib.disp,
                                      buf->priv.x11.xlib.vis,
@@ -583,35 +624,15 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w
                                      use_shm,
                                      NULL);
           }
-/*
-         obr->xob = evas_software_xlib_x_output_buffer_new(buf->priv.x11.xlib.disp,
-                                                          buf->priv.x11.xlib.vis,
-                                                          buf->priv.x11.xlib.depth,
-                                                          h, w,
-                                                          use_shm,
-                                                          NULL);
- */
-/*        
-       if (buf->priv.x11.xlib.mask)
-         obr->mxob = _find_xob(buf->priv.x11.xlib.disp,
-                               buf->priv.x11.xlib.vis,
-                               1, w, h,
-                               use_shm,
-                               NULL);
- */
-/*
-         obr->mxob = evas_software_xlib_x_output_buffer_new(buf->priv.x11.xlib.disp,
-                                                           buf->priv.x11.xlib.vis,
-                                                           1, w, h,
-                                                           use_shm,
-                                                           NULL);
- */
      }
    /* FIXME: We should be able to remove this memset, but somewhere in the process
       we copy too much to the destination surface and some area are not cleaned before copy. */
-   if ((buf->priv.x11.xlib.mask) || (buf->priv.destination_alpha))
-     /* FIXME: faster memset! */
-     memset(im->image.data, 0, w * h * sizeof(DATA32));
+   if (((buf->priv.x11.xlib.mask) || (buf->priv.destination_alpha)) &&
+       (im->image.data))
+     {
+        /* FIXME: faster memset! */
+        memset(im->image.data, 0, w * h * sizeof(DATA32));
+     }
 
 #ifdef EVAS_FRAME_QUEUING
    if (!evas_common_frameq_enabled())
@@ -658,9 +679,10 @@ evas_software_xlib_outbuf_flush(Outbuf *buf)
             eina_rectangle_free(rect);
          }
        XSetRegion(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gc, tmpr);
-       evas_software_xlib_x_output_buffer_paste(obr->xob, buf->priv.x11.xlib.win,
-                                               buf->priv.x11.xlib.gc,
-                                               0, 0, 0);
+        if (obr->xob)
+           evas_software_xlib_x_output_buffer_paste(obr->xob, buf->priv.x11.xlib.win,
+                                                    buf->priv.x11.xlib.gc,
+                                                    0, 0, 0);
        if (obr->mxob)
          {
             XSetRegion(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gcm, tmpr);
@@ -682,9 +704,10 @@ evas_software_xlib_outbuf_flush(Outbuf *buf)
             if (buf->priv.debug)
               evas_software_xlib_outbuf_debug_show(buf, buf->priv.x11.xlib.win,
                                                   obr->x, obr->y, obr->w, obr->h);
-            evas_software_xlib_x_output_buffer_paste(obr->xob, buf->priv.x11.xlib.win,
-                                                    buf->priv.x11.xlib.gc,
-                                                    obr->x, obr->y, 0);
+             if (obr->xob)
+                evas_software_xlib_x_output_buffer_paste(obr->xob, buf->priv.x11.xlib.win,
+                                                         buf->priv.x11.xlib.gc,
+                                                         obr->x, obr->y, 0);
             if (obr->mxob)
               evas_software_xlib_x_output_buffer_paste(obr->mxob,
                                                       buf->priv.x11.xlib.mask,
@@ -692,27 +715,23 @@ evas_software_xlib_outbuf_flush(Outbuf *buf)
                                                       obr->x, obr->y, 0);
          }
 #ifdef EVAS_FRAME_QUEUING
-     LKL(buf->priv.lock);
+        LKL(buf->priv.lock);
 #endif
        while (buf->priv.prev_pending_writes)
          {
             im = buf->priv.prev_pending_writes->data;
             buf->priv.prev_pending_writes =
-              eina_list_remove_list(buf->priv.prev_pending_writes,
-                                    buf->priv.prev_pending_writes);
+                eina_list_remove_list(buf->priv.prev_pending_writes,
+                                      buf->priv.prev_pending_writes);
             obr = im->extended_info;
             evas_cache_image_drop(&im->cache_entry);
             if (obr->xob) _unfind_xob(obr->xob, 0);
             if (obr->mxob) _unfind_xob(obr->mxob, 0);
-/*
-            if (obr->xob) evas_software_xlib_x_output_buffer_free(obr->xob, 0);
-            if (obr->mxob) evas_software_xlib_x_output_buffer_free(obr->mxob, 0);
- */
             free(obr);
          }
        buf->priv.prev_pending_writes = buf->priv.pending_writes;
 #ifdef EVAS_FRAME_QUEUING
-     LKU(buf->priv.lock);
+        LKU(buf->priv.lock);
 #endif
        buf->priv.pending_writes = NULL;
        XFlush(buf->priv.x11.xlib.disp);
@@ -741,17 +760,13 @@ evas_software_xlib_outbuf_flush(Outbuf *buf)
          {
             RGBA_Image *im;
             Outbuf_Region *obr;
-
+             
             im = eina_list_data_get(buf->priv.pending_writes);
             buf->priv.pending_writes = eina_list_remove_list(buf->priv.pending_writes, buf->priv.pending_writes);
             obr = im->extended_info;
             evas_cache_image_drop(&im->cache_entry);
             if (obr->xob) _unfind_xob(obr->xob, 0);
             if (obr->mxob) _unfind_xob(obr->mxob, 0);
-/*
-            if (obr->xob) evas_software_xlib_x_output_buffer_free(obr->xob, 0);
-            if (obr->mxob) evas_software_xlib_x_output_buffer_free(obr->mxob, 0);
- */
             free(obr);
             evas_cache_image_drop(&im->cache_entry);
          }
@@ -779,18 +794,18 @@ evas_software_xlib_outbuf_idle_flush(Outbuf *buf)
    else
      {
 #ifdef EVAS_FRAME_QUEUING
-     LKL(buf->priv.lock);
+        LKL(buf->priv.lock);
 #endif
        if (buf->priv.prev_pending_writes) XSync(buf->priv.x11.xlib.disp, False);
        while (buf->priv.prev_pending_writes)
          {
             RGBA_Image *im;
             Outbuf_Region *obr;
-
+             
             im = buf->priv.prev_pending_writes->data;
             buf->priv.prev_pending_writes =
-              eina_list_remove_list(buf->priv.prev_pending_writes,
-                                    buf->priv.prev_pending_writes);
+                eina_list_remove_list(buf->priv.prev_pending_writes,
+                                      buf->priv.prev_pending_writes);
             obr = im->extended_info;
             evas_cache_image_drop(&im->cache_entry);
             if (obr->xob) _unfind_xob(obr->xob, 0);
@@ -798,7 +813,7 @@ evas_software_xlib_outbuf_idle_flush(Outbuf *buf)
             free(obr);
          }
 #ifdef EVAS_FRAME_QUEUING
-     LKU(buf->priv.lock);
+        LKU(buf->priv.lock);
 #endif
        _clear_xob(0);
      }
@@ -846,8 +861,11 @@ evas_software_xlib_outbuf_push_updated_region(Outbuf *buf, RGBA_Image *update, i
      }
    if (!conv_func) return;
 
+   if (!obr->xob) return;
    data = evas_software_xlib_x_output_buffer_data(obr->xob, &bpl);
+   if (!data) return;
    src_data = update->image.data;
+   if (!src_data) return;
    if (buf->rot == 0)
      {
        obr->x = x;
@@ -904,10 +922,11 @@ evas_software_xlib_outbuf_push_updated_region(Outbuf *buf, RGBA_Image *update, i
      {
        if (buf->priv.debug)
          evas_software_xlib_outbuf_debug_show(buf, buf->priv.x11.xlib.win,
-                                             obr->x, obr->y, obr->w, obr->h);
-       evas_software_xlib_x_output_buffer_paste(obr->xob, buf->priv.x11.xlib.win,
-                                               buf->priv.x11.xlib.gc,
-                                               obr->x, obr->y, 0);
+                                               obr->x, obr->y, obr->w, obr->h);
+        if (obr->xob)
+           evas_software_xlib_x_output_buffer_paste(obr->xob, buf->priv.x11.xlib.win,
+                                                    buf->priv.x11.xlib.gc,
+                                                    obr->x, obr->y, 0);
      }
 #endif
    if (obr->mxob)
@@ -1058,25 +1077,15 @@ evas_software_xlib_outbuf_debug_show(Outbuf * buf, Drawable draw, int x, int y,
      }
    for (i = 0; i < 20; i++)
      {
-//     XImage             *xim;
-
        XSetForeground(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gc,
                       BlackPixel(buf->priv.x11.xlib.disp, screen_num));
        XFillRectangle(buf->priv.x11.xlib.disp, draw, buf->priv.x11.xlib.gc, x, y, w, h);
        XSync(buf->priv.x11.xlib.disp, False);
-//     xim =
-//       XGetImage(buf->priv.x11.xlib.disp, draw, x, y, w, h, 0xffffffff, ZPixmap);
-//     if (xim)
-//       XDestroyImage(xim);
        XSync(buf->priv.x11.xlib.disp, False);
        XSetForeground(buf->priv.x11.xlib.disp, buf->priv.x11.xlib.gc,
                       WhitePixel(buf->priv.x11.xlib.disp, screen_num));
        XFillRectangle(buf->priv.x11.xlib.disp, draw, buf->priv.x11.xlib.gc, x, y, w, h);
        XSync(buf->priv.x11.xlib.disp, False);
-//     xim =
-//       XGetImage(buf->priv.x11.xlib.disp, draw, x, y, w, h, 0xffffffff, ZPixmap);
-//     if (xim)
-//       XDestroyImage(xim);
        XSync(buf->priv.x11.xlib.disp, False);
      }
 }
diff --git a/src/modules/engines/xrender_x11/.cvsignore b/src/modules/engines/xrender_x11/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
diff --git a/src/modules/engines/xrender_x11/Evas_Engine_XRender_X11.h b/src/modules/engines/xrender_x11/Evas_Engine_XRender_X11.h
deleted file mode 100644 (file)
index b329ae4..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef _EVAS_ENGINE_XRENDER_X11_H
-#define _EVAS_ENGINE_XRENDER_X11_H
-
-#include <X11/Xlib.h>
-
-typedef enum
-{
-  EVAS_ENGINE_INFO_XRENDER_BACKEND_XLIB,
-  EVAS_ENGINE_INFO_XRENDER_BACKEND_XCB
-} Evas_Engine_Info_XRender_Backend;
-
-typedef struct _Evas_Engine_Info_XRender_X11 Evas_Engine_Info_XRender_X11;
-
-/*
- *               Xlib       |      XCB
- * connection | Display *   |  xcb_connection_t *
- * screen     | NULL        |  xcb_screen_t *
- * drawable   | Drawable    |  xcb_drawable_t
- * mask       | Pixmap      |  xcb_pixmap_t
- * visual     | Visual *    |  xcb_visualtype_t *
- * colormap   | Colormap    |  xcb_colormap_t
- */
-
-struct _Evas_Engine_Info_XRender_X11
-{
-   /* PRIVATE - don't mess with this baby or evas will poke its tongue out */
-   /* at you and make nasty noises */
-   Evas_Engine_Info magic;
-
-   /* engine specific data & parameters it needs to set up */
-   struct {
-      Evas_Engine_Info_XRender_Backend backend;
-      void                            *connection;
-      void                            *screen;
-      unsigned int                     drawable;
-      unsigned int                     mask;
-      void                            *visual;
-      unsigned char                    destination_alpha : 1;
-   } info;
-
-   /* non-blocking or blocking mode */
-   Evas_Engine_Render_Mode render_mode;
-};
-#endif
diff --git a/src/modules/engines/xrender_x11/Makefile.am b/src/modules/engines/xrender_x11/Makefile.am
deleted file mode 100644 (file)
index 4ad72a7..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = \
--I. \
--I$(top_srcdir)/src/lib \
--I$(top_srcdir)/src/lib/include \
--I$(top_srcdir)/src/modules/engines \
-@FREETYPE_CFLAGS@ \
-@EINA_CFLAGS@ \
-@evas_engine_xrender_x11_cflags@ \
-@evas_engine_xrender_xcb_cflags@
-
-if BUILD_ENGINE_XRENDER_X11
-
-XRENDER_X11_SOURCES = \
-evas_engine_xlib_font.c \
-evas_engine_xlib_image.c \
-evas_engine_xlib_render.c \
-evas_engine_xlib_ximage.c \
-evas_engine.c
-
-if BUILD_ENGINE_XRENDER_XCB
-
-XRENDER_X11_SOURCES += \
-evas_engine_xcb_font.c \
-evas_engine_xcb_image.c \
-evas_engine_xcb_render.c \
-evas_engine_xcb_ximage.c
-
-endif
-
-XRENDER_X11_LIBADD = @evas_engine_xrender_xcb_libs@ @evas_engine_xrender_x11_libs@
-
-
-includes_HEADERS = Evas_Engine_XRender_X11.h
-includesdir = $(includedir)/evas-@VMAJ@
-
-if !EVAS_STATIC_BUILD_XRENDER_X11
-
-pkgdir = $(libdir)/evas/modules/engines/xrender_x11/$(MODULE_ARCH)
-pkg_LTLIBRARIES        = module.la
-
-module_la_SOURCES = $(XRENDER_X11_SOURCES)
-module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ $(XRENDER_X11_LIBADD)
-module_la_LDFLAGS = -no-undefined -module -avoid-version
-module_la_LIBTOOLFLAGS = --tag=disable-static
-
-else
-
-noinst_LTLIBRARIES = libevas_engine_xrender_x11.la
-
-libevas_engine_xrender_x11_la_SOURCES = $(XRENDER_X11_SOURCES)
-libevas_engine_xrender_x11_la_LIBADD = $(XRENDER_X11_LIBADD)
-
-endif
-endif
-
-EXTRA_DIST = evas_engine.h
diff --git a/src/modules/engines/xrender_x11/evas_engine.c b/src/modules/engines/xrender_x11/evas_engine.c
deleted file mode 100644 (file)
index b7efa97..0000000
+++ /dev/null
@@ -1,1328 +0,0 @@
-#include "evas_common.h" /* Also includes international specific stuff */
-#include "evas_private.h"
-
-#include "Evas_Engine_XRender_X11.h"
-
-#include "evas_engine.h"
-int _evas_xrender_xcb_log_dom = -1;
-/* function tables - filled in later (func and parent func) */
-static Evas_Func func, pfunc;
-
-#ifdef BUILD_ENGINE_SOFTWARE_XLIB
-struct xrdb_user
-{
-   time_t last_stat;
-   time_t last_mtime;
-   XrmDatabase db;
-};
-static struct xrdb_user xrdb_user = {0, 0, NULL};
-
-static Eina_Bool
-xrdb_user_query(const char *name, const char *cls, char **type, XrmValue *val)
-{
-   time_t last = xrdb_user.last_stat, now = time(NULL);
-
-   xrdb_user.last_stat = now;
-   if (last != now) /* don't stat() more than once every second */
-     {
-       struct stat st;
-       const char *home = getenv("HOME");
-       char tmp[PATH_MAX];
-
-       if (!home) goto failed;
-       snprintf(tmp, sizeof(tmp), "%s/.Xdefaults", home);
-       if (stat(tmp, &st) != 0) goto failed;
-       if (xrdb_user.last_mtime != st.st_mtime)
-         {
-            if (xrdb_user.db) XrmDestroyDatabase(xrdb_user.db);
-            xrdb_user.db = XrmGetFileDatabase(tmp);
-            if (!xrdb_user.db) goto failed;
-            xrdb_user.last_mtime = st.st_mtime;
-         }
-     }
-
-   if (!xrdb_user.db) return EINA_FALSE;
-   return XrmGetResource(xrdb_user.db, name, cls, type, val);
-
- failed:
-   if (xrdb_user.db)
-     {
-       XrmDestroyDatabase(xrdb_user.db);
-       xrdb_user.db = NULL;
-     }
-   xrdb_user.last_mtime = 0;
-   return EINA_FALSE;
-}
-#endif
-
-/* engine struct data */
-typedef struct _Render_Engine        Render_Engine;
-typedef struct _Render_Engine_Update Render_Engine_Update;
-
-struct _Render_Engine_Update
-{
-   int x, y, w, h;
-   Xrender_Surface *surface;
-};
-
-struct _Render_Engine
-{
-   struct {
-      void         *connection;
-      void         *screen;
-      unsigned int  window;
-      unsigned int  mask;
-      void         *visual;
-      void        (*sync) (Render_Engine *re);
-   } x11;
-   unsigned char    destination_alpha : 1;
-
-#ifdef BUILD_ENGINE_XRENDER_X11
-   XrmDatabase   xrdb; // xres - dpi
-   struct { // xres - dpi
-      int        dpi; // xres - dpi
-   } xr; // xres - dpi
-#endif
-   
-   Ximage_Info     *xinf;
-   Xrender_Surface *output;
-   Xrender_Surface *mask_output;
-
-   Tilebuf         *tb;
-   Tilebuf_Rect    *rects;
-   Eina_Inlist     *cur_rect;
-   int              end : 1;
-
-   Eina_List       *updates;
-
-   XR_Font_Surface *(*font_surface_new)(Ximage_Info *xinf, RGBA_Font_Glyph *fg);
-   void (*font_surface_free)(XR_Font_Surface *fs);
-   void (*font_surface_draw)(Ximage_Info *xinf, RGBA_Image *surface, RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg, int x, int y);
-
-   XR_Image *(*image_load)(Ximage_Info *xinf, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error);
-   XR_Image *(*image_new_from_data)(Ximage_Info *xinf, int w, int h, void *data, int alpha, int cspace);
-   XR_Image *(*image_new_from_copied_data)(Ximage_Info *xinf, int w, int h, void *data, int alpha, int cspace);
-   XR_Image *(*image_new)(Ximage_Info *xinf, int w, int h);
-   void (*image_resize)(XR_Image *im, int w, int h);
-   void (*image_free)(XR_Image *im);
-   void (*image_region_dirty)(XR_Image *im, int x, int y, int w, int h);
-   void (*image_dirty)(XR_Image *im);
-   XR_Image *(*image_copy)(XR_Image *im);
-   void *(*image_data_get)(XR_Image *im);
-   XR_Image *(*image_data_find)(void *data);
-   void (*image_data_put)(XR_Image *im, void *data);
-   void (*image_alpha_set)(XR_Image *im, int alpha);
-   int  (*image_alpha_get)(XR_Image *im);
-   void (*image_border_set)(XR_Image *im, int l, int r, int t, int b);
-   void (*image_border_get)(XR_Image *im, int *l, int *r, int *t, int *b);
-   void (*image_surface_gen)(XR_Image *im);
-   void (*image_cache_set)(int size);
-   int  (*image_cache_get)(void);
-
-   Ximage_Info *(*ximage_info_get)(Display *connection, Drawable draw, Visual *vis);
-   void (*ximage_info_free)(Ximage_Info *xinf);
-   void (*ximage_info_pool_flush)(Ximage_Info *xinf, unsigned int max_num, unsigned int max_mem);
-   Ximage_Image *(*ximage_new)(Ximage_Info *xinf, int w, int h, int depth);
-   void (*ximage_free)(Ximage_Image *xim);
-   void (*ximage_put)(Ximage_Image *xim, Drawable draw, int x, int y, int w, int h);
-
-   Xrender_Surface *(*render_surface_new)(Ximage_Info *xinf, int w, int h, XRenderPictFormat *fmt, int alpha);
-   Xrender_Surface *(*render_surface_adopt)(Ximage_Info *xinf, Drawable draw, int w, int h, int alpha);
-   Xrender_Surface *(*render_surface_format_adopt)(Ximage_Info *xinf, Drawable draw, int w, int h, XRenderPictFormat *fmt, int alpha);
-   void (*render_surface_free)(Xrender_Surface *rs);
-   void (*render_surface_repeat_set)(Xrender_Surface *rs, int repeat);
-   void (*render_surface_solid_rectangle_set)(Xrender_Surface *rs, int r, int g, int b, int a, int x, int y, int w, int h);
-   void (*render_surface_argb_pixels_fill)(Xrender_Surface *rs, int sw, int sh, void *pixels, int x, int y, int w, int h, int ox, int oy);
-   void (*render_surface_rgb_pixels_fill)(Xrender_Surface *rs, int sw, int sh __UNUSED__, void *pixels, int x, int y, int w, int h, int ox, int oy);
-   void (*render_surface_clips_set)(Xrender_Surface *rs, RGBA_Draw_Context *dc, int rx, int ry, int rw, int rh);
-   void (*render_surface_composite)(Xrender_Surface *srs, Xrender_Surface *drs, RGBA_Draw_Context *dc, int sx, int sy, int sw, int sh, int x, int y, int w, int h, int smooth);
-   void (*render_surface_copy)(Xrender_Surface *srs, Xrender_Surface *drs, int sx, int sy, int x, int y, int w, int h);
-   void (*render_surface_rectangle_draw)(Xrender_Surface *rs, RGBA_Draw_Context *dc, int x, int y, int w, int h);
-   void (*render_surface_line_draw)(Xrender_Surface *rs, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2);
-   void (*render_surface_polygon_draw)(Xrender_Surface *rs, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
-};
-
-/* internal engine routines */
-
-#ifdef BUILD_ENGINE_XRENDER_X11
-
-static void
-_xlib_sync(Render_Engine *re)
-{
-   XSync((Display *)re->x11.connection, False);
-}
-
-static Render_Engine *
-_output_xlib_setup(int           width,
-                   int           height,
-                   unsigned char destination_alpha,
-                   void         *connection,
-                   unsigned int  draw,
-                   unsigned int  mask,
-                   void         *visual)
-{
-   Render_Engine *re;
-
-   re = calloc(1, sizeof(Render_Engine));
-   if (!re)
-     return NULL;
-
-   re->x11.connection = connection;
-   re->x11.screen = NULL;
-   re->x11.window = draw;
-   re->x11.mask = mask;
-   re->x11.visual = visual;
-
-   if (re->xinf) _xr_xlib_image_info_free(re->xinf);
-   re->xinf = _xr_xlib_image_info_get((Display *)re->x11.connection, (Drawable)re->x11.window, (Visual *)re->x11.visual);
-
-   if (!re->x11.mask)
-     re->output = _xr_xlib_render_surface_adopt(re->xinf, (Drawable)re->x11.window, width, height, destination_alpha);
-   else
-     re->output = _xr_xlib_render_surface_adopt(re->xinf, (Drawable)re->x11.window, width, height, 0);
-   if (re->x11.mask)
-     re->mask_output = _xr_xlib_render_surface_format_adopt(re->xinf,
-                                                            (Drawable)re->x11.mask,
-                                                            width, height,
-                                                            re->xinf->x11.fmt1, 1);
-   else
-     re->mask_output = NULL;
-
-//   if (re->output) _xr_xlib_render_surface_free(re->output);
-//   if (re->mask_output) _xr_xlib_render_surface_free(re->mask_output);
-
-   re->x11.sync = _xlib_sync;
-
-   re->font_surface_new = _xre_xlib_font_surface_new;
-   re->font_surface_free = _xre_xlib_font_surface_free;
-   re->font_surface_draw = _xre_xlib_font_surface_draw;
-
-   re->image_load = _xre_xlib_image_load;
-   re->image_new_from_data = _xre_xlib_image_new_from_data;
-   re->image_new_from_copied_data = _xre_xlib_image_new_from_copied_data;
-   re->image_new = _xre_xlib_image_new;
-   re->image_resize = _xre_xlib_image_resize;
-   re->image_free = _xre_xlib_image_free;
-   re->image_region_dirty = _xre_xlib_image_region_dirty;
-   re->image_dirty = _xre_xlib_image_dirty;
-   re->image_copy = _xre_xlib_image_copy;
-   re->image_data_get = _xre_xlib_image_data_get;
-   re->image_data_find = _xre_xlib_image_data_find;
-   re->image_data_put = _xre_xlib_image_data_put;
-   re->image_alpha_set = _xre_xlib_image_alpha_set;
-   re->image_alpha_get = _xre_xlib_image_alpha_get;
-   re->image_border_set = _xre_xlib_image_border_set;
-   re->image_border_get = _xre_xlib_image_border_get;
-   re->image_surface_gen = _xre_xlib_image_surface_gen;
-   re->image_cache_set = _xre_xlib_image_cache_set;
-   re->image_cache_get = _xre_xlib_image_cache_get;
-
-   re->ximage_info_get = _xr_xlib_image_info_get;
-   re->ximage_info_free = _xr_xlib_image_info_free;
-   re->ximage_info_pool_flush = _xr_xlib_image_info_pool_flush;
-   re->ximage_new = _xr_xlib_image_new;
-   re->ximage_free = _xr_xlib_image_free;
-   re->ximage_put = _xr_xlib_image_put;
-
-   re->render_surface_new = _xr_xlib_render_surface_new;
-   re->render_surface_adopt = _xr_xlib_render_surface_adopt;
-   re->render_surface_format_adopt = _xr_xlib_render_surface_format_adopt;
-   re->render_surface_free = _xr_xlib_render_surface_free;
-   re->render_surface_repeat_set = _xr_xlib_render_surface_repeat_set;
-   re->render_surface_solid_rectangle_set = _xr_xlib_render_surface_solid_rectangle_set;
-   re->render_surface_argb_pixels_fill = _xr_xlib_render_surface_argb_pixels_fill;
-   re->render_surface_rgb_pixels_fill = _xr_xlib_render_surface_rgb_pixels_fill;
-   re->render_surface_clips_set = _xr_xlib_render_surface_clips_set;
-   re->render_surface_composite = _xr_xlib_render_surface_composite;
-   re->render_surface_copy = _xr_xlib_render_surface_copy;
-   re->render_surface_rectangle_draw = _xr_xlib_render_surface_rectangle_draw;
-   re->render_surface_line_draw = _xr_xlib_render_surface_line_draw;
-   re->render_surface_polygon_draw = _xr_xlib_render_surface_polygon_draw;
-
-     {   
-        int status;
-        char *type = NULL;
-        XrmValue val;
-        
-        re->xr.dpi = 75000; // dpy * 1000
-
-       status = xrdb_user_query("Xft.dpi", "Xft.Dpi", &type, &val);
-       if ((!status) || (!type))
-         {
-            if (!re->xrdb)
-              re->xrdb = XrmGetDatabase((Display *)re->x11.connection);
-            if (re->xrdb)
-              status = XrmGetResource(re->xrdb,
-                                      "Xft.dpi", "Xft.Dpi", &type, &val);
-         }
-
-        if ((status) && (type))
-          {
-             if (!strcmp(type, "String"))
-               {
-                  const char *str, *dp;
-                  
-                  str = val.addr;
-                  dp = strchr(str, '.');
-                  if (!dp) dp = strchr(str, ',');
-                  
-                  if (dp)
-                    {
-                       int subdpi, len, i;
-                       char *buf;
-                       
-                       buf = alloca(dp - str + 1);
-                       strncpy(buf, str, dp - str);
-                       buf[dp - str] = 0;
-                       len = strlen(dp + 1);
-                       subdpi = atoi(dp + 1);
-                       
-                       if (len < 3)
-                         {
-                            for (i = len; i < 3; i++) subdpi *= 10;
-                         }
-                       else if (len > 3)
-                         {
-                            for (i = len; i > 3; i--) subdpi /= 10;
-                         }
-                       re->xr.dpi = atoi(buf) * 1000;
-                    }
-                  else
-                    re->xr.dpi = atoi(str) * 1000;
-                  evas_common_font_dpi_set(re->xr.dpi / 1000);
-               }
-          }
-     }
-   
-   return re;
-}
-
-#endif /* BUILD_ENGINE_XRENDER_X11 */
-
-#ifdef BUILD_ENGINE_XRENDER_XCB
-
-static void
-_xcb_sync(Render_Engine *re)
-{
-   xcb_get_input_focus_reply_t *reply;
-
-   reply = xcb_get_input_focus_reply(re->x11.connection,
-                                     xcb_get_input_focus_unchecked(re->x11.connection),
-                                     NULL);
-   if (reply)
-     free(reply);
-}
-
-static Render_Engine *
-_output_xcb_setup(int           width,
-                  int           height,
-                  unsigned char destination_alpha,
-                  void         *connection,
-                  void         *screen,
-                  unsigned int  draw,
-                  unsigned int  mask,
-                  void         *visual)
-{
-   Render_Engine *re;
-
-   re = calloc(1, sizeof(Render_Engine));
-   if (!re)
-     return NULL;
-
-   re->x11.connection = connection;
-   re->x11.screen = screen;
-   re->x11.window = draw;
-   re->x11.mask = mask;
-   re->x11.visual = visual;
-
-   if (re->xinf) _xr_xcb_image_info_free(re->xinf);
-   re->xinf = _xr_xcb_image_info_get((xcb_connection_t *)re->x11.connection, (xcb_screen_t *)re->x11.screen, (xcb_drawable_t)re->x11.window, (xcb_visualtype_t *)re->x11.visual);
-
-   if (!re->x11.mask)
-     re->output = _xr_xcb_render_surface_adopt(re->xinf, (Drawable)re->x11.window, width, height, destination_alpha);
-   else
-     re->output = _xr_xcb_render_surface_adopt(re->xinf, (Drawable)re->x11.window, width, height, 0);
-   if (re->x11.mask)
-     re->mask_output = _xr_xcb_render_surface_format_adopt(re->xinf,
-                                                            (Drawable)re->x11.mask,
-                                                            width, height,
-                                                            re->xinf->x11.fmt1, 1);
-   else
-     re->mask_output = NULL;
-
-   if (re->output) _xr_xcb_render_surface_free(re->output);
-   if (re->mask_output) _xr_xcb_render_surface_free(re->mask_output);
-
-   re->x11.sync = _xcb_sync;
-
-   re->font_surface_new = _xre_xcb_font_surface_new;
-   re->font_surface_free = _xre_xcb_font_surface_free;
-   re->font_surface_draw = _xre_xcb_font_surface_draw;
-
-   re->image_load = _xre_xcb_image_load;
-   re->image_new_from_data = _xre_xcb_image_new_from_data;
-   re->image_new_from_copied_data = _xre_xcb_image_new_from_copied_data;
-   re->image_new = _xre_xcb_image_new;
-   re->image_resize = _xre_xcb_image_resize;
-   re->image_free = _xre_xcb_image_free;
-   re->image_region_dirty = _xre_xcb_image_region_dirty;
-   re->image_dirty = _xre_xcb_image_dirty;
-   re->image_copy = _xre_xcb_image_copy;
-   re->image_data_get = _xre_xcb_image_data_get;
-   re->image_data_find = _xre_xcb_image_data_find;
-   re->image_data_put = _xre_xcb_image_data_put;
-   re->image_alpha_set = _xre_xcb_image_alpha_set;
-   re->image_alpha_get = _xre_xcb_image_alpha_get;
-   re->image_border_set = _xre_xcb_image_border_set;
-   re->image_border_get = _xre_xcb_image_border_get;
-   re->image_surface_gen = _xre_xcb_image_surface_gen;
-   re->image_cache_set = _xre_xcb_image_cache_set;
-   re->image_cache_get = _xre_xcb_image_cache_get;
-
-   re->ximage_info_get = _xr_xcb_image_info_get;
-   re->ximage_info_free = _xr_xcb_image_info_free;
-   re->ximage_info_pool_flush = _xr_xcb_image_info_pool_flush;
-   re->ximage_new = _xr_xcb_image_new;
-   re->ximage_free = _xr_xcb_image_free;
-   re->ximage_put = _xr_xcb_image_put;
-
-   re->render_surface_new = _xr_xcb_render_surface_new;
-   re->render_surface_adopt = _xr_xcb_render_surface_adopt;
-   re->render_surface_format_adopt = _xr_xcb_render_surface_format_adopt;
-   re->render_surface_free = _xr_xcb_render_surface_free;
-   re->render_surface_repeat_set = _xr_xcb_render_surface_repeat_set;
-   re->render_surface_solid_rectangle_set = _xr_xcb_render_surface_solid_rectangle_set;
-   re->render_surface_argb_pixels_fill = _xr_xcb_render_surface_argb_pixels_fill;
-   re->render_surface_rgb_pixels_fill = _xr_xcb_render_surface_rgb_pixels_fill;
-   re->render_surface_clips_set = _xr_xcb_render_surface_clips_set;
-   re->render_surface_composite = _xr_xcb_render_surface_composite;
-   re->render_surface_copy = _xr_xcb_render_surface_copy;
-   re->render_surface_rectangle_draw = _xr_xcb_render_surface_rectangle_draw;
-   re->render_surface_line_draw = _xr_xcb_render_surface_line_draw;
-   re->render_surface_polygon_draw = _xr_xcb_render_surface_polygon_draw;
-
-   return re;
-}
-
-#endif /* BUILD_ENGINE_XRENDER_XCB */
-
-/* engine api this module provides */
-static void *
-eng_info(Evas *e __UNUSED__)
-{
-   Evas_Engine_Info_XRender_X11 *info;
-   info = calloc(1, sizeof(Evas_Engine_Info_XRender_X11));
-   if (!info) return NULL;
-   info->magic.magic = rand();
-   info->render_mode = EVAS_RENDER_MODE_BLOCKING;
-   return info;
-}
-
-static void
-eng_info_free(Evas *e __UNUSED__, void *info)
-{
-   Evas_Engine_Info_XRender_X11 *in;
-   in = (Evas_Engine_Info_XRender_X11 *)info;
-   free(in);
-}
-
-static int
-eng_setup(Evas *e, void *in)
-{
-   Render_Engine *re = NULL;
-   Evas_Engine_Info_XRender_X11 *info;
-   int resize = 1;
-
-   info = (Evas_Engine_Info_XRender_X11 *)in;
-   if (!e->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();
-
-#ifdef BUILD_ENGINE_XRENDER_X11
-        if (info->info.backend == 0)
-          {
-             re = _output_xlib_setup(e->output.w,
-                                     e->output.h,
-                                     info->info.destination_alpha,
-                                     info->info.connection,
-                                     info->info.drawable,
-                                     info->info.mask,
-                                     info->info.visual);
-          }
-#endif /* BUILD_ENGINE_XRENDER_X11 */
-
-#ifdef BUILD_ENGINE_XRENDER_XCB
-        if (info->info.backend == 1)
-          {
-             re = _output_xcb_setup(e->output.w,
-                                    e->output.h,
-                                    info->info.destination_alpha,
-                                    info->info.connection,
-                                    info->info.screen,
-                                    info->info.drawable,
-                                    info->info.mask,
-                                    info->info.visual);
-          }
-#endif /* BUILD_ENGINE_XRENDER_XCB */
-
-        if (!re)
-          return 0;
-
-       re->tb = evas_common_tilebuf_new(e->output.w, e->output.h);
-       if (re->tb)
-         evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
-       e->engine.data.output = re;
-       resize = 0;
-     }
-   re = e->engine.data.output;
-   if (!re) return 0;
-
-   if (!e->engine.data.context) e->engine.data.context = e->engine.func->context_new(e->engine.data.output);
-
-   if (resize)
-     {
-       if (re->tb) evas_common_tilebuf_free(re->tb);
-       if ((e->output.w > 0) && (e->output.h > 0))
-         re->tb = evas_common_tilebuf_new(e->output.w, e->output.h);
-       else
-         re->tb = evas_common_tilebuf_new(1, 1);
-        if (re->tb)
-         evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
-     }
-
-   return 1;
-}
-
-static void
-eng_output_free(void *data)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   
-#ifdef BUILD_ENGINE_XRENDER_X11
-// NOTE: XrmGetDatabase() result is shared per connection, do not free it.
-//   if (re->xrdb) XrmDestroyDatabase(re->xrdb);
-#endif
-   
-   evas_common_font_shutdown();
-   evas_common_image_shutdown();
-   while (re->updates)
-     {
-       Render_Engine_Update *reu;
-
-       reu = re->updates->data;
-       re->updates = eina_list_remove_list(re->updates, re->updates);
-       re->render_surface_free(reu->surface);
-       free(reu);
-     }
-   if (re->tb) evas_common_tilebuf_free(re->tb);
-   if (re->output) re->render_surface_free(re->output);
-   if (re->mask_output) re->render_surface_free(re->mask_output);
-   if (re->rects) evas_common_tilebuf_free_render_rects(re->rects);
-   if (re->xinf) re->ximage_info_free(re->xinf);
-   free(re);
-}
-
-static void
-eng_output_resize(void *data, int w, int h)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   if (re->output)
-     {
-       if ((re->output->width == w) && (re->output->height == h)) return;
-       if (re->output) re->render_surface_free(re->output);
-     }
-   re->output = re->render_surface_adopt(re->xinf, re->x11.window, w, h, 0);
-   if (re->mask_output)
-     {
-       if (re->mask_output) re->render_surface_free(re->mask_output);
-       re->mask_output = re->render_surface_format_adopt(re->xinf,
-                                                          re->x11.mask,
-                                                          w, h,
-                                                          re->xinf->x11.fmt1, 1);
-     }
-   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;
-   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;
-
-   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);
-}
-
-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 *rect;
-   int ux, uy, uw, uh;
-
-   re = (Render_Engine *)data;
-   if (re->end)
-     {
-       re->end = 0;
-       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 = 1;
-     }
-
-   *x = ux; *y = uy; *w = uw; *h = uh;
-   *cx = 0; *cy = 0; *cw = uw; *ch = uh;
-// use target format to avoid conversion to depth when copying to screen
-//   return _xr_render_surface_new(re->xinf, uw, uh, re->xinf->fmtdef, 0);
-// use 24/32bpp for tmp buf for better quality. rendering in 24/32bpp
-   return re->render_surface_new(re->xinf, uw, uh, re->xinf->x11.fmt24, 0);
-}
-
-static void
-eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-   Render_Engine_Update *reu;
-
-   re = (Render_Engine *)data;
-   reu = malloc(sizeof(Render_Engine_Update));
-   if (!reu) return;
-   reu->x = x;
-   reu->y = y;
-   reu->w = w;
-   reu->h = h;
-   reu->surface = (Xrender_Surface *)surface;
-   re->updates = eina_list_append(re->updates, reu);
-}
-
-static void
-eng_output_flush(void *data)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   while (re->updates)
-     {
-       Render_Engine_Update *reu;
-
-       reu = re->updates->data;
-       re->updates = eina_list_remove_list(re->updates, re->updates);
-       if (re->mask_output)
-         {
-            Xrender_Surface *tsurf;
-
-            re->render_surface_copy(reu->surface, re->output, 0, 0,
-                                    reu->x, reu->y, reu->w, reu->h);
-            tsurf = re->render_surface_new(re->xinf, reu->w, reu->h, re->xinf->x11.fmt1, 1);
-            if (tsurf)
-              {
-                 re->render_surface_copy(reu->surface, tsurf, 0, 0,
-                                         0, 0, reu->w, reu->h);
-                 re->render_surface_copy(tsurf, re->mask_output, 0, 0,
-                                         reu->x, reu->y, reu->w, reu->h);
-                 re->render_surface_free(tsurf);
-              }
-         }
-       else
-         {
-            re->render_surface_copy(reu->surface, re->output, 0, 0,
-                                    reu->x, reu->y, reu->w, reu->h);
-         }
-       re->render_surface_free(reu->surface);
-       free(reu);
-     }
-   re->x11.sync(re);
-   re->ximage_info_pool_flush(re->xinf, 0, 0);
-}
-
-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();
-   // FIXME: kill pixmaps too - but... xrender engine is dead... no? :):)
-}
-
-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;
-
-   re->render_surface_rectangle_draw((Xrender_Surface *)surface,
-                                     (RGBA_Draw_Context *)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;
-
-   re->render_surface_line_draw((Xrender_Surface *)surface, (RGBA_Draw_Context *)context, x1, y1, x2, y2);
-}
-
-static void
-eng_polygon_draw(void *data, void *context, void *surface, void *polygon, int x, int y)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-
-   re->render_surface_polygon_draw((Xrender_Surface *)surface, (RGBA_Draw_Context *)context, (RGBA_Polygon_Point *)polygon, x, y);
-}
-
-static int
-eng_image_alpha_get(void *data, void *image)
-{
-   Render_Engine *re;
-
-   if (!image) return 0;
-
-   re = (Render_Engine *)data;
-   return re->image_alpha_get((XR_Image *)image);
-}
-
-static int
-eng_image_colorspace_get(void *data __UNUSED__, void *image)
-{
-   if (!image) return EVAS_COLORSPACE_ARGB8888;
-   return ((XR_Image *)image)->cs.space;
-}
-
-static void *
-eng_image_alpha_set(void *data, void *image, int has_alpha)
-{
-   Render_Engine *re;
-   XR_Image *im;
-
-   im = (XR_Image *)image;
-   if (!im) return im;
-   if (im->cs.space != EVAS_COLORSPACE_ARGB8888) return im;
-   if (((im->alpha) && (has_alpha)) || ((!im->alpha) && (!has_alpha)))
-     return im;
-   re = (Render_Engine *)data;
-   if (im->references > 1)
-     {
-       XR_Image *old_im;
-
-       old_im = im;
-       im = re->image_copy(old_im);
-       if (im)
-         {
-            im->alpha = old_im->alpha;
-            re->image_free(old_im);
-         }
-       else
-         im = old_im;
-     }
-   else
-     re->image_dirty(im);
-   re->image_alpha_set(im, has_alpha);
-   return im;
-}
-
-static void *
-eng_image_border_set(void *data, void *image, int l, int r, int t, int b)
-{
-   Render_Engine *re;
-
-   if (!image) return image;
-   re = (Render_Engine *)data;
-   re->image_border_set((XR_Image *)image, l, r, t, b);
-   return image;
-}
-
-static void
-eng_image_border_get(void *data, void *image, int *l, int *r, int *t, int *b)
-{
-   Render_Engine *re;
-
-   if (!image) return;
-   re = (Render_Engine *)data;
-   re->image_border_get((XR_Image *)image, l, r, t, b);
-}
-
-static char *
-eng_image_comment_get(void *data __UNUSED__, void *image, char *key __UNUSED__)
-{
-   if (!image) return NULL;
-   return strdup(((XR_Image *)image)->comment);
-}
-
-static char *
-eng_image_format_get(void *data __UNUSED__, void *image)
-{
-   if (!image) return NULL;
-   return ((XR_Image *)image)->format;
-}
-
-static void
-eng_image_colorspace_set(void *data, void *image, int cspace)
-{
-   Render_Engine *re;
-   XR_Image *im;
-
-   if (!image) return;
-   im = (XR_Image *)image;
-   if (im->cs.space == cspace) return;
-
-   if (im->im) evas_cache_image_drop(&im->im->cache_entry);
-   im->im = NULL;
-
-   re = (Render_Engine *)data;
-   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:
-       if ((im->free_data) && (im->data)) free(im->data);
-       im->data = NULL;
-       if (im->cs.data)
-         {
-            if (!im->cs.no_free) free(im->cs.data);
-         }
-       if (im->h > 0)
-         im->cs.data = calloc(1, im->h * sizeof(unsigned char *) * 2);
-       im->cs.no_free = 0;
-       break;
-      default:
-       abort();
-       break;
-     }
-   im->cs.space = cspace;
-   re->image_dirty(im);
-   re->image_region_dirty(im, 0, 0, im->w, im->h);
-}
-
-static void *
-eng_image_native_set(void *data __UNUSED__, void *image __UNUSED__, void *native __UNUSED__)
-{
-   return NULL;
-}
-
-static void *
-eng_image_native_get(void *data __UNUSED__, void *image __UNUSED__)
-{
-   return NULL;
-}
-
-static void *
-eng_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo)
-{
-   Render_Engine *re;
-   XR_Image *im;
-
-   re = (Render_Engine *)data;
-   *error = 0;
-   im = re->image_load(re->xinf, file, key, lo, error);
-   return im;
-}
-
-static void *
-eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
-{
-   Render_Engine *re;
-   XR_Image *im;
-
-   re = (Render_Engine *)data;
-   im = re->image_new_from_data(re->xinf, w, h, image_data, alpha, cspace);
-   return im;
-}
-
-static void *
-eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
-{
-   Render_Engine *re;
-   XR_Image *im;
-
-   re = (Render_Engine *)data;
-   im = re->image_new_from_copied_data(re->xinf, w, h, image_data, alpha, cspace);
-   return im;
-}
-
-static void
-eng_image_free(void *data, void *image)
-{
-   Render_Engine *re;
-
-   if (!image) return;
-   re = (Render_Engine *)data;
-   re->image_free((XR_Image *)image);
-}
-
-static void
-eng_image_size_get(void *data __UNUSED__, void *image, int *w, int *h)
-{
-   if (!image) return;
-   if (w) *w = ((XR_Image *)image)->w;
-   if (h) *h = ((XR_Image *)image)->h;
-}
-
-static void *
-eng_image_size_set(void *data, void *image, int w, int h)
-{
-   Render_Engine *re;
-   XR_Image *im, *im_old;
-
-   if (!image) return NULL;
-   re = (Render_Engine *)data;
-   im_old = image;
-   if ((im_old->cs.space == EVAS_COLORSPACE_YCBCR422P601_PL) ||
-       (im_old->cs.space == EVAS_COLORSPACE_YCBCR422P709_PL))
-     w &= ~0x1;
-   if ((im_old) && (im_old->w == w) && (im_old->h == h))
-     return image;
-   if ((w <= 0) || (h <= 0))
-     {
-       re->image_free(im_old);
-       return NULL;
-     }
-   if (im_old)
-     {
-       im = re->image_new_from_copied_data(im_old->xinf, w, h, NULL, im_old->alpha, im_old->cs.space);
-       re->image_free(im_old);
-       return im;
-     }
-   return image;
-}
-
-static void *
-eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h)
-{
-   Render_Engine *re;
-
-   if (!image) return image;
-   re = (Render_Engine *)data;
-   re->image_dirty((XR_Image *)image);
-   re->image_region_dirty((XR_Image *)image, x, y, w, h);
-   return image;
-}
-
-static void *
-eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
-{
-   Render_Engine *re;
-   XR_Image *im;
-
-   if (!image)
-     {
-       *image_data = NULL;
-       return NULL;
-     }
-   re = (Render_Engine *)data;
-   im = (XR_Image *)image;
-   if (im->im)
-     evas_cache_image_load_data(&im->im->cache_entry);
-   switch (im->cs.space)
-     {
-      case EVAS_COLORSPACE_ARGB8888:
-       if (to_write)
-         {
-            if (im->references > 1)
-              {
-                 XR_Image *im_old;
-
-                 im_old = im;
-                 im = re->image_copy(im_old);
-                 if (im)
-                   re->image_free(im_old);
-                 else
-                   im = im_old;
-              }
-            else
-              re->image_dirty(im);
-         }
-       break;
-      case EVAS_COLORSPACE_YCBCR422P601_PL:
-      case EVAS_COLORSPACE_YCBCR422P709_PL:
-       break;
-      default:
-       abort();
-       break;
-     }
-   if (image_data) *image_data = re->image_data_get(im);
-   return im;
-}
-
-static void *
-eng_image_data_put(void *data, void *image, DATA32 *image_data)
-{
-   Render_Engine *re;
-   XR_Image *im;
-
-   if (!image) return image;
-   re = (Render_Engine *)data;
-   im = (XR_Image *)image;
-
-   switch (im->cs.space)
-     {
-      case EVAS_COLORSPACE_ARGB8888:
-       if (re->image_data_get(im) != image_data)
-         {
-            XR_Image *im_old;
-
-            im_old = im;
-            image = re->image_data_find(image_data);
-            if (image != im_old)
-              {
-                 if (!image)
-                   {
-                      image = re->image_new_from_data(im_old->xinf, im_old->w, im_old->h, image_data, im_old->alpha, EVAS_COLORSPACE_ARGB8888);
-                      if (image)
-                        {
-                           ((XR_Image *)image)->alpha = im_old->alpha;
-                           re->image_free(im_old);
-                        }
-                      else
-                        image = im_old;
-                   }
-                 else
-                   {
-                      re->image_free(im_old);
-                   }
-              }
-            else
-              {
-                 re->image_free(image);
-                 image = im_old;
-              }
-         }
-        break;
-      case EVAS_COLORSPACE_YCBCR422P601_PL:
-      case EVAS_COLORSPACE_YCBCR422P709_PL:
-       if (re->image_data_get(im) != image_data)
-         {
-            if (im->data)
-              {
-                 if (im->free_data) free(im->data);
-                 im->data = NULL;
-              }
-             if (im->cs.data)
-              {
-                 if (!im->cs.no_free) free(im->cs.data);
-              }
-            im->cs.data = image_data;
-            re->image_dirty(im);
-         }
-        break;
-      default:
-       abort();
-       break;
-     }
-   return image;
-}
-
-static void
-eng_image_data_preload_request(void *data __UNUSED__, void *image, const void *target)
-{
-   XR_Image *xim = image;
-   RGBA_Image *im;
-
-   if (!xim) return ;
-   im = (RGBA_Image*) xim->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)
-{
-   XR_Image *xim = image;
-   RGBA_Image *im;
-
-   if (!xim) return ;
-   im = (RGBA_Image*) xim->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;
-
-   if ((!image) || (!surface)) return;
-
-   re = (Render_Engine *)data;
-   re->image_surface_gen((XR_Image *)image);
-   if (((XR_Image *)image)->surface)
-     re->render_surface_composite(((XR_Image *)image)->surface,
-                                  (Xrender_Surface *)surface,
-                                  (RGBA_Draw_Context *)context,
-                                  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 __UNUSED__, int hint __UNUSED__)
-{
-}
-
-static int
-eng_image_scale_hint_get(void *data __UNUSED__, void *image __UNUSED__)
-{
-   return EVAS_IMAGE_SCALE_HINT_NONE;
-}
-
-
-static void
-eng_image_cache_flush(void *data)
-{
-   Render_Engine *re;
-   int tmp_size;
-
-   re = (Render_Engine *)data;
-   tmp_size = re->image_cache_get();
-   pfunc.image_cache_flush(data);
-   re->image_cache_set(0);
-   re->image_cache_set(tmp_size);
-}
-
-static void
-eng_image_cache_set(void *data, int bytes)
-{
-   Render_Engine *re;
-
-   re = (Render_Engine *)data;
-   pfunc.image_cache_set(data, bytes);
-   re->image_cache_set(bytes);
-}
-
-static int
-eng_image_cache_get(void *data)
-{
-   return pfunc.image_cache_get(data);
-}
-
-static void
-eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow __UNUSED__, int oh __UNUSED__, const Eina_Unicode *text, const Evas_Text_Props *intl_props)
-{
-   Render_Engine        *re;
-   RGBA_Image           *im;
-
-   re = (Render_Engine *)data;
-
-   re->render_surface_clips_set((Xrender_Surface *)surface, (RGBA_Draw_Context *)context, x, y, w, h);
-
-   im = (RGBA_Image *) evas_cache_image_data(evas_common_image_cache_get(),
-                                             ((Xrender_Surface *)surface)->width,
-                                             ((Xrender_Surface *)surface)->height,
-                                             surface,
-                                             0, EVAS_COLORSPACE_ARGB8888);
-   evas_common_draw_context_font_ext_set((RGBA_Draw_Context *)context,
-                                         re->xinf,
-            (void *(*)(void *, RGBA_Font_Glyph *)) re->font_surface_new,
-            (void (*)(void *))           re->font_surface_free,
-            (void  (*) (void *, void *, void *, RGBA_Font_Glyph *, int, int))
-                 re->font_surface_draw);
-   evas_common_font_draw(im, context, font, x, y, text, intl_props);
-   evas_common_draw_context_font_ext_set(context,
-                                         NULL,
-                                         NULL,
-                                         NULL,
-                                         NULL);
-   evas_common_cpu_end_opt();
-
-   evas_cache_image_drop(&im->cache_entry);
-}
-
-static Eina_Bool
-eng_canvas_alpha_get(void *data, void *context __UNUSED__)
-{
-   Render_Engine *re = (Render_Engine *)data;
-   return (re->destination_alpha) || (re->x11.mask);
-}
-
-/* module advertising code */
-static int
-module_open(Evas_Module *em)
-{
-#ifdef BUILD_ENGINE_SOFTWARE_XLIB
-   static Eina_Bool xrm_inited = EINA_FALSE;
-   if (!xrm_inited)
-     {
-       xrm_inited = EINA_TRUE;
-       XrmInitialize();
-     }
-#endif
-
-   if (!em) return 0;
-   /* get whatever engine module we inherit from */
-   if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
-   _evas_xrender_xcb_log_dom = eina_log_domain_register
-     ("evas-xrender_x11", EVAS_DEFAULT_LOG_COLOR);
-   if (_evas_xrender_xcb_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(output_flush);
-   ORD(output_idle_flush);
-   ORD(output_dump);
-   ORD(rectangle_draw);
-   ORD(line_draw);
-   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_native_set);
-   ORD(image_native_get);
-   ORD(image_cache_flush);
-   ORD(image_cache_set);
-   ORD(image_cache_get);
-   ORD(font_draw);
-   
-   ORD(image_scale_hint_set);
-   ORD(image_scale_hint_get);
-
-//   ORD(image_map_draw);
-//   ORD(image_map_surface_new);
-//   ORD(image_map_surface_free);
-   
-   /* now advertise out own api */
-   em->functions = (void *)(&func);
-   return 1;
-}
-
-static void
-module_close(Evas_Module *em __UNUSED__)
-{
-  eina_log_domain_unregister(_evas_xrender_xcb_log_dom);
-#ifdef BUILD_ENGINE_SOFTWARE_XLIB
-  if (xrdb_user.db)
-    {
-       XrmDestroyDatabase(xrdb_user.db);
-       xrdb_user.last_stat = 0;
-       xrdb_user.last_mtime = 0;
-       xrdb_user.db = NULL;
-    }
-#endif
-}
-
-static Evas_Module_Api evas_modapi =
-{
-   EVAS_MODULE_API_VERSION,
-   "xrender_x11",
-   "none",
-   {
-     module_open,
-     module_close
-   }
-};
-
-EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, xrender_x11);
-
-#ifndef EVAS_STATIC_BUILD_XRENDER_X11
-EVAS_EINA_MODULE_DEFINE(engine, xrender_x11);
-#endif
diff --git a/src/modules/engines/xrender_x11/evas_engine.h b/src/modules/engines/xrender_x11/evas_engine.h
deleted file mode 100644 (file)
index f71f384..0000000
+++ /dev/null
@@ -1,264 +0,0 @@
-#ifndef EVAS_ENGINE_H
-#define EVAS_ENGINE_H
-
-#include <sys/ipc.h>
-#include <sys/shm.h>
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-#include <X11/extensions/XShm.h>
-#include <X11/extensions/Xrender.h>
-#include <X11/Xresource.h> // xres - dpi
-
-#ifdef BUILD_ENGINE_XRENDER_XCB
-# include <xcb/xcb.h>
-# include <xcb/render.h>
-# include <xcb/xcb_image.h>
-#endif
-
-extern int _evas_xrender_xcb_log_dom ;
-#ifdef ERR
-# undef ERR
-#endif
-#define ERR(...) EINA_LOG_DOM_ERR(_evas_xrender_xcb_log_dom, __VA_ARGS__)
-
-#ifdef DBG
-# undef DBG
-#endif
-#define DBG(...) EINA_LOG_DOM_DBG(_evas_xrender_xcb_log_dom, __VA_ARGS__)
-
-#ifdef INF
-# undef INF
-#endif
-#define INF(...) EINA_LOG_DOM_INFO(_evas_xrender_xcb_log_dom, __VA_ARGS__)
-
-#ifdef WRN
-# undef WRN
-#endif
-#define WRN(...) EINA_LOG_DOM_WARN(_evas_xrender_xcb_log_dom, __VA_ARGS__)
-
-#ifdef CRIT
-# undef CRIT
-#endif
-#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_xrender_xcb_log_dom, __VA_ARGS__)
-
-typedef struct _Ximage_Info      Ximage_Info;
-typedef struct _Ximage_Image     Ximage_Image;
-typedef struct _Xrender_Surface  Xrender_Surface;
-
-struct _Ximage_Info
-{
-   struct {
-      void        *connection;
-      void        *screen;
-      unsigned int root;
-      unsigned int draw;
-      void        *visual;
-      void        *fmt32;
-      void        *fmt24;
-      void        *fmt8;
-      void        *fmt4;
-      void        *fmt1;
-      void        *fmtdef;
-   } x11;
-   unsigned int                     depth;
-   unsigned int                     pool_mem;
-   Eina_List                       *pool;
-   unsigned char                    can_do_shm;
-   Xrender_Surface                 *mul;
-   unsigned char                    mul_r, mul_g, mul_b, mul_a;
-   int                              references;
-};
-
-struct _Ximage_Image
-{
-   union {
-      struct {
-         XImage                 *xim;
-         XShmSegmentInfo        *shm_info;
-      } xlib;
-#ifdef BUILD_ENGINE_XRENDER_XCB
-      struct {
-         xcb_image_t            *xim;
-         xcb_shm_segment_info_t *shm_info;
-      } xcb;
-#endif
-   } x11;
-   Ximage_Info                  *xinf;
-   int                           width;
-   int                           height;
-   int                           depth;
-   int                           line_bytes;
-   unsigned char                *data;
-   unsigned char                 available : 1;
-};
-
-struct _Xrender_Surface
-{
-   union {
-      struct {
-         XRenderPictFormat         *fmt;
-         Drawable                   draw;
-         Picture                    pic;
-      } xlib;
-#ifdef BUILD_ENGINE_XRENDER_XCB
-      struct {
-         xcb_render_pictforminfo_t *fmt;
-         xcb_drawable_t             draw;
-         xcb_render_picture_t       pic;
-      } xcb;
-#endif
-   } x11;
-   Ximage_Info                     *xinf;
-   int                              width;
-   int                              height;
-   int                              depth;
-   unsigned char                    alpha : 1;
-   unsigned char                    allocated : 1;
-   unsigned char                    bordered : 1;
-};
-
-/* ximage support calls (ximage vs xshmimage, cache etc.) */
-Ximage_Info  *_xr_xlib_image_info_get(Display *disp, Drawable draw, Visual *vis);
-void          _xr_xlib_image_info_free(Ximage_Info *xinf);
-void          _xr_xlib_image_info_pool_flush(Ximage_Info *xinf, unsigned int max_num, unsigned int max_mem);
-Ximage_Image *_xr_xlib_image_new(Ximage_Info *xinf, int w, int h, int depth);
-void          _xr_xlib_image_free(Ximage_Image *xim);
-void          _xr_xlib_image_put(Ximage_Image *xim, Drawable draw, int x, int y, int w, int h);
-
-#ifdef BUILD_ENGINE_XRENDER_XCB
-Ximage_Info  *_xr_xcb_image_info_get(xcb_connection_t *conn, xcb_screen_t *screen, xcb_drawable_t draw, xcb_visualtype_t *visual);
-void          _xr_xcb_image_info_free(Ximage_Info *xinf);
-void          _xr_xcb_image_info_pool_flush(Ximage_Info *xinf, unsigned int max_num, unsigned int max_mem);
-Ximage_Image *_xr_xcb_image_new(Ximage_Info *xinf, int w, int h, int depth);
-void          _xr_xcb_image_free(Ximage_Image *xim);
-void          _xr_xcb_image_put(Ximage_Image *xim, xcb_drawable_t draw, int x, int y, int w, int h);
-#endif
-
-/* xrender support calls */
-Xrender_Surface *_xr_xlib_render_surface_new(Ximage_Info *xinf, int w, int h, XRenderPictFormat *fmt, int alpha);
-Xrender_Surface *_xr_xlib_render_surface_adopt(Ximage_Info *xinf, Drawable draw, int w, int h, int alpha);
-Xrender_Surface *_xr_xlib_render_surface_format_adopt(Ximage_Info *xinf, Drawable draw, int w, int h, XRenderPictFormat *fmt, int alpha);
-void             _xr_xlib_render_surface_free(Xrender_Surface *rs);
-void             _xr_xlib_render_surface_repeat_set(Xrender_Surface *rs, int repeat);
-void             _xr_xlib_render_surface_solid_rectangle_set(Xrender_Surface *rs, int r, int g, int b, int a, int x, int y, int w, int h);
-void             _xr_xlib_render_surface_argb_pixels_fill(Xrender_Surface *rs, int sw, int sh, void *pixels, int x, int y, int w, int h, int ox, int oy);
-void             _xr_xlib_render_surface_rgb_pixels_fill(Xrender_Surface *rs, int sw, int sh, void *pixels, int x, int y, int w, int h, int ox, int oy);
-void             _xr_xlib_render_surface_clips_set(Xrender_Surface *rs, RGBA_Draw_Context *dc, int rx, int ry, int rw, int rh);
-void             _xr_xlib_render_surface_composite(Xrender_Surface *srs, Xrender_Surface *drs, RGBA_Draw_Context *dc, int sx, int sy, int sw, int sh, int x, int y, int w, int h, int smooth);
-void             _xr_xlib_render_surface_copy(Xrender_Surface *srs, Xrender_Surface *drs, int sx, int sy, int x, int y, int w, int h);
-void             _xr_xlib_render_surface_rectangle_draw(Xrender_Surface *rs, RGBA_Draw_Context *dc, int x, int y, int w, int h);
-void             _xr_xlib_render_surface_line_draw(Xrender_Surface *rs, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2);
-void             _xr_xlib_render_surface_polygon_draw(Xrender_Surface *rs, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
-
-#ifdef BUILD_ENGINE_XRENDER_XCB
-Xrender_Surface *_xr_xcb_render_surface_new(Ximage_Info *xinf, int w, int h, xcb_render_pictforminfo_t *fmt, int alpha);
-Xrender_Surface *_xr_xcb_render_surface_adopt(Ximage_Info *xinf, xcb_drawable_t draw, int w, int h, int alpha);
-Xrender_Surface *_xr_xcb_render_surface_format_adopt(Ximage_Info *xinf, xcb_drawable_t draw, int w, int h, xcb_render_pictforminfo_t *fmt, int alpha);
-void             _xr_xcb_render_surface_free(Xrender_Surface *rs);
-void             _xr_xcb_render_surface_repeat_set(Xrender_Surface *rs, int repeat);
-void             _xr_xcb_render_surface_solid_rectangle_set(Xrender_Surface *rs, int r, int g, int b, int a, int x, int y, int w, int h);
-void             _xr_xcb_render_surface_argb_pixels_fill(Xrender_Surface *rs, int sw, int sh, void *pixels, int x, int y, int w, int h, int ox, int oy);
-void             _xr_xcb_render_surface_rgb_pixels_fill(Xrender_Surface *rs, int sw, int sh, void *pixels, int x, int y, int w, int h, int ox, int oy);
-void             _xr_xcb_render_surface_clips_set(Xrender_Surface *rs, RGBA_Draw_Context *dc, int rx, int ry, int rw, int rh);
-void             _xr_xcb_render_surface_composite(Xrender_Surface *srs, Xrender_Surface *drs, RGBA_Draw_Context *dc, int sx, int sy, int sw, int sh, int x, int y, int w, int h, int smooth);
-void             _xr_xcb_render_surface_copy(Xrender_Surface *srs, Xrender_Surface *drs, int sx, int sy, int x, int y, int w, int h);
-void             _xr_xcb_render_surface_rectangle_draw(Xrender_Surface *rs, RGBA_Draw_Context *dc, int x, int y, int w, int h);
-void             _xr_xcb_render_surface_line_draw(Xrender_Surface *rs, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2);
-void             _xr_xcb_render_surface_polygon_draw(Xrender_Surface *rs, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
-#endif
-
-
-typedef struct _XR_Image XR_Image;
-
-struct _XR_Image
-{
-   Ximage_Info     *xinf;
-   const char      *file;
-   const char      *key;
-   char            *fkey;
-   RGBA_Image      *im;
-   void            *data;
-   int              w, h;
-   Xrender_Surface *surface;
-   int              references;
-   char            *format;
-   const char      *comment;
-   Tilebuf         *updates;
-   RGBA_Image_Loadopts load_opts;
-   int              *load_error; /* points to Evas_Object's load_error field */
-   struct {
-      int           space;
-      void         *data;
-      unsigned char no_free : 1;
-   } cs;
-   unsigned char    alpha : 1;
-   unsigned char    dirty : 1;
-   unsigned char    free_data : 1;
-};
-
-XR_Image *_xre_xlib_image_load(Ximage_Info *xinf, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error);
-XR_Image *_xre_xlib_image_new_from_data(Ximage_Info *xinf, int w, int h, void *data, int alpha, int cspace);
-XR_Image *_xre_xlib_image_new_from_copied_data(Ximage_Info *xinf, int w, int h, void *data, int alpha, int cspace);
-XR_Image *_xre_xlib_image_new(Ximage_Info *xinf, int w, int h);
-void      _xre_xlib_image_resize(XR_Image *im, int w, int h);
-void      _xre_xlib_image_free(XR_Image *im);
-void      _xre_xlib_image_region_dirty(XR_Image *im, int x, int y, int w, int h);
-void      _xre_xlib_image_dirty(XR_Image *im);
-XR_Image *_xre_xlib_image_copy(XR_Image *im);
-void     *_xre_xlib_image_data_get(XR_Image *im);
-XR_Image *_xre_xlib_image_data_find(void *data);
-void      _xre_xlib_image_data_put(XR_Image *im, void *data);
-void      _xre_xlib_image_alpha_set(XR_Image *im, int alpha);
-int       _xre_xlib_image_alpha_get(XR_Image *im);
-void      _xre_xlib_image_border_set(XR_Image *im, int l, int r, int t, int b);
-void      _xre_xlib_image_border_get(XR_Image *im, int *l, int *r, int *t, int *b);
-void      _xre_xlib_image_surface_gen(XR_Image *im);
-void      _xre_xlib_image_cache_set(int size);
-int       _xre_xlib_image_cache_get(void);
-
-#ifdef BUILD_ENGINE_XRENDER_XCB
-XR_Image *_xre_xcb_image_load(Ximage_Info *xinf, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error);
-XR_Image *_xre_xcb_image_new_from_data(Ximage_Info *xinf, int w, int h, void *data, int alpha, int cspace);
-XR_Image *_xre_xcb_image_new_from_copied_data(Ximage_Info *xinf, int w, int h, void *data, int alpha, int cspace);
-XR_Image *_xre_xcb_image_new(Ximage_Info *xinf, int w, int h);
-void      _xre_xcb_image_resize(XR_Image *im, int w, int h);
-void      _xre_xcb_image_free(XR_Image *im);
-void      _xre_xcb_image_region_dirty(XR_Image *im, int x, int y, int w, int h);
-void      _xre_xcb_image_dirty(XR_Image *im);
-XR_Image *_xre_xcb_image_copy(XR_Image *im);
-void     *_xre_xcb_image_data_get(XR_Image *im);
-XR_Image *_xre_xcb_image_data_find(void *data);
-void      _xre_xcb_image_data_put(XR_Image *im, void *data);
-void      _xre_xcb_image_alpha_set(XR_Image *im, int alpha);
-int       _xre_xcb_image_alpha_get(XR_Image *im);
-void      _xre_xcb_image_border_set(XR_Image *im, int l, int r, int t, int b);
-void      _xre_xcb_image_border_get(XR_Image *im, int *l, int *r, int *t, int *b);
-void      _xre_xcb_image_surface_gen(XR_Image *im);
-void      _xre_xcb_image_cache_set(int size);
-int       _xre_xcb_image_cache_get(void);
-#endif
-
-typedef struct _XR_Font_Surface XR_Font_Surface;
-
-struct _XR_Font_Surface
-{
-   Ximage_Info     *xinf;
-   RGBA_Font_Glyph *fg;
-   int              w, h;
-   Drawable         draw;
-   Picture          pic;
-};
-
-XR_Font_Surface *_xre_xlib_font_surface_new(Ximage_Info *xinf, RGBA_Font_Glyph *fg);
-void             _xre_xlib_font_surface_free(XR_Font_Surface *fs);
-void             _xre_xlib_font_surface_draw(Ximage_Info *xinf, RGBA_Image *surface, RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg, int x, int y);
-
-#ifdef BUILD_ENGINE_XRENDER_XCB
-XR_Font_Surface *_xre_xcb_font_surface_new(Ximage_Info *xinf, RGBA_Font_Glyph *fg);
-void             _xre_xcb_font_surface_free(XR_Font_Surface *fs);
-void             _xre_xcb_font_surface_draw(Ximage_Info *xinf, RGBA_Image *surface, RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg, int x, int y);
-#endif
-
-#endif
diff --git a/src/modules/engines/xrender_x11/evas_engine_xcb_font.c b/src/modules/engines/xrender_x11/evas_engine_xcb_font.c
deleted file mode 100644 (file)
index ad3a121..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-#include "evas_common.h"
-#include "evas_private.h"
-#include "evas_engine.h"
-#include "Evas_Engine_XRender_X11.h"
-
-static Eina_Hash *_xr_fg_pool = NULL;
-
-XR_Font_Surface *
-_xre_xcb_font_surface_new(Ximage_Info *xinf, RGBA_Font_Glyph *fg)
-{
-   char             buf[256];
-   char             buf2[256];
-   uint32_t         values[3];
-   XR_Font_Surface *fs;
-   DATA8           *data;
-   Ximage_Image    *xim;
-   Eina_Hash       *pool;
-   uint32_t         mask;
-   int              w;
-   int              h;
-   int              pitch;
-
-   data = fg->glyph_out->bitmap.buffer;
-   w = fg->glyph_out->bitmap.width;
-   h = fg->glyph_out->bitmap.rows;
-   pitch = fg->glyph_out->bitmap.pitch;
-   if (pitch < w) pitch = w;
-   if ((w <= 0) || (h <= 0)) return NULL;
-
-   if (fg->ext_dat)
-     {
-       fs = fg->ext_dat;
-       if ((fs->xinf->x11.connection == xinf->x11.connection) &&
-            (fs->xinf->x11.root == xinf->x11.root))
-         return fs;
-       snprintf(buf, sizeof(buf), "@%p@/@%x@", fs->xinf->x11.connection, fs->xinf->x11.root);
-       pool = eina_hash_find(_xr_fg_pool, buf);
-       if (pool)
-         {
-            snprintf(buf, sizeof(buf), "%p", fg);
-            fs = eina_hash_find(pool, buf);
-            if (fs) return fs;
-         }
-     }
-
-   fs = calloc(1, sizeof(XR_Font_Surface));
-   if (!fs) return NULL;
-
-   fs->xinf = xinf;
-   fs->fg = fg;
-   fs->xinf->references++;
-   fs->w = w;
-   fs->h = h;
-
-   snprintf(buf, sizeof(buf), "@%p@/@%x@", fs->xinf->x11.connection, fs->xinf->x11.root);
-   pool = eina_hash_find(_xr_fg_pool, buf);
-   if (!pool) pool = eina_hash_string_superfast_new(NULL);
-   snprintf(buf2, sizeof(buf2), "%p", fg);
-   eina_hash_add(pool, buf2, fs);
-   if (!_xr_fg_pool) _xr_fg_pool = eina_hash_string_superfast_new(NULL);
-   eina_hash_add(_xr_fg_pool, buf, pool);
-
-   fs->draw = xcb_generate_id(xinf->x11.connection);
-   xcb_create_pixmap(xinf->x11.connection, ((xcb_render_pictforminfo_t *)xinf->x11.fmt8)->depth, fs->draw, xinf->x11.root, w, h);
-
-   mask = XCB_RENDER_CP_REPEAT | XCB_RENDER_CP_DITHER | XCB_RENDER_CP_COMPONENT_ALPHA;
-   values[0] = 0;
-   values[1] = 0;
-   values[2] = 0;
-   fs->pic = xcb_generate_id(xinf->x11.connection);
-   xcb_render_create_picture(xinf->x11.connection, fs->pic, fs->draw, ((xcb_render_pictforminfo_t *)xinf->x11.fmt8)->id, mask, values);
-
-   xim = _xr_xcb_image_new(fs->xinf, w, h, ((xcb_render_pictforminfo_t *)xinf->x11.fmt8)->depth);
-   if ((fg->glyph_out->bitmap.num_grays == 256) &&
-       (fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays))
-     {
-       int x, y;
-       DATA8 *p1, *p2;
-
-       for (y = 0; y < h; y++)
-         {
-            p1 = data + (pitch * y);
-            p2 = ((DATA8 *)xim->data) + (xim->line_bytes * y);
-            for (x = 0; x < w; x++)
-              {
-                 *p2 = *p1;
-                 p1++;
-                 p2++;
-              }
-         }
-
-     }
-   else
-     {
-        DATA8      *tmpbuf = NULL, *dp, *tp, bits;
-       int         bi, bj, end;
-       const DATA8 bitrepl[2] = {0x0, 0xff};
-
-       tmpbuf = alloca(w);
-         {
-            int    x, y;
-            DATA8 *p1, *p2;
-
-            for (y = 0; y < h; y++)
-              {
-                 p1 = tmpbuf;
-                 p2 = ((DATA8 *)xim->data) + (xim->line_bytes * y);
-                 tp = tmpbuf;
-                 dp = data + (y * fg->glyph_out->bitmap.pitch);
-                 for (bi = 0; bi < w; bi += 8)
-                   {
-                      bits = *dp;
-                      if ((w - bi) < 8) end = w - bi;
-                      else end = 8;
-                      for (bj = 0; bj < end; bj++)
-                        {
-                           *tp = bitrepl[(bits >> (7 - bj)) & 0x1];
-                           tp++;
-                        }
-                      dp++;
-                   }
-                 for (x = 0; x < w; x++)
-                   {
-                      *p2 = *p1;
-                      p1++;
-                      p2++;
-                   }
-              }
-         }
-     }
-   _xr_xcb_image_put(xim, fs->draw, 0, 0, w, h);
-   return fs;
-}
-
-static Eina_Bool
-_xre_xcb_font_pool_cb(const Eina_Hash *hash, const void *key, void *data, void *fdata)
-{
-   char             buf[256];
-   Eina_Hash       *pool;
-   XR_Font_Surface *fs;
-
-   fs = fdata;
-   pool = data;
-   snprintf(buf, sizeof(buf), "@%p@/@%x@", fs->xinf->x11.connection, fs->xinf->x11.root);
-   eina_hash_del(pool, buf, fs);
-   if (!hash) hash = eina_hash_string_superfast_new(NULL);
-   eina_hash_modify(hash, key, pool);
-   return 1;
-}
-
-void
-_xre_xcb_font_surface_free(XR_Font_Surface *fs)
-{
-   if (!fs) return;
-   eina_hash_foreach(_xr_fg_pool, _xre_xcb_font_pool_cb, fs);
-   xcb_free_pixmap(fs->xinf->x11.connection, fs->draw);
-   xcb_render_free_picture(fs->xinf->x11.connection, fs->pic);
-   _xr_xcb_image_info_free(fs->xinf);
-   free(fs);
-}
-
-void
-_xre_xcb_font_surface_draw(Ximage_Info *xinf __UNUSED__, RGBA_Image *surface, RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg, int x, int y)
-{
-   XR_Font_Surface *fs;
-   Xrender_Surface *target_surface;
-   xcb_rectangle_t  rect;
-   int              r;
-   int              g;
-   int              b;
-   int              a;
-
-   fs = fg->ext_dat;
-   if (!fs || !fs->xinf || !dc || !dc->col.col) return;
-   target_surface = (Xrender_Surface *)(surface->image.data);
-   a = (dc->col.col >> 24) & 0xff;
-   r = (dc->col.col >> 16) & 0xff;
-   g = (dc->col.col >> 8 ) & 0xff;
-   b = (dc->col.col      ) & 0xff;
-   if ((fs->xinf->mul_r != r) || (fs->xinf->mul_g != g) ||
-       (fs->xinf->mul_b != b) || (fs->xinf->mul_a != a))
-     {
-       fs->xinf->mul_r = r;
-       fs->xinf->mul_g = g;
-       fs->xinf->mul_b = b;
-       fs->xinf->mul_a = a;
-       _xr_xcb_render_surface_solid_rectangle_set(fs->xinf->mul, r, g, b, a, 0, 0, 1, 1);
-     }
-   rect.x = x;
-   rect.y = y;
-   rect.width = fs->w;
-   rect.height = fs->h;
-   if (dc->clip.use)
-     {
-       RECTS_CLIP_TO_RECT(rect.x, rect.y, rect.width, rect.height,
-                          dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
-     }
-   xcb_render_set_picture_clip_rectangles(target_surface->xinf->x11.connection,
-                                          target_surface->x11.xcb.pic, 0, 0, 1, &rect);
-   xcb_render_composite(fs->xinf->x11.connection, XCB_RENDER_PICT_OP_OVER,
-                        fs->xinf->mul->x11.xcb.pic,
-                        fs->pic,
-                        target_surface->x11.xcb.pic,
-                        0, 0,
-                        0, 0,
-                        x, y,
-                        fs->w, fs->h);
-}
diff --git a/src/modules/engines/xrender_x11/evas_engine_xcb_image.c b/src/modules/engines/xrender_x11/evas_engine_xcb_image.c
deleted file mode 100644 (file)
index f1be566..0000000
+++ /dev/null
@@ -1,704 +0,0 @@
-#include "evas_common.h"
-#include "evas_private.h"
-#include "evas_engine.h"
-#include "Evas_Engine_XRender_X11.h"
-
-static Eina_Hash *_xr_image_hash        = NULL;
-static int        _xr_image_cache_size  = 0;
-static int        _xr_image_cache_usage = 0;
-static Eina_List *_xr_image_cache       = NULL;
-static Eina_Hash *_xr_image_dirty_hash  = NULL;
-
-static void
-__xre_xcb_image_dirty_hash_add(XR_Image *im)
-{
-   char buf[64];
-
-   if (!im->data) return;
-   snprintf(buf, sizeof(buf), "%p", im->data);
-   if (!_xr_image_dirty_hash) _xr_image_dirty_hash = eina_hash_string_superfast_new(NULL);
-   eina_hash_add(_xr_image_dirty_hash, buf, im);
-}
-
-static void
-__xre_xcb_image_dirty_hash_del(XR_Image *im)
-{
-   char buf[64];
-
-   if (!im->data) return;
-   snprintf(buf, sizeof(buf), "%p", im->data);
-   eina_hash_del(_xr_image_dirty_hash, buf, im);
-}
-
-static XR_Image *
-__xre_xcb_image_dirty_hash_find(void *data)
-{
-   char buf[64];
-
-   snprintf(buf, sizeof(buf), "%p", data);
-   return eina_hash_find(_xr_image_dirty_hash, buf);
-}
-
-static XR_Image *
-__xre_xcb_image_find(char *fkey)
-{
-   XR_Image *im;
-
-   im = eina_hash_find(_xr_image_hash, fkey);
-   if (!im)
-     {
-       Eina_List *l;
-
-       EINA_LIST_FOREACH(_xr_image_cache, l, im)
-         {
-            if (!strcmp(im->fkey, fkey))
-              {
-                 _xr_image_cache = eina_list_remove_list(_xr_image_cache, l);
-                 if (!_xr_image_hash) _xr_image_hash = eina_hash_string_superfast_new(NULL);
-                 eina_hash_add(_xr_image_hash, im->fkey, im);
-                 _xr_image_cache_usage -= (im->w * im->h * 4);
-                 break;
-              }
-            im = NULL;
-         }
-     }
-   if (im) im->references++;
-   return im;
-}
-
-XR_Image *
-_xre_xcb_image_load(Ximage_Info *xinf, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error)
-{
-   char      buf[4096];
-   XR_Image *im;
-
-   if (!file)
-     {
-       *error = EVAS_LOAD_ERROR_GENERIC;
-       return NULL;
-     }
-   if (!lo)
-     {
-       if (key)
-         snprintf(buf, sizeof(buf), "/@%p@%x@/%s//://%s", xinf->x11.connection, xinf->x11.root, file, key);
-       else
-         snprintf(buf, sizeof(buf), "/@%p@%x@/%s", xinf->x11.connection, xinf->x11.root, file);
-     }
-   else
-     {
-       if (key)
-         snprintf(buf, sizeof(buf), "//@/%i/%1.5f/%ix%i//@%p@%x@/%s//://%s", lo->scale_down_by, lo->dpi, lo->w, lo->h, xinf->x11.connection, xinf->x11.root, file, key);
-       else
-         snprintf(buf, sizeof(buf), "//@/%i/%1.5f/%ix%i//@%p@%x@/%s", lo->scale_down_by, lo->dpi, lo->w, lo->h, xinf->x11.connection, xinf->x11.root, file);
-     }
-   im = __xre_xcb_image_find(buf);
-   if (im)
-     {
-       *error = EVAS_LOAD_ERROR_NONE;
-       return im;
-     }
-
-   im = calloc(1, sizeof(XR_Image));
-   if (!im)
-     {
-       *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
-       return NULL;
-     }
-   im->im = evas_common_load_image_from_file(file, key, lo, error);
-   if (!im->im)
-     {
-       free(im);
-       return NULL;
-     }
-   im->xinf = xinf;
-   im->xinf->references++;
-   im->cs.space = EVAS_COLORSPACE_ARGB8888;
-   im->fkey = strdup(buf);
-   im->file = (char *)eina_stringshare_add(file);
-   if (key) im->key = (char *)eina_stringshare_add(key);
-   im->w = im->im->cache_entry.w;
-   im->h = im->im->cache_entry.h;
-   im->references = 1;
-   if (lo) im->load_opts = *lo;
-   im->load_error = error; /* points to object's load_error */
-   if (im->im->info.comment) im->comment = (char *)eina_stringshare_add(im->im->info.comment);
-/*    if (im->im->info.format == 1) im->format = eina_stringshare_add("png"); */
-   if (im->im->cache_entry.flags.alpha) im->alpha = 1;
-   if (!_xr_image_hash) _xr_image_hash = eina_hash_string_superfast_new(NULL);
-   eina_hash_direct_add(_xr_image_hash, im->fkey, im);
-   return im;
-}
-
-XR_Image *
-_xre_xcb_image_new_from_data(Ximage_Info *xinf, int w, int h, void *data, int alpha, int cspace)
-{
-   XR_Image *im;
-
-   im = calloc(1, sizeof(XR_Image));
-   if (!im) return NULL;
-   im->xinf = xinf;
-   im->xinf->references++;
-   im->cs.space = cspace;
-   im->w = w;
-   im->h = h;
-   im->references = 1;
-   switch (im->cs.space)
-     {
-      case EVAS_COLORSPACE_ARGB8888:
-       im->data = data;
-       im->alpha = alpha;
-       break;
-      case EVAS_COLORSPACE_YCBCR422P601_PL:
-      case EVAS_COLORSPACE_YCBCR422P709_PL:
-       im->cs.data = data;
-       im->cs.no_free = 1;
-       break;
-      default:
-       abort();
-       break;
-     }
-   im->dirty = 1;
-   __xre_xcb_image_dirty_hash_add(im);
-   return im;
-}
-
-XR_Image *
-_xre_xcb_image_new_from_copied_data(Ximage_Info *xinf, int w, int h, void *data, int alpha, int cspace)
-{
-   XR_Image *im;
-
-   im = calloc(1, sizeof(XR_Image));
-   if (!im) return NULL;
-   im->cs.space = cspace;
-   switch (im->cs.space)
-     {
-      case EVAS_COLORSPACE_ARGB8888:
-       im->data = malloc(w * h * 4);
-       if (!im->data)
-         {
-            free(im);
-            return NULL;
-         }
-       if (data)
-         {
-            Gfx_Func_Copy func;
-
-            func = evas_common_draw_func_copy_get(w * h, 0);
-            if (func) func(data, im->data, w * h);
-            evas_common_cpu_end_opt();
-         }
-       im->alpha = alpha;
-       im->free_data = 1;
-        break;
-      case EVAS_COLORSPACE_YCBCR422P601_PL:
-      case EVAS_COLORSPACE_YCBCR422P709_PL:
-        im->cs.no_free = 0;
-        im->cs.data = calloc(1, h * sizeof(unsigned char *) * 2);
-       if ((data) && (im->cs.data))
-         memcpy(im->cs.data, data, h * sizeof(unsigned char *) * 2);
-       break;
-      default:
-       abort();
-       break;
-     }
-   im->w = w;
-   im->h = h;
-   im->references = 1;
-   im->xinf = xinf;
-   im->xinf->references++;
-   im->dirty = 1;
-   __xre_xcb_image_dirty_hash_add(im);
-   return im;
-}
-
-XR_Image *
-_xre_xcb_image_new(Ximage_Info *xinf, int w, int h)
-{
-   XR_Image *im;
-
-   im = calloc(1, sizeof(XR_Image));
-   if (!im) return NULL;
-   im->data = malloc(w * h * 4);
-   if (!im->data)
-     {
-       free(im);
-       return NULL;
-     }
-   im->w = w;
-   im->h = h;
-   im->references = 1;
-   im->cs.space = EVAS_COLORSPACE_ARGB8888;
-   im->xinf = xinf;
-   im->xinf->references++;
-   im->free_data = 1;
-   im->alpha = 1;
-   im->dirty = 1;
-   __xre_xcb_image_dirty_hash_add(im);
-   return im;
-}
-
-static void
-__xre_xcb_image_real_free(XR_Image *im)
-{
-   if (im->cs.data)
-     {
-       if (!im->cs.no_free) free(im->cs.data);
-     }
-   if (im->file) eina_stringshare_del(im->file);
-   if (im->key) eina_stringshare_del(im->key);
-   if (im->fkey) free(im->fkey);
-   if (im->im) evas_cache_image_drop(&im->im->cache_entry);
-   if ((im->data) && (im->dirty)) __xre_xcb_image_dirty_hash_del(im);
-   if ((im->free_data) && (im->data)) free(im->data);
-   if (im->surface) _xr_xcb_render_surface_free(im->surface);
-   if (im->format) eina_stringshare_del(im->format);
-   if (im->comment) eina_stringshare_del(im->comment);
-   if (im->updates) evas_common_tilebuf_free(im->updates);
-   _xr_xcb_image_info_free(im->xinf);
-   free(im);
-}
-
-void
-_xre_xcb_image_free(XR_Image *im)
-{
-   im->references--;
-   if (im->references != 0) return;
-   if (!im->dirty)
-     {
-       if (im->fkey)
-         eina_hash_del(_xr_image_hash, im->fkey, im);
-       _xr_image_cache = eina_list_prepend(_xr_image_cache, im);
-       _xr_image_cache_usage += (im->w * im->h * 4);
-       _xre_xcb_image_cache_set(_xr_image_cache_size);
-     }
-   else
-     {
-       __xre_xcb_image_real_free(im);
-     }
-}
-
-void
-_xre_xcb_image_region_dirty(XR_Image *im, int x, int y, int w, int h)
-{
-   if (!im->updates)
-     {
-       im->updates = evas_common_tilebuf_new(im->w, im->h);
-       if (im->updates) evas_common_tilebuf_set_tile_size(im->updates, 8, 8);
-     }
-   if (im->updates)
-     evas_common_tilebuf_add_redraw(im->updates, x, y, w, h);
-}
-
-void
-_xre_xcb_image_dirty(XR_Image *im)
-{
-   if (im->dirty) return;
-   if (im->fkey)
-     eina_hash_del(_xr_image_hash, im->fkey, im);
-   im->dirty = 1;
-   __xre_xcb_image_dirty_hash_add(im);
-}
-
-XR_Image *
-_xre_xcb_image_copy(XR_Image *im)
-{
-   XR_Image *im2;
-   void     *data = NULL;
-
-   if (im->data) data = im->data;
-   else if (im->cs.data) data = im->cs.data;
-   else
-     {
-       if (!im->im)
-          im->im = evas_common_load_image_from_file(im->file, im->key, &(im->load_opts), im->load_error);
-       if (im->im)
-         {
-             evas_cache_image_load_data(&im->im->cache_entry);
-            data = im->im->image.data;
-         }
-     }
-   if (!data) return NULL;
-   im2 = _xre_xcb_image_new_from_copied_data(im->xinf, im->w, im->h, data, im->alpha, im->cs.space);
-   return im2;
-}
-
-void
-_xre_xcb_image_resize(XR_Image *im, int w, int h)
-{
-   if ((w == im->w) && (h == im->h)) return;
-   if (im->surface)
-     {
-       Xrender_Surface *old_surface;
-
-       old_surface = im->surface;
-       im->surface = _xr_xcb_render_surface_new(old_surface->xinf, w + 2, h + 2, old_surface->x11.xcb.fmt, old_surface->alpha);
-       _xr_xcb_render_surface_free(old_surface);
-     }
-   switch (im->cs.space)
-     {
-      case EVAS_COLORSPACE_ARGB8888:
-       if (im->data)
-         {
-            if (im->free_data)
-              {
-                 if (im->data) free(im->data);
-                 im->data = malloc(w * h * 4);
-              }
-         }
-       else if (im->im)
-         {
-            evas_cache_image_drop(&im->im->cache_entry);
-            im->im = NULL;
-            if (im->free_data)
-              {
-                 if (im->data) free(im->data);
-                 im->data = malloc(w * h * 4);
-              }
-         }
-       else
-         {
-            im->data = malloc(w * h * 4);
-            im->free_data = 1;
-         }
-        break;
-      case EVAS_COLORSPACE_YCBCR422P601_PL:
-      case EVAS_COLORSPACE_YCBCR422P709_PL:
-       if (im->data)
-         {
-            if (im->free_data)
-              {
-                 if (im->data) free(im->data);
-              }
-            im->data = NULL;
-         }
-       if (im->im)
-         {
-            evas_cache_image_drop(&im->im->cache_entry);
-            im->im = NULL;
-         }
-       if (!im->cs.no_free)
-         {
-            if (im->cs.data) free(im->cs.data);
-            im->cs.data = calloc(1, h * sizeof(unsigned char *) * 2);
-         }
-       break;
-      default:
-       abort();
-       break;
-     }
-   __xre_xcb_image_dirty_hash_del(im);
-   __xre_xcb_image_dirty_hash_add(im);
-   im->w = w;
-   im->h = h;
-}
-
-void *
-_xre_xcb_image_data_get(XR_Image *im)
-{
-   void *data = NULL;
-
-   if (im->data) data = im->data;
-   else if (im->cs.data) data = im->cs.data;
-   else
-     {
-       if (!im->im) im->im = evas_common_load_image_from_file(im->file, im->key, &(im->load_opts), im->load_error);
-       if (im->im)
-         {
-             evas_cache_image_load_data(&im->im->cache_entry);
-            data = im->im->image.data;
-         }
-     }
-   return data;
-}
-
-XR_Image *
-_xre_xcb_image_data_find(void *data)
-{
-   XR_Image *im;
-
-   im = __xre_xcb_image_dirty_hash_find(data);
-   if (im)
-     {
-       im->references++;
-     }
-   return im;
-}
-
-void
-_xre_xcb_image_data_put(XR_Image *im, void *data)
-{
-   if (!data) return;
-   switch (im->cs.space)
-     {
-      case EVAS_COLORSPACE_ARGB8888:
-       if (im->im)
-         {
-            if (data == im->im->image.data) return;
-            evas_cache_image_drop(&im->im->cache_entry);
-            im->im = NULL;
-         }
-       if (im->cs.data == data) return;
-       if (im->data)
-         {
-            if (im->data == data) return;
-            if (im->free_data) free(im->data);
-            im->free_data = 0;
-         }
-       im->data = data;
-       im->free_data = 0;
-        break;
-      case EVAS_COLORSPACE_YCBCR422P601_PL:
-      case EVAS_COLORSPACE_YCBCR422P709_PL:
-       if (im->data)
-         {
-            if (im->free_data) free(im->data);
-            im->data = NULL;
-         }
-       im->free_data = 0;
-       if (data == im->cs.data) return;
-       if (!im->cs.no_free)
-         {
-            if (im->cs.data) free(im->cs.data);
-         }
-       im->cs.data = data;
-       break;
-      default:
-       abort();
-       break;
-     }
-   __xre_xcb_image_dirty_hash_del(im);
-   __xre_xcb_image_dirty_hash_add(im);
-   if (im->surface)
-     {
-       _xr_xcb_render_surface_free(im->surface);
-       im->surface = NULL;
-     }
-   if (!im->dirty)
-     {
-       if (im->fkey)
-         eina_hash_del(_xr_image_hash, im->fkey, im);
-       im->dirty = 1;
-     }
-   if (im->updates)
-     {
-       evas_common_tilebuf_free(im->updates);
-       im->updates = NULL;
-     }
-}
-
-void
-_xre_xcb_image_alpha_set(XR_Image *im, int alpha)
-{
-   if (im->alpha == alpha) return;
-   switch (im->cs.space)
-     {
-      case EVAS_COLORSPACE_ARGB8888:
-       im->alpha = alpha;
-       if (im->surface)
-         {
-             Xrender_Surface *old_surface;
-
-            old_surface = im->surface;
-            im->surface = NULL;
-            if (im->alpha)
-              im->surface = _xr_xcb_render_surface_new(im->xinf, im->w + 2, im->h + 2, im->xinf->x11.fmt32, 1);
-            else
-              {
-                 /* FIXME: if im->depth == 16, use xinf->fmtdef */
-                 if ((im->xinf->depth == 16) &&
-                     (((xcb_visualtype_t *)im->xinf->x11.visual)->red_mask == 0xf800) &&
-                     (((xcb_visualtype_t *)im->xinf->x11.visual)->green_mask == 0x07e0) &&
-                     (((xcb_visualtype_t *)im->xinf->x11.visual)->blue_mask == 0x001f))
-                   im->surface = _xr_xcb_render_surface_new(im->xinf, im->w + 2, im->h + 2, im->xinf->x11.fmtdef, 0);
-                 else
-                   im->surface = _xr_xcb_render_surface_new(im->xinf, im->w + 2, im->h + 2, im->xinf->x11.fmt24, 0);
-              }
-            if (im->surface)
-              _xr_xcb_render_surface_copy(old_surface, im->surface, 0, 0, 0, 0, im->w + 2, im->h + 2);
-            _xr_xcb_render_surface_free(old_surface);
-         }
-       if (im->updates)
-         {
-            evas_common_tilebuf_free(im->updates);
-            im->updates = NULL;
-         }
-      default:
-       break;
-     }
-}
-
-int
-_xre_xcb_image_alpha_get(XR_Image *im)
-{
-   if (im->im)
-     {
-       if (im->im->cache_entry.space != EVAS_COLORSPACE_ARGB8888) return 0;
-     }
-   return im->alpha;
-}
-
-void
-_xre_xcb_image_border_set(XR_Image *im, int l, int r, int t, int b)
-{
-   if (!im) return;
-   _xre_xcb_image_surface_gen(im);
-   if (l < 1) l = 0;
-   if (r < 1) r = 0;
-   if (t < 1) t = 0;
-   if (b < 1) b = 0;
-   if (im->surface)
-     {
-       if (l | r | t | b)
-         im->surface->bordered = 1;
-       else
-         im->surface->bordered = 0;
-    }
-}
-
-void
-_xre_xcb_image_border_get(XR_Image *im __UNUSED__, int *l __UNUSED__, int *r __UNUSED__, int *t __UNUSED__, int *b __UNUSED__)
-{
-}
-
-void
-_xre_xcb_image_surface_gen(XR_Image *im)
-{
-   void *data = NULL;
-   void *tdata = NULL;
-
-   if ((im->surface) && (!im->updates)) return;
-   if (im->data) data = im->data;
-   else
-     {
-       if (!im->im) im->im = evas_common_load_image_from_file(im->file, im->key, &(im->load_opts), im->load_error);
-       if (im->im)
-         {
-             evas_cache_image_load_data(&im->im->cache_entry);
-            data = im->im->image.data;
-         }
-     }
-   if (!data)
-     {
-       switch (im->cs.space)
-         {
-          case EVAS_COLORSPACE_ARGB8888:
-            return;
-            break;
-          case EVAS_COLORSPACE_YCBCR422P601_PL:
-          case EVAS_COLORSPACE_YCBCR422P709_PL:
-            if ((im->cs.data) && (*((unsigned char **)im->cs.data)))
-              {
-                 tdata = malloc(im->w * im->h * sizeof(DATA32));
-                 if (tdata)
-                   evas_common_convert_yuv_420p_601_rgba(im->cs.data,
-                                                         tdata,
-                                                         im->w, im->h);
-                 data = tdata;
-              }
-            break;
-          default:
-            abort();
-            break;
-         }
-       if (!data) return;
-     }
-   if (im->surface)
-     {
-       if (im->updates)
-         {
-            Tilebuf_Rect *rects, *r;
-
-            rects = evas_common_tilebuf_get_render_rects(im->updates);
-            if (rects)
-              {
-                 EINA_INLIST_FOREACH(rects, r)
-                   {
-                      int rx, ry, rw, rh;
-
-                      rx = r->x; ry = r->y; rw = r->w, rh = r->h;
-                      RECTS_CLIP_TO_RECT(rx, ry, rw, rh, 0, 0, im->w, im->h);
-                      if (im->alpha)
-                        _xr_xcb_render_surface_argb_pixels_fill(im->surface, im->w, im->h, data, rx, ry, rw, rh, 1, 1);
-                      else
-                      /* FIXME: if im->depth == 16 - convert to 16bpp then
-                       * upload */
-                        _xr_xcb_render_surface_rgb_pixels_fill(im->surface, im->w, im->h, data, rx, ry, rw, rh, 1, 1);
-                   }
-                 evas_common_tilebuf_free_render_rects(rects);
-              }
-            evas_common_tilebuf_free(im->updates);
-            im->updates = NULL;
-         }
-       if (tdata) free(tdata);
-       return;
-     }
-   if (im->alpha)
-     {
-       im->surface = _xr_xcb_render_surface_new(im->xinf, im->w + 2, im->h + 2, im->xinf->x11.fmt32, 1);
-       _xr_xcb_render_surface_argb_pixels_fill(im->surface, im->w, im->h, data, 0, 0, im->w, im->h, 1, 1);
-     }
-   else
-     {
-       /* FIXME: if im->xinf->depth == 16, use xinf->fmtdef */
-       if ((im->xinf->depth == 16) &&
-           (((xcb_visualtype_t *)im->xinf->x11.visual)->red_mask == 0xf800) &&
-           (((xcb_visualtype_t *)im->xinf->x11.visual)->green_mask == 0x07e0) &&
-           (((xcb_visualtype_t *)im->xinf->x11.visual)->blue_mask == 0x001f))
-         im->surface = _xr_xcb_render_surface_new(im->xinf, im->w + 2, im->h + 2, im->xinf->x11.fmtdef, 0);
-       else
-         im->surface = _xr_xcb_render_surface_new(im->xinf, im->w + 2, im->h + 2, im->xinf->x11.fmt24, 0);
-       /* FIXME: if im->depth == 16 - convert to 16bpp then
-        * upload */
-       _xr_xcb_render_surface_rgb_pixels_fill(im->surface, im->w, im->h, data, 0, 0, im->w, im->h, 1, 1);
-     }
-   /* fill borders */
-   _xr_xcb_render_surface_copy(im->surface, im->surface,
-                          1, 1,
-                          0, 1,
-                          1, im->h);
-   _xr_xcb_render_surface_copy(im->surface, im->surface,
-                          0, 1,
-                          0, 0,
-                          im->w + 2, 1);
-   _xr_xcb_render_surface_copy(im->surface, im->surface,
-                          im->w, 1,
-                          im->w + 1, 1,
-                          1, im->h);
-   _xr_xcb_render_surface_copy(im->surface, im->surface,
-                          0, im->h,
-                          0, im->h + 1,
-                          im->w + 2, 1);
-   if ((im->im) && (!im->dirty))
-     {
-       evas_cache_image_drop(&im->im->cache_entry);
-       im->im = NULL;
-     }
-   if (tdata) free(tdata);
-}
-
-void
-_xre_xcb_image_cache_set(int size)
-{
-   _xr_image_cache_size = size;
-   while (_xr_image_cache_usage > _xr_image_cache_size)
-     {
-       Eina_List *l;
-
-       l = eina_list_last(_xr_image_cache);
-       if (l)
-         {
-            XR_Image *im;
-
-            im = l->data;
-            _xr_image_cache = eina_list_remove_list(_xr_image_cache, l);
-            _xr_image_cache_usage -= (im->w * im->h * 4);
-            __xre_xcb_image_real_free(im);
-         }
-     }
-}
-
-int
-_xre_xcb_image_cache_get(void)
-{
-   return _xr_image_cache_size;
-}
diff --git a/src/modules/engines/xrender_x11/evas_engine_xcb_render.c b/src/modules/engines/xrender_x11/evas_engine_xcb_render.c
deleted file mode 100644 (file)
index c5a283e..0000000
+++ /dev/null
@@ -1,841 +0,0 @@
-#include "evas_common.h"
-/* #include "evas_macros.h" */
-#include "evas_private.h"
-#include "evas_engine.h"
-#include "Evas_Engine_XRender_X11.h"
-#include <math.h>
-
-/* As opposed to libXRender, we don't have
- * XDoubleToFixed in XCB :/
- */
-#define DOUBLE_TO_FIXED(d) ((xcb_render_fixed_t) ((d) * 65536))
-
-/* this is a work around broken xrender - when/if this ever gets fixed in xorg
- * we can comment this out and one day remove it - for now keep it until such
- * a fix is spotted in the wild
- */
-#define BROKEN_XORG_XRENDER 1
-
-static inline void
-set_filter(Xrender_Surface *s, int smooth)
-{
-   const char *f = smooth ? "best": "nearest";
-
-   xcb_render_set_picture_filter (s->xinf->x11.connection, s->x11.xcb.pic, strlen (f), f, 0, NULL);
-}
-
-xcb_render_pictforminfo_t *
-xcb_render_find_visual_format (xcb_connection_t *c, xcb_visualtype_t *visual)
-{
-  xcb_render_query_pict_formats_cookie_t cookie;
-  xcb_render_query_pict_formats_reply_t *rep;
-  xcb_render_pictscreen_iterator_t       screen_iter;
-  xcb_render_pictformat_t                format = { 0 };
-
-  cookie = xcb_render_query_pict_formats (c);
-  rep = xcb_render_query_pict_formats_reply (c, cookie, NULL);
-  if (!rep)
-    return NULL;
-
-  screen_iter = xcb_render_query_pict_formats_screens_iterator (rep);
-  for (; screen_iter.rem; xcb_render_pictscreen_next (&screen_iter)) {
-    xcb_render_pictdepth_iterator_t depth_iter;
-
-    depth_iter = xcb_render_pictscreen_depths_iterator (screen_iter.data);
-    for (; depth_iter.rem; xcb_render_pictdepth_next (&depth_iter)) {
-      xcb_render_pictvisual_iterator_t visual_iter;
-
-      visual_iter = xcb_render_pictdepth_visuals_iterator (depth_iter.data);
-      for (; visual_iter.rem; xcb_render_pictvisual_next (&visual_iter)) {
-        if (visual->visual_id == visual_iter.data->visual) {
-          format = visual_iter.data->format;
-        }
-      }
-    }
-  }
-
-  if (format != 0)
-    {
-       xcb_render_pictforminfo_iterator_t forminfo_iter;
-
-       forminfo_iter = xcb_render_query_pict_formats_formats_iterator (rep);
-       for (; forminfo_iter.rem; xcb_render_pictforminfo_next (&forminfo_iter)) {
-          if (forminfo_iter.data->id == format) {
-             xcb_render_pictforminfo_t *forminfo;
-
-             forminfo = (xcb_render_pictforminfo_t *)malloc (sizeof (xcb_render_pictforminfo_t));
-             memcpy (forminfo, forminfo_iter.data, sizeof (xcb_render_pictforminfo_t));
-             free (rep);
-
-             return forminfo;
-          }
-       }
-    }
-
-  return NULL;
-}
-
-Xrender_Surface *
-_xr_xcb_render_surface_new(Ximage_Info *xinf, int w, int h, xcb_render_pictforminfo_t *fmt, int alpha)
-{
-   Xrender_Surface *rs;
-   uint32_t            mask;
-   uint32_t            values[3];
-
-   if ((!xinf) || (!fmt) || (w < 1) || (h < 1)) return NULL;
-
-   rs = calloc(1, sizeof(Xrender_Surface));
-   if (!rs) return NULL;
-   rs->xinf = xinf;
-   rs->width = w;
-   rs->height = h;
-   rs->x11.xcb.fmt = (xcb_render_pictforminfo_t *)malloc (sizeof (xcb_render_pictforminfo_t));
-   if (!rs->x11.xcb.fmt)
-     {
-        free(rs);
-        return NULL;
-     }
-   memcpy (rs->x11.xcb.fmt, fmt, sizeof (xcb_render_pictforminfo_t));
-   rs->alpha = alpha;
-   rs->depth = fmt->depth;
-   rs->allocated = 1;
-   rs->x11.xcb.draw = xcb_generate_id(xinf->x11.connection);
-   xcb_create_pixmap(xinf->x11.connection, fmt->depth, rs->x11.xcb.draw, xinf->x11.root, w, h);
-   if (rs->x11.xcb.draw == XCB_NONE)
-     {
-       free(rs->x11.xcb.fmt);
-       free(rs);
-       return NULL;
-     }
-   rs->xinf->references++;
-   mask = XCB_RENDER_CP_REPEAT | XCB_RENDER_CP_DITHER | XCB_RENDER_CP_COMPONENT_ALPHA;
-   values[0] = 0;
-   values[1] = 1;
-   values[2] = 0;
-   rs->x11.xcb.pic = xcb_generate_id(xinf->x11.connection);
-   xcb_render_create_picture(xinf->x11.connection, rs->x11.xcb.pic, rs->x11.xcb.draw, fmt->id, mask, values);
-   if (rs->x11.xcb.pic == XCB_NONE)
-     {
-       xcb_free_pixmap(rs->xinf->x11.connection, rs->x11.xcb.draw);
-       rs->xinf->references--;
-       free(rs->x11.xcb.fmt);
-       free(rs);
-       return NULL;
-     }
-
-   return rs;
-}
-
-Xrender_Surface *
-_xr_xcb_render_surface_adopt(Ximage_Info *xinf, xcb_drawable_t draw, int w, int h, int alpha)
-{
-   Xrender_Surface        *rs;
-   uint32_t                   mask;
-   uint32_t                   values[3];
-
-   if ((!xinf) || (draw == 0) || (w < 1) || (h < 1)) return NULL;
-   rs = calloc(1, sizeof(Xrender_Surface));
-   if (!rs) return NULL;
-   rs->xinf = xinf;
-   rs->width = w;
-   rs->height = h;
-/*    if (fmt->depth == xinf->fmt32->depth) */
-/*      rs->x11.xcb.fmt = xinf->fmt32; */
-/*    else if (fmt->depth == xinf->fmt24->depth) */
-/*      rs->x11.xcb.fmt = xinf->fmt24; */
-/*    else if (fmt->depth == xinf->fmt8->depth) */
-/*      rs->x11.xcb.fmt = xinf->fmt8; */
-/*    else if (fmt->depth == xinf->fmt4->depth) */
-/*      rs->x11.xcb.fmt = xinf->fmt4; */
-/*    else */
-/*      rs->x11.xcb.fmt = xinf->fmt1; */
-/*    free(fmt); */
-
-   rs->x11.xcb.fmt = xcb_render_find_visual_format(xinf->x11.connection, xinf->x11.visual);
-   if (!rs->x11.xcb.fmt)
-     {
-        free(rs);
-        return NULL;
-     }
-   rs->alpha = alpha;
-   rs->depth = rs->x11.xcb.fmt->depth;
-   if (rs->x11.xcb.fmt->depth == 32) rs->alpha = 1;
-   rs->allocated = 0;
-   rs->x11.xcb.draw = draw;
-   rs->xinf->references++;
-   mask = XCB_RENDER_CP_REPEAT | XCB_RENDER_CP_DITHER | XCB_RENDER_CP_COMPONENT_ALPHA;
-   values[0] = 0;
-   values[1] = 1;
-   values[2] = 0;
-   rs->x11.xcb.pic = xcb_generate_id(xinf->x11.connection);
-   xcb_render_create_picture(xinf->x11.connection, rs->x11.xcb.pic, rs->x11.xcb.draw, rs->x11.xcb.fmt->id, mask, values);
-   if (rs->x11.xcb.pic == XCB_NONE)
-     {
-       rs->xinf->references--;
-       free(rs->x11.xcb.fmt);
-       free(rs);
-       return NULL;
-     }
-
-   return rs;
-}
-
-Xrender_Surface *
-_xr_xcb_render_surface_format_adopt(Ximage_Info *xinf, xcb_drawable_t draw, int w, int h, xcb_render_pictforminfo_t *fmt, int alpha)
-{
-   Xrender_Surface *rs;
-   uint32_t            mask;
-   uint32_t            values[3];
-
-   if ((!xinf) || (!fmt) || (draw == XCB_NONE) || (w < 1) || (h < 1)) return NULL;
-   rs = calloc(1, sizeof(Xrender_Surface));
-   if (!rs) return NULL;
-   rs->xinf = xinf;
-   rs->width = w;
-   rs->height = h;
-   rs->x11.xcb.fmt = (xcb_render_pictforminfo_t *)malloc (sizeof (xcb_render_pictforminfo_t));
-   memcpy (rs->x11.xcb.fmt, fmt, sizeof (xcb_render_pictforminfo_t));
-   rs->alpha = alpha;
-   rs->depth = fmt->depth;
-   if (fmt->depth == 32) rs->alpha = 1;
-   rs->xinf->references++;
-   rs->allocated = 0;
-   rs->x11.xcb.draw = draw;
-   mask = XCB_RENDER_CP_REPEAT | XCB_RENDER_CP_DITHER | XCB_RENDER_CP_COMPONENT_ALPHA;
-   values[0] = 0;
-   values[1] = 1;
-   values[2] = 0;
-   rs->x11.xcb.pic = xcb_generate_id(xinf->x11.connection);
-   xcb_render_create_picture(xinf->x11.connection, rs->x11.xcb.pic, rs->x11.xcb.draw, fmt->id, mask, values);
-   if (rs->x11.xcb.pic == XCB_NONE)
-     {
-       rs->xinf->references--;
-       free(rs->x11.xcb.fmt);
-       free(rs);
-       return NULL;
-     }
-
-   return rs;
-}
-
-void
-_xr_xcb_render_surface_free(Xrender_Surface *rs)
-{
-   if (!rs) return;
-   if (rs->xinf)
-     {
-       if ((rs->allocated) && (rs->x11.xcb.draw != XCB_NONE))
-          xcb_free_pixmap(rs->xinf->x11.connection, rs->x11.xcb.draw);
-       if (rs->x11.xcb.pic != XCB_NONE)
-          xcb_render_free_picture(rs->xinf->x11.connection, rs->x11.xcb.pic);
-       _xr_xcb_image_info_free(rs->xinf);
-       rs->xinf = NULL;
-     }
-   free(rs->x11.xcb.fmt);
-   free(rs);
-}
-
-void
-_xr_xcb_render_surface_repeat_set(Xrender_Surface *rs, int repeat)
-{
-   uint32_t mask;
-   uint32_t value[1];
-
-   mask = XCB_RENDER_CP_REPEAT;
-   value[0] = repeat;
-   xcb_render_change_picture(rs->xinf->x11.connection, rs->x11.xcb.pic, mask, value);
-}
-
-void
-_xr_xcb_render_surface_solid_rectangle_set(Xrender_Surface *rs, int r, int g, int b, int a, int x, int y, int w, int h)
-{
-   xcb_render_color_t col;
-   xcb_rectangle_t    rect;
-
-   col.red   = (r << 8) | r;
-   col.green = (g << 8) | g;
-   col.blue  = (b << 8) | b;
-   col.alpha = (a << 8) | a;
-   rect.x = x;
-   rect.y = y;
-   rect.width = w;
-   rect.height = h;
-   xcb_render_fill_rectangles(rs->xinf->x11.connection, XCB_RENDER_PICT_OP_SRC, rs->x11.xcb.pic, col, 1, &rect);
-}
-
-void
-_xr_xcb_render_surface_argb_pixels_fill(Xrender_Surface *rs, int sw, int sh __UNUSED__, void *pixels, int x, int y, int w, int h, int ox, int oy)
-{
-   Ximage_Image  *xim;
-   unsigned int  *p, *sp, *sple, *spe;
-   unsigned int   jump, sjump;
-
-   xim = _xr_xcb_image_new(rs->xinf, w, h, rs->depth);
-   if (!xim) return;
-   p = (unsigned int *)xim->data;
-   sp = ((unsigned int *)pixels) + (y * sw) + x;
-   jump = ((xim->line_bytes / 4) - w);
-   sjump = sw - w;
-   spe = sp + ((h - 1) * sw) + w;
-   if
-#ifdef WORDS_BIGENDIAN
-     (xim->x11.xcb.xim->byte_order == XCB_IMAGE_ORDER_LSB_FIRST)
-#else
-     (xim->x11.xcb.xim->byte_order == XCB_IMAGE_ORDER_MSB_FIRST)
-#endif
-     {
-       while (sp < spe)
-         {
-            sple = sp + w;
-            while (sp < sple)
-              {
-                 *p++ = (*sp << 24) + ((*sp << 8) & 0xff0000) + ((*sp >> 8) & 0xff00) + (*sp >> 24);
-//               *p++ = (B_VAL(sp) << 24) | (G_VAL(sp) << 16) | (R_VAL(sp) << 8) | A_VAL(sp);
-                 sp++;
-              }
-            p += jump;
-            sp += sjump;
-         }
-     }
-   else
-     {
-       while (sp < spe)
-         {
-            sple = sp + w;
-            while (sp < sple)
-               *p++ = *sp++;
-            p += jump;
-            sp += sjump;
-         }
-     }
-   _xr_xcb_image_put(xim, rs->x11.xcb.draw, x + ox, y + oy, w, h);
-}
-
-void
-_xr_xcb_render_surface_rgb_pixels_fill(Xrender_Surface *rs, int sw, int sh __UNUSED__, void *pixels, int x, int y, int w, int h, int ox, int oy)
-{
-   Ximage_Image *xim;
-   unsigned int *p, *sp, *sple, *spe;
-   unsigned int  jump, sjump;
-
-   xim = _xr_xcb_image_new(rs->xinf, w, h, rs->depth);
-   if (!xim) return;
-   p = (unsigned int *)xim->data;
-   sp = ((unsigned int *)pixels) + (y * sw) + x;
-   sjump = sw - w;
-   spe = sp + ((h - 1) * sw) + w;
-   if (rs->depth == 16)
-     {
-       /* FIXME: if rs->depth == 16 - convert */
-       Gfx_Func_Convert conv_func;
-       int swap;
-
-       jump = ((xim->line_bytes / 2) - w);
-
-#ifdef WORDS_BIGENDIAN
-       swap = (int)(xim->x11.xcb.xim->byte_order == XCB_IMAGE_ORDER_LSB_FIRST);
-#else
-       swap = (int)(xim->x11.xcb.xim->byte_order == XCB_IMAGE_ORDER_MSB_FIRST);
-#endif
-       /* FIXME: swap not handled */
-       conv_func = evas_common_convert_func_get((DATA8 *)sp, w, h, rs->depth,
-                                                ((xcb_visualtype_t *)rs->xinf->x11.visual)->red_mask,
-                                                ((xcb_visualtype_t *)rs->xinf->x11.visual)->green_mask,
-                                                ((xcb_visualtype_t *)rs->xinf->x11.visual)->blue_mask,
-                                                PAL_MODE_NONE, 0);
-       if (conv_func)
-         conv_func(sp, (DATA8 *)p, sjump, jump, w, h, x, y, NULL);
-     }
-   else
-     {
-       jump = ((xim->line_bytes / 4) - w);
-       if
-#ifdef WORDS_BIGENDIAN
-         (xim->x11.xcb.xim->byte_order == XCB_IMAGE_ORDER_LSB_FIRST)
-#else
-         (xim->x11.xcb.xim->byte_order == XCB_IMAGE_ORDER_MSB_FIRST)
-#endif
-           {
-              while (sp < spe)
-                {
-                   sple = sp + w;
-                   while (sp < sple)
-                     {
-                        *p++ = (*sp << 24) + ((*sp << 8) & 0xff0000) + ((*sp >> 8) & 0xff00) + 0xff;
-//               *p++ = ((B_VAL(sp)) << 24) | ((G_VAL(sp)) << 16) | ((R_VAL(sp)) << 8) | 0x000000ff;
-                        sp++;
-                     }
-                   p += jump;
-                   sp += sjump;
-                }
-           }
-       else
-         {
-            while (sp < spe)
-              {
-                 sple = sp + w;
-                 while (sp < sple)
-                   *p++ = 0xff000000 | *sp++;
-                 p += jump;
-                 sp += sjump;
-              }
-         }
-     }
-   _xr_xcb_image_put(xim, rs->x11.xcb.draw, x + ox, y + oy, w, h);
-}
-
-void
-_xr_xcb_render_surface_clips_set(Xrender_Surface *rs, RGBA_Draw_Context *dc, int rx, int ry, int rw, int rh)
-{
-   int              num = 0;
-   xcb_rectangle_t *rect = NULL;
-
-   if ((dc) && (dc->clip.use))
-     {
-       RECTS_CLIP_TO_RECT(rx, ry, rw, rh,
-                          dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
-     }
-   if ((!dc) || (!dc->cutout.rects))
-     {
-       rect = malloc(sizeof(xcb_rectangle_t));
-       if (!rect) return;
-       rect->x = rx;
-       rect->y = ry;
-       rect->width = rw;
-       rect->height = rh;
-       num = 1;
-     }
-   else
-     {
-        Cutout_Rects    *rects;
-       Cutout_Rect     *r;
-       int             i;
-
-       rects = evas_common_draw_context_apply_cutouts(dc);
-       num = rects->active;
-       rect = malloc(num * sizeof(xcb_rectangle_t));
-       if (!rect) return;
-       for (i = 0; i < num; i++)
-         {
-            r = rects->rects + i;
-            rect[i].x = r->x;
-            rect[i].y = r->y;
-            rect[i].width = r->w;
-            rect[i].height = r->h;
-         }
-       evas_common_draw_context_apply_clear_cutouts(rects);
-     }
-   if (!rect) return;
-   xcb_render_set_picture_clip_rectangles(rs->xinf->x11.connection, rs->x11.xcb.pic, 0, 0, num, rect);
-   free(rect);
-}
-
-/* initialized the transform to the identity */
-static void
-init_transform (xcb_render_transform_t *t)
-{
-   t->matrix11 = t->matrix22 = t->matrix33 = DOUBLE_TO_FIXED(1);
-
-   t->matrix12 = t->matrix13 = t->matrix21 = t->matrix23 =
-   t->matrix31 = t->matrix32 = 0;
-}
-
-static void
-set_transform_scale(xcb_render_transform_t *t,
-                    int                     sw,
-                    int                     sh,
-                    int                     w,
-                    int                     h,
-                    int                     tx,
-                    int                     ty)
-{
-/*    if ((sw > 1) && (w > 1)) */
-/*      { sw--;  w--; } */
-/*    if ((sh > 1) && (h > 1)) */
-/*      { sh--;  h--; } */
-   t->matrix11 = DOUBLE_TO_FIXED((double)sw / (double)w);
-   t->matrix22 = DOUBLE_TO_FIXED((double)sh / (double)h);
-   t->matrix31 = (tx * sw) / w;
-   t->matrix32 = (ty * sh) / h;
-}
-
-// when color multiplier is used want: instead
-// CA src IN mask SRC temp; non-CA temp OVER dst. - i think. need to check.
-void
-_xr_xcb_render_surface_composite(Xrender_Surface *srs,
-                             Xrender_Surface *drs,
-                             RGBA_Draw_Context  *dc,
-                             int                 sx,
-                             int                 sy,
-                             int                 sw,
-                             int                 sh,
-                             int                 x,
-                             int                 y,
-                             int                 w,
-                             int                 h,
-                             int                 smooth)
-{
-   Xrender_Surface    *trs = NULL;
-   xcb_render_transform_t xf;
-   xcb_render_picture_t   mask = XCB_NONE;
-   uint32_t               value_mask;
-   uint32_t               value_list[1];
-   int                    e, is_scaling;
-   xcb_render_pict_op_t   op;
-
-   if ((sw <= 0) || (sh <= 0) || (w <= 0) || (h <= 0)) return;
-
-   is_scaling = e = (sw != w) || (sh != h);
-
-   value_mask = XCB_RENDER_CP_CLIP_MASK;
-   value_list[0] = 0;
-   xcb_render_change_picture(srs->xinf->x11.connection, srs->x11.xcb.pic, value_mask, value_list);
-   xcb_render_change_picture(drs->xinf->x11.connection, drs->x11.xcb.pic, value_mask, value_list);
-
-   init_transform(&xf);
-
-   op = XCB_RENDER_PICT_OP_OVER;
-   if (dc->render_op == _EVAS_RENDER_BLEND)
-     {
-       if (!srs->alpha) op = XCB_RENDER_PICT_OP_SRC;
-     }
-   else if (dc->render_op == _EVAS_RENDER_BLEND_REL)
-       op = XCB_RENDER_PICT_OP_ATOP;
-   else if (dc->render_op == _EVAS_RENDER_MUL)
-       op = XCB_RENDER_PICT_OP_IN;
-   else if (dc->render_op == _EVAS_RENDER_COPY)
-       op = XCB_RENDER_PICT_OP_SRC;
-   else if (dc->render_op == _EVAS_RENDER_COPY_REL)
-       op = XCB_RENDER_PICT_OP_IN;
-   else if (dc->render_op == _EVAS_RENDER_MASK)
-       op = XCB_RENDER_PICT_OP_IN_REVERSE;
-
-   if ((dc) && (dc->mul.use))
-     {
-       int r, g, b, a;
-
-       if ((op == XCB_RENDER_PICT_OP_OVER) && (!dc->mul.col)) return;
-       a = dc->mul.col >> 24;
-       r = (dc->mul.col >> 16) & 0xff;
-       g = (dc->mul.col >> 8) & 0xff;
-       b = dc->mul.col & 0xff;
-       if (dc->mul.col != 0xffffffff)
-         {
-            if ((srs->xinf->mul_r != r) || (srs->xinf->mul_g != g) ||
-                (srs->xinf->mul_b != b) || (srs->xinf->mul_a != a))
-              {
-                 srs->xinf->mul_r = r;
-                 srs->xinf->mul_g = g;
-                 srs->xinf->mul_b = b;
-                 srs->xinf->mul_a = a;
-                 _xr_xcb_render_surface_solid_rectangle_set(srs->xinf->mul,
-                                                        r,
-                                                        g,
-                                                        b,
-                                                        a,
-                                                        0, 0, 1, 1);
-              }
-            mask = srs->xinf->mul->x11.xcb.pic;
-            if (dc->mul.col == (a * 0x01010101))
-              {
-                 value_mask = XCB_RENDER_CP_COMPONENT_ALPHA;
-                 value_list[0] = 0;
-                 xcb_render_change_picture(srs->xinf->x11.connection, mask, value_mask, value_list);
-              }
-            else
-              {
-                 if ((srs->alpha) || (a != 0xff))
-                   trs = _xr_xcb_render_surface_new(srs->xinf, sw + 2, sh + 2,
-                                                srs->xinf->x11.fmt32, 1);
-                 else
-                   trs = _xr_xcb_render_surface_new(srs->xinf, sw + 2, sh + 2,
-                                                srs->x11.xcb.fmt, srs->alpha);
-                 if (!trs) return;
-
-                 value_mask = XCB_RENDER_CP_COMPONENT_ALPHA;
-                 value_list[0] = 1;
-                 xcb_render_change_picture(srs->xinf->x11.connection, mask, value_mask, value_list);
-                 xcb_render_set_picture_transform(trs->xinf->x11.connection, srs->x11.xcb.pic, xf);
-                 xcb_render_composite(srs->xinf->x11.connection, XCB_RENDER_PICT_OP_SRC, srs->x11.xcb.pic, mask, trs->x11.xcb.pic,
-                                      sx, sy, sx, sy, 0, 0, sw + 2, sh + 2);
-                  mask = XCB_NONE;
-              }
-         }
-     }
-
-//#define HFW + (sw / 2)
-//#define HFH + (sh / 2)
-#define HFW
-#define HFH
-
-   _xr_xcb_render_surface_clips_set(drs, dc, x, y, w, h);
-   if (trs)
-     {
-        set_filter(trs, smooth);
-
-        set_transform_scale(&xf, sw, sh, w, h, -1, -1);
-        xcb_render_set_picture_transform(trs->xinf->x11.connection, trs->x11.xcb.pic, xf);
-
-        value_mask = XCB_RENDER_CP_COMPONENT_ALPHA;
-        value_list[0] = 0;
-       if (dc->render_op == _EVAS_RENDER_MUL)
-           value_list[0] = 1;
-        xcb_render_change_picture(trs->xinf->x11.connection, trs->x11.xcb.pic, value_mask, value_list);
-
-        xcb_render_composite(trs->xinf->x11.connection, op, trs->x11.xcb.pic, mask, drs->x11.xcb.pic,
-                             (w HFW) / sw, (h HFH) / sh,
-                             (w HFW) / sw, (h HFH) / sh,
-                             x, y, w, h);
-        _xr_xcb_render_surface_free(trs);
-     }
-   else
-     {
-        if (srs->bordered && is_scaling)
-         {
-           trs = _xr_xcb_render_surface_new(srs->xinf, sw + 2, sh + 2,
-                                        srs->x11.xcb.fmt, srs->alpha);
-           if (!trs) return;
-
-            value_mask = XCB_RENDER_CP_COMPONENT_ALPHA;
-            value_list[0] = 0;
-            xcb_render_change_picture(srs->xinf->x11.connection, srs->x11.xcb.pic, value_mask, value_list);
-            xcb_render_set_picture_transform(srs->xinf->x11.connection, srs->x11.xcb.pic, xf);
-            xcb_render_composite(srs->xinf->x11.connection, XCB_RENDER_PICT_OP_SRC, srs->x11.xcb.pic, XCB_NONE, trs->x11.xcb.pic,
-                                 sx, sy, sx, sx, 0, 0, sw + 2, sh + 2);
-
-            set_filter(trs, smooth);
-
-           set_transform_scale(&xf, sw, sh, w, h, -1, -1);
-            xcb_render_set_picture_transform(trs->xinf->x11.connection, trs->x11.xcb.pic, xf);
-
-           if (dc->render_op == _EVAS_RENDER_MUL)
-             {
-                 value_mask = XCB_RENDER_CP_COMPONENT_ALPHA;
-                 value_list[0] = 1;
-                 xcb_render_change_picture(trs->xinf->x11.connection, trs->x11.xcb.pic, value_mask, value_list);
-             }
-
-            xcb_render_composite(trs->xinf->x11.connection, op, trs->x11.xcb.pic, mask, drs->x11.xcb.pic,
-                                 (w HFW) / sw, (h HFH) / sh,
-                                 (w HFW) / sw, (h HFH) / sh,
-                                 x, y, w, h);
-           _xr_xcb_render_surface_free(trs);
-         }
-       else
-         {
-            set_filter(srs, smooth);
-
-           set_transform_scale(&xf, sw, sh, w, h, 0, 0);
-            xcb_render_set_picture_transform(srs->xinf->x11.connection, srs->x11.xcb.pic, xf);
-
-            value_mask = XCB_RENDER_CP_COMPONENT_ALPHA;
-            value_list[0] = 0;
-           if (dc->render_op == _EVAS_RENDER_MUL)
-               value_list[0] = 1;
-            xcb_render_change_picture(srs->xinf->x11.connection, srs->x11.xcb.pic, value_mask, value_list);
-
-            xcb_render_composite(srs->xinf->x11.connection, op, srs->x11.xcb.pic, mask, drs->x11.xcb.pic,
-                                 ((((sx + 1) * w) HFW) / sw),
-                                 ((((sy + 1) * h) HFH) / sh),
-                                 ((((sx + 1) * w) HFW) / sw),
-                                 ((((sy + 1) * h) HFH) / sh),
-                                 x, y, w, h);
-         }
-      }
-}
-
-void
-_xr_xcb_render_surface_copy(Xrender_Surface *srs, Xrender_Surface *drs, int sx, int sy, int x, int y, int w, int h)
-{
-   xcb_render_transform_t xf;
-   uint32_t               value_mask;
-   uint32_t               value_list[1];
-
-   if ((w <= 0) || (h <= 0) || (!srs) || (!drs)) return;
-
-   init_transform(&xf);
-#ifdef BROKEN_XORG_XRENDER
-   /* FIXME: why do we need to change the identity matrix if the src surface
-    *        is 1 bit deep?
-    */
-   if (srs->depth == 1)
-     {
-       xf.matrix11 = xf.matrix22 = xf.matrix33 = 1;
-     }
-#endif
-   xcb_render_set_picture_transform(srs->xinf->x11.connection, srs->x11.xcb.pic, xf);
-/*    set_filter(srs, 0); */
-
-   value_mask = XCB_RENDER_CP_CLIP_MASK;
-   value_list[0] = 0;
-   xcb_render_change_picture(srs->xinf->x11.connection, srs->x11.xcb.pic, value_mask, value_list);
-   xcb_render_change_picture(drs->xinf->x11.connection, drs->x11.xcb.pic, value_mask, value_list);
-
-   xcb_render_composite(srs->xinf->x11.connection, XCB_RENDER_PICT_OP_SRC, srs->x11.xcb.pic, XCB_NONE, drs->x11.xcb.pic,
-                        sx, sy, 0, 0, x, y, w, h);
-}
-
-void
-_xr_xcb_render_surface_rectangle_draw(Xrender_Surface *rs, RGBA_Draw_Context *dc, int x, int y, int w, int h)
-{
-   xcb_render_color_t   col;
-   xcb_rectangle_t      rect;
-   uint32_t             value_mask;
-   uint32_t             value_list;
-   int                  r, g, b, a;
-   xcb_render_pict_op_t op;
-
-   if ((!rs) || (!dc)) return;
-   if ((w <= 0) || (h <= 0)) return;
-   a = dc->col.col >> 24;
-   r = (dc->col.col >> 16) & 0xff;
-   g = (dc->col.col >> 8 ) & 0xff;
-   b = (dc->col.col      ) & 0xff;
-   col.red   = (r << 8) | r;
-   col.green = (g << 8) | g;
-   col.blue  = (b << 8) | b;
-   col.alpha = (a << 8) | a;
-
-   op = XCB_RENDER_PICT_OP_SRC;
-   if (dc->render_op == _EVAS_RENDER_BLEND)
-     {
-       if (!dc->col.col) return;
-       if (a == 0xff) op = XCB_RENDER_PICT_OP_SRC;
-     }
-   else if (dc->render_op == _EVAS_RENDER_BLEND_REL)
-     {
-       if (!dc->col.col) return;
-       op = XCB_RENDER_PICT_OP_ATOP;
-     }
-   else if (dc->render_op == _EVAS_RENDER_MUL)
-     {
-       if (dc->col.col == 0xffffffff) return;
-       op = XCB_RENDER_PICT_OP_IN;
-     }
-   else if (dc->render_op == _EVAS_RENDER_COPY)
-       op = XCB_RENDER_PICT_OP_SRC;
-   else if (dc->render_op == _EVAS_RENDER_COPY_REL)
-       op = XCB_RENDER_PICT_OP_IN;
-   else if (dc->render_op == _EVAS_RENDER_MASK)
-       op = XCB_RENDER_PICT_OP_IN_REVERSE;
-
-   value_mask = XCB_RENDER_CP_CLIP_MASK;
-   value_list = 0;
-   xcb_render_change_picture(rs->xinf->x11.connection, rs->x11.xcb.pic, value_mask, &value_list);
-
-   _xr_xcb_render_surface_clips_set(rs, dc, x, y, w, h);
-   rect.x = x;
-   rect.y = y;
-   rect.width = w;
-   rect.height = h;
-   xcb_render_fill_rectangles(rs->xinf->x11.connection, op, rs->x11.xcb.pic, col, 1, &rect);
-}
-
-void
-_xr_xcb_render_surface_line_draw(Xrender_Surface *rs __UNUSED__, RGBA_Draw_Context *dc __UNUSED__, int x1 __UNUSED__, int y1 __UNUSED__, int x2 __UNUSED__, int y2 __UNUSED__)
-{
-/*    uint32_t         value_mask; */
-/*    uint32_t         value_list[1]; */
-/*    int            op; */
-
-/*    if ((!rs) || (!dc)) return; */
-/*    op = XCB_RENDER_PICT_OP_SRC; */
-/*    value_mask = XCB_RENDER_CP_CLIP_MASK; */
-/*    value_list[0] = 0; */
-/*    xcb_render_change_picture(rs->xinf->x11.connection, rs->x11.xcb.pic, value_mask, value_list); */
-/*    _xr_xcb_render_surface_clips_set(rs, dc, 0, 0, rs->width, rs->height); */
-
-/*      { */
-/*     int r, g, b, a; */
-/*     XPointDouble poly[4]; */
-/*     int dx, dy; */
-/*     double len, ddx, ddy; */
-
-/*     dx = x2 - x1; */
-/*     dy = y2 - y1; */
-/*     len = sqrt((double)(dx * dx) + (double)(dy * dy)); */
-/*     ddx = (0.5 * dx) / len; */
-/*     ddy = (0.5 * dy) / len; */
-/*     poly[0].x =  (x1 + ddx); */
-/*     poly[0].y =  (y1 - ddy); */
-/*     poly[1].x =  (x2 + ddx); */
-/*     poly[1].y =  (y2 - ddy); */
-/*     poly[2].x =  (x2 - ddx); */
-/*     poly[2].y =  (y2 + ddy); */
-/*     poly[3].x =  (x1 - ddx); */
-/*     poly[3].y =  (y1 + ddy); */
-
-/*     a = (dc->col.col >> 24) & 0xff; */
-/*     if (a == 0) return; */
-/*     if (a < 0xff) op = XCB_RENDER_PICT_OP_OVER; */
-/*     r = (dc->col.col >> 16) & 0xff; */
-/*     g = (dc->col.col >> 8 ) & 0xff; */
-/*     b = (dc->col.col      ) & 0xff; */
-/*     if ((rs->xinf->mul_r != r) || (rs->xinf->mul_g != g) || */
-/*         (rs->xinf->mul_b != b) || (rs->xinf->mul_a != a)) */
-/*       { */
-/*          rs->xinf->mul_r = r; */
-/*          rs->xinf->mul_g = g; */
-/*          rs->xinf->mul_b = b; */
-/*          rs->xinf->mul_a = a; */
-/*          _xr_xcb_render_surface_solid_rectangle_set(rs->xinf->mul, r, g, b, a, 0, 0, 1, 1); */
-/*       } */
-/*     XRenderCompositeDoublePoly(rs->xinf->x11.connection, op, */
-/*                                rs->xinf->mul->pic, rs->x11.xcb.pic,  */
-/*                                rs->xinf->fmt8, 0, 0, 0, 0, */
-/*                                poly, 4, EvenOddRule); */
-/*      } */
-}
-
-void
-_xr_xcb_render_surface_polygon_draw(Xrender_Surface *rs __UNUSED__, RGBA_Draw_Context *dc __UNUSED__, RGBA_Polygon_Point *points __UNUSED__, int x, int y)
-{
-/*    RGBA_Polygon_Point *pt; */
-/*    int i, num; */
-/*    XPointDouble *pts; */
-/*    int r, g, b, a; */
-/*    uint32_t         value_mask; */
-/*    uint32_t         value_list[1]; */
-/*    int op; */
-
-/*    if ((!rs) || (!dc)) return; */
-/*    num = 0; EINA_INLIST_FOREACH(points, pt) num++; */
-/*    if (num < 3) return; */
-/*    a = (dc->col.col >> 24) & 0xff; */
-/*    if (a == 0) return; */
-/*    op = XCB_RENDER_PICT_OP_OVER; */
-/*    r = (dc->col.col >> 16) & 0xff; */
-/*    g = (dc->col.col >> 8 ) & 0xff; */
-/*    b = (dc->col.col      ) & 0xff; */
-/*    if ((rs->xinf->mul_r != r) || (rs->xinf->mul_g != g) || */
-/*        (rs->xinf->mul_b != b) || (rs->xinf->mul_a != a)) */
-/*      { */
-/*     rs->xinf->mul_r = r; */
-/*     rs->xinf->mul_g = g; */
-/*     rs->xinf->mul_b = b; */
-/*     rs->xinf->mul_a = a; */
-/*     _xr_xcb_render_surface_solid_rectangle_set(rs->xinf->mul, r, g, b, a, 0, 0, 1, 1); */
-/*      } */
-/*    pts = malloc(num * sizeof(XPointDouble)); */
-/*    if (!pts) return; */
-/*    i = 0; */
-/*    EINA_INLIST_FOREACH(points, pt) */
-/*      { */
-/*     if (i < num) */
-/*       { */
-/*          pts[i].x = pt->x; */
-/*          pts[i].y = pt->y; */
-/*          i++; */
-/*       } */
-/*      } */
-/*    value_mask = XCB_RENDER_CP_CLIP_MASK; */
-/*    value_list[0] = 0; */
-/*    xcb_render_change_picture(rs->xinf->x11.connection, rs->x11.xcb.pic, value_mask, value_list); */
-
-/*    _xr_xcb_render_surface_clips_set(rs, dc, 0, 0, rs->width, rs->height); */
-/*    XRenderCompositeDoublePoly(rs->xinf->x11.connection, op, */
-/*                           rs->xinf->mul->pic, rs->x11.xcb.pic,  */
-/*                           rs->xinf->fmt8, 0, 0, 0, 0, */
-/*                           pts, num, Complex); */
-/*    free(pts); */
-}
diff --git a/src/modules/engines/xrender_x11/evas_engine_xcb_ximage.c b/src/modules/engines/xrender_x11/evas_engine_xcb_ximage.c
deleted file mode 100644 (file)
index 4a75ac3..0000000
+++ /dev/null
@@ -1,574 +0,0 @@
-#include "evas_common.h"
-#include "evas_private.h"
-#include "evas_engine.h"
-#include "Evas_Engine_XRender_X11.h"
-
-static Eina_List *_image_info_list = NULL;
-
-static int _xcb_err = 0;
-
-enum
-{
-  xcb_render_pictforminfo_id            = 1 << 0,
-  xcb_render_pictforminfo_type_t        = 1 << 1,
-  xcb_render_pictforminfo_depth_t       = 1 << 2,
-  xcb_render_pictforminfo_red_shift_t   = 1 << 3,
-  xcb_render_pictforminfo_red_mask_t    = 1 << 4,
-  xcb_render_pictforminfo_green_shift_t = 1 << 5,
-  xcb_render_pictforminfo_green_mask_t  = 1 << 6,
-  xcb_render_pictforminfo_blue_shift_t  = 1 << 7,
-  xcb_render_pictforminfo_blue_mask_t   = 1 << 8,
-  xcb_render_pictforminfo_alpha_shift_t = 1 << 9,
-  xcb_render_pictforminfo_alpha_mask_t  = 1 << 10,
-  xcb_render_pictforminfo_colormap_t    = 1 << 11,
-};
-
-enum
-{
-  xcb_render_standard_pictforminfoargb_32_t,
-  xcb_render_standard_pictforminforgb_24_t,
-  xcb_render_standard_pictforminfoa_8_t,
-  xcb_render_standard_pictforminfoa_4_t,
-  xcb_render_standard_pictforminfoa_1_t,
-  xcb_render_standard_pictforminfo_count_t
-};
-
-static xcb_render_pictforminfo_t *
-xcb_render_find_pictforminfo (xcb_connection_t *conn, uint32_t mask, const xcb_render_pictforminfo_t *template, int count)
-{
-  xcb_render_query_pict_formats_cookie_t cookie;
-  xcb_render_query_pict_formats_reply_t *rep;
-  xcb_render_pictforminfo_iterator_t     iter_forminfo;
-
-  cookie = xcb_render_query_pict_formats_unchecked (conn);
-  rep = xcb_render_query_pict_formats_reply (conn, cookie, NULL);
-  iter_forminfo = xcb_render_query_pict_formats_formats_iterator (rep);
-  for (; iter_forminfo.rem; xcb_render_pictforminfo_next (&iter_forminfo)) {
-    if (mask & xcb_render_pictforminfo_id)
-      if (template->id != iter_forminfo.data->id)
-        continue;
-    if (mask & xcb_render_pictforminfo_type_t)
-      if (template->type != iter_forminfo.data->type)
-        continue;
-    if (mask & xcb_render_pictforminfo_depth_t)
-      if (template->depth != iter_forminfo.data->depth)
-        continue;
-    if (mask & xcb_render_pictforminfo_red_shift_t)
-      if (template->direct.red_shift != iter_forminfo.data->direct.red_shift)
-        continue;
-    if (mask & xcb_render_pictforminfo_red_mask_t)
-      if (template->direct.red_mask != iter_forminfo.data->direct.red_mask)
-        continue;
-    if (mask & xcb_render_pictforminfo_green_shift_t)
-      if (template->direct.green_shift != iter_forminfo.data->direct.green_shift)
-        continue;
-    if (mask & xcb_render_pictforminfo_green_mask_t)
-      if (template->direct.green_mask != iter_forminfo.data->direct.green_mask)
-        continue;
-    if (mask & xcb_render_pictforminfo_blue_shift_t)
-      if (template->direct.blue_shift != iter_forminfo.data->direct.blue_shift)
-        continue;
-    if (mask & xcb_render_pictforminfo_blue_mask_t)
-      if (template->direct.blue_mask != iter_forminfo.data->direct.blue_mask)
-        continue;
-    if (mask & xcb_render_pictforminfo_alpha_shift_t)
-      if (template->direct.alpha_shift != iter_forminfo.data->direct.alpha_shift)
-        continue;
-    if (mask & xcb_render_pictforminfo_alpha_mask_t)
-      if (template->direct.alpha_mask != iter_forminfo.data->direct.alpha_mask)
-        continue;
-    if (mask & xcb_render_pictforminfo_colormap_t)
-      if (template->colormap != iter_forminfo.data->colormap)
-        continue;
-    if (count-- == 0) {
-      xcb_render_pictforminfo_t *forminfo;
-
-      forminfo = (xcb_render_pictforminfo_t *)malloc (sizeof (xcb_render_pictforminfo_t));
-      memcpy (forminfo, iter_forminfo.data, sizeof (xcb_render_pictforminfo_t));
-
-      free (rep);
-      return forminfo;
-    }
-  }
-  free (rep);
-  return NULL;
-}
-
-static xcb_render_pictforminfo_t *
-xcb_render_find_standard_pictforminfo (xcb_connection_t *conn, int format)
-{
-  xcb_render_pictforminfo_t *forminfo = NULL;
-  struct {
-    xcb_render_pictforminfo_t template;
-    uint32_t                mask;
-  } standardFormats[xcb_render_standard_pictforminfo_count_t] = {
-    /* StandardPICTFORMINFOARGB32 */
-    {
-      {
-        0,                                /* id */
-        XCB_RENDER_PICT_TYPE_DIRECT,          /* type */
-        32,                               /* depth */
-        { 0, 0 },                         /* pad */
-        {                                 /* direct */
-          16,                             /* direct.red_shift */
-          0xff,                           /* direct.red_mask */
-          8,                              /* direct.green_shift */
-          0xff,                           /* direct.green_mask */
-          0,                              /* direct.blue_shift */
-          0xff,                           /* direct.blue_mask */
-          24,                             /* direct.alpha_shift */
-          0xff                            /* direct.alpha_mask */
-        },
-        0                                 /* colormap */
-      },
-      xcb_render_pictforminfo_type_t        |
-      xcb_render_pictforminfo_depth_t       |
-      xcb_render_pictforminfo_red_shift_t   |
-      xcb_render_pictforminfo_red_mask_t    |
-      xcb_render_pictforminfo_green_shift_t |
-      xcb_render_pictforminfo_green_mask_t  |
-      xcb_render_pictforminfo_blue_shift_t  |
-      xcb_render_pictforminfo_blue_mask_t   |
-      xcb_render_pictforminfo_alpha_shift_t |
-      xcb_render_pictforminfo_alpha_mask_t
-    },
-    /* StandardPICTFORMINFORGB24 */
-    {
-      {
-        0,                                /* id */
-        XCB_RENDER_PICT_TYPE_DIRECT,          /* type */
-        24,                               /* depth */
-        { 0, 0 },                         /* pad */
-        {                                 /* direct */
-          16,                             /* direct.red_shift */
-          0xff,                           /* direct.red_mask */
-          8,                              /* direct.green_shift */
-          0xff,                           /* direct.green_mask */
-          0,                              /* direct.blue_shift */
-          0xff,                           /* direct.blue_mask */
-          0,                              /* direct.alpha_shift */
-          0x00                            /* direct.alpha_mask */
-        },
-        0                                 /* colormap */
-      },
-      xcb_render_pictforminfo_type_t        |
-      xcb_render_pictforminfo_depth_t       |
-      xcb_render_pictforminfo_red_shift_t   |
-      xcb_render_pictforminfo_red_mask_t    |
-      xcb_render_pictforminfo_green_shift_t |
-      xcb_render_pictforminfo_green_mask_t  |
-      xcb_render_pictforminfo_blue_shift_t  |
-      xcb_render_pictforminfo_blue_mask_t   |
-      xcb_render_pictforminfo_alpha_mask_t
-    },
-    /* StandardPICTFORMINFOA8 */
-    {
-      {
-        0,                                /* id */
-        XCB_RENDER_PICT_TYPE_DIRECT,          /* type */
-        8,                                /* depth */
-        { 0, 0 },                         /* pad */
-        {                                 /* direct */
-          0,                              /* direct.red_shift */
-          0x00,                           /* direct.red_mask */
-          0,                              /* direct.green_shift */
-          0x00,                           /* direct.green_mask */
-          0,                              /* direct.blue_shift */
-          0x00,                           /* direct.blue_mask */
-          0,                              /* direct.alpha_shift */
-          0xff                            /* direct.alpha_mask */
-        },
-        0                                 /* colormap */
-      },
-      xcb_render_pictforminfo_type_t        |
-      xcb_render_pictforminfo_depth_t       |
-      xcb_render_pictforminfo_red_mask_t    |
-      xcb_render_pictforminfo_green_mask_t  |
-      xcb_render_pictforminfo_blue_mask_t   |
-      xcb_render_pictforminfo_alpha_shift_t |
-      xcb_render_pictforminfo_alpha_mask_t
-    },
-    /* StandardPICTFORMINFOA4 */
-    {
-      {
-        0,                                /* id */
-        XCB_RENDER_PICT_TYPE_DIRECT,          /* type */
-        4,                                /* depth */
-        { 0, 0 },                         /* pad */
-        {                                 /* direct */
-          0,                              /* direct.red_shift */
-          0x00,                           /* direct.red_mask */
-          0,                              /* direct.green_shift */
-          0x00,                           /* direct.green_mask */
-          0,                              /* direct.blue_shift */
-          0x00,                           /* direct.blue_mask */
-          0,                              /* direct.alpha_shift */
-          0x0f                            /* direct.alpha_mask */
-        },
-        0                                 /* colormap */
-      },
-      xcb_render_pictforminfo_type_t        |
-      xcb_render_pictforminfo_depth_t       |
-      xcb_render_pictforminfo_red_mask_t    |
-      xcb_render_pictforminfo_green_mask_t  |
-      xcb_render_pictforminfo_blue_mask_t   |
-      xcb_render_pictforminfo_alpha_shift_t |
-      xcb_render_pictforminfo_alpha_mask_t
-    },
-    /* StandardPICTFORMINFOA1 */
-    {
-      {
-        0,                                /* id */
-        XCB_RENDER_PICT_TYPE_DIRECT,          /* type */
-        1,                                /* depth */
-        { 0, 0 },                         /* pad */
-        {                                 /* direct */
-          0,                              /* direct.red_shift */
-          0x00,                           /* direct.red_mask */
-          0,                              /* direct.green_shift */
-          0x00,                           /* direct.green_mask */
-          0,                              /* direct.blue_shift */
-          0x00,                           /* direct.blue_mask */
-          0,                              /* direct.alpha_shift */
-          0x01                            /* direct.alpha_mask */
-        },
-        0                                 /* colormap */
-      },
-      xcb_render_pictforminfo_type_t        |
-      xcb_render_pictforminfo_depth_t       |
-      xcb_render_pictforminfo_red_mask_t    |
-      xcb_render_pictforminfo_green_mask_t  |
-      xcb_render_pictforminfo_blue_mask_t   |
-      xcb_render_pictforminfo_alpha_shift_t |
-      xcb_render_pictforminfo_alpha_mask_t
-    },
-  };
-  if ((format >= 0) && (format < xcb_render_standard_pictforminfo_count_t))
-    forminfo = xcb_render_find_pictforminfo (conn,
-                                             standardFormats[format].mask,
-                                             &standardFormats[format].template,
-                                             0);
-  return forminfo;
-}
-
-static void
-_tmp_xcb_err(xcb_connection_t *conn __UNUSED__/* , XErrorEvent *ev */)
-{
-   _xcb_err = 1;
-   return;
-}
-
-Ximage_Info *
-_xr_xcb_image_info_get(xcb_connection_t *conn, xcb_screen_t *screen, xcb_drawable_t draw, xcb_visualtype_t *visual)
-{
-   xcb_get_geometry_cookie_t cookie;
-   xcb_get_geometry_reply_t *rep;
-   Ximage_Info              *xinf;
-   Ximage_Info              *xinf2;
-   Eina_List                *l;
-
-   xinf2 = NULL;
-   EINA_LIST_FOREACH(_image_info_list, l, xinf)
-     {
-       if (xinf->x11.connection == conn)
-         {
-            xinf2 = xinf;
-            break;
-         }
-     }
-   xinf = calloc(1, sizeof(Ximage_Info));
-   if (!xinf) return NULL;
-
-   xinf->references = 1;
-   xinf->x11.connection = conn;
-   xinf->x11.screen = screen;
-   xinf->x11.draw = draw;
-   cookie = xcb_get_geometry_unchecked(xinf->x11.connection, xinf->x11.draw);
-   rep = xcb_get_geometry_reply(xinf->x11.connection, cookie, NULL);
-   xinf->x11.root = rep->root;
-   free(rep);
-   xinf->x11.visual = visual;
-   xinf->x11.fmt32 = xcb_render_find_standard_pictforminfo(xinf->x11.connection, xcb_render_standard_pictforminfoargb_32_t);
-   xinf->x11.fmt24 = xcb_render_find_standard_pictforminfo(xinf->x11.connection, xcb_render_standard_pictforminforgb_24_t);
-   xinf->x11.fmt8 = xcb_render_find_standard_pictforminfo(xinf->x11.connection, xcb_render_standard_pictforminfoa_8_t);
-   xinf->x11.fmt4 = xcb_render_find_standard_pictforminfo(xinf->x11.connection, xcb_render_standard_pictforminfoa_4_t);
-   xinf->x11.fmt1 = xcb_render_find_standard_pictforminfo(xinf->x11.connection, xcb_render_standard_pictforminfoa_1_t);
-
-   xinf->mul = _xr_xcb_render_surface_new(xinf, 1, 1, xinf->x11.fmt32, 1);
-   _xr_xcb_render_surface_repeat_set(xinf->mul, 1);
-   xinf->mul_r = xinf->mul_g = xinf->mul_b = xinf->mul_a = 0xff;
-   _xr_xcb_render_surface_solid_rectangle_set(xinf->mul, xinf->mul_r, xinf->mul_g, xinf->mul_b, xinf->mul_a, 0, 0, 1, 1);
-   if (xinf2)
-     {
-       xinf->can_do_shm = xinf2->can_do_shm;
-       xinf->depth = xinf2->depth;
-     }
-   else
-     {
-        xcb_depth_iterator_t iter_depth;
-        xcb_shm_segment_info_t shm_info;
-        xcb_image_t           *xim;
-
-        iter_depth = xcb_screen_allowed_depths_iterator (xinf->x11.screen);
-        for (; iter_depth.rem ; xcb_depth_next (&iter_depth))
-          {
-             xcb_visualtype_iterator_t iter_visual;
-
-             iter_visual = xcb_depth_visuals_iterator (iter_depth.data);
-             for (; iter_visual.rem ; xcb_visualtype_next (&iter_visual))
-               {
-                  if (iter_visual.data->visual_id == visual->visual_id)
-                    xinf->depth = iter_depth.data->depth;
-               }
-          }
-
-       xinf->can_do_shm = 0;
-
-
-        shm_info.shmseg = xcb_generate_id(xinf->x11.connection);
-        xim = xcb_image_create_native(xinf->x11.connection, 1, 1,
-                                        XCB_IMAGE_FORMAT_Z_PIXMAP,
-                                        xinf->depth, NULL, ~0, NULL);
-        if (xim) {
-           shm_info.shmid = shmget(IPC_PRIVATE, xim->size, IPC_CREAT | 0777);
-           if (shm_info.shmid >= 0) {
-              shm_info.shmaddr = xim->data = shmat(shm_info.shmid, 0, 0);
-              if ((shm_info.shmaddr) && (shm_info.shmaddr != (void *) -1)) {
-                 xcb_get_input_focus_reply_t *reply;
-                 /*
-                  * FIXME: no error mechanism
-                  */
-                 /* XErrorHandler ph; */
-
-                 /* we sync */
-                 reply = xcb_get_input_focus_reply(xinf->x11.connection,
-                                               xcb_get_input_focus_unchecked(xinf->x11.connection),
-                                               NULL);
-                 free(reply);
-                 _xcb_err = 0;
-                 /* ph = XSetErrorHandler((XErrorHandler)_tmp_xcb_err); */
-                 xcb_shm_attach(xinf->x11.connection, shm_info.shmseg, shm_info.shmid, 0);
-                 /* we sync */
-                 reply = xcb_get_input_focus_reply(xinf->x11.connection,
-                                               xcb_get_input_focus_unchecked(xinf->x11.connection),
-                                               NULL);
-                 free(reply);
-                 /* XSetErrorHandler((XErrorHandler)ph); */
-                 if (!_xcb_err) xinf->can_do_shm = 1;
-                 shmdt(shm_info.shmaddr);
-              }
-              shmctl(shm_info.shmid, IPC_RMID, 0);
-           }
-           xcb_image_destroy(xim);
-        }
-     }
-   _image_info_list = eina_list_prepend(_image_info_list, xinf);
-   return xinf;
-}
-
-void
-_xr_xcb_image_info_free(Ximage_Info *xinf)
-{
-  if (!xinf) return;
-   if (xinf->pool)
-     {
-        xcb_get_input_focus_reply_t *reply;
-
-        reply = xcb_get_input_focus_reply(xinf->x11.connection,
-                                          xcb_get_input_focus_unchecked(xinf->x11.connection),
-                                          NULL);
-        free(reply);
-     }
-   _xr_xcb_image_info_pool_flush(xinf, 0, 0);
-   xinf->references--;
-   if (xinf->references != 0) return;
-   _xr_xcb_render_surface_free(xinf->mul);
-   if (xinf->x11.fmt1)
-     free(xinf->x11.fmt1);
-   if (xinf->x11.fmt4)
-     free(xinf->x11.fmt4);
-   if (xinf->x11.fmt8)
-     free(xinf->x11.fmt8);
-   if (xinf->x11.fmt24)
-     free(xinf->x11.fmt24);
-   if (xinf->x11.fmt32)
-     free(xinf->x11.fmt32);
-   free(xinf);
-   _image_info_list = eina_list_remove(_image_info_list, xinf);
-}
-
-void
-_xr_xcb_image_info_pool_flush(Ximage_Info *xinf, unsigned int max_num, unsigned int max_mem)
-{
-   if ((xinf->pool_mem <= max_mem) && (eina_list_count(xinf->pool) <= max_num)) return;
-   while ((xinf->pool_mem > max_mem) || (eina_list_count(xinf->pool) > max_num))
-     {
-       Ximage_Image *xim;
-
-       if (!xinf->pool) break;
-       xim = xinf->pool->data;
-       _xr_xcb_image_free(xim);
-     }
-}
-
-Ximage_Image *
-_xr_xcb_image_new(Ximage_Info *xinf, int w, int h, int depth)
-{
-   Ximage_Image *xim;
-   Ximage_Image *xim2;
-   Eina_List    *l;
-
-   xim2 = NULL;
-   EINA_LIST_FOREACH(xinf->pool, l, xim)
-     {
-       if ((xim->width >= w) && (xim->height >= h) && (xim->depth == depth) && (xim->available))
-         {
-            if (!xim2) xim2 = xim;
-            else if ((xim->width * xim->height) < (xim2->width * xim2->height)) xim2 = xim;
-         }
-     }
-   if (xim2)
-     {
-       xim2->available = 0;
-       return xim2;
-     }
-   xim = calloc(1, sizeof(Ximage_Image));
-   if (xim)
-     {
-       xim->xinf = xinf;
-       xim->width = w;
-       xim->height = h;
-       xim->depth = depth;
-       xim->available = 0;
-       if (xim->xinf->can_do_shm)
-         {
-            xim->x11.xcb.shm_info = calloc(1, sizeof(xcb_shm_segment_info_t));
-            if (xim->x11.xcb.shm_info)
-              {
-                  xim->x11.xcb.shm_info->shmseg = xcb_generate_id(xinf->x11.connection);
-                 xim->x11.xcb.xim = xcb_image_create_native(xim->xinf->x11.connection, xim->width, xim->height, XCB_IMAGE_FORMAT_Z_PIXMAP, xim->depth, NULL, ~0, NULL);
-                 if (xim->x11.xcb.xim)
-                   {
-                      xim->x11.xcb.shm_info->shmid = shmget(IPC_PRIVATE, xim->x11.xcb.xim->size, IPC_CREAT | 0777);
-                      if (xim->x11.xcb.shm_info->shmid >= 0)
-                        {
-                           xim->x11.xcb.shm_info->shmaddr = xim->x11.xcb.xim->data = shmat(xim->x11.xcb.shm_info->shmid, 0, 0);
-                           if ((xim->x11.xcb.shm_info->shmaddr) && (xim->x11.xcb.shm_info->shmaddr != (void *) -1))
-                             {
-                                 xcb_get_input_focus_reply_t *reply;
-                                 /*
-                                  * FIXME: no error mechanism
-                                  */
-                                 /*                             XErrorHandler ph; */
-
-                                 /* we sync */
-                                 reply = xcb_get_input_focus_reply(xim->xinf->x11.connection,
-                                                               xcb_get_input_focus_unchecked(xim->xinf->x11.connection),
-                                                               NULL);
-                                 free(reply);
-                                _xcb_err = 0;
-/*                              ph = XSetErrorHandler((XErrorHandler)_tmp_xcb_err); */
-                                xcb_shm_attach(xim->xinf->x11.connection, xim->x11.xcb.shm_info->shmseg, xim->x11.xcb.shm_info->shmid, 0);
-                                 /* we sync */
-                                 reply = xcb_get_input_focus_reply(xim->xinf->x11.connection,
-                                                               xcb_get_input_focus_unchecked(xim->xinf->x11.connection),
-                                                               NULL);
-                                 free(reply);
-/*                              XSetErrorHandler((XErrorHandler)ph); */
-                                if (!_xcb_err) goto xim_ok;
-                                shmdt(xim->x11.xcb.shm_info->shmaddr);
-                             }
-                           shmctl(xim->x11.xcb.shm_info->shmid, IPC_RMID, 0);
-                        }
-                      xcb_image_destroy(xim->x11.xcb.xim);
-                   }
-                 free(xim->x11.xcb.shm_info);
-                 xim->x11.xcb.shm_info = NULL;
-              }
-         }
-       xim->x11.xcb.xim = xcb_image_create_native(xim->xinf->x11.connection, xim->width, xim->height, XCB_IMAGE_FORMAT_Z_PIXMAP, xim->depth, NULL, ~0, NULL);
-       if (!xim->x11.xcb.xim)
-         {
-            free(xim);
-            return NULL;
-         }
-       xim->x11.xcb.xim->data = malloc(xim->x11.xcb.xim->size);
-       if (!xim->x11.xcb.xim->data)
-         {
-            xcb_image_destroy(xim->x11.xcb.xim);
-            free(xim);
-            return NULL;
-         }
-     }
-
-   xim_ok:
-   _xr_xcb_image_info_pool_flush(xinf, 32, (1600 * 1200 * 32 * 2));
-
-   xim->line_bytes = xim->x11.xcb.xim->stride;
-   xim->data = (void *)(xim->x11.xcb.xim->data);
-   xinf->pool_mem += (xim->width * xim->height * xim->depth);
-   xinf->pool = eina_list_append(xinf->pool, xim);
-   return xim;
-}
-
-void
-_xr_xcb_image_free(Ximage_Image *xim)
-{
-   if (xim->x11.xcb.shm_info)
-     {
-       if (!xim->available)
-          {
-            xcb_get_input_focus_reply_t *reply;
-
-            reply = xcb_get_input_focus_reply(xim->xinf->x11.connection,
-                                              xcb_get_input_focus_unchecked(xim->xinf->x11.connection),
-                                              NULL);
-            free(reply);
-          }
-       xcb_shm_detach(xim->xinf->x11.connection, xim->x11.xcb.shm_info->shmseg);
-       xcb_image_destroy(xim->x11.xcb.xim);
-       shmdt(xim->x11.xcb.shm_info->shmaddr);
-       shmctl(xim->x11.xcb.shm_info->shmid, IPC_RMID, 0);
-       free(xim->x11.xcb.shm_info);
-     }
-   else
-     {
-       free(xim->x11.xcb.xim->data);
-       xim->x11.xcb.xim->data = NULL;
-       xcb_image_destroy(xim->x11.xcb.xim);
-     }
-   xim->xinf->pool_mem -= (xim->width * xim->height * xim->depth);
-   xim->xinf->pool = eina_list_remove(xim->xinf->pool, xim);
-   free(xim);
-}
-
-void
-_xr_xcb_image_put(Ximage_Image *xim, xcb_drawable_t draw, int x, int y, int w, int h)
-{
-   xcb_get_input_focus_reply_t *reply;
-   xcb_gcontext_t               gc;
-
-   gc = xcb_generate_id(xim->xinf->x11.connection);
-   xcb_create_gc(xim->xinf->x11.connection, gc, draw, 0, NULL);
-   if (xim->x11.xcb.shm_info)
-     {
-       xcb_shm_put_image(xim->xinf->x11.connection, draw, gc,
-                       xim->x11.xcb.xim->width, xim->x11.xcb.xim->height,
-                       0, 0,
-                       w, h,
-                       x, y,
-                       xim->x11.xcb.xim->depth, xim->x11.xcb.xim->format,
-                       0,
-                       xim->x11.xcb.shm_info->shmseg,
-                       xim->x11.xcb.xim->data - xim->x11.xcb.shm_info->shmaddr);
-        /* we sync */
-        reply = xcb_get_input_focus_reply(xim->xinf->x11.connection,
-                                      xcb_get_input_focus_unchecked(xim->xinf->x11.connection),
-                                      NULL);
-        free(reply);
-     }
-   else
-     xcb_image_put(xim->xinf->x11.connection, draw, gc, xim->x11.xcb.xim, x, y, 0);
-   xim->available = 1;
-   xcb_free_gc(xim->xinf->x11.connection, gc);
-}
diff --git a/src/modules/engines/xrender_x11/evas_engine_xlib_font.c b/src/modules/engines/xrender_x11/evas_engine_xlib_font.c
deleted file mode 100644 (file)
index a23c9eb..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-#include "evas_common.h"
-#include "evas_private.h"
-#include "evas_engine.h"
-#include "Evas_Engine_XRender_X11.h"
-
-static Eina_Hash *_xr_fg_pool = NULL;
-
-XR_Font_Surface *
-_xre_xlib_font_surface_new(Ximage_Info *xinf, RGBA_Font_Glyph *fg)
-{
-   XR_Font_Surface *fs;
-   DATA8 *data;
-   int w, h, j;
-   XRenderPictureAttributes att;
-   XRenderPictFormat *fmt;
-   Ximage_Image  *xim;
-   Eina_Hash *pool;
-   char buf[256], buf2[256];
-
-   data = fg->glyph_out->bitmap.buffer;
-   w = fg->glyph_out->bitmap.width;
-   h = fg->glyph_out->bitmap.rows;
-   j = fg->glyph_out->bitmap.pitch;
-   if (j < w) j = w;
-   if ((w <= 0) || (h <= 0)) return NULL;
-
-   if (fg->ext_dat)
-     {
-       fs = fg->ext_dat;
-       if ((fs->xinf->x11.connection == xinf->x11.connection) && (fs->xinf->x11.root == xinf->x11.root))
-         return fs;
-       snprintf(buf, sizeof(buf), "@%p@/@%lx@", fs->xinf->x11.connection, (unsigned long int)fs->xinf->x11.root);
-       pool = eina_hash_find(_xr_fg_pool, buf);
-       if (pool)
-         {
-            snprintf(buf, sizeof(buf), "%p", fg);
-            fs = eina_hash_find(pool, buf);
-            if (fs) return fs;
-         }
-     }
-
-   fs = calloc(1, sizeof(XR_Font_Surface));
-   if (!fs) return NULL;
-
-   fs->xinf = xinf;
-   fs->fg = fg;
-   fs->xinf->references++;
-   fs->w = w;
-   fs->h = h;
-
-   snprintf(buf, sizeof(buf), "@%p@/@%lx@", fs->xinf->x11.connection, (unsigned long int)fs->xinf->x11.root);
-   pool = eina_hash_find(_xr_fg_pool, buf);
-   if (!pool) pool = eina_hash_string_superfast_new(NULL);
-   snprintf(buf2, sizeof(buf2), "%p", fg);
-   eina_hash_add(pool, buf2, fs);
-   if (!_xr_fg_pool) _xr_fg_pool = eina_hash_string_superfast_new(NULL);
-   eina_hash_add(_xr_fg_pool, buf, pool);
-
-   /* FIXME: maybe use fmt4? */
-   fmt = xinf->x11.fmt8;
-   fs->draw = XCreatePixmap(xinf->x11.connection, xinf->x11.root, w, h,fmt->depth);
-   att.dither = 0;
-   att.component_alpha = 0;
-   att.repeat = 0;
-   fs->pic = XRenderCreatePicture(xinf->x11.connection, fs->draw,fmt,
-                                 CPRepeat | CPDither | CPComponentAlpha, &att);
-
-   /* FIXME: handle if fmt->depth != 8 */
-   xim = _xr_xlib_image_new(fs->xinf, w, h,fmt->depth);
-   if ((fg->glyph_out->bitmap.num_grays == 256) &&
-       (fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays))
-     {
-       int x, y;
-       DATA8 *p1, *p2;
-
-       for (y = 0; y < h; y++)
-         {
-            p1 = data + (j * y);
-            p2 = ((DATA8 *)xim->data) + (xim->line_bytes * y);
-            for (x = 0; x < w; x++)
-              {
-                 *p2 = *p1;
-                 p1++;
-                 p2++;
-              }
-         }
-
-     }
-   else
-     {
-        DATA8 *tmpbuf = NULL, *dp, *tp, bits;
-       int bi, bj, end;
-       const DATA8 bitrepl[2] = {0x0, 0xff};
-
-       tmpbuf = alloca(w);
-         {
-            int x, y;
-            DATA8 *p1, *p2;
-
-            for (y = 0; y < h; y++)
-              {
-                 p1 = tmpbuf;
-                 p2 = ((DATA8 *)xim->data) + (xim->line_bytes * y);
-                 tp = tmpbuf;
-                 dp = data + (y * fg->glyph_out->bitmap.pitch);
-                 for (bi = 0; bi < w; bi += 8)
-                   {
-                      bits = *dp;
-                      if ((w - bi) < 8) end = w - bi;
-                      else end = 8;
-                      for (bj = 0; bj < end; bj++)
-                        {
-                           *tp = bitrepl[(bits >> (7 - bj)) & 0x1];
-                           tp++;
-                        }
-                      dp++;
-                   }
-                 for (x = 0; x < w; x++)
-                   {
-                      *p2 = *p1;
-                      p1++;
-                      p2++;
-                   }
-              }
-         }
-     }
-   _xr_xlib_image_put(xim, fs->draw, 0, 0, w, h);
-   return fs;
-}
-
-static Eina_Bool
-_xre_xlib_font_pool_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata)
-{
-   char buf[256];
-   Eina_Hash *pool;
-   XR_Font_Surface *fs;
-
-   fs = fdata;
-   pool = data;
-   snprintf(buf, sizeof(buf), "@%p@/@%lx@", fs->xinf->x11.connection, (unsigned long int)fs->xinf->x11.root);
-   eina_hash_del(pool, buf, fs);
-   return 1;
-}
-
-void
-_xre_xlib_font_surface_free(XR_Font_Surface *fs)
-{
-   if (!fs) return;
-   eina_hash_foreach(_xr_fg_pool, _xre_xlib_font_pool_cb, fs);
-   XFreePixmap(fs->xinf->x11.connection, fs->draw);
-   XRenderFreePicture(fs->xinf->x11.connection, fs->pic);
-   _xr_xlib_image_info_free(fs->xinf);
-   free(fs);
-}
-
-void
-_xre_xlib_font_surface_draw(Ximage_Info *xinf __UNUSED__, RGBA_Image *surface, RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg, int x, int y)
-{
-   XR_Font_Surface *fs;
-   Xrender_Surface *target_surface;
-   XRectangle rect;
-   int r, g, b, a;
-
-   fs = fg->ext_dat;
-   if (!fs || !fs->xinf || !dc || !dc->col.col) return;
-   if (!surface || !surface->image.data) return;
-   target_surface = (Xrender_Surface *)(surface->image.data);
-   a = (dc->col.col >> 24) & 0xff;
-   r = (dc->col.col >> 16) & 0xff;
-   g = (dc->col.col >> 8 ) & 0xff;
-   b = (dc->col.col      ) & 0xff;
-   if ((fs->xinf->mul_r != r) || (fs->xinf->mul_g != g) ||
-       (fs->xinf->mul_b != b) || (fs->xinf->mul_a != a))
-     {
-       fs->xinf->mul_r = r;
-       fs->xinf->mul_g = g;
-       fs->xinf->mul_b = b;
-       fs->xinf->mul_a = a;
-       _xr_xlib_render_surface_solid_rectangle_set(fs->xinf->mul, r, g, b, a, 0, 0, 1, 1);
-     }
-   rect.x = x; rect.y = y; rect.width = fs->w; rect.height = fs->h;
-   if (dc->clip.use)
-     {
-       RECTS_CLIP_TO_RECT(rect.x, rect.y, rect.width, rect.height,
-                          dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
-     }
-   XRenderSetPictureClipRectangles(target_surface->xinf->x11.connection,
-                                  target_surface->x11.xlib.pic, 0, 0, &rect, 1);
-   XRenderComposite(fs->xinf->x11.connection, PictOpOver, fs->xinf->mul->x11.xlib.pic,
-                   fs->pic, target_surface->x11.xlib.pic,
-                   0, 0, 0, 0, x, y, fs->w, fs->h);
-}
diff --git a/src/modules/engines/xrender_x11/evas_engine_xlib_image.c b/src/modules/engines/xrender_x11/evas_engine_xlib_image.c
deleted file mode 100644 (file)
index 2e4078e..0000000
+++ /dev/null
@@ -1,705 +0,0 @@
-#include "evas_common.h"
-#include "evas_private.h"
-#include "evas_engine.h"
-#include "Evas_Engine_XRender_X11.h"
-
-static Eina_Hash *_xr_image_hash        = NULL;
-static int        _xr_image_cache_size  = 0;
-static int        _xr_image_cache_usage = 0;
-static Eina_List *_xr_image_cache       = NULL;
-static Eina_Hash *_xr_image_dirty_hash  = NULL;
-
-static void
-__xre_xlib_image_dirty_hash_add(XR_Image *im)
-{
-   char buf[64];
-
-   if (!im->data) return;
-   snprintf(buf, sizeof(buf), "%p", im->data);
-   if (!_xr_image_dirty_hash) _xr_image_dirty_hash = eina_hash_string_superfast_new(NULL);
-   eina_hash_add(_xr_image_dirty_hash, buf, im);
-}
-
-static void
-__xre_xlib_image_dirty_hash_del(XR_Image *im)
-{
-   char buf[64];
-
-   if (!im->data) return;
-   snprintf(buf, sizeof(buf), "%p", im->data);
-   eina_hash_del(_xr_image_dirty_hash, buf, im);
-}
-
-static XR_Image *
-__xre_xlib_image_dirty_hash_find(void *data)
-{
-   char buf[64];
-
-   snprintf(buf, sizeof(buf), "%p", data);
-   return eina_hash_find(_xr_image_dirty_hash, buf);
-}
-
-static XR_Image *
-__xre_xlib_image_find(char *fkey)
-{
-   XR_Image *im;
-
-   im = eina_hash_find(_xr_image_hash, fkey);
-   if (!im)
-     {
-       Eina_List *l;
-
-       for (l = _xr_image_cache; l; l = l->next)
-         {
-            im = l->data;
-            if (!strcmp(im->fkey, fkey))
-              {
-                 _xr_image_cache = eina_list_remove_list(_xr_image_cache, l);
-                 if (!_xr_image_hash) _xr_image_hash = eina_hash_string_superfast_new(NULL);
-                 eina_hash_add(_xr_image_hash, im->fkey, im);
-                 _xr_image_cache_usage -= (im->w * im->h * 4);
-                 break;
-              }
-            im = NULL;
-         }
-     }
-   if (im) im->references++;
-   return im;
-}
-
-XR_Image *
-_xre_xlib_image_load(Ximage_Info *xinf, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error)
-{
-   XR_Image *im;
-   char buf[4096];
-
-   if (!file)
-     {
-       *error = EVAS_LOAD_ERROR_GENERIC;
-       return NULL;
-     }
-   if (!lo)
-     {
-       if (key)
-         snprintf(buf, sizeof(buf), "/@%p@%lx@/%s//://%s", xinf->x11.connection, (unsigned long int)xinf->x11.root, file, key);
-       else
-         snprintf(buf, sizeof(buf), "/@%p@%lx@/%s", xinf->x11.connection, (unsigned long int)xinf->x11.root, file);
-     }
-   else
-     {
-       if (key)
-         snprintf(buf, sizeof(buf), "//@/%i/%1.5f/%ix%i//@%p@%lx@/%s//://%s", lo->scale_down_by, lo->dpi, lo->w, lo->h, xinf->x11.connection, (unsigned long int)xinf->x11.root, file, key);
-       else
-         snprintf(buf, sizeof(buf), "//@/%i/%1.5f/%ix%i//@%p@%lx@/%s", lo->scale_down_by, lo->dpi, lo->w, lo->h, xinf->x11.connection, (unsigned long int)xinf->x11.root, file);
-     }
-   im = __xre_xlib_image_find(buf);
-   if (im)
-     {
-       *error = EVAS_LOAD_ERROR_NONE;
-       return im;
-     }
-
-   im = calloc(1, sizeof(XR_Image));
-   if (!im)
-     {
-       *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
-       return NULL;
-     }
-   im->im = evas_common_load_image_from_file(file, key, lo, error);
-   if (!im->im)
-     {
-       free(im);
-       return NULL;
-     }
-   im->xinf = xinf;
-   im->xinf->references++;
-   im->cs.space = EVAS_COLORSPACE_ARGB8888;
-   im->fkey = strdup(buf);
-   im->file = eina_stringshare_add(file);
-   if (key) im->key = eina_stringshare_add(key);
-   im->w = im->im->cache_entry.w;
-   im->h = im->im->cache_entry.h;
-   im->references = 1;
-   if (lo) im->load_opts = *lo;
-   im->load_error = error; /* points to object's load_error */
-   if (im->im->info.comment) im->comment = eina_stringshare_add(im->im->info.comment);
-//   if (im->im->info.format == 1) im->format = eina_stringshare_add("png");
-   if (im->im->cache_entry.flags.alpha) im->alpha = 1;
-   if (!_xr_image_hash) _xr_image_hash = eina_hash_string_superfast_new(NULL);
-   eina_hash_direct_add(_xr_image_hash, im->fkey, im);
-   return im;
-}
-
-XR_Image *
-_xre_xlib_image_new_from_data(Ximage_Info *xinf, int w, int h, void *data, int alpha, int cspace)
-{
-   XR_Image *im;
-
-   im = calloc(1, sizeof(XR_Image));
-   if (!im) return NULL;
-   im->xinf = xinf;
-   im->xinf->references++;
-   im->cs.space = cspace;
-   im->w = w;
-   im->h = h;
-   im->references = 1;
-   switch (im->cs.space)
-     {
-      case EVAS_COLORSPACE_ARGB8888:
-       im->data = data;
-       im->alpha = alpha;
-       break;
-      case EVAS_COLORSPACE_YCBCR422P601_PL:
-      case EVAS_COLORSPACE_YCBCR422P709_PL:
-       im->cs.data = data;
-       im->cs.no_free = 1;
-       break;
-      default:
-       abort();
-       break;
-     }
-   im->dirty = 1;
-   __xre_xlib_image_dirty_hash_add(im);
-   return im;
-}
-
-XR_Image *
-_xre_xlib_image_new_from_copied_data(Ximage_Info *xinf, int w, int h, void *data, int alpha, int cspace)
-{
-   XR_Image *im;
-
-   im = calloc(1, sizeof(XR_Image));
-   if (!im) return NULL;
-   im->cs.space = cspace;
-   switch (im->cs.space)
-     {
-      case EVAS_COLORSPACE_ARGB8888:
-       im->data = malloc(w * h * 4);
-       if (!im->data)
-         {
-            free(im);
-            return NULL;
-         }
-       if (data)
-         {
-            Gfx_Func_Copy func;
-
-            func = evas_common_draw_func_copy_get(w * h, 0);
-            if (func) func(data, im->data, w * h);
-            evas_common_cpu_end_opt();
-         }
-       im->alpha = alpha;
-       im->free_data = 1;
-        break;
-      case EVAS_COLORSPACE_YCBCR422P601_PL:
-      case EVAS_COLORSPACE_YCBCR422P709_PL:
-        im->cs.no_free = 0;
-        im->cs.data = calloc(1, h * sizeof(unsigned char *) * 2);
-       if ((data) && (im->cs.data))
-         memcpy(im->cs.data, data, h * sizeof(unsigned char *) * 2);
-       break;
-      default:
-       abort();
-       break;
-     }
-   im->w = w;
-   im->h = h;
-   im->references = 1;
-   im->xinf = xinf;
-   im->xinf->references++;
-   im->dirty = 1;
-   __xre_xlib_image_dirty_hash_add(im);
-   return im;
-}
-
-XR_Image *
-_xre_xlib_image_new(Ximage_Info *xinf, int w, int h)
-{
-   XR_Image *im;
-
-   im = calloc(1, sizeof(XR_Image));
-   if (!im) return NULL;
-   im->data = malloc(w * h * 4);
-   if (!im->data)
-     {
-       free(im);
-       return NULL;
-     }
-   im->w = w;
-   im->h = h;
-   im->references = 1;
-   im->cs.space = EVAS_COLORSPACE_ARGB8888;
-   im->xinf = xinf;
-   im->xinf->references++;
-   im->free_data = 1;
-   im->alpha = 1;
-   im->dirty = 1;
-   __xre_xlib_image_dirty_hash_add(im);
-   return im;
-}
-
-static void
-__xre_xlib_image_real_free(XR_Image *im)
-{
-   if (im->cs.data)
-     {
-       if (!im->cs.no_free) free(im->cs.data);
-     }
-   if (im->file) eina_stringshare_del(im->file);
-   if (im->key) eina_stringshare_del(im->key);
-   if (im->fkey) free(im->fkey);
-   if (im->im) evas_cache_image_drop(&im->im->cache_entry);
-   if ((im->data) && (im->dirty)) __xre_xlib_image_dirty_hash_del(im);
-   if ((im->free_data) && (im->data)) free(im->data);
-   if (im->surface) _xr_xlib_render_surface_free(im->surface);
-   if (im->format) eina_stringshare_del(im->format);
-   if (im->comment) eina_stringshare_del(im->comment);
-   if (im->updates) evas_common_tilebuf_free(im->updates);
-   _xr_xlib_image_info_free(im->xinf);
-   free(im);
-}
-
-void
-_xre_xlib_image_free(XR_Image *im)
-{
-   im->references--;
-   if (im->references != 0) return;
-   if (!im->dirty)
-     {
-       if (im->fkey)
-         eina_hash_del(_xr_image_hash, im->fkey, im);
-       _xr_image_cache = eina_list_prepend(_xr_image_cache, im);
-       _xr_image_cache_usage += (im->w * im->h * 4);
-       _xre_xlib_image_cache_set(_xr_image_cache_size);
-     }
-   else
-     {
-       __xre_xlib_image_real_free(im);
-     }
-}
-
-void
-_xre_xlib_image_region_dirty(XR_Image *im, int x, int y, int w, int h)
-{
-   if (!im->updates)
-     {
-       im->updates = evas_common_tilebuf_new(im->w, im->h);
-       if (im->updates) evas_common_tilebuf_set_tile_size(im->updates, 8, 8);
-     }
-   if (im->updates)
-     evas_common_tilebuf_add_redraw(im->updates, x, y, w, h);
-}
-
-void
-_xre_xlib_image_dirty(XR_Image *im)
-{
-   if (im->dirty) return;
-   if (im->fkey)
-     eina_hash_del(_xr_image_hash, im->fkey, im);
-   im->dirty = 1;
-   __xre_xlib_image_dirty_hash_add(im);
-}
-
-XR_Image *
-_xre_xlib_image_copy(XR_Image *im)
-{
-   XR_Image *im2;
-   void *data = NULL;
-
-   if (im->data) data = im->data;
-   else if (im->cs.data) data = im->cs.data;
-   else
-     {
-       if (!im->im)
-         im->im = evas_common_load_image_from_file(im->file, im->key, &(im->load_opts), im->load_error);
-       if (im->im)
-         {
-            evas_cache_image_load_data(&im->im->cache_entry);
-            data = im->im->image.data;
-         }
-     }
-   if (!data) return NULL;
-   im2 = _xre_xlib_image_new_from_copied_data(im->xinf, im->w, im->h, data, im->alpha, im->cs.space);
-   return im2;
-}
-
-void
-_xre_xlib_image_resize(XR_Image *im, int w, int h)
-{
-   if ((w == im->w) && (h == im->h)) return;
-   if (im->surface)
-     {
-       Xrender_Surface *old_surface;
-       old_surface = im->surface;
-       im->surface = _xr_xlib_render_surface_new(old_surface->xinf, w + 2, h + 2, old_surface->x11.xlib.fmt, old_surface->alpha);
-       _xr_xlib_render_surface_free(old_surface);
-     }
-   switch (im->cs.space)
-     {
-      case EVAS_COLORSPACE_ARGB8888:
-       if (im->data)
-         {
-            if (im->free_data)
-              {
-                 if (im->data) free(im->data);
-                 im->data = malloc(w * h * 4);
-              }
-         }
-       else if (im->im)
-         {
-            evas_cache_image_drop(&im->im->cache_entry);
-            im->im = NULL;
-            if (im->free_data)
-              {
-                 if (im->data) free(im->data);
-                 im->data = malloc(w * h * 4);
-              }
-         }
-       else
-         {
-            im->data = malloc(w * h * 4);
-            im->free_data = 1;
-         }
-        break;
-      case EVAS_COLORSPACE_YCBCR422P601_PL:
-      case EVAS_COLORSPACE_YCBCR422P709_PL:
-       if (im->data)
-         {
-            if (im->free_data)
-              {
-                 if (im->data) free(im->data);
-              }
-            im->data = NULL;
-         }
-       if (im->im)
-         {
-            evas_cache_image_drop(&im->im->cache_entry);
-            im->im = NULL;
-         }
-       if (!im->cs.no_free)
-         {
-            if (im->cs.data) free(im->cs.data);
-            im->cs.data = calloc(1, h * sizeof(unsigned char *) * 2);
-         }
-       break;
-      default:
-       abort();
-       break;
-     }
-   __xre_xlib_image_dirty_hash_del(im);
-   __xre_xlib_image_dirty_hash_add(im);
-   im->w = w;
-   im->h = h;
-}
-
-void *
-_xre_xlib_image_data_get(XR_Image *im)
-{
-   void *data = NULL;
-
-   if (im->data) data = im->data;
-   else if (im->cs.data) data = im->cs.data;
-   else
-     {
-       if (!im->im)
-         im->im = evas_common_load_image_from_file(im->file, im->key, &(im->load_opts), im->load_error);
-       if (im->im)
-         {
-            evas_cache_image_load_data(&im->im->cache_entry);
-            data = im->im->image.data;
-         }
-     }
-   return data;
-}
-
-XR_Image *
-_xre_xlib_image_data_find(void *data)
-{
-   XR_Image *im;
-
-   im = __xre_xlib_image_dirty_hash_find(data);
-   if (im)
-     {
-       im->references++;
-     }
-   return im;
-}
-
-void
-_xre_xlib_image_data_put(XR_Image *im, void *data)
-{
-   if (!data) return;
-   switch (im->cs.space)
-     {
-      case EVAS_COLORSPACE_ARGB8888:
-       if (im->im)
-         {
-            if (data == im->im->image.data) return;
-            evas_cache_image_drop(&im->im->cache_entry);
-            im->im = NULL;
-         }
-       if (im->cs.data == data) return;
-       if (im->data)
-         {
-            if (im->data == data) return;
-            if (im->free_data) free(im->data);
-            im->free_data = 0;
-         }
-       im->data = data;
-       im->free_data = 0;
-        break;
-      case EVAS_COLORSPACE_YCBCR422P601_PL:
-      case EVAS_COLORSPACE_YCBCR422P709_PL:
-       if (im->data)
-         {
-            if (im->free_data) free(im->data);
-            im->data = NULL;
-         }
-       im->free_data = 0;
-       if (data == im->cs.data) return;
-       if (!im->cs.no_free)
-         {
-            if (im->cs.data) free(im->cs.data);
-         }
-       im->cs.data = data;
-       break;
-      default:
-       abort();
-       break;
-     }
-   __xre_xlib_image_dirty_hash_del(im);
-   __xre_xlib_image_dirty_hash_add(im);
-   if (im->surface)
-     {
-       _xr_xlib_render_surface_free(im->surface);
-       im->surface = NULL;
-     }
-   if (!im->dirty)
-     {
-       if (im->fkey)
-         eina_hash_del(_xr_image_hash, im->fkey, im);
-       im->dirty = 1;
-     }
-   if (im->updates)
-     {
-       evas_common_tilebuf_free(im->updates);
-       im->updates = NULL;
-     }
-}
-
-void
-_xre_xlib_image_alpha_set(XR_Image *im, int alpha)
-{
-   if (im->alpha == alpha) return;
-   switch (im->cs.space)
-     {
-      case EVAS_COLORSPACE_ARGB8888:
-       im->alpha = alpha;
-       if (im->surface)
-         {
-            Xrender_Surface *old_surface;
-
-            old_surface = im->surface;
-            im->surface = NULL;
-            if (im->alpha)
-              im->surface = _xr_xlib_render_surface_new(im->xinf, im->w + 2, im->h + 2, im->xinf->x11.fmt32, 1);
-            else
-              {
-                 /* FIXME: if im->depth == 16, use xinf->x11.fmtdef */
-                 if ((im->xinf->depth == 16) &&
-                     (((Visual *)im->xinf->x11.visual)->red_mask == 0xf800) &&
-                     (((Visual *)im->xinf->x11.visual)->green_mask == 0x07e0) &&
-                     (((Visual *)im->xinf->x11.visual)->blue_mask == 0x001f))
-                   im->surface = _xr_xlib_render_surface_new(im->xinf, im->w + 2, im->h + 2, im->xinf->x11.fmtdef, 0);
-                 else
-                   im->surface = _xr_xlib_render_surface_new(im->xinf, im->w + 2, im->h + 2, im->xinf->x11.fmt24, 0);
-              }
-            if (im->surface)
-              _xr_xlib_render_surface_copy(old_surface, im->surface, 0, 0, 0, 0, im->w + 2, im->h + 2);
-            _xr_xlib_render_surface_free(old_surface);
-         }
-       if (im->updates)
-         {
-            evas_common_tilebuf_free(im->updates);
-            im->updates = NULL;
-         }
-      default:
-       break;
-     }
-}
-
-int
-_xre_xlib_image_alpha_get(XR_Image *im)
-{
-   if (im->im)
-     {
-       if (im->im->cache_entry.space != EVAS_COLORSPACE_ARGB8888) return 0;
-     }
-   return im->alpha;
-}
-
-void
-_xre_xlib_image_border_set(XR_Image *im, int l, int r, int t, int b)
-{
-   if (!im) return;
-   _xre_xlib_image_surface_gen(im);
-   if (l < 1) l = 0;
-   if (r < 1) r = 0;
-   if (t < 1) t = 0;
-   if (b < 1) b = 0;
-   if (im->surface)
-     {
-       if (l | r | t | b)
-         im->surface->bordered = 1;
-       else
-         im->surface->bordered = 0;
-    }
-}
-
-void
-_xre_xlib_image_border_get(XR_Image *im __UNUSED__, int *l __UNUSED__, int *r __UNUSED__, int *t __UNUSED__, int *b __UNUSED__)
-{
-}
-
-void
-_xre_xlib_image_surface_gen(XR_Image *im)
-{
-   void *data = NULL, *tdata = NULL;
-
-   if ((im->surface) && (!im->updates)) return;
-   if (im->data) data = im->data;
-   else
-     {
-       if (!im->im)
-         im->im = evas_common_load_image_from_file(im->file, im->key, &(im->load_opts), im->load_error);
-       if (im->im)
-         {
-             evas_cache_image_load_data(&im->im->cache_entry);
-            data = im->im->image.data;
-         }
-     }
-   if (!data)
-     {
-       switch (im->cs.space)
-         {
-          case EVAS_COLORSPACE_ARGB8888:
-            return;
-            break;
-          case EVAS_COLORSPACE_YCBCR422P601_PL:
-          case EVAS_COLORSPACE_YCBCR422P709_PL:
-            if ((im->cs.data) && (*((unsigned char **)im->cs.data)))
-              {
-                 tdata = malloc(im->w * im->h * sizeof(DATA32));
-                 if (tdata)
-                   evas_common_convert_yuv_420p_601_rgba(im->cs.data,
-                                                         tdata,
-                                                         im->w, im->h);
-                 data = tdata;
-              }
-            break;
-          default:
-            abort();
-            break;
-         }
-       if (!data) return;
-     }
-   if (im->surface)
-     {
-       if (im->updates)
-         {
-            Tilebuf_Rect *rects, *r;
-
-            rects = evas_common_tilebuf_get_render_rects(im->updates);
-            if (rects)
-              {
-                 EINA_INLIST_FOREACH(rects, r)
-                   {
-                      int rx, ry, rw, rh;
-
-                      rx = r->x; ry = r->y; rw = r->w, rh = r->h;
-                      RECTS_CLIP_TO_RECT(rx, ry, rw, rh, 0, 0, im->w, im->h);
-                      if (im->alpha)
-                        _xr_xlib_render_surface_argb_pixels_fill(im->surface, im->w, im->h, data, rx, ry, rw, rh, 1, 1);
-                      else
-                      /* FIXME: if im->depth == 16 - convert to 16bpp then
-                       * upload */
-                        _xr_xlib_render_surface_rgb_pixels_fill(im->surface, im->w, im->h, data, rx, ry, rw, rh, 1, 1);
-                   }
-                 evas_common_tilebuf_free_render_rects(rects);
-              }
-            evas_common_tilebuf_free(im->updates);
-            im->updates = NULL;
-         }
-       if (tdata) free(tdata);
-       return;
-     }
-   if (im->alpha)
-     {
-       im->surface = _xr_xlib_render_surface_new(im->xinf, im->w + 2, im->h + 2, im->xinf->x11.fmt32, 1);
-       _xr_xlib_render_surface_argb_pixels_fill(im->surface, im->w, im->h, data, 0, 0, im->w, im->h, 1, 1);
-     }
-   else
-     {
-       /* FIXME: if im->xinf->depth == 16, use xinf->x11.fmtdef */
-       if ((im->xinf->depth == 16) &&
-           (((Visual *)im->xinf->x11.visual)->red_mask == 0xf800) &&
-           (((Visual *)im->xinf->x11.visual)->green_mask == 0x07e0) &&
-           (((Visual *)im->xinf->x11.visual)->blue_mask == 0x001f))
-         im->surface = _xr_xlib_render_surface_new(im->xinf, im->w + 2, im->h + 2, im->xinf->x11.fmtdef, 0);
-       else
-         im->surface = _xr_xlib_render_surface_new(im->xinf, im->w + 2, im->h + 2, im->xinf->x11.fmt24, 0);
-       /* FIXME: if im->depth == 16 - convert to 16bpp then
-        * upload */
-       _xr_xlib_render_surface_rgb_pixels_fill(im->surface, im->w, im->h, data, 0, 0, im->w, im->h, 1, 1);
-     }
-   /* fill borders */
-   _xr_xlib_render_surface_copy(im->surface, im->surface,
-                          1, 1,
-                          0, 1,
-                          1, im->h);
-   _xr_xlib_render_surface_copy(im->surface, im->surface,
-                          0, 1,
-                          0, 0,
-                          im->w + 2, 1);
-   _xr_xlib_render_surface_copy(im->surface, im->surface,
-                          im->w, 1,
-                          im->w + 1, 1,
-                          1, im->h);
-   _xr_xlib_render_surface_copy(im->surface, im->surface,
-                          0, im->h,
-                          0, im->h + 1,
-                          im->w + 2, 1);
-   if ((im->im) && (!im->dirty))
-     {
-       evas_cache_image_drop(&im->im->cache_entry);
-       im->im = NULL;
-     }
-   if (tdata) free(tdata);
-}
-
-void
-_xre_xlib_image_cache_set(int size)
-{
-   _xr_image_cache_size = size;
-   while (_xr_image_cache_usage > _xr_image_cache_size)
-     {
-       Eina_List *l;
-
-       l = eina_list_last(_xr_image_cache);
-       if (l)
-         {
-            XR_Image *im;
-
-            im = l->data;
-            _xr_image_cache = eina_list_remove_list(_xr_image_cache, l);
-            _xr_image_cache_usage -= (im->w * im->h * 4);
-            __xre_xlib_image_real_free(im);
-         }
-     }
-}
-
-int
-_xre_xlib_image_cache_get(void)
-{
-   return _xr_image_cache_size;
-}
diff --git a/src/modules/engines/xrender_x11/evas_engine_xlib_render.c b/src/modules/engines/xrender_x11/evas_engine_xlib_render.c
deleted file mode 100644 (file)
index 8f1d2c7..0000000
+++ /dev/null
@@ -1,744 +0,0 @@
-#include "evas_common.h"
-//#include "evas_macros.h"
-#include "evas_private.h"
-#include "evas_engine.h"
-#include "Evas_Engine_XRender_X11.h"
-#include <math.h>
-
-/* this is a work around broken xrender - when/if this ever gets fixed in xorg
- * we can comment this out and one day remove it - for now keep it until such
- * a fix is spotted in the wild
- */
-#define BROKEN_XORG_XRENDER 1
-
-/* should be const char*, but the prototype for XRenderSetPictureFilter
- * is silly
- */
-static inline char *
-get_filter(int smooth)
-{
-   return smooth ? FilterBest : FilterNearest;
-}
-
-Xrender_Surface *
-_xr_xlib_render_surface_new(Ximage_Info *xinf, int w, int h, XRenderPictFormat *fmt, int alpha)
-{
-   Xrender_Surface *rs;
-   XRenderPictureAttributes att;
-
-   if ((!xinf) || (!fmt) || (w < 1) || (h < 1)) return NULL;
-   rs = calloc(1, sizeof(Xrender_Surface));
-   if (!rs) return NULL;
-   rs->xinf = xinf;
-   rs->width = w;
-   rs->height = h;
-   rs->x11.xlib.fmt = fmt;
-   rs->alpha = alpha;
-   rs->depth = fmt->depth;
-   rs->allocated = 1;
-   rs->x11.xlib.draw = XCreatePixmap(xinf->x11.connection, xinf->x11.root, w, h, fmt->depth);
-   if (rs->x11.xlib.draw == None)
-     {
-       free(rs);
-       return NULL;
-     }
-   rs->xinf->references++;
-   att.dither = 1;
-   att.component_alpha = 0;
-   att.repeat = 0;
-   rs->x11.xlib.pic = XRenderCreatePicture(xinf->x11.connection, rs->x11.xlib.draw, fmt,
-                                 CPRepeat | CPDither | CPComponentAlpha, &att);
-   if (rs->x11.xlib.pic == None)
-     {
-       XFreePixmap(rs->xinf->x11.connection, rs->x11.xlib.draw);
-       rs->xinf->references--;
-        free(rs);
-       return NULL;
-     }
-   return rs;
-}
-
-Xrender_Surface *
-_xr_xlib_render_surface_adopt(Ximage_Info *xinf, Drawable draw, int w, int h, int alpha)
-{
-   Xrender_Surface *rs;
-   XRenderPictFormat *fmt;
-   XRenderPictureAttributes att;
-
-   if ((!xinf) || (draw == None) || (w < 1) || (h < 1)) return NULL;
-   fmt = XRenderFindVisualFormat(xinf->x11.connection, xinf->x11.visual);
-   if (!fmt) return NULL;
-   rs = calloc(1, sizeof(Xrender_Surface));
-   if (!rs) return NULL;
-   rs->xinf = xinf;
-   rs->width = w;
-   rs->height = h;
-   rs->x11.xlib.fmt = fmt;
-   rs->alpha = alpha;
-   rs->depth = fmt->depth;
-   if (fmt->depth == 32) rs->alpha = 1;
-   rs->allocated = 0;
-   rs->x11.xlib.draw = draw;
-   rs->xinf->references++;
-   att.dither = 1;
-   att.component_alpha = 0;
-   att.repeat = 0;
-   rs->x11.xlib.pic = XRenderCreatePicture(xinf->x11.connection, rs->x11.xlib.draw, fmt,
-                                 CPRepeat | CPDither | CPComponentAlpha, &att);
-   if (rs->x11.xlib.pic == None)
-     {
-       rs->xinf->references--;
-        free(rs);
-       return NULL;
-     }
-   return rs;
-}
-
-Xrender_Surface *
-_xr_xlib_render_surface_format_adopt(Ximage_Info *xinf, Drawable draw, int w, int h, XRenderPictFormat *fmt, int alpha)
-{
-   Xrender_Surface *rs;
-   XRenderPictureAttributes att;
-
-   if ((!xinf) || (!fmt) || (draw == None) || (w < 1) || (h < 1)) return NULL;
-   rs = calloc(1, sizeof(Xrender_Surface));
-   if (!rs) return NULL;
-   rs->xinf = xinf;
-   rs->width = w;
-   rs->height = h;
-   rs->x11.xlib.fmt = fmt;
-   rs->alpha = alpha;
-   rs->depth = fmt->depth;
-   if (fmt->depth == 32) rs->alpha = 1;
-   rs->xinf->references++;
-   rs->allocated = 0;
-   rs->x11.xlib.draw = draw;
-   att.dither = 1;
-   att.component_alpha = 0;
-   att.repeat = 0;
-   rs->x11.xlib.pic = XRenderCreatePicture(xinf->x11.connection, rs->x11.xlib.draw, fmt,
-                                  CPRepeat | CPDither | CPComponentAlpha, &att);
-   if (rs->x11.xlib.pic == None)
-     {
-       rs->xinf->references--;
-        free(rs);
-       return NULL;
-     }
-   return rs;
-}
-
-void
-_xr_xlib_render_surface_free(Xrender_Surface *rs)
-{
-   if (!rs) return;
-   if (rs->xinf)
-     {
-       if ((rs->allocated) && (rs->x11.xlib.draw != None))
-          XFreePixmap(rs->xinf->x11.connection, rs->x11.xlib.draw);
-       if (rs->x11.xlib.pic != None)
-          XRenderFreePicture(rs->xinf->x11.connection, rs->x11.xlib.pic);
-       _xr_xlib_image_info_free(rs->xinf);
-       rs->xinf = NULL;
-     }
-   free(rs);
-}
-
-void
-_xr_xlib_render_surface_repeat_set(Xrender_Surface *rs, int repeat)
-{
-   XRenderPictureAttributes att;
-
-   att.repeat = repeat;
-   XRenderChangePicture(rs->xinf->x11.connection, rs->x11.xlib.pic, CPRepeat, &att);
-}
-
-void
-_xr_xlib_render_surface_solid_rectangle_set(Xrender_Surface *rs, int r, int g, int b, int a, int x, int y, int w, int h)
-{
-   XRenderColor col;
-
-   col.red   = (r << 8) | r;
-   col.green = (g << 8) | g;
-   col.blue  = (b << 8) | b;
-   col.alpha = (a << 8) | a;
-   XRenderFillRectangle(rs->xinf->x11.connection, PictOpSrc, rs->x11.xlib.pic, &col, x, y, w, h);
-}
-
-void
-_xr_xlib_render_surface_argb_pixels_fill(Xrender_Surface *rs, int sw, int sh __UNUSED__, void *pixels, int x, int y, int w, int h, int ox, int oy)
-{
-   Ximage_Image  *xim;
-   unsigned int  *p, *sp, *sple, *spe;
-   unsigned int   jump, sjump;
-
-   xim = _xr_xlib_image_new(rs->xinf, w, h, rs->depth);
-   if (!xim) return;
-   p = (unsigned int *)xim->data;
-   sp = ((unsigned int *)pixels) + (y * sw) + x;
-   jump = ((xim->line_bytes / 4) - w);
-   sjump = sw - w;
-   spe = sp + ((h - 1) * sw) + w;
-   if
-#ifdef WORDS_BIGENDIAN
-     (xim->x11.xlib.xim->byte_order == LSBFirst)
-#else
-     (xim->x11.xlib.xim->byte_order == MSBFirst)
-#endif
-     {
-       while (sp < spe)
-         {
-            sple = sp + w;
-            while (sp < sple)
-              {
-                 *p++ = (*sp << 24) + ((*sp << 8) & 0xff0000) + ((*sp >> 8) & 0xff00) + (*sp >> 24);
-//               *p++ = (B_VAL(sp) << 24) | (G_VAL(sp) << 16) | (R_VAL(sp) << 8) | A_VAL(sp);
-                 sp++;
-              }
-            p += jump;
-            sp += sjump;
-         }
-     }
-   else
-     {
-       while (sp < spe)
-         {
-            sple = sp + w;
-            while (sp < sple)
-               *p++ = *sp++;
-            p += jump;
-            sp += sjump;
-         }
-     }
-   _xr_xlib_image_put(xim, rs->x11.xlib.draw, x + ox, y + oy, w, h);
-}
-
-void
-_xr_xlib_render_surface_rgb_pixels_fill(Xrender_Surface *rs, int sw, int sh __UNUSED__, void *pixels, int x, int y, int w, int h, int ox, int oy)
-{
-   Ximage_Image  *xim;
-   unsigned int  *p, *sp, *sple, *spe;
-   unsigned int   jump, sjump;
-
-   xim = _xr_xlib_image_new(rs->xinf, w, h, rs->depth);
-   if (!xim) return;
-   p = (unsigned int *)xim->data;
-   sp = ((unsigned int *)pixels) + (y * sw) + x;
-   sjump = sw - w;
-   spe = sp + ((h - 1) * sw) + w;
-   if (rs->depth == 16)
-     {
-       jump = ((xim->line_bytes / 2) - w);
-       /* FIXME: if rs->depth == 16 - convert */
-       Gfx_Func_Convert conv_func;
-       int swap;
-
-#ifdef WORDS_BIGENDIAN
-       swap = (int)(xim->x11.xlib.xim->byte_order == LSBFirst);
-#else
-       swap = (int)(xim->x11.xlib.xim->byte_order == MSBFirst);
-#endif
-       /* FIXME: swap not handled */
-       conv_func = evas_common_convert_func_get((DATA8 *)sp, w, h, rs->depth,
-                                                ((Visual *)rs->xinf->x11.visual)->red_mask,
-                                                ((Visual *)rs->xinf->x11.visual)->green_mask,
-                                                ((Visual *)rs->xinf->x11.visual)->blue_mask,
-                                                PAL_MODE_NONE, 0);
-       if (conv_func)
-         conv_func(sp, (DATA8 *)p, sjump, jump, w, h, x, y, NULL);
-     }
-   else
-     {
-       jump = ((xim->line_bytes / 4) - w);
-       if
-#ifdef WORDS_BIGENDIAN
-         (xim->x11.xlib.xim->byte_order == LSBFirst)
-#else
-         (xim->x11.xlib.xim->byte_order == MSBFirst)
-#endif
-           {
-              while (sp < spe)
-                {
-                   sple = sp + w;
-                   while (sp < sple)
-                     {
-                        *p++ = (*sp << 24) + ((*sp << 8) & 0xff0000) + ((*sp >> 8) & 0xff00) + 0xff;
-//               *p++ = ((B_VAL(sp)) << 24) | ((G_VAL(sp)) << 16) | ((R_VAL(sp)) << 8) | 0x000000ff;
-                        sp++;
-                     }
-                   p += jump;
-                   sp += sjump;
-                }
-           }
-       else
-         {
-            while (sp < spe)
-              {
-                 sple = sp + w;
-                 while (sp < sple)
-                   *p++ = 0xff000000 | *sp++;
-                 p += jump;
-                 sp += sjump;
-              }
-         }
-     }
-   _xr_xlib_image_put(xim, rs->x11.xlib.draw, x + ox, y + oy, w, h);
-}
-
-void
-_xr_xlib_render_surface_clips_set(Xrender_Surface *rs, RGBA_Draw_Context *dc, int rx, int ry, int rw, int rh)
-{
-   int num = 0;
-   XRectangle *rect = NULL;
-
-   if ((dc) && (dc->clip.use))
-     {
-       RECTS_CLIP_TO_RECT(rx, ry, rw, rh,
-                          dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
-     }
-   if ((!dc) || (!dc->cutout.rects))
-     {
-       rect = malloc(sizeof(XRectangle));
-       if (!rect) return;
-       rect->x = rx;
-       rect->y = ry;
-       rect->width = rw;
-       rect->height = rh;
-       num = 1;
-     }
-   else
-     {
-        Cutout_Rects    *rects;
-       Cutout_Rect     *r;
-        int i;
-
-        rects = evas_common_draw_context_apply_cutouts(dc);
-        num = rects->active;
-       rect = malloc(num * sizeof(XRectangle));
-       if (!rect) return;
-       for (i = 0; i < num; i++)
-         {
-            r = rects->rects + i;
-            rect[i].x = r->x;
-            rect[i].y = r->y;
-            rect[i].width = r->w;
-            rect[i].height = r->h;
-         }
-       evas_common_draw_context_apply_clear_cutouts(rects);
-     }
-   if (!rect) return;
-   XRenderSetPictureClipRectangles(rs->xinf->x11.connection, rs->x11.xlib.pic, 0, 0, rect, num);
-   free(rect);
-}
-
-/* initialized the transform to the identity */
-static void
-init_xtransform(XTransform *t)
-{
-   int i, j;
-
-   for (i = 0; i < 3; i++)
-     for (j = 0; j < 3; j++)
-       t->matrix[i][j] = XDoubleToFixed((i == j) ? 1 : 0);
-}
-
-static void
-set_xtransform_scale(XTransform *t, int sw, int sh, int w, int h, int tx, int ty)
-{
-//   if ((sw > 1) && (w > 1))
-//     { sw--;  w--; }
-//   if ((sh > 1) && (h > 1))
-//     { sh--;  h--; }
-   t->matrix[0][0] = XDoubleToFixed((double)(sw) / (double)(w));
-   t->matrix[1][1] = XDoubleToFixed((double)(sh) / (double)(h));
-   t->matrix[2][0] = (tx * sw) / w;
-   t->matrix[2][1] = (ty * sh) / h;
-}
-
-// when color multiplier is used want: instead
-// CA src IN mask SRC temp; non-CA temp OVER dst. - i think. need to check.
-void
-_xr_xlib_render_surface_composite(Xrender_Surface *srs, Xrender_Surface *drs, RGBA_Draw_Context *dc, int sx, int sy, int sw, int sh, int x, int y, int w, int h, int smooth)
-{
-   Xrender_Surface *trs = NULL;
-   XTransform xf;
-   XRenderPictureAttributes att;
-   Picture mask = None;
-   int e, is_scaling, op;
-
-   if ((sw <= 0) || (sh <= 0) || (w <= 0) || (h <= 0)) return;
-
-   is_scaling = e = ((sw != w) || (sh != h));
-
-   att.clip_mask = None;
-   XRenderChangePicture(srs->xinf->x11.connection, srs->x11.xlib.pic, CPClipMask, &att);
-   XRenderChangePicture(drs->xinf->x11.connection, drs->x11.xlib.pic, CPClipMask, &att);
-
-   init_xtransform(&xf);
-
-   op = PictOpOver;
-   if (dc->render_op == _EVAS_RENDER_BLEND)
-     {
-       if (!srs->alpha) op = PictOpSrc;
-     }
-   else if (dc->render_op == _EVAS_RENDER_BLEND_REL)
-     op = PictOpAtop;
-   else if (dc->render_op == _EVAS_RENDER_MUL)
-     op = PictOpIn;
-   else if (dc->render_op == _EVAS_RENDER_COPY)
-     op = PictOpSrc;
-   else if (dc->render_op == _EVAS_RENDER_COPY_REL)
-     op = PictOpIn;
-   else if (dc->render_op == _EVAS_RENDER_MASK)
-     op = PictOpInReverse;
-
-   if ((dc) && (dc->mul.use))
-     {
-       unsigned int r, g, b, a;
-
-       if ((op == PictOpOver) && (!dc->mul.col)) return;
-       a = dc->mul.col >> 24;
-       r = (dc->mul.col >> 16) & 0xff;
-       g = (dc->mul.col >> 8) & 0xff;
-       b = dc->mul.col & 0xff;
-       if (a < 255) op = PictOpOver;
-       if (dc->mul.col != 0xffffffff)
-         {
-            if ((srs->xinf->mul_r != r) || (srs->xinf->mul_g != g) ||
-                (srs->xinf->mul_b != b) || (srs->xinf->mul_a != a))
-              {
-                 srs->xinf->mul_r = r;
-                 srs->xinf->mul_g = g;
-                 srs->xinf->mul_b = b;
-                 srs->xinf->mul_a = a;
-                 _xr_xlib_render_surface_solid_rectangle_set(srs->xinf->mul,
-                                                              r, g, b, a,
-                                                              0, 0, 1, 1);
-              }
-            mask = srs->xinf->mul->x11.xlib.pic;
-            if (dc->mul.col == (a * 0x01010101))
-              {
-                att.component_alpha = 0;
-                XRenderChangePicture(srs->xinf->x11.connection, mask, CPComponentAlpha, &att);
-              }
-            else
-              {
-                 if ((srs->alpha) || (a != 0xff))
-                   trs = _xr_xlib_render_surface_new(srs->xinf, sw + 2, sh + 2,
-                                                      srs->xinf->x11.fmt32, 1);
-                 else
-                   trs = _xr_xlib_render_surface_new(srs->xinf, sw + 2, sh + 2,
-                                                      srs->x11.xlib.fmt, srs->alpha);
-                 if (!trs) return;
-
-                 att.component_alpha = 1;
-                 XRenderChangePicture(srs->xinf->x11.connection, mask, CPComponentAlpha, &att);
-                 XRenderSetPictureTransform(srs->xinf->x11.connection, srs->x11.xlib.pic, &xf);
-                 XRenderComposite(srs->xinf->x11.connection, PictOpSrc, srs->x11.xlib.pic, mask,
-                                  trs->x11.xlib.pic,
-                                  sx, sy,
-                                  sx, sy,
-                                  0, 0, sw + 2, sh + 2);
-                 mask = None;
-              }
-         }
-     }
-
-//#define HFW + (sw / 2)
-//#define HFH + (sh / 2)
-#define HFW
-#define HFH
-
-   _xr_xlib_render_surface_clips_set(drs, dc, x, y, w, h);
-   if (trs)
-     {
-       XRenderSetPictureFilter(trs->xinf->x11.connection, trs->x11.xlib.pic, get_filter(smooth), NULL, 0);
-
-       set_xtransform_scale(&xf, sw, sh, w, h, -1, -1);
-       XRenderSetPictureTransform(trs->xinf->x11.connection, trs->x11.xlib.pic, &xf);
-
-       att.component_alpha = 0;
-       if (dc->render_op == _EVAS_RENDER_MUL) att.component_alpha = 1;
-       XRenderChangePicture(trs->xinf->x11.connection, trs->x11.xlib.pic, CPComponentAlpha, &att);
-
-       XRenderComposite(trs->xinf->x11.connection, op, trs->x11.xlib.pic, mask, drs->x11.xlib.pic,
-                        (w HFW) / sw, (h HFH) / sh,
-                        (w HFW) / sw, (h HFH) / sh,
-                        x, y, w, h);
-       _xr_xlib_render_surface_free(trs);
-     }
-   else
-     {
-       if (srs->bordered && is_scaling)
-         {
-            trs = _xr_xlib_render_surface_new(srs->xinf, sw + 2, sh + 2,
-                                         srs->x11.xlib.fmt, srs->alpha);
-            if (!trs) return;
-
-            att.component_alpha = 0;
-            XRenderChangePicture(srs->xinf->x11.connection, srs->x11.xlib.pic, CPComponentAlpha, &att);
-            XRenderSetPictureTransform(srs->xinf->x11.connection, srs->x11.xlib.pic, &xf);
-
-            XRenderComposite(srs->xinf->x11.connection, PictOpSrc, srs->x11.xlib.pic, None,
-                             trs->x11.xlib.pic, sx, sy, sx, sy, 0, 0, sw + 2, sh + 2);
-
-            XRenderSetPictureFilter(trs->xinf->x11.connection, trs->x11.xlib.pic, get_filter(smooth), NULL, 0);
-
-            set_xtransform_scale(&xf, sw, sh, w, h, -1, -1);
-            XRenderSetPictureTransform(trs->xinf->x11.connection, trs->x11.xlib.pic, &xf);
-
-            if (dc->render_op == _EVAS_RENDER_MUL)
-              {
-                 att.component_alpha = 1;
-                 XRenderChangePicture(trs->xinf->x11.connection, trs->x11.xlib.pic, CPComponentAlpha, &att);
-              }
-
-            XRenderComposite(trs->xinf->x11.connection, op, trs->x11.xlib.pic, mask, drs->x11.xlib.pic,
-                             (w HFW) / sw, (h HFH) / sh,
-                             (w HFW) / sw, (h HFH) / sh,
-//                           1, 1, 1, 1,
-                             x, y, w, h);
-            _xr_xlib_render_surface_free(trs);
-         }
-       else
-         {
-            XRenderSetPictureFilter(srs->xinf->x11.connection, srs->x11.xlib.pic, get_filter(smooth), NULL, 0);
-
-            set_xtransform_scale(&xf, sw, sh, w, h, 0, 0);
-            XRenderSetPictureTransform(srs->xinf->x11.connection, srs->x11.xlib.pic, &xf);
-
-            att.component_alpha = 0;
-            if (dc->render_op == _EVAS_RENDER_MUL)
-              att.component_alpha = 1;
-            XRenderChangePicture(srs->xinf->x11.connection, srs->x11.xlib.pic, CPComponentAlpha, &att);
-
-            XRenderComposite(srs->xinf->x11.connection, op, srs->x11.xlib.pic, mask, drs->x11.xlib.pic,
-                             ((((sx + 1) * w) HFW) / sw),
-                             ((((sy + 1) * h) HFH) / sh),
-                             ((((sx + 1) * w) HFW) / sw),
-                             ((((sy + 1) * h) HFH) / sh),
-                             x, y, w, h);
-         }
-     }
-}
-
-void
-_xr_xlib_render_surface_copy(Xrender_Surface *srs, Xrender_Surface *drs, int sx, int sy, int x, int y, int w, int h)
-{
-   XTransform xf;
-   XRenderPictureAttributes att;
-
-   if ((w <= 0) || (h <= 0) || (!srs) || (!drs)) return;
-
-   init_xtransform(&xf);
-#ifdef BROKEN_XORG_XRENDER
-   /* FIXME: why do we need to change the identity matrix ifthe src surface
-    * is 1 bit deep?
-    */
-   if (srs->depth == 1)
-     {
-       xf.matrix[0][0] = xf.matrix[1][1] = xf.matrix[2][2] = 1;
-     }
-#endif
-   XRenderSetPictureTransform(srs->xinf->x11.connection, srs->x11.xlib.pic, &xf);
-//   XRenderSetPictureFilter(srs->xinf->x11.connection, srs->x11.xlib.pic, FilterNearest, NULL, 0);
-
-   att.clip_mask = None;
-   XRenderChangePicture(srs->xinf->x11.connection, srs->x11.xlib.pic, CPClipMask, &att);
-   XRenderChangePicture(drs->xinf->x11.connection, drs->x11.xlib.pic, CPClipMask, &att);
-
-   XRenderComposite(srs->xinf->x11.connection, PictOpSrc, srs->x11.xlib.pic, None, drs->x11.xlib.pic,
-                   sx, sy, 0, 0, x, y, w, h);
-}
-
-void
-_xr_xlib_render_surface_rectangle_draw(Xrender_Surface *rs, RGBA_Draw_Context *dc, int x, int y, int w, int h)
-{
-   XRenderColor col;
-   XRenderPictureAttributes att;
-   int r, g, b, a, op;
-
-   if ((!rs) || (!dc)) return;
-   if ((w <= 0) || (h <= 0)) return;
-   a = dc->col.col >> 24;
-   r = (dc->col.col >> 16) & 0xff;
-   g = (dc->col.col >> 8 ) & 0xff;
-   b = (dc->col.col      ) & 0xff;
-   col.red   = (r << 8) | r;
-   col.green = (g << 8) | g;
-   col.blue  = (b << 8) | b;
-   col.alpha = (a << 8) | a;
-   op = PictOpOver;
-   if (dc->render_op == _EVAS_RENDER_BLEND)
-     {
-       if (!dc->col.col) return;
-       if (a == 0xff) op = PictOpSrc;
-     }
-   else if (dc->render_op == _EVAS_RENDER_BLEND_REL)
-     {
-       if (!dc->col.col) return;
-       op = PictOpAtop;
-     }
-   else if (dc->render_op == _EVAS_RENDER_MUL)
-     {
-       if (dc->col.col == 0xffffffff) return;
-       op = PictOpIn;
-     }
-   else if (dc->render_op == _EVAS_RENDER_COPY)
-       op = PictOpSrc;
-   else if (dc->render_op == _EVAS_RENDER_COPY_REL)
-       op = PictOpIn;
-   else if (dc->render_op == _EVAS_RENDER_MASK)
-       op = PictOpInReverse;
-
-   att.clip_mask = None;
-   XRenderChangePicture(rs->xinf->x11.connection, rs->x11.xlib.pic, CPClipMask, &att);
-
-   _xr_xlib_render_surface_clips_set(rs, dc, x, y, w, h);
-   XRenderFillRectangle(rs->xinf->x11.connection, op, rs->x11.xlib.pic, &col, x, y, w, h);
-}
-
-void
-_xr_xlib_render_surface_line_draw(Xrender_Surface *rs, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2)
-{
-   XRenderPictureAttributes att;
-   int op;
-
-   if ((!rs) || (!dc) || (!dc->col.col)) return;
-   op = PictOpOver;
-   if (dc->render_op == _EVAS_RENDER_BLEND)
-     {
-       if (!dc->col.col) return;
-     }
-   else if (dc->render_op == _EVAS_RENDER_BLEND_REL)
-     {
-       if (!dc->col.col) return;
-       op = PictOpAtop;
-     }
-   else if (dc->render_op == _EVAS_RENDER_MUL)
-     {
-       if (dc->col.col == 0xffffffff) return;
-       op = PictOpIn;
-     }
-   else if (dc->render_op == _EVAS_RENDER_COPY)
-       op = PictOpSrc;
-   else if (dc->render_op == _EVAS_RENDER_COPY_REL)
-       op = PictOpIn;
-   else if (dc->render_op == _EVAS_RENDER_MASK)
-       op = PictOpInReverse;
-   att.clip_mask = None;
-   XRenderChangePicture(rs->xinf->x11.connection, rs->x11.xlib.pic, CPClipMask, &att);
-   _xr_xlib_render_surface_clips_set(rs, dc, 0, 0, rs->width, rs->height);
-
-     {
-       int r, g, b, a;
-       XPointDouble poly[4];
-       int dx, dy;
-       double len, ddx, ddy;
-
-       dx = x2 - x1;
-       dy = y2 - y1;
-       len = sqrt((double)(dx * dx) + (double)(dy * dy));
-       ddx = (0.5 * dx) / len;
-       ddy = (0.5 * dy) / len;
-       if (ddx < 0) ddx = -0.5 - ddx;
-       else ddx = 0.5 - ddx;
-       if (ddy < 0) ddy = -0.5 - ddy;
-       else ddy = 0.5 - ddy;
-       poly[0].x =  (x1 + ddx);
-       poly[0].y =  (y1 - ddy);
-       poly[1].x =  (x2 + ddx);
-       poly[1].y =  (y2 - ddy);
-       poly[2].x =  (x2 - ddx);
-       poly[2].y =  (y2 + ddy);
-       poly[3].x =  (x1 - ddx);
-       poly[3].y =  (y1 + ddy);
-
-       a = (dc->col.col >> 24) & 0xff;
-       r = (dc->col.col >> 16) & 0xff;
-       g = (dc->col.col >> 8 ) & 0xff;
-       b = (dc->col.col      ) & 0xff;
-       if ((rs->xinf->mul_r != r) || (rs->xinf->mul_g != g) ||
-           (rs->xinf->mul_b != b) || (rs->xinf->mul_a != a))
-         {
-            rs->xinf->mul_r = r;
-            rs->xinf->mul_g = g;
-            rs->xinf->mul_b = b;
-            rs->xinf->mul_a = a;
-            _xr_xlib_render_surface_solid_rectangle_set(rs->xinf->mul, r, g, b, a, 0, 0, 1, 1);
-         }
-       XRenderCompositeDoublePoly(rs->xinf->x11.connection, op,
-                                  rs->xinf->mul->x11.xlib.pic, rs->x11.xlib.pic,
-                                  rs->xinf->x11.fmt8, 0, 0, 0, 0,
-                                  poly, 4, EvenOddRule);
-     }
-}
-
-void
-_xr_xlib_render_surface_polygon_draw(Xrender_Surface *rs, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y)
-{
-   RGBA_Polygon_Point *pt;
-   int i, num;
-   XPointDouble *pts;
-   int r, g, b, a;
-   XRenderPictureAttributes att;
-   int op;
-
-   if ((!rs) || (!dc)) return;
-   num = 0; EINA_INLIST_FOREACH(points, pt) num++;
-   if (num < 3) return;
-   op = PictOpOver;
-   if (dc->render_op == _EVAS_RENDER_BLEND)
-     {
-       if (!dc->col.col) return;
-     }
-   else if (dc->render_op == _EVAS_RENDER_BLEND_REL)
-     {
-       if (!dc->col.col) return;
-       op = PictOpAtop;
-     }
-   else if (dc->render_op == _EVAS_RENDER_MUL)
-     {
-       if (dc->col.col == 0xffffffff) return;
-       op = PictOpIn;
-     }
-   else if (dc->render_op == _EVAS_RENDER_COPY)
-       op = PictOpSrc;
-   else if (dc->render_op == _EVAS_RENDER_COPY_REL)
-       op = PictOpIn;
-   else if (dc->render_op == _EVAS_RENDER_MASK)
-       op = PictOpInReverse;
-   a = (dc->col.col >> 24) & 0xff;
-   r = (dc->col.col >> 16) & 0xff;
-   g = (dc->col.col >> 8 ) & 0xff;
-   b = (dc->col.col      ) & 0xff;
-   if ((rs->xinf->mul_r != r) || (rs->xinf->mul_g != g) ||
-       (rs->xinf->mul_b != b) || (rs->xinf->mul_a != a))
-     {
-       rs->xinf->mul_r = r;
-       rs->xinf->mul_g = g;
-       rs->xinf->mul_b = b;
-       rs->xinf->mul_a = a;
-       _xr_xlib_render_surface_solid_rectangle_set(rs->xinf->mul, r, g, b, a, 0, 0, 1, 1);
-     }
-   pts = malloc(num * sizeof(XPointDouble));
-   if (!pts) return;
-   i = 0;
-   EINA_INLIST_FOREACH(points, pt)
-     {
-       if (i < num)
-         {
-            pts[i].x = pt->x + x;
-            pts[i].y = pt->y + y;
-            i++;
-         }
-    }
-   att.clip_mask = None;
-   XRenderChangePicture(rs->xinf->x11.connection, rs->x11.xlib.pic, CPClipMask, &att);
-
-   _xr_xlib_render_surface_clips_set(rs, dc, 0, 0, rs->width, rs->height);
-   XRenderCompositeDoublePoly(rs->xinf->x11.connection, op,
-                             rs->xinf->mul->x11.xlib.pic, rs->x11.xlib.pic,
-                             rs->xinf->x11.fmt8, 0, 0, 0, 0,
-                             pts, num, Complex);
-   free(pts);
-}
diff --git a/src/modules/engines/xrender_x11/evas_engine_xlib_ximage.c b/src/modules/engines/xrender_x11/evas_engine_xlib_ximage.c
deleted file mode 100644 (file)
index 8a0c370..0000000
+++ /dev/null
@@ -1,262 +0,0 @@
-#include "evas_common.h"
-#include "evas_private.h"
-#include "evas_engine.h"
-#include "Evas_Engine_XRender_X11.h"
-
-static Eina_List *_image_info_list = NULL;
-
-static int _x_err = 0;
-static void
-_tmp_x_err(Display *d __UNUSED__, XErrorEvent *ev __UNUSED__)
-{
-   _x_err = 1;
-   return;
-}
-
-Ximage_Info *
-_xr_xlib_image_info_get(Display *display, Drawable draw, Visual *visual)
-{
-   Ximage_Info *xinf;
-   Ximage_Info *xinf2;
-   Eina_List   *l;
-   int          di;
-   unsigned int dui;
-   Window       root;
-
-   xinf2 = NULL;
-   EINA_LIST_FOREACH(_image_info_list, l, xinf)
-     if (xinf->x11.connection == display)
-       {
-        xinf2 = xinf;
-        break;
-       }
-   xinf = calloc(1, sizeof(Ximage_Info));
-   if (!xinf) return NULL;
-
-   xinf->references = 1;
-   xinf->x11.connection = display;
-   xinf->x11.draw = draw;
-   XGetGeometry(xinf->x11.connection, xinf->x11.draw,
-                &root,
-               &di, &di, &dui, &dui, &dui, &dui);
-   xinf->x11.root = root;
-   xinf->x11.visual = visual;
-   xinf->x11.fmt32 = XRenderFindStandardFormat(xinf->x11.connection, PictStandardARGB32);
-   xinf->x11.fmt24 = XRenderFindStandardFormat(xinf->x11.connection, PictStandardRGB24);
-   xinf->x11.fmt8 = XRenderFindStandardFormat(xinf->x11.connection, PictStandardA8);
-   xinf->x11.fmt4 = XRenderFindStandardFormat(xinf->x11.connection, PictStandardA4);
-   xinf->x11.fmt1 = XRenderFindStandardFormat(xinf->x11.connection, PictStandardA1);
-
-   /* find fmt for default visual */
-   xinf->x11.fmtdef = XRenderFindVisualFormat(xinf->x11.connection, xinf->x11.visual);
-
-   xinf->mul = _xr_xlib_render_surface_new(xinf, 1, 1, xinf->x11.fmt32, 1);
-   _xr_xlib_render_surface_repeat_set(xinf->mul, 1);
-   xinf->mul_r = xinf->mul_g = xinf->mul_b = xinf->mul_a = 0xff;
-   _xr_xlib_render_surface_solid_rectangle_set(xinf->mul, xinf->mul_r, xinf->mul_g, xinf->mul_b, xinf->mul_a, 0, 0, 1, 1);
-   if (xinf2)
-     {
-       xinf->can_do_shm = xinf2->can_do_shm;
-       xinf->depth = xinf2->depth;
-     }
-   else
-     {
-       XVisualInfo *vi, vit;
-       XShmSegmentInfo shm_info;
-       XImage *xim;
-       int num = 0;
-
-       vit.visualid = XVisualIDFromVisual(xinf->x11.visual);
-       vi = XGetVisualInfo(xinf->x11.connection, VisualIDMask, &vit, &num);
-       if (!vi) xinf->depth = 32;
-       else
-         {
-            xinf->depth = vi->depth;
-            XFree(vi);
-         }
-       xinf->can_do_shm = 0;
-       xim = XShmCreateImage(xinf->x11.connection, xinf->x11.visual, xinf->depth, ZPixmap, NULL, &shm_info, 1, 1);
-       if (xim)
-         {
-            shm_info.shmid = shmget(IPC_PRIVATE, xim->bytes_per_line * xim->height, IPC_CREAT | 0777);
-            if (shm_info.shmid >= 0)
-              {
-                 shm_info.shmaddr = xim->data = shmat(shm_info.shmid, 0, 0);
-                 if ((shm_info.shmaddr) && (shm_info.shmaddr != (void *) -1))
-                   {
-                      XErrorHandler ph;
-
-                      XSync(xinf->x11.connection, False);
-                      _x_err = 0;
-                      ph = XSetErrorHandler((XErrorHandler)_tmp_x_err);
-                      XShmAttach(xinf->x11.connection, &shm_info);
-                      XSync(xinf->x11.connection, False);
-                      XSetErrorHandler((XErrorHandler)ph);
-                      if (!_x_err) xinf->can_do_shm = 1;
-                      shmdt(shm_info.shmaddr);
-                   }
-                 shmctl(shm_info.shmid, IPC_RMID, 0);
-              }
-            XDestroyImage(xim);
-         }
-     }
-   _image_info_list = eina_list_prepend(_image_info_list, xinf);
-   return xinf;
-}
-
-void
-_xr_xlib_image_info_free(Ximage_Info *xinf)
-{
-   if (xinf->pool) XSync(xinf->x11.connection, False);
-   _xr_xlib_image_info_pool_flush(xinf, 0, 0);
-   xinf->references--;
-   if (xinf->references != 0) return;
-   _xr_xlib_render_surface_free(xinf->mul);
-   free(xinf);
-   _image_info_list = eina_list_remove(_image_info_list, xinf);
-}
-
-void
-_xr_xlib_image_info_pool_flush(Ximage_Info *xinf, unsigned int max_num, unsigned int max_mem)
-{
-   if ((xinf->pool_mem <= max_mem) && (eina_list_count(xinf->pool) <= max_num)) return;
-   while ((xinf->pool_mem > max_mem) || (eina_list_count(xinf->pool) > max_num))
-     {
-       Ximage_Image *xim;
-
-       if (!xinf->pool) break;
-       xim = xinf->pool->data;
-       _xr_xlib_image_free(xim);
-     }
-}
-
-Ximage_Image *
-_xr_xlib_image_new(Ximage_Info *xinf, int w, int h, int depth)
-{
-   Ximage_Image *xim, *xim2;
-   Eina_List *l;
-
-   xim2 = NULL;
-   EINA_LIST_FOREACH(xinf->pool, l, xim)
-     {
-       if ((xim->width >= w) && (xim->height >= h) && (xim->depth == depth) && (xim->available))
-         {
-            if (!xim2) xim2 = xim;
-            else if ((xim->width * xim->height) < (xim2->width * xim2->height)) xim2 = xim;
-         }
-     }
-   if (xim2)
-     {
-       xim2->available = 0;
-       return xim2;
-     }
-   xim = calloc(1, sizeof(Ximage_Image));
-   if (xim)
-     {
-       xim->xinf = xinf;
-       xim->width = w;
-       xim->height = h;
-       xim->depth = depth;
-       xim->available = 0;
-       if (xim->xinf->can_do_shm)
-         {
-            xim->x11.xlib.shm_info = calloc(1, sizeof(XShmSegmentInfo));
-            if (xim->x11.xlib.shm_info)
-              {
-                 xim->x11.xlib.xim = XShmCreateImage(xim->xinf->x11.connection, xim->xinf->x11.visual, xim->depth, ZPixmap, NULL, xim->x11.xlib.shm_info, xim->width, xim->height);
-                 if (xim->x11.xlib.xim)
-                   {
-                      xim->x11.xlib.shm_info->shmid = shmget(IPC_PRIVATE, xim->x11.xlib.xim->bytes_per_line * xim->x11.xlib.xim->height, IPC_CREAT | 0777);
-                      if (xim->x11.xlib.shm_info->shmid >= 0)
-                        {
-                           xim->x11.xlib.shm_info->shmaddr = xim->x11.xlib.xim->data = shmat(xim->x11.xlib.shm_info->shmid, 0, 0);
-                           if ((xim->x11.xlib.shm_info->shmaddr) && (xim->x11.xlib.shm_info->shmaddr != (void *) -1))
-                             {
-                                XErrorHandler ph;
-
-                                XSync(xim->xinf->x11.connection, False);
-                                _x_err = 0;
-                                ph = XSetErrorHandler((XErrorHandler)_tmp_x_err);
-                                XShmAttach(xim->xinf->x11.connection, xim->x11.xlib.shm_info);
-                                XSync(xim->xinf->x11.connection, False);
-                                XSetErrorHandler((XErrorHandler)ph);
-                                if (!_x_err) goto xim_ok;
-                                shmdt(xim->x11.xlib.shm_info->shmaddr);
-                             }
-                           shmctl(xim->x11.xlib.shm_info->shmid, IPC_RMID, 0);
-                        }
-                      XDestroyImage(xim->x11.xlib.xim);
-                   }
-                 free(xim->x11.xlib.shm_info);
-                 xim->x11.xlib.shm_info = NULL;
-              }
-         }
-       xim->x11.xlib.xim = XCreateImage(xim->xinf->x11.connection, xim->xinf->x11.visual, xim->depth, ZPixmap, 0, NULL, xim->width, xim->height, 32, 0);
-       if (!xim->x11.xlib.xim)
-         {
-            free(xim);
-            return NULL;
-         }
-       xim->x11.xlib.xim->data = malloc(xim->x11.xlib.xim->bytes_per_line * xim->x11.xlib.xim->height);
-       if (!xim->x11.xlib.xim->data)
-         {
-            XDestroyImage(xim->x11.xlib.xim);
-            free(xim);
-            return NULL;
-         }
-     }
-   else
-     {
-       return NULL;
-     }
-
-   xim_ok:
-   _xr_xlib_image_info_pool_flush(xinf, 32, (1600 * 1200 * 32 * 2));
-
-   xim->line_bytes = xim->x11.xlib.xim->bytes_per_line;
-   xim->data = (void *)(xim->x11.xlib.xim->data);
-   xinf->pool_mem += (xim->width * xim->height * xim->depth);
-   xinf->pool = eina_list_append(xinf->pool, xim);
-   return xim;
-}
-
-void
-_xr_xlib_image_free(Ximage_Image *xim)
-{
-   if (xim->x11.xlib.shm_info)
-     {
-       if (!xim->available) XSync(xim->xinf->x11.connection, False);
-       XShmDetach(xim->xinf->x11.connection, xim->x11.xlib.shm_info);
-       XDestroyImage(xim->x11.xlib.xim);
-       shmdt(xim->x11.xlib.shm_info->shmaddr);
-       shmctl(xim->x11.xlib.shm_info->shmid, IPC_RMID, 0);
-       free(xim->x11.xlib.shm_info);
-     }
-   else
-     {
-       free(xim->x11.xlib.xim->data);
-       xim->x11.xlib.xim->data = NULL;
-       XDestroyImage(xim->x11.xlib.xim);
-     }
-   xim->xinf->pool_mem -= (xim->width * xim->height * xim->depth);
-   xim->xinf->pool = eina_list_remove(xim->xinf->pool, xim);
-   free(xim);
-}
-
-void
-_xr_xlib_image_put(Ximage_Image *xim, Drawable draw, int x, int y, int w, int h)
-{
-   XGCValues gcv;
-   GC gc;
-
-   gc = XCreateGC(xim->xinf->x11.connection, draw, 0, &gcv);
-   if (xim->x11.xlib.shm_info)
-     {
-       XShmPutImage(xim->xinf->x11.connection, draw, gc, xim->x11.xlib.xim, 0, 0, x, y, w, h, False);
-       XSync(xim->xinf->x11.connection, False);
-     }
-   else
-     XPutImage(xim->xinf->x11.connection, draw, gc, xim->x11.xlib.xim, 0, 0, x, y, w, h);
-   xim->available = 1;
-   XFreeGC(xim->xinf->x11.connection, gc);
-}
diff --git a/src/modules/loaders/.cvsignore b/src/modules/loaders/.cvsignore
deleted file mode 100644 (file)
index 282522d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
index 222bef1..b7ed9a5 100644 (file)
@@ -20,6 +20,12 @@ SUBDIRS += eet
 endif
 endif
 
+if BUILD_LOADER_GENERIC
+if !EVAS_STATIC_BUILD_GENERIC
+SUBDIRS += generic
+endif
+endif
+
 if BUILD_LOADER_GIF
 if !EVAS_STATIC_BUILD_GIF
 SUBDIRS += gif
@@ -50,6 +56,12 @@ SUBDIRS += png
 endif
 endif
 
+if BUILD_LOADER_PSD
+if !EVAS_STATIC_BUILD_PSD
+SUBDIRS += psd
+endif
+endif
+
 if BUILD_LOADER_SVG
 if !EVAS_STATIC_BUILD_SVG
 SUBDIRS += svg
@@ -79,4 +91,3 @@ if !EVAS_STATIC_BUILD_XPM
 SUBDIRS += xpm
 endif
 endif
-
index 430156a..857f3b9 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @EVIL_CFLAGS@ \
 @WIN32_CPPFLAGS@
diff --git a/src/modules/loaders/edb/.cvsignore b/src/modules/loaders/edb/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index bdb2127..a0baf6b 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @evas_image_loader_edb_cflags@ \
 @EINA_CFLAGS@
 
diff --git a/src/modules/loaders/eet/.cvsignore b/src/modules/loaders/eet/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index 39b2f0b..c96a8d3 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @evas_image_loader_eet_cflags@ \
 @EINA_CFLAGS@
 
index 74520d6..c6d2783 100644 (file)
@@ -69,7 +69,7 @@ evas_image_load_file_data_eet(Image_Entry *ie, const char *file, const char *key
    unsigned int         w, h;
    int                  alpha, compression, quality, lossy, ok;
    Eet_File            *ef;
-   DATA32              *body, *p, *end;
+   DATA32              *body, *p, *end, *data;
    DATA32               nas = 0;
    Eina_Bool           res = EINA_FALSE;
 
@@ -102,8 +102,14 @@ evas_image_load_file_data_eet(Image_Entry *ie, const char *file, const char *key
        goto on_error;
      }
    evas_cache_image_surface_alloc(ie, w, h);
+   data = evas_cache_image_pixels(ie);
+   if (!data)
+     {
+       *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
+       goto on_error;
+     }
    ok = eet_data_image_read_to_surface(ef, key, 0, 0,
-                                      evas_cache_image_pixels(ie), w, h, w * 4,
+                                      data, w, h, w * 4,
                                       &alpha, &compression, &quality, &lossy);
    if (!ok)
      {
diff --git a/src/modules/loaders/generic/Makefile.am b/src/modules/loaders/generic/Makefile.am
new file mode 100644 (file)
index 0000000..a9e522e
--- /dev/null
@@ -0,0 +1,38 @@
+
+MAINTAINERCLEANFILES = Makefile.in
+
+AM_CPPFLAGS = \
+-I. \
+-I$(top_srcdir)/src/lib \
+-I$(top_srcdir)/src/lib/include \
+@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
+@evas_image_loader_generic_cflags@ \
+@EINA_CFLAGS@ \
+@EVIL_CFLAGS@ \
+@WIN32_CPPFLAGS@
+
+AM_CFLAGS = @WIN32_CFLAGS@
+
+
+if BUILD_LOADER_GENERIC
+if !EVAS_STATIC_BUILD_GENERIC
+
+pkgdir = $(libdir)/evas/modules/loaders/generic/$(MODULE_ARCH)
+pkg_LTLIBRARIES = module.la
+
+module_la_SOURCES = evas_image_load_generic.c
+
+module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_generic_libs@ @SHM_OPEN_LINK@ $(top_builddir)/src/lib/libevas.la
+module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
+module_la_LIBTOOLFLAGS = --tag=disable-static
+
+else
+
+noinst_LTLIBRARIES = libevas_loader_generic.la
+
+libevas_loader_generic_la_SOURCES = evas_image_load_generic.c
+libevas_loader_generic_la_LIBADD = @evas_image_loader_generic_libs@ @SHM_OPEN_LINK@
+
+endif
+endif
diff --git a/src/modules/loaders/generic/evas_image_load_generic.c b/src/modules/loaders/generic/evas_image_load_generic.c
new file mode 100644 (file)
index 0000000..754ecb3
--- /dev/null
@@ -0,0 +1,420 @@
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#endif
+
+#include "evas_common.h"
+#include "evas_private.h"
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <ctype.h>
+
+static Eina_Bool evas_image_load_file_head_generic(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4);
+static Eina_Bool evas_image_load_file_data_generic(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4);
+
+Evas_Image_Load_Func evas_image_load_generic_func =
+{
+  EINA_TRUE,
+  evas_image_load_file_head_generic,
+  evas_image_load_file_data_generic
+};
+
+static Eina_Bool
+illegal_char(const char *str)
+{
+   const char *p;
+
+   for (p = str; *p; p++)
+     {
+        if (*p <  '-')  return EINA_TRUE;
+        if (*p == '/')  return EINA_TRUE;
+        if (*p == ';')  return EINA_TRUE;
+        if (*p == ':')  return EINA_TRUE;
+        if (*p == '<')  return EINA_TRUE;
+        if (*p == '>')  return EINA_TRUE;
+        if (*p == '?')  return EINA_TRUE;
+        if (*p == '[')  return EINA_TRUE;
+        if (*p == '\\') return EINA_TRUE;
+        if (*p == ']')  return EINA_TRUE;
+        if (*p == '`')  return EINA_TRUE;
+        if (*p == '{')  return EINA_TRUE;
+        if (*p == '|')  return EINA_TRUE;
+        if (*p == '}')  return EINA_TRUE;
+        if (*p == '~')  return EINA_TRUE;
+        if (*p == 0x7f) return EINA_TRUE;
+     }
+   return EINA_FALSE;
+}
+
+static void
+escape_copy(const char *src, char *dst)
+{
+   const char *s;
+   char *d;
+
+   for (s = src, d = dst; *s; s++, d++)
+     {
+        // FIXME: escape tab, newline linefeed and friends
+        if ((*s == ' ')  ||
+            (*s == '!')  ||
+            (*s == '"')  ||
+            (*s == '#')  ||
+            (*s == '$')  ||
+            (*s == '%')  ||
+            (*s == '&')  ||
+            (*s == '\'') ||
+            (*s == '(')  ||
+            (*s == ')')  ||
+            (*s == '*')  ||
+            (*s == '[')  ||
+            (*s == '\\') ||
+            (*s == ']')  ||
+            (*s == '`')  ||
+            (*s == '{')  ||
+            (*s == '|')  ||
+            (*s == '}')  ||
+            (*s == '~'))
+          {
+             *d = '\\';
+             d++;
+          }
+        *d = *s;
+     }
+   *d = 0;
+}
+
+static void
+dotcat(char *dest, const char *src)
+{
+   int len = strlen(dest);
+   const char *s;
+   char *d;
+
+   for (d = dest + len, s = src; *s; d++, s++) *d = tolower(*s);
+   *d = 0;
+}
+
+static Eina_Bool
+_load(Image_Entry *ie, const char *file, const char *key, int *error, Eina_Bool get_data)
+{
+   Eina_Bool res = EINA_FALSE;
+   int w = 0, h = 0, alpha = 0;
+   const char *dot1 = NULL, *dot2 = NULL, *end, *p;
+   char *cmd = NULL, decoders[3][128], buf[4096];
+   char *img_loader = "evas_image_loader"; // FIXME: specific path
+   // eg $libdir/evas/generic_loaders
+   int cmd_len, len, decoders_num = 0, try_count = 0;
+   int read_data = 0;
+   char *tmpfname = NULL, *shmfname = NULL;
+
+   DATA32 *body;
+   FILE *f;
+
+   // enough for command + params excluding filem key and loadopts
+   cmd_len = 1024 + strlen(img_loader);
+   cmd_len += strlen(file) * 2;
+   if (key) cmd_len += strlen(key) * 2;
+   cmd = alloca(cmd_len);
+
+   len = strlen(file);
+   if (len < 1)
+     {
+        *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
+       return EINA_FALSE;
+     }
+   end = file + len;
+   for (p = end - 1; p >= file; p--)
+     {
+        if      ((!dot1) && (*p == '.')) dot1 = p;
+        else if ((!dot2) && (*p == '.')) dot2 = p;
+        else if ((dot1) && (dot2)) break;
+    }
+   if (dot2)
+     {
+        // double extn not too long
+        if (((end - dot2) <= 10) && (!illegal_char(dot2)))
+          {
+             strcpy(&(decoders[decoders_num][0]), img_loader);
+             dotcat(&(decoders[decoders_num][0]), dot2);
+             decoders_num++;
+          }
+        // single extn not too long
+        if (((end - dot1) <= 5) && (!illegal_char(dot1)))
+          {
+             strcpy(&(decoders[decoders_num][0]), img_loader);
+             dotcat(&(decoders[decoders_num][0]), dot1);
+             decoders_num++;
+          }
+        strcpy(decoders[decoders_num], img_loader);
+        decoders_num++;
+     }
+   else if (dot1)
+     {
+        // single extn not too long
+        if (((end - dot1) <= 5) && (!illegal_char(dot1)))
+          {
+             strcpy(&(decoders[decoders_num][0]), img_loader);
+             dotcat(&(decoders[decoders_num][0]), dot1);
+             decoders_num++;
+          }
+        strcpy(decoders[decoders_num], img_loader);
+        decoders_num++;
+     }
+   else
+     {
+        strcpy(decoders[decoders_num], img_loader);
+        decoders_num++;
+     }
+
+   for (try_count = 0; try_count < decoders_num; try_count++)
+     {
+        // FIXME: strcats could be more efficient, not that it matters much
+        // here as we are about to build a cmd to exec via a shell that
+        // 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...
+        strcpy(cmd, decoders[try_count]);
+        strcat(cmd, " ");
+        // filename first arg
+        len = strlen(cmd);
+        escape_copy(file, cmd + len);
+        if (!get_data)
+          {
+             strcat(cmd, " -head ");
+          }
+        if (key)
+          {
+             strcat(cmd, " -key ");
+             len = strlen(cmd);
+             escape_copy(key, cmd + len);
+          }
+        if (ie->load_opts.scale_down_by > 1)
+          {
+             strcat(cmd, " -opt-scale-down-by ");
+             snprintf(buf, sizeof(buf), "%i", ie->load_opts.scale_down_by);
+             strcat(cmd, buf);
+          }
+        if (ie->load_opts.dpi > 0.0)
+          {
+             strcat(cmd, " -opt-dpi ");
+             snprintf(buf, sizeof(buf), "%i", (int)(ie->load_opts.dpi * 1000.0));
+             strcat(cmd, buf);
+          }
+        if ((ie->load_opts.w > 0) &&
+            (ie->load_opts.h > 0))
+          {
+             strcat(cmd, " -opt-size ");
+             snprintf(buf, sizeof(buf), "%i %i", ie->load_opts.w, ie->load_opts.h);
+             strcat(cmd, buf);
+         }
+        f = popen(cmd, "r");
+        if (f) break;
+     }
+   if (!f)
+     {
+       *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
+       return EINA_FALSE;
+     }
+   while (fgets(buf, sizeof(buf), f))
+     {
+        len = strlen(buf);
+        if (len > 0)
+          {
+             if ((buf[len - 1] == '\n')) buf[len - 1] = 0;
+             if (!strncmp(buf, "size ", 5))
+               {
+                  int tw = 0, th = 0;
+
+                  len = sscanf(buf, "%*s %i %i", &tw, &th);
+                  if (len == 2)
+                    {
+                       if ((tw > 0) && (th > 0))
+                         {
+                            w = tw;
+                            h = th;
+                         }
+                    }
+               }
+             else if (!strncmp(buf, "alpha ", 6))
+               {
+                  int ta;
+
+                  len = sscanf(buf, "%*s %i", &ta);
+                  if (len == 1)
+                    {
+                       alpha = ta;
+                    }
+               }
+             else if (!strncmp(buf, "tmpfile ", 8))
+               {
+                  tmpfname = buf + 8;
+                  goto getdata;
+               }
+#ifdef HAVE_SHM_OPEN
+             else if (!strncmp(buf, "shmfile ", 8))
+               {
+                  shmfname = buf + 8;
+                  goto getdata;
+               }
+#endif
+             else if (!strncmp(buf, "data", 4))
+               {
+                  read_data = 1;
+                  goto getdata;
+               }
+             else if (!strncmp(buf, "done", 4))
+               {
+                  read_data = 2;
+                  goto getdata;
+               }
+          }
+     }
+getdata:
+   if ((!read_data) && (!tmpfname) && (!shmfname))
+     {
+       *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
+       goto on_error;
+     }
+   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 on_error;
+     }
+   body = evas_cache_image_pixels(ie);
+   if (body)
+     {
+        if ((w != (int)ie->w) || (h != (int)ie->h))
+          {
+             *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
+             goto on_error;
+          }
+     }
+   if (alpha) ie->flags.alpha = 1;
+   ie->w = w;
+   ie->h = h;
+
+   if (get_data)
+     {
+        if (!body) evas_cache_image_surface_alloc(ie, ie->w, ie->h);
+        body = evas_cache_image_pixels(ie);
+        if (!body)
+          {
+             *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
+             goto on_error;
+          }
+
+        if ((tmpfname) || (shmfname))
+          {
+             int fd = -1;
+
+             // open
+             if (tmpfname)
+                fd = open(tmpfname, O_RDONLY, S_IRUSR);
+#ifdef HAVE_SHM_OPEN
+             else if (shmfname)
+                fd = shm_open(shmfname, O_RDONLY, S_IRUSR);
+#endif
+             if (fd >= 0)
+               {
+                  void *addr;
+
+                  // mmap
+                  addr = mmap(NULL, w * h * sizeof(DATA32),
+                              PROT_READ, MAP_SHARED, fd, 0);
+                  if (addr != MAP_FAILED)
+                    {
+                       memcpy(body, addr, w * h * sizeof(DATA32));
+                       munmap(addr, w * h * sizeof(DATA32));
+                    }
+                  // close
+                  if (tmpfname)
+                    {
+                       close(fd);
+                       unlink(tmpfname);
+                    }
+#ifdef HAVE_SHM_OPEN
+                  else if (shmfname)
+                    {
+                       close(fd);
+                       shm_unlink(shmfname);
+                    }
+#endif
+               }
+             else
+               {
+                  *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
+                  goto on_error;
+               }
+          }
+        else if (read_data)
+          {
+             if (fread(body, w * h * sizeof(DATA32), 1, f) != 1)
+               {
+                  *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
+                  goto on_error;
+               }
+          }
+     }
+
+   res = EINA_TRUE;
+   *error = EVAS_LOAD_ERROR_NONE;
+
+ on_error:
+   if (f) pclose(f);
+   return res;
+}
+
+static Eina_Bool
+evas_image_load_file_head_generic(Image_Entry *ie, const char *file, const char *key, int *error)
+{
+   return _load(ie, file, key, error, EINA_FALSE);
+}
+
+static Eina_Bool
+evas_image_load_file_data_generic(Image_Entry *ie, const char *file, const char *key, int *error)
+{
+   DATA32 *body;
+
+   body = evas_cache_image_pixels(ie);
+   if (!body) return _load(ie, file, key, error, EINA_TRUE);
+   *error = EVAS_LOAD_ERROR_NONE;
+   return EINA_TRUE;
+}
+
+static int
+module_open(Evas_Module *em)
+{
+   if (!em) return 0;
+   em->functions = (void *)(&evas_image_load_generic_func);
+   return 1;
+}
+
+static void
+module_close(Evas_Module *em __UNUSED__)
+{
+}
+
+static Evas_Module_Api evas_modapi =
+{
+   EVAS_MODULE_API_VERSION,
+   "generic",
+   "none",
+   {
+     module_open,
+     module_close
+   }
+};
+
+EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, generic);
+
+#ifndef EVAS_STATIC_BUILD_GENERIC
+EVAS_EINA_MODULE_DEFINE(image_loader, generic);
+#endif
diff --git a/src/modules/loaders/gif/.cvsignore b/src/modules/loaders/gif/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index 6e3a442..9234370 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @evas_image_loader_gif_cflags@ \
 @EINA_CFLAGS@
 
index c06866d..044dd0d 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @EVIL_CFLAGS@ \
 @WIN32_CPPFLAGS@
diff --git a/src/modules/loaders/jpeg/.cvsignore b/src/modules/loaders/jpeg/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index ffeb2ac..2088ba8 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @evas_image_loader_jpeg_cflags@ \
 @EVIL_CFLAGS@ \
index 1213de2..52feb46 100644 (file)
@@ -3,13 +3,14 @@
 #endif
 
 #include <stdio.h>
-#include <jpeglib.h>
-#include <setjmp.h>
 
 #ifdef HAVE_EVIL
 # include <Evil.h>
 #endif
 
+#include <setjmp.h>
+#include <jpeglib.h>
+
 #include "evas_common.h"
 #include "evas_private.h"
 
@@ -25,8 +26,14 @@ static void _JPEGFatalErrorHandler(j_common_ptr cinfo);
 static void _JPEGErrorHandler(j_common_ptr cinfo);
 static void _JPEGErrorHandler2(j_common_ptr cinfo, int msg_level);
 
-static Eina_Bool evas_image_load_file_head_jpeg_internal(Image_Entry *ie, FILE *f, int *error) EINA_ARG_NONNULL(1, 2, 3);
-static Eina_Bool evas_image_load_file_data_jpeg_internal(Image_Entry *ie, FILE *f, int *error) EINA_ARG_NONNULL(1, 2, 3);
+static Eina_Bool evas_image_load_file_head_jpeg_internal(Image_Entry *ie,
+                                                         void *map,
+                                                         size_t len,
+                                                         int *error) EINA_ARG_NONNULL(1, 2, 3);
+static Eina_Bool evas_image_load_file_data_jpeg_internal(Image_Entry *ie,
+                                                         void *map,
+                                                         size_t len,
+                                                         int *error) EINA_ARG_NONNULL(1, 2, 3);
 #if 0 /* not used at the moment */
 static int evas_image_load_file_data_jpeg_alpha_internal(Image_Entry *ie, FILE *f) EINA_ARG_NONNULL(1, 2);
 #endif
@@ -75,8 +82,81 @@ _JPEGErrorHandler2(j_common_ptr cinfo __UNUSED__, int msg_level __UNUSED__)
    return;
 }
 
+struct jpeg_membuf_src
+{
+   struct jpeg_source_mgr pub;
+
+   const unsigned char    *buf;
+   size_t                  len;
+   struct jpeg_membuf_src *self;
+};
+
+static void
+_evas_jpeg_membuf_src_init(j_decompress_ptr cinfo __UNUSED__)
+{
+}
+
+static boolean
+_evas_jpeg_membuf_src_fill(j_decompress_ptr cinfo)
+{
+   static const JOCTET jpeg_eoi[2] = { 0xFF, JPEG_EOI };
+   struct jpeg_membuf_src *src = (struct jpeg_membuf_src *)cinfo->src;
+
+   src->pub.bytes_in_buffer = sizeof(jpeg_eoi);
+   src->pub.next_input_byte = jpeg_eoi;
+
+   return TRUE;
+}
+
+static void
+_evas_jpeg_membuf_src_skip(j_decompress_ptr cinfo,
+                          long             num_bytes)
+{
+   struct jpeg_membuf_src *src = (struct jpeg_membuf_src *)cinfo->src;
+
+   src->pub.bytes_in_buffer -= num_bytes;
+   src->pub.next_input_byte += num_bytes;
+}
+
+static void
+_evas_jpeg_membuf_src_term(j_decompress_ptr cinfo)
+{
+   struct jpeg_membuf_src *src = ((struct jpeg_membuf_src *)cinfo->src)->self;
+
+   free(src);
+   cinfo->src = NULL;
+}
+
+static int
+_evas_jpeg_membuf_src(j_decompress_ptr cinfo,
+                      void *map, size_t length)
+{
+   struct jpeg_membuf_src *src;
+
+   src = calloc(1, sizeof(*src));
+   if (!src)
+      return -1;
+
+   src->self = src;
+
+   cinfo->src = &src->pub;
+   src->buf = map;
+   src->len = length;
+   src->pub.init_source = _evas_jpeg_membuf_src_init;
+   src->pub.fill_input_buffer = _evas_jpeg_membuf_src_fill;
+   src->pub.skip_input_data = _evas_jpeg_membuf_src_skip;
+   src->pub.resync_to_restart = jpeg_resync_to_restart;
+   src->pub.term_source = _evas_jpeg_membuf_src_term;
+   src->pub.bytes_in_buffer = src->len;
+   src->pub.next_input_byte = src->buf;
+
+   return 0;
+}
+
 static Eina_Bool
-evas_image_load_file_head_jpeg_internal(Image_Entry *ie, FILE *f, int *error)
+evas_image_load_file_head_jpeg_internal(Image_Entry *ie,
+                                        void *map, size_t length,
+                                        int *error)
 {
    unsigned int w, h, scalew, scaleh;
    struct jpeg_decompress_struct cinfo;
@@ -96,7 +176,14 @@ evas_image_load_file_head_jpeg_internal(Image_Entry *ie, FILE *f, int *error)
        return EINA_FALSE;
      }
    jpeg_create_decompress(&cinfo);
-   jpeg_stdio_src(&cinfo, f);
+
+   if (_evas_jpeg_membuf_src(&cinfo, map, length))
+     {
+        jpeg_destroy_decompress(&cinfo);
+        *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
+        return 0;
+     }
+
    jpeg_read_header(&cinfo, TRUE);
    cinfo.do_fancy_upsampling = FALSE;
    cinfo.do_block_smoothing = FALSE;
@@ -174,9 +261,15 @@ evas_image_load_file_head_jpeg_internal(Image_Entry *ie, FILE *f, int *error)
    if (ie->scale > 1)
      {
        jpeg_destroy_decompress(&cinfo);
-       rewind(f);
        jpeg_create_decompress(&cinfo);
-       jpeg_stdio_src(&cinfo, f);
+
+        if (_evas_jpeg_membuf_src(&cinfo, map, length))
+          {
+             jpeg_destroy_decompress(&cinfo);
+             *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
+             return 0;
+          }
+
        jpeg_read_header(&cinfo, TRUE);
        cinfo.do_fancy_upsampling = FALSE;
        cinfo.do_block_smoothing = FALSE;
@@ -223,7 +316,9 @@ get_time(void)
 */
 
 static Eina_Bool
-evas_image_load_file_data_jpeg_internal(Image_Entry *ie, FILE *f, int *error)
+evas_image_load_file_data_jpeg_internal(Image_Entry *ie,
+                                        void *map, size_t size,
+                                        int *error)
 {
    unsigned int w, h;
    struct jpeg_decompress_struct cinfo;
@@ -244,7 +339,14 @@ evas_image_load_file_data_jpeg_internal(Image_Entry *ie, FILE *f, int *error)
        return EINA_FALSE;
      }
    jpeg_create_decompress(&cinfo);
-   jpeg_stdio_src(&cinfo, f);
+
+   if (_evas_jpeg_membuf_src(&cinfo, map, size))
+     {
+        jpeg_destroy_decompress(&cinfo);
+        *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
+        return 0;
+     }
+
    jpeg_read_header(&cinfo, TRUE);
    cinfo.do_fancy_upsampling = FALSE;
    cinfo.do_block_smoothing = FALSE;
@@ -333,6 +435,11 @@ evas_image_load_file_data_jpeg_internal(Image_Entry *ie, FILE *f, int *error)
        return EINA_TRUE;
      }
    ptr2 = evas_cache_image_pixels(ie);
+   if (!ptr2)
+     {
+        *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
+        return EINA_FALSE;
+     }
 
    /* We handle first CMYK (4 components) */
    if (cinfo.output_components == 4)
@@ -715,39 +822,69 @@ evas_image_load_file_data_jpeg_alpha_internal(Image_Entry *ie, FILE *f, int *err
 #endif
 
 static Eina_Bool
-evas_image_load_file_head_jpeg(Image_Entry *ie, const char *file, const char *key, int *error)
+evas_image_load_file_head_jpeg(Image_Entry *ie,
+                               const char *file, const char *key __UNUSED__,
+                               int *error)
 {
-   int val;
-   FILE *f;
+   Eina_File *f;
+   void *map;
+   Eina_Bool val = EINA_FALSE;
 
-   f = fopen(file, "rb");
+   f = eina_file_open(file, EINA_FALSE);
    if (!f)
      {
        *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
        return EINA_FALSE;
      }
-   val = evas_image_load_file_head_jpeg_internal(ie, f, error);
-   fclose(f);
+   map = eina_file_map_all(f, EINA_FILE_WILLNEED);
+   if (!map)
+     {
+       *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
+        goto on_error;
+     }
+
+   val = evas_image_load_file_head_jpeg_internal(ie,
+                                                 map, eina_file_size_get(f),
+                                                 error);
+
+   eina_file_map_free(f, map);
+
+ on_error:
+   eina_file_close(f);
    return val;
-   key = 0;
 }
 
 static Eina_Bool
-evas_image_load_file_data_jpeg(Image_Entry *ie, const char *file, const char *key, int *error)
+evas_image_load_file_data_jpeg(Image_Entry *ie,
+                               const char *file, const char *key __UNUSED__,
+                               int *error)
 {
-   int val;
-   FILE *f;
+   Eina_File *f;
+   void *map;
+   Eina_Bool val = EINA_FALSE;
 
-   f = fopen(file, "rb");
+   f = eina_file_open(file, EINA_FALSE);
    if (!f)
      {
        *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
        return EINA_FALSE;
      }
-   val = evas_image_load_file_data_jpeg_internal(ie, f, error);
-   fclose(f);
+   map = eina_file_map_all(f, EINA_FILE_WILLNEED);
+   if (!map)
+     {
+        *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
+        goto on_error;
+     }
+
+   val = evas_image_load_file_data_jpeg_internal(ie,
+                                                 map, eina_file_size_get(f),
+                                                 error);
+
+   eina_file_map_free(f, map);
+
+ on_error:
+   eina_file_close(f);
    return val;
-   key = 0;
 }
 
 static int
diff --git a/src/modules/loaders/pmaps/.cvsignore b/src/modules/loaders/pmaps/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index 6354990..dc07a32 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @evas_image_loader_pmaps_cflags@ \
 @EVIL_CFLAGS@ \
index f13ffc4..001a2a0 100644 (file)
@@ -9,7 +9,7 @@
 #include "evas_common.h"
 #include "evas_private.h"
 
-#define FILE_BUFFER_SIZE 1024
+#define FILE_BUFFER_SIZE 1024 * 32
 #define FILE_BUFFER_UNREAD_SIZE 16
 
 static Eina_Bool evas_image_load_file_head_pmaps(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4);
@@ -294,7 +294,6 @@ static size_t
 pmaps_buffer_plain_update(Pmaps_Buffer *b)
 {
    size_t r;
-   size_t steps = 0;
 
    /* if we already are in the last buffer we can not update it */
    if (b->last_buffer)
@@ -304,7 +303,7 @@ 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;
 
@@ -324,25 +323,9 @@ pmaps_buffer_plain_update(Pmaps_Buffer *b)
      }
 
    b->buffer[r] = 0;
-   r--;
-
-   while (steps < (FILE_BUFFER_UNREAD_SIZE - 2)
-         && r > 1 && !isspace(b->buffer[r]))
-     {
-       steps++;
-       r--;
-     }
-
-   if (steps != 0)
-     {
-       memcpy(b->unread, &b->buffer[r], steps + 1);
-       b->unread_len = steps + 1;
-     }
-   else
-     {
-       b->unread[0] = '\0';
-       b->unread_len = 0;
-     }
+   
+   b->unread[0] = '\0';
+   b->unread_len = 0;
 
    b->buffer[r] = '\0';
    b->current = b->buffer;
@@ -362,23 +345,22 @@ 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 - 1, b->file) + b->unread_len;
+   r = fread(&b->buffer[b->unread_len], 1, FILE_BUFFER_SIZE - b->unread_len, 
+             b->file) + b->unread_len;
 
-   if (r < FILE_BUFFER_SIZE - 1)
+   if (r < FILE_BUFFER_SIZE)
      {
-       /*we reached eof */ ;
+       /*we reached eof */
        b->last_buffer = 1;
      }
 
-   b->buffer[r] = 0;
    b->end = b->buffer + r;
    b->current = b->buffer;
 
    if (b->unread_len)
      {
        /* the buffer is now read */
-       *b->unread = '\0';
+       *b->unread = 0;
        b->unread_len = 0;
      }
 
diff --git a/src/modules/loaders/png/.cvsignore b/src/modules/loaders/png/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index ff14bb8..f9387a5 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @evas_image_loader_png_cflags@ \
 @EVIL_CFLAGS@ \
diff --git a/src/modules/loaders/psd/Makefile.am b/src/modules/loaders/psd/Makefile.am
new file mode 100644 (file)
index 0000000..8b06348
--- /dev/null
@@ -0,0 +1,33 @@
+
+MAINTAINERCLEANFILES = Makefile.in
+
+AM_CPPFLAGS = \
+-I. \
+-I$(top_srcdir)/src/lib \
+-I$(top_srcdir)/src/lib/include \
+@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
+@EINA_CFLAGS@ \
+@EVIL_CFLAGS@ \
+@WIN32_CPPFLAGS@
+
+if BUILD_LOADER_PSD
+if !EVAS_STATIC_BUILD_PSD
+
+pkgdir = $(libdir)/evas/modules/loaders/psd/$(MODULE_ARCH)
+pkg_LTLIBRARIES = module.la
+
+module_la_SOURCES = evas_image_load_psd.c
+
+module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la
+module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
+module_la_LIBTOOLFLAGS = --tag=disable-static
+
+else
+
+noinst_LTLIBRARIES = libevas_loader_psd.la
+libevas_loader_psd_la_SOURCES = evas_image_load_psd.c
+libevas_loader_psd_la_LIBADD = 
+
+endif
+endif
diff --git a/src/modules/loaders/psd/evas_image_load_psd.c b/src/modules/loaders/psd/evas_image_load_psd.c
new file mode 100644 (file)
index 0000000..bda696b
--- /dev/null
@@ -0,0 +1,976 @@
+#define _XOPEN_SOURCE
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include <math.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#endif
+
+#include "evas_common.h"
+#include "evas_private.h"
+
+typedef struct _PSD_Header PSD_Header;
+
+typedef enum _PSD_Mode
+  {
+    PSD_GREYSCALE = 1,
+    PSD_INDEXED = 2,
+    PSD_RGB = 3,
+    PSD_CMYK = 4
+  } PSD_Mode;
+
+struct _PSD_Header
+{
+   unsigned char signature[4];
+   unsigned short version;
+   unsigned char reserved[9];
+   unsigned short channels;
+   unsigned int height;
+   unsigned int width;
+   unsigned short depth;
+
+   unsigned short channel_num;
+
+   PSD_Mode mode;
+};
+
+enum {
+  READ_COMPRESSED_SUCCESS,
+  READ_COMPRESSED_ERROR_FILE_CORRUPT,
+  READ_COMPRESSED_ERROR_FILE_READ_ERROR
+};
+
+static Eina_Bool get_compressed_channels_length(PSD_Header *Head,
+                                                FILE *file,
+                                                unsigned short *rle_table,
+                                                unsigned int *chanlen);
+
+static int
+read_ushort(FILE *file, unsigned short *ret)
+{
+   unsigned char b[2];
+   if (fread(b, sizeof(unsigned char), 2, file) != 2) return 0;
+   // FIXME: need to check order
+   *ret = (b[0] << 8) | b[1];
+   return 1;
+}
+
+static int
+read_uint(FILE *file, unsigned int *ret)
+{
+   unsigned char       b[4];
+   if (fread(b, sizeof(unsigned char), 4, file) != 4) return 0;
+   // FIXME: need to check order
+   *ret = ARGB_JOIN(b[0], b[1], b[2], b[3]);
+   return 1;
+}
+
+// Internal function used to get the Psd header from the current file.
+Eina_Bool
+psd_get_header(PSD_Header *header, FILE * file)
+{
+   unsigned short tmp;
+
+#define CHECK_RET(Call, Value)                  \
+   if (Call != Value) 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_ushort(file, &tmp), 1);
+   header->mode = tmp;
+
+#undef CHECK_RET
+
+   /* fprintf(stderr, "<<<<<<<<<<<\nsignature : %c%c%c%c\n", */
+   /*         header->signature[0], */
+   /*         header->signature[1], */
+   /*         header->signature[2], */
+   /*         header->signature[3]); */
+   /* fprintf(stderr, "version : %i\n", header->version); */
+   /* fprintf(stderr, "channels : %i\n", header->channels); */
+   /* fprintf(stderr, "width x height : %dx%d\n", header->width, header->height); */
+   /* fprintf(stderr, "depth : %i\n", header->depth); */
+   /* fprintf(stderr, "mode : %i\n>>>>>>>>>>>>\n", header->mode); */
+
+   return EINA_TRUE;
+}
+
+
+// Internal function used to check if the HEADER is a valid Psd header.
+Eina_Bool
+is_psd(PSD_Header *header)
+{
+   if (strncmp((char*)header->signature, "8BPS", 4))
+     return EINA_FALSE;
+   if (header->version != 1)
+     return EINA_FALSE;
+   if (header->channels < 1 || header->channels > 24)
+     return EINA_FALSE;
+   if (header->height < 1 || header->width < 1)
+     return EINA_FALSE;
+   if (header->depth != 1 && header->depth != 8 && header->depth != 16)
+     return EINA_FALSE;
+
+   return EINA_TRUE;
+}
+
+static Eina_Bool
+evas_image_load_file_head_psd(Image_Entry *ie, const char *FileName, 
+                              const char *key __UNUSED__, int *error)
+{
+   FILE        *f;
+   PSD_Header header;
+   Eina_Bool correct;
+
+   *error = EVAS_LOAD_ERROR_NONE;
+
+   f = fopen(FileName, "rb");
+   if (f == NULL)
+     {
+        *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
+        return EINA_FALSE;
+     }
+   correct = psd_get_header(&header, f);
+   fclose(f);
+
+   if (!correct || !is_psd(&header))
+     {
+        *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
+        return EINA_FALSE;
+     }
+
+   ie->w = header.width;
+   ie->h = header.height;
+   if (header.channels == 3) ie->flags.alpha = 0;
+   else ie->flags.alpha = 1;
+
+   return EINA_TRUE;
+}
+
+static unsigned int
+read_compressed_channel(FILE* file,
+                       const unsigned int channel_length __UNUSED__, 
+                        unsigned int size,
+                       unsigned char* channel)
+{
+   // FIXME: what does channel_length means, and why is it not used
+   unsigned int i;
+   char headbyte, c;
+
+#define CHECK_RET(Call, Value)                                          \
+   if (Call != Value) return READ_COMPRESSED_ERROR_FILE_READ_ERROR;
+
+   for (i = 0; i < size; )
+     {
+        CHECK_RET(fread(&headbyte, 1, 1, file), 1);
+
+        if (headbyte >= 0)
+          {
+             if (i + headbyte > size)
+              return READ_COMPRESSED_ERROR_FILE_CORRUPT;
+
+            CHECK_RET(fread(channel + i, headbyte + 1, 1, file), 1);
+
+             i += headbyte + 1;
+          }
+        else if (headbyte >= -127 && headbyte <= -1)
+          {
+             int run;
+
+            CHECK_RET(fread(&c, 1, 1, file), 1);
+
+             run = c;
+             /* if (run == -1) */
+            /*   return READ_COMPRESSED_ERROR_FILE_READ_ERROR; */
+
+             if (i + (-headbyte + 1) > size)
+              return READ_COMPRESSED_ERROR_FILE_CORRUPT;
+
+             memset(channel + i, run, -headbyte + 1);
+             i += -headbyte + 1;
+          }
+     }
+
+#undef CHECK_RET
+
+   return READ_COMPRESSED_SUCCESS;
+}
+
+
+Eina_Bool
+psd_get_data(Image_Entry *ie __UNUSED__,
+            PSD_Header *head,
+            FILE *f,
+            unsigned char *buffer, Eina_Bool compressed,
+            int *error)
+{
+   unsigned int c, x, y, numchan, bps, bpc, bpp;
+   unsigned int pixels_count;
+   unsigned char *channel = NULL;
+   unsigned char *data = NULL;
+
+   // Added 01-07-2009: This is needed to correctly load greyscale and
+   //  paletted images.
+   switch (head->mode)
+     {
+      case PSD_GREYSCALE:
+      case PSD_INDEXED:
+         numchan = 1;
+         break;
+      default:
+         numchan = 3;
+     }
+
+   bpp = head->channels;
+   bpc = head->depth / 8;
+   pixels_count = head->width * head->height;
+
+   data = malloc(sizeof (unsigned char) * pixels_count * bpp);
+   if (!data) return EINA_FALSE;
+
+   channel = malloc(sizeof (unsigned char) * pixels_count * bpc);
+   if (!channel)
+     {
+        free(data);
+        return EINA_FALSE;
+     }
+
+   bps = head->width * head->channels * bpc;
+   // @TODO: Add support for this in, though I have yet to run across a .psd
+   //  file that uses this.
+   if (compressed && bpc == 2)
+     {
+        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)                          \
+     {                                         \
+        free(data);                            \
+        free(channel);                         \
+        return EINA_FALSE;                     \
+     }
+
+   if (!compressed)
+     {
+        if (bpc == 1)
+          {
+             for (c = 0; c < numchan; c++)
+               {
+                  unsigned char *tmp = channel;
+
+                  CHECK_RET(fread(tmp, pixels_count, 1, f), 1);
+
+                  for (y = 0; y < head->height * bps; y += bps)
+                    {
+                       for (x = 0; x < bps; x += bpp, tmp++)
+                         {
+                            data[y + x + c] = *tmp;
+                         }
+                    }
+               }
+
+             // Accumulate any remaining channels into a single alpha channel
+             //@TODO: This needs to be changed for greyscale images.
+             for (; c < head->channels; c++)
+               {
+                  unsigned char *tmp = channel;
+
+                  CHECK_RET(fread(channel, pixels_count, 1, f), 1);
+
+                  for (y = 0; y < head->height * bps; y += bps)
+                    {
+                       for (x = 0; x < bps; x += bpp, tmp++)
+                         {
+                            unsigned short newval;
+
+                            // previous formula was : (old / 255 * new / 255) * 255
+                            newval = (*tmp) * data[y + x + 3];
+
+                            data[y + x + 3] = newval >> 8;
+                         }
+                    }
+               }
+          }
+        else
+          {
+             int bps2;
+
+             bps2 = bps / 2;
+
+             // iCurImage->Bpc == 2
+             for (c = 0; c < numchan; c++)
+               {
+                  unsigned short *shortptr = (unsigned short*) channel;
+
+                  CHECK_RET(fread(channel, pixels_count * 2, 1, f), 1);
+
+                  for (y = 0; y < head->height * bps2; y += bps2)
+                    {
+                       for (x = 0; x < (unsigned int)bps2; x += bpp, shortptr++)
+                         {
+                            ((unsigned short*)data)[y + x + c] = *shortptr;
+                         }
+                    }
+               }
+
+             // Accumulate any remaining channels into a single alpha channel
+             //@TODO: This needs to be changed for greyscale images.
+             for (; c < head->channels; c++)
+               {
+                 unsigned short *shortptr = (unsigned short*) channel;
+
+                 CHECK_RET(fread(channel, pixels_count * 2, 1, f), 1);
+
+                 for (y = 0; y < head->height * bps2; y += bps2)
+                    {
+                       for (x = 0; x < (unsigned int)bps2; x += bpp, shortptr)
+                         {
+                            unsigned int newval;
+
+                            newval = *shortptr * ((unsigned short*)data)[y + x + 3];
+
+                            ((unsigned short*)data)[y + x + 3] = newval >> 16;
+                         }
+                    }
+               }
+          }
+     }
+   else
+     {
+        unsigned short *rle_table;
+       unsigned int *chanlen;
+
+       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))
+         goto file_read_error;
+
+        for (c = 0; c < numchan; c++)
+          {
+            unsigned char *tmp = channel;
+            int err;
+
+            err = read_compressed_channel(f,
+                                          chanlen[c],
+                                          pixels_count,
+                                          channel);
+             if (err == READ_COMPRESSED_ERROR_FILE_CORRUPT)
+               goto file_corrupt;
+             else if (err == READ_COMPRESSED_ERROR_FILE_READ_ERROR)
+               goto file_read_error;
+
+             for (y = 0; y < head->height * bps; y += bps)
+               {
+                 for (x = 0; x < bps; x += bpp, tmp++)
+                    {
+                       data[y + x + c] = *tmp;
+                    }
+               }
+          }
+
+        // Initialize the alpha channel to solid
+        //@TODO: This needs to be changed for greyscale images.
+        if (head->channels >= 4)
+          {
+            for (y = 0; y < head->height * bps; y += bps)
+               {
+                  for (x = 0; x < bps; x += bpp)
+                   {
+                       data[y + x + 3] = 255;
+                   }
+               }
+
+             for (; c < head->channels; c++)
+               {
+                 unsigned char *tmp = channel;
+                 int err;
+
+                  err = read_compressed_channel(f,
+                                               chanlen[c],
+                                               pixels_count,
+                                               channel);
+                  if (err == READ_COMPRESSED_ERROR_FILE_CORRUPT)
+                    goto file_corrupt;
+                  else if (err == READ_COMPRESSED_ERROR_FILE_READ_ERROR)
+                    goto file_read_error;
+
+                  for (y = 0; y < head->height * bps; y += bps)
+                    {
+                      for (x = 0; x < bps; x += bpp, tmp++)
+                         {
+                           unsigned short newval;
+
+                           newval = *tmp * data[y + x + 3];
+
+                           data[y + x + 3] = newval >> 8;
+                         }
+                    }
+               }
+          }
+     }
+
+   if (bpp == 3)
+     {
+        for (x = 0; x < pixels_count; x++)
+          {
+             buffer[x * 4 + 0] = data[x * 3 + 2];
+             buffer[x * 4 + 1] = data[x * 3 + 1];
+             buffer[x * 4 + 2] = data[x * 3 + 0];
+             buffer[x * 4 + 3] = 255;
+          }
+     }
+   else
+     {
+        // BRGA to RGBA
+        for (x= 0; x < pixels_count; x++)
+          {
+             buffer[x * 4 + 0] = data[x * 4 + 2];
+             buffer[x * 4 + 1] = data[x * 4 + 1];
+             buffer[x * 4 + 2] = data[x * 4 + 0];
+             buffer[x * 4 + 3] = data[x * 4 + 3];
+          }
+     }
+
+   free(channel);
+   free(data);
+   return EINA_TRUE;
+
+#undef CHECK_RET
+
+ file_corrupt:
+   *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
+
+ file_read_error:
+   free(channel);
+   free(data);
+
+   return EINA_FALSE;
+}
+
+
+Eina_Bool
+get_single_channel(Image_Entry *ie __UNUSED__,
+                  PSD_Header *head,
+                  FILE *f,
+                  unsigned char *buffer,
+                  Eina_Bool compressed)
+{
+   unsigned int i, bpc;
+   unsigned short *tmp;
+   char headbyte;
+   int c;
+   int pixels_count;
+
+   tmp = (unsigned short*)buffer;
+   bpc = (head->depth / 8);
+   pixels_count = head->width * head->height;
+
+#define CHECK_RET(Call, Value)                  \
+   if (Call != Value) return EINA_FALSE;
+
+   if (!compressed)
+     {
+        if (bpc == 1)
+          {
+             CHECK_RET(fread(buffer, pixels_count, 1, f), 1);
+          }
+        else
+          {  // Bpc == 2
+             CHECK_RET(fread(buffer, pixels_count * 2, 1, f), 1);
+          }
+     }
+   else
+     {
+        for (i = 0; i < (unsigned int)pixels_count; )
+          {
+             CHECK_RET(fread(&headbyte, 1, 1, f), 1);
+
+             if (headbyte >= 0)
+               {  //  && HeadByte <= 127
+                  CHECK_RET(fread(buffer + i, headbyte + 1, 1, f), 1);
+
+                  i += headbyte + 1;
+               }
+             if (headbyte >= -127 && headbyte <= -1)
+               {
+                  int run;
+
+                  CHECK_RET(fread(&c, 1, 1, f), 1);
+
+                  run = c;
+                  if (run == -1) return EINA_FALSE;
+
+                  memset(buffer + i, run, -headbyte + 1);
+                  i += -headbyte + 1;
+               }
+          }
+     }
+
+#undef CHECK_RET
+
+   return EINA_TRUE;
+}
+
+Eina_Bool
+read_psd_grey(Image_Entry *ie, PSD_Header *head, FILE * f, int *error)
+{
+   unsigned int color_mode, resource_size, misc_info;
+   unsigned short compressed;
+   unsigned int type;
+   void *surface = NULL;
+
+   *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
+
+#define CHECK_RET(Call, Value)                  \
+   if (Call != Value) return EINA_FALSE;
+
+   CHECK_RET(read_uint(f, &color_mode), 1);
+   // Skip over the 'color mode data section'
+   CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0);
+
+   CHECK_RET(read_uint(f, &resource_size), 1);
+   // Read the 'image resources section'
+
+   CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0);
+
+   CHECK_RET(read_uint(f, &misc_info), 1);
+   CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0);
+
+   CHECK_RET(read_ushort(f, &compressed), 1);
+
+   ie->w = head->width;
+   ie->h = head->height;
+   if (head->channels == 3) ie->flags.alpha = 0;
+   else ie->flags.alpha = 1;
+
+   head->channel_num = head->channels;
+   // Temporary to read only one channel...some greyscale .psd files have 2.
+   head->channels = 1;
+
+   switch (head->depth)
+     {
+      case 8:
+         type = 1;
+         break;
+      case 16:
+         type = 2;
+         break;
+      default:
+         *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
+         return EINA_FALSE;
+     }
+
+   evas_cache_image_surface_alloc(ie, ie->w, ie->h);
+   surface = evas_cache_image_pixels(ie);
+   if (!surface)
+     {
+        *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
+        goto cleanup_error;
+     }
+
+   if (!psd_get_data(ie, head, f, surface, compressed, error))
+     goto cleanup_error;
+
+   return EINA_TRUE;
+
+#undef CHECK_RET
+
+ cleanup_error:
+   return EINA_FALSE;
+}
+
+
+Eina_Bool
+read_psd_indexed(Image_Entry *ie, PSD_Header *head, FILE * f, int *error)
+{
+   unsigned int color_mode, resource_size, misc_info;
+   unsigned short compressed;
+   void *surface;
+
+   *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
+
+#define CHECK_RET(Call, Value)                  \
+   if (Call != Value) return EINA_FALSE;
+
+   CHECK_RET(read_uint(f, &color_mode), 1);
+   CHECK_RET((color_mode % 3), 0);
+   /*
+     Palette = (unsigned char*)malloc(Colormode);
+     if (Palette == NULL)
+     return EINA_FALSE;
+     if (fread(&Palette, 1, Colormode, file) != Colormode)
+     goto cleanup_error;
+   */
+   // Skip over the 'color mode data section'
+   CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0);
+
+   // 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(f, &misc_info), 1);
+   CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0);
+
+   CHECK_RET(read_ushort(f, &compressed), 1);
+
+   if (head->channels != 1 || head->depth != 8)
+     {
+        *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
+        return EINA_FALSE;
+     }
+   head->channel_num = head->channels;
+
+   ie->w = head->width;
+   ie->h = head->height;
+   if (head->channels == 3) ie->flags.alpha = 0;
+   else ie->flags.alpha = 1;
+
+   evas_cache_image_surface_alloc(ie, ie->w, ie->h);
+   surface = evas_cache_image_pixels(ie);
+   if (!surface)
+     {
+        *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
+        return EINA_FALSE;
+     }
+
+   if (!psd_get_data(ie, head, f, surface, compressed, error))
+     return EINA_FALSE;
+   return EINA_TRUE;
+
+#undef CHECK_RET
+}
+
+Eina_Bool
+read_psd_rgb(Image_Entry *ie, PSD_Header *head, FILE *f, 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;
+
+   CHECK_RET(read_uint(f, &color_mode), 1);
+   // Skip over the 'color mode data section'
+   CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0);
+
+   // 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(f, &misc_info), 1);
+   CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0);
+
+   CHECK_RET(read_ushort(f, &compressed), 1);
+
+   head->channel_num = head->channels;
+
+   switch (head->depth)
+     {
+      case 8:
+         type = 1;
+         break;
+      case 16:
+         type = 2;
+         break;
+      default:
+         *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
+         return EINA_FALSE;
+     }
+   ie->w = head->width;
+   ie->h = head->height;
+   if (head->channels == 3) ie->flags.alpha = 0;
+   else ie->flags.alpha = 1;
+
+   evas_cache_image_surface_alloc(ie, ie->w, ie->h);
+   surface = evas_cache_image_pixels(ie);
+   if (!surface)
+     {
+        *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
+        goto cleanup_error;
+     }
+
+   if (!psd_get_data(ie, head, f, surface, compressed, error))
+     goto cleanup_error;
+
+   evas_common_image_premul(ie);
+   return EINA_TRUE;
+
+#undef CHECK_RET
+
+ cleanup_error:
+   return EINA_FALSE;
+}
+
+Eina_Bool
+read_psd_cmyk(Image_Entry *ie, PSD_Header *head, FILE *f, int *error)
+{
+   unsigned int color_mode, resource_size, misc_info, size, i, j, data_size;
+   unsigned short compressed;
+   unsigned int format, type;
+   unsigned char *kchannel = NULL;
+   void *surface;
+
+   *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
+
+#define CHECK_RET(Call, Value)                  \
+   if (Call != Value) return EINA_FALSE;
+
+   CHECK_RET(read_uint(f, &color_mode), 1);
+   // Skip over the 'color mode data section'
+   CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0);
+
+   CHECK_RET(read_uint(f, &resource_size), 1);
+   // Read the 'image resources section'
+   CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0);
+
+   CHECK_RET(read_uint(f, &misc_info), 1);
+   CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0);
+
+   CHECK_RET(read_ushort(f, &compressed), 1);
+
+   switch (head->channels)
+     {
+      case 4:
+         format = 0x1907;
+         head->channel_num = 4;
+         head->channels = 3;
+         break;
+      case 5:
+         format = 0x1908;
+         head->channel_num = 5;
+         head->channels = 4;
+         break;
+      default:
+         *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
+         return EINA_FALSE;
+     }
+
+   switch (head->depth)
+     {
+      case 8:
+         type = 1;
+         break;
+      case 16:
+         type = 2;
+         break;
+      default:
+         *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
+         return EINA_FALSE;
+     }
+
+   ie->w = head->width;
+   ie->h = head->height;
+   if (head->channels == 3) ie->flags.alpha = 0;
+   else ie->flags.alpha = 1;
+
+   evas_cache_image_surface_alloc(ie, ie->w, ie->h);
+   surface = evas_cache_image_pixels(ie);
+   if (!surface)
+     {
+        *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
+        goto cleanup_error;
+     }
+
+   if (!psd_get_data(ie, head, f, 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))
+     goto cleanup_error;
+
+   data_size = head->channels * type * ie->w * ie->h;
+   if (format == 0x1907)
+     {
+        unsigned char *tmp = surface;
+        const unsigned char *limit = tmp + data_size;
+
+        for (i = 0, j = 0; tmp < limit; tmp++, j++)
+          {
+             int k;
+
+             for (k = 0; k < 3; k++)
+               *tmp = (*tmp * kchannel[j]) >> 8;
+
+             // FIXME: tmp[i+3] = 255;
+          }
+     }
+   else
+     {  // RGBA
+        unsigned char *tmp = surface;
+        const unsigned char *limit = tmp + data_size;
+
+        // The KChannel array really holds the alpha channel on this one.
+        for (i = 0, j = 0; tmp < limit; tmp += 4, j++)
+          {
+             tmp[0] = (tmp[0] * tmp[3]) >> 8;
+             tmp[1] = (tmp[1] * tmp[3]) >> 8;
+             tmp[2] = (tmp[2] * tmp[3]) >> 8;
+             tmp[3] = kchannel[j];  // Swap 'K' with alpha channel.
+          }
+     }
+
+   free(kchannel);
+
+   evas_common_image_premul(ie);
+   return EINA_TRUE;
+
+ cleanup_error:
+   free(kchannel);
+   return EINA_FALSE;
+}
+
+static Eina_Bool
+evas_image_load_file_data_psd(Image_Entry *ie,
+                              const char *file,
+                              const char *key __UNUSED__,
+                              int *error)
+{
+   FILE *f;
+   PSD_Header header;
+   Eina_Bool bpsd = EINA_FALSE;
+
+   f = fopen(file, "rb");
+   if (f == NULL)
+     {
+        *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
+        return bpsd;
+     }
+
+   if (!psd_get_header(&header, f) || !is_psd(&header))
+     {
+        fclose(f);
+        *error = EVAS_LOAD_ERROR_GENERIC;
+        return EINA_FALSE;
+     }
+
+   ie->w = header.width;
+   ie->h = header.height;
+
+   *error = EVAS_LOAD_ERROR_NONE;
+
+   switch (header.mode)
+     {
+      case PSD_GREYSCALE:  // Greyscale
+         bpsd = read_psd_grey(ie, &header, f, error);
+         break;
+      case PSD_INDEXED:  // Indexed
+         bpsd = read_psd_indexed(ie, &header, f, error);
+         break;
+      case PSD_RGB:  // RGB
+         bpsd = read_psd_rgb(ie, &header, f, error);
+         break;
+      case PSD_CMYK:  // CMYK
+         bpsd = read_psd_cmyk(ie, &header, f, error);
+         break;
+      default :
+         *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
+         bpsd = EINA_FALSE;
+     }
+   fclose(f);
+
+   return bpsd;
+}
+
+static Eina_Bool
+get_compressed_channels_length(PSD_Header *head,
+                              FILE * file,
+                              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)
+     return EINA_FALSE;
+
+   memset(chanlen, 0, head->channel_num * sizeof(unsigned int));
+   for (c = 0; c < head->channel_num; c++)
+     {
+        unsigned int i;
+
+        j = c * head->height;
+        for (i = 0; i < head->height; i++)
+          {
+            chanlen[c] += rle_table[i + j];
+          }
+     }
+
+   return EINA_TRUE;
+}
+
+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
+};
+
+static int
+module_open(Evas_Module *em)
+{
+   if (!em) return 0;
+   em->functions = (void *)(&evas_image_load_psd_func);
+   return 1;
+}
+
+static void
+module_close(Evas_Module *em __UNUSED__)
+{
+}
+
+static Evas_Module_Api evas_modapi =
+  {
+    EVAS_MODULE_API_VERSION,
+    "psd",
+    "none",
+    {
+      module_open,
+      module_close
+    }
+  };
+
+EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, psd);
+
+
+#ifndef EVAS_STATIC_BUILD_PSD
+EVAS_EINA_MODULE_DEFINE(image_loader, psd);
+#endif
diff --git a/src/modules/loaders/svg/.cvsignore b/src/modules/loaders/svg/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index d8e60da..4b8d1b5 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @evas_image_loader_svg_cflags@
 
index e5f0933..3847481 100644 (file)
@@ -110,11 +110,8 @@ evas_image_load_file_head_svg(Image_Entry *ie, const char *file, const char *key
        h2 = (ie->load_opts.w * h) / w;
        if (h2 > ie->load_opts.h)
          {
-            unsigned int w3;
             h2 = ie->load_opts.h;
-            w3 = (ie->load_opts.h * w) / h;
-            if (w3 > w2)
-               w2 = w3;
+            w2 = (ie->load_opts.h * w) / h;
          }
        w = w2;
        h = h2;
@@ -198,6 +195,11 @@ evas_image_load_file_data_svg(Image_Entry *ie, const char *file, const char *key
      }
    if (w < 1) w = 1;
    if (h < 1) h = 1;
+   if ((w != (int)ie->w) || (h != (int)ie->h))
+     {
+        *error = EVAS_LOAD_ERROR_GENERIC;
+        goto error;
+     }
    ie->flags.alpha = 1;
    evas_cache_image_surface_alloc(ie, w, h);
    pixels = evas_cache_image_pixels(ie);
index f784d63..4d9e240 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @EVIL_CFLAGS@ \
 @WIN32_CPPFLAGS@
index b18c1a1..9f66886 100644 (file)
@@ -5,9 +5,6 @@
 #include <stdio.h>
 #include <sys/types.h>
 #include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <unistd.h>
 
 #ifdef HAVE_EVIL
 # include <Evil.h>
@@ -70,30 +67,27 @@ static Evas_Image_Load_Func evas_image_load_tga_func =
 static Eina_Bool
 evas_image_load_file_head_tga(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error)
 {
-   int fd;
-   unsigned char *seg = MAP_FAILED, *filedata;
-   struct stat ss;
+   Eina_File *f;
+   unsigned char *seg = NULL, *filedata;
    tga_header *header;
    tga_footer *footer, tfooter;
    char hasa = 0, footer_present = 0, vinverted = 0;
    int w = 0, h = 0, bpp;
 
-   fd = open(file, O_RDONLY);
-   
+   f = eina_file_open(file, EINA_FALSE);
    *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
-   if (fd < 0) return EINA_FALSE;
-   if (fstat(fd, &ss) < 0) goto close_file;
-   
+   if (f == NULL) return EINA_FALSE;
+
    *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
-   if (ss.st_size < (off_t)(sizeof(tga_header) + sizeof(tga_footer)))
+   if (eina_file_size_get(f) < (off_t)(sizeof(tga_header) + sizeof(tga_footer)))
       goto close_file;
-   seg = mmap(0, ss.st_size, PROT_READ, MAP_SHARED, fd, 0);
-   if (seg == MAP_FAILED) goto close_file;
+   seg = eina_file_map_all(f, EINA_FILE_SEQUENTIAL);
+   if (seg == NULL) goto close_file;
    filedata = seg;
-   
+
    header = (tga_header *)filedata;
    // no unaligned data accessed, so ok
-   footer = (tga_footer *)(filedata + (ss.st_size - sizeof(tga_footer)));
+   footer = (tga_footer *)(filedata + (eina_file_size_get(f) - sizeof(tga_footer)));
    memcpy(&tfooter, footer, sizeof(tga_footer));
    if (!memcmp(tfooter.signature, TGA_SIGNATURE, sizeof(tfooter.signature)))
      {
@@ -131,48 +125,47 @@ evas_image_load_file_head_tga(Image_Entry *ie, const char *file, const char *key
    ie->w = w;
    ie->h = h;
    if (hasa) ie->flags.alpha = 1;
-   
-   if (seg != MAP_FAILED) munmap(seg, ss.st_size);
-   close(fd);
+
+   eina_file_map_free(f, seg);
+   eina_file_close(f);
    *error = EVAS_LOAD_ERROR_NONE;
    return EINA_TRUE;
 
 close_file:
-   if (seg != MAP_FAILED) munmap(seg, ss.st_size);
-   close(fd);
+   if (seg != NULL) eina_file_map_free(f, seg);
+   eina_file_close(f);
    return EINA_FALSE;
 }
 
 static Eina_Bool
 evas_image_load_file_data_tga(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error)
 {
-   int fd;
-   unsigned char *seg = MAP_FAILED, *filedata;
-   struct stat ss;
+   Eina_File *f;
+   unsigned char *seg = NULL, *filedata;
    tga_header *header;
    tga_footer *footer, tfooter;
    char hasa = 0, footer_present = 0, vinverted = 0, rle = 0;
    int w = 0, h = 0, x, y, bpp;
+   off_t size;
    unsigned int *surface, *dataptr;
    unsigned int  datasize;
    unsigned char *bufptr, *bufend;
-   
-   fd = open(file, O_RDONLY);
-   
+
+   f = eina_file_open(file, EINA_FALSE);
    *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
-   if (fd < 0) return EINA_FALSE;
-   if (fstat(fd, &ss) < 0) goto close_file;
-   
+   if (f == NULL) return EINA_FALSE;
+
    *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
-   if (ss.st_size < (off_t)(sizeof(tga_header) + sizeof(tga_footer)))
+   if (eina_file_size_get(f) < (off_t)(sizeof(tga_header) + sizeof(tga_footer)))
       goto close_file;
-   seg = mmap(0, ss.st_size, PROT_READ, MAP_SHARED, fd, 0);
-   if (seg == MAP_FAILED) goto close_file;
+   seg = eina_file_map_all(f, EINA_FILE_SEQUENTIAL);
+   if (seg == NULL) goto close_file;
    filedata = seg;
-   
+   size = eina_file_size_get(f);
+
    header = (tga_header *)filedata;
    // no unaligned data accessed, so ok
-   footer = (tga_footer *)(filedata + (ss.st_size - sizeof(tga_footer)));
+   footer = (tga_footer *)(filedata + (size - sizeof(tga_footer)));
    memcpy(&tfooter, footer, sizeof(tga_footer));
    if (!memcmp(tfooter.signature, TGA_SIGNATURE, sizeof(tfooter.signature)))
      {
@@ -220,9 +213,9 @@ evas_image_load_file_data_tga(Image_Entry *ie, const char *file, const char *key
        goto close_file;
      }
 
-   datasize = ss.st_size - sizeof(tga_header) - header->idLength;
+   datasize = size - sizeof(tga_header) - header->idLength;
    if (footer_present)
-     datasize = ss.st_size - sizeof(tga_header) - header->idLength - 
+     datasize = size - sizeof(tga_header) - header->idLength - 
      sizeof(tga_footer);
    
    bufptr = filedata + header->idLength;
@@ -457,15 +450,15 @@ evas_image_load_file_data_tga(Image_Entry *ie, const char *file, const char *key
      }
    
    evas_common_image_premul(ie);
-   
-   if (seg != MAP_FAILED) munmap(seg, ss.st_size);
-   close(fd);
+
+   eina_file_map_free(f, seg);
+   eina_file_close(f);
    *error = EVAS_LOAD_ERROR_NONE;
    return EINA_TRUE;
 
 close_file:
-   if (seg != MAP_FAILED) munmap(seg, ss.st_size);
-   close(fd);
+   if (seg != NULL) eina_file_map_free(f, seg);
+   eina_file_close(f);
    return EINA_FALSE;
 }
 
diff --git a/src/modules/loaders/tiff/.cvsignore b/src/modules/loaders/tiff/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index b1aa818..f617c5e 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @evas_image_loader_tiff_cflags@ \
 @EVIL_CFLAGS@ \
index 4c5b9c1..270afbb 100644 (file)
@@ -40,99 +40,12 @@ typedef struct TIFFRGBAImage_Extra TIFFRGBAImage_Extra;
 
 struct TIFFRGBAImage_Extra {
    TIFFRGBAImage       rgba;
-   tileContigRoutine   put_contig;
-   tileSeparateRoutine put_separate;
    Image_Entry        *image;
    char                pper;
    uint32              num_pixels;
    uint32              py;
 };
 
-static void put_contig_and_raster(TIFFRGBAImage *, uint32 *,
-                                  uint32, uint32, uint32, uint32, int32,
-                                  int32, unsigned char *);
-static void put_separate_and_raster(TIFFRGBAImage *, uint32 *, uint32,
-                                    uint32, uint32, uint32, int32,
-                                    int32, unsigned char *,
-                                    unsigned char *, unsigned char *,
-                                    unsigned char *);
-static void raster(TIFFRGBAImage_Extra * img, uint32 * raster, uint32 x,
-                   uint32 y, uint32 w, uint32 h);
-
-
-static void
-put_contig_and_raster(TIFFRGBAImage * img, uint32 * rast,
-                      uint32 x, uint32 y, uint32 w, uint32 h,
-                      int32 fromskew, int32 toskew, unsigned char *cp)
-{
-   (*(((TIFFRGBAImage_Extra *) img)->put_contig)) (img, rast, x, y, w, h,
-                                                   fromskew, toskew, cp);
-   raster((TIFFRGBAImage_Extra *) img, rast, x, y, w, h);
-}
-
-static void
-put_separate_and_raster(TIFFRGBAImage * img, uint32 * rast,
-                        uint32 x, uint32 y, uint32 w, uint32 h,
-                        int32 fromskew, int32 toskew,
-                        unsigned char *r, unsigned char *g, unsigned char *b,
-                        unsigned char *a)
-{
-   (*(((TIFFRGBAImage_Extra *) img)->put_separate))
-       (img, rast, x, y, w, h, fromskew, toskew, r, g, b, a);
-   raster((TIFFRGBAImage_Extra *) img, rast, x, y, w, h);
-}
-
-/* needs orientation code */
-
-static void
-raster(TIFFRGBAImage_Extra * img, uint32 * rast,
-       uint32 x, uint32 y, uint32 w, uint32 h)
-{
-   unsigned int        image_width, image_height;
-   uint32             *pixel, pixel_value;
-   int                 i, dy, rast_offset;
-   DATA32             *buffer_pixel, *buffer = evas_cache_image_pixels(img->image);
-   int                 alpha_premult = 0;
-
-   image_width = img->image->w;
-   image_height = img->image->h;
-
-   dy = h > y ? -1 : ((int)y - (int)h);
-
-   /* rast seems to point to the beginning of the last strip processed */
-   /* so you need use negative offsets. Bizzare. Someone please check this */
-   /* I don't understand why, but that seems to be what's going on. */
-   /* libtiff needs better docs! */
-
-   if (img->rgba.alpha == EXTRASAMPLE_UNASSALPHA)
-     alpha_premult = 1;
-   for (i = y, rast_offset = 0; i > dy; i--, rast_offset--)
-     {
-        unsigned int j;
-
-        pixel = rast + (rast_offset * image_width);
-        buffer_pixel = buffer + ((((image_height - 1) - i) * image_width) + x);
-
-        for (j = 0; j < w; j++)
-          {
-            unsigned int a, r, g, b;
-
-             pixel_value = (*(pixel++));
-            a = TIFFGetA(pixel_value);
-            r = TIFFGetR(pixel_value);
-            g = TIFFGetG(pixel_value);
-            b = TIFFGetB(pixel_value);
-            if (!alpha_premult && (a < 255))
-              {
-                 r = (r * (a + 1)) >> 8;
-                 g = (g * (a + 1)) >> 8;
-                 b = (b * (a + 1)) >> 8;
-              }
-             (*(buffer_pixel++)) = ARGB_JOIN(a, r, g, b);
-          }
-     }
-}
-
 static Eina_Bool
 evas_image_load_file_head_tiff(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error)
 {
@@ -225,7 +138,7 @@ evas_image_load_file_data_tiff(Image_Entry *ie, const char *file, const char *ke
    FILE               *ffile;
    uint32             *rast = NULL;
    uint32              num_pixels;
-   int                 fd;
+   int                 fd, x, y;
    uint16              magic_number;
 
    ffile = fopen(file, "rb");
@@ -313,33 +226,6 @@ evas_image_load_file_data_tiff(Image_Entry *ie, const char *file, const char *ke
        *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
        return EINA_FALSE;
      }
-
-   if (!rgba_image.rgba.put.any)
-     {
-       ERR("Evas Tiff loader: no put function");
-
-        _TIFFfree(rast);
-        TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image);
-        TIFFClose(tif);
-
-       *error = EVAS_LOAD_ERROR_GENERIC;
-       return EINA_FALSE;
-     }
-   else
-     {
-       if (rgba_image.rgba.isContig)
-         {
-            rgba_image.put_contig = rgba_image.rgba.put.contig;
-            rgba_image.rgba.put.contig = put_contig_and_raster;
-         }
-       else
-         {
-            rgba_image.put_separate = rgba_image.rgba.put.separate;
-            rgba_image.rgba.put.separate = put_separate_and_raster;
-         }
-     }
-
-   /*  if (rgba_image.rgba.samplesperpixel == 8)*/
    if (rgba_image.rgba.bitspersample == 8)
      {
         if (!TIFFRGBAImageGet((TIFFRGBAImage *) &rgba_image, rast,
@@ -356,6 +242,36 @@ evas_image_load_file_data_tiff(Image_Entry *ie, const char *file, const char *ke
      {
         INF("channel bits == %i", (int)rgba_image.rgba.samplesperpixel);
      }
+   /* process rast -> image rgba. really same as prior code anyway just simpler */
+   for (y = 0; y < (int)ie->h; y++)
+     {
+        DATA32 *pix, *pd;
+        uint32 *ps, pixel;
+        unsigned int a, r, g, b;
+        
+        pix = evas_cache_image_pixels(ie);
+        pd = pix + ((ie->h - y - 1) * ie->w);
+        ps = rast + (y * ie->w);
+        for (x = 0; x < (int)ie->w; x++)
+          {
+             pixel = *ps;
+             a = TIFFGetA(pixel);
+             r = TIFFGetR(pixel);
+             g = TIFFGetG(pixel);
+             b = TIFFGetB(pixel);
+             if (!ie->flags.alpha) a = 255;
+             if ((rgba_image.rgba.alpha == EXTRASAMPLE_UNASSALPHA) &&
+                 (a < 255))
+               {
+                  r = (r * (a + 1)) >> 8;
+                  g = (g * (a + 1)) >> 8;
+                  b = (b * (a + 1)) >> 8;
+               }
+             *pd = ARGB_JOIN(a, r, g, b);
+             ps++;
+             pd++;
+          }
+     }
 
    _TIFFfree(rast);
 
index 577d42e..eed287a 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @EVIL_CFLAGS@ \
 @WIN32_CPPFLAGS@
diff --git a/src/modules/loaders/xpm/.cvsignore b/src/modules/loaders/xpm/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index de81294..b8cb1fa 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @evas_image_loader_xpm_cflags@ \
 @EVIL_CFLAGS@ \
diff --git a/src/modules/savers/.cvsignore b/src/modules/savers/.cvsignore
deleted file mode 100644 (file)
index 282522d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/src/modules/savers/edb/.cvsignore b/src/modules/savers/edb/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index e273d9b..4614cec 100644 (file)
@@ -4,7 +4,7 @@ MAINTAINERCLEANFILES = Makefile.in
 AM_CPPFLAGS           = -I. \
                         -I$(top_srcdir)/src/lib \
                         -I$(top_srcdir)/src/lib/include \
-                        @FREETYPE_CFLAGS@ @evas_image_loader_edb_cflags@ \
+                        @FREETYPE_CFLAGS@ @PIXMAN_CFLAGS@ @evas_image_loader_edb_cflags@ \
                         @EINA_CFLAGS@
 
 if BUILD_LOADER_EDB
diff --git a/src/modules/savers/eet/.cvsignore b/src/modules/savers/eet/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index 94f3a55..1c7f71c 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @evas_image_loader_eet_cflags@
 
diff --git a/src/modules/savers/jpeg/.cvsignore b/src/modules/savers/jpeg/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index 7d86faa..82a40ac 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS= \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @evas_image_loader_jpeg_cflags@
 
diff --git a/src/modules/savers/png/.cvsignore b/src/modules/savers/png/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index b9d9cd5..1429f2e 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @evas_image_loader_png_cflags@ \
 @EVIL_CFLAGS@ \
index decc14d..734890c 100644 (file)
@@ -29,7 +29,7 @@ static Evas_Image_Save_Func evas_image_save_png_func =
 };
 
 static int
-save_image_png(RGBA_Image *im, const char *file, int compress, int interlace)
+save_image_png(RGBA_Image *im, const char *file, int do_compress, int interlace)
 {
    FILE               *f;
    png_structp         png_ptr;
@@ -110,7 +110,7 @@ save_image_png(RGBA_Image *im, const char *file, int compress, int interlace)
    sig_bit.alpha = 8;
    png_set_sBIT(png_ptr, info_ptr, &sig_bit);
 
-   png_set_compression_level(png_ptr, compress);
+   png_set_compression_level(png_ptr, do_compress);
    png_write_info(png_ptr, info_ptr);
    png_set_shift(png_ptr, &sig_bit);
    png_set_packing(png_ptr);
@@ -155,9 +155,10 @@ save_image_png(RGBA_Image *im, const char *file, int compress, int interlace)
    return 0;
 }
 
-static int evas_image_save_file_png(RGBA_Image *im, const char *file, const char *key __UNUSED__, int quality __UNUSED__, int compress)
+static int 
+evas_image_save_file_png(RGBA_Image *im, const char *file, const char *key __UNUSED__, int quality __UNUSED__, int do_compress)
 {
-   return save_image_png(im, file, compress, 0);
+   return save_image_png(im, file, do_compress, 0);
 }
 
 static int
diff --git a/src/modules/savers/tiff/.cvsignore b/src/modules/savers/tiff/.cvsignore
deleted file mode 100644 (file)
index a51c966..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
\ No newline at end of file
index c754c0b..6d58d26 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib \
 -I$(top_srcdir)/src/lib/include \
 @FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
 @EINA_CFLAGS@ \
 @evas_image_loader_tiff_cflags@
 
diff --git a/src/static_deps/Makefile.am b/src/static_deps/Makefile.am
new file mode 100644 (file)
index 0000000..08a0f5b
--- /dev/null
@@ -0,0 +1,7 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS =
+
+if EVAS_USE_LINEBREAK
+SUBDIRS += liblinebreak
+endif
diff --git a/src/static_deps/liblinebreak/AUTHORS b/src/static_deps/liblinebreak/AUTHORS
new file mode 100644 (file)
index 0000000..523106f
--- /dev/null
@@ -0,0 +1,6 @@
+Wu Yongwei.  Designed and implemented liblinebreak.
+
+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.
diff --git a/src/static_deps/liblinebreak/ChangeLog b/src/static_deps/liblinebreak/ChangeLog
new file mode 100644 (file)
index 0000000..8255c10
--- /dev/null
@@ -0,0 +1,397 @@
+2010-01-03  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * LICENCE: Update the copyright year.
+
+2010-01-03  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * NEWS: Add information about the 2.0 release.
+
+2010-01-03  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * Doxyfile (PROJECT_NUMBER): Set to `2.0'.
+       (HAVE_DOT): Set to `YES'.
+
+2010-01-03  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * linebreak.c: Update the version number in comment to 2.0.
+       * linebreak.h: Ditto.
+       * linebreakdef.c: Ditto.
+       * linebreakdef.h: Ditto.
+
+2009-12-17  Wu Yongwei  <wuyongwei@gmail.com>
+
+       Change the values of enum BreakAction to the same length.
+       * linebreak.c (DIRECT_BRK): Rename to DIR_BRK.
+       (INDIRECT_BRK): Rename to IND_BRK.
+       (CM_INDIRECT_BRK): Rename to CMI_BRK.
+       (CM_PROHIBITED_BRK): Rename to CMP_BRK.
+       (PROHIBITED_BRK): Rename to PRH_BRK.
+
+2009-11-29  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * Doxyfile (TAB_SIZE): Set to the correct size `4', as used in the
+       source files.
+
+2009-11-29  Wu Yongwei  <wuyongwei@gmail.com>
+
+       Update files according to UAX #14-24, for Unicode 5.2.0.
+       * linebreak.c: Update comments about UAX #14.
+       * linebreak.h: Ditto.
+       * linebreakdef.c: Ditto.
+       * linebreakdef.h: Ditto.
+       (LBP_CP): New enumerator for the new `CP' class as defined in
+       UAX #14-24.
+       * linebreak.c (baTable): Update for the new class `CP'.
+       * linebreakdata.c: Regenerate from LineBreak-5.2.0.txt.
+       * README: Update the reference to UAX #14-24, for Unicode 5.2.0.
+
+2009-05-03  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * NEWS: Add information about the 1.2 release.
+
+2009-04-30  Wu Yongwei  <wuyongwei@gmail.com>
+
+       Optimize the Doxygen output.
+       * linebreak.c (lb_prop_index): Adjust its definition format
+       slightly.
+
+2009-04-30  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * Doxyfile (USE_WINDOWS_ENCODING): Remove obsolete tag.
+       (DETAILS_AT_TOP): Ditto.
+       (MAX_DOT_GRAPH_WIDTH): Ditto.
+       (MAX_DOT_GRAPH_HEIGHT): Ditto.
+       (REFERENCED_BY_RELATION): Set to `NO'.
+       (REFERENCES_RELATION): Ditto.
+       (EXCLUDE): Add `filter_dup.c'.
+
+2009-04-28  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * linebreak.c (lb_get_next_char_utf8): Fix the issue that the index
+       can point to the middle of a UTF-8 sequence if End of String (EOS)
+       is encountered prematurely (thanks to Nikolay Pultsin and Rick Xu).
+       (lb_get_next_char_utf16): Fix the issue that the index can point to
+       the middle of a UTF-16 surrogate pair if EOS is encountered
+       prematurely.
+
+2009-04-20  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * linebreakdef.c (lb_prop_English): Remove the specialization of
+       right single quotation mark as closing punctuation mark, because it
+       can be used as apostrophe.
+       (lb_prop_Spanish): Ditto.
+       (lb_prop_French): Ditto.
+
+2009-04-09  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * Makefile.msvc: Make the `clean' target work on MSVC versions other
+       than 6.0; do not use precompiled header.
+
+2009-03-07  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * linebreak.h: Correct the wrong date in the documentation comment.
+       * linebreakdef.h: Ditto.
+
+2009-02-10  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * configure.ac (AC_INIT): Increase the version to 2.0.
+       * Makefile.am (liblinebreak_la_LDFLAGS): Set the version-info to
+       `2:0'.
+
+2009-02-10  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * linebreak.h (LINEBREAK_VERSION): New macro.
+       (linebreak_version): New global constant declaration.
+       * linebreak.c (linebreak_version): New global constant definition.
+
+2009-02-10  Wu Yongwei  <wuyongwei@gmail.com>
+
+       Reduce namespace pollution.
+       * linebreak.c (get_lb_prop_lang): Mark as static.
+       (get_next_char_utf8): Rename to lb_get_next_char_utf8.
+       (get_next_char_utf16): Rename to lb_get_next_char_utf32.
+       (get_next_char_utf32): Rename to lb_get_next_char_utf32.
+       (is_breakable): Rename to is_line_breakable.
+       * linebreak.h (get_next_char_utf8): Remove the function prototype
+       declaration.
+       (get_next_char_utf16): Ditto.
+       (get_next_char_utf32): Ditto.
+       (is_breakable): Rename to is_line_breakable.
+       * linebreakdef.h (lb_get_next_char_utf8): Add the function prototype
+       declaration.
+       (lb_get_next_char_utf16): Ditto.
+       (lb_get_next_char_utf32): Ditto.
+
+2009-02-06  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * NEWS: Add information about the 1.1 release.
+
+2009-01-02  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * Makefile.am (EXTRA_DIST): Add the missing `LICENCE' file.
+
+2008-12-31  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * linebreak.c: Update the version number in comment to 1.0.
+       * linebreak.h: Ditto.
+       * linebreakdef.c: Ditto.
+       * linebreakdef.h: Ditto.
+
+2008-12-31  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * NEWS: Update for the 1.0 release.
+
+2008-12-31  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * README: Correct two typos.
+
+2008-12-31  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * README: Add the online URL reference.
+
+2008-12-30  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * README: Update the reference to UAX #14-22, for Unicode 5.1.0.
+
+2008-12-13  Wu Yongwei  <wuyongwei@gmail.com>
+
+       Update files according to UAX #14-22, for Unicode 5.1.0.
+       * linebreak.c (baTable): Update according to Table 2 of UAX #14-22.
+       * linebreakdef.c (lb_prop_Spanish): Remove the unnecessary
+       customization for inverted marks in Spanish.
+       * linebreakdata.c: Regenerate from LineBreak-5.1.0.txt.
+       * linebreak.h: Update comment only.
+       * linebreakdef.h: Ditto.
+
+2008-12-12  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * README: Update for the new build methods and better readability.
+
+2008-12-12  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * Makefile.msvc: Correct the inconsistent naming in the output
+       message.
+
+2008-12-12  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * configure.ac (AM_INIT_AUTOMAKE): Mark `foreign'.
+       * bootstrap: New file.
+       * purge: New file.
+       * Makefile.gcc (purge): Remove this target.
+
+2008-12-10  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * NEWS: New file.
+
+2008-12-10  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * AUTHORS: New file.
+
+2008-12-10  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * Makefile.gcc (purge): New phony target to purge files generated by
+       autoconfiscation.
+
+2008-12-10  Thomas Klausner  <tk@giga.or.at>
+
+       * configure.ac: New file.
+       * Makefile.am: New file.
+
+2008-12-10  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * Doxyfile (OUTPUT_DIRECTORY): Set to `doc'.
+       (ALPHABETICAL_INDEX): Set to `YES'.
+
+2008-12-09  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * Makefile.msvc: New file.
+
+2008-12-09  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * Makefile: Remove (to become Makefile.gcc).
+       * Makefile.gcc: New file (was Makefile).
+
+2008-12-07  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * linebreak.c: Adjust the comment that refers to Unicode Annex 14.
+       * linebreak.h: Ditto.
+       * linebreakdef.c: Ditto.
+       * linebreakdef.h: Ditto.
+
+2008-12-07  Wu Yongwei  <wuyongwei@gmail.com>
+
+       Use only POSIX basic regexp to ensure maximum portability (issues
+       have been found on Mac OS X, where GNU extensions do not work).
+       * LineBreak1.sed: Replace `[:xdigit:]' with `0-9A-F', and `\+' with
+       `\{1,\}'.
+       * LineBreak2.sed: Ditto.
+
+2008-12-07  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * Makefile: Replace `*.exe' with `filter_dup$(EXEEXT)', since the
+       extension `.exe' is specific to Windows.
+
+2008-04-20  Wu Yongwei  <wuyongwei@gmail.com>
+
+       Add README and LICENCE files, as well as a Doxyfile to generate
+       documents.
+       * README: New file.
+       * LICENCE: New file.
+       * Doxyfile: New file.
+       * Makefile (doc): Add new phony target.
+
+2008-04-04  Wu Yongwei  <wuyongwei@gmail.com>
+
+       Remove the English override for plus sign: it is better treated in
+       the text breaking program (see ../breaktext/ for an example).
+       * linebreakdef.c (lb_prop_English): Remove the line for plus sign.
+
+2008-03-29  Wu Yongwei <wuyongwei@gmail.com>
+
+       * Makefile: Correct the dependency-making rules when OLDGCC=Y.
+
+2008-03-23  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * Makefile (clean): Do not remove *.exe and tags here.
+       (distclean): Remove *.exe and tags.
+
+2008-03-23  Wu Yongwei  <wuyongwei@gmail.com>
+
+       Remove the English override for solidus: it is better treated in the
+       text breaking program (see ../breaktext/ for an example).
+       * linebreakdef.c (lb_prop_English): Remove the line for solidus.
+
+2008-03-16  Wu Yongwei  <wuyongwei@gmail.com>
+
+       Rename init_linebreak_prop_index to init_linebreak for future
+       safety; make visible certain functions that are potentially useful.
+       * linebreak.c (init_linebreak_prop_index): Rename to init_linebreak.
+       (get_next_char_t): Move to linebreakdef.h.
+       (get_next_char_utf8): Make non-static.
+       (get_next_char_utf16): Ditto.
+       (get_next_char_utf32): Ditto.
+       (set_linebreaks): Ditto.
+       * linebreak.h (init_linebreak_prop_index): Rename to init_linebreak.
+       (get_next_char_utf8): Add the function prototype.
+       (get_next_char_utf16): Ditto.
+       (get_next_char_utf32): Ditto.
+       * linebreakdef.h (get_next_char_t): Add the typedef.
+       (set_linebreaks): Add the function prototype.
+
+2008-03-16  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * Makefile (OLDGCC): Add support for GCC 2.95.3 (when OLDGCC=Y).
+
+2008-03-15  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * linebreak.c (set_linebreaks): Fix a bug that `==' was wrongly used
+       for `='.
+
+2008-03-05  Wu Yongwei  <wuyongwei@gmail.com>
+
+       Improve the performance by reducing the look-ups of the
+       language-specific line breaking properties array from the language
+       name (thanks to Nikolay Pultsin).
+       * linebreak.c (get_lb_prop_lang): New function.
+       (get_char_lb_class_lang): Change the second parameter from the
+       language name to the line breaking properties array.
+       (set_linebreaks): Look up the language-specific line breaking
+       properties array from the language name only once in one function
+       call.
+
+2008-03-03  Wu Yongwei  <wuyongwei@gmail.com>
+
+       Make minor adjustments in code and comments.
+       * linebreak.c: Adjust the doc comments.
+       (init_linebreak_prop_index): Modify a conditional to make it more
+       robust and consistent.
+       * linebreakdef.c (lb_prop_lang_map): Replace the pointer
+       lb_prop_default with NULL, since the value is never used.
+
+2008-03-03  Wu Yongwei  <wuyongwei@gmail.com>
+
+       Accelerate get_char_lb_class for invalid Unicode code points.
+       * linebreak.c (get_char_lb_class): Adjust the conditionals so that
+       getting the line breaking class for an invalid code point is much
+       faster, which requires the array of line breaking properties be
+       sorted.
+       * linebreakdef.h: Adjust a comment that the array of line break
+       properties must be sorted.
+
+2008-03-02  Wu Yongwei  <wuyongwei@gmail.com>
+
+       Change the values of enum BreakAction to more complete forms.
+       * linebreak.c (INDRCT_BRK): Rename to INDIRECT_BRK.
+       (CM_INDRCT_BRK): Rename to CM_INDIRECT_BRK.
+       (CM_PROHIBTD_BRK): Rename to CM_PROHIBITED_BRK.
+       (PROHIBTD_BRK): Rename to PROHIBITED_BRK.
+
+2008-03-02  Wu Yongwei  <wuyongwei@gmail.com>
+
+       Implement a two-stage search in get_char_lb_class_default to
+       accelerate the overall performance, especially for non-Latin
+       languages.
+       * linebreak.c (LINEBREAK_INDEX_SIZE): New constant macro.
+       (struct LineBreakPropertiesIndex): New struct.
+       (lb_prop_index): New static variable.
+       (init_linebreak_prop_index): New function.
+       (get_char_lb_class_default): New function.
+       (get_char_lb_class_lang): Use get_char_lb_class_default.
+       * linebreak.h: Detect C++ and add extern "C" guard if necessary.
+       (init_linebreak_prop_index): Add the prototype declaration.
+       * linebreakdef.h: Adjust a comment.
+
+2008-03-02  Wu Yongwei  <wuyongwei@gmail.com>
+
+       Split/refactor the code; add (doc) comments.
+       * Makefile (CFILES): Add linebreakdata.c and linebreakdef.c.
+       * linebreak.c: Add and adjust comments.
+       (linebreakdef.h): Add include file.
+       (linebreakdata.c): Remove include file.
+       (EOS): Remove (now in linebreakdef.h).
+       (enum LineBreakClass): Ditto.
+       (struct LineBreakProperties): Ditto.
+       (lbpEnglish): Remove (now in linebreakdef.c as lb_prop_English).
+       (lbpGerman): Remove (now in linebreakdef.c as lb_prop_German).
+       (lbpSpanish): Remove (now in linebreakdef.c as lb_prop_Spanish).
+       (lbpFrench): Remove (now in linebreakdef.c as lb_prop_French).
+       (lbpRussian): Remove (now in linebreakdef.c as lb_prop_Russian).
+       (lbpChinese): Remove (now in linebreakdef.c as lb_prop_Chinese).
+       (struct LineBreakPropertiesLang): Remove (now in linebreakdef.h).
+       (lbpLangs): Remove (now in linebreakdef.c as lb_prop_lang_map).
+       (get_next_char_utf16): Make sure memory access not go beyond len.
+       * linebreak.h: Add copyright information and adjust comments.
+       (stddef.h): Add include file.
+       * linebreakdata.c (linebreak.h): Add include file.
+       (linebreakdef.h): Add include file.
+       (lbpDefault): Make global and rename to lb_prop_default.
+       * linebreakdata2.tmpl: Add two include files, a comment line, and
+       remove `static'.
+       * linebreakdef.c: New file.
+       * linebreakdef.h: New file.
+
+2008-02-26  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * linebreak.c (lbpSpanish): New array for Spanish-specific data.
+       (lbpLangs): Update the index array for Spanish.
+       (resolve_lb_class): Resolve AmbIguous class to IDeographic in
+       Chinese, Japanese, and Korean.
+
+2008-02-26  Wu Yongwei  <wuyongwei@gmail.com>
+
+       * Makefile (LineBreak.txt): Add new rule to retrieve it from the Web
+       if it is not already there.
+
+2008-02-23  Wu Yongwei  <wuyongwei@gmail.com>
+
+       Add files for linebreak.
+       * LineBreak1.sed: New file.
+       * LineBreak2.sed: New file.
+       * Makefile: New file.
+       * filter_dup.c: New file.
+       * linebreak.c: New file.
+       * linebreak.h: New file.
+       * linebreakdata.c: New file.
+       * linebreakdata1.tmpl: New file.
+       * linebreakdata2.tmpl: New file.
+       * linebreakdata3.tmpl: New file.
diff --git a/src/static_deps/liblinebreak/LICENCE b/src/static_deps/liblinebreak/LICENCE
new file mode 100644 (file)
index 0000000..9b9984f
--- /dev/null
@@ -0,0 +1,18 @@
+Copyright (C) 2008-2010 Wu Yongwei <wuyongwei at gmail dot com>
+
+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.
diff --git a/src/static_deps/liblinebreak/LineBreak1.sed b/src/static_deps/liblinebreak/LineBreak1.sed
new file mode 100644 (file)
index 0000000..1be9651
--- /dev/null
@@ -0,0 +1 @@
+s/\(^[0-9A-F.]\{1,\};[A-Z][A-Z0-9]\) #.*/\1/p
diff --git a/src/static_deps/liblinebreak/LineBreak2.sed b/src/static_deps/liblinebreak/LineBreak2.sed
new file mode 100644 (file)
index 0000000..8165958
--- /dev/null
@@ -0,0 +1,2 @@
+s/^\([0-9A-F]\{1,\}\);/\1..\1;/
+s/^\([0-9A-F]\{1,\}\)\.\.\([0-9A-F]\{1,\}\);\([A-Z][A-Z0-9]\)/ { 0x\1, 0x\2, LBP_\3 },/
diff --git a/src/static_deps/liblinebreak/Makefile.am b/src/static_deps/liblinebreak/Makefile.am
new file mode 100644 (file)
index 0000000..eec08fa
--- /dev/null
@@ -0,0 +1,16 @@
+#noinst_PROGRAMS = filter_dup
+noinst_HEADERS = linebreak.h linebreakdef.h
+noinst_LTLIBRARIES = liblinebreak.la
+
+liblinebreak_la_SOURCES = \
+       linebreak.c \
+       linebreakdata.c \
+       linebreakdef.c
+
+EXTRA_DIST = \
+       LineBreak1.sed \
+       LineBreak2.sed \
+       linebreakdata1.tmpl \
+       linebreakdata2.tmpl \
+       linebreakdata3.tmpl \
+       LICENCE
diff --git a/src/static_deps/liblinebreak/NEWS b/src/static_deps/liblinebreak/NEWS
new file mode 100644 (file)
index 0000000..4c55521
--- /dev/null
@@ -0,0 +1,37 @@
+New in 2.0
+
+- Update the algorithm and data according to UAX #14-24 and
+  LineBreak-5.2.0.txt
+- Rename some functions to reduce namespace pollution
+- Make Doxygen documentation better
+
+New in 1.2
+
+- Fix the bug that an assertion in code can fail if an invalid UTF-8 or
+  UTF-16 sequence is encountered near the end of input
+- Remove the specialization of right single quotation mark as closing
+  punctuation mark in English, French, and Spanish, because it can be
+  used as apostrophe
+- Make Doxygen documentation better
+
+New in 1.1
+
+- Make get_lb_prop_lang static and not an exported symbol
+- Define is_line_breakable to alias to is_breakable
+- Declare get_next_char_utf* will be changed to lb_get_next_char_utf*
+- Move the declarations of get_next_char_utf* from linebreak.h to
+  linebreakdef.h
+- Add the function documentation comments to the header files
+
+New in 1.0
+
+- Update the line breaking data according to UAX #14-22 and
+  LineBreak-5.1.0.txt
+- Add autoconfiscation support (./configure, make, make install)
+- Add Makefile for MSVC
+
+First public release (0.9.6, or 20080421)
+
+- Implement line breaking algorithm according to UAX #14-19
+- Line breaking data is generated from LineBreak-5.0.0.txt
+- Makefile only supports GCC
diff --git a/src/static_deps/liblinebreak/README b/src/static_deps/liblinebreak/README
new file mode 100644 (file)
index 0000000..9d23651
--- /dev/null
@@ -0,0 +1,86 @@
+NOTICE: This is the original version, that was adapted a bit (mostly
+              build related) in order to work nicely with Evas.
+
+
+                        L I B L I N E B R E A K
+                        =======================
+
+Overview
+--------
+
+This is the README file for liblinebreak, an implementation of the line
+breaking algorithm as described in Unicode 5.2.0 Standard Annex 14,
+Revision 24, available at
+         <URL:http://www.unicode.org/reports/tr14/tr14-24.html>
+
+Check this URL for up-to-date information:
+         <URL:http://vimgadgets.sourceforge.net/liblinebreak/>
+
+
+Licence
+-------
+
+This library is released under an open-source licence, the zlib/libpng
+licence.  Please check the file LICENCE for details.
+
+Apart from using the algorithm, part of the code is derived from the
+data provided under
+                  <URL:http://www.unicode.org/Public/>
+
+And the Unicode Terms of Use may apply:
+              <URL:http://www.unicode.org/copyright.html>
+
+
+Installation
+------------
+
+There are three ways to build the library:
+
+1) On *NIX systems supported by the autoconfiscation tools, do the
+   normal
+
+     ./configure
+     make
+     sudo make install
+
+   to build and install both the dynamic and static libraries.  In
+   addition, one may
+
+   - type `make doc' to generate the doxygen documentation; or
+   - type `make linebreakdata' to regenerate linebreakdata.c from
+     LineBreak.txt.
+
+2) On systems where GCC and Binutils are supported, one can type
+
+     cp -p Makefile.gcc Makefile
+     make
+
+   to build the static library.  In addition, one may
+
+   - type `make debug' or `make release' to explicitly generate the
+     debug or release build;
+   - type `make doc' to generate the doxygen documentation; or
+   - type `make linebreakdata' to regenerate linebreakdata.c from
+     LineBreak.txt.
+
+3) On Windows, apart from using method 1 (Cygwin/MSYS) and method 2
+   (MinGW), MSVC can also be used.  Type
+
+     nmake -f Makefile.msvc
+
+   to build the static library.  By default the debug release is built.
+   To build the release version
+
+     nmake -f Makefile.msvc CFG="linebreak - Win32 Release"
+
+
+Documentation
+-------------
+
+Check the generated document doc/html/linebreak_8h.html for the public
+interfaces exposed to applications.
+
+
+$Id: README,v 1.6 2009/11/29 08:09:13 adah Exp $
+
+vim:autoindent:expandtab:formatoptions=tcqlmn:textwidth=72:
diff --git a/src/static_deps/liblinebreak/filter_dup.c b/src/static_deps/liblinebreak/filter_dup.c
new file mode 100644 (file)
index 0000000..1d1d793
--- /dev/null
@@ -0,0 +1,48 @@
+#include <stdio.h>
+#include <string.h>
+
+int main()
+{
+        char s[80];
+        char beg[16];
+        char end[16];
+        char prop[16];
+        char lastbeg[16];
+        char lastend[16];
+        char lastprop[16];
+        lastprop[0] = 0;
+        for (;;)
+        {
+                if (fgets(s, sizeof s, stdin) == NULL)
+                        break;
+                if (strstr(s, "LBP_") == NULL || strstr(s, "LBP_Undef") != NULL)
+                {
+                        if (lastprop[0])
+                        {
+                                printf("\t{ %s %s %s },\n", lastbeg, lastend, lastprop);
+                                lastprop[0] = 0;
+                        }
+                        printf("%s", s);
+                        continue;
+                }
+                sscanf(s, "\t{ %s %s %s }", beg, end, prop);
+                /*printf("==>\t{ \"%s\" \"%s\" \"%s\" },\n", beg, end, prop);*/
+                if (lastprop[0] && strcmp(lastprop, prop) != 0)
+                {
+                        printf("\t{ %s %s %s },\n", lastbeg, lastend, lastprop);
+                        lastprop[0] = 0;
+                }
+                if (lastprop[0] == 0)
+                {
+                        strcpy(lastbeg, beg);
+                        strcpy(lastprop, prop);
+                }
+                strcpy(lastend, end);
+        }
+        if (lastprop[0])
+        {
+                printf("\t{ %s %s %s },\n", lastbeg, lastend, prop);
+        }
+        return 0;
+}
+
diff --git a/src/static_deps/liblinebreak/gen_linebreak_data.sh b/src/static_deps/liblinebreak/gen_linebreak_data.sh
new file mode 100755 (executable)
index 0000000..e396db2
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+if [ ! -f "LineBreak.txt" ]; then
+   wget http://unicode.org/Public/UNIDATA/LineBreak.txt
+fi
+
+sed -n -f LineBreak1.sed LineBreak.txt > tmp.txt
+sed -f LineBreak2.sed tmp.txt | ./filter_dup > tmp.c
+head -2 LineBreak.txt > tmp.txt
+cat linebreakdata1.tmpl tmp.txt linebreakdata2.tmpl tmp.c linebreakdata3.tmpl > linebreakdata.c
+rm tmp.txt tmp.c
+
diff --git a/src/static_deps/liblinebreak/linebreak.c b/src/static_deps/liblinebreak/linebreak.c
new file mode 100644 (file)
index 0000000..f9ff9a1
--- /dev/null
@@ -0,0 +1,737 @@
+/* vim: set tabstop=4 shiftwidth=4: */
+
+/*
+ * Line breaking in a Unicode sequence.  Designed to be used in a
+ * generic text renderer.
+ *
+ * Copyright (C) 2008-2010 Wu Yongwei <wuyongwei at gmail dot com>
+ *
+ * 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 14 (UAX #14):
+ *             <URL:http://www.unicode.org/reports/tr14/>
+ *
+ * When this library was designed, this annex was at Revision 19, for
+ * Unicode 5.0.0:
+ *             <URL:http://www.unicode.org/reports/tr14/tr14-19.html>
+ *
+ * This library has been updated according to Revision 24, for
+ * Unicode 5.2.0:
+ *             <URL:http://www.unicode.org/reports/tr14/tr14-24.html>
+ *
+ * The Unicode Terms of Use are available at
+ *             <URL:http://www.unicode.org/copyright.html>
+ */
+
+/**
+ * @file       linebreak.c
+ *
+ * Implementation of the line breaking algorithm as described in Unicode
+ * Standard Annex 14.
+ *
+ * @version    2.0, 2010/01/03
+ * @author     Wu Yongwei
+ */
+
+#include <assert.h>
+#include <stddef.h>
+#include <string.h>
+#include "linebreak.h"
+#include "linebreakdef.h"
+
+/**
+ * Size of the second-level index to the line breaking properties.
+ */
+#define LINEBREAK_INDEX_SIZE 40
+
+/**
+ * Version number of the library.
+ */
+const int linebreak_version = LINEBREAK_VERSION;
+
+/**
+ * Enumeration of break actions.  They are used in the break action
+ * pair table below.
+ */
+enum BreakAction
+{
+       DIR_BRK,                /**< Direct break opportunity */
+       IND_BRK,                /**< Indirect break opportunity */
+       CMI_BRK,                /**< Indirect break opportunity for combining marks */
+       CMP_BRK,                /**< Prohibited break for combining marks */
+       PRH_BRK                 /**< Prohibited break */
+};
+
+/**
+ * Break action pair table.  This is a direct mapping of Table 2 of
+ * Unicode Standard Annex 14, Revision 24.
+ */
+static enum BreakAction baTable[LBP_JT][LBP_JT] = {
+       {       /* OP */
+               PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, CMP_BRK,
+               PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK },
+       {       /* CL */
+               DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK,
+               DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK },
+       {       /* CP */
+               DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK,
+               DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK },
+       {       /* QU */
+               PRH_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK,
+               IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK },
+       {       /* GL */
+               IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK,
+               IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK },
+       {       /* NS */
+               DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK,
+               DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK },
+       {       /* EX */
+               DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK,
+               DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK },
+       {       /* SY */
+               DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK,
+               DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK },
+       {       /* IS */
+               DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK,
+               DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK },
+       {       /* PR */
+               IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, IND_BRK,
+               DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK },
+       {       /* PO */
+               IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK,
+               DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK },
+       {       /* NU */
+               IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK,
+               IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK },
+       {       /* AL */
+               IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK,
+               IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK },
+       {       /* ID */
+               DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK,
+               IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK },
+       {       /* IN */
+               DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK,
+               IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK },
+       {       /* HY */
+               DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, DIR_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK,
+               DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK },
+       {       /* BA */
+               DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, DIR_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK,
+               DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK },
+       {       /* BB */
+               IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK,
+               IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK },
+       {       /* B2 */
+               DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK,
+               DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, PRH_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK },
+       {       /* ZW */
+               DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK,
+               DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK,
+               DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, PRH_BRK, DIR_BRK,
+               DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK },
+       {       /* CM */
+               IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK,
+               IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK },
+       {       /* WJ */
+               IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK,
+               IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK },
+       {       /* H2 */
+               DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK,
+               IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK },
+       {       /* H3 */
+               DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK,
+               IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK },
+       {       /* JL */
+               DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK,
+               IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK },
+       {       /* JV */
+               DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK,
+               IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK },
+       {       /* JT */
+               DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK,
+               PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK,
+               IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK,
+               PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK }
+};
+
+/**
+ * Struct for the second-level index to the line breaking properties.
+ */
+struct LineBreakPropertiesIndex
+{
+       utf32_t end;                                    /**< End coding point */
+       struct LineBreakProperties *lbp;/**< Pointer to line breaking properties */
+};
+
+/**
+ * Second-level index to the line breaking properties.
+ */
+static struct LineBreakPropertiesIndex lb_prop_index[LINEBREAK_INDEX_SIZE] =
+{
+       { 0xFFFFFFFF, lb_prop_default }
+};
+
+/**
+ * Initializes the second-level index to the line breaking properties.
+ * If it is not called, the performance of #get_char_lb_class_lang (and
+ * thus the main functionality) can be pretty bad, especially for big
+ * code points like those of Chinese.
+ */
+void init_linebreak(void)
+{
+       size_t i;
+       size_t iPropDefault;
+       size_t len;
+       size_t step;
+
+       len = 0;
+       while (lb_prop_default[len].prop != LBP_Undefined)
+               ++len;
+       step = len / LINEBREAK_INDEX_SIZE;
+       iPropDefault = 0;
+       for (i = 0; i < LINEBREAK_INDEX_SIZE; ++i)
+       {
+               lb_prop_index[i].lbp = lb_prop_default + iPropDefault;
+               iPropDefault += step;
+               lb_prop_index[i].end = lb_prop_default[iPropDefault].start - 1;
+       }
+       lb_prop_index[--i].end = 0xFFFFFFFF;
+}
+
+/**
+ * Gets the language-specific line breaking properties.
+ *
+ * @param lang language of the text
+ * @return             pointer to the language-specific line breaking
+ *                             properties array if found; \c NULL otherwise
+ */
+static struct LineBreakProperties *get_lb_prop_lang(const char *lang)
+{
+       struct LineBreakPropertiesLang *lbplIter;
+       if (lang != NULL)
+       {
+               for (lbplIter = lb_prop_lang_map; lbplIter->lang != NULL; ++lbplIter)
+               {
+                       if (strncmp(lang, lbplIter->lang, lbplIter->namelen) == 0)
+                       {
+                               return lbplIter->lbp;
+                       }
+               }
+       }
+       return NULL;
+}
+
+/**
+ * Gets the line breaking class of a character from a line breaking
+ * properties array.
+ *
+ * @param ch   character to check
+ * @param lbp  pointer to the line breaking properties array
+ * @return             the line breaking class if found; \c LBP_XX otherwise
+ */
+static enum LineBreakClass get_char_lb_class(
+               utf32_t ch,
+               struct LineBreakProperties *lbp)
+{
+       while (lbp->prop != LBP_Undefined && ch >= lbp->start)
+       {
+               if (ch <= lbp->end)
+                       return lbp->prop;
+               ++lbp;
+       }
+       return LBP_XX;
+}
+
+/**
+ * Gets the line breaking class of a character from the default line
+ * breaking properties array.
+ *
+ * @param ch   character to check
+ * @return             the line breaking class if found; \c LBP_XX otherwise
+ */
+static enum LineBreakClass get_char_lb_class_default(
+               utf32_t ch)
+{
+       size_t i = 0;
+       while (ch > lb_prop_index[i].end)
+               ++i;
+       assert(i < LINEBREAK_INDEX_SIZE);
+       return get_char_lb_class(ch, lb_prop_index[i].lbp);
+}
+
+/**
+ * Gets the line breaking class of a character for a specific
+ * language.  This function will check the language-specific data first,
+ * and then the default data if there is no language-specific property
+ * available for the character.
+ *
+ * @param ch           character to check
+ * @param lbpLang      pointer to the language-specific line breaking
+ *                                     properties array
+ * @return                     the line breaking class if found; \c LBP_XX
+ *                                     otherwise
+ */
+static enum LineBreakClass get_char_lb_class_lang(
+               utf32_t ch,
+               struct LineBreakProperties *lbpLang)
+{
+       enum LineBreakClass lbcResult;
+
+       /* Find the language-specific line breaking class for a character */
+       if (lbpLang)
+       {
+               lbcResult = get_char_lb_class(ch, lbpLang);
+               if (lbcResult != LBP_XX)
+                       return lbcResult;
+       }
+
+       /* Find the generic language-specific line breaking class, if no
+        * language context is provided, or language-specific data are not
+        * available for the specific character in the specified language */
+       return get_char_lb_class_default(ch);
+}
+
+/**
+ * Resolves the line breaking class for certain ambiguous or complicated
+ * characters.  They are treated in a simplistic way in this
+ * implementation.
+ *
+ * @param lbc  line breaking class to resolve
+ * @param lang language of the text
+ * @return             the resolved line breaking class
+ */
+static enum LineBreakClass resolve_lb_class(
+               enum LineBreakClass lbc,
+               const char *lang)
+{
+       switch (lbc)
+       {
+       case LBP_AI:
+               if (lang != NULL &&
+                               (strncmp(lang, "zh", 2) == 0 || /* Chinese */
+                                strncmp(lang, "ja", 2) == 0 || /* Japanese */
+                                strncmp(lang, "ko", 2) == 0))  /* Korean */
+               {
+                       return LBP_ID;
+               }
+               /* Fall through */
+       case LBP_SA:
+       case LBP_SG:
+       case LBP_XX:
+               return LBP_AL;
+       default:
+               return lbc;
+       }
+}
+
+/**
+ * Gets the next Unicode character in a UTF-8 sequence.  The index will
+ * be advanced to the next complete character, unless the end of string
+ * is reached in the middle of a UTF-8 sequence.
+ *
+ * @param[in]     s            input UTF-8 string
+ * @param[in]     len  length of the string in bytes
+ * @param[in,out] ip   pointer to the index
+ * @return                             the Unicode character beginning at the index; or
+ *                                             #EOS if end of input is encountered
+ */
+utf32_t lb_get_next_char_utf8(
+               const utf8_t *s,
+               size_t len,
+               size_t *ip)
+{
+       utf8_t ch;
+       utf32_t res;
+
+       assert(*ip <= len);
+       if (*ip == len)
+               return EOS;
+       ch = s[*ip];
+
+       if (ch < 0xC2 || ch > 0xF4)
+       {       /* One-byte sequence, tail (should not occur), or invalid */
+               *ip += 1;
+               return ch;
+       }
+       else if (ch < 0xE0)
+       {       /* Two-byte sequence */
+               if (*ip + 2 > len)
+                       return EOS;
+               res = ((ch & 0x1F) << 6) + (s[*ip + 1] & 0x3F);
+               *ip += 2;
+               return res;
+       }
+       else if (ch < 0xF0)
+       {       /* Three-byte sequence */
+               if (*ip + 3 > len)
+                       return EOS;
+               res = ((ch & 0x0F) << 12) +
+                         ((s[*ip + 1] & 0x3F) << 6) +
+                         ((s[*ip + 2] & 0x3F));
+               *ip += 3;
+               return res;
+       }
+       else
+       {       /* Four-byte sequence */
+               if (*ip + 4 > len)
+                       return EOS;
+               res = ((ch & 0x07) << 18) +
+                         ((s[*ip + 1] & 0x3F) << 12) +
+                         ((s[*ip + 2] & 0x3F) << 6) +
+                         ((s[*ip + 3] & 0x3F));
+               *ip += 4;
+               return res;
+       }
+}
+
+/**
+ * Gets the next Unicode character in a UTF-16 sequence.  The index will
+ * be advanced to the next complete character, unless the end of string
+ * is reached in the middle of a UTF-16 surrogate pair.
+ *
+ * @param[in]     s            input UTF-16 string
+ * @param[in]     len  length of the string in words
+ * @param[in,out] ip   pointer to the index
+ * @return                             the Unicode character beginning at the index; or
+ *                                             #EOS if end of input is encountered
+ */
+utf32_t lb_get_next_char_utf16(
+               const utf16_t *s,
+               size_t len,
+               size_t *ip)
+{
+       utf16_t ch;
+
+       assert(*ip <= len);
+       if (*ip == len)
+               return EOS;
+       ch = s[(*ip)++];
+
+       if (ch < 0xD800 || ch > 0xDBFF)
+       {       /* If the character is not a high surrogate */
+               return ch;
+       }
+       if (*ip == len)
+       {       /* If the input ends here (an error) */
+               --(*ip);
+               return EOS;
+       }
+       if (s[*ip] < 0xDC00 || s[*ip] > 0xDFFF)
+       {       /* If the next character is not the low surrogate (an error) */
+               return ch;
+       }
+       /* Return the constructed character and advance the index again */
+       return (((utf32_t)ch & 0x3FF) << 10) + (s[(*ip)++] & 0x3FF) + 0x10000;
+}
+
+/**
+ * Gets the next Unicode character in a UTF-32 sequence.  The index will
+ * be advanced to the next character.
+ *
+ * @param[in]     s            input UTF-32 string
+ * @param[in]     len  length of the string in dwords
+ * @param[in,out] ip   pointer to the index
+ * @return                             the Unicode character beginning at the index; or
+ *                                             #EOS if end of input is encountered
+ */
+utf32_t lb_get_next_char_utf32(
+               const utf32_t *s,
+               size_t len,
+               size_t *ip)
+{
+       assert(*ip <= len);
+       if (*ip == len)
+               return EOS;
+       return s[(*ip)++];
+}
+
+/**
+ * Sets the line 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 #LINEBREAK_MUSTBREAK,
+ *                                                     #LINEBREAK_ALLOWBREAK, #LINEBREAK_NOBREAK,
+ *                                                     or #LINEBREAK_INSIDEACHAR
+ * @param[in] get_next_char    function to get the next UTF-32 character
+ */
+void set_linebreaks(
+               const void *s,
+               size_t len,
+               const char *lang,
+               char *brks,
+               get_next_char_t get_next_char)
+{
+       utf32_t ch;
+       enum LineBreakClass lbcCur;
+       enum LineBreakClass lbcNew;
+       enum LineBreakClass lbcLast;
+       struct LineBreakProperties *lbpLang;
+       size_t posCur = 0;
+       size_t posLast = 0;
+
+       --posLast;      /* To be ++'d later */
+       ch = get_next_char(s, len, &posCur);
+       if (ch == EOS)
+               return;
+       lbpLang = get_lb_prop_lang(lang);
+       lbcCur = resolve_lb_class(get_char_lb_class_lang(ch, lbpLang), lang);
+       lbcNew = LBP_Undefined;
+
+nextline:
+
+       /* Special treatment for the first character */
+       switch (lbcCur)
+       {
+       case LBP_LF:
+       case LBP_NL:
+               lbcCur = LBP_BK;
+               break;
+       case LBP_CB:
+               lbcCur = LBP_BA;
+               break;
+       case LBP_SP:
+               lbcCur = LBP_WJ;
+               break;
+       default:
+               break;
+       }
+
+       /* Process a line till an explicit break or end of string */
+       for (;;)
+       {
+               for (++posLast; posLast < posCur - 1; ++posLast)
+               {
+                       brks[posLast] = LINEBREAK_INSIDEACHAR;
+               }
+               assert(posLast == posCur - 1);
+               lbcLast = lbcNew;
+               ch = get_next_char(s, len, &posCur);
+               if (ch == EOS)
+                       break;
+               lbcNew = get_char_lb_class_lang(ch, lbpLang);
+               if (lbcCur == LBP_BK || (lbcCur == LBP_CR && lbcNew != LBP_LF))
+               {
+                       brks[posLast] = LINEBREAK_MUSTBREAK;
+                       lbcCur = resolve_lb_class(lbcNew, lang);
+                       goto nextline;
+               }
+
+               switch (lbcNew)
+               {
+               case LBP_SP:
+                       brks[posLast] = LINEBREAK_NOBREAK;
+                       continue;
+               case LBP_BK:
+               case LBP_LF:
+               case LBP_NL:
+                       brks[posLast] = LINEBREAK_NOBREAK;
+                       lbcCur = LBP_BK;
+                       continue;
+               case LBP_CR:
+                       brks[posLast] = LINEBREAK_NOBREAK;
+                       lbcCur = LBP_CR;
+                       continue;
+               case LBP_CB:
+                       brks[posLast] = LINEBREAK_ALLOWBREAK;
+                       lbcCur = LBP_BA;
+                       continue;
+               default:
+                       break;
+               }
+
+               lbcNew = resolve_lb_class(lbcNew, lang);
+
+               assert(lbcCur <= LBP_JT);
+               assert(lbcNew <= LBP_JT);
+               switch (baTable[lbcCur - 1][lbcNew - 1])
+               {
+               case DIR_BRK:
+                       brks[posLast] = LINEBREAK_ALLOWBREAK;
+                       break;
+               case CMI_BRK:
+               case IND_BRK:
+                       if (lbcLast == LBP_SP)
+                       {
+                               brks[posLast] = LINEBREAK_ALLOWBREAK;
+                       }
+                       else
+                       {
+                               brks[posLast] = LINEBREAK_NOBREAK;
+                       }
+                       break;
+               case CMP_BRK:
+                       brks[posLast] = LINEBREAK_NOBREAK;
+                       if (lbcLast != LBP_SP)
+                               continue;
+                       break;
+               case PRH_BRK:
+                       brks[posLast] = LINEBREAK_NOBREAK;
+                       break;
+               }
+
+               lbcCur = lbcNew;
+       }
+
+       assert(posLast == posCur - 1 && posCur <= len);
+       /* Break after the last character */
+       brks[posLast] = LINEBREAK_MUSTBREAK;
+       /* When the input contains incomplete sequences */
+       while (posCur < len)
+       {
+               brks[posCur++] = LINEBREAK_INSIDEACHAR;
+       }
+}
+
+/**
+ * Sets the line 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
+ *                                     #LINEBREAK_MUSTBREAK, #LINEBREAK_ALLOWBREAK,
+ *                                     #LINEBREAK_NOBREAK, or #LINEBREAK_INSIDEACHAR
+ */
+void set_linebreaks_utf8(
+               const utf8_t *s,
+               size_t len,
+               const char *lang,
+               char *brks)
+{
+       set_linebreaks(s, len, lang, brks,
+                                  (get_next_char_t)lb_get_next_char_utf8);
+}
+
+/**
+ * Sets the line 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
+ *                                     #LINEBREAK_MUSTBREAK, #LINEBREAK_ALLOWBREAK,
+ *                                     #LINEBREAK_NOBREAK, or #LINEBREAK_INSIDEACHAR
+ */
+void set_linebreaks_utf16(
+               const utf16_t *s,
+               size_t len,
+               const char *lang,
+               char *brks)
+{
+       set_linebreaks(s, len, lang, brks,
+                                  (get_next_char_t)lb_get_next_char_utf16);
+}
+
+/**
+ * Sets the line 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
+ *                                     #LINEBREAK_MUSTBREAK, #LINEBREAK_ALLOWBREAK,
+ *                                     #LINEBREAK_NOBREAK, or #LINEBREAK_INSIDEACHAR
+ */
+void set_linebreaks_utf32(
+               const utf32_t *s,
+               size_t len,
+               const char *lang,
+               char *brks)
+{
+       set_linebreaks(s, len, lang, brks,
+                                  (get_next_char_t)lb_get_next_char_utf32);
+}
+
+/**
+ * Tells whether a line break can occur between two Unicode characters.
+ * This is a wrapper function to expose a simple interface.  Generally
+ * speaking, it is better to use #set_linebreaks_utf32 instead, since
+ * complicated cases involving combining marks, spaces, etc. cannot be
+ * correctly processed.
+ *
+ * @param char1 the first Unicode character
+ * @param char2 the second Unicode character
+ * @param lang  language of the input
+ * @return      one of #LINEBREAK_MUSTBREAK, #LINEBREAK_ALLOWBREAK,
+ *                             #LINEBREAK_NOBREAK, or #LINEBREAK_INSIDEACHAR
+ */
+int is_line_breakable(
+               utf32_t char1,
+               utf32_t char2,
+               const char* lang)
+{
+       utf32_t s[2];
+       char brks[2];
+       s[0] = char1;
+       s[1] = char2;
+       set_linebreaks_utf32(s, 2, lang, brks);
+       return brks[0];
+}
diff --git a/src/static_deps/liblinebreak/linebreak.h b/src/static_deps/liblinebreak/linebreak.h
new file mode 100644 (file)
index 0000000..abc1ae9
--- /dev/null
@@ -0,0 +1,87 @@
+/* vim: set tabstop=4 shiftwidth=4: */
+
+/*
+ * Line breaking in a Unicode sequence.  Designed to be used in a
+ * generic text renderer.
+ *
+ * Copyright (C) 2008-2010 Wu Yongwei <wuyongwei at gmail dot com>
+ *
+ * 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 14 (UAX #14):
+ *             <URL:http://www.unicode.org/reports/tr14/>
+ *
+ * When this library was designed, this annex was at Revision 19, for
+ * Unicode 5.0.0:
+ *             <URL:http://www.unicode.org/reports/tr14/tr14-19.html>
+ *
+ * This library has been updated according to Revision 24, for
+ * Unicode 5.2.0:
+ *             <URL:http://www.unicode.org/reports/tr14/tr14-24.html>
+ *
+ * The Unicode Terms of Use are available at
+ *             <URL:http://www.unicode.org/copyright.html>
+ */
+
+/**
+ * @file       linebreak.h
+ *
+ * Header file for the line breaking algorithm.
+ *
+ * @version    2.0, 2010/01/03
+ * @author     Wu Yongwei
+ */
+
+#ifndef LINEBREAK_H
+#define LINEBREAK_H
+
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define LINEBREAK_VERSION      0x0200  /**< Version of the library linebreak */
+extern const int linebreak_version;
+
+#ifndef LINEBREAK_UTF_TYPES_DEFINED
+#define LINEBREAK_UTF_TYPES_DEFINED
+typedef unsigned char  utf8_t;         /**< Type for UTF-8 data points */
+typedef unsigned short utf16_t;        /**< Type for UTF-16 data points */
+typedef unsigned int   utf32_t;        /**< Type for UTF-32 data points */
+#endif
+
+#define LINEBREAK_MUSTBREAK            0       /**< Break is mandatory */
+#define LINEBREAK_ALLOWBREAK   1       /**< Break is allowed */
+#define LINEBREAK_NOBREAK              2       /**< No break is possible */
+#define LINEBREAK_INSIDEACHAR  3       /**< A UTF-8/16 sequence is unfinished */
+
+void init_linebreak(void);
+void set_linebreaks_utf8(
+               const utf8_t *s, size_t len, const char* lang, char *brks);
+void set_linebreaks_utf16(
+               const utf16_t *s, size_t len, const char* lang, char *brks);
+void set_linebreaks_utf32(
+               const utf32_t *s, size_t len, const char* lang, char *brks);
+int is_line_breakable(utf32_t char1, utf32_t char2, const char* lang);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LINEBREAK_H */
diff --git a/src/static_deps/liblinebreak/linebreakdata.c b/src/static_deps/liblinebreak/linebreakdata.c
new file mode 100644 (file)
index 0000000..0021479
--- /dev/null
@@ -0,0 +1,1868 @@
+/* The content of this file is generated from:
+# LineBreak-6.0.0.txt
+# Date: 2010-08-18, 17:25:00 PDT [KW]
+*/
+
+#include "linebreak.h"
+#include "linebreakdef.h"
+
+/** Default line breaking properties as from the Unicode Web site. */
+struct LineBreakProperties lb_prop_default[] = {
+       { 0x0000, 0x0008, LBP_CM },
+       { 0x0009, 0x0009, LBP_BA },
+       { 0x000A, 0x000A, LBP_LF },
+       { 0x000B, 0x000C, LBP_BK },
+       { 0x000D, 0x000D, LBP_CR },
+       { 0x000E, 0x001F, LBP_CM },
+       { 0x0020, 0x0020, LBP_SP },
+       { 0x0021, 0x0021, LBP_EX },
+       { 0x0022, 0x0022, LBP_QU },
+       { 0x0023, 0x0023, LBP_AL },
+       { 0x0024, 0x0024, LBP_PR },
+       { 0x0025, 0x0025, LBP_PO },
+       { 0x0026, 0x0026, LBP_AL },
+       { 0x0027, 0x0027, LBP_QU },
+       { 0x0028, 0x0028, LBP_OP },
+       { 0x0029, 0x0029, LBP_CP },
+       { 0x002A, 0x002A, LBP_AL },
+       { 0x002B, 0x002B, LBP_PR },
+       { 0x002C, 0x002C, LBP_IS },
+       { 0x002D, 0x002D, LBP_HY },
+       { 0x002E, 0x002E, LBP_IS },
+       { 0x002F, 0x002F, LBP_SY },
+       { 0x0030, 0x0039, LBP_NU },
+       { 0x003A, 0x003B, LBP_IS },
+       { 0x003C, 0x003E, LBP_AL },
+       { 0x003F, 0x003F, LBP_EX },
+       { 0x0040, 0x005A, LBP_AL },
+       { 0x005B, 0x005B, LBP_OP },
+       { 0x005C, 0x005C, LBP_PR },
+       { 0x005D, 0x005D, LBP_CP },
+       { 0x005E, 0x007A, LBP_AL },
+       { 0x007B, 0x007B, LBP_OP },
+       { 0x007C, 0x007C, LBP_BA },
+       { 0x007D, 0x007D, LBP_CL },
+       { 0x007E, 0x007E, LBP_AL },
+       { 0x007F, 0x0084, LBP_CM },
+       { 0x0085, 0x0085, LBP_NL },
+       { 0x0086, 0x009F, LBP_CM },
+       { 0x00A0, 0x00A0, LBP_GL },
+       { 0x00A1, 0x00A1, LBP_OP },
+       { 0x00A2, 0x00A2, LBP_PO },
+       { 0x00A3, 0x00A5, LBP_PR },
+       { 0x00A6, 0x00A6, LBP_AL },
+       { 0x00A7, 0x00A8, LBP_AI },
+       { 0x00A9, 0x00A9, LBP_AL },
+       { 0x00AA, 0x00AA, LBP_AI },
+       { 0x00AB, 0x00AB, LBP_QU },
+       { 0x00AC, 0x00AC, LBP_AL },
+       { 0x00AD, 0x00AD, LBP_BA },
+       { 0x00AE, 0x00AF, LBP_AL },
+       { 0x00B0, 0x00B0, LBP_PO },
+       { 0x00B1, 0x00B1, LBP_PR },
+       { 0x00B2, 0x00B3, LBP_AI },
+       { 0x00B4, 0x00B4, LBP_BB },
+       { 0x00B5, 0x00B5, LBP_AL },
+       { 0x00B6, 0x00BA, LBP_AI },
+       { 0x00BB, 0x00BB, LBP_QU },
+       { 0x00BC, 0x00BE, LBP_AI },
+       { 0x00BF, 0x00BF, LBP_OP },
+       { 0x00C0, 0x00D6, LBP_AL },
+       { 0x00D7, 0x00D7, LBP_AI },
+       { 0x00D8, 0x00F6, LBP_AL },
+       { 0x00F7, 0x00F7, LBP_AI },
+       { 0x00F8, 0x02C6, LBP_AL },
+       { 0x02C7, 0x02C7, LBP_AI },
+       { 0x02C8, 0x02C8, LBP_BB },
+       { 0x02C9, 0x02CB, LBP_AI },
+       { 0x02CC, 0x02CC, LBP_BB },
+       { 0x02CD, 0x02CD, LBP_AI },
+       { 0x02CE, 0x02CF, LBP_AL },
+       { 0x02D0, 0x02D0, LBP_AI },
+       { 0x02D1, 0x02D7, LBP_AL },
+       { 0x02D8, 0x02DB, LBP_AI },
+       { 0x02DC, 0x02DC, LBP_AL },
+       { 0x02DD, 0x02DD, LBP_AI },
+       { 0x02DE, 0x02DE, LBP_AL },
+       { 0x02DF, 0x02DF, LBP_BB },
+       { 0x02E0, 0x02FF, LBP_AL },
+       { 0x0300, 0x034E, LBP_CM },
+       { 0x034F, 0x034F, LBP_GL },
+       { 0x0350, 0x035B, LBP_CM },
+       { 0x035C, 0x0362, LBP_GL },
+       { 0x0363, 0x036F, LBP_CM },
+       { 0x0370, 0x037D, LBP_AL },
+       { 0x037E, 0x037E, LBP_IS },
+       { 0x0384, 0x0482, LBP_AL },
+       { 0x0483, 0x0489, LBP_CM },
+       { 0x048A, 0x0587, LBP_AL },
+       { 0x0589, 0x0589, LBP_IS },
+       { 0x058A, 0x058A, LBP_BA },
+       { 0x0591, 0x05BD, LBP_CM },
+       { 0x05BE, 0x05BE, LBP_BA },
+       { 0x05BF, 0x05BF, LBP_CM },
+       { 0x05C0, 0x05C0, LBP_AL },
+       { 0x05C1, 0x05C2, LBP_CM },
+       { 0x05C3, 0x05C3, LBP_AL },
+       { 0x05C4, 0x05C5, LBP_CM },
+       { 0x05C6, 0x05C6, LBP_EX },
+       { 0x05C7, 0x05C7, LBP_CM },
+       { 0x05D0, 0x0608, LBP_AL },
+       { 0x0609, 0x060B, LBP_PO },
+       { 0x060C, 0x060D, LBP_IS },
+       { 0x060E, 0x060F, LBP_AL },
+       { 0x0610, 0x061A, LBP_CM },
+       { 0x061B, 0x061F, LBP_EX },
+       { 0x0620, 0x064A, LBP_AL },
+       { 0x064B, 0x065F, LBP_CM },
+       { 0x0660, 0x0669, LBP_NU },
+       { 0x066A, 0x066A, LBP_PO },
+       { 0x066B, 0x066C, LBP_NU },
+       { 0x066D, 0x066F, LBP_AL },
+       { 0x0670, 0x0670, LBP_CM },
+       { 0x0671, 0x06D3, LBP_AL },
+       { 0x06D4, 0x06D4, LBP_EX },
+       { 0x06D5, 0x06D5, LBP_AL },
+       { 0x06D6, 0x06DC, LBP_CM },
+       { 0x06DD, 0x06DE, LBP_AL },
+       { 0x06DF, 0x06E4, LBP_CM },
+       { 0x06E5, 0x06E6, LBP_AL },
+       { 0x06E7, 0x06E8, LBP_CM },
+       { 0x06E9, 0x06E9, LBP_AL },
+       { 0x06EA, 0x06ED, LBP_CM },
+       { 0x06EE, 0x06EF, LBP_AL },
+       { 0x06F0, 0x06F9, LBP_NU },
+       { 0x06FA, 0x0710, LBP_AL },
+       { 0x0711, 0x0711, LBP_CM },
+       { 0x0712, 0x072F, LBP_AL },
+       { 0x0730, 0x074A, LBP_CM },
+       { 0x074D, 0x07A5, LBP_AL },
+       { 0x07A6, 0x07B0, LBP_CM },
+       { 0x07B1, 0x07B1, LBP_AL },
+       { 0x07C0, 0x07C9, LBP_NU },
+       { 0x07CA, 0x07EA, LBP_AL },
+       { 0x07EB, 0x07F3, LBP_CM },
+       { 0x07F4, 0x07F7, LBP_AL },
+       { 0x07F8, 0x07F8, LBP_IS },
+       { 0x07F9, 0x07F9, LBP_EX },
+       { 0x07FA, 0x0815, LBP_AL },
+       { 0x0816, 0x0819, LBP_CM },
+       { 0x081A, 0x081A, LBP_AL },
+       { 0x081B, 0x0823, LBP_CM },
+       { 0x0824, 0x0824, LBP_AL },
+       { 0x0825, 0x0827, LBP_CM },
+       { 0x0828, 0x0828, LBP_AL },
+       { 0x0829, 0x082D, LBP_CM },
+       { 0x0830, 0x0858, LBP_AL },
+       { 0x0859, 0x085B, LBP_CM },
+       { 0x085E, 0x085E, LBP_AL },
+       { 0x0900, 0x0903, LBP_CM },
+       { 0x0904, 0x0939, LBP_AL },
+       { 0x093A, 0x093C, LBP_CM },
+       { 0x093D, 0x093D, LBP_AL },
+       { 0x093E, 0x094F, LBP_CM },
+       { 0x0950, 0x0950, LBP_AL },
+       { 0x0951, 0x0957, LBP_CM },
+       { 0x0958, 0x0961, LBP_AL },
+       { 0x0962, 0x0963, LBP_CM },
+       { 0x0964, 0x0965, LBP_BA },
+       { 0x0966, 0x096F, LBP_NU },
+       { 0x0970, 0x097F, LBP_AL },
+       { 0x0981, 0x0983, LBP_CM },
+       { 0x0985, 0x09B9, LBP_AL },
+       { 0x09BC, 0x09BC, LBP_CM },
+       { 0x09BD, 0x09BD, LBP_AL },
+       { 0x09BE, 0x09CD, LBP_CM },
+       { 0x09CE, 0x09CE, LBP_AL },
+       { 0x09D7, 0x09D7, LBP_CM },
+       { 0x09DC, 0x09E1, LBP_AL },
+       { 0x09E2, 0x09E3, LBP_CM },
+       { 0x09E6, 0x09EF, LBP_NU },
+       { 0x09F0, 0x09F1, LBP_AL },
+       { 0x09F2, 0x09F3, LBP_PO },
+       { 0x09F4, 0x09F8, LBP_AL },
+       { 0x09F9, 0x09F9, LBP_PO },
+       { 0x09FA, 0x09FA, LBP_AL },
+       { 0x09FB, 0x09FB, LBP_PR },
+       { 0x0A01, 0x0A03, LBP_CM },
+       { 0x0A05, 0x0A39, LBP_AL },
+       { 0x0A3C, 0x0A51, LBP_CM },
+       { 0x0A59, 0x0A5E, LBP_AL },
+       { 0x0A66, 0x0A6F, LBP_NU },
+       { 0x0A70, 0x0A71, LBP_CM },
+       { 0x0A72, 0x0A74, LBP_AL },
+       { 0x0A75, 0x0A83, LBP_CM },
+       { 0x0A85, 0x0AB9, LBP_AL },
+       { 0x0ABC, 0x0ABC, LBP_CM },
+       { 0x0ABD, 0x0ABD, LBP_AL },
+       { 0x0ABE, 0x0ACD, LBP_CM },
+       { 0x0AD0, 0x0AE1, LBP_AL },
+       { 0x0AE2, 0x0AE3, LBP_CM },
+       { 0x0AE6, 0x0AEF, LBP_NU },
+       { 0x0AF1, 0x0AF1, LBP_PR },
+       { 0x0B01, 0x0B03, LBP_CM },
+       { 0x0B05, 0x0B39, LBP_AL },
+       { 0x0B3C, 0x0B3C, LBP_CM },
+       { 0x0B3D, 0x0B3D, LBP_AL },
+       { 0x0B3E, 0x0B57, LBP_CM },
+       { 0x0B5C, 0x0B61, LBP_AL },
+       { 0x0B62, 0x0B63, LBP_CM },
+       { 0x0B66, 0x0B6F, LBP_NU },
+       { 0x0B70, 0x0B77, LBP_AL },
+       { 0x0B82, 0x0B82, LBP_CM },
+       { 0x0B83, 0x0BB9, LBP_AL },
+       { 0x0BBE, 0x0BCD, LBP_CM },
+       { 0x0BD0, 0x0BD0, LBP_AL },
+       { 0x0BD7, 0x0BD7, LBP_CM },
+       { 0x0BE6, 0x0BEF, LBP_NU },
+       { 0x0BF0, 0x0BF8, LBP_AL },
+       { 0x0BF9, 0x0BF9, LBP_PR },
+       { 0x0BFA, 0x0BFA, LBP_AL },
+       { 0x0C01, 0x0C03, LBP_CM },
+       { 0x0C05, 0x0C3D, LBP_AL },
+       { 0x0C3E, 0x0C56, LBP_CM },
+       { 0x0C58, 0x0C61, LBP_AL },
+       { 0x0C62, 0x0C63, LBP_CM },
+       { 0x0C66, 0x0C6F, LBP_NU },
+       { 0x0C78, 0x0C7F, LBP_AL },
+       { 0x0C82, 0x0C83, LBP_CM },
+       { 0x0C85, 0x0CB9, LBP_AL },
+       { 0x0CBC, 0x0CBC, LBP_CM },
+       { 0x0CBD, 0x0CBD, LBP_AL },
+       { 0x0CBE, 0x0CD6, LBP_CM },
+       { 0x0CDE, 0x0CE1, LBP_AL },
+       { 0x0CE2, 0x0CE3, LBP_CM },
+       { 0x0CE6, 0x0CEF, LBP_NU },
+       { 0x0CF1, 0x0CF2, LBP_AL },
+       { 0x0D02, 0x0D03, LBP_CM },
+       { 0x0D05, 0x0D3D, LBP_AL },
+       { 0x0D3E, 0x0D4D, LBP_CM },
+       { 0x0D4E, 0x0D4E, LBP_AL },
+       { 0x0D57, 0x0D57, LBP_CM },
+       { 0x0D60, 0x0D61, LBP_AL },
+       { 0x0D62, 0x0D63, LBP_CM },
+       { 0x0D66, 0x0D6F, LBP_NU },
+       { 0x0D70, 0x0D75, LBP_AL },
+       { 0x0D79, 0x0D79, LBP_PO },
+       { 0x0D7A, 0x0D7F, LBP_AL },
+       { 0x0D82, 0x0D83, LBP_CM },
+       { 0x0D85, 0x0DC6, LBP_AL },
+       { 0x0DCA, 0x0DF3, LBP_CM },
+       { 0x0DF4, 0x0DF4, LBP_AL },
+       { 0x0E01, 0x0E3A, LBP_SA },
+       { 0x0E3F, 0x0E3F, LBP_PR },
+       { 0x0E40, 0x0E4E, LBP_SA },
+       { 0x0E4F, 0x0E4F, LBP_AL },
+       { 0x0E50, 0x0E59, LBP_NU },
+       { 0x0E5A, 0x0E5B, LBP_BA },
+       { 0x0E81, 0x0ECD, LBP_SA },
+       { 0x0ED0, 0x0ED9, LBP_NU },
+       { 0x0EDC, 0x0EDD, LBP_SA },
+       { 0x0F00, 0x0F00, LBP_AL },
+       { 0x0F01, 0x0F04, LBP_BB },
+       { 0x0F05, 0x0F05, LBP_AL },
+       { 0x0F06, 0x0F07, LBP_BB },
+       { 0x0F08, 0x0F08, LBP_GL },
+       { 0x0F09, 0x0F0A, LBP_BB },
+       { 0x0F0B, 0x0F0B, LBP_BA },
+       { 0x0F0C, 0x0F0C, LBP_GL },
+       { 0x0F0D, 0x0F11, LBP_EX },
+       { 0x0F12, 0x0F12, LBP_GL },
+       { 0x0F13, 0x0F13, LBP_AL },
+       { 0x0F14, 0x0F14, LBP_EX },
+       { 0x0F15, 0x0F17, LBP_AL },
+       { 0x0F18, 0x0F19, LBP_CM },
+       { 0x0F1A, 0x0F1F, LBP_AL },
+       { 0x0F20, 0x0F29, LBP_NU },
+       { 0x0F2A, 0x0F33, LBP_AL },
+       { 0x0F34, 0x0F34, LBP_BA },
+       { 0x0F35, 0x0F35, LBP_CM },
+       { 0x0F36, 0x0F36, LBP_AL },
+       { 0x0F37, 0x0F37, LBP_CM },
+       { 0x0F38, 0x0F38, LBP_AL },
+       { 0x0F39, 0x0F39, LBP_CM },
+       { 0x0F3A, 0x0F3A, LBP_OP },
+       { 0x0F3B, 0x0F3B, LBP_CL },
+       { 0x0F3C, 0x0F3C, LBP_OP },
+       { 0x0F3D, 0x0F3D, LBP_CL },
+       { 0x0F3E, 0x0F3F, LBP_CM },
+       { 0x0F40, 0x0F6C, LBP_AL },
+       { 0x0F71, 0x0F7E, LBP_CM },
+       { 0x0F7F, 0x0F7F, LBP_BA },
+       { 0x0F80, 0x0F84, LBP_CM },
+       { 0x0F85, 0x0F85, LBP_BA },
+       { 0x0F86, 0x0F87, LBP_CM },
+       { 0x0F88, 0x0F8C, LBP_AL },
+       { 0x0F8D, 0x0FBC, LBP_CM },
+       { 0x0FBE, 0x0FBF, LBP_BA },
+       { 0x0FC0, 0x0FC5, LBP_AL },
+       { 0x0FC6, 0x0FC6, LBP_CM },
+       { 0x0FC7, 0x0FCF, LBP_AL },
+       { 0x0FD0, 0x0FD1, LBP_BB },
+       { 0x0FD2, 0x0FD2, LBP_BA },
+       { 0x0FD3, 0x0FD3, LBP_BB },
+       { 0x0FD4, 0x0FD8, LBP_AL },
+       { 0x0FD9, 0x0FDA, LBP_GL },
+       { 0x1000, 0x103F, LBP_SA },
+       { 0x1040, 0x1049, LBP_NU },
+       { 0x104A, 0x104B, LBP_BA },
+       { 0x104C, 0x104F, LBP_AL },
+       { 0x1050, 0x108F, LBP_SA },
+       { 0x1090, 0x1099, LBP_NU },
+       { 0x109A, 0x109F, LBP_SA },
+       { 0x10A0, 0x10FC, LBP_AL },
+       { 0x1100, 0x115F, LBP_JL },
+       { 0x1160, 0x11A7, LBP_JV },
+       { 0x11A8, 0x11FF, LBP_JT },
+       { 0x1200, 0x135A, LBP_AL },
+       { 0x135D, 0x135F, LBP_CM },
+       { 0x1360, 0x1360, LBP_AL },
+       { 0x1361, 0x1361, LBP_BA },
+       { 0x1362, 0x13F4, LBP_AL },
+       { 0x1400, 0x1400, LBP_BA },
+       { 0x1401, 0x167F, LBP_AL },
+       { 0x1680, 0x1680, LBP_BA },
+       { 0x1681, 0x169A, LBP_AL },
+       { 0x169B, 0x169B, LBP_OP },
+       { 0x169C, 0x169C, LBP_CL },
+       { 0x16A0, 0x16EA, LBP_AL },
+       { 0x16EB, 0x16ED, LBP_BA },
+       { 0x16EE, 0x1711, LBP_AL },
+       { 0x1712, 0x1714, LBP_CM },
+       { 0x1720, 0x1731, LBP_AL },
+       { 0x1732, 0x1734, LBP_CM },
+       { 0x1735, 0x1736, LBP_BA },
+       { 0x1740, 0x1751, LBP_AL },
+       { 0x1752, 0x1753, LBP_CM },
+       { 0x1760, 0x1770, LBP_AL },
+       { 0x1772, 0x1773, LBP_CM },
+       { 0x1780, 0x17D3, LBP_SA },
+       { 0x17D4, 0x17D5, LBP_BA },
+       { 0x17D6, 0x17D6, LBP_NS },
+       { 0x17D7, 0x17D7, LBP_SA },
+       { 0x17D8, 0x17D8, LBP_BA },
+       { 0x17D9, 0x17D9, LBP_AL },
+       { 0x17DA, 0x17DA, LBP_BA },
+       { 0x17DB, 0x17DB, LBP_PR },
+       { 0x17DC, 0x17DD, LBP_SA },
+       { 0x17E0, 0x17E9, LBP_NU },
+       { 0x17F0, 0x1801, LBP_AL },
+       { 0x1802, 0x1803, LBP_EX },
+       { 0x1804, 0x1805, LBP_BA },
+       { 0x1806, 0x1806, LBP_BB },
+       { 0x1807, 0x1807, LBP_AL },
+       { 0x1808, 0x1809, LBP_EX },
+       { 0x180A, 0x180A, LBP_AL },
+       { 0x180B, 0x180D, LBP_CM },
+       { 0x180E, 0x180E, LBP_GL },
+       { 0x1810, 0x1819, LBP_NU },
+       { 0x1820, 0x18A8, LBP_AL },
+       { 0x18A9, 0x18A9, LBP_CM },
+       { 0x18AA, 0x191C, LBP_AL },
+       { 0x1920, 0x193B, LBP_CM },
+       { 0x1940, 0x1940, LBP_AL },
+       { 0x1944, 0x1945, LBP_EX },
+       { 0x1946, 0x194F, LBP_NU },
+       { 0x1950, 0x19C9, LBP_SA },
+       { 0x19D0, 0x19D9, LBP_NU },
+       { 0x19DA, 0x19DF, LBP_SA },
+       { 0x19E0, 0x1A16, LBP_AL },
+       { 0x1A17, 0x1A1B, LBP_CM },
+       { 0x1A1E, 0x1A1F, LBP_AL },
+       { 0x1A20, 0x1A7C, LBP_SA },
+       { 0x1A7F, 0x1A7F, LBP_CM },
+       { 0x1A80, 0x1A99, LBP_NU },
+       { 0x1AA0, 0x1AAD, LBP_SA },
+       { 0x1B00, 0x1B04, LBP_CM },
+       { 0x1B05, 0x1B33, LBP_AL },
+       { 0x1B34, 0x1B44, LBP_CM },
+       { 0x1B45, 0x1B4B, LBP_AL },
+       { 0x1B50, 0x1B59, LBP_NU },
+       { 0x1B5A, 0x1B5B, LBP_BA },
+       { 0x1B5C, 0x1B5C, LBP_AL },
+       { 0x1B5D, 0x1B60, LBP_BA },
+       { 0x1B61, 0x1B6A, LBP_AL },
+       { 0x1B6B, 0x1B73, LBP_CM },
+       { 0x1B74, 0x1B7C, LBP_AL },
+       { 0x1B80, 0x1B82, LBP_CM },
+       { 0x1B83, 0x1BA0, LBP_AL },
+       { 0x1BA1, 0x1BAA, LBP_CM },
+       { 0x1BAE, 0x1BAF, LBP_AL },
+       { 0x1BB0, 0x1BB9, LBP_NU },
+       { 0x1BC0, 0x1BE5, LBP_AL },
+       { 0x1BE6, 0x1BF3, LBP_CM },
+       { 0x1BFC, 0x1C23, LBP_AL },
+       { 0x1C24, 0x1C37, LBP_CM },
+       { 0x1C3B, 0x1C3F, LBP_BA },
+       { 0x1C40, 0x1C49, LBP_NU },
+       { 0x1C4D, 0x1C4F, LBP_AL },
+       { 0x1C50, 0x1C59, LBP_NU },
+       { 0x1C5A, 0x1C7D, LBP_AL },
+       { 0x1C7E, 0x1C7F, LBP_BA },
+       { 0x1CD0, 0x1CD2, LBP_CM },
+       { 0x1CD3, 0x1CD3, LBP_AL },
+       { 0x1CD4, 0x1CE8, LBP_CM },
+       { 0x1CE9, 0x1CEC, LBP_AL },
+       { 0x1CED, 0x1CED, LBP_CM },
+       { 0x1CEE, 0x1CF1, LBP_AL },
+       { 0x1CF2, 0x1CF2, LBP_CM },
+       { 0x1D00, 0x1DBF, LBP_AL },
+       { 0x1DC0, 0x1DFF, LBP_CM },
+       { 0x1E00, 0x1FFC, LBP_AL },
+       { 0x1FFD, 0x1FFD, LBP_BB },
+       { 0x1FFE, 0x1FFE, LBP_AL },
+       { 0x2000, 0x2006, LBP_BA },
+       { 0x2007, 0x2007, LBP_GL },
+       { 0x2008, 0x200A, LBP_BA },
+       { 0x200B, 0x200B, LBP_ZW },
+       { 0x200C, 0x200F, LBP_CM },
+       { 0x2010, 0x2010, LBP_BA },
+       { 0x2011, 0x2011, LBP_GL },
+       { 0x2012, 0x2013, LBP_BA },
+       { 0x2014, 0x2014, LBP_B2 },
+       { 0x2015, 0x2016, LBP_AI },
+       { 0x2017, 0x2017, LBP_AL },
+       { 0x2018, 0x2019, LBP_QU },
+       { 0x201A, 0x201A, LBP_OP },
+       { 0x201B, 0x201D, LBP_QU },
+       { 0x201E, 0x201E, LBP_OP },
+       { 0x201F, 0x201F, LBP_QU },
+       { 0x2020, 0x2021, LBP_AI },
+       { 0x2022, 0x2023, LBP_AL },
+       { 0x2024, 0x2026, LBP_IN },
+       { 0x2027, 0x2027, LBP_BA },
+       { 0x2028, 0x2029, LBP_BK },
+       { 0x202A, 0x202E, LBP_CM },
+       { 0x202F, 0x202F, LBP_GL },
+       { 0x2030, 0x2037, LBP_PO },
+       { 0x2038, 0x2038, LBP_AL },
+       { 0x2039, 0x203A, LBP_QU },
+       { 0x203B, 0x203B, LBP_AI },
+       { 0x203C, 0x203D, LBP_NS },
+       { 0x203E, 0x2043, LBP_AL },
+       { 0x2044, 0x2044, LBP_IS },
+       { 0x2045, 0x2045, LBP_OP },
+       { 0x2046, 0x2046, LBP_CL },
+       { 0x2047, 0x2049, LBP_NS },
+       { 0x204A, 0x2055, LBP_AL },
+       { 0x2056, 0x2056, LBP_BA },
+       { 0x2057, 0x2057, LBP_AL },
+       { 0x2058, 0x205B, LBP_BA },
+       { 0x205C, 0x205C, LBP_AL },
+       { 0x205D, 0x205F, LBP_BA },
+       { 0x2060, 0x2060, LBP_WJ },
+       { 0x2061, 0x2064, LBP_AL },
+       { 0x206A, 0x206F, LBP_CM },
+       { 0x2070, 0x2071, LBP_AL },
+       { 0x2074, 0x2074, LBP_AI },
+       { 0x2075, 0x207C, LBP_AL },
+       { 0x207D, 0x207D, LBP_OP },
+       { 0x207E, 0x207E, LBP_CL },
+       { 0x207F, 0x207F, LBP_AI },
+       { 0x2080, 0x2080, LBP_AL },
+       { 0x2081, 0x2084, LBP_AI },
+       { 0x2085, 0x208C, LBP_AL },
+       { 0x208D, 0x208D, LBP_OP },
+       { 0x208E, 0x208E, LBP_CL },
+       { 0x2090, 0x209C, LBP_AL },
+       { 0x20A0, 0x20A6, LBP_PR },
+       { 0x20A7, 0x20A7, LBP_PO },
+       { 0x20A8, 0x20B5, LBP_PR },
+       { 0x20B6, 0x20B6, LBP_PO },
+       { 0x20B7, 0x20B9, LBP_PR },
+       { 0x20D0, 0x20F0, LBP_CM },
+       { 0x2100, 0x2102, LBP_AL },
+       { 0x2103, 0x2103, LBP_PO },
+       { 0x2104, 0x2104, LBP_AL },
+       { 0x2105, 0x2105, LBP_AI },
+       { 0x2106, 0x2108, LBP_AL },
+       { 0x2109, 0x2109, LBP_PO },
+       { 0x210A, 0x2112, LBP_AL },
+       { 0x2113, 0x2113, LBP_AI },
+       { 0x2114, 0x2115, LBP_AL },
+       { 0x2116, 0x2116, LBP_PR },
+       { 0x2117, 0x2120, LBP_AL },
+       { 0x2121, 0x2122, LBP_AI },
+       { 0x2123, 0x212A, LBP_AL },
+       { 0x212B, 0x212B, LBP_AI },
+       { 0x212C, 0x2153, LBP_AL },
+       { 0x2154, 0x2155, LBP_AI },
+       { 0x2156, 0x215A, LBP_AL },
+       { 0x215B, 0x215B, LBP_AI },
+       { 0x215C, 0x215D, LBP_AL },
+       { 0x215E, 0x215E, LBP_AI },
+       { 0x215F, 0x215F, LBP_AL },
+       { 0x2160, 0x216B, LBP_AI },
+       { 0x216C, 0x216F, LBP_AL },
+       { 0x2170, 0x2179, LBP_AI },
+       { 0x217A, 0x2188, LBP_AL },
+       { 0x2189, 0x2199, LBP_AI },
+       { 0x219A, 0x21D1, LBP_AL },
+       { 0x21D2, 0x21D2, LBP_AI },
+       { 0x21D3, 0x21D3, LBP_AL },
+       { 0x21D4, 0x21D4, LBP_AI },
+       { 0x21D5, 0x21FF, LBP_AL },
+       { 0x2200, 0x2200, LBP_AI },
+       { 0x2201, 0x2201, LBP_AL },
+       { 0x2202, 0x2203, LBP_AI },
+       { 0x2204, 0x2206, LBP_AL },
+       { 0x2207, 0x2208, LBP_AI },
+       { 0x2209, 0x220A, LBP_AL },
+       { 0x220B, 0x220B, LBP_AI },
+       { 0x220C, 0x220E, LBP_AL },
+       { 0x220F, 0x220F, LBP_AI },
+       { 0x2210, 0x2210, LBP_AL },
+       { 0x2211, 0x2211, LBP_AI },
+       { 0x2212, 0x2213, LBP_PR },
+       { 0x2214, 0x2214, LBP_AL },
+       { 0x2215, 0x2215, LBP_AI },
+       { 0x2216, 0x2219, LBP_AL },
+       { 0x221A, 0x221A, LBP_AI },
+       { 0x221B, 0x221C, LBP_AL },
+       { 0x221D, 0x2220, LBP_AI },
+       { 0x2221, 0x2222, LBP_AL },
+       { 0x2223, 0x2223, LBP_AI },
+       { 0x2224, 0x2224, LBP_AL },
+       { 0x2225, 0x2225, LBP_AI },
+       { 0x2226, 0x2226, LBP_AL },
+       { 0x2227, 0x222C, LBP_AI },
+       { 0x222D, 0x222D, LBP_AL },
+       { 0x222E, 0x222E, LBP_AI },
+       { 0x222F, 0x2233, LBP_AL },
+       { 0x2234, 0x2237, LBP_AI },
+       { 0x2238, 0x223B, LBP_AL },
+       { 0x223C, 0x223D, LBP_AI },
+       { 0x223E, 0x2247, LBP_AL },
+       { 0x2248, 0x2248, LBP_AI },
+       { 0x2249, 0x224B, LBP_AL },
+       { 0x224C, 0x224C, LBP_AI },
+       { 0x224D, 0x2251, LBP_AL },
+       { 0x2252, 0x2252, LBP_AI },
+       { 0x2253, 0x225F, LBP_AL },
+       { 0x2260, 0x2261, LBP_AI },
+       { 0x2262, 0x2263, LBP_AL },
+       { 0x2264, 0x2267, LBP_AI },
+       { 0x2268, 0x2269, LBP_AL },
+       { 0x226A, 0x226B, LBP_AI },
+       { 0x226C, 0x226D, LBP_AL },
+       { 0x226E, 0x226F, LBP_AI },
+       { 0x2270, 0x2281, LBP_AL },
+       { 0x2282, 0x2283, LBP_AI },
+       { 0x2284, 0x2285, LBP_AL },
+       { 0x2286, 0x2287, LBP_AI },
+       { 0x2288, 0x2294, LBP_AL },
+       { 0x2295, 0x2295, LBP_AI },
+       { 0x2296, 0x2298, LBP_AL },
+       { 0x2299, 0x2299, LBP_AI },
+       { 0x229A, 0x22A4, LBP_AL },
+       { 0x22A5, 0x22A5, LBP_AI },
+       { 0x22A6, 0x22BE, LBP_AL },
+       { 0x22BF, 0x22BF, LBP_AI },
+       { 0x22C0, 0x2311, LBP_AL },
+       { 0x2312, 0x2312, LBP_AI },
+       { 0x2313, 0x2328, LBP_AL },
+       { 0x2329, 0x2329, LBP_OP },
+       { 0x232A, 0x232A, LBP_CL },
+       { 0x232B, 0x244A, LBP_AL },
+       { 0x2460, 0x24FE, LBP_AI },
+       { 0x24FF, 0x24FF, LBP_AL },
+       { 0x2500, 0x254B, LBP_AI },
+       { 0x254C, 0x254F, LBP_AL },
+       { 0x2550, 0x2574, LBP_AI },
+       { 0x2575, 0x257F, LBP_AL },
+       { 0x2580, 0x258F, LBP_AI },
+       { 0x2590, 0x2591, LBP_AL },
+       { 0x2592, 0x2595, LBP_AI },
+       { 0x2596, 0x259F, LBP_AL },
+       { 0x25A0, 0x25A1, LBP_AI },
+       { 0x25A2, 0x25A2, LBP_AL },
+       { 0x25A3, 0x25A9, LBP_AI },
+       { 0x25AA, 0x25B1, LBP_AL },
+       { 0x25B2, 0x25B3, LBP_AI },
+       { 0x25B4, 0x25B5, LBP_AL },
+       { 0x25B6, 0x25B7, LBP_AI },
+       { 0x25B8, 0x25BB, LBP_AL },
+       { 0x25BC, 0x25BD, LBP_AI },
+       { 0x25BE, 0x25BF, LBP_AL },
+       { 0x25C0, 0x25C1, LBP_AI },
+       { 0x25C2, 0x25C5, LBP_AL },
+       { 0x25C6, 0x25C8, LBP_AI },
+       { 0x25C9, 0x25CA, LBP_AL },
+       { 0x25CB, 0x25CB, LBP_AI },
+       { 0x25CC, 0x25CD, LBP_AL },
+       { 0x25CE, 0x25D1, LBP_AI },
+       { 0x25D2, 0x25E1, LBP_AL },
+       { 0x25E2, 0x25E5, LBP_AI },
+       { 0x25E6, 0x25EE, LBP_AL },
+       { 0x25EF, 0x25EF, LBP_AI },
+       { 0x25F0, 0x2604, LBP_AL },
+       { 0x2605, 0x2606, LBP_AI },
+       { 0x2607, 0x2608, LBP_AL },
+       { 0x2609, 0x2609, LBP_AI },
+       { 0x260A, 0x260D, LBP_AL },
+       { 0x260E, 0x260F, LBP_AI },
+       { 0x2610, 0x2613, LBP_AL },
+       { 0x2614, 0x2617, LBP_AI },
+       { 0x2618, 0x261B, LBP_AL },
+       { 0x261C, 0x261C, LBP_AI },
+       { 0x261D, 0x261D, LBP_AL },
+       { 0x261E, 0x261E, LBP_AI },
+       { 0x261F, 0x263F, LBP_AL },
+       { 0x2640, 0x2640, LBP_AI },
+       { 0x2641, 0x2641, LBP_AL },
+       { 0x2642, 0x2642, LBP_AI },
+       { 0x2643, 0x265F, LBP_AL },
+       { 0x2660, 0x2661, LBP_AI },
+       { 0x2662, 0x2662, LBP_AL },
+       { 0x2663, 0x2665, LBP_AI },
+       { 0x2666, 0x2666, LBP_AL },
+       { 0x2667, 0x266A, LBP_AI },
+       { 0x266B, 0x266B, LBP_AL },
+       { 0x266C, 0x266D, LBP_AI },
+       { 0x266E, 0x266E, LBP_AL },
+       { 0x266F, 0x266F, LBP_AI },
+       { 0x2670, 0x269D, LBP_AL },
+       { 0x269E, 0x269F, LBP_AI },
+       { 0x26A0, 0x26BD, LBP_AL },
+       { 0x26BE, 0x26BF, LBP_AI },
+       { 0x26C0, 0x26C3, LBP_AL },
+       { 0x26C4, 0x26CD, LBP_AI },
+       { 0x26CE, 0x26CE, LBP_AL },
+       { 0x26CF, 0x26E1, LBP_AI },
+       { 0x26E2, 0x26E2, LBP_AL },
+       { 0x26E3, 0x26E3, LBP_AI },
+       { 0x26E4, 0x26E7, LBP_AL },
+       { 0x26E8, 0x26FF, LBP_AI },
+       { 0x2701, 0x2756, LBP_AL },
+       { 0x2757, 0x2757, LBP_AI },
+       { 0x2758, 0x275A, LBP_AL },
+       { 0x275B, 0x275E, LBP_QU },
+       { 0x275F, 0x2761, LBP_AL },
+       { 0x2762, 0x2763, LBP_EX },
+       { 0x2764, 0x2767, LBP_AL },
+       { 0x2768, 0x2768, LBP_OP },
+       { 0x2769, 0x2769, LBP_CL },
+       { 0x276A, 0x276A, LBP_OP },
+       { 0x276B, 0x276B, LBP_CL },
+       { 0x276C, 0x276C, LBP_OP },
+       { 0x276D, 0x276D, LBP_CL },
+       { 0x276E, 0x276E, LBP_OP },
+       { 0x276F, 0x276F, LBP_CL },
+       { 0x2770, 0x2770, LBP_OP },
+       { 0x2771, 0x2771, LBP_CL },
+       { 0x2772, 0x2772, LBP_OP },
+       { 0x2773, 0x2773, LBP_CL },
+       { 0x2774, 0x2774, LBP_OP },
+       { 0x2775, 0x2775, LBP_CL },
+       { 0x2776, 0x2793, LBP_AI },
+       { 0x2794, 0x27C4, LBP_AL },
+       { 0x27C5, 0x27C5, LBP_OP },
+       { 0x27C6, 0x27C6, LBP_CL },
+       { 0x27C7, 0x27E5, LBP_AL },
+       { 0x27E6, 0x27E6, LBP_OP },
+       { 0x27E7, 0x27E7, LBP_CL },
+       { 0x27E8, 0x27E8, LBP_OP },
+       { 0x27E9, 0x27E9, LBP_CL },
+       { 0x27EA, 0x27EA, LBP_OP },
+       { 0x27EB, 0x27EB, LBP_CL },
+       { 0x27EC, 0x27EC, LBP_OP },
+       { 0x27ED, 0x27ED, LBP_CL },
+       { 0x27EE, 0x27EE, LBP_OP },
+       { 0x27EF, 0x27EF, LBP_CL },
+       { 0x27F0, 0x2982, LBP_AL },
+       { 0x2983, 0x2983, LBP_OP },
+       { 0x2984, 0x2984, LBP_CL },
+       { 0x2985, 0x2985, LBP_OP },
+       { 0x2986, 0x2986, LBP_CL },
+       { 0x2987, 0x2987, LBP_OP },
+       { 0x2988, 0x2988, LBP_CL },
+       { 0x2989, 0x2989, LBP_OP },
+       { 0x298A, 0x298A, LBP_CL },
+       { 0x298B, 0x298B, LBP_OP },
+       { 0x298C, 0x298C, LBP_CL },
+       { 0x298D, 0x298D, LBP_OP },
+       { 0x298E, 0x298E, LBP_CL },
+       { 0x298F, 0x298F, LBP_OP },
+       { 0x2990, 0x2990, LBP_CL },
+       { 0x2991, 0x2991, LBP_OP },
+       { 0x2992, 0x2992, LBP_CL },
+       { 0x2993, 0x2993, LBP_OP },
+       { 0x2994, 0x2994, LBP_CL },
+       { 0x2995, 0x2995, LBP_OP },
+       { 0x2996, 0x2996, LBP_CL },
+       { 0x2997, 0x2997, LBP_OP },
+       { 0x2998, 0x2998, LBP_CL },
+       { 0x2999, 0x29D7, LBP_AL },
+       { 0x29D8, 0x29D8, LBP_OP },
+       { 0x29D9, 0x29D9, LBP_CL },
+       { 0x29DA, 0x29DA, LBP_OP },
+       { 0x29DB, 0x29DB, LBP_CL },
+       { 0x29DC, 0x29FB, LBP_AL },
+       { 0x29FC, 0x29FC, LBP_OP },
+       { 0x29FD, 0x29FD, LBP_CL },
+       { 0x29FE, 0x2B54, LBP_AL },
+       { 0x2B55, 0x2B59, LBP_AI },
+       { 0x2C00, 0x2CEE, LBP_AL },
+       { 0x2CEF, 0x2CF1, LBP_CM },
+       { 0x2CF9, 0x2CF9, LBP_EX },
+       { 0x2CFA, 0x2CFC, LBP_BA },
+       { 0x2CFD, 0x2CFD, LBP_AL },
+       { 0x2CFE, 0x2CFE, LBP_EX },
+       { 0x2CFF, 0x2CFF, LBP_BA },
+       { 0x2D00, 0x2D6F, LBP_AL },
+       { 0x2D70, 0x2D70, LBP_BA },
+       { 0x2D7F, 0x2D7F, LBP_CM },
+       { 0x2D80, 0x2DDE, LBP_AL },
+       { 0x2DE0, 0x2DFF, LBP_CM },
+       { 0x2E00, 0x2E0D, LBP_QU },
+       { 0x2E0E, 0x2E15, LBP_BA },
+       { 0x2E16, 0x2E16, LBP_AL },
+       { 0x2E17, 0x2E17, LBP_BA },
+       { 0x2E18, 0x2E18, LBP_OP },
+       { 0x2E19, 0x2E19, LBP_BA },
+       { 0x2E1A, 0x2E1B, LBP_AL },
+       { 0x2E1C, 0x2E1D, LBP_QU },
+       { 0x2E1E, 0x2E1F, LBP_AL },
+       { 0x2E20, 0x2E21, LBP_QU },
+       { 0x2E22, 0x2E22, LBP_OP },
+       { 0x2E23, 0x2E23, LBP_CL },
+       { 0x2E24, 0x2E24, LBP_OP },
+       { 0x2E25, 0x2E25, LBP_CL },
+       { 0x2E26, 0x2E26, LBP_OP },
+       { 0x2E27, 0x2E27, LBP_CL },
+       { 0x2E28, 0x2E28, LBP_OP },
+       { 0x2E29, 0x2E29, LBP_CL },
+       { 0x2E2A, 0x2E2D, LBP_BA },
+       { 0x2E2E, 0x2E2E, LBP_EX },
+       { 0x2E2F, 0x2E2F, LBP_AL },
+       { 0x2E30, 0x2E31, LBP_BA },
+       { 0x2E80, 0x3000, LBP_ID },
+       { 0x3001, 0x3002, LBP_CL },
+       { 0x3003, 0x3004, LBP_ID },
+       { 0x3005, 0x3005, LBP_NS },
+       { 0x3006, 0x3007, LBP_ID },
+       { 0x3008, 0x3008, LBP_OP },
+       { 0x3009, 0x3009, LBP_CL },
+       { 0x300A, 0x300A, LBP_OP },
+       { 0x300B, 0x300B, LBP_CL },
+       { 0x300C, 0x300C, LBP_OP },
+       { 0x300D, 0x300D, LBP_CL },
+       { 0x300E, 0x300E, LBP_OP },
+       { 0x300F, 0x300F, LBP_CL },
+       { 0x3010, 0x3010, LBP_OP },
+       { 0x3011, 0x3011, LBP_CL },
+       { 0x3012, 0x3013, LBP_ID },
+       { 0x3014, 0x3014, LBP_OP },
+       { 0x3015, 0x3015, LBP_CL },
+       { 0x3016, 0x3016, LBP_OP },
+       { 0x3017, 0x3017, LBP_CL },
+       { 0x3018, 0x3018, LBP_OP },
+       { 0x3019, 0x3019, LBP_CL },
+       { 0x301A, 0x301A, LBP_OP },
+       { 0x301B, 0x301B, LBP_CL },
+       { 0x301C, 0x301C, LBP_NS },
+       { 0x301D, 0x301D, LBP_OP },
+       { 0x301E, 0x301F, LBP_CL },
+       { 0x3020, 0x3029, LBP_ID },
+       { 0x302A, 0x302F, LBP_CM },
+       { 0x3030, 0x303A, LBP_ID },
+       { 0x303B, 0x303C, LBP_NS },
+       { 0x303D, 0x303F, LBP_ID },
+       { 0x3041, 0x3041, LBP_NS },
+       { 0x3042, 0x3042, LBP_ID },
+       { 0x3043, 0x3043, LBP_NS },
+       { 0x3044, 0x3044, LBP_ID },
+       { 0x3045, 0x3045, LBP_NS },
+       { 0x3046, 0x3046, LBP_ID },
+       { 0x3047, 0x3047, LBP_NS },
+       { 0x3048, 0x3048, LBP_ID },
+       { 0x3049, 0x3049, LBP_NS },
+       { 0x304A, 0x3062, LBP_ID },
+       { 0x3063, 0x3063, LBP_NS },
+       { 0x3064, 0x3082, LBP_ID },
+       { 0x3083, 0x3083, LBP_NS },
+       { 0x3084, 0x3084, LBP_ID },
+       { 0x3085, 0x3085, LBP_NS },
+       { 0x3086, 0x3086, LBP_ID },
+       { 0x3087, 0x3087, LBP_NS },
+       { 0x3088, 0x308D, LBP_ID },
+       { 0x308E, 0x308E, LBP_NS },
+       { 0x308F, 0x3094, LBP_ID },
+       { 0x3095, 0x3096, LBP_NS },
+       { 0x3099, 0x309A, LBP_CM },
+       { 0x309B, 0x309E, LBP_NS },
+       { 0x309F, 0x309F, LBP_ID },
+       { 0x30A0, 0x30A1, LBP_NS },
+       { 0x30A2, 0x30A2, LBP_ID },
+       { 0x30A3, 0x30A3, LBP_NS },
+       { 0x30A4, 0x30A4, LBP_ID },
+       { 0x30A5, 0x30A5, LBP_NS },
+       { 0x30A6, 0x30A6, LBP_ID },
+       { 0x30A7, 0x30A7, LBP_NS },
+       { 0x30A8, 0x30A8, LBP_ID },
+       { 0x30A9, 0x30A9, LBP_NS },
+       { 0x30AA, 0x30C2, LBP_ID },
+       { 0x30C3, 0x30C3, LBP_NS },
+       { 0x30C4, 0x30E2, LBP_ID },
+       { 0x30E3, 0x30E3, LBP_NS },
+       { 0x30E4, 0x30E4, LBP_ID },
+       { 0x30E5, 0x30E5, LBP_NS },
+       { 0x30E6, 0x30E6, LBP_ID },
+       { 0x30E7, 0x30E7, LBP_NS },
+       { 0x30E8, 0x30ED, LBP_ID },
+       { 0x30EE, 0x30EE, LBP_NS },
+       { 0x30EF, 0x30F4, LBP_ID },
+       { 0x30F5, 0x30F6, LBP_NS },
+       { 0x30F7, 0x30FA, LBP_ID },
+       { 0x30FB, 0x30FE, LBP_NS },
+       { 0x30FF, 0x31E3, LBP_ID },
+       { 0x31F0, 0x31FF, LBP_NS },
+       { 0x3200, 0x3247, LBP_ID },
+       { 0x3248, 0x324F, LBP_AI },
+       { 0x3250, 0x4DBF, LBP_ID },
+       { 0x4DC0, 0x4DFF, LBP_AL },
+       { 0x4E00, 0xA014, LBP_ID },
+       { 0xA015, 0xA015, LBP_NS },
+       { 0xA016, 0xA4C6, LBP_ID },
+       { 0xA4D0, 0xA4FD, LBP_AL },
+       { 0xA4FE, 0xA4FF, LBP_BA },
+       { 0xA500, 0xA60C, LBP_AL },
+       { 0xA60D, 0xA60D, LBP_BA },
+       { 0xA60E, 0xA60E, LBP_EX },
+       { 0xA60F, 0xA60F, LBP_BA },
+       { 0xA610, 0xA61F, LBP_AL },
+       { 0xA620, 0xA629, LBP_NU },
+       { 0xA62A, 0xA66E, LBP_AL },
+       { 0xA66F, 0xA672, LBP_CM },
+       { 0xA673, 0xA673, LBP_AL },
+       { 0xA67C, 0xA67D, LBP_CM },
+       { 0xA67E, 0xA6EF, LBP_AL },
+       { 0xA6F0, 0xA6F1, LBP_CM },
+       { 0xA6F2, 0xA6F2, LBP_AL },
+       { 0xA6F3, 0xA6F7, LBP_BA },
+       { 0xA700, 0xA801, LBP_AL },
+       { 0xA802, 0xA802, LBP_CM },
+       { 0xA803, 0xA805, LBP_AL },
+       { 0xA806, 0xA806, LBP_CM },
+       { 0xA807, 0xA80A, LBP_AL },
+       { 0xA80B, 0xA80B, LBP_CM },
+       { 0xA80C, 0xA822, LBP_AL },
+       { 0xA823, 0xA827, LBP_CM },
+       { 0xA828, 0xA837, LBP_AL },
+       { 0xA838, 0xA838, LBP_PO },
+       { 0xA839, 0xA873, LBP_AL },
+       { 0xA874, 0xA875, LBP_BB },
+       { 0xA876, 0xA877, LBP_EX },
+       { 0xA880, 0xA881, LBP_CM },
+       { 0xA882, 0xA8B3, LBP_AL },
+       { 0xA8B4, 0xA8C4, LBP_CM },
+       { 0xA8CE, 0xA8CF, LBP_BA },
+       { 0xA8D0, 0xA8D9, LBP_NU },
+       { 0xA8E0, 0xA8F1, LBP_CM },
+       { 0xA8F2, 0xA8FB, LBP_AL },
+       { 0xA900, 0xA909, LBP_NU },
+       { 0xA90A, 0xA925, LBP_AL },
+       { 0xA926, 0xA92D, LBP_CM },
+       { 0xA92E, 0xA92F, LBP_BA },
+       { 0xA930, 0xA946, LBP_AL },
+       { 0xA947, 0xA953, LBP_CM },
+       { 0xA95F, 0xA95F, LBP_AL },
+       { 0xA960, 0xA97C, LBP_JL },
+       { 0xA980, 0xA983, LBP_CM },
+       { 0xA984, 0xA9B2, LBP_AL },
+       { 0xA9B3, 0xA9C0, LBP_CM },
+       { 0xA9C1, 0xA9C6, LBP_AL },
+       { 0xA9C7, 0xA9C9, LBP_BA },
+       { 0xA9CA, 0xA9CF, LBP_AL },
+       { 0xA9D0, 0xA9D9, LBP_NU },
+       { 0xA9DE, 0xAA28, LBP_AL },
+       { 0xAA29, 0xAA36, LBP_CM },
+       { 0xAA40, 0xAA42, LBP_AL },
+       { 0xAA43, 0xAA43, LBP_CM },
+       { 0xAA44, 0xAA4B, LBP_AL },
+       { 0xAA4C, 0xAA4D, LBP_CM },
+       { 0xAA50, 0xAA59, LBP_NU },
+       { 0xAA5C, 0xAA5C, LBP_AL },
+       { 0xAA5D, 0xAA5F, LBP_BA },
+       { 0xAA60, 0xAADF, LBP_SA },
+       { 0xAB01, 0xABE2, LBP_AL },
+       { 0xABE3, 0xABEA, LBP_CM },
+       { 0xABEB, 0xABEB, LBP_BA },
+       { 0xABEC, 0xABED, LBP_CM },
+       { 0xABF0, 0xABF9, LBP_NU },
+       { 0xAC00, 0xAC00, LBP_H2 },
+       { 0xAC01, 0xAC1B, LBP_H3 },
+       { 0xAC1C, 0xAC1C, LBP_H2 },
+       { 0xAC1D, 0xAC37, LBP_H3 },
+       { 0xAC38, 0xAC38, LBP_H2 },
+       { 0xAC39, 0xAC53, LBP_H3 },
+       { 0xAC54, 0xAC54, LBP_H2 },
+       { 0xAC55, 0xAC6F, LBP_H3 },
+       { 0xAC70, 0xAC70, LBP_H2 },
+       { 0xAC71, 0xAC8B, LBP_H3 },
+       { 0xAC8C, 0xAC8C, LBP_H2 },
+       { 0xAC8D, 0xACA7, LBP_H3 },
+       { 0xACA8, 0xACA8, LBP_H2 },
+       { 0xACA9, 0xACC3, LBP_H3 },
+       { 0xACC4, 0xACC4, LBP_H2 },
+       { 0xACC5, 0xACDF, LBP_H3 },
+       { 0xACE0, 0xACE0, LBP_H2 },
+       { 0xACE1, 0xACFB, LBP_H3 },
+       { 0xACFC, 0xACFC, LBP_H2 },
+       { 0xACFD, 0xAD17, LBP_H3 },
+       { 0xAD18, 0xAD18, LBP_H2 },
+       { 0xAD19, 0xAD33, LBP_H3 },
+       { 0xAD34, 0xAD34, LBP_H2 },
+       { 0xAD35, 0xAD4F, LBP_H3 },
+       { 0xAD50, 0xAD50, LBP_H2 },
+       { 0xAD51, 0xAD6B, LBP_H3 },
+       { 0xAD6C, 0xAD6C, LBP_H2 },
+       { 0xAD6D, 0xAD87, LBP_H3 },
+       { 0xAD88, 0xAD88, LBP_H2 },
+       { 0xAD89, 0xADA3, LBP_H3 },
+       { 0xADA4, 0xADA4, LBP_H2 },
+       { 0xADA5, 0xADBF, LBP_H3 },
+       { 0xADC0, 0xADC0, LBP_H2 },
+       { 0xADC1, 0xADDB, LBP_H3 },
+       { 0xADDC, 0xADDC, LBP_H2 },
+       { 0xADDD, 0xADF7, LBP_H3 },
+       { 0xADF8, 0xADF8, LBP_H2 },
+       { 0xADF9, 0xAE13, LBP_H3 },
+       { 0xAE14, 0xAE14, LBP_H2 },
+       { 0xAE15, 0xAE2F, LBP_H3 },
+       { 0xAE30, 0xAE30, LBP_H2 },
+       { 0xAE31, 0xAE4B, LBP_H3 },
+       { 0xAE4C, 0xAE4C, LBP_H2 },
+       { 0xAE4D, 0xAE67, LBP_H3 },
+       { 0xAE68, 0xAE68, LBP_H2 },
+       { 0xAE69, 0xAE83, LBP_H3 },
+       { 0xAE84, 0xAE84, LBP_H2 },
+       { 0xAE85, 0xAE9F, LBP_H3 },
+       { 0xAEA0, 0xAEA0, LBP_H2 },
+       { 0xAEA1, 0xAEBB, LBP_H3 },
+       { 0xAEBC, 0xAEBC, LBP_H2 },
+       { 0xAEBD, 0xAED7, LBP_H3 },
+       { 0xAED8, 0xAED8, LBP_H2 },
+       { 0xAED9, 0xAEF3, LBP_H3 },
+       { 0xAEF4, 0xAEF4, LBP_H2 },
+       { 0xAEF5, 0xAF0F, LBP_H3 },
+       { 0xAF10, 0xAF10, LBP_H2 },
+       { 0xAF11, 0xAF2B, LBP_H3 },
+       { 0xAF2C, 0xAF2C, LBP_H2 },
+       { 0xAF2D, 0xAF47, LBP_H3 },
+       { 0xAF48, 0xAF48, LBP_H2 },
+       { 0xAF49, 0xAF63, LBP_H3 },
+       { 0xAF64, 0xAF64, LBP_H2 },
+       { 0xAF65, 0xAF7F, LBP_H3 },
+       { 0xAF80, 0xAF80, LBP_H2 },
+       { 0xAF81, 0xAF9B, LBP_H3 },
+       { 0xAF9C, 0xAF9C, LBP_H2 },
+       { 0xAF9D, 0xAFB7, LBP_H3 },
+       { 0xAFB8, 0xAFB8, LBP_H2 },
+       { 0xAFB9, 0xAFD3, LBP_H3 },
+       { 0xAFD4, 0xAFD4, LBP_H2 },
+       { 0xAFD5, 0xAFEF, LBP_H3 },
+       { 0xAFF0, 0xAFF0, LBP_H2 },
+       { 0xAFF1, 0xB00B, LBP_H3 },
+       { 0xB00C, 0xB00C, LBP_H2 },
+       { 0xB00D, 0xB027, LBP_H3 },
+       { 0xB028, 0xB028, LBP_H2 },
+       { 0xB029, 0xB043, LBP_H3 },
+       { 0xB044, 0xB044, LBP_H2 },
+       { 0xB045, 0xB05F, LBP_H3 },
+       { 0xB060, 0xB060, LBP_H2 },
+       { 0xB061, 0xB07B, LBP_H3 },
+       { 0xB07C, 0xB07C, LBP_H2 },
+       { 0xB07D, 0xB097, LBP_H3 },
+       { 0xB098, 0xB098, LBP_H2 },
+       { 0xB099, 0xB0B3, LBP_H3 },
+       { 0xB0B4, 0xB0B4, LBP_H2 },
+       { 0xB0B5, 0xB0CF, LBP_H3 },
+       { 0xB0D0, 0xB0D0, LBP_H2 },
+       { 0xB0D1, 0xB0EB, LBP_H3 },
+       { 0xB0EC, 0xB0EC, LBP_H2 },
+       { 0xB0ED, 0xB107, LBP_H3 },
+       { 0xB108, 0xB108, LBP_H2 },
+       { 0xB109, 0xB123, LBP_H3 },
+       { 0xB124, 0xB124, LBP_H2 },
+       { 0xB125, 0xB13F, LBP_H3 },
+       { 0xB140, 0xB140, LBP_H2 },
+       { 0xB141, 0xB15B, LBP_H3 },
+       { 0xB15C, 0xB15C, LBP_H2 },
+       { 0xB15D, 0xB177, LBP_H3 },
+       { 0xB178, 0xB178, LBP_H2 },
+       { 0xB179, 0xB193, LBP_H3 },
+       { 0xB194, 0xB194, LBP_H2 },
+       { 0xB195, 0xB1AF, LBP_H3 },
+       { 0xB1B0, 0xB1B0, LBP_H2 },
+       { 0xB1B1, 0xB1CB, LBP_H3 },
+       { 0xB1CC, 0xB1CC, LBP_H2 },
+       { 0xB1CD, 0xB1E7, LBP_H3 },
+       { 0xB1E8, 0xB1E8, LBP_H2 },
+       { 0xB1E9, 0xB203, LBP_H3 },
+       { 0xB204, 0xB204, LBP_H2 },
+       { 0xB205, 0xB21F, LBP_H3 },
+       { 0xB220, 0xB220, LBP_H2 },
+       { 0xB221, 0xB23B, LBP_H3 },
+       { 0xB23C, 0xB23C, LBP_H2 },
+       { 0xB23D, 0xB257, LBP_H3 },
+       { 0xB258, 0xB258, LBP_H2 },
+       { 0xB259, 0xB273, LBP_H3 },
+       { 0xB274, 0xB274, LBP_H2 },
+       { 0xB275, 0xB28F, LBP_H3 },
+       { 0xB290, 0xB290, LBP_H2 },
+       { 0xB291, 0xB2AB, LBP_H3 },
+       { 0xB2AC, 0xB2AC, LBP_H2 },
+       { 0xB2AD, 0xB2C7, LBP_H3 },
+       { 0xB2C8, 0xB2C8, LBP_H2 },
+       { 0xB2C9, 0xB2E3, LBP_H3 },
+       { 0xB2E4, 0xB2E4, LBP_H2 },
+       { 0xB2E5, 0xB2FF, LBP_H3 },
+       { 0xB300, 0xB300, LBP_H2 },
+       { 0xB301, 0xB31B, LBP_H3 },
+       { 0xB31C, 0xB31C, LBP_H2 },
+       { 0xB31D, 0xB337, LBP_H3 },
+       { 0xB338, 0xB338, LBP_H2 },
+       { 0xB339, 0xB353, LBP_H3 },
+       { 0xB354, 0xB354, LBP_H2 },
+       { 0xB355, 0xB36F, LBP_H3 },
+       { 0xB370, 0xB370, LBP_H2 },
+       { 0xB371, 0xB38B, LBP_H3 },
+       { 0xB38C, 0xB38C, LBP_H2 },
+       { 0xB38D, 0xB3A7, LBP_H3 },
+       { 0xB3A8, 0xB3A8, LBP_H2 },
+       { 0xB3A9, 0xB3C3, LBP_H3 },
+       { 0xB3C4, 0xB3C4, LBP_H2 },
+       { 0xB3C5, 0xB3DF, LBP_H3 },
+       { 0xB3E0, 0xB3E0, LBP_H2 },
+       { 0xB3E1, 0xB3FB, LBP_H3 },
+       { 0xB3FC, 0xB3FC, LBP_H2 },
+       { 0xB3FD, 0xB417, LBP_H3 },
+       { 0xB418, 0xB418, LBP_H2 },
+       { 0xB419, 0xB433, LBP_H3 },
+       { 0xB434, 0xB434, LBP_H2 },
+       { 0xB435, 0xB44F, LBP_H3 },
+       { 0xB450, 0xB450, LBP_H2 },
+       { 0xB451, 0xB46B, LBP_H3 },
+       { 0xB46C, 0xB46C, LBP_H2 },
+       { 0xB46D, 0xB487, LBP_H3 },
+       { 0xB488, 0xB488, LBP_H2 },
+       { 0xB489, 0xB4A3, LBP_H3 },
+       { 0xB4A4, 0xB4A4, LBP_H2 },
+       { 0xB4A5, 0xB4BF, LBP_H3 },
+       { 0xB4C0, 0xB4C0, LBP_H2 },
+       { 0xB4C1, 0xB4DB, LBP_H3 },
+       { 0xB4DC, 0xB4DC, LBP_H2 },
+       { 0xB4DD, 0xB4F7, LBP_H3 },
+       { 0xB4F8, 0xB4F8, LBP_H2 },
+       { 0xB4F9, 0xB513, LBP_H3 },
+       { 0xB514, 0xB514, LBP_H2 },
+       { 0xB515, 0xB52F, LBP_H3 },
+       { 0xB530, 0xB530, LBP_H2 },
+       { 0xB531, 0xB54B, LBP_H3 },
+       { 0xB54C, 0xB54C, LBP_H2 },
+       { 0xB54D, 0xB567, LBP_H3 },
+       { 0xB568, 0xB568, LBP_H2 },
+       { 0xB569, 0xB583, LBP_H3 },
+       { 0xB584, 0xB584, LBP_H2 },
+       { 0xB585, 0xB59F, LBP_H3 },
+       { 0xB5A0, 0xB5A0, LBP_H2 },
+       { 0xB5A1, 0xB5BB, LBP_H3 },
+       { 0xB5BC, 0xB5BC, LBP_H2 },
+       { 0xB5BD, 0xB5D7, LBP_H3 },
+       { 0xB5D8, 0xB5D8, LBP_H2 },
+       { 0xB5D9, 0xB5F3, LBP_H3 },
+       { 0xB5F4, 0xB5F4, LBP_H2 },
+       { 0xB5F5, 0xB60F, LBP_H3 },
+       { 0xB610, 0xB610, LBP_H2 },
+       { 0xB611, 0xB62B, LBP_H3 },
+       { 0xB62C, 0xB62C, LBP_H2 },
+       { 0xB62D, 0xB647, LBP_H3 },
+       { 0xB648, 0xB648, LBP_H2 },
+       { 0xB649, 0xB663, LBP_H3 },
+       { 0xB664, 0xB664, LBP_H2 },
+       { 0xB665, 0xB67F, LBP_H3 },
+       { 0xB680, 0xB680, LBP_H2 },
+       { 0xB681, 0xB69B, LBP_H3 },
+       { 0xB69C, 0xB69C, LBP_H2 },
+       { 0xB69D, 0xB6B7, LBP_H3 },
+       { 0xB6B8, 0xB6B8, LBP_H2 },
+       { 0xB6B9, 0xB6D3, LBP_H3 },
+       { 0xB6D4, 0xB6D4, LBP_H2 },
+       { 0xB6D5, 0xB6EF, LBP_H3 },
+       { 0xB6F0, 0xB6F0, LBP_H2 },
+       { 0xB6F1, 0xB70B, LBP_H3 },
+       { 0xB70C, 0xB70C, LBP_H2 },
+       { 0xB70D, 0xB727, LBP_H3 },
+       { 0xB728, 0xB728, LBP_H2 },
+       { 0xB729, 0xB743, LBP_H3 },
+       { 0xB744, 0xB744, LBP_H2 },
+       { 0xB745, 0xB75F, LBP_H3 },
+       { 0xB760, 0xB760, LBP_H2 },
+       { 0xB761, 0xB77B, LBP_H3 },
+       { 0xB77C, 0xB77C, LBP_H2 },
+       { 0xB77D, 0xB797, LBP_H3 },
+       { 0xB798, 0xB798, LBP_H2 },
+       { 0xB799, 0xB7B3, LBP_H3 },
+       { 0xB7B4, 0xB7B4, LBP_H2 },
+       { 0xB7B5, 0xB7CF, LBP_H3 },
+       { 0xB7D0, 0xB7D0, LBP_H2 },
+       { 0xB7D1, 0xB7EB, LBP_H3 },
+       { 0xB7EC, 0xB7EC, LBP_H2 },
+       { 0xB7ED, 0xB807, LBP_H3 },
+       { 0xB808, 0xB808, LBP_H2 },
+       { 0xB809, 0xB823, LBP_H3 },
+       { 0xB824, 0xB824, LBP_H2 },
+       { 0xB825, 0xB83F, LBP_H3 },
+       { 0xB840, 0xB840, LBP_H2 },
+       { 0xB841, 0xB85B, LBP_H3 },
+       { 0xB85C, 0xB85C, LBP_H2 },
+       { 0xB85D, 0xB877, LBP_H3 },
+       { 0xB878, 0xB878, LBP_H2 },
+       { 0xB879, 0xB893, LBP_H3 },
+       { 0xB894, 0xB894, LBP_H2 },
+       { 0xB895, 0xB8AF, LBP_H3 },
+       { 0xB8B0, 0xB8B0, LBP_H2 },
+       { 0xB8B1, 0xB8CB, LBP_H3 },
+       { 0xB8CC, 0xB8CC, LBP_H2 },
+       { 0xB8CD, 0xB8E7, LBP_H3 },
+       { 0xB8E8, 0xB8E8, LBP_H2 },
+       { 0xB8E9, 0xB903, LBP_H3 },
+       { 0xB904, 0xB904, LBP_H2 },
+       { 0xB905, 0xB91F, LBP_H3 },
+       { 0xB920, 0xB920, LBP_H2 },
+       { 0xB921, 0xB93B, LBP_H3 },
+       { 0xB93C, 0xB93C, LBP_H2 },
+       { 0xB93D, 0xB957, LBP_H3 },
+       { 0xB958, 0xB958, LBP_H2 },
+       { 0xB959, 0xB973, LBP_H3 },
+       { 0xB974, 0xB974, LBP_H2 },
+       { 0xB975, 0xB98F, LBP_H3 },
+       { 0xB990, 0xB990, LBP_H2 },
+       { 0xB991, 0xB9AB, LBP_H3 },
+       { 0xB9AC, 0xB9AC, LBP_H2 },
+       { 0xB9AD, 0xB9C7, LBP_H3 },
+       { 0xB9C8, 0xB9C8, LBP_H2 },
+       { 0xB9C9, 0xB9E3, LBP_H3 },
+       { 0xB9E4, 0xB9E4, LBP_H2 },
+       { 0xB9E5, 0xB9FF, LBP_H3 },
+       { 0xBA00, 0xBA00, LBP_H2 },
+       { 0xBA01, 0xBA1B, LBP_H3 },
+       { 0xBA1C, 0xBA1C, LBP_H2 },
+       { 0xBA1D, 0xBA37, LBP_H3 },
+       { 0xBA38, 0xBA38, LBP_H2 },
+       { 0xBA39, 0xBA53, LBP_H3 },
+       { 0xBA54, 0xBA54, LBP_H2 },
+       { 0xBA55, 0xBA6F, LBP_H3 },
+       { 0xBA70, 0xBA70, LBP_H2 },
+       { 0xBA71, 0xBA8B, LBP_H3 },
+       { 0xBA8C, 0xBA8C, LBP_H2 },
+       { 0xBA8D, 0xBAA7, LBP_H3 },
+       { 0xBAA8, 0xBAA8, LBP_H2 },
+       { 0xBAA9, 0xBAC3, LBP_H3 },
+       { 0xBAC4, 0xBAC4, LBP_H2 },
+       { 0xBAC5, 0xBADF, LBP_H3 },
+       { 0xBAE0, 0xBAE0, LBP_H2 },
+       { 0xBAE1, 0xBAFB, LBP_H3 },
+       { 0xBAFC, 0xBAFC, LBP_H2 },
+       { 0xBAFD, 0xBB17, LBP_H3 },
+       { 0xBB18, 0xBB18, LBP_H2 },
+       { 0xBB19, 0xBB33, LBP_H3 },
+       { 0xBB34, 0xBB34, LBP_H2 },
+       { 0xBB35, 0xBB4F, LBP_H3 },
+       { 0xBB50, 0xBB50, LBP_H2 },
+       { 0xBB51, 0xBB6B, LBP_H3 },
+       { 0xBB6C, 0xBB6C, LBP_H2 },
+       { 0xBB6D, 0xBB87, LBP_H3 },
+       { 0xBB88, 0xBB88, LBP_H2 },
+       { 0xBB89, 0xBBA3, LBP_H3 },
+       { 0xBBA4, 0xBBA4, LBP_H2 },
+       { 0xBBA5, 0xBBBF, LBP_H3 },
+       { 0xBBC0, 0xBBC0, LBP_H2 },
+       { 0xBBC1, 0xBBDB, LBP_H3 },
+       { 0xBBDC, 0xBBDC, LBP_H2 },
+       { 0xBBDD, 0xBBF7, LBP_H3 },
+       { 0xBBF8, 0xBBF8, LBP_H2 },
+       { 0xBBF9, 0xBC13, LBP_H3 },
+       { 0xBC14, 0xBC14, LBP_H2 },
+       { 0xBC15, 0xBC2F, LBP_H3 },
+       { 0xBC30, 0xBC30, LBP_H2 },
+       { 0xBC31, 0xBC4B, LBP_H3 },
+       { 0xBC4C, 0xBC4C, LBP_H2 },
+       { 0xBC4D, 0xBC67, LBP_H3 },
+       { 0xBC68, 0xBC68, LBP_H2 },
+       { 0xBC69, 0xBC83, LBP_H3 },
+       { 0xBC84, 0xBC84, LBP_H2 },
+       { 0xBC85, 0xBC9F, LBP_H3 },
+       { 0xBCA0, 0xBCA0, LBP_H2 },
+       { 0xBCA1, 0xBCBB, LBP_H3 },
+       { 0xBCBC, 0xBCBC, LBP_H2 },
+       { 0xBCBD, 0xBCD7, LBP_H3 },
+       { 0xBCD8, 0xBCD8, LBP_H2 },
+       { 0xBCD9, 0xBCF3, LBP_H3 },
+       { 0xBCF4, 0xBCF4, LBP_H2 },
+       { 0xBCF5, 0xBD0F, LBP_H3 },
+       { 0xBD10, 0xBD10, LBP_H2 },
+       { 0xBD11, 0xBD2B, LBP_H3 },
+       { 0xBD2C, 0xBD2C, LBP_H2 },
+       { 0xBD2D, 0xBD47, LBP_H3 },
+       { 0xBD48, 0xBD48, LBP_H2 },
+       { 0xBD49, 0xBD63, LBP_H3 },
+       { 0xBD64, 0xBD64, LBP_H2 },
+       { 0xBD65, 0xBD7F, LBP_H3 },
+       { 0xBD80, 0xBD80, LBP_H2 },
+       { 0xBD81, 0xBD9B, LBP_H3 },
+       { 0xBD9C, 0xBD9C, LBP_H2 },
+       { 0xBD9D, 0xBDB7, LBP_H3 },
+       { 0xBDB8, 0xBDB8, LBP_H2 },
+       { 0xBDB9, 0xBDD3, LBP_H3 },
+       { 0xBDD4, 0xBDD4, LBP_H2 },
+       { 0xBDD5, 0xBDEF, LBP_H3 },
+       { 0xBDF0, 0xBDF0, LBP_H2 },
+       { 0xBDF1, 0xBE0B, LBP_H3 },
+       { 0xBE0C, 0xBE0C, LBP_H2 },
+       { 0xBE0D, 0xBE27, LBP_H3 },
+       { 0xBE28, 0xBE28, LBP_H2 },
+       { 0xBE29, 0xBE43, LBP_H3 },
+       { 0xBE44, 0xBE44, LBP_H2 },
+       { 0xBE45, 0xBE5F, LBP_H3 },
+       { 0xBE60, 0xBE60, LBP_H2 },
+       { 0xBE61, 0xBE7B, LBP_H3 },
+       { 0xBE7C, 0xBE7C, LBP_H2 },
+       { 0xBE7D, 0xBE97, LBP_H3 },
+       { 0xBE98, 0xBE98, LBP_H2 },
+       { 0xBE99, 0xBEB3, LBP_H3 },
+       { 0xBEB4, 0xBEB4, LBP_H2 },
+       { 0xBEB5, 0xBECF, LBP_H3 },
+       { 0xBED0, 0xBED0, LBP_H2 },
+       { 0xBED1, 0xBEEB, LBP_H3 },
+       { 0xBEEC, 0xBEEC, LBP_H2 },
+       { 0xBEED, 0xBF07, LBP_H3 },
+       { 0xBF08, 0xBF08, LBP_H2 },
+       { 0xBF09, 0xBF23, LBP_H3 },
+       { 0xBF24, 0xBF24, LBP_H2 },
+       { 0xBF25, 0xBF3F, LBP_H3 },
+       { 0xBF40, 0xBF40, LBP_H2 },
+       { 0xBF41, 0xBF5B, LBP_H3 },
+       { 0xBF5C, 0xBF5C, LBP_H2 },
+       { 0xBF5D, 0xBF77, LBP_H3 },
+       { 0xBF78, 0xBF78, LBP_H2 },
+       { 0xBF79, 0xBF93, LBP_H3 },
+       { 0xBF94, 0xBF94, LBP_H2 },
+       { 0xBF95, 0xBFAF, LBP_H3 },
+       { 0xBFB0, 0xBFB0, LBP_H2 },
+       { 0xBFB1, 0xBFCB, LBP_H3 },
+       { 0xBFCC, 0xBFCC, LBP_H2 },
+       { 0xBFCD, 0xBFE7, LBP_H3 },
+       { 0xBFE8, 0xBFE8, LBP_H2 },
+       { 0xBFE9, 0xC003, LBP_H3 },
+       { 0xC004, 0xC004, LBP_H2 },
+       { 0xC005, 0xC01F, LBP_H3 },
+       { 0xC020, 0xC020, LBP_H2 },
+       { 0xC021, 0xC03B, LBP_H3 },
+       { 0xC03C, 0xC03C, LBP_H2 },
+       { 0xC03D, 0xC057, LBP_H3 },
+       { 0xC058, 0xC058, LBP_H2 },
+       { 0xC059, 0xC073, LBP_H3 },
+       { 0xC074, 0xC074, LBP_H2 },
+       { 0xC075, 0xC08F, LBP_H3 },
+       { 0xC090, 0xC090, LBP_H2 },
+       { 0xC091, 0xC0AB, LBP_H3 },
+       { 0xC0AC, 0xC0AC, LBP_H2 },
+       { 0xC0AD, 0xC0C7, LBP_H3 },
+       { 0xC0C8, 0xC0C8, LBP_H2 },
+       { 0xC0C9, 0xC0E3, LBP_H3 },
+       { 0xC0E4, 0xC0E4, LBP_H2 },
+       { 0xC0E5, 0xC0FF, LBP_H3 },
+       { 0xC100, 0xC100, LBP_H2 },
+       { 0xC101, 0xC11B, LBP_H3 },
+       { 0xC11C, 0xC11C, LBP_H2 },
+       { 0xC11D, 0xC137, LBP_H3 },
+       { 0xC138, 0xC138, LBP_H2 },
+       { 0xC139, 0xC153, LBP_H3 },
+       { 0xC154, 0xC154, LBP_H2 },
+       { 0xC155, 0xC16F, LBP_H3 },
+       { 0xC170, 0xC170, LBP_H2 },
+       { 0xC171, 0xC18B, LBP_H3 },
+       { 0xC18C, 0xC18C, LBP_H2 },
+       { 0xC18D, 0xC1A7, LBP_H3 },
+       { 0xC1A8, 0xC1A8, LBP_H2 },
+       { 0xC1A9, 0xC1C3, LBP_H3 },
+       { 0xC1C4, 0xC1C4, LBP_H2 },
+       { 0xC1C5, 0xC1DF, LBP_H3 },
+       { 0xC1E0, 0xC1E0, LBP_H2 },
+       { 0xC1E1, 0xC1FB, LBP_H3 },
+       { 0xC1FC, 0xC1FC, LBP_H2 },
+       { 0xC1FD, 0xC217, LBP_H3 },
+       { 0xC218, 0xC218, LBP_H2 },
+       { 0xC219, 0xC233, LBP_H3 },
+       { 0xC234, 0xC234, LBP_H2 },
+       { 0xC235, 0xC24F, LBP_H3 },
+       { 0xC250, 0xC250, LBP_H2 },
+       { 0xC251, 0xC26B, LBP_H3 },
+       { 0xC26C, 0xC26C, LBP_H2 },
+       { 0xC26D, 0xC287, LBP_H3 },
+       { 0xC288, 0xC288, LBP_H2 },
+       { 0xC289, 0xC2A3, LBP_H3 },
+       { 0xC2A4, 0xC2A4, LBP_H2 },
+       { 0xC2A5, 0xC2BF, LBP_H3 },
+       { 0xC2C0, 0xC2C0, LBP_H2 },
+       { 0xC2C1, 0xC2DB, LBP_H3 },
+       { 0xC2DC, 0xC2DC, LBP_H2 },
+       { 0xC2DD, 0xC2F7, LBP_H3 },
+       { 0xC2F8, 0xC2F8, LBP_H2 },
+       { 0xC2F9, 0xC313, LBP_H3 },
+       { 0xC314, 0xC314, LBP_H2 },
+       { 0xC315, 0xC32F, LBP_H3 },
+       { 0xC330, 0xC330, LBP_H2 },
+       { 0xC331, 0xC34B, LBP_H3 },
+       { 0xC34C, 0xC34C, LBP_H2 },
+       { 0xC34D, 0xC367, LBP_H3 },
+       { 0xC368, 0xC368, LBP_H2 },
+       { 0xC369, 0xC383, LBP_H3 },
+       { 0xC384, 0xC384, LBP_H2 },
+       { 0xC385, 0xC39F, LBP_H3 },
+       { 0xC3A0, 0xC3A0, LBP_H2 },
+       { 0xC3A1, 0xC3BB, LBP_H3 },
+       { 0xC3BC, 0xC3BC, LBP_H2 },
+       { 0xC3BD, 0xC3D7, LBP_H3 },
+       { 0xC3D8, 0xC3D8, LBP_H2 },
+       { 0xC3D9, 0xC3F3, LBP_H3 },
+       { 0xC3F4, 0xC3F4, LBP_H2 },
+       { 0xC3F5, 0xC40F, LBP_H3 },
+       { 0xC410, 0xC410, LBP_H2 },
+       { 0xC411, 0xC42B, LBP_H3 },
+       { 0xC42C, 0xC42C, LBP_H2 },
+       { 0xC42D, 0xC447, LBP_H3 },
+       { 0xC448, 0xC448, LBP_H2 },
+       { 0xC449, 0xC463, LBP_H3 },
+       { 0xC464, 0xC464, LBP_H2 },
+       { 0xC465, 0xC47F, LBP_H3 },
+       { 0xC480, 0xC480, LBP_H2 },
+       { 0xC481, 0xC49B, LBP_H3 },
+       { 0xC49C, 0xC49C, LBP_H2 },
+       { 0xC49D, 0xC4B7, LBP_H3 },
+       { 0xC4B8, 0xC4B8, LBP_H2 },
+       { 0xC4B9, 0xC4D3, LBP_H3 },
+       { 0xC4D4, 0xC4D4, LBP_H2 },
+       { 0xC4D5, 0xC4EF, LBP_H3 },
+       { 0xC4F0, 0xC4F0, LBP_H2 },
+       { 0xC4F1, 0xC50B, LBP_H3 },
+       { 0xC50C, 0xC50C, LBP_H2 },
+       { 0xC50D, 0xC527, LBP_H3 },
+       { 0xC528, 0xC528, LBP_H2 },
+       { 0xC529, 0xC543, LBP_H3 },
+       { 0xC544, 0xC544, LBP_H2 },
+       { 0xC545, 0xC55F, LBP_H3 },
+       { 0xC560, 0xC560, LBP_H2 },
+       { 0xC561, 0xC57B, LBP_H3 },
+       { 0xC57C, 0xC57C, LBP_H2 },
+       { 0xC57D, 0xC597, LBP_H3 },
+       { 0xC598, 0xC598, LBP_H2 },
+       { 0xC599, 0xC5B3, LBP_H3 },
+       { 0xC5B4, 0xC5B4, LBP_H2 },
+       { 0xC5B5, 0xC5CF, LBP_H3 },
+       { 0xC5D0, 0xC5D0, LBP_H2 },
+       { 0xC5D1, 0xC5EB, LBP_H3 },
+       { 0xC5EC, 0xC5EC, LBP_H2 },
+       { 0xC5ED, 0xC607, LBP_H3 },
+       { 0xC608, 0xC608, LBP_H2 },
+       { 0xC609, 0xC623, LBP_H3 },
+       { 0xC624, 0xC624, LBP_H2 },
+       { 0xC625, 0xC63F, LBP_H3 },
+       { 0xC640, 0xC640, LBP_H2 },
+       { 0xC641, 0xC65B, LBP_H3 },
+       { 0xC65C, 0xC65C, LBP_H2 },
+       { 0xC65D, 0xC677, LBP_H3 },
+       { 0xC678, 0xC678, LBP_H2 },
+       { 0xC679, 0xC693, LBP_H3 },
+       { 0xC694, 0xC694, LBP_H2 },
+       { 0xC695, 0xC6AF, LBP_H3 },
+       { 0xC6B0, 0xC6B0, LBP_H2 },
+       { 0xC6B1, 0xC6CB, LBP_H3 },
+       { 0xC6CC, 0xC6CC, LBP_H2 },
+       { 0xC6CD, 0xC6E7, LBP_H3 },
+       { 0xC6E8, 0xC6E8, LBP_H2 },
+       { 0xC6E9, 0xC703, LBP_H3 },
+       { 0xC704, 0xC704, LBP_H2 },
+       { 0xC705, 0xC71F, LBP_H3 },
+       { 0xC720, 0xC720, LBP_H2 },
+       { 0xC721, 0xC73B, LBP_H3 },
+       { 0xC73C, 0xC73C, LBP_H2 },
+       { 0xC73D, 0xC757, LBP_H3 },
+       { 0xC758, 0xC758, LBP_H2 },
+       { 0xC759, 0xC773, LBP_H3 },
+       { 0xC774, 0xC774, LBP_H2 },
+       { 0xC775, 0xC78F, LBP_H3 },
+       { 0xC790, 0xC790, LBP_H2 },
+       { 0xC791, 0xC7AB, LBP_H3 },
+       { 0xC7AC, 0xC7AC, LBP_H2 },
+       { 0xC7AD, 0xC7C7, LBP_H3 },
+       { 0xC7C8, 0xC7C8, LBP_H2 },
+       { 0xC7C9, 0xC7E3, LBP_H3 },
+       { 0xC7E4, 0xC7E4, LBP_H2 },
+       { 0xC7E5, 0xC7FF, LBP_H3 },
+       { 0xC800, 0xC800, LBP_H2 },
+       { 0xC801, 0xC81B, LBP_H3 },
+       { 0xC81C, 0xC81C, LBP_H2 },
+       { 0xC81D, 0xC837, LBP_H3 },
+       { 0xC838, 0xC838, LBP_H2 },
+       { 0xC839, 0xC853, LBP_H3 },
+       { 0xC854, 0xC854, LBP_H2 },
+       { 0xC855, 0xC86F, LBP_H3 },
+       { 0xC870, 0xC870, LBP_H2 },
+       { 0xC871, 0xC88B, LBP_H3 },
+       { 0xC88C, 0xC88C, LBP_H2 },
+       { 0xC88D, 0xC8A7, LBP_H3 },
+       { 0xC8A8, 0xC8A8, LBP_H2 },
+       { 0xC8A9, 0xC8C3, LBP_H3 },
+       { 0xC8C4, 0xC8C4, LBP_H2 },
+       { 0xC8C5, 0xC8DF, LBP_H3 },
+       { 0xC8E0, 0xC8E0, LBP_H2 },
+       { 0xC8E1, 0xC8FB, LBP_H3 },
+       { 0xC8FC, 0xC8FC, LBP_H2 },
+       { 0xC8FD, 0xC917, LBP_H3 },
+       { 0xC918, 0xC918, LBP_H2 },
+       { 0xC919, 0xC933, LBP_H3 },
+       { 0xC934, 0xC934, LBP_H2 },
+       { 0xC935, 0xC94F, LBP_H3 },
+       { 0xC950, 0xC950, LBP_H2 },
+       { 0xC951, 0xC96B, LBP_H3 },
+       { 0xC96C, 0xC96C, LBP_H2 },
+       { 0xC96D, 0xC987, LBP_H3 },
+       { 0xC988, 0xC988, LBP_H2 },
+       { 0xC989, 0xC9A3, LBP_H3 },
+       { 0xC9A4, 0xC9A4, LBP_H2 },
+       { 0xC9A5, 0xC9BF, LBP_H3 },
+       { 0xC9C0, 0xC9C0, LBP_H2 },
+       { 0xC9C1, 0xC9DB, LBP_H3 },
+       { 0xC9DC, 0xC9DC, LBP_H2 },
+       { 0xC9DD, 0xC9F7, LBP_H3 },
+       { 0xC9F8, 0xC9F8, LBP_H2 },
+       { 0xC9F9, 0xCA13, LBP_H3 },
+       { 0xCA14, 0xCA14, LBP_H2 },
+       { 0xCA15, 0xCA2F, LBP_H3 },
+       { 0xCA30, 0xCA30, LBP_H2 },
+       { 0xCA31, 0xCA4B, LBP_H3 },
+       { 0xCA4C, 0xCA4C, LBP_H2 },
+       { 0xCA4D, 0xCA67, LBP_H3 },
+       { 0xCA68, 0xCA68, LBP_H2 },
+       { 0xCA69, 0xCA83, LBP_H3 },
+       { 0xCA84, 0xCA84, LBP_H2 },
+       { 0xCA85, 0xCA9F, LBP_H3 },
+       { 0xCAA0, 0xCAA0, LBP_H2 },
+       { 0xCAA1, 0xCABB, LBP_H3 },
+       { 0xCABC, 0xCABC, LBP_H2 },
+       { 0xCABD, 0xCAD7, LBP_H3 },
+       { 0xCAD8, 0xCAD8, LBP_H2 },
+       { 0xCAD9, 0xCAF3, LBP_H3 },
+       { 0xCAF4, 0xCAF4, LBP_H2 },
+       { 0xCAF5, 0xCB0F, LBP_H3 },
+       { 0xCB10, 0xCB10, LBP_H2 },
+       { 0xCB11, 0xCB2B, LBP_H3 },
+       { 0xCB2C, 0xCB2C, LBP_H2 },
+       { 0xCB2D, 0xCB47, LBP_H3 },
+       { 0xCB48, 0xCB48, LBP_H2 },
+       { 0xCB49, 0xCB63, LBP_H3 },
+       { 0xCB64, 0xCB64, LBP_H2 },
+       { 0xCB65, 0xCB7F, LBP_H3 },
+       { 0xCB80, 0xCB80, LBP_H2 },
+       { 0xCB81, 0xCB9B, LBP_H3 },
+       { 0xCB9C, 0xCB9C, LBP_H2 },
+       { 0xCB9D, 0xCBB7, LBP_H3 },
+       { 0xCBB8, 0xCBB8, LBP_H2 },
+       { 0xCBB9, 0xCBD3, LBP_H3 },
+       { 0xCBD4, 0xCBD4, LBP_H2 },
+       { 0xCBD5, 0xCBEF, LBP_H3 },
+       { 0xCBF0, 0xCBF0, LBP_H2 },
+       { 0xCBF1, 0xCC0B, LBP_H3 },
+       { 0xCC0C, 0xCC0C, LBP_H2 },
+       { 0xCC0D, 0xCC27, LBP_H3 },
+       { 0xCC28, 0xCC28, LBP_H2 },
+       { 0xCC29, 0xCC43, LBP_H3 },
+       { 0xCC44, 0xCC44, LBP_H2 },
+       { 0xCC45, 0xCC5F, LBP_H3 },
+       { 0xCC60, 0xCC60, LBP_H2 },
+       { 0xCC61, 0xCC7B, LBP_H3 },
+       { 0xCC7C, 0xCC7C, LBP_H2 },
+       { 0xCC7D, 0xCC97, LBP_H3 },
+       { 0xCC98, 0xCC98, LBP_H2 },
+       { 0xCC99, 0xCCB3, LBP_H3 },
+       { 0xCCB4, 0xCCB4, LBP_H2 },
+       { 0xCCB5, 0xCCCF, LBP_H3 },
+       { 0xCCD0, 0xCCD0, LBP_H2 },
+       { 0xCCD1, 0xCCEB, LBP_H3 },
+       { 0xCCEC, 0xCCEC, LBP_H2 },
+       { 0xCCED, 0xCD07, LBP_H3 },
+       { 0xCD08, 0xCD08, LBP_H2 },
+       { 0xCD09, 0xCD23, LBP_H3 },
+       { 0xCD24, 0xCD24, LBP_H2 },
+       { 0xCD25, 0xCD3F, LBP_H3 },
+       { 0xCD40, 0xCD40, LBP_H2 },
+       { 0xCD41, 0xCD5B, LBP_H3 },
+       { 0xCD5C, 0xCD5C, LBP_H2 },
+       { 0xCD5D, 0xCD77, LBP_H3 },
+       { 0xCD78, 0xCD78, LBP_H2 },
+       { 0xCD79, 0xCD93, LBP_H3 },
+       { 0xCD94, 0xCD94, LBP_H2 },
+       { 0xCD95, 0xCDAF, LBP_H3 },
+       { 0xCDB0, 0xCDB0, LBP_H2 },
+       { 0xCDB1, 0xCDCB, LBP_H3 },
+       { 0xCDCC, 0xCDCC, LBP_H2 },
+       { 0xCDCD, 0xCDE7, LBP_H3 },
+       { 0xCDE8, 0xCDE8, LBP_H2 },
+       { 0xCDE9, 0xCE03, LBP_H3 },
+       { 0xCE04, 0xCE04, LBP_H2 },
+       { 0xCE05, 0xCE1F, LBP_H3 },
+       { 0xCE20, 0xCE20, LBP_H2 },
+       { 0xCE21, 0xCE3B, LBP_H3 },
+       { 0xCE3C, 0xCE3C, LBP_H2 },
+       { 0xCE3D, 0xCE57, LBP_H3 },
+       { 0xCE58, 0xCE58, LBP_H2 },
+       { 0xCE59, 0xCE73, LBP_H3 },
+       { 0xCE74, 0xCE74, LBP_H2 },
+       { 0xCE75, 0xCE8F, LBP_H3 },
+       { 0xCE90, 0xCE90, LBP_H2 },
+       { 0xCE91, 0xCEAB, LBP_H3 },
+       { 0xCEAC, 0xCEAC, LBP_H2 },
+       { 0xCEAD, 0xCEC7, LBP_H3 },
+       { 0xCEC8, 0xCEC8, LBP_H2 },
+       { 0xCEC9, 0xCEE3, LBP_H3 },
+       { 0xCEE4, 0xCEE4, LBP_H2 },
+       { 0xCEE5, 0xCEFF, LBP_H3 },
+       { 0xCF00, 0xCF00, LBP_H2 },
+       { 0xCF01, 0xCF1B, LBP_H3 },
+       { 0xCF1C, 0xCF1C, LBP_H2 },
+       { 0xCF1D, 0xCF37, LBP_H3 },
+       { 0xCF38, 0xCF38, LBP_H2 },
+       { 0xCF39, 0xCF53, LBP_H3 },
+       { 0xCF54, 0xCF54, LBP_H2 },
+       { 0xCF55, 0xCF6F, LBP_H3 },
+       { 0xCF70, 0xCF70, LBP_H2 },
+       { 0xCF71, 0xCF8B, LBP_H3 },
+       { 0xCF8C, 0xCF8C, LBP_H2 },
+       { 0xCF8D, 0xCFA7, LBP_H3 },
+       { 0xCFA8, 0xCFA8, LBP_H2 },
+       { 0xCFA9, 0xCFC3, LBP_H3 },
+       { 0xCFC4, 0xCFC4, LBP_H2 },
+       { 0xCFC5, 0xCFDF, LBP_H3 },
+       { 0xCFE0, 0xCFE0, LBP_H2 },
+       { 0xCFE1, 0xCFFB, LBP_H3 },
+       { 0xCFFC, 0xCFFC, LBP_H2 },
+       { 0xCFFD, 0xD017, LBP_H3 },
+       { 0xD018, 0xD018, LBP_H2 },
+       { 0xD019, 0xD033, LBP_H3 },
+       { 0xD034, 0xD034, LBP_H2 },
+       { 0xD035, 0xD04F, LBP_H3 },
+       { 0xD050, 0xD050, LBP_H2 },
+       { 0xD051, 0xD06B, LBP_H3 },
+       { 0xD06C, 0xD06C, LBP_H2 },
+       { 0xD06D, 0xD087, LBP_H3 },
+       { 0xD088, 0xD088, LBP_H2 },
+       { 0xD089, 0xD0A3, LBP_H3 },
+       { 0xD0A4, 0xD0A4, LBP_H2 },
+       { 0xD0A5, 0xD0BF, LBP_H3 },
+       { 0xD0C0, 0xD0C0, LBP_H2 },
+       { 0xD0C1, 0xD0DB, LBP_H3 },
+       { 0xD0DC, 0xD0DC, LBP_H2 },
+       { 0xD0DD, 0xD0F7, LBP_H3 },
+       { 0xD0F8, 0xD0F8, LBP_H2 },
+       { 0xD0F9, 0xD113, LBP_H3 },
+       { 0xD114, 0xD114, LBP_H2 },
+       { 0xD115, 0xD12F, LBP_H3 },
+       { 0xD130, 0xD130, LBP_H2 },
+       { 0xD131, 0xD14B, LBP_H3 },
+       { 0xD14C, 0xD14C, LBP_H2 },
+       { 0xD14D, 0xD167, LBP_H3 },
+       { 0xD168, 0xD168, LBP_H2 },
+       { 0xD169, 0xD183, LBP_H3 },
+       { 0xD184, 0xD184, LBP_H2 },
+       { 0xD185, 0xD19F, LBP_H3 },
+       { 0xD1A0, 0xD1A0, LBP_H2 },
+       { 0xD1A1, 0xD1BB, LBP_H3 },
+       { 0xD1BC, 0xD1BC, LBP_H2 },
+       { 0xD1BD, 0xD1D7, LBP_H3 },
+       { 0xD1D8, 0xD1D8, LBP_H2 },
+       { 0xD1D9, 0xD1F3, LBP_H3 },
+       { 0xD1F4, 0xD1F4, LBP_H2 },
+       { 0xD1F5, 0xD20F, LBP_H3 },
+       { 0xD210, 0xD210, LBP_H2 },
+       { 0xD211, 0xD22B, LBP_H3 },
+       { 0xD22C, 0xD22C, LBP_H2 },
+       { 0xD22D, 0xD247, LBP_H3 },
+       { 0xD248, 0xD248, LBP_H2 },
+       { 0xD249, 0xD263, LBP_H3 },
+       { 0xD264, 0xD264, LBP_H2 },
+       { 0xD265, 0xD27F, LBP_H3 },
+       { 0xD280, 0xD280, LBP_H2 },
+       { 0xD281, 0xD29B, LBP_H3 },
+       { 0xD29C, 0xD29C, LBP_H2 },
+       { 0xD29D, 0xD2B7, LBP_H3 },
+       { 0xD2B8, 0xD2B8, LBP_H2 },
+       { 0xD2B9, 0xD2D3, LBP_H3 },
+       { 0xD2D4, 0xD2D4, LBP_H2 },
+       { 0xD2D5, 0xD2EF, LBP_H3 },
+       { 0xD2F0, 0xD2F0, LBP_H2 },
+       { 0xD2F1, 0xD30B, LBP_H3 },
+       { 0xD30C, 0xD30C, LBP_H2 },
+       { 0xD30D, 0xD327, LBP_H3 },
+       { 0xD328, 0xD328, LBP_H2 },
+       { 0xD329, 0xD343, LBP_H3 },
+       { 0xD344, 0xD344, LBP_H2 },
+       { 0xD345, 0xD35F, LBP_H3 },
+       { 0xD360, 0xD360, LBP_H2 },
+       { 0xD361, 0xD37B, LBP_H3 },
+       { 0xD37C, 0xD37C, LBP_H2 },
+       { 0xD37D, 0xD397, LBP_H3 },
+       { 0xD398, 0xD398, LBP_H2 },
+       { 0xD399, 0xD3B3, LBP_H3 },
+       { 0xD3B4, 0xD3B4, LBP_H2 },
+       { 0xD3B5, 0xD3CF, LBP_H3 },
+       { 0xD3D0, 0xD3D0, LBP_H2 },
+       { 0xD3D1, 0xD3EB, LBP_H3 },
+       { 0xD3EC, 0xD3EC, LBP_H2 },
+       { 0xD3ED, 0xD407, LBP_H3 },
+       { 0xD408, 0xD408, LBP_H2 },
+       { 0xD409, 0xD423, LBP_H3 },
+       { 0xD424, 0xD424, LBP_H2 },
+       { 0xD425, 0xD43F, LBP_H3 },
+       { 0xD440, 0xD440, LBP_H2 },
+       { 0xD441, 0xD45B, LBP_H3 },
+       { 0xD45C, 0xD45C, LBP_H2 },
+       { 0xD45D, 0xD477, LBP_H3 },
+       { 0xD478, 0xD478, LBP_H2 },
+       { 0xD479, 0xD493, LBP_H3 },
+       { 0xD494, 0xD494, LBP_H2 },
+       { 0xD495, 0xD4AF, LBP_H3 },
+       { 0xD4B0, 0xD4B0, LBP_H2 },
+       { 0xD4B1, 0xD4CB, LBP_H3 },
+       { 0xD4CC, 0xD4CC, LBP_H2 },
+       { 0xD4CD, 0xD4E7, LBP_H3 },
+       { 0xD4E8, 0xD4E8, LBP_H2 },
+       { 0xD4E9, 0xD503, LBP_H3 },
+       { 0xD504, 0xD504, LBP_H2 },
+       { 0xD505, 0xD51F, LBP_H3 },
+       { 0xD520, 0xD520, LBP_H2 },
+       { 0xD521, 0xD53B, LBP_H3 },
+       { 0xD53C, 0xD53C, LBP_H2 },
+       { 0xD53D, 0xD557, LBP_H3 },
+       { 0xD558, 0xD558, LBP_H2 },
+       { 0xD559, 0xD573, LBP_H3 },
+       { 0xD574, 0xD574, LBP_H2 },
+       { 0xD575, 0xD58F, LBP_H3 },
+       { 0xD590, 0xD590, LBP_H2 },
+       { 0xD591, 0xD5AB, LBP_H3 },
+       { 0xD5AC, 0xD5AC, LBP_H2 },
+       { 0xD5AD, 0xD5C7, LBP_H3 },
+       { 0xD5C8, 0xD5C8, LBP_H2 },
+       { 0xD5C9, 0xD5E3, LBP_H3 },
+       { 0xD5E4, 0xD5E4, LBP_H2 },
+       { 0xD5E5, 0xD5FF, LBP_H3 },
+       { 0xD600, 0xD600, LBP_H2 },
+       { 0xD601, 0xD61B, LBP_H3 },
+       { 0xD61C, 0xD61C, LBP_H2 },
+       { 0xD61D, 0xD637, LBP_H3 },
+       { 0xD638, 0xD638, LBP_H2 },
+       { 0xD639, 0xD653, LBP_H3 },
+       { 0xD654, 0xD654, LBP_H2 },
+       { 0xD655, 0xD66F, LBP_H3 },
+       { 0xD670, 0xD670, LBP_H2 },
+       { 0xD671, 0xD68B, LBP_H3 },
+       { 0xD68C, 0xD68C, LBP_H2 },
+       { 0xD68D, 0xD6A7, LBP_H3 },
+       { 0xD6A8, 0xD6A8, LBP_H2 },
+       { 0xD6A9, 0xD6C3, LBP_H3 },
+       { 0xD6C4, 0xD6C4, LBP_H2 },
+       { 0xD6C5, 0xD6DF, LBP_H3 },
+       { 0xD6E0, 0xD6E0, LBP_H2 },
+       { 0xD6E1, 0xD6FB, LBP_H3 },
+       { 0xD6FC, 0xD6FC, LBP_H2 },
+       { 0xD6FD, 0xD717, LBP_H3 },
+       { 0xD718, 0xD718, LBP_H2 },
+       { 0xD719, 0xD733, LBP_H3 },
+       { 0xD734, 0xD734, LBP_H2 },
+       { 0xD735, 0xD74F, LBP_H3 },
+       { 0xD750, 0xD750, LBP_H2 },
+       { 0xD751, 0xD76B, LBP_H3 },
+       { 0xD76C, 0xD76C, LBP_H2 },
+       { 0xD76D, 0xD787, LBP_H3 },
+       { 0xD788, 0xD788, LBP_H2 },
+       { 0xD789, 0xD7A3, LBP_H3 },
+       { 0xD7B0, 0xD7C6, LBP_JV },
+       { 0xD7CB, 0xD7FB, LBP_JT },
+       { 0xD800, 0xDFFF, LBP_SG },
+       { 0xE000, 0xF8FF, LBP_XX },
+       { 0xF900, 0xFAFF, LBP_ID },
+       { 0xFB00, 0xFB1D, LBP_AL },
+       { 0xFB1E, 0xFB1E, LBP_CM },
+       { 0xFB1F, 0xFD3D, LBP_AL },
+       { 0xFD3E, 0xFD3E, LBP_OP },
+       { 0xFD3F, 0xFD3F, LBP_CL },
+       { 0xFD50, 0xFDFB, LBP_AL },
+       { 0xFDFC, 0xFDFC, LBP_PO },
+       { 0xFDFD, 0xFDFD, LBP_AL },
+       { 0xFE00, 0xFE0F, LBP_CM },
+       { 0xFE10, 0xFE10, LBP_IS },
+       { 0xFE11, 0xFE12, LBP_CL },
+       { 0xFE13, 0xFE14, LBP_IS },
+       { 0xFE15, 0xFE16, LBP_EX },
+       { 0xFE17, 0xFE17, LBP_OP },
+       { 0xFE18, 0xFE18, LBP_CL },
+       { 0xFE19, 0xFE19, LBP_IN },
+       { 0xFE20, 0xFE26, LBP_CM },
+       { 0xFE30, 0xFE34, LBP_ID },
+       { 0xFE35, 0xFE35, LBP_OP },
+       { 0xFE36, 0xFE36, LBP_CL },
+       { 0xFE37, 0xFE37, LBP_OP },
+       { 0xFE38, 0xFE38, LBP_CL },
+       { 0xFE39, 0xFE39, LBP_OP },
+       { 0xFE3A, 0xFE3A, LBP_CL },
+       { 0xFE3B, 0xFE3B, LBP_OP },
+       { 0xFE3C, 0xFE3C, LBP_CL },
+       { 0xFE3D, 0xFE3D, LBP_OP },
+       { 0xFE3E, 0xFE3E, LBP_CL },
+       { 0xFE3F, 0xFE3F, LBP_OP },
+       { 0xFE40, 0xFE40, LBP_CL },
+       { 0xFE41, 0xFE41, LBP_OP },
+       { 0xFE42, 0xFE42, LBP_CL },
+       { 0xFE43, 0xFE43, LBP_OP },
+       { 0xFE44, 0xFE44, LBP_CL },
+       { 0xFE45, 0xFE46, LBP_ID },
+       { 0xFE47, 0xFE47, LBP_OP },
+       { 0xFE48, 0xFE48, LBP_CL },
+       { 0xFE49, 0xFE4F, LBP_ID },
+       { 0xFE50, 0xFE50, LBP_CL },
+       { 0xFE51, 0xFE51, LBP_ID },
+       { 0xFE52, 0xFE52, LBP_CL },
+       { 0xFE54, 0xFE55, LBP_NS },
+       { 0xFE56, 0xFE57, LBP_EX },
+       { 0xFE58, 0xFE58, LBP_ID },
+       { 0xFE59, 0xFE59, LBP_OP },
+       { 0xFE5A, 0xFE5A, LBP_CL },
+       { 0xFE5B, 0xFE5B, LBP_OP },
+       { 0xFE5C, 0xFE5C, LBP_CL },
+       { 0xFE5D, 0xFE5D, LBP_OP },
+       { 0xFE5E, 0xFE5E, LBP_CL },
+       { 0xFE5F, 0xFE68, LBP_ID },
+       { 0xFE69, 0xFE69, LBP_PR },
+       { 0xFE6A, 0xFE6A, LBP_PO },
+       { 0xFE6B, 0xFE6B, LBP_ID },
+       { 0xFE70, 0xFEFC, LBP_AL },
+       { 0xFEFF, 0xFEFF, LBP_WJ },
+       { 0xFF01, 0xFF01, LBP_EX },
+       { 0xFF02, 0xFF03, LBP_ID },
+       { 0xFF04, 0xFF04, LBP_PR },
+       { 0xFF05, 0xFF05, LBP_PO },
+       { 0xFF06, 0xFF07, LBP_ID },
+       { 0xFF08, 0xFF08, LBP_OP },
+       { 0xFF09, 0xFF09, LBP_CL },
+       { 0xFF0A, 0xFF0B, LBP_ID },
+       { 0xFF0C, 0xFF0C, LBP_CL },
+       { 0xFF0D, 0xFF0D, LBP_ID },
+       { 0xFF0E, 0xFF0E, LBP_CL },
+       { 0xFF0F, 0xFF19, LBP_ID },
+       { 0xFF1A, 0xFF1B, LBP_NS },
+       { 0xFF1C, 0xFF1E, LBP_ID },
+       { 0xFF1F, 0xFF1F, LBP_EX },
+       { 0xFF20, 0xFF3A, LBP_ID },
+       { 0xFF3B, 0xFF3B, LBP_OP },
+       { 0xFF3C, 0xFF3C, LBP_ID },
+       { 0xFF3D, 0xFF3D, LBP_CL },
+       { 0xFF3E, 0xFF5A, LBP_ID },
+       { 0xFF5B, 0xFF5B, LBP_OP },
+       { 0xFF5C, 0xFF5C, LBP_ID },
+       { 0xFF5D, 0xFF5D, LBP_CL },
+       { 0xFF5E, 0xFF5E, LBP_ID },
+       { 0xFF5F, 0xFF5F, LBP_OP },
+       { 0xFF60, 0xFF61, LBP_CL },
+       { 0xFF62, 0xFF62, LBP_OP },
+       { 0xFF63, 0xFF64, LBP_CL },
+       { 0xFF65, 0xFF65, LBP_NS },
+       { 0xFF66, 0xFF66, LBP_AL },
+       { 0xFF67, 0xFF70, LBP_NS },
+       { 0xFF71, 0xFF9D, LBP_AL },
+       { 0xFF9E, 0xFF9F, LBP_NS },
+       { 0xFFA0, 0xFFDC, LBP_AL },
+       { 0xFFE0, 0xFFE0, LBP_PO },
+       { 0xFFE1, 0xFFE1, LBP_PR },
+       { 0xFFE2, 0xFFE4, LBP_ID },
+       { 0xFFE5, 0xFFE6, LBP_PR },
+       { 0xFFE8, 0xFFEE, LBP_AL },
+       { 0xFFF9, 0xFFFB, LBP_CM },
+       { 0xFFFC, 0xFFFC, LBP_CB },
+       { 0xFFFD, 0xFFFD, LBP_AI },
+       { 0x10000, 0x100FA, LBP_AL },
+       { 0x10100, 0x10102, LBP_BA },
+       { 0x10107, 0x101FC, LBP_AL },
+       { 0x101FD, 0x101FD, LBP_CM },
+       { 0x10280, 0x1039D, LBP_AL },
+       { 0x1039F, 0x1039F, LBP_BA },
+       { 0x103A0, 0x103CF, LBP_AL },
+       { 0x103D0, 0x103D0, LBP_BA },
+       { 0x103D1, 0x1049D, LBP_AL },
+       { 0x104A0, 0x104A9, LBP_NU },
+       { 0x10800, 0x10855, LBP_AL },
+       { 0x10857, 0x10857, LBP_BA },
+       { 0x10858, 0x1091B, LBP_AL },
+       { 0x1091F, 0x1091F, LBP_BA },
+       { 0x10920, 0x10A00, LBP_AL },
+       { 0x10A01, 0x10A0F, LBP_CM },
+       { 0x10A10, 0x10A33, LBP_AL },
+       { 0x10A38, 0x10A3F, LBP_CM },
+       { 0x10A40, 0x10A47, LBP_AL },
+       { 0x10A50, 0x10A57, LBP_BA },
+       { 0x10A58, 0x10B35, LBP_AL },
+       { 0x10B39, 0x10B3F, LBP_BA },
+       { 0x10B40, 0x10E7E, LBP_AL },
+       { 0x11000, 0x11002, LBP_CM },
+       { 0x11003, 0x11037, LBP_AL },
+       { 0x11038, 0x11046, LBP_CM },
+       { 0x11047, 0x11048, LBP_BA },
+       { 0x11049, 0x11065, LBP_AL },
+       { 0x11066, 0x1106F, LBP_NU },
+       { 0x11080, 0x11082, LBP_CM },
+       { 0x11083, 0x110AF, LBP_AL },
+       { 0x110B0, 0x110BA, LBP_CM },
+       { 0x110BB, 0x110BD, LBP_AL },
+       { 0x110BE, 0x110C1, LBP_BA },
+       { 0x12000, 0x12462, LBP_AL },
+       { 0x12470, 0x12473, LBP_BA },
+       { 0x13000, 0x13257, LBP_AL },
+       { 0x13258, 0x1325A, LBP_OP },
+       { 0x1325B, 0x1325D, LBP_CL },
+       { 0x1325E, 0x13281, LBP_AL },
+       { 0x13282, 0x13282, LBP_CL },
+       { 0x13283, 0x13285, LBP_AL },
+       { 0x13286, 0x13286, LBP_OP },
+       { 0x13287, 0x13287, LBP_CL },
+       { 0x13288, 0x13288, LBP_OP },
+       { 0x13289, 0x13289, LBP_CL },
+       { 0x1328A, 0x13378, LBP_AL },
+       { 0x13379, 0x13379, LBP_OP },
+       { 0x1337A, 0x1337B, LBP_CL },
+       { 0x1337C, 0x16A38, LBP_AL },
+       { 0x1B000, 0x1B001, LBP_ID },
+       { 0x1D000, 0x1D164, LBP_AL },
+       { 0x1D165, 0x1D169, LBP_CM },
+       { 0x1D16A, 0x1D16C, LBP_AL },
+       { 0x1D16D, 0x1D182, LBP_CM },
+       { 0x1D183, 0x1D184, LBP_AL },
+       { 0x1D185, 0x1D18B, LBP_CM },
+       { 0x1D18C, 0x1D1A9, LBP_AL },
+       { 0x1D1AA, 0x1D1AD, LBP_CM },
+       { 0x1D1AE, 0x1D241, LBP_AL },
+       { 0x1D242, 0x1D244, LBP_CM },
+       { 0x1D245, 0x1D7CB, LBP_AL },
+       { 0x1D7CE, 0x1D7FF, LBP_NU },
+       { 0x1F000, 0x1F0DF, LBP_AL },
+       { 0x1F100, 0x1F12D, LBP_AI },
+       { 0x1F12E, 0x1F12E, LBP_AL },
+       { 0x1F130, 0x1F19A, LBP_AI },
+       { 0x1F1E6, 0x1F1FF, LBP_AL },
+       { 0x1F200, 0x1F251, LBP_ID },
+       { 0x1F300, 0x1F773, LBP_AL },
+       { 0x20000, 0x3FFFD, LBP_ID },
+       { 0xE0001, 0xE01EF, LBP_CM },
+       { 0xF0000, 0x10FFFD, LBP_XX },
+       { 0xFFFFFFFF, 0xFFFFFFFF, LBP_Undefined }
+};
diff --git a/src/static_deps/liblinebreak/linebreakdata1.tmpl b/src/static_deps/liblinebreak/linebreakdata1.tmpl
new file mode 100644 (file)
index 0000000..df06125
--- /dev/null
@@ -0,0 +1 @@
+/* The content of this file is generated from:
diff --git a/src/static_deps/liblinebreak/linebreakdata2.tmpl b/src/static_deps/liblinebreak/linebreakdata2.tmpl
new file mode 100644 (file)
index 0000000..60d0d37
--- /dev/null
@@ -0,0 +1,7 @@
+*/
+
+#include "linebreak.h"
+#include "linebreakdef.h"
+
+/** Default line breaking properties as from the Unicode Web site. */
+struct LineBreakProperties lb_prop_default[] = {
diff --git a/src/static_deps/liblinebreak/linebreakdata3.tmpl b/src/static_deps/liblinebreak/linebreakdata3.tmpl
new file mode 100644 (file)
index 0000000..a77017c
--- /dev/null
@@ -0,0 +1,2 @@
+       { 0xFFFFFFFF, 0xFFFFFFFF, LBP_Undefined }
+};
diff --git a/src/static_deps/liblinebreak/linebreakdef.c b/src/static_deps/liblinebreak/linebreakdef.c
new file mode 100644 (file)
index 0000000..9ddb4d9
--- /dev/null
@@ -0,0 +1,139 @@
+/* vim: set tabstop=4 shiftwidth=4: */
+
+/*
+ * Line breaking in a Unicode sequence.  Designed to be used in a
+ * generic text renderer.
+ *
+ * Copyright (C) 2008-2010 Wu Yongwei <wuyongwei at gmail dot com>
+ *
+ * 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 14 (UAX #14):
+ *             <URL:http://www.unicode.org/reports/tr14/>
+ *
+ * When this library was designed, this annex was at Revision 19, for
+ * Unicode 5.0.0:
+ *             <URL:http://www.unicode.org/reports/tr14/tr14-19.html>
+ *
+ * This library has been updated according to Revision 24, for
+ * Unicode 5.2.0:
+ *             <URL:http://www.unicode.org/reports/tr14/tr14-24.html>
+ *
+ * The Unicode Terms of Use are available at
+ *             <URL:http://www.unicode.org/copyright.html>
+ */
+
+/**
+ * @file       linebreakdef.c
+ *
+ * Definition of language-specific data.
+ *
+ * @version    2.0, 2010/01/03
+ * @author     Wu Yongwei
+ */
+
+#include "linebreak.h"
+#include "linebreakdef.h"
+
+/**
+ * English-specifc data over the default Unicode rules.
+ */
+static struct LineBreakProperties lb_prop_English[] = {
+       { 0x2018, 0x2018, LBP_OP },     /* Left single quotation mark: opening */
+       { 0x201C, 0x201C, LBP_OP },     /* Left double quotation mark: opening */
+       { 0x201D, 0x201D, LBP_CL },     /* Right double quotation mark: closing */
+       { 0, 0, LBP_Undefined }
+};
+
+/**
+ * German-specifc data over the default Unicode rules.
+ */
+static struct LineBreakProperties lb_prop_German[] = {
+       { 0x00AB, 0x00AB, LBP_CL },     /* Left double angle quotation mark: closing */
+       { 0x00BB, 0x00BB, LBP_OP },     /* Right double angle quotation mark: opening */
+       { 0x2018, 0x2018, LBP_CL },     /* Left single quotation mark: closing */
+       { 0x201C, 0x201C, LBP_CL },     /* Left double quotation mark: closing */
+       { 0x2039, 0x2039, LBP_CL },     /* Left single angle quotation mark: closing */
+       { 0x203A, 0x203A, LBP_OP },     /* Right single angle quotation mark: opening */
+       { 0, 0, LBP_Undefined }
+};
+
+/**
+ * Spanish-specifc data over the default Unicode rules.
+ */
+static struct LineBreakProperties lb_prop_Spanish[] = {
+       { 0x00AB, 0x00AB, LBP_OP },     /* Left double angle quotation mark: opening */
+       { 0x00BB, 0x00BB, LBP_CL },     /* Right double angle quotation mark: closing */
+       { 0x2018, 0x2018, LBP_OP },     /* Left single quotation mark: opening */
+       { 0x201C, 0x201C, LBP_OP },     /* Left double quotation mark: opening */
+       { 0x201D, 0x201D, LBP_CL },     /* Right double quotation mark: closing */
+       { 0x2039, 0x2039, LBP_OP },     /* Left single angle quotation mark: opening */
+       { 0x203A, 0x203A, LBP_CL },     /* Right single angle quotation mark: closing */
+       { 0, 0, LBP_Undefined }
+};
+
+/**
+ * French-specifc data over the default Unicode rules.
+ */
+static struct LineBreakProperties lb_prop_French[] = {
+       { 0x00AB, 0x00AB, LBP_OP },     /* Left double angle quotation mark: opening */
+       { 0x00BB, 0x00BB, LBP_CL },     /* Right double angle quotation mark: closing */
+       { 0x2018, 0x2018, LBP_OP },     /* Left single quotation mark: opening */
+       { 0x201C, 0x201C, LBP_OP },     /* Left double quotation mark: opening */
+       { 0x201D, 0x201D, LBP_CL },     /* Right double quotation mark: closing */
+       { 0x2039, 0x2039, LBP_OP },     /* Left single angle quotation mark: opening */
+       { 0x203A, 0x203A, LBP_CL },     /* Right single angle quotation mark: closing */
+       { 0, 0, LBP_Undefined }
+};
+
+/**
+ * Russian-specifc data over the default Unicode rules.
+ */
+static struct LineBreakProperties lb_prop_Russian[] = {
+       { 0x00AB, 0x00AB, LBP_OP },     /* Left double angle quotation mark: opening */
+       { 0x00BB, 0x00BB, LBP_CL },     /* Right double angle quotation mark: closing */
+       { 0x201C, 0x201C, LBP_CL },     /* Left double quotation mark: closing */
+       { 0, 0, LBP_Undefined }
+};
+
+/**
+ * Chinese-specifc data over the default Unicode rules.
+ */
+static struct LineBreakProperties lb_prop_Chinese[] = {
+       { 0x2018, 0x2018, LBP_OP },     /* Left single quotation mark: opening */
+       { 0x2019, 0x2019, LBP_CL },     /* Right single quotation mark: closing */
+       { 0x201C, 0x201C, LBP_OP },     /* Left double quotation mark: opening */
+       { 0x201D, 0x201D, LBP_CL },     /* Right double quotation mark: closing */
+       { 0, 0, LBP_Undefined }
+};
+
+/**
+ * Association data of language-specific line breaking properties with
+ * language names.  This is the definition for the static data in this
+ * file.  If you want more flexibility, or do not need the data here,
+ * you may want to redefine \e lb_prop_lang_map in your C source file.
+ */
+struct LineBreakPropertiesLang lb_prop_lang_map[] = {
+       { "en", 2, lb_prop_English },
+       { "de", 2, lb_prop_German },
+       { "es", 2, lb_prop_Spanish },
+       { "fr", 2, lb_prop_French },
+       { "ru", 2, lb_prop_Russian },
+       { "zh", 2, lb_prop_Chinese },
+       { NULL, 0, NULL }
+};
diff --git a/src/static_deps/liblinebreak/linebreakdef.h b/src/static_deps/liblinebreak/linebreakdef.h
new file mode 100644 (file)
index 0000000..bc4eee2
--- /dev/null
@@ -0,0 +1,149 @@
+/* vim: set tabstop=4 shiftwidth=4: */
+
+/*
+ * Line breaking in a Unicode sequence.  Designed to be used in a
+ * generic text renderer.
+ *
+ * Copyright (C) 2008-2010 Wu Yongwei <wuyongwei at gmail dot com>
+ *
+ * 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 14 (UAX #14):
+ *             <URL:http://www.unicode.org/reports/tr14/>
+ *
+ * When this library was designed, this annex was at Revision 19, for
+ * Unicode 5.0.0:
+ *             <URL:http://www.unicode.org/reports/tr14/tr14-19.html>
+ *
+ * This library has been updated according to Revision 24, for
+ * Unicode 5.2.0:
+ *             <URL:http://www.unicode.org/reports/tr14/tr14-24.html>
+ *
+ * The Unicode Terms of Use are available at
+ *             <URL:http://www.unicode.org/copyright.html>
+ */
+
+/**
+ * @file       linebreakdef.h
+ *
+ * Definitions of internal data structures, declarations of global
+ * variables, and function prototypes for the line breaking algorithm.
+ *
+ * @version    2.0, 2010/01/03
+ * @author     Wu Yongwei
+ */
+
+/**
+ * Constant value to mark the end of string.  It is not a valid Unicode
+ * character.
+ */
+#define EOS 0xFFFF
+
+/**
+ * Line break classes.  This is a direct mapping of Table 1 of Unicode
+ * Standard Annex 14, Revision 19.
+ */
+enum LineBreakClass
+{
+       /* This is used to signal an error condition. */
+       LBP_Undefined,  /**< Undefined */
+
+       /* The following break classes are treated in the pair table. */
+       LBP_OP,                 /**< Opening punctuation */
+       LBP_CL,                 /**< Closing punctuation */
+       LBP_CP,                 /**< Closing parenthesis */
+       LBP_QU,                 /**< Ambiguous quotation */
+       LBP_GL,                 /**< Glue */
+       LBP_NS,                 /**< Non-starters */
+       LBP_EX,                 /**< Exclamation/Interrogation */
+       LBP_SY,                 /**< Symbols allowing break after */
+       LBP_IS,                 /**< Infix separator */
+       LBP_PR,                 /**< Prefix */
+       LBP_PO,                 /**< Postfix */
+       LBP_NU,                 /**< Numeric */
+       LBP_AL,                 /**< Alphabetic */
+       LBP_ID,                 /**< Ideographic */
+       LBP_IN,                 /**< Inseparable characters */
+       LBP_HY,                 /**< Hyphen */
+       LBP_BA,                 /**< Break after */
+       LBP_BB,                 /**< Break before */
+       LBP_B2,                 /**< Break on either side (but not pair) */
+       LBP_ZW,                 /**< Zero-width space */
+       LBP_CM,                 /**< Combining marks */
+       LBP_WJ,                 /**< Word joiner */
+       LBP_H2,                 /**< Hangul LV */
+       LBP_H3,                 /**< Hangul LVT */
+       LBP_JL,                 /**< Hangul L Jamo */
+       LBP_JV,                 /**< Hangul V Jamo */
+       LBP_JT,                 /**< Hangul T Jamo */
+
+       /* The following break classes are not treated in the pair table */
+       LBP_AI,                 /**< Ambiguous (alphabetic or ideograph) */
+       LBP_BK,                 /**< Break (mandatory) */
+       LBP_CB,                 /**< Contingent break */
+       LBP_CR,                 /**< Carriage return */
+       LBP_LF,                 /**< Line feed */
+       LBP_NL,                 /**< Next line */
+       LBP_SA,                 /**< South-East Asian */
+       LBP_SG,                 /**< Surrogates */
+       LBP_SP,                 /**< Space */
+       LBP_XX                  /**< Unknown */
+};
+
+/**
+ * Struct for entries of line break properties.  The array of the
+ * entries \e must be sorted.
+ */
+struct LineBreakProperties
+{
+       utf32_t start;                          /**< Starting coding point */
+       utf32_t end;                            /**< End coding point */
+       enum LineBreakClass prop;       /**< The line breaking property */
+};
+
+/**
+ * Struct for association of language-specific line breaking properties
+ * with language names.
+ */
+struct LineBreakPropertiesLang
+{
+       const char *lang;                                       /**< Language name */
+       size_t namelen;                                         /**< Length of name to match */
+       struct LineBreakProperties *lbp;        /**< Pointer to associated data */
+};
+
+/**
+ * Abstract function interface for #lb_get_next_char_utf8,
+ * #lb_get_next_char_utf16, and #lb_get_next_char_utf32.
+ */
+typedef utf32_t (*get_next_char_t)(const void *, size_t, size_t *);
+
+/* Declarations */
+extern struct LineBreakProperties lb_prop_default[];
+extern struct LineBreakPropertiesLang lb_prop_lang_map[];
+
+/* Function Prototype */
+utf32_t lb_get_next_char_utf8(const utf8_t *s, size_t len, size_t *ip);
+utf32_t lb_get_next_char_utf16(const utf16_t *s, size_t len, size_t *ip);
+utf32_t lb_get_next_char_utf32(const utf32_t *s, size_t len, size_t *ip);
+void set_linebreaks(
+               const void *s,
+               size_t len,
+               const char *lang,
+               char *brks,
+               get_next_char_t get_next_char);